Skip to content

Root wiki: consult sub-wikis as read-only reference for scope/terminology (hybrid) #6

Description

@ppsplus-bradh

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

  1. 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).
  2. 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

  • Root role guidance instructs consulting each sub-wiki's quickstart for
    scope/terminology consistency, via the workspaces manifest.
  • Subproject role guidance and all evidence/fingerprint scoping are
    unchanged (no new invalidation edge; verify plannerEvidenceScope /
    fingerprintScope for root are untouched).
  • test/agent/repository-prompts.test.ts covers the new root guidance.
  • typecheck / build / lint clean; full test suite green.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions