AI-native workspace: full roadmap (Phases 1-4) - #3
Merged
Conversation
…enerated index Roadmap items 4-6, 10: every knowledge doc now carries structured YAML frontmatter (status, authority, systems, owners, authorship) instead of a plain blockquote, so agents can tell what's current vs stale/superseded without reading the whole doc. knowledge/index.md is generated from that frontmatter by scripts/build-knowledge-index.mjs, wired into /write-doc's last step.
Roadmap items 1-3, 7, 21: AGENTS.md now has a Commands table, Definition of Done pointer, and a concrete Semble retrieval policy (search before recursively reading, cite sources, prefer canonical docs). POLICY.md is new — Definition of Done, ADR triggers, verification-evidence and confidence reporting formats. Machine-enforceable policy (.ai/policies.yaml, risk-levels.yaml) is deferred to Phase 2, flagged as such.
Roadmap items 8-10: separates the workflow into start-task (context gathering) -> plan-task (written plan, human gate) -> implement -> verify-change (evidence per POLICY.md) -> raise-pr, instead of going straight from ticket to code edits. /raise-pr now points at /verify-change's evidence before opening a PR.
… PRs
Roadmap Phase 2 (items 1-10):
- .ai/{systems,commands,ownership,policies,risk-levels}.yaml mirror
AGENTS.md/POLICY.md for tools/CI to parse reliably, validated against
.ai/schemas/*.schema.json (scripts/validate-ai-config.mjs, no external deps
— scripts/lib/yaml-lite.mjs + json-schema-lite.mjs).
- scripts/validate-knowledge.mjs checks frontmatter completeness/enum
validity, canonical-requires-human_reviewed, ADR id/filename consistency,
broken internal links, and generated-index freshness.
- scripts/check-adr-requirement.mjs fails a PR that touches a protected path
(.ai/policies.yaml) without an ADR in the same diff.
- .github/workflows/validate.yml and knowledge-check.yml wire both into CI.
- POLICY.md fleshed out: policy areas, forbidden/approval-required actions,
protected paths, risk levels, data handling, agent roles, and an
enforcement-status table that's honest about what's still human-only.
- /raise-pr's PR template now includes Systems affected, Testing (with
/verify-change evidence), Risks, Documentation, ADR, and Rollback sections.
- /plan-task's output now includes a Confidence/Assumptions/Unverified/
Human-attention-required block.
…ift/consistency checks Roadmap Phase 3 (items 4-10 in the phase list; 34-40 in the numbered roadmap): - /start-task now persists gathered context to .ai/context/<TICKET>.json so /plan-task (or a fresh session) can reuse it instead of re-running retrieval. - knowledge/handoffs/ + a handoff template (write-doc) for interrupted-task working state; surfaced in the generated index under "Active Handoffs". - /capture-learning: after a PR merges, asks the reflective questions (ADR? runbook? command/dependency change? recurring bug? stale docs?), writes what's confirmed via /write-doc, and cleans up the task's handoff/context files. - scripts/detect-doc-drift.mjs: non-blocking warnings for systems.yaml/ devrig.toml mismatches, dangling related/superseded_by ids, and docs past their (new, optional) `review_interval` frontmatter field. Wired into knowledge-check.yml as an informational step. - /check-knowledge-consistency: semantic pass (commands vs package.json, ownership vs CODEOWNERS, architecture vs repos, runbooks vs scripts, API docs vs routes, ADRs vs implementation) that the mechanical scripts can't do.
Roadmap Phase 4 (items 43-48 in the numbered roadmap; graphify/knowledge graphs were already in place from before this project): - scripts/generate-architecture-views.mjs builds knowledge/generated/ system-map.md (Mermaid dependency graph) and ownership-map.md from .ai/systems.yaml / ownership.yaml, authority: generated. Wired into /capture-learning's regenerate step. - .ai/runs/<TICKET-ID>/ is a per-task observability trail written incrementally by /start-task (context.json), /plan-task (plan.md), /verify-change (verification.md), /raise-pr (changed-files.txt), and /capture-learning (summary.md) — documented in the new .ai/README.md. - evals/ (retrieval.yaml, architecture.yaml, workflows.yaml, semble-vs-graphify.md) — question sets and a comparison methodology, scored on retrieval accuracy, source correctness, token consumption, answer completeness, and hallucination rate. - AGENTS.md gets a Context efficiency section, tying the retrieval policy to .ai/context/ reuse and the rtk toggle. - Fixed a real bug in scripts/lib/yaml-lite.mjs: block-sequence items that are multi-key mappings (e.g. "- id: x\n category: y") were silently truncated to their first key — only exercised once evals/*.yaml used that shape, since .ai/*.yaml's existing sequences are all plain scalars.
…checklist Found via an end-to-end dry run (create-devrig -> setup.sh) of this PR's branch: setup.sh's final "Workflow skills available" printout and the generated project README's "Customize this workspace" checklist still only listed the original 5 skills / fields, missing /plan-task, /verify-change, /capture-learning, /check-knowledge-consistency, and the new .ai/*.yaml + POLICY.md customization steps. CLAUDE.md and this repo's own README.md were already updated in earlier commits; this script's own output wasn't.
Mirrors the README.md diff from this branch (skills-table row, Customize this workspace checklist, Layout table) into all 8 translations — es, fr, hi, ja, ko, pt-BR, si, zh-CN — matching this repo's existing translation-sync convention (see bd4f1e1 for the same pattern applied to the graphify feature).
The translation-sync commit introduced 3 table rows using half-width `()` where the rest of the file consistently uses full-width `()` — a nit flagged by the fork that did the sync. Also restored a lost trailing pipe and the .github/workflows/ row that got dropped in my first fix attempt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Implements the full 52-item roadmap in
tasks.mdfor evolving devrig from an"AI-ready multi-repo workspace" into an "AI-native development workspace
where agents can discover context, plan work, execute safely, verify
results, preserve knowledge, and improve future work." Delivered as four
phases (foundation → reliability → learning → intelligence/measurement),
one commit per phase.
Phase 1 — Foundation
AGENTS.md: Commands table, Definition of Done pointer, concrete Sembleretrieval policy, Context efficiency section.
POLICY.md(new): Definition of Done, ADR requirement, verificationevidence / confidence / source-citation formats, and (added in Phase 2)
forbidden/approval-required actions, protected paths, risk levels, data
handling, agent roles.
knowledge/doc now carries YAML frontmatter (status,authority,owners,authorship, …) instead of a plain blockquote — documentedlifecycle states and authority ranking in
knowledge/README.md.knowledge/index.md, generated byscripts/build-knowledge-index.mjs./start-taskgathers context (systems, ADRs, designs, likely files, risks,test plan) before any code changes; new
/plan-task(written plan + humanapproval gate) and
/verify-change(evidence perPOLICY.md).Phase 2 — Reliability
.ai/{systems,commands,ownership,policies,risk-levels}.yamlmirrorAGENTS.md/POLICY.mdfor tools/CI, validated against.ai/schemas/*.schema.jsonwith a small dependency-free YAML/JSON-Schemareader (
scripts/lib/).scripts/validate-knowledge.mjs(frontmatter completeness/enums,canonical-requires-human_reviewed, ADR id/filename consistency, broken
links, generated-index freshness) and
scripts/check-adr-requirement.mjs(protected-path change ⇒ ADR in the same diff), wired into
.github/workflows/{validate,knowledge-check}.yml./raise-pr's PR template now includes Systems affected, Testing (with/verify-changeevidence), Risks, Documentation, ADR, Rollback./plan-taskreports Confidence/Assumptions/Unverified/Human-attention-required.Phase 3 — Learning
/start-taskpersists context to.ai/context/<TICKET>.jsonfor reuse by/plan-taskor a fresh session.knowledge/handoffs/+ template for interrupted-task working state,surfaced in the generated index.
/capture-learning: after a merge, asks the reflective questions (ADR?runbook? command/dependency change? recurring bug? stale docs?), writes
confirmed items via
/write-doc, cleans up handoff/context files.scripts/detect-doc-drift.mjs(non-blocking): systems.yaml/devrig.tomlmismatches, dangling
related/superseded_byids, docs past theirreview_interval. New/check-knowledge-consistencyfor the semanticchecks a script can't do (commands vs package.json, ownership vs
CODEOWNERS, ADRs vs implementation, etc).
Phase 4 — Intelligence & measurement
scripts/generate-architecture-views.mjsbuildsknowledge/generated/{system-map,ownership-map}.mdfrom.ai/*.yaml(
authority: generated)..ai/runs/<TICKET-ID>/— a per-task observability trail writtenincrementally by
/start-task→/plan-task→/verify-change→/raise-pr→/capture-learning.evals/(retrieval/architecture/workflows question sets +semble-vs-graphify.mdcomparison methodology), scored on retrievalaccuracy, source correctness, token consumption, completeness,
hallucination rate.
Testing
This is a template/tooling repo — no application test suite. Verified by
running the actual scripts against the repo's own state at every step:
node scripts/validate-ai-config.mjs— PASS (5/5.ai/*.yamlfiles)node scripts/validate-knowledge.mjs— PASS (3 docs)node scripts/detect-doc-drift.mjs— runs clean (4 expected warnings: thetemplate's illustrative
acme-*vsexample-*repo names intentionallydon't match, demonstrating the drift check works)
node scripts/check-adr-requirement.mjs main HEAD— PASS (no protectedpaths touched by this PR)
node scripts/build-knowledge-index.mjs/generate-architecture-views.mjs— output committed and verified fresh
scripts/lib/yaml-lite.mjswhile writingevals/*.yaml(block-sequence items that are multi-key mappings weresilently truncated) — added regression coverage via the eval files
themselves parsing correctly.
Risks
.ai/policies.yaml) is enforced by CI only forthe ADR-on-protected-path case; forbidden/approval-required actions and
agent-role scoping are documented but not yet mechanically enforced —
called out explicitly in
POLICY.md's new "Enforcement status" table soit doesn't read as more automated than it is.
.ai/systems.yaml/commands.yaml/ownership.yamlstill ship withillustrative example values (mirroring the existing
AGENTS.mdTODOpattern) — flagged in the Customization checklist, not silently assumed.
Documentation
This PR is documentation/tooling infrastructure —
README.md,knowledge/README.md,AGENTS.md, andPOLICY.mdwere all updated inplace as part of the relevant phase.
ADR
Not required — this PR is the devrig template's own tooling/process
evolution, not a change to a project built on it. (Once a real project adopts
this and runs the Semble-vs-Graphify eval, that verdict should become an ADR.)
Rollback
Revert the merge commit; nothing here touches runtime code or has migration
side effects. The generated files (
knowledge/index.md,knowledge/generated/*.md) regenerate deterministically from source if regenerated post-revert.