Wiki Knowledge Maintenance
Spec: Wiki Knowledge Maintenance
Context
Harness needs a reusable contract that makes project knowledge compound across implementation and investigation, proved first in this repository. Project owners supply sources and decide product intent; agents establish/adopt the wiki, capture evidence, reconcile current knowledge, and reuse it in future work. The CLI continues to distribute capabilities and context while wiki files stay project-owned.
Capability identity: apps/wiki/content/docs/project/specs/wiki/knowledge-maintenance. The closed status, decision log, and canonical glossary preserve the accepted conversation. Q identifiers normalize real supplied decisions; they do not imply a new interview or invented answers.
Every supplied raw source must survive the chat as an original with a scoped Git commit, even when it adds no new knowledge. Preservation and truth are separate: the source can remain disputed while its current interpretation is attributed. A summary cannot replace the original. Source committed, knowledge integrated and renderer working are distinct facts (Q4, Q5, Q6, Q7, Q10).
Compiler state is compiled; readiness: agent-ready requires the retained pair and source checks in the handoff. Neither field claims implemented behavior or stamps a separate human approval.
Non-Goals
- Reintroducing installer ownership of wiki application files, routes, content, or cleanup.
- A duplicate canonical knowledge tree, indiscriminate archiving of every conversational answer as an article, or promotion of unaccepted product choices into facts.
- New connector transports, background source-watchers, embedding infrastructure, an arbitrary-size storage backend, automatic remote push/backup, or a new authentication system.
- Replacing original PDFs/transcripts with extracted text, summaries, provider links, or unavailable-content claims.
- Changing Project Verifier assets through ordinary docs ingest.
- Implementation, task choreography, backlog/provider mutation, or Registry publication during this compilation task.
These non-goals do not permit successful capture to be claimed for unsupported input. Acquisition, storage, Git or visibility failures must remain explicit incomplete work (Q7, Q11).
Requirements and Outcomes
An agent can adopt an existing wiki or prepare an authorized missing destination using an explicit local contract, while distinguishing source storage, knowledge/navigation, and rendering readiness.
Architecture: OUT-001 mapping; ARC-001, ARC-002, FLOW-001. Accepted evidence: Q2, Q6, Q8.
Every supplied source artifact is preserved as original evidence and Git-committed with provenance before source-dependent extraction or synthesis; absence of novel knowledge does not waive capture.
Architecture: OUT-002 mapping; ARC-003, ARC-004, FLOW-002. Accepted evidence: Q4, Q5, Q7.
New evidence updates the owning canonical knowledge with current provenance and truthful status, retaining contradictions and accepted intent instead of turning proposals or incomplete implementation into facts.
Architecture: OUT-003 mapping; ARC-005, ARC-006, FLOW-003. Accepted evidence: Q3, Q7, Q8, Q9.
Repository and Fumadocs consumers can find relevant knowledge through maintained indexes and existing machine views; future plans cite the relevant knowledge used and return reusable findings to ingest.
Architecture: OUT-004 mapping; ARC-007, ARC-008, FLOW-004. Accepted evidence: Q1, Q3, Q8, Q9.
Failures, retries, overlaps, and interruptions preserve evidence and unrelated work, with observable distinctions between unacquired, saved, committed, partially integrated and fully integrated outcomes.
Architecture: OUT-005 mapping; ARC-004, ARC-009, FLOW-002, FLOW-005. Accepted evidence: Q3, Q7, Q9.
Scoped structural checks and semantic reconciliation keep provenance, references, truth and discovery usable, while preserving discoverable chronology and respecting actual source ownership.
Architecture: OUT-006 mapping; ARC-006, ARC-009, FLOW-005. Accepted evidence: Q3, Q8, Q9.
The shared maintenance behavior is distributed through the existing shared-skill ownership path, and a real end-to-end proof in this repository establishes capture, integration, discovery and later planning use.
Architecture: OUT-007 mapping; ARC-001, ARC-008, ARC-009, FLOW-004. Accepted evidence: Q1, Q2, Q9, Q11.
Acceptance Criteria
An existing wiki is adopted without creating a second canonical article tree or replacing its deliberate routes, authored content, visibility policy, or canonical/generated source ownership.
- Covers: OUT-001
- Architecture: AC-001 mapping; ARC-002, FLOW-001-STEP-002.
- Accepted evidence: Q2, Q6, Q8.
For authorized setup of a missing wiki, the project-owned AGENTS.md contract identifies wiki location, raw-source home, article tree, discovery indexes, source owners, and validation commands.
- Covers: OUT-001
- Architecture: AC-002 mapping; ARC-002, FLOW-001-STEP-001, FLOW-001-STEP-002.
- Accepted evidence: Q6.
When the canonical destination or setup authority is unresolved, the outcome identifies the exact readiness gap and does not place canonical content in an invented destination or claim setup success.
- Covers: OUT-001, OUT-005
- Architecture: AC-003 mapping; FLOW-001-STEP-001, ARC-009.
- Accepted evidence: Q6, Q7.
Setup reports source-storage readiness, knowledge/navigation readiness, and rendering readiness separately, including any unavailable check.
- Covers: OUT-001, OUT-005
- Architecture: AC-004 mapping; FLOW-001-STEP-004.
- Accepted evidence: Q6, Q9.
A supplied source can be captured when its declared storage is usable without requiring full docs onboarding, backlog reconstruction, a running application, or deployment.
- Covers: OUT-001, OUT-002
- Architecture: AC-005 mapping; FLOW-001-STEP-003, FLOW-001-STEP-005.
- Accepted evidence: Q6.
The preserved original file bytes or exact supplied text match the acquired source; frontmatter, normalization, extraction, and synthesis do not alter that original.
- Covers: OUT-002
- Architecture: AC-006 mapping; ARC-003, FLOW-002-STEP-002.
- Accepted evidence: Q4, Q5.
A capture commit includes only its owned source/provenance changes and preserves unrelated staged and working-tree changes.
- Covers: OUT-002, OUT-005
- Architecture: AC-007 mapping; FLOW-002-STEP-003.
- Accepted evidence: Q7.
A source is reported committed only after its committed Git blob is read back and verified against the acquired original's content identity or bytes.
- Covers: OUT-002, OUT-005
- Architecture: AC-008 mapping; FLOW-002-STEP-004.
- Accepted evidence: Q7, Q9.
When PDF text is extracted, the original PDF remains preserved and the text is identified as a derived representation of that original.
- Covers: OUT-002
- Architecture: AC-009 mapping; ARC-003, FLOW-002-STEP-005.
- Accepted evidence: Q5.
Granola or equivalent meeting material preserves the available transcript and notes distinctly, including supplied speaker/timestamp information, without claiming unavailable transcript or recording content was captured.
- Covers: OUT-002
- Architecture: AC-010 mapping; FLOW-002-STEP-001, FLOW-002-STEP-005.
- Accepted evidence: Q5.
A fetched web source retains the fetched content plus origin URL, source revision when available, and acquisition metadata; a URL-only reference is not reported as a preserved original.
- Covers: OUT-002
- Architecture: AC-011 mapping; FLOW-002-STEP-001, FLOW-002-STEP-002.
- Accepted evidence: Q4, Q5.
An identical supplied source can reuse previously preserved and verified original bytes rather than creating a duplicate original.
- Covers: OUT-002, OUT-005
- Architecture: AC-012 mapping; FLOW-002-STEP-002, FLOW-005-STEP-001.
- Accepted evidence: Q5, Q7.
A changed source is retained as a new revision without overwriting its older original; derived representations remain attributable to the revision used.
- Covers: OUT-002, OUT-003
- Architecture: AC-013 mapping; ARC-003, FLOW-002-STEP-002.
- Accepted evidence: Q5.
A knowledge no-op caused by no materially new information does not waive preservation and Git persistence of the supplied source artifact.
- Covers: OUT-002, OUT-003
- Architecture: AC-014 mapping; ARC-004, FLOW-003-STEP-003.
- Accepted evidence: Q3, Q4.
An inaccessible or unavailable supplied source is explicitly reported not captured; a saved URL, summary, or command success alone cannot substitute for acquisition proof.
- Covers: OUT-002, OUT-005
- Architecture: AC-015 mapping; FLOW-002-STEP-001, FLOW-002-STEP-004.
- Accepted evidence: Q7.
Changed relevant source evidence triggers freshness evaluation and affected knowledge reconciliation even when an earlier spec or page is marked ingested.
- Covers: OUT-003
- Architecture: AC-016 mapping; FLOW-003-STEP-001.
- Accepted evidence: Q3.
A page is labelled implemented only from relevant implementation evidence; the existence of IMPLEMENTATION-NOTES.md alone does not establish implementation completion.
- Covers: OUT-003
- Architecture: AC-017 mapping; ARC-005, FLOW-003-STEP-001.
- Accepted evidence: Q3, Q9.
When an existing canonical article owns new reusable knowledge, ingest reconciles that article rather than creating an overlapping article solely because a new source or implementation arrived.
- Covers: OUT-003
- Architecture: AC-018 mapping; FLOW-003-STEP-003.
- Accepted evidence: Q3.
Material contradictions and unaccepted product choices remain attributed and visibly unresolved; retaining a source or answer does not silently accept its claims as product truth.
- Covers: OUT-003, OUT-005
- Architecture: AC-019 mapping; ARC-006, FLOW-003-STEP-003.
- Accepted evidence: Q3, Q5.
Required flow reconciliation completes before dependent concept writing; a required flow failure leaves the ingest incomplete and prevents that dependent concept step.
- Covers: OUT-003, OUT-005
- Architecture: AC-020 mapping; FLOW-003-STEP-002, FLOW-003-STEP-003.
- Accepted evidence: Q3, Q7.
Integrated knowledge records the source identity/revision and supporting evidence needed to distinguish current content from stale content; source path and date alone are not treated as proof of freshness.
- Covers: OUT-003
- Architecture: AC-021 mapping; ARC-003, ARC-005, FLOW-003-STEP-001.
- Accepted evidence: Q3, Q5.
A newly created or changed routed article has the required owning navigation entry, section-index/discovery reference, and resolved links before integration is reported complete.
- Covers: OUT-004, OUT-005
- Architecture: AC-022 mapping; FLOW-003-STEP-004, FLOW-003-STEP-005.
- Accepted evidence: Q3, Q8.
The maintained root/topic discovery map provides article links, scope summaries, and applicability cues that allow a consumer to select relevant knowledge without loading the full wiki.
- Covers: OUT-004
- Architecture: AC-023 mapping; ARC-007, FLOW-004-STEP-001.
- Accepted evidence: Q3.
Repository and Fumadocs machine views point to the same canonical routed corpus; source bundles outside that corpus are not falsely presented as automatically included in HTTP exports or exposed to a broader audience.
- Covers: OUT-004
- Architecture: AC-024 mapping; ARC-006, ARC-007, FLOW-004-STEP-003.
- Accepted evidence: Q6, Q8.
A future plan records the relevant wiki knowledge it used and material stale or contradictory claims checked against primary evidence; if no applicable context exists, that absence is explicit.
- Covers: OUT-004
- Architecture: AC-025 mapping; FLOW-004-STEP-001, FLOW-004-STEP-002, FLOW-004-STEP-003.
- Accepted evidence: Q3, Q9.
Materially novel, evidence-backed findings from a query or investigation are reconciled into an owning article or justified new synthesis, while answers with no reusable delta produce an explicit knowledge no-op.
- Covers: OUT-003, OUT-004
- Architecture: AC-026 mapping; FLOW-004-STEP-004, FLOW-003-STEP-003.
- Accepted evidence: Q3.
The result distinguishes saved-but-uncommitted source, verified committed source, partial integration, and completed integration; a successful renderer or a stored file cannot collapse these distinctions.
- Covers: OUT-005
- Architecture: AC-027 mapping; ARC-009, FLOW-002, FLOW-003-STEP-005.
- Accepted evidence: Q6, Q7.
A failed commit preserves the saved original and unfinished capture; a failed extraction or synthesis preserves the verified committed original and identifies retriable integration work.
- Covers: OUT-005
- Architecture: AC-028 mapping; FLOW-002-STEP-003, FLOW-002-STEP-005.
- Accepted evidence: Q7.
After interruption or a lost acknowledgement, resume inspects durable source/Git/output evidence and continues missing work without duplicating originals or falsely repeating a completed integration event.
- Covers: OUT-005
- Architecture: AC-029 mapping; FLOW-005-STEP-001.
- Accepted evidence: Q7.
Before reconciling overlapping canonical content, the agent re-reads current state and preserves concurrent changes or reports an explicit conflict instead of silently overwriting them.
- Covers: OUT-005
- Architecture: AC-030 mapping; FLOW-005-STEP-003.
- Accepted evidence: Q7.
Missing required route/output/validation work prevents an integration-complete claim and remains recorded as unfinished work rather than being hidden by final ingest bookkeeping.
- Covers: OUT-005
- Architecture: AC-031 mapping; FLOW-003-STEP-005, ARC-009.
- Accepted evidence: Q3, Q7.
A health outcome records structural checks of applicable frontmatter, links, navigation, and source references separately from semantic knowledge reconciliation.
- Covers: OUT-006
- Architecture: AC-032 mapping; FLOW-005-STEP-002.
- Accepted evidence: Q3, Q9.
Scoped semantic maintenance records material stale claims, contradictions, missing connections/synthesis, or discovery gaps and their resolution or explicit unresolved status.
- Covers: OUT-006
- Architecture: AC-033 mapping; ARC-009, FLOW-005-STEP-002.
- Accepted evidence: Q3.
Learning refresh records a justified keep, update, consolidate, replace, delete, or mark-stale outcome and repairs affected references when a page is superseded, consolidated, or removed.
- Covers: OUT-006
- Architecture: AC-034 mapping; FLOW-005-STEP-003.
- Accepted evidence: Q3.
Operational wiki projections are updated through their canonical source owners; source disappearance alone is not treated as authority to delete durable routed knowledge.
- Covers: OUT-003, OUT-006
- Architecture: AC-035 mapping; ARC-006, FLOW-003-STEP-004, FLOW-005-STEP-003.
- Accepted evidence: Q8.
Chronological capture/ingest/maintenance history remains discoverable, including through an archive when used; a recent-entry limit does not silently discard the retained history.
- Covers: OUT-006
- Architecture: AC-036 mapping; FLOW-005-STEP-004.
- Accepted evidence: Q3.
A real proof in this repository connects a retained source or implementation change to current canonical knowledge, verifies repository and Fumadocs discovery, and shows the knowledge used in a later planning exercise.
Reusable skill changes follow the checked-out main source in /home/stefan/repos/skills, source commit/push, bun run sync:skills, and exact receipt verification; local mirrors are not edited as authority.
- Covers: OUT-007
- Architecture: AC-038 mapping; ARC-001.
- Accepted evidence: Q11.
The delivered behavior preserves the CLI/Registry wiki ownership boundary and Project Verifier references; ordinary wiki ingestion does not create or maintain verifier assets.
Observable Acceptance Journey
This view locates the criteria along the user-visible evidence-to-reuse journey. It introduces no new state enum or approval gate. Q3–Q9 and the linked architecture flow steps explain why preserving a source, integrating its knowledge, and using it in planning require different evidence. The recovery criteria apply at the intervening boundaries.
Constraints
- The scope is reusable Harness project-wiki maintenance, proved in Harness Intelligence first (Q1).
- A local
AGENTS.mdowns the wiki contract: wiki location, raw home, canonical article tree, discovery entrypoints, source ownership and validation commands. Missing destination/authority is a concrete gap, not an invitation to invent a second home (Q6). - Preserve existing Fumadocs routing/rendering, one
content/docsarticle tree, owningmeta.json, standard Markdown links, local visibility, and canonical/generated ownership. Raw files outside the collection are not automatically in its LLM exports (Q8). apps/wiki/content/docsis the only knowledge home; implemented operations, reference pages and runbooks are authored wiki pages undercontent/docs/project/(IP-439, Q12, superseding part of Q8). Projections come only fromapps/wiki/specs/; update their sources rather than treating generated pages as an independent truth.- Every supplied source is preserved and Git-committed before expensive source-dependent interpretation. Keep original, extracted representation and synthesis distinct; preservation does not validate claims (Q4, Q5, Q7).
- A local source commit does not authorize remote push/publication or prove a remote backup. Existing repository authority and visibility policy govern those operations (Q7).
- Existing knowledge must be checked for changed source evidence; neither
ingested: true, an unchanged path, a timestamp, nor notes existence alone proves freshness or implemented truth (Q3, Q9). - Preserve the Project Verifier boundary and references (Q8).
- Shared skill authority is
/home/stefan/repos/skillson checked-outmain. Commit/push source changes there, synchronize withbun run sync:skills, and verify the exact receipt. Do not use local.agents/skillsorapps/cli/skillsmirrors as the authoritative edit surface (Q11).
Dependency Readiness
No Stack Required. No upstream feature dependency or parent/child feature stack was declared for this capability (Q11). Existing repository Fumadocs and workflow surfaces are observed evidence, not an unresolved prerequisite feature. The supplied Karpathy source is already retained in commit 5060b0745c2c339df461c6c4b79fffff050f87d1. The accepted decision sources are retained in bd90ddc64a3343d3cc5dee17c782a604ecbecc9f.
Branch/Base Intent
Not applicable. No parent/base delivery constraint was supplied (Q11). The documentation retention branch establishes artifact durability; it is not an implementation branch/base decision. The shared-skills checked-out-main authoring rule remains a separate mandatory source-ownership constraint.
Architecture Source
- Verified immutable artifact: Wiki Knowledge Maintenance architecture.
- Commit:
38221d7500c7f259c1e9b2c2017b5e415a61ba67. - Path:
apps/wiki/content/docs/project/specs/wiki/knowledge-maintenance/ARCHITECTURE.md. - SHA-256:
37d4b792a9dbc1cd9e5f7960e232eaa5a52d7ca83ae86c603f998059c4fc1a65. - Retained ref verified at compilation:
refs/heads/docs/wiki-knowledge-maintenance. - The architecture contains the one canonical Spec Traceability table for all seven OUT identifiers and 39 AC identifiers. Source status/log/glossary/research identities are recorded in its Sources table and match the retained source commit.
Accepted Technical Decisions
| Decision | Preserved detail and boundary | Source evidence | Architecture explanation |
|---|---|---|---|
| Ownership | Registry distribution and agent-operated project setup are distinct; wiki files remain project-owned. | Q2, Q6 | ARC-001, ARC-002 |
| Local contract | Project-owned AGENTS.md exposes destinations, article/index homes, actual source owners and validation commands; readiness has separate storage, knowledge/navigation and rendering dimensions. | Q6 | FLOW-001 |
| Source identity | Keep immutable originals with separate provenance and extraction, retaining origin/revision/acquisition evidence and a verifiable content identity. Preserve supplied transcript/notes distinctions and old revisions. | Q4, Q5 | ARC-003, FLOW-002 |
| Commit boundary | Preserve original, commit only owned files, verify committed bytes, then extract/integrate; partial states are explicit and unrelated work survives. | Q7 | FLOW-002-STEP-003, FLOW-002-STEP-004 |
| Reconciliation | Evidence/freshness check and scoped learning refresh precede required flows, then dependent concepts, discovery and completion checks. Merge owning articles; preserve unresolved claims. | Q3, Q7 | FLOW-003 |
| Fumadocs fit | One content/docs corpus, owning meta.json, standard supported links, existing search/Markdown views, and truthful source availability. Root operational docs remain authoritative over projections. | Q8 | ARC-006, ARC-007 |
| Consumption | Root/topic maps direct relevant reading; future plans cite used knowledge and reconcile material stale or contradictory claims with evidence; reusable findings return to ingest. | Q3, Q9 | FLOW-004 |
| Recovery and lifecycle | Resume from proven Git/source/output state, re-read overlap, preserve old originals, repair superseded references, retain chronology, and do not delete knowledge solely because projection source disappeared. | Q3, Q7, Q8 | FLOW-005 |
| Shared source | Checked-out main shared-skills source, commit/push, sync and exact receipt; no mirror edits as authority. | Q11 | ARC-001 |
No specific new schema key, helper/API, algorithm, dependency version, background process, or locking implementation was accepted. These choices remain plan-owned and must meet the accepted guarantees. The inspected Fumadocs implementation and source-capture SHA-256 are evidence, not an invented requirement to add a new library or service.
Accepted Testing Decisions
- Prove the complete source-to-current-knowledge-to-discovery-to-future-plan journey in this repository before claiming the reusable behavior implemented (Q1/Q9).
- Verify captured originals by reading the committed Git blob and preserving unrelated staging/work (Q7/Q9).
- Check schema/links/navigation/source consistency separately from semantic reconciliation. Do not represent a content-check pass as proof of full semantic accuracy or deployment visibility (Q3/Q8/Q9).
- Exercise applicable failures and retries described by the acceptance criteria, including missing acquisition, failed commit, failed extraction, missing route/output, changed evidence and overlapping content (Q7/Q9).
- No prototype verdict, platform matrix, benchmark, test framework replacement, or provider mutation is prescribed. create-plan owns concrete files, commands, workers and sequencing.
Verification Seams
| Observable boundary | Required evidence | Criteria |
|---|---|---|
| Project contract/readiness report | Actual owned destinations, preserved existing wiki, independent readiness results and exact gaps | AC-001–AC-005 |
| Source file and Git commit | Acquired/original/committed equality, capture ownership, provenance, revision retention and honest availability | AC-006–AC-015 |
| Ingested article and source relationship | Changed-evidence handling, implementation proof, owning-page reconciliation, contradictions and flow/concept ordering | AC-016–AC-021 |
| Repository and Fumadocs discovery; later plan | Navigation/index entries, appropriate machine views, cited context and novel findings returned to ingest | AC-022–AC-026, AC-037 |
| Failure/resume outcome and history | Preserved originals, explicit incomplete states, resumed missing work and overlap/conflict evidence | AC-027–AC-031 |
| Content health and projection boundary | Structural results, semantic findings, justified refresh choices, repaired references and retained chronology | AC-032–AC-036 |
| Shared-source distribution and preserved boundaries | Source branch/commit, sync receipt and ownership evidence; no installer or verifier takeover | AC-038–AC-039 |
Remaining Implementation Choices
Exact skill name/packaging, metadata filenames/fields, index generation strategy, synchronization primitive and command choreography remain to be selected within this contract. They are not unanswered product decisions or parked feature branches. Deployment access controls were not verified during research; preserve the configured boundary and record unavailable proof when that surface is exercised.
Decision Log
| Decision | Exact evidence | Rationale |
|---|---|---|
| Q1: Reusable scope and proof | Q1; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | Shared workflow policy and project-local wiki ownership must remain separate. |
| Q2: Project ownership and installer boundary | Q2; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | A missing wiki is visible setup work rather than installer success or a silent no-op. |
| Q3: Five maintenance responsibilities | Q3; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | Implementation and research must improve reusable knowledge, and future work must consume it. |
| Q4: Mandatory original-source Git capture | Q4; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | Source retention is unconditional for supplied artifacts; canonical knowledge promotion remains selective. |
| Q5: Originals, extraction, provenance, and revisions | Q5; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | Derived representations remain traceable without mutating or overstating originals. |
| Q6: Local wiki contract and separate readiness | Q6; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | Capturing a supplied source must not be blocked by unrelated project reconstruction. |
| Q7: Ordering, recovery, and truthful completion | Q7; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | Multi-file and Git side effects have visible durable checkpoints and recoverable partial states. |
| Q8: Fumadocs and authority compatibility | Q8; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | Knowledge maintenance must improve discovery without creating duplicate truth or changing renderer ownership. |
| Q9: Verification and consumer proof | Q9; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | The contract has public, observable proof seams without prescribing plan-owned test choreography. |
| Q10: Terminology and source authority | Q10; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | Agent instructions, implementation outcomes, and planning use the same bounded language. |
| Q11: Shared source, scope, and closure | Q11; source commit bd90ddc64a3343d3cc5dee17c782a604ecbecc9f | Compilation preserves accepted guarantees without silently adding infrastructure or claiming implementation. |