Repository navigation
docs: slim the root agent guide and correct stale ownership docs - #3857
Merged
Merged
Conversation
Each layer guide owns its crate table. Bring the tables in line with the workspace: - adapters: add opencode-plugin-host. - adapters (CN): add miniapp-ipc, opencode-plugin-host, dsh-adapter, pi-adapter, claude-code-adapter, codex-adapter, zcode-adapter and static-hook-support; refresh opencode-adapter and transport. - services (CN): add legacy-migration-adapters, miniapp-market-service and skin-market-service; refresh services-core, services-integrations and the legacy-migration guide link. - contracts (CN): add config-contracts.
The root guide is loaded into every agent conversation, so it now keeps only cross-cutting rules and stable entry points (384 -> 193 lines). - The layer table drops its per-layer crate list, which had drifted from the workspace, and gains a "Must not" column that replaces the separate boundary-rule list. Layer guides own the crate tables. - Rust dependency rules move from "Quick start" into their own section. - The architecture guardrail sections become one "Read before changing" list with the hard constraints attached to each entry. - Surface-specific detail already owned by a nearer guide is removed, such as the Web UI i18n namespace rule. - AGENTS-CN.md now mirrors AGENTS.md line for line. Native hook engine, registry, hook-source and dispatch ownership moves to the agent-runtime and core guides, next to the code. They name the actual RuntimeHookRegistry type and describe the separate remote-workspace registry. The root guide keeps the Codex contract rule and one pointer. Also close an unterminated code fence in the agent-runtime guide.
product-architecture.md: the Level 0 development-view diagram and the module inventory now cover every Cargo and pnpm workspace member, and the Computer Use notes name services/computer-use as the owner of the native implementation. computer-use-control.md: "Ownership and execution" still said that Desktop owns the native resources and Core owns the host port. That contradicted "Native provider ownership", added when the provider moved to services/computer-use. The section now lists what each owner holds and must not do, and points the module paths at the service.
CONTRIBUTING referred to a verification matrix and an i18n row in AGENTS.md that the guide does not have. State the i18n commands directly, name the Rust dependency boundary doc beside the product architecture doc, and link AGENTS-CN.md from the Chinese guide.
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.
Summary
Docs only. Brings the agent guides and two architecture documents back in line with the current workspace.
AGENTS.md,AGENTS-CN.md): reorganised to hold only cross-cutting rules and stable entry points, 384 → 193 lines. The Chinese guide now mirrors the English one line for line.agent-runtimeandcoreguides.product-architecture.md: the Level 0 development-view diagram and module inventory cover every Cargo and pnpm workspace member.computer-use-control.md: "Ownership and execution" no longer contradicts "Native provider ownership".CONTRIBUTING.md,CONTRIBUTING_CN.md: stale references toAGENTS.mdcorrected.Type and Areas
Type: docs
Areas: repository contributor and agent guidance, architecture docs
Motivation / Impact
The root guide is loaded into every agent conversation, and parts of it and of the documents it points to had drifted from the code:
computer-use-control.mdstated in "Native provider ownership" thatservices/computer-useowns the native implementation andtool-contractsowns the host port, while "Ownership and execution" still said Desktop owns the native resources and Core owns the port.CONTRIBUTING.mdreferred to a verification matrix and an i18n row inAGENTS.mdthat the guide does not have.No direct user-facing change.
Verification
pnpm run check:repo-hygiene— passed.pnpm run check:github-config— passed.node --test --test-name-pattern="Rust build dependency boundary policy stays discoverable" scripts/check-core-boundaries.test.mjs— passed. This is the only test that reads the changed documents.git diff --check— clean.node scripts/check-git-object-sizes.mjs— passed.product-architecture.mdinventory names all 56 Cargo workspace members and all 16 pnpm workspace packages;AGENTS.mdandAGENTS-CN.mdhave the same line-by-line structure.product-architecture.mdparse with the repository's Mermaid version, and the changed Level 0 diagram was rendered in a browser.Reviewer Notes
The four commits are split by topic and can be reviewed one at a time.
Root guide: rules are regrouped and reworded, not relaxed. Content that leaves the file:
agent-runtimeandcoreguides. Those guides name the actualRuntimeHookRegistrytype and describe the separate remote-workspace registry; the root guide saidHookRegistry.src/web-ui/AGENTS.mdanddocs/architecture/i18n.mdalready own.README.mdandCONTRIBUTING.mdbefore architecture-sensitive changes". The guide now points toCONTRIBUTING.mdfor commit and PR conventions.Content that is new in the root guide:
AGENTS.mdandAGENTS-CN.mdin the same change."src/*-market-webin the layer 1 paths, andpnpm run capabilities:generateafter editing the Product Operation Registry.Computer Use: dated evidence records that mention Desktop test suites are left as written; they describe what was run at the time.
AI-assisted with Cursor. Testing level: lightly tested (the documentation checks listed above).
Checklist