Daedalus v2: the kit is the product - #20
Merged
Merged
Conversation
…, templates Pivot to v2: the kit is the product, the TUI its vehicle. Adds the full harness content in draft: METHOD.md (the standard), the Opus-calibrated constitution template, 7 skills (/brief /spec /council /plan /ticket /epic /status), 8 agents, ticket/decision/state templates, and enforcement hooks. Implementation plan with running log at development/v2/PLAN.md. v1 code is untouched; its prune is scheduled for phase 5 per the inventory recorded in the plan.
Brief, acceptance suite and scorecard frozen before the runs; RESULTS.md records the outcome: functional parity (10/10 suite, 10/10 quality on both arms, zero human interventions) with a ~20x token gap as the cost finding.
Cost iteration from the benchmark findings: planner-assigned risk frontmatter drives verification depth (low closes on implementer self-check, normal/high keep the adversarial verifier), a Sonnet implementer-lite takes risk-low chores with a misclassification escalation rule, and documentation batches into one pass per epic. Estimated 40-50% pipeline cost reduction.
Prune the v1 product surface ahead of the v2 kit-driven commands. The TUI is reduced to a clean welcome shell: it names the tool and the four upcoming commands (init, status, doctor, update) and quits with q/ctrl+c. The v1 area-navigation, build and workflow views are removed; the reusable framework (theme, keybinding registry, contextual help, form component, markdown rendering) is kept and its tests refocused on the framework itself. cmd/daedalus is rewritten to a minimal entry point: --version prints the version and exits, otherwise the welcome shell launches (with the existing non-interactive notice preserved for piped/CI contexts). The v1 subcommands and their tests are dropped; a small test pins the version, usage-error and non-interactive paths.
Delete the v1 engine layer now that nothing references it: internal/compile (the .claude/ compiler — v2 init will implement fresh writes; its idempotent patterns remain in git history), internal/linters and internal/conventions (v1 validation), and internal/traceability (R-N graph). These sit above the domain model, so they are removed first to keep every build green.
Delete the remaining v1 domain packages now that nothing imports them: internal/workflows (DAG), internal/catalog, internal/workspace, internal/backlog, internal/specs, internal/architecture and internal/prompts. internal/ now holds only the kept foundation: buildinfo, logging and the tui framework.
Add `daedalus init [target-dir]`, which writes the embedded Daedalus kit
into a repository's .claude/ and development/ directories.
- Embed the kit at the repo root via //go:embed all:kit (kitembed.go),
since embed patterns are directory-relative and cannot use "..".
- internal/kit resolves only the init-table template variables and leaves
runtime placeholders ({{NN}}, {{TITLE}}, ...) verbatim; writes are
non-destructive (existing files are skipped and reported).
- Install CLAUDE.md, development/METHOD.md, an instantiated STATE.md, the
empty backlog dirs, the platform's hook scripts, a merged settings.json,
and a .claude/daedalus-kit.yaml marker recording version + variables.
- internal/initcmd wires the CLI with a Huh form and non-interactive flags
(--name/--description/--stack/--build-cmd/--test-cmd/--lint-cmd/
--chat-language/--attribution/--yes).
- Golden-style tests assert the tree, resolved vars, surviving runtime
placeholders, settings merge, and idempotent re-runs.
Implement `daedalus status [target-dir]`: reads development/STATE.md and every development/epics/*/tickets/*/spec.md frontmatter, then renders the epic progress table, per-ticket detail for non-done epics, the manual gates waiting on the human, blocked tickets, the next step from STATE.md, and a consistency check that reports (never fixes) STATE-vs-frontmatter mismatches. --plain renders without color for stable, machine-readable output. The command is graceful when no kit is installed (clear message, exit 1) and when the backlog is empty (exit 0). Includes a fixture backlog with mixed states and a golden test asserting the exact --plain output.
Add `daedalus doctor [target-dir]`, a read-only integrity check for a Daedalus-managed repository. It verifies, one line per check: - the .claude/daedalus-kit.yaml marker is present and parses - the marker's kit version matches the running binary (drift is a warning) - the required install files are present (CLAUDE.md, development/METHOD.md, development/STATE.md, and the skills, agents and templates) - .claude/settings.json is present and valid JSON - every hook script referenced by settings.json exists on disk - every ticket spec.md frontmatter parses with valid enum values (status/type/risk/gate) Exit code is 0 when all checks pass, 1 when the worst result is a warning, and 2 on any failure. A --plain flag drops color for machine-readable output. The expected file set is enumerated from the embedded kit via the new kit.RequiredFiles, so doctor tracks the kit as it grows. Tests cover a healthy install and broken variants (drift, missing files, missing hook scripts, absent/unparseable marker and settings, invalid ticket enums) plus a committed spec fixture.
…inary version
Re-resolves the managed slice of the kit (.claude/{skills,agents,templates,
hooks} and development/METHOD.md) from the marker's init variables and rewrites
only files whose content differs. Replaced files are backed up under
.claude/.backup-<old-version>/ preserving their relative path, the marker is
re-stamped, and settings.json is touched only to refresh its hooks block.
CLAUDE.md, development/STATE.md and the backlog are never written; a changed
constitution template is reported for manual review. --dry-run lists changes
without writing; a missing marker is refused with exit 2.
Extracts renderMarker and hooksObject in the kit package so init and update
produce byte-identical output, and adds a marker parser (ReadMarker).
Rewrite README.md around the v2 product: the kit is an opinionated Claude Code harness implementing the Daedalus Method, and the CLI/TUI installs, checks and updates it. Document the four commands (init, status, doctor, update) with verified one-line examples, refresh the project layout for the current kit/, cmd/ and internal/ trees, and drop the v1 claims about canonical formats, DAG workflows and the .daedalus/ workspace. Mark PRD.md, init.md and HANDOFF.md as superseded by v2 at their top without deleting them. Add a v2 overview page (method + commands), point docs/README.md at it, and mark the v1-specific chapters as outdated.
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 this is
Full pivot from v1 (canonical format + compiler + DAG workflows) to v2: the kit is the product, the TUI is its vehicle. Daedalus now ships an opinionated Claude Code harness — the Daedalus Method — and a thin CLI/TUI that installs, inspects, and updates it.
Contents
The kit (
kit/) — the Daedalus Method v0.1:METHOD.md: the standard (lifecycle, roles, document contract, councils, manual gates, token economy)/brief /spec /council /plan /ticket /epic /status), 9 agents, ticket/decision/state templates, enforcement hooksValidation (
development/v2/pilot/) — A/B benchmark, criteria frozen before the runs: the same frozen brief built twice (Opus 4.8 + kit vs Fable bare). Result: functional parity — 10/10 acceptance and 10/10 quality on both arms, zero human interventions; full analysis inRESULTS.md.The CLI/TUI — v1 machinery pruned (11 internal packages removed); four commands on the kept Charm skeleton, with the kit embedded in the binary via
go:embed:daedalus init— instantiate the kit into any repo (interactive form or flags; non-destructive; version marker)daedalus status— read-only work map from ticket frontmatters, with consistency checksdaedalus doctor— kit integrity checks (exit 0/1/2)daedalus update— sync managed files to the binary version, with backups; user files never touchedDocs — README rewritten to v2; v1 planning docs (PRD/init/HANDOFF) marked superseded; running log of every decision in
development/v2/PLAN.md.Verification
Every step went through adversarial verification (0 fix rounds across the phase), plus an independent end-to-end smoke test: fresh repo →
init(31 files, idempotent re-run) →doctor11/11 ok →statusrenders.go build ./...,go vet ./...,go test ./...green throughout.