Harness Intelligence Wiki
SpecsWikiKnowledge Unification

Knowledge Unification

Spec: Knowledge Unification

Context

This repository has two knowledge homes. Root docs/ holds 24 files (reference pages, 17 tech-debt pages, runbooks, a 94 KB index) and apps/wiki/scripts/sync-content.mjs copies them into the wiki. HI-DOCS-001, 15 AGENTS.md files and the docs subagent make root docs/ the authority for implemented operations, while apps/wiki owns everything else. Agents that follow different guidance write to different places. The wiki also takes part in CI, bun install, Vercel PR statuses and lint/type/test scripts, so wiki problems can fail gates.

Linear IP-439 asked to unify the knowledge. The closed grill accepted: delete root docs/, keep Fumadocs, make apps/wiki the only Knowledge home, and enforce Wiki gate isolation. Terms follow the glossary.

Non-Goals

  • Replace Fumadocs or the one routed tree apps/wiki/content/docs (Q2).
  • Reorganize moved pages by domain (Q5; later separate work).
  • Add CLI code that migrates target repositories (Q3).
  • Rewrite historical text: grill logs, apps/wiki/log.md entries, research reports, existing spec artifacts other than the knowledge-maintenance pair, commit-pinned links, tracked .tmp/ proof artifacts (Q13).
  • Add any failing wiki check (Q15).
  • Fix the pre-existing broken link project/runbooks/harness-trust-gate.

Requirements and Outcomes

OUT-001: One knowledge home with stable routes

Root docs/ does not exist. Its pages live in apps/wiki/content/docs at their current routes, its index entries live in the wiki index pages, and tech debt lives in one section.

Architecture: OUT-001 mapping; ARC-001, ARC-002, ARC-003, FLOW-001.

OUT-002: One authority in guidance and history

Rules, AGENTS.md files, subagents and live links name only the wiki as the knowledge home. The decision history records the change without rewriting old records.

Architecture: OUT-002 mapping; ARC-004, ARC-005, FLOW-003.

OUT-003: Wiki gate isolation

No lint, type check, test, CI job, commit gate, install step or PR deploy status can fail because of wiki content or wiki code.

Architecture: OUT-003 mapping; ARC-006 to ARC-010, ARC-013, FLOW-002.

OUT-004: Target repositories follow through the Baseline

The shared skills route knowledge and tech debt to the wiki. The change ships as a Baseline release, and IP-439 describes the accepted scope.

Architecture: OUT-004 mapping; ARC-011, ARC-012, FLOW-004.

Acceptance Criteria

  • AC-001: git ls-files docs returns nothing, and no file docs/README.md or redirect page exists at the repository root.
  • AC-002: Every page that existed under apps/wiki/content/docs/project/reference/ (except tech-debt/) and apps/wiki/content/docs/project/runbooks/ before the change exists at the same path after it, with its content kept.
  • AC-003: Each current entry of the former docs/README.md (outside its "Historical records" block) is linked from project/index.mdx or the index page of the section that owns the target. The "Historical records" block is not copied.
  • AC-004: apps/wiki/content/docs/project/reference/tech-debt/ does not exist. The 17 files are under apps/wiki/content/docs/project/tech-debt/<domain>/... with the same sub-paths, are listed in meta.json navigation and the section index, and no live link targets /docs/project/reference/tech-debt.
  • AC-005: HI-DOCS-001 requires all project knowledge in apps/wiki and forbids a root docs/ knowledge tree; its authority and activation name no root docs/ path; its verification is a review check, not a CI check.
    • Covers: OUT-002
    • Architecture: ARC-004
  • AC-006: No AGENTS.md file asks to update docs/README.md. Root AGENTS.md, apps/wiki/AGENTS.md and every nested AGENTS.md that had the duty ask to update the owning wiki page and its section index. Each CLAUDE.md mirror stays a symlink.
  • AC-007: .agents/subagents/manifest.mjs has no docs agent, and .claude/agents/docs.md, .codex/agents/docs.toml, .cursor/agents/docs.md, .opencode/agents/docs.md do not exist. All other harness agent mirrors match the manifest and guidance files.
    • Covers: OUT-002
    • Architecture: ARC-004
  • AC-008: Outside the historical text named in Non-Goals, outside apps/cli target-repository behavior and its tests, and outside generated .devpunks artifacts, no tracked file links to or names a root docs/ path (docs/README.md, docs/reference/..., docs/runbooks/..., docs/AGENTS.md) as a live location. HI-REPO-003 names the wiki page of dp-requirements.
  • AC-009: The knowledge-maintenance grill log has a new entry that supersedes its Q8 and links this grill; its Q8 entry is unchanged. The knowledge-maintenance SPEC.md and ARCHITECTURE.md no longer state that root docs/ is the authority for implemented operations.
    • Covers: OUT-002
    • Architecture: ARC-005
  • AC-010: sync-content.mjs reads no path under root docs/; it still projects apps/wiki/specs/ to content/docs/project/specs/. turbo.json has no $TURBO_ROOT$/docs/** input, and @punks/wiki#build does not depend on check:content. bun run --cwd apps/wiki check:content reports the wiki current.
    • Covers: OUT-003
    • Architecture: ARC-006
  • AC-011: bun run --cwd apps/wiki check:health reports a root docs/ directory, a frontmatter source: path that does not resolve, and a dead link, and exits 0 when it finds them. No build, CI job or commit gate runs it.
  • AC-012: A turbo dry run of the affected task set with a change limited to apps/wiki or to CHANGELOG.md/BASELINE_CHANGELOG.md selects no @punks/wiki task. run-ci-verification.mjs passes --filter=!@punks/wiki in affected and plan; root test:ci excludes @punks/wiki in every turbo run.
  • AC-013: apps/wiki/vercel.json has an ignoreCommand that exits 0 (skip) when VERCEL_GIT_COMMIT_REF is not main and exits 1 (build) on main.
  • AC-014: apps/wiki/package.json scripts are exactly build, dev, start, check:content, check:health. No wiki test file, vitest config, oxlint config, oxlint tool or health test fixture remains; dev dependencies used only by them are removed and bun.lock matches. turbo.json has no entry for a deleted wiki task. bun install runs no wiki lifecycle script.
  • AC-015: classify-release-impact.mjs has no docs/ prefix rule. scripts/assert-wiki-generated-source.mjs does not exist, and no turbo input or lint:repo argument names it. apps/cli/src is unchanged by this work.
    • Covers: OUT-003
    • Architecture: ARC-013
  • AC-016: In the shared skills source on main and in the synced copies here, resolve-debt-phase and implement-spec name <wiki-root>/content/docs/project/tech-debt/<domain>/... for tech debt, and docs-ingest-phase routes implemented operations to the wiki and treats a root docs/ only as legacy input to merge. The sync receipt names the pinned commit.
  • AC-017: BASELINE_CHANGELOG.md Unreleased has a non-empty note for this change, and bun run release:classify -- --base origin/main --head HEAD selects baseline.
  • AC-018: Linear IP-439 in HARNESS INTELLIGENCE describes the accepted scope, links this spec, and has no fog label.
    • Covers: OUT-004
    • Architecture: ARC-012

Constraints

  • Moved pages keep their routes (Q5). Tech-debt pages move once, to project/tech-debt/<domain>/... (Q7).
  • The repository change lands on main as one squashed commit, so main never holds two authorities or a half-moved tree.
  • Shared skills are edited only in /home/stefan/repos/skills on main, then synced; .agents/skills/* and apps/cli/skills/* are not edited by hand. Skill and AGENTS.md text follows writing-for-agents.
  • CLAUDE.md files stay symlinks to their AGENTS.md.
  • Wiki health findings never fail a gate (Q15).

Dependency Readiness

No Stack Required

Branch/Base Intent

Not applicable. The user directed one squashed commit on main.

Architecture Source

Accepted Technical Decisions

DecisionDetailSource
Knowledge homeapps/wiki/content/docs; root docs/ deleted with no stubQ1, ARC-001
RendererKeep Fumadocs and one routed treeQ2
RoutesKeep project/reference/* and project/runbooks/*Q5, ARC-002
Indexdocs/README.md entries into project/index.mdx and section indexes; drop "Historical records"Q6
Tech debtproject/tech-debt/<domain>/...; skills point thereQ7, ARC-003
Rules and guidanceHI-DOCS-001 rewritten; AGENTS.md duty "owning wiki page and its section index"; docs subagent retired; HI-REPO-003 repointedQ8–Q11, ARC-004
HistorySupersede knowledge-maintenance Q8 by a new entry; update its live SPEC/ARCHITECTURE text; keep historical textQ12, Q13, ARC-005
ProjectionOnly apps/wiki/specs/; remove $TURBO_ROOT$/docs/**; build does not depend on check:contentQ14, Q20, ARC-006
Healthcheck:health is report-onlyQ15, ARC-007
CI--filter=!@punks/wiki in affected, plan; root test:ci filtered; changelog files out of wiki turbo inputsQ16, ARC-008
VercelignoreCommand builds main onlyQ17, ARC-009
ScriptsKeep build, dev, start, check:content, check:health; delete lint, format, type-check, check, test scripts, postinstall, tests and orphaned filesQ18–Q20, ARC-010
Skills and releaseFix resolve-debt-phase, implement-spec, docs-ingest-phase on skills main; sync; BASELINE_CHANGELOG.md note; no CLI codeQ3, ARC-011
OrphansRelease classifier docs/ rule and assert-wiki-generated-source.mjs removedR2 checkpoint, ARC-013

Accepted Testing Decisions

  • The wiki has no automated tests after this change (Q19). Verification uses commands and inspection, not new tests.
  • Repository script changes (run-ci-verification.mjs, classify-release-impact.mjs) are verified by their existing tests and by a turbo dry run.

Verification Seams

  • git ls-files, git grep for live root-docs/ paths (AC-001, AC-004, AC-006, AC-008, AC-015).
  • bun run --cwd apps/wiki check:content and check:health (AC-010, AC-011).
  • turbo run build check-types test --affected --filter=!@punks/wiki --dry=json with TURBO_SCM_BASE/TURBO_SCM_HEAD (AC-012).
  • apps/wiki/vercel.json ignoreCommand run with VERCEL_GIT_COMMIT_REF=main and another branch (AC-013).
  • apps/cli/.devpunks-cache/skills-sync.json receipt (AC-016); release:classify output (AC-017); Linear readback (AC-018).

Decision Log

DecisionEvidenceRationale
Delete root docs/Q1One knowledge home
Wiki gate isolationQ2, Q16–Q20No gate may fail because of the wiki
Report-only healthQ15Supersedes the R1 failing-guard draft
Supersede knowledge-maintenance Q8Q12Root docs/ no longer holds authority

On this page