Repository navigation
docs: restructure for agent consumption and add protocol diagrams - #167
Merged
Merged
Conversation
- Add the agent reading contract page (EN/ZH) and an "For agents" nav entry. - Add llms.txt plus a generated llms-full.txt bundle built from the page sources. - Fix audited fact drift across reference and how-to pages in both locales: ToolDescriptor coverage, extensions contract, connect signature wording, Rust SpokeResult/async examples, demo manifests, FFI symbol maps. - Rewrite README and README_CN around human onboarding and link details to the site. - Add six Archify diagrams as light/dark SVGs with regeneration tooling.
[Low impact] The PR changes how readers find and understand SPOKE documentation, not protocol behavior. Correct the advertised Connect version before merging; the shipped library rejects the newly documented value. Findings
Fix with agent prompt### Issue 1
docs/explanation/connect.md:32
The new instruction to advertise `protocol_version: 2` makes custom clients incompatible with the shipped library. `PROTOCOL_VERSION` is still `1`, and `verify_hello_ed25519` rejects other values before checking the signature. Keep the advertised value at `1` and distinguish it from the newer signature requirements. Correct the Chinese page too.
### Issue 2
tooling/diagrams/specs/connect-session.sequence.json:79-85
The diagram shows the initiator sending a `ConnectSession` before the responder sends another one. The actual handshake sends only one snapshot, from the responder immediately after its hello. Readers following the diagram may send an unexpected frame or wait for an extra reply. Remove the initiator-to-responder snapshot and regenerate both SVGs.
### Issue 3
docs/agents.md:71
Not every missing capability returns `capability_missing`. The responder returns `op_unsupported` for unnegotiated tools and optional port families, and for a missing `ke-ownership` requirement. Agents following this rule can generate error branches that miss those responses. Limit the claim to the families that use `capability_missing`, or name both errors. Correct the Chinese page too.
### Issue 4
tooling/docs/build-llms.mjs:49-52
`absolutize` leaves page-local links such as `#cognition-selection-spoke-cognition` unchanged. Once the pages are combined into `llms-full.txt`, those links lose their original page address, so agents cannot resolve them back to the intended site sections. Pass the source page into `absolutize` and turn fragment-only links into full site URLs before combining the pages.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryThis PR adds agent-facing documentation, a generated English bundle, rewritten READMEs, and six protocol diagrams.
|
✅ Verdict:
|
| Findings | Count |
|---|---|
| 🔴 must-fix | 0 |
| 🟠 should-fix | 0 |
| 🟡 may-fix | 0 |
| 🔵 nit | 0 |
📋 Review
Findings
none
Revalidated findings
Reassessed 0/13 prior finding(s) this round · 13 invalid-output · 0 omitted · 0 over cap · 13 recheckable · context coverage: truncated
| finding | disposition | evidence | thread |
|---|---|---|---|
| Diagram gate's "accessible title" assertion passes on nested node titles, so it cannot catch the regression this PR fixes | unverifiable (invalid-output) | - | - |
| export-svg.mjs usage header hardcodes a macOS Playwright Chrome path and a docs/public input | unverifiable (invalid-output) | - | - |
| Diagram gate reports every read failure as "missing", discarding the real cause | unverifiable (invalid-output) | - | - |
| Contradictory diagram HTML delivery paths: specs and exporter target docs/public, README says /tmp and "not committed" | unverifiable (invalid-output) | - | - |
| Committed diagram SVGs have no regeneration/verification gate and their generator is an unpinned external skill | unverifiable (invalid-output) | - | - |
| Agents page states the dispatch deny codes backwards for every non-memory family | unverifiable (invalid-output) | - | - |
<title> requirement dropped and aria-labelledby mandated without updating the documented gate contract |
unverifiable (invalid-output) | - | - |
| Rewritten deny-code trap drops the spoke-cognition capability_missing case (EN+ZH readers now misclassify it as op_unsupported) | unverifiable (invalid-output) | - | - |
aria-labelledby idrefs are checked by raw substring match, so a non-id attribute satisfies the new accessible-name gate |
unverifiable (invalid-output) | - | - |
| Agent reading contract omits TimelineEvent.computable_logs from the l2-computable row | unverifiable (invalid-output) | - | - |
| Connect explanation says the hello advertises protocol_version 2, contradicting the reference page, the spec and the shipped constant | unverifiable (invalid-output) | - | - |
| Idref string is interpolated unescaped into a RegExp: wildcard false matches and an uncaught SyntaxError crash | unverifiable (invalid-output) | - | - |
Exported SVGs strip lang and aria-labelledby but keep the <title>, losing the accessible name |
unverifiable (invalid-output) | - | - |
Linked-issue AC
none
✅ Verified
none
🗑️ Considered & rejected
none
🛠️ Plan to fix
none
btspoony
enabled auto-merge (squash)
November 9, 2026 16:12
…undle links - connect explanation: the shipped session core advertises protocol_version 1; version 2 describes the post-hello signature fields. Mixed-version hellos are rejected before signature verification. - agents page: l2-computable adds TimelineEvent.computable_logs; dispatch distinguishes capability_missing from op_unsupported. - connect-session diagram: the responder sends the single ConnectSession snapshot. - llms bundle: resolve fragment-only links against their source page. - diagrams: add a committed-SVG gate (docs:diagrams), drop meta.output, keep lang/aria-labelledby in exported SVGs, and correct the exporter usage.
- agents page: tools, port.*, extract and ownership-gated ops answer op_unsupported; only a known memory.* op answers capability_missing. - verify-svg: resolve every aria-labelledby id against the document, and report the real read error instead of flattening it to "missing".
- verify-svg: match `id` only as an attribute (not inside data-node-id), escape regex metacharacters, and keep the <title> assertion the README states. - agents page: a cognition-bearing request without spoke-cognition answers capability_missing; op_unsupported covers the static families and the viewpoint conjunct.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two deliverables: an agent-oriented docs layer with corrected facts, and a human-oriented README, plus six protocol diagrams used by both.
Docs (agent-facing)
docs/agents.mdanddocs/zh/agents.md: fact hierarchy (schemas/>.mstar/specs/> reference > how-to), reading order, task routing, capability table, common traps.docs/public/llms.txtindex and a generatedllms-full.txtbundle (tooling/docs/build-llms.mjs), wired intodocs:build/docs:dev. The bundle is gitignored.Fact fixes (EN + ZH)
ToolDescriptornow has a field table in the data model; the extensions contract names the record objects that carry the bag.requiredlists match the committed schema, which encodes the protocol_version 2 wire shape.SpokeResult::Ok/Reject,.awaitonconnect_remote_adapter, and pass theArctoregister_peer.ke-extraction,ke-ownership,input-source,viewpoint).MemoryPortServiceis attributed to the Rust crate; C# and Go FFI symbol names match the generated bindings.Scopefields,initial_sequence, CONTRIBUTING rust-toolchain guidance, and the workspace-private package list.README (human-facing)
Rewritten around positioning, one diagram, install, a first promote, package and capability tables, and a docs routing table. Negation and delivery archaeology removed; details link to the site.
Diagrams
tooling/diagrams/specs/holds six Archify specifications (architecture, sequence, lifecycle, dataflow). Each passedvalidate --quality showcasewith 0 errors and 0 warnings.tooling/diagrams/export-svg.mjsexports light/dark static SVGs intodocs/public/diagrams/. The interactive HTML is not committed.Verification
node tooling/docs/twin-parity.mjs— 26 EN ↔ 26 CN, 0 heading mismatches.pnpm docs:build— complete.node tooling/docs/deadlink-check.mjs— 3231 links, 106 fragments, 0 broken.