You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate the work-package workflow's Codebase Comprehension stage off its bespoke .engineering/artifacts/comprehension/{area}.md artifact and onto the reusable codebase-wiki techniques (codebase-wiki/<op>), added in #146.
The migration must split the current comprehension output:
Pure, durable codebase knowledge → the wiki (citation-backed, confidence-tagged).
Trigger-task / process metadata (open questions, work-package provenance, the running history of how the knowledge was obtained, and the analytical lenses applied to obtain it) → stays localised to the work package's planning folder, excluded from the wiki.
The wiki is a knowledge base, not a lab notebook: it should read as what is true about the codebase, not how this work package came to understand it.
Hard requirement — no functional regression
The comprehension stage today delivers concrete functional value (see 14-codebase-comprehension.yamloutcome[] and resources/codebase-comprehension.md). The migration MUST preserve all of it. In particular:
Durable, cumulative, reusable knowledge base. Comprehension already aims to be "cumulative knowledge, not disposable planning documents" that "future work can build on without re-investigating the same area." The wiki must be at least as reusable and cumulative.
Depth of analysis. Architecture, key abstractions, design rationale, and especially the Data Flow & Operational Context analysis (data-flow map, invariant-alignment table, execution context, operational scenarios) must be preserved. This section is load-bearing for the "guard becomes a halt vector" failure mode described in the resource — losing it is a functional regression.
Question-driven comprehension loop. The deep-dive-iteration while-loop, needs_comprehension/has_open_questions variables, and the comprehension-sufficient checkpoint must continue to work. Open questions still drive area selection (question-driven-exploration) — they just live in planning, not the wiki.
Lens passes still run. The prism/portfolio-analysis passes (pedagogy, rejected-paths) still execute; their output is localised per the split below.
Downstream consumers unaffected.design-philosophy, implementation-analysis, plan-prepare, and assumptions-review must receive equivalent inputs — the durable reference (now the wiki) plus the task-meta (now planning).
Planning — but a durable fact surfaced by a lens (e.g. a genuinely rejected design alternative) may be distilled into a wiki page; the pedagogical/process framing stays in planning
Guiding principle: if a reader coming fresh to the codebase (with no knowledge of this work package) would want the content, it belongs in the wiki. If it only makes sense in the context of this task's investigation, it belongs in planning.
Wiki-side notes
Every claim promoted to the wiki must carry a raw/ citation and a confidence score, per the codebase-wiki page format. This is stricter than today's comprehension artifact — an improvement, not a regression, but the migration must actually populate citations rather than dropping content that lacks them.
The augment-from-task flow is folded into codebase-wiki/ingest (task knowledge as an additional input source). The comprehension stage should bind ingest (source + task knowledge), then maintain-index-log, cross-link, and lint — reusing the wiki ops rather than re-implementing artifact writes.
Acceptance criteria
The comprehension stage binds codebase-wiki/<op> techniques; it no longer writes the monolithic .engineering/artifacts/comprehension/{area}.md.
The wiki receives only pure knowledge (architecture, abstractions, rationale-minus-implications, data-flow/operational-context, domain, distilled deep-dive facts), each claim citing raw/ with a confidence score.
Open questions, WP provenance, task-relative "implications for changes", the per-WP investigation history, and raw applied-lens output are written to a planning artifact — not the wiki.
The deep-dive-iteration loop and comprehension-sufficient checkpoint still function, driven by the planning-resident open questions.
The Data Flow & Operational Context analysis (invariant alignment, execution context, operational scenarios) is preserved as wiki knowledge — the halt-vector-prevention capability is intact.
Every declared outcome[] of the current codebase-comprehension activity still holds after migration.
Planning home for task-meta. Where does the planning-resident comprehension meta live (e.g. .engineering/artifacts/planning/<wp>/comprehension-notes.md holding open questions, implications, the investigation log, and lens output)?
Lens output routing. Do pedagogy/rejected-paths passes stay in the comprehension stage feeding planning, and what (if anything) is distilled into wiki comparison/concept pages?
Task-knowledge citations. How does ingest-from-task attach raw/ citations + confidence to task-derived claims?
Back-compat. What happens to existing .engineering/artifacts/comprehension/*.md artifacts — migrate, deprecate in place, or leave for manual port?
Activity shape. Does comprehension stay optional (required: false) with unchanged transitions, or does binding the wiki ops change the activity graph?
Summary
Migrate the
work-packageworkflow's Codebase Comprehension stage off its bespoke.engineering/artifacts/comprehension/{area}.mdartifact and onto the reusablecodebase-wikitechniques (codebase-wiki/<op>), added in #146.The migration must split the current comprehension output:
The wiki is a knowledge base, not a lab notebook: it should read as what is true about the codebase, not how this work package came to understand it.
Hard requirement — no functional regression
The comprehension stage today delivers concrete functional value (see
14-codebase-comprehension.yamloutcome[]andresources/codebase-comprehension.md). The migration MUST preserve all of it. In particular:deep-dive-iterationwhile-loop,needs_comprehension/has_open_questionsvariables, and thecomprehension-sufficientcheckpoint must continue to work. Open questions still drive area selection (question-driven-exploration) — they just live in planning, not the wiki.prism/portfolio-analysispasses (pedagogy,rejected-paths) still execute; their output is localised per the split below.design-philosophy,implementation-analysis,plan-prepare, andassumptions-reviewmust receive equivalent inputs — the durable reference (now the wiki) plus the task-meta (now planning).The split — knowledge vs. task/process meta
concept/entitypages)entitypages)concept/comparisonpages)log.md; the WP-narrative stays planning)pedagogy,rejected-paths)Guiding principle: if a reader coming fresh to the codebase (with no knowledge of this work package) would want the content, it belongs in the wiki. If it only makes sense in the context of this task's investigation, it belongs in planning.
Wiki-side notes
raw/citation and a confidence score, per thecodebase-wikipage format. This is stricter than today's comprehension artifact — an improvement, not a regression, but the migration must actually populate citations rather than dropping content that lacks them.codebase-wiki/ingest(task knowledge as an additional input source). The comprehension stage should bindingest(source + task knowledge), thenmaintain-index-log,cross-link, andlint— reusing the wiki ops rather than re-implementing artifact writes.Acceptance criteria
codebase-wiki/<op>techniques; it no longer writes the monolithic.engineering/artifacts/comprehension/{area}.md.raw/with a confidence score.deep-dive-iterationloop andcomprehension-sufficientcheckpoint still function, driven by the planning-resident open questions.outcome[]of the currentcodebase-comprehensionactivity still holds after migration.Open design questions
.engineering/artifacts/planning/<wp>/comprehension-notes.mdholding open questions, implications, the investigation log, and lens output)?pedagogy/rejected-pathspasses stay in the comprehension stage feeding planning, and what (if anything) is distilled into wikicomparison/conceptpages?ingest-from-task attachraw/citations + confidence to task-derived claims?.engineering/artifacts/comprehension/*.mdartifacts — migrate, deprecate in place, or leave for manual port?required: false) with unchanged transitions, or does binding the wiki ops change the activity graph?References
codebase-wikiworkflow + reusable techniques: feat(codebase-wiki): add codebase-wiki workflow #146work-package/activities/14-codebase-comprehension.yamlwork-package/techniques/codebase-comprehension/(survey,deep-dive,revise-questions)work-package/resources/codebase-comprehension.mdFiled on behalf of @m2ux by the workflow-design agent, following the codebase-wiki workflow delivery (#146) and its compliance review.