Harness Intelligence Wiki
SpecsWikiWiki Knowledge Maintenance

Wiki Knowledge Maintenance: implementation notes

Wiki Knowledge Maintenance: implementation notes

Execution record for the spec and plan. Branch feat/wiki-knowledge-maintenance; delivery mode planning-only (no Linear projection, plan decision P1).

Task ledger

TaskResultCommit
T0Branch from origin/main plus five spec commits; plan committed5951809ef
T1–T3docs-ingest-phase entry, wiki contract, source capture with readback script, health referenceskills 2319349
T4Reconciliation by recorded freshness; one log ruleskills 0500473
T5create-plan Wiki Context stepskills 83478d8
T6requirements-grill and create-spec bookkeeping resolve the wiki root from the contractskills 3da47eb
T7apps/wiki check:health with fixture tests1b6aa37fa
T8Project wiki contract in apps/wiki/AGENTS.md; operator docs7308b0837
T11Skills pushed and tagged sync/wiki-knowledge-maintenance-3da47ebbf8ec; synced into apps/cli/skills56c22bf8e
T9Real proof: capture, health, ingest, discovery, runtimethis commit series
T10IP-439 knowledge consultation (AC-037 consumer proof): research/ip-439-knowledge-consultation.mdcb7596199

Skills commits are on wearedevpunks/skills main; all 37 tests/wiki-*.contract.test.mjs pass at 3da47ebbf8ec.

T9 proof run

The run followed the synced apps/cli/skills/phases/docs-ingest-phase (the installed .agents/skills copy is older; see Deviations).

Readiness

Contract: resolved at the start. All six fields are declared in apps/wiki/AGENTS.md lines 15–20, and every declared path exists. The runtime check later found one conflicting value: the declared per-page Markdown form /docs/<path>.mdx does not work (see Runtime). That gap covers no destination this run writes, so the branches proceeded.

AreaBefore healthAfter healthEvidence
Source storagereadyreadyraw/ is tracked in Git and not ignored; the Karpathy record reads back OK
Knowledge/navigationnot ready: check:health 38 findingsreadybun run check:health exits 0
Renderingnot runreadybun run --cwd apps/wiki build exits 0 (1695 static pages)

Capture

Outcome committed (reuse, AC-012) for apps/wiki/raw/external/karpathy-llm-wiki/ac46de1ad27f/. The pinned retrieved_url (gist revision ac46de1ad27f92b28ac95459c782c07f6b8c964a) was fetched again into a scratch directory: HTTP 200, 11985 bytes, SHA-256 dc3efe98ae62f23dd08acad13aba2e95287beb20b6bec2f4af0423557fe37401, byte-identical to the stored original. verify-captured-source.mjs printed OK … derived=0 at HEAD (56c22bf8e54e). The stored original is unchanged. No file was written; the scratch directory was removed.

Health

Structural record:

CommandCoversResult
bun run check:healthlinks, navigation, frontmatter, source referencesbefore: fail, 38 (30 link, 8 navigation); after: pass
bun run check:contentprojection driftpass
bun run test:ciroutes, rendering, sync and health scriptspass

Repairs:

  • 19 projected link findings (runbooks and reference projections): scripts/sync-content.mjs now rewrites a relative link that resolves only from the projection source. A wiki page becomes its /docs/... route; another repository file becomes a https://github.com/<repo>/blob/HEAD/<path> URL; links that resolve, absolute links and code stay unchanged (TDD, see below). 17 were fixed by the rewrite alone. Two links in docs/reference/harness-intelligence.md were broken at the source too; they were fixed there and then rewritten.
  • 7 links in research/effect-prepare-script-simplification-research-report.md escaped the repository; they now point to permalinks at the report's commit 91e61685, because most cited files no longer exist.
  • BACKLOG-RESULT.md (issue 197): one wrong relative depth fixed.
  • get-started/basic-usage.mdx and domains/harness.mdx: links into the empty harness/lifecycle-flows now go to the successors that the harness-public-entrypoints grill log maps (/docs/harness/entrypoints, /docs/harness/entrypoints/brainstorming-requirements-backlog). No content was invented for the empty folder; its omission from harness/meta.json is intentional.
  • tech-debt/index.mdx: the card to the index-less tech-debt/cli folder became a sidebar pointer.
  • Navigation: domains and backlog-provider in project/meta.json (generated by sync-content.mjs, TDD); the two research reports, harness-public-entrypoints-backlog, and the finder-phase and harness-public-entrypoints writer folders in their owning meta.json; !trust-and-adoption in harness/meta.json records that the retained trust-and-adoption stub is intentionally hidden (its content moved to /docs/harness/trust, IP-298/IP-306).

check:health is now in the wiki check script.

Semantic record (scope: pages this run touched, their linkers, pages sharing the Karpathy source):

KindPagesEvidenceStatus
stale_claimapps/wiki/index.mdSaid "punks / dp CLI" and listed wikilinksresolved: rewritten as bookkeeping that points to the routed map
discovery_gapproject/index.mdxCards without scope summaries or cuesresolved: root map with one "Applies when" cue per section and topic
contradictionLinear IP-439 vs this specIP-439 proposes removing apps/wiki; the spec keeps itunresolved (P2): IP-439's scaffold premise is stale since CLI 6.0.0 (80a483bcf); remaining conflicts are one authority versus docs/ projection, and the knowledge home and renderer. User direction pending requirements-grill (see Debt and follow-ups)
stale_claimdomains/harness.mdxIntro still names "lifecycle flows"; the section moved to entrypointsunresolved: text outside the link-only amendment; owner Harness domain docs
stale_claim.agents/notes/2026-07-10-project-owned-wiki-sync.mdFirst paragraph describes hi update recreating the sync script; since CLI 6.0.0 hi init never creates or aligns a wiki (docs/reference/hi-requirements.md)unresolved: outside T9 paths; owner coordinator
stale_claimdocs/README.md line 5Calls project-owned setup/adoption "proposed"; it is implementedunresolved: outside T9 paths; owner coordinator
contradictionapps/wiki/AGENTS.md contract, proxy.tsContract declares per-page Markdown at /docs/<path>.mdx; GET returns 404 because proxy.ts is not compiledunresolved: runtime fix (likely move to src/proxy.ts) outside T9 paths; owner coordinator
missing_connectionglossaryNo link from the glossary to the new hub; the plan keeps the glossary unchangedunresolved: reachable from the hub and the root map; next glossary edit

Refresh outcomes: .agents/notes/2026-07-10-project-owned-wiki-sync.md mark_stale (recommended, not applied; see above). research/karpathy-compounding-wiki-research-report.md keep: point-in-time primary evidence; its reusable knowledge now lives in the hub concept. Resume: not applicable. Conflicts: none.

Ingest

Outcome complete.

  • Sources: this SPEC.md (blob 1629e04a357e2e791044eda11a4e13403a32d293, freshness unknown before this run: no recorded identity), these notes, ARCHITECTURE.md, the implementation commits above, and the Karpathy original (sources frontmatter).
  • Flows (written first): setup and adoption, source capture, reconciliation, consultation, health and recovery.
  • Concepts: hub, wiki contract, provenance record, freshness, health outcome. The glossary stays the term owner; the pages link it instead of repeating it.
  • Route: project/domains/, beside the glossary. harness/lifecycle-flows is empty and superseded by harness/entrypoints, so it is not a home.
  • Discovery: all ten pages in domains/meta.json, one root-map entry each in project/index.mdx, hub card in domains/index.mdx.
  • Bookkeeping: SPEC.md gained only ingested_revision and last_ingested (coordinator-approved). These notes carry their own ingested_revision.
  • Log: one entry appended to apps/wiki/log.md.

Runtime

Production build served by next start behind a task-owned portless proxy at https://t9-wiki-proof.localhost:1357, inside systemd-run --user --scope units. The shared proxy on port 1355 belongs to another user's state directory and does not route this user's names, so the run started its own proxy on 1357 and stopped it afterwards.

RequestStatusContent typeEvidence
GET /llms.txt200text/plain;charset=UTF-811 lines for /docs/project/domains/wiki-knowledge-maintenance*, for example - [Wiki Knowledge Maintenance](/docs/project/domains/wiki-knowledge-maintenance): The capability that keeps …
GET /llms.mdx/docs/project/domains/wiki-knowledge-maintenance/content.md200text/markdownContains the sources line with apps/wiki/raw/external/karpathy-llm-wiki/ac46de1ad27f/llm-wiki.md and SHA-256 dc3efe98…7401, the IP-439 open question and wearedevpunks/skills@3da47eb
GET /api/search?query=source%20capture200application/jsonFirst result: page /docs/project/domains/wiki-knowledge-maintenance-provenance-record
GET /api/search?query=provenance%20record200application/jsonProvenance record page at result 9; four more new pages follow
GET /docs/project200text/htmlRoot map renders with its "Applies when" cues
GET /raw/external/karpathy-llm-wiki/ac46de1ad27f/llm-wiki.md404Raw home is not served; source.json, /docs/raw/…, /index.md and /log.md also return 404
GET /docs/project/domains/wiki-knowledge-maintenance.mdx404text/htmlContract form of per-page Markdown fails; Accept: text/markdown on the page returns HTML

The last row is a pre-existing defect: apps/wiki/proxy.ts (the Next.js 16 request proxy that rewrites /docs/<path>.mdx and negotiates Markdown) sits at the app root, but the app uses src/app, and the build's .next/server/middleware-manifest.json lists no middleware. The direct route /llms.mdx/docs/<path>/content.md works.

Cleanup: both scopes stopped; ports 4214, 4797 and 1357 have no listener; the task route and its host certificates were removed from ~/.portless; .next was restored to its pre-task 33 files (1.7 MB); scratch files in /tmp were removed.

tdd_status: required for scripts/sync-content.mjs only.

CycleREDGREEN
Projected linksbunx vitest run scripts/sync-content.test.mjs: new case failed at ok(projected.includes("- [Spec](/docs/project/specs/demo/SPEC#scope)")), 1 failed / 6 passed7 passed
Project navigationnew case failed at ok(pages.includes("domains")), 1 failed / 7 passed8 passed

Before the sync was applied, node scripts/sync-content.mjs --check listed only update entries (five projected pages and project/meta.json) and no removals.

Rule evidence (T9)

  • HI-WIKI-001 pass: every new page is in its owning meta.json; the spec folder order (SPEC, PLAN, IMPLEMENTATION-NOTES, ARCHITECTURE) is generated by sync-content.mjs; no new route surface; check:content passes.
  • HI-WIKI-003 pass: schema-valid frontmatter, check:health 0 findings, test:ci 66/66 (includes the public wiki contract test), SPEC.md and notes bookkeeping, log entries appended.
  • HI-DOCS-001 pass: domain knowledge stays in apps/wiki; the one root docs/ edit is a canonical-source link fix, synced into its projection. Follow-up for docs/README.md below.
  • HI-UI-001 not applicable: no UI component or composition changed.
  • HI-REPO-003 pass: no local URL changed; the runtime check used a portless hostname; no raw localhost:<port> URL was added.

Review and repair

Review ordinal 1: report, retained in fd9f38a65. Two axes (standards, spec); 5 verified findings, 4 medium and 1 low.

FindingSeverityDefectResolution
wkm-r1-001mediumThe contract declared per-page Markdown at /docs/<path>.mdx (404)41a309d0c: the contract declares /llms.mdx/docs/<path>/content.md; the uncompiled proxy.ts stays a follow-up
wkm-r1-002mediumThe consultation flow and these notes called T10 and AC-037 pendingDocs ingest 2026-10-08 (see Consultation returns)
wkm-r1-003mediumcheck:health accepted relative links that leave content/docs41a309d0c: such links are link findings, with a fixture test; escaping links now use routed pages or GitHub blobs
wkm-r1-004mediumverify-captured-source.mjs accepted ../ in source.json file valuesskills 189cb114 rejects non-plain file names; synced by c54d0bba3
wkm-r1-005lowPLAN.md kept empty RED/GREEN evidence for the TDD tasks9184d9a20: evidence recorded per task

Focused repair validation: check:health clean, test:ci 67/67, lint 0 findings, check-types 0 errors, skills suite 315/301/14, equal to the pre-repair baseline. A second review pass is eligible and not requested.

Consultation returns

The T10 consultation returned R1–R3 (returned findings). Docs ingest 2026-10-08:

  • R1 resolved: the overview IP-439 callout and the contradiction row above name the stale scaffold premise and the two remaining conflicts.
  • R2 resolved: decisions/wiki-content-ownership.mdx source points to content/docs/project/specs/cli/IP-99-private-harness-wiki-app/SPEC.md.
  • R3 unresolved, semantic contract_gap: docs-ingest-phase/references/wiki-ingest.md § Log lists the kinds capture | ingest | maintenance | grill | spec. A consultation that writes a page and a retained review report have no kind; log.md logs them as maintenance and review. Owner: shared skills, through wearedevpunks/skills main.

Deviations

  • The installed .agents/skills mirror still holds the pre-delivery skills. It updates only when a published baseline is adopted; Registry publication was not requested. This run read the synced apps/cli/skills copy.
  • Scope: the sync-content.mjs navigation cycle (domains, backlog-provider) and the two SPEC.md bookkeeping lines were outside the original T9 amendment; the coordinator approved both.
  • project/index.mdx lost its "Current Operator Lifecycle" paragraph (an IP-322 pointer); the Runbooks and Specs map entries cover it.
  • The links frontmatter in these notes uses /docs/... routes, as SPEC.md does, not the wikilink form of the wiki-ingest.md template.

Debt and follow-ups

  • create-spec/references/folder-naming.md in the shared skills still hard-codes the apps/wiki specs roots instead of reading the wiki contract.
  • docs/README.md should mention the projected-link rewrite in its sync-content.mjs paragraph, and drop "proposed" for setup/adoption.
  • The unresolved semantic findings above, first the inactive proxy.ts.
  • IP-439 user direction, 2026-10-08, verbatim: "no docs we keep apps/wiki only". Accepted by the user, not integrated. It reverses Q8 and HI-DOCS-001; a requirements-grill round on IP-439 runs before any change to docs/, rules or this spec (record).
  • R3: add log entry kinds for consultation and review to the shared wiki-ingest.md § Log (see Consultation returns).

On this page