Harness Intelligence Wiki
SpecsWikiKnowledge Unification

Knowledge Unification

Architecture: Knowledge Unification

Context and Scope

  • Capability identity: apps/wiki/content/docs/project/specs/wiki/knowledge-unification. The capability makes apps/wiki the one Knowledge home of this repository and makes sure that no repository gate fails because of the wiki. Linear issue: IP-439.
  • Actors and outcome: agents that write or read project knowledge, maintainers that run CI and releases, and target repositories that receive shared skills through the Baseline. The outcome is one place to write and find knowledge, and no wiki-caused gate failure (Q1, Q2).
  • In scope: delete root docs/; keep its pages at their current wiki routes; merge the tech-debt sections; move authority statements, rules, AGENTS.md duties and the docs subagent to the wiki; remove the root-docs/ projection; isolate the wiki from CI, Vercel PR statuses, install and lint/type/test scripts; fix the shared skills that hard-code root docs/; rewrite IP-439.
  • Non-goals: replace Fumadocs (Q2); reorganize the moved pages by domain (Q5); add CLI migration code for target repositories (Q3); rewrite historical text (Q13); add a failing wiki guard (Q15).
  • Spec: sibling SPEC.md in this folder.

Canonical Terms

Terms come from the published glossary and the status glossary.

  • Knowledge home: the one directory that owns all durable project knowledge. Here: apps/wiki.
  • Projection: a committed wiki page that scripts/sync-content.mjs generates from a source outside content/docs. After this change the only source is apps/wiki/specs/.
  • Root docs: the repository directory docs/. This change deletes it.
  • Wiki gate isolation: no lint, type check, test, CI job, commit gate or deploy status fails because of wiki content or wiki code.

Axioms: apps/wiki is the only knowledge home and root docs/ does not exist. No gate fails because of the wiki. Fumadocs renders the one routed tree apps/wiki/content/docs. Wiki health findings are reports, never gate failures. "Root docs/" names the directory; "route /docs/..." names wiki URLs.

Sources

SourceRoleExact location and anchorImmutable revision or content hash
S1Grill status and closureStatus, #branches, #technical-groundingCommit 45fc437bb4dad8271e3f3ce8c7cebbf9f1e53c7a; SHA-256 270e515f966b9887435f1fd645857bfa569162c75d12935a61d577c6da83af9e
S2Durable grill logLog, #q1 to #q20, #r2-checkpoint, #closureCommit 45fc437bb; SHA-256 78114c4b42f0965609f7a6b3b41105c1de4ff0bc8895ac9485069996856f553e
S3Current glossaryStatus #glossary; published glossaryStatus as S1; glossary SHA-256 a221f7c99fd31bb04f98870666b712c1be50965cdba5dc8caa1f398b5eb07a64
S4Superseded prior decisionKnowledge-maintenance Q8Commit 45fc437bb; SHA-256 fee0fcac62c46b3917783126d2c5fa8ef755f30666ba137b14b10ac33f56bd57
S5Observed current code (not design)apps/wiki/scripts/sync-content.mjs:119-160,214-228; apps/wiki/package.json scripts; turbo.json @punks/wiki#build, #check:content, #check-types; scripts/behavior-contract/run-ci-verification.mjs:253-291; package.json:48,63; apps/wiki/vercel.json; apps/cli/scripts/classify-release-impact.mjs:168; .agents/rules/docs/knowledge-boundary.md; .agents/subagents/manifest.mjs docs entryCommit 45fc437bb (tree identical to origin/main 0777e5bd7 outside apps/wiki/content and apps/wiki/log.md)
S6Shared skills source/home/stefan/repos/skills main: resolve-debt-phase/SKILL.md, implement-spec/references/lifecycle.md, docs-ingest-phase/{SKILL.md,phases/private-internal.md,phases/router.md,references/repo-docs.md}main at 189cb11

S5 records current behavior. The design below records accepted target behavior. Neither proves the other.

Source Disposition

Question / entryDispositionAccepted detail, replacement, or unresolved pointEvidenceParked owner / resume trigger
Q1 to Q14acceptedSee exact detail coverageS2Not parked
Q15acceptedAdvisory check:health; supersedes the R1 draft that proposed a failing guardS2 #q15Not parked
Q16 to Q20acceptedSee exact detail coverageS2Not parked
Knowledge-maintenance Q8supersededRoot docs/ is no longer the authority for implemented operations; replaced by Q1 and Q12S4, S2 #q12Not parked
R2 checkpointaccepted (consequences of Q1, Q3, Q16, Q18)Dead docs/ prefix in the release classifier; orphaned assert-wiki-generated-source.mjs; docsRoot re-derived by hi update; Vercel build does not read turbo inputsS2 #r2-checkpoint, S5Not parked

Whole System

Anchors: Q1, Q2, Q14, Q16–Q20. Conclusion: today two write paths and two authorities exist, and the wiki has four edges into gates. The target has one write path and one authority. The wiki has no edge into any gate. The only remaining wiki signal is a report.

Block selector / component / levelOwnerState and authorityInterface / dependencySupported constraint and source
ARC-001 Knowledge homeapps/wikiapps/wiki/content/docs is the only authoritative knowledge tree; root docs/ is absent, with no stub or redirectFumadocs routes /docs/...One knowledge home (Q1, Q2)
ARC-002 Moved pages and indexapps/wikiThe committed copies under project/reference/* and project/runbooks/* become authored pages at their current routes. docs/README.md entries move into project/index.mdx and the section index pages; its "Historical records" block is droppedExisting route links (about 400) stay validNo route churn; one index (Q5, Q6)
ARC-003 Tech-debt sectionapps/wikiOne section project/tech-debt/<domain>/...; the 17 files under project/reference/tech-debt/ move there, keeping their sub-pathsresolve-debt-phase, implement-spec write hereOne tech-debt route (Q7)
ARC-004 Authority and guidancerepository guidanceHI-DOCS-001 states: all project knowledge lives in apps/wiki; no root docs/ knowledge tree may exist (review rule, not CI). Root and nested AGENTS.md duty: "update the owning wiki page and its section index". docs subagent and docs/AGENTS.md retired; its harness mirrors removed. HI-REPO-003 and other live rules, guidance and links point at the wiki pagesRule Registry; .agents/subagents/manifest.mjs; harness mirrors under .claude, .codex, .cursor, .opencodeOne authority (Q8–Q11)
ARC-005 Decision historyapps/wikiKnowledge-maintenance grill log gets a new entry that supersedes its Q8 and links this grill; live statements in its SPEC.md and ARCHITECTURE.md that make root docs/ the authority are updated. Grill logs, log.md entries, research reports, other spec artifacts and commit-pinned links stay unchangedAppend-only logTruthful history (Q12, Q13)
ARC-006 Projection pipelineapps/wiki/scriptssync-content.mjs keeps only the specs/ projection; the root-docs/ copy, its link-rewrite projections and tech-decisions.md copy are deleted. turbo.json loses $TURBO_ROOT$/docs/**. build no longer depends on check:content; it writes the specs/ copies and continuesbun run build = sync-content.mjs && fumadocs-mdx && next buildNo dead input; no build failure from stale copies (Q14, Q20)
ARC-007 Health reportingapps/wiki/scripts/check-health.mjsReports a returned root docs/, broken frontmatter source: paths and dead links. Never wired into a build, CI job or commit gateRun by agents through docs-ingest-phase and the knowledge-maintenance flowAdvisory detection (Q15)
ARC-008 CI isolationroot scripts, turbo.jsonrun-ci-verification.mjs passes --filter=!@punks/wiki to the affected and plan turbo runs; static runs only root tasks and stays free of wiki tasks. Root test:ci also excludes @punks/wiki. The wiki turbo inputs no longer list root CHANGELOG.md or BASELINE_CHANGELOG.mdGitHub check "Affected Verification"Wiki never selected in CI (Q16)
ARC-009 Vercel deploy statusapps/wiki/vercel.jsonAn ignoreCommand skips every build whose branch is not main; only main deploys the wikiVercel project harness-intelligence-wikiNo failing wiki status on PRs (Q17)
ARC-010 Wiki script surfaceapps/wiki/package.jsonScripts kept: build, dev, start, check:content, check:health. Deleted: lint, format, format:check, check-types, types:check, check, test, test:ci, postinstall, the 5 test files, and the files and dev dependencies that only they used. Turbo entries for deleted tasks are removedbun install runs no wiki stepNothing can lint, type-check or test the wiki (Q18–Q20)
ARC-011 Shared skills and Baseline/home/stefan/repos/skills mainresolve-debt-phase and implement-spec write tech debt 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, never a write target. Changes reach this repository through bun run sync:skills and reach targets through the Baseline; BASELINE_CHANGELOG.md Unreleased gets a reviewed noteapps/cli/scripts/sync-skills-repo.mjs pinSame knowledge home in targets, no CLI migration code (Q3)
ARC-012 Backlog identityLinearIP-439 is rewritten to the accepted scope in the HARNESS INTELLIGENCE project; label fog removed at grill closureLinear issue IP-439One delivery identity (Q4)
ARC-013 Peripheral consequencesrepository scripts, CLIclassify-release-impact.mjs drops its docs/ prefix; scripts/assert-wiki-generated-source.mjs is deleted with its turbo input and lint:repo argument. The CLI keeps its target-repository behavior: docsRoot detection and the docs/AGENTS.md prompt stay; this repository's generated .devpunks artifacts refresh on the next hi updateapps/cli/src/registry/shape.ts:142No dead paths; no CLI change (R2 checkpoint, Q3)

Critical Flows and Boundaries

  • FLOW-001-STEP-001: The committed copies already carry rewritten /docs/... links and frontmatter. They stay in place and become authored (Q5).
  • FLOW-001-STEP-002: Tech-debt files move to project/tech-debt/<domain>/...; inbound links follow (Q7).
  • FLOW-001-STEP-003: Current entries move into the wiki index pages; "Historical records" is dropped (Q6).
  • FLOW-001-STEP-004: Root docs/ and the copy code are deleted together, so no step sees a source without its copy step or the reverse (Q1, Q14).
  • FLOW-001-STEP-005: Authority statements, rules, live links and the subagent move in the same change (Q8–Q11).
  • FLOW-001-STEP-006: check:health reports remaining findings; no gate consumes the report (Q15).

Conclusion: the steps land in one squashed commit on main. No intermediate state reaches main, so no reader sees two authorities or a half-moved tree.

  • FLOW-002-STEP-001: No postinstall exists in the wiki, so a wiki failure cannot break bun install (Q20).
  • FLOW-002-STEP-002: Turbo never selects @punks/wiki; changelog edits do not make it affected (Q16).
  • FLOW-002-STEP-003: Vercel skips the wiki build on every non-main branch (Q17).
  • FLOW-002-STEP-004: A main build runs sync-content.mjs, fumadocs-mdx, next build. Its failure affects the deployed wiki only; no repository gate reads it (Q2).

Conclusion: every entry point into a gate has no wiki edge. Changed-file lint/format, root check and the commit gate contracts already exclude the wiki (S2 #branch-wiki-gate-isolation).

  • FLOW-003-STEP-001: Guidance names the owning wiki page and its section index (Q8, Q9).
  • FLOW-003-STEP-002: Shared skills route to <wiki-root>; a root docs/ is legacy input only (Q3).
  • FLOW-003-STEP-003: Tech debt lands in project/tech-debt/<domain>/... (Q7).
  • FLOW-003-STEP-004: The agent reads the health report and acts on it (Q15).

Conclusion: the two write paths that diverged before (status brainstorm finding) become one.

  • FLOW-004-STEP-001: Edit and commit the skills on /home/stefan/repos/skills main; push and tag.
  • FLOW-004-STEP-002: Move the pin in apps/cli/scripts/sync-skills-repo.mjs, run bun run sync:skills, verify the receipt SHA.
  • FLOW-004-STEP-003: Add the reviewed BASELINE_CHANGELOG.md Unreleased note; release classification selects baseline; the release workflow publishes the Baseline from main.
  • FLOW-004-STEP-004: A target runs hi update; a target that keeps a root docs/ reconciles it in the post-command handoff only if needed.

Anchors: Q3; repository rule "Shared skills source of truth". Conclusion: targets change through the existing Baseline path; the CLI gets no new code.

Accepted Detail Coverage

Question + exact entry/evidence anchorExact accepted choice and supplied detailProvided rationale / alternativesArchitecture selector + applicable visualSystem constraint served
Q1Delete root docs/ completely; no stub docs/README.md or redirectUser: "no docs we keep apps/wiki only"ARC-001, FLOW-001-STEP-004One knowledge home
Q2Keep Fumadocs and one content/docs tree; no gate may fail because of the wiki; no lint or type check of the wikiUser: "no lints or ci or whatever must EVER fail due to wiki"ARC-001, ARC-008–ARC-010, FLOW-002Wiki gate isolation
Q3Migrate here only; fix resolve-debt-phase, implement-spec, docs-ingest-phase (references/repo-docs.md) in the shared source on main, then sync; targets follow through the Baseline; no CLI migration code; BASELINE_CHANGELOG.md noteUser: "will apply here only due to baseline update"ARC-011, ARC-013, FLOW-004Reusable reach without CLI change
Q4Rewrite IP-439 in HARNESS INTELLIGENCE; remove label fog at grill closurenot recordedARC-012One delivery identity
Q5Moved pages stay at project/reference/* and project/runbooks/*; domain reorganization is later separate workAbout 400 links stay validARC-002, FLOW-001-STEP-001No route churn
Q6docs/README.md entries move into project/index.mdx and section index pages; "Historical records" droppedA second index goes out of date; git keeps historyARC-002, FLOW-001-STEP-003One index
Q7One section project/tech-debt/<domain>/...; 17 files move; resolve-debt-phase and implement-spec point thereTwo routes; skills wrote to the wrong oneARC-003, ARC-011, FLOW-001-STEP-002, FLOW-003-STEP-003One tech-debt route
Q8Rewrite HI-DOCS-001: all project knowledge in apps/wiki; no root docs/ knowledge tree; review rule, not CIKeeps agents from bringing docs/ backARC-004, FLOW-003-STEP-001One authority
Q9Nested, root and apps/wiki AGENTS.md: "update the owning wiki page and its section index"Same duty, new placeARC-004, FLOW-003-STEP-001One authority
Q10Retire docs/AGENTS.md and the docs subagent (manifest entry and harness mirrors); apps-wiki owns the pagesTwo owners conflictARC-004One owner
Q11HI-REPO-003 and other rules naming root docs/ paths point at the moved wiki pagesnot recordedARC-004, FLOW-001-STEP-005No dead authority paths
Q12New entry in the knowledge-maintenance grill log supersedes its Q8; live SPEC and ARCHITECTURE statements updatednot recordedARC-005Truthful history
Q13Historical text unchanged: grill logs, log.md, research reports, commit-pinned linksLog append-only; pinned links resolveARC-005Truthful history
Q14Delete root-docs/ copy and link-rewrite code and $TURBO_ROOT$/docs/**; keep specs/ copy (about 50 files)Dead input after the moveARC-006, FLOW-001-STEP-004No dead pipeline
Q15check:health reports returned root docs/, broken source: paths, dead links; never fails a build, CI job or commit gateA failing guard is a wiki-caused failureARC-007, FLOW-001-STEP-006, FLOW-003-STEP-004Advisory detection
Q16--filter=!@punks/wiki in affected, plan, static; changelog files out of wiki turbo inputsOnly change that gives the guaranteeARC-008, FLOW-002-STEP-002Wiki gate isolation
Q17Ignore step in apps/wiki/vercel.json; build only mainRejected: keep previews with a red non-blocking statusARC-009, FLOW-002-STEP-003No failing PR status
Q18Delete lint, format, format:check, check-types, types:check, check and their turbo entriesRemoving scripts guarantees nothing runs themARC-010No wiki lint/type check
Q19Delete test, test:ci and the 5 test filesTests CI never runs decay; rejected: keep sync-content.test.mjsARC-010No dead tests
Q20Remove postinstall: fumadocs-mdx; remove build dependency on check:contentbuild and dev already run fumadocs-mdxARC-006, ARC-010, FLOW-002-STEP-001No install or build break
R2 checkpointRelease classifier docs/ prefix removed; assert-wiki-generated-source.mjs, its turbo input and lint:repo argument removed; docsRoot left to hi update; Vercel build does not read turbo inputsPlanning findings, no new decisionARC-013, ARC-009No orphans; no CLI change

Spec Traceability

  • State: complete
Spec code / section selectorArchitecture selectorsAccepted grill Q / exact log-entry and evidence anchorsCoverage explanation
OUT-001 / SPEC.md#out-001ARC-001, ARC-002, ARC-003, FLOW-001Q1, Q5–Q7One knowledge home with stable routes and one tech-debt section
OUT-002 / SPEC.md#out-002ARC-004, ARC-005, FLOW-003Q8–Q13One authority in guidance and history
OUT-003 / SPEC.md#out-003ARC-006–ARC-010, ARC-013, FLOW-002Q14–Q20, R2 checkpointWiki gate isolation
OUT-004 / SPEC.md#out-004ARC-011, ARC-012, FLOW-004Q3, Q4, Q7Shared skills and Baseline carry the change to targets; backlog identity
AC-001 / SPEC.md#ac-001ARC-001, FLOW-001-STEP-004Q1Root docs/ absent, no stub
AC-002 / SPEC.md#ac-002ARC-002, FLOW-001-STEP-001Q5Reference and runbook routes unchanged
AC-003 / SPEC.md#ac-003ARC-002, FLOW-001-STEP-003Q6README entries in wiki indexes
AC-004 / SPEC.md#ac-004ARC-003, FLOW-001-STEP-002Q7One tech-debt section; links follow
AC-005 / SPEC.md#ac-005ARC-004Q8HI-DOCS-001 text and activation
AC-006 / SPEC.md#ac-006ARC-004, FLOW-003-STEP-001Q9AGENTS.md duty moved
AC-007 / SPEC.md#ac-007ARC-004Q10docs subagent and mirrors gone
AC-008 / SPEC.md#ac-008ARC-004, FLOW-001-STEP-005Q11, Q13No live root-docs/ path outside historical text
AC-009 / SPEC.md#ac-009ARC-005Q12, Q13Q8 superseded; history intact
AC-010 / SPEC.md#ac-010ARC-006Q14, Q20Projection pipeline reduced to specs/
AC-011 / SPEC.md#ac-011ARC-007, FLOW-003-STEP-004Q15Report-only health check
AC-012 / SPEC.md#ac-012ARC-008, FLOW-002-STEP-002Q16Wiki excluded from CI selection
AC-013 / SPEC.md#ac-013ARC-009, FLOW-002-STEP-003Q17Vercel builds main only
AC-014 / SPEC.md#ac-014ARC-010, FLOW-002-STEP-001Q18–Q20Wiki script surface reduced
AC-015 / SPEC.md#ac-015ARC-013R2 checkpoint, Q3Orphans removed; CLI unchanged
AC-016 / SPEC.md#ac-016ARC-011, FLOW-004Q3, Q7Shared skills route to the wiki
AC-017 / SPEC.md#ac-017ARC-011, FLOW-004-STEP-003Q3Baseline release note and classification
AC-018 / SPEC.md#ac-018ARC-012Q4IP-439 rewritten

Flow Failure Coverage

LensEvidence / unknown / justified not applicableGuarantee at stakeMaterial unresolved gap
Entry points and path convergenceWriters: agents via AGENTS.md, HI-DOCS-001, shared skills, subagents (ARC-004, ARC-011). Gate entries: install, turbo CI, Vercel, root test:ci (ARC-008–ARC-010)All writers reach one home; no gate reaches the wikiNone
Critical execution pathsFLOW-001 order; FLOW-004 order skills → pin → changelog → mainNo intermediate state on mainNone
State ownership and authorityARC-001: content/docs authoritative; apps/wiki/specs sole projection source (ARC-006)One authorityNone
Transaction and side-effect boundariesRepository change lands as one squashed commit; skills repo commit and Linear edit are separate side effects (FLOW-004, ARC-012)Skills commit precedes the pin; Linear edit does not block the repository changeNone
Concurrency and stale stateNot applicable for runtime state; tracked-file move only (S1 technical grounding). Concurrent main commits are handled by rebase before pushRebase keeps the single-commit guaranteeNone
Idempotency and retriesRe-running sync-content.mjs after the change touches only specs/ copies; re-running sync:skills with the same pin is a no-opRepeated runs convergeNone
Partial failure and recoverySkills repo pushed but this repository not landed: pin unchanged, no effect on targets. Repository landed but Baseline publish failed: release workflow recovery path (RELEASE_RECOVERY.json)No half-released BaselineNone
Execution lifetime and durabilityGit commits are the only durable state; no process outlives the changeNot applicable beyond GitNone
Lifecycle and dependency transitionsDependents of root docs/: links, rules, AGENTS.md, subagent mirrors, turbo input, classifier, CLI docsRoot (S2 evidence, R2 checkpoint). All removed or repointed in ARC-004, ARC-006, ARC-013No live reference to a deleted pathNone
Completion and observabilitycheck:health report, link grep for live root-docs/ paths, turbo dry run without @punks/wiki, release classification baselineCompletion is observableNone. Unknown, non-material: whether Vercel shows a skipped build as neutral or hides it; either way it cannot fail

Parked Work and Non-material Unknowns

Question / sourceDisposition and scope consequenceOwner / resume triggerWhy current guarantees remain closed
Q5 domain reorganizationOut of scope; later separate workWiki maintainers; when routes are reorganized by domainPages keep current routes now
Vercel skipped-build displayNon-material unknownnoneA skipped build cannot fail a PR
Pre-existing broken link project/runbooks/harness-trust-gate (S1 brainstorm findings)Out of scope; reported by check:healthWiki maintainersNot caused by this change

Validation

  • Decision/source/glossary reconciliation: S1 confirmation confirmed; Q1–Q20 answered; glossary terms used unchanged.
  • Exact-detail and cross-level coverage: every accepted Q entry maps to an ARC or FLOW selector above.
  • Relative links and selector targets: grill links resolve to the retained S1/S2 files; selectors have explicit anchors.
  • Spec-code → architecture → grill coverage: complete for OUT-001–OUT-004 and AC-001–AC-018.
  • Mermaid parsing: 4/4 blocks pass mermaid.parse with mermaid 11.15.0 (apps/wiki dependency) under Bun, with the DOMPurify hooks stubbed because no DOM library is installed. Visual rendering was not checked.
  • Existing spec agreement: the knowledge-maintenance spec pair names root docs/ as the authority for implemented operations; ARC-005 updates those live statements.
  • Remaining limits: no runtime proof; this artifact compiles accepted design only.

On this page