Implementation roadmap · 2026-07-11
The System
Original design spec · Rich Markdown design amendment
Ten independently green phases keep the hard rename, governance kernel, rich document migration, rendering, workflows, and final integration reviewable.
Phases 1–5 are complete. Phase 6 begins the approved replacement of their authored-HTML and shared-CSS assumptions without rewriting completed history.
Phase 1 · Hard rename baseline
Outcome: all existing Super behavior ships under the-system only.
Scope
- Rename extension directory, package, branding, imports, tests, root resources, lockfile entries, static checks, TypeScript config, README rows, and current examples.
- Preserve task branches, push-task, mockup, renderer, and existing skills without semantic changes.
- Add a scoped static assertion rejecting live old paths while allowing historical
docs/super/**.
Out of scope
Governance, HTML documents, prompts, and new skills.
Verification
Renamed focused tests, real Pi harness loading, typecheck, static checks, and full CI.
Boundary
The repository remains functionally identical except for the intentional hard public rename.
Phase 2 · Project and document kernel
Outcome: a dormant, pure, tested model understands project roots, config, IDs, metadata, document relationships, and the shared stylesheet.
Scope
- Add
documents.tswith native JJ/Git worktree root discovery and conflict detection. - Add normalized governed-path containment.
- Define strict config, prefix, ID, slug, filename, and metadata schemas.
- Index authored documents and report stable diagnostics for duplicate IDs, filename mismatch, dangling references, and forbidden graph edges.
- Validate the narrow authored HTML shell and obvious active-resource violations without executing content.
- Add the approved versioned Nugu
assets/system.css.
Out of scope
Runtime hooks and filesystem mutation.
Verification
Table-driven unit tests for simple Git, Git worktrees, JJ, colocated/conflicting roots, no VCS, config, IDs, metadata, graph rules, HTML, and CSS tokens.
Boundary
New code is unused by runtime; existing extension behavior remains unchanged and CI-green.
Phase 3 · Doctor vertical slice
Outcome: users can inspect any project system without mutation.
Scope
- Add deterministic read-only doctor script using the Phase 2 kernel.
- Add
system-doctorskill and thin/system-doctorprompt. - Add initial
system-documentsskill as the single document-authoring authority. - Export package prompts and update exact resource/static checks.
Out of scope
Initialization, injection, and write gates.
Verification
Fixture-tree diagnostics, stable ordering, exit status, no-mutation proof, skill contracts, and real package resource discovery.
Boundary
Doctor is independently useful while all existing runtime behavior remains intact.
Phase 4 · Guided initialization
Outcome: /system-init creates or upgrades a valid project system through explicit human decisions.
Scope
- Add thin prompt and
the-system-initskill. - Inspect project context and grill one focused question at a time.
- Draft and separately approve missing core Markdown files.
- Create directories/config and copy bundled CSS.
- Make reruns idempotent, core-preserving, and explicit about machine-asset upgrades.
- Validate through doctor after writes.
Out of scope
Automatic runtime injection or write interception.
Verification
Skill contract tests, config/CSS copy checks, missing/existing core behavior, prefix handling, and repeat-run fixtures.
Boundary
Initialization works as an on-demand agent workflow; the extension still does not alter normal turns.
Phase 5 · Runtime governance
Outcome: initialized projects inject their laws and receive advisory ownership protection.
Scope
- Add
system.tsruntime orchestration. - Resolve root per turn and inject bounded existing SYSTEM/MISSION/RULES in stable order.
- Notify once per session when initialization or version refresh is needed.
- Block edits to existing core files.
- Allow new specs and mockups; require UI approval for edits to existing spec-owned files.
- Preflight write/edit candidates with shared validation.
- Conservatively guard recognizable shell mutations and state the advisory boundary.
Out of scope
Workflow output migration.
Verification
Real event shapes, injection composition, root changes, UI approve/deny/cancel, no-UI failure, candidate validation, and retained task/mockup tests.
Boundary
Existing task workflows still function; initialized projects gain coherent governance without hidden repair.
Phase 6 · Rich Markdown bundle kernel migration
Outcome: doctor, initialization, runtime governance, and shared validation understand Markdown document bundles instead of authored HTML files.
Scope
- Replace flat authored-HTML paths with typed
<ID>-<slug>/index.mdbundle discovery and validation. - Add the required Markdown/frontmatter parsing dependencies and explicit rich-profile candidate checks.
- Replace the
system-documentsauthority's HTML contract with the canonical bundle and rich Markdown contract before downstream workflows delegate to it. - Preserve source-ordered arbitrary frontmatter while retaining strict known graph semantics.
- Extend spec ownership approval to every existing file in a spec bundle while allowing validated new bundles and missing assets.
- Guard recognizable shell mutation across complete spec bundles.
- Stop creating project-local
system.css; update config/schema versions and remove the obsolete machine-owned file only through approved initialization upgrade. - Update doctor, initialization, runtime notices, and tests around the new structure.
Out of scope
Browser rendering and authoring workflow migration.
Verification
Bundle discovery, IDs, slugs, frontmatter order, graph diagnostics, ownership approve/deny/cancel, shell advisory coverage, initialization upgrades, source preservation, and retained runtime/task/mockup suites.
Boundary
The project has one coherent Markdown bundle model, doctor and runtime remain useful, and no browser or workflow depends on an unfinished renderer.
Phase 7 · Shared renderer and unified command shell
Outcome: users get /system help, /system view <path|id|slug>, and /system book through one rich Markdown article pipeline.
Scope
- Add one extension command named
systemwith subcommand parsing and argument completions. - Implement no-argument help for lifecycle and non-lifecycle subcommands.
- Add
viewwith exactly one selector andbookwith no filters. - Add the unified/remark/rehype renderer for GFM, frontmatter, footnotes, definition lists, alerts, raw HTML, Mermaid, TeX, highlighting, anchors, and collapsed in-document contents.
- Render every frontmatter field in source order through the accepted compact summary and collapsed ledger.
- Copy complete bundle trees into temporary output and keep cross-document, slug, ID, and asset links working.
- Add calm automatic Nugu light/dark styling inherited by every generated component.
- Add single-document and book shells around identical article HTML.
- Add graph references/backlinks, grouped navigation, previous/next movement, and generated full-text search.
Out of scope
Lifecycle authoring, schema-v3 IDs, phase terminology migration, task removal, implementation execution, and issue handling.
Verification
Command completions, help output, selector rules, identical article output across modes, every rich syntax feature, nested metadata, raw HTML, local/remote/cross-bundle links, inline mockups, body-content search, source hashes, opener platforms, Chromium, and Firefox.
Boundary
Rendering is independently useful and read-only while existing authoring skills and task branch behavior remain unchanged.
Phase 8 · Lifecycle schema and prompt migration
Outcome: The System owns stage documents through /system research, /system spec, /system spec-verify, /system phase, /system plan, and /system issue without shipping any System skills.
Scope
- Migrate document metadata to schema v3: token IDs,
phasedocuments, minimal config, status fields, and validated ID-only frontmatter references. - Move internal lifecycle prompts into bundled files that are loaded by
/system <subcommand>and not exported as top-level Pi prompt templates. - Convert current lifecycle skills into stage prompts and shared internal prompt includes; keep no System skills.
- Include the document contract exactly once in every
/systemsubcommand and include the Markdown contract exactly once only for document-authoring or rendering subcommands. - Make every lifecycle subcommand accept zero or one instruction string; zero-argument calls ask focused questions or offer selection.
- Make stage prompts recommend, but never automatically create, optional downstream stages.
- Implement research, spec, phase, plan, and issue artifact creation with canonical bundles and copyable
View:output. - Implement
spec-verifyas ephemeral experimental verification that proposes spec amendments and creates no canonical artifact. - Block invalid document create/edit attempts with actionable frontmatter, path, status, and reference errors.
- Enforce immutable
donephase and plan documents; create new superseding artifacts instead of editing finished ones.
Out of scope
Code execution, branch finishing, and deletion of task commands.
Verification
Schema-v3 parsing, token collision checks, command prompt injection, include de-duplication, zero/one argument behavior, frontmatter fixtures, reference graph rules, done immutability, actionable validation errors, copyable view output, and migrated knowledge coverage against current skills.
Boundary
The document lifecycle is available through /system, but implementation still uses existing execution behavior until Phase 9.
Phase 9 · Exec lifecycle and task removal
Outcome: /system exec produces tested code from approved System references, and the old /start-task//finish-task dance is gone.
Scope
- Add
/system exec [instructions]prompt injection. - Allow exec inputs of spec, spec plus phase, spec plus plan, spec plus phase plus plan, and optional issue context.
- Require phase and plan inputs to be
status: done; specs and issues remain validated by the document write gates. - Preserve high-value execution knowledge: plan review, blocker escalation, TDD, verification-before-completion, code-review intake, review report shape, and safe git completion.
- Make issue-driven exec possible after the issue has created or amended any missing spec only when the issue exposes a spec gap.
- Produce final logs with changed files, verification, and a plain copyable
View:line. - Use narrative document-linked commit messages rather than technical file/test inventories.
- Delete public task branch commands,
push-task,task-resultrendering,/auto, and their status plumbing after replacement coverage exists.
Out of scope
Changing the generic mockup tool or renderer behavior.
Verification
Exec prompt resolution, accepted input combinations, rejected draft phase/plan refs, issue-spec-gap handling, final log shape, commit-message guidance, removed command/resource assertions, retained mockup tests, and full focused extension tests.
Boundary
The annoying branch-navigation workflow is removed only after /system exec covers its useful execution knowledge.
Phase 10 · Integration hardening and final documentation
Outcome: the unified command, renderer, lifecycle prompts, validation gates, and execution path form one coherent System surface.
Scope
- Complete startup, doctor, graph, approval, rendering, resource discovery, rename, prompt injection, and package integration tests.
- Update README, package metadata, changelog, and current command documentation around
/system. - Remove remaining System skills from package resources after their knowledge is covered by internal prompt includes.
- Ensure
inithandles schema upgrades and optional project-rule seeding by scanning likely docs and asking before writing. - Run final typecheck, focused suites, real extension loading, static checks, browser suites, and CI.
Out of scope
Provider-specific research, Git sync, compatibility aliases, persistent publishing, browser editing, and automatic historical docs/super/** migration.
Verification
Complete behavioral-contract audit against both design specs, no live old lifecycle commands, no top-level lifecycle prompt leakage, no packaged System skills, no live old-path references outside the historical allowlist, and mise run ci.
Boundary
The full amended design is implemented under one public extension with no half-migration, duplicate command surface, or legacy task-branch workflow.