-
Notifications
You must be signed in to change notification settings - Fork 12
docs(sdk): add normative invariants to architecture docs#274
docs(sdk): add normative invariants to architecture docs #274
Conversation
...815\n\nCo-authored-by: openhands <openhands@all-hands.dev>
...Co-authored-by: openhands <openhands@all-hands.dev>
...: openhands <openhands@all-hands.dev>
...\n\nCo-authored-by: openhands <openhands@all-hands.dev>
...d-by: openhands <openhands@all-hands.dev>
Looks like there are a few issues preventing this PR from being merged!
- GitHub Actions are failing:
- .github/workflows/sync-agent-sdk-openapi.yml
- .github/workflows/sync-docs-code-blocks.yml
If you'd like me to help, just leave a comment, like
@OpenHands please fix the failing actions on PR #274 at branch `openhands/sdk-arch-1815`
Feel free to include any additional details that might help me get this PR into a better state.
You can manage your notification settings
enyst
commented
Feb 18, 2026
@OpenHands The trouble with this PR is that it displays our OCL constraints in the user-facing docs, but they are meant for AI agents, not for humans.
I think we have two options:
- either insert them as html comments or something that is invisible to the user, but accessible to LLMs when AI agents read the pages
- or, maybe we can create / modify / fix
llms.txtand thefullvariant of it, so that it includes those sections, but the user-facing docs doesn't. (look up on the net the llms.txt emerging standard to see what it should work like)
WDYT? Answer me directly on github, in a comment you post to this PR. Note that it will be rendered as markdown.
I'm on it! enyst can track my progress at all-hands.dev
I did not make any repository changes in this interaction. I answered the PR comment question by recommending how to handle the OCL constraints so they’re available to AI agents but not shown in user-facing docs:
- Prefer option 1 as the immediate fix: keep the natural-language invariants visible, but move the OCL blocks into HTML comments (non-rendered) with clear sentinels like
<!-- AI_INVARIANTS_BEGIN --> ... <!-- AI_INVARIANTS_END -->so agents can reliably extract them. - Treat
llms.txt/llms-full.txtas a potential follow-up packaging step (useful long-term, but adds maintenance/drift considerations), not the primary solution. - I provided a ready-to-paste Markdown PR comment expressing that recommendation.
No git diff to review, no commits, and nothing to push.
Uh oh!
There was an error while loading. Please reload this page.
HUMAN: I’ve been thinking for a while that maybe it will help LLMs to
I asked OH to model the first few layers of the SDK (I think it only did the first in-package layer, will come back to that if we want this) and add constraints in both natural language and, if simple, in good old OCL.
——
Summary of changes
Added "Invariants (Normative)" sections across SDK architecture docs (design, agent, conversation, events, tool system, workspace)
Included OCL-like invariants where simple and precise natural-language invariants where complex
Fixed/maintained MDX structure so tables/mermaid blocks render correctly
closes Analyze the SDK and model it software-agent-sdk#1815
@enyst can click here to continue refining the PR