Harness Intelligence Wiki
SpecsWikiKnowledge Unification

Knowledge Unification Plan

Plan: Knowledge Unification

Context Pointers

  • Architecture: ARCHITECTURE.md @ d795b03ee, SHA-256 46b99403eafebcfeb8b9b25abddef3796fdd226ed4d82071284d5106476dc451.
  • Spec: SPEC.md @ 7b0210cfe, SHA-256 6d2634b24dfac4ad9b1a85dc6bd1607c25f923182371b1a71df0e848894f7138.
  • Grill: status SHA-256 270e515f…, log SHA-256 78114c4b… at commit 45fc437bb.
  • Freshness: a task re-reads the pair when either SHA changes. A conflict returns to requirements-grill.
  • architecture_applicability: local. Evidence: the change moves tracked files, rewrites guidance and removes scripts. It adds no module, seam or runtime owner (architecture #whole-system).

Situation and Problem

Root docs/ and apps/wiki both claim knowledge authority, and the wiki takes part in CI, install, Vercel PR statuses and lint/type/test scripts. The spec accepts one knowledge home and Wiki gate isolation (OUT-001 to OUT-004).

Solution Shape

Five disjoint edits in wave 1, the root docs/ deletion and its link sweep in wave 2, then release notes, validation and backlog closure in wave 3. Everything lands as one squashed commit on main (spec Constraints).

Resolved Decision Ledger

DecisionSource
All accepted decisions Q1–Q20Spec #accepted-technical-decisions
Planning-only identities; no backlog syncUser, 2026-10-12: "no delivery or anything. just do it"
No grilling roundNo open decision; grill closed with confirmation (status #current-round)
No planning-discovery, parallel-research or plan-reviewer subagentEvidence gathered during the grill and compile (spec #verification-seams); user asked for direct execution
TDD: not applicableSpec #accepted-testing-decisions: no new tests; verification by commands
Existing CLI release-script tests stay; run the classifier test if one existsSpec #accepted-testing-decisions

Assumptions and Constraints

  • Skill text, AGENTS.md text and rule text follow writing-for-agents (/home/stefan/repos/skills/skills/agnostic/docs/writing-for-agents/SKILL.md).
  • Shared skills change only in /home/stefan/repos/skills on main (repository rule); synced copies are not hand-edited.
  • CLAUDE.md stays a symlink beside each AGENTS.md.
  • Historical text stays unchanged (spec Non-Goals).

Dependency Graph and Waves

  • Wave 1: T1, T2, T3, T4, T5 (disjoint write scopes).
  • Wave 2: T6.
  • Wave 3: T7, then T8.

Tasks

Common fields for every task: task_identity_mode: planning-only; backlog_item_id, backlog_item_url, relation_mode: none; backlog_sync_skip_reason: user requested direct execution without delivery; tdd_status: not-applicable; red_command, expected_red_failure, green_command: none; reason_not_testable: content, guidance and script-surface removal verified by commands (spec #verification-seams); review_mode: cli; runtime_validation: none; runtime_target, runtime_evidence, runtime_cleanup: none; status: done; log, files edited/created and evidence: IMPLEMENTATION-NOTES.md.

T1: Wiki content

  • depends_on: none. wave_boundary: wave 1.
  • location: apps/wiki/content/docs/project/, apps/wiki/AGENTS.md.
  • owned_paths: apps/wiki/content/docs/project/** except specs/wiki/knowledge-unification/**; apps/wiki/AGENTS.md; apps/wiki/index.md; apps/wiki/wiki-framework.md; apps/wiki/README.md.
  • read_dependencies: docs/README.md, docs/reference/**, docs/runbooks/**.
  • description: (a) move project/reference/tech-debt/** to project/tech-debt/** with the same sub-paths, update meta.json files and tech-debt/index.mdx, rewrite every live link to the old route (AC-004). (b) Link each current docs/README.md entry from project/index.mdx or the owning section index; skip "Historical records" (AC-003). (c) Add a knowledge-maintenance grill log entry that supersedes Q8 and links the IP-439 grill; update the live root-docs/ authority statements in the knowledge-maintenance SPEC.md and ARCHITECTURE.md (AC-009). (d) Rewrite apps/wiki/AGENTS.md ownership and wiki contract so content/docs is the only knowledge home, projections come only from specs/, and validation commands are check:content and check:health (AC-006, AC-008). (e) Update live (non-historical) wiki pages that call root docs/ the authority, such as decisions/wiki-content-ownership.mdx (AC-008).
  • validation: bun run --cwd apps/wiki check:health; git grep -n "project/reference/tech-debt" -- apps/wiki/content returns only historical text.
  • assigned_skills: writing-for-agents. implementation_skill_guidance: writing-for-agents — for apps/wiki/AGENTS.md, keep one source of truth per meaning, positive wording, and leave lookups to the environment.
  • codebase_design_notes: none (content only). Spec: OUT-001, OUT-002; AC-003, AC-004, AC-006, AC-008, AC-009. Architecture: ARC-002, ARC-003, ARC-004, ARC-005.

T2: Wiki runtime and isolation

  • depends_on: none. wave_boundary: wave 1.
  • location: apps/wiki/.
  • owned_paths: apps/wiki/scripts/**, apps/wiki/src/public-routes.test.tsx, apps/wiki/package.json, apps/wiki/vercel.json, apps/wiki/vitest.config.ts, apps/wiki/oxlint.config.ts, apps/wiki/tools/**, apps/wiki/test-fixtures/**, apps/wiki/tsconfig.tsbuildinfo, bun.lock.
  • description: (a) sync-content.mjs: remove the root-docs/ trees, tech-decisions.md copy and their link projections; keep the specs/ projection (AC-010). (b) check-health.mjs: report a root docs/ directory and frontmatter source: paths that do not resolve; exit 0 with findings (AC-011). (c) package.json: keep only build, dev, start, check:content, check:health; remove postinstall; remove dev dependencies used only by deleted files; refresh bun.lock with bun install (AC-014). (d) Delete the 5 test files, vitest.config.ts, oxlint.config.ts, tools/oxlint/, test-fixtures/ (AC-014). (e) vercel.json: ignoreCommand that skips non-main builds (AC-013).
  • validation: bun run --cwd apps/wiki check:content; bun run --cwd apps/wiki check:health exits 0; VERCEL_GIT_COMMIT_REF=feature sh -c '<ignoreCommand>'; echo $? is 0 and with main is 1; bun install --frozen-lockfile passes.
  • assigned_skills: none. codebase_design_notes: remove code made unused; add no new abstraction. Spec: OUT-003; AC-010, AC-011, AC-013, AC-014. Architecture: ARC-006, ARC-007, ARC-009, ARC-010.

T3: Root CI and repository scripts

  • depends_on: none. wave_boundary: wave 1.
  • location: repository root.
  • owned_paths: turbo.json, package.json, scripts/behavior-contract/run-ci-verification.mjs, scripts/assert-wiki-generated-source.mjs, apps/cli/scripts/classify-release-impact.mjs.
  • description: (a) turbo.json: remove @punks/wiki#check:content docs/** input, @punks/wiki#check-types, the changelog and assert-script inputs, and the check:content dependency of @punks/wiki#build (AC-010, AC-012, AC-014). (b) run-ci-verification.mjs: add --filter=!@punks/wiki to the affected/plan task list (AC-012). (c) Root test:ci: add --filter=!@punks/wiki to the first turbo run; remove the assert script from lint:repo (AC-012, AC-015). (d) Delete scripts/assert-wiki-generated-source.mjs (AC-015). (e) Remove the docs/ prefix from releasePathOwnership (AC-015).
  • validation: TURBO_SCM_BASE=origin/main TURBO_SCM_HEAD=HEAD bun scripts/behavior-contract/run-ci-verification.mjs affected --dry=json selects no @punks/wiki task; existing tests for the two scripts, if present, pass.
  • assigned_skills: turborepo (filter and inputs). implementation_skill_guidance: turborepo — combine --affected with a negated --filter. Spec: OUT-003; AC-012, AC-015. Architecture: ARC-008, ARC-013.

T4: Guidance, rules and subagents

  • depends_on: none. wave_boundary: wave 1.
  • location: repository root and nested scopes.
  • owned_paths: AGENTS.md; apps/{api,backoffice,cli,web}/AGENTS.md; apps/cli/src/AGENTS.md; apps/cli/src/data/AGENTS.md; packages/*/AGENTS.md; apps/cli/README.md; .agents/rules/**; .agents/subagents/manifest.mjs; .claude/agents/**, .codex/agents/**, .cursor/agents/**, .opencode/agents/**.
  • description: (a) Replace every "update docs/README.md" duty with "update the owning wiki page and its section index"; replace links to root docs/ pages with wiki paths; rewrite root AGENTS.md ownership line that gives docs/ authority (AC-006, AC-008). (b) Rewrite HI-DOCS-001 and its Registry row; repoint HI-REPO-003 authority and activation (AC-005, AC-008). (c) Remove the docs agent from the manifest and the apps-wiki "keep canonical operations in docs" boundary; regenerate harness mirrors with the CLI's buildHarnessAgentFiles; delete the four docs mirrors (AC-007).
  • validation: git grep -n "docs/README.md" over owned paths returns nothing; mirrors equal regenerated output; find . -name CLAUDE.md -not -type l over touched scopes returns nothing.
  • assigned_skills: writing-for-agents, rule-authoring. implementation_skill_guidance: writing-for-agents — one meaning, one place; positive phrasing; prune stale lines.
  • Spec: OUT-002; AC-005 to AC-008. Architecture: ARC-004.

T5: Shared skills and sync

  • depends_on: none. wave_boundary: wave 1.
  • location: /home/stefan/repos/skills main, then this repository.
  • owned_paths: /home/stefan/repos/skills/skills/**/resolve-debt-phase/**, **/implement-spec/references/lifecycle.md, **/docs-ingest-phase/**; apps/cli/scripts/sync-skills-repo.mjs; .agents/skills/**; apps/cli/skills/**; apps/cli/.devpunks-cache/**.
  • description: Edit the three skills (AC-016): tech debt goes to <wiki-root>/content/docs/project/tech-debt/<domain>/...; docs-ingest-phase routes implemented operations to the wiki and treats a root docs/ as legacy input to merge. Commit on skills main as simosabba, push, tag sync/<slug>-<sha12>; move the pin; run bun run sync:skills; verify the receipt commit.
  • validation: receipt in apps/cli/.devpunks-cache/skills-sync.json names the new commit; git grep "docs/reference/tech-debt" -- .agents/skills apps/cli/skills returns nothing.
  • assigned_skills: writing-for-agents. implementation_skill_guidance: writing-for-agents — sharpen pointers; positive target behavior; no sediment.
  • Spec: OUT-004; AC-016. Architecture: ARC-011, FLOW-004.
  • depends_on: T1, T2, T3, T4. wave_boundary: wave 2.
  • owned_paths: docs/**; any remaining live file the sweep finds outside other tasks' completed paths.
  • description: git rm -r docs; run bun run --cwd apps/wiki check:content to prove the projection no longer needs it; sweep git grep for live root-docs/ paths and repoint the remaining ones (AC-001, AC-002, AC-008).
  • validation: git ls-files docs is empty; check:content and check:health pass; reference and runbook page list equals the pre-change list.
  • Spec: OUT-001; AC-001, AC-002, AC-008. Architecture: ARC-001, FLOW-001.

T7: Changelog and validation

  • depends_on: T5, T6. wave_boundary: wave 3.
  • owned_paths: BASELINE_CHANGELOG.md; apps/wiki/log.md; this plan's status fields; IMPLEMENTATION-NOTES.md.
  • description: Add the Unreleased note; run bun run release:classify -- --base origin/main --head HEAD and require baseline; run all task validations again; record evidence (AC-017).
  • Spec: OUT-004; AC-017.

T8: Rewrite IP-439

  • depends_on: T7. wave_boundary: wave 3.
  • owned_paths: Linear IP-439.
  • description: Rewrite title and description to the accepted scope, link the spec, remove label fog; read back (AC-018).
  • Spec: OUT-004; AC-018. Architecture: ARC-012.

Testing Strategy

No new tests (spec #accepted-testing-decisions). Each task runs its command checks. T7 repeats them on the final tree and runs the release classifier.

Risks and Mitigations

RiskMitigation
Deleting docs/ before the projection change makes sync-content.mjs prune the copiesT6 depends on T2
bun install lock drift after dev-dependency removalT2 refreshes bun.lock and checks --frozen-lockfile
Pre-commit hook fails on unrelated pre-existing lintVerify on a clean origin/main tree before any bypass (memory: skills sync release flow)
Turbo rejects --affected with --filterDry run in T3 validation

Unresolved Questions

None.

On this page