Summary
Make the monorepo root wiki consult each subproject's sub-wiki as read-only
reference material when writing its repository-wide overview, so the root's
scope/terminology stays consistent with how each subproject describes itself —
without making sub-wiki regeneration an invalidation trigger for the root.
This is the "hybrid" (Option C) from a design discussion: get the
summary-of-summaries consistency benefit while keeping the dependency graph
clean (source → sub-wiki → root as a read-only reference, never an
invalidation edge, so no churn loops).
Background — how the root wiki works today
The root run (recursionRole: "root", src/agent/repository-prompts.ts:32-37)
is told to: not deep-document subprojects; link DOWN to each subproject's
openwiki/quickstart.md; describe repository-wide concerns (architecture, how
subprojects fit together, shared tooling, cross-cutting workflows); and treat
the deterministically-generated openwiki/workspaces.md as the sub-wiki catalog.
The root writes its overview from repo-wide source — the root-excluding-nested
planner-evidence scope excludes generated **/openwiki/** but includes all
subproject source. It regenerates on every recursive run (its no-op check is
repo-wide). So it already reacts to real subproject scope changes via the
underlying source; it just doesn't consult the sub-wikis' own distilled framing.
Read access already exists: src/agent/docs-only-backend.ts gates reads only
by .openwikiignore/.claims (the openwiki-tree confinement applies to
writes only), and the root run is rooted at the repo root — so it can already
read packages/*/openwiki/quickstart.md. No backend or ignore change is needed.
Scope of work
- Prompt (
recursionRoleGuidance("root") in
src/agent/repository-prompts.ts): add guidance instructing the root to
consult each subproject's sub-wiki entrypoint (its openwiki/quickstart.md,
enumerated from openwiki/workspaces.json / openwiki/workspaces.md) for
scope, naming, and terminology, then write a repo-wide overview that is
consistent with them — while keeping the existing rules (link down, do NOT
deep-document or copy sub-wiki content; workspaces.md stays generated).
- Tests: extend
test/agent/repository-prompts.test.ts to assert the root
guidance directs consulting the sub-wiki quickstarts (and that the subproject
guidance is unchanged).
Explicit non-goals (keep the dependency graph clean)
- Do NOT add nested
**/openwiki/** to the root's planner evidence
(plannerEvidenceScope("root") stays root-excluding-nested) or to the root
fingerprint (fingerprintScope("root") stays repo-wide/unscoped). Sub-wikis
remain a read-only reference, never an invalidation edge — this is what
prevents a sub-wiki-regen → root-regen churn loop.
- Do NOT have the root deep-document or duplicate sub-wiki content; it
synthesizes a repo-wide overview and links down.
- No change to the deterministic
workspaces.md aggregation.
Acceptance criteria
Summary
Make the monorepo root wiki consult each subproject's sub-wiki as read-only
reference material when writing its repository-wide overview, so the root's
scope/terminology stays consistent with how each subproject describes itself —
without making sub-wiki regeneration an invalidation trigger for the root.
This is the "hybrid" (Option C) from a design discussion: get the
summary-of-summaries consistency benefit while keeping the dependency graph
clean (source → sub-wiki → root as a read-only reference, never an
invalidation edge, so no churn loops).
Background — how the root wiki works today
The root run (
recursionRole: "root",src/agent/repository-prompts.ts:32-37)is told to: not deep-document subprojects; link DOWN to each subproject's
openwiki/quickstart.md; describe repository-wide concerns (architecture, howsubprojects fit together, shared tooling, cross-cutting workflows); and treat
the deterministically-generated
openwiki/workspaces.mdas the sub-wiki catalog.The root writes its overview from repo-wide source — the
root-excluding-nestedplanner-evidence scope excludes generated
**/openwiki/**but includes allsubproject source. It regenerates on every recursive run (its no-op check is
repo-wide). So it already reacts to real subproject scope changes via the
underlying source; it just doesn't consult the sub-wikis' own distilled framing.
Read access already exists:
src/agent/docs-only-backend.tsgates reads onlyby
.openwikiignore/.claims(the openwiki-tree confinement applies towrites only), and the root run is rooted at the repo root — so it can already
read
packages/*/openwiki/quickstart.md. No backend or ignore change is needed.Scope of work
recursionRoleGuidance("root")insrc/agent/repository-prompts.ts): add guidance instructing the root toconsult each subproject's sub-wiki entrypoint (its
openwiki/quickstart.md,enumerated from
openwiki/workspaces.json/openwiki/workspaces.md) forscope, naming, and terminology, then write a repo-wide overview that is
consistent with them — while keeping the existing rules (link down, do NOT
deep-document or copy sub-wiki content;
workspaces.mdstays generated).test/agent/repository-prompts.test.tsto assert the rootguidance directs consulting the sub-wiki quickstarts (and that the subproject
guidance is unchanged).
Explicit non-goals (keep the dependency graph clean)
**/openwiki/**to the root's planner evidence(
plannerEvidenceScope("root")staysroot-excluding-nested) or to the rootfingerprint (
fingerprintScope("root")stays repo-wide/unscoped). Sub-wikisremain a read-only reference, never an invalidation edge — this is what
prevents a sub-wiki-regen → root-regen churn loop.
synthesizes a repo-wide overview and links down.
workspaces.mdaggregation.Acceptance criteria
scope/terminology consistency, via the workspaces manifest.
unchanged (no new invalidation edge; verify
plannerEvidenceScope/fingerprintScopeforrootare untouched).test/agent/repository-prompts.test.tscovers the new root guidance.