Add spec→plan engine; split /devague skill into /think + /spec-to-plan#8
Conversation
Adds a deterministic plan engine as a structural peer of the frame engine (idea→spec): Plan domain model, a convergence gate (coverage + acceptance + acyclic dependencies + blocking risk, reusing ConvergenceResult), a JSON store under .devague/plans/, a topologically-ordered plan-md renderer, and a nested `devague plan` CLI group (new/task/accept/depend/cover/confirm/reject/risk/ converge/export/show/list/learn/explain). `plan new` requires a converged source frame; converge/export re-evaluate against the live frame and refuse on drift (deleted or regressed). Reframes the operator skills: renames the published /devague skill to /think (idea→spec; "devague" stays a trigger keyword) and adds a new /spec-to-plan skill (spec→plan) that drives `devague plan`. The product/CLI/repo name stays `devague`. Updates docs/skill-sources.md, CLAUDE.md, README.md, and adds a design doc. Bumps version to 0.4.0; coverage 96.6% (gate 95%). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Review Summary by QodoAdd spec→plan engine; split /devague skill into /think + /spec-to-plan
WalkthroughsDescription• Introduces the **spec→plan engine**, a structural peer of the existing frame engine, completing the two-leg deterministic pipeline: `vague idea → /think → buildable spec → /spec-to-plan → buildable plan → build` • Adds new domain modules (plan.py, plan_convergence.py, plan_store.py) mirroring the frame engine 1:1, with task lifecycle management, coverage target derivation from converged frames, and deterministic cycle detection • Implements the plan convergence gate ensuring all targets are covered, tasks have acceptance criteria, no proposed tasks remain, dependency graph is acyclic, and no blocking risks exist • Adds nested devague plan CLI group with 14 moves (new, task, accept, depend, cover, confirm, reject, risk, converge, export, show, list, learn, explain), all supporting --json output • Enforces frame-drift detection in converge/export moves to refuse on source frame deletion or regression below convergence • Renames the /devague operator skill to /think (idea→spec leg) and introduces new /spec-to-plan skill (spec→plan leg) with portable bash wrapper and status helper • Adds topological plan markdown renderer with task dependencies, coverage targets, and acceptance criteria • Includes comprehensive test coverage (147 tests, 96.6% coverage) for plan model, convergence gate, persistence, CLI integration, and skill wrappers • Updates documentation (README, CLAUDE.md, design spec, skill-sources.md) to clarify devague as a CLI tool with dual-engine architecture and agent integration via operator skills • Bumps version from 0.3.3 to 0.4.0 Diagramflowchart LR
idea["Vague idea"]
think["/think skill<br/>idea→spec engine"]
spec["Buildable spec"]
spec_to_plan["/spec-to-plan skill<br/>spec→plan engine"]
plan["Buildable plan"]
build["Build"]
idea -- "converged frame" --> think
think -- "converged frame" --> spec
spec -- "converged plan" --> spec_to_plan
spec_to_plan -- "converged plan" --> plan
plan --> build
File Changes1. devague/plan.py
|
Code Review by Qodo
1. plan export writes docs/plans/
|
- cmd_plan_show: single return path (S3516 — was always returning 0 from two branches). - Hoist duplicated argparse help literals into _JSON_HELP / _TASK_ID_HELP constants (S1192). - Split _find_cycle into _walk_from + _find_cycle to cut cognitive complexity below the threshold (S3776). No behavior change; 147 tests pass, coverage 96.7%. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A rejected task is omitted from the exported plan-md, but the convergence gate
previously built the dependency node set from *all* tasks — so a confirmed task
depending on a rejected one passed the gate yet rendered a `depends on: tN` line
whose target never appears in the output.
_missing_dep_integrity now operates over active (non-rejected) tasks: a dep on a
rejected task is a distinct integrity failure ("depends on rejected task"), and
cycles/dangling deps living only among rejected tasks no longer block
convergence. _find_cycle takes the active task list. +2 tests.
Re Qodo #3292382004 (export to docs/plans/): working as designed — plans export
to docs/plans/, not docs/specs/ (the spec artifact); see the reply on the PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|



What
Adds devague's second deterministic engine — the spec→plan engine, a
structural peer of the existing frame engine (idea→spec) — and reframes the
operator skills into a clear two-leg pipeline:
vague idea → /think → buildable spec → /spec-to-plan → buildable plan → buildPlan engine (new, mirrors the frame engine 1:1)
devague/plan.py—Plan/Task/PlanRisk/CoverageTargetdomain; same_nextid allocation and user-only confirm rule asframe.py.targets_from_frame()derives coverage targets from a converged frame's confirmed claims + honesty conditions.devague/plan_convergence.py— gate (reusesConvergenceResult): every coverage target covered by a confirmed task, every confirmed task has acceptance criteria, no task left proposed, dependency graph acyclic (deterministic cycle path), no blocking risk.devague/plan_store.py— JSON under.devague/plans/(slug == frame slug, refuse-on-collision).devague/render/plan_md.py— topologically-ordered buildable plan-md (not in theFrame-typed render registry; called directly).devague/cli/_commands/plan.py+_plans.py— nesteddevague plan <move>group:new/task/accept/depend/cover/confirm/reject/risk/converge/export/show/list/learn/explain, all--json.plan newrequires a converged frame;converge/exportre-evaluate against the live frame and refuse on drift (source frame deleted or regressed below convergence).Skill reframe
/devagueskill →/think(idea→spec); "devague" stays a trigger keyword./spec-to-plan(spec→plan), a portable wrapper overdevague planwith astatusnext-move helper.devague. README reframed to make cleardevagueis a CLI (the PyPI-facing identity); the agent framing stays inCLAUDE.md.Tests / quality
Downstream note (alignment delta)
Touches
CLAUDE.md,docs/skill-sources.md, and.claude/skills/. The skill rename (devague→think) plus the newspec-to-plansibling means steward must relearn the skill names when it re-vendors and broadcasts to the AgentCulture mesh — recorded indocs/skill-sources.md.Design:
docs/superpowers/specs/2026-05-23-devague-spec-to-plan-design.md