Use qing-plans/ as durable project memory: what the user wants, why the plan is shaped this way, what each stage changes, which modules are affected, what was observed and verified, and exactly what should happen next.
Preflight
- Treat the Git top-level as
ROOT. SetPLANCTLto this skill's ownscripts/planctl.pyand run every command aspython3 "$PLANCTL" --root ROOT .... A repository holds plan data anddashboard.htmlonly — never the runtime — so the same command works before the first plan exists and on every later machine. - If
qing-plans/index.jsonexists, runvalidate, thenresume. With no current plan,resumediscovers one unfinished draft or lists draft candidates instead of silently ignoring them. - If only
plans/index.jsonexists, it is V1 and read-only. Read references/migration.md before mutation. - If both directories exist, continue only when
qing-plans/migration.jsonis verified; thenqing-plans/is authoritative andplans/is legacy evidence. - A paused plan is current but never auto-resumed. Report it and ask the user before changing its lifecycle.
Route the request
- Create a plan or define modules: read references/create-plan.md.
- Continue work, checkpoint, or change active scope: read references/work-plan.md.
- Record test, model-review, or human evidence: read references/verify-plan.md.
- Activate, pause, complete, cancel, or replace: read references/plan-lifecycle.md.
- Migrate V1
plans/: read references/migration.md. - Diagnose JSON or dashboard projections: read references/schema.md.
Core rules
qing-plans/index.jsonalone owns lifecycle state, baseline, andcurrentPlanSlug. At most oneactiveorpausedplan is current.- New plans use review policy
singleby default. Usenonefor ordinary work where tests and verification evidence are sufficient. singlerequires one genuinely independent agent to review the current immutable plan revision and project-map revision before activation. It also reviews every material active amendment. It does not require phase reviews.- Reviewer-name inequality is only a guardrail: invoke a genuinely separate agent for
single; never relabel the planner/implementer context as a reviewer. - A draft's named planner defines phases, items, documentation impact, and the project map. Draft edits increment the plan revision, making older reviews stale without deleting history.
- Never edit active scope directly. Use
propose-amendmentwith kindscope,corrective, ortemporary. A temporary amendment names a cleanup item that must finish before completion. - Every file-changing item groups files into
changeSetswith a module and reason. Use_unmappedonly while classification is genuinely unknown and_cross-cuttingfor cross-module/no-file work. - Project dependencies have one direction only:
A dependsOn B. Derive upstream and downstream from that relation. Do not introduce AST/import analysis as a hidden second source of truth. - Mark an item
in-progressbefore implementation. The tool snapshots planned file hashes and GitHEAD; completing it captures end hashes and observed actions so later edits cannot erase stage attribution. - Verification attempts are append-only. Enforce
test → script,llm-review → llm, andmanual → human. - Only human-authorized commands activate, pause, resume a paused plan, complete, cancel, or replace a plan. The read-only
resumeinspection command itself never changes lifecycle. Terminal snapshots are frozen. - Completion requires non-empty work, all items done, temporary cleanup done, no open issue/pending amendment/off-plan change, exact planned actions, and required documentation coverage.
- Route every mutation through
$PLANCTL. It locks, appends audit events, updates the registry, and refreshes the affected status snapshot.
Handoff discipline
At a stop, run checkpoint with the current item, stop reason, and concrete next action. Commit qing-plans/ together with code at meaningful milestones and push the branch before changing computers. A dirty tree, missing upstream, or unpushed commit makes the checkpoint local-only; another computer can read any already-synced intent but cannot reliably fetch the complete state.
resume is deterministic: pending amendment/review gate, current in-progress item, failed/blocked item, first dependency-ready item, then completion checks. It also warns when branch or HEAD differs from the checkpoint.
Dashboard
create and migration install qing-plans/dashboard.html plus a .gitignore for the lock file; the viewer is the only non-data artifact a repository receives. Run refresh-status when the dashboard needs a fresh Git observation without changing plan semantics. Run install-dashboard to refresh the viewer after upgrading this skill. The dashboard fetches status.json over HTTP, which file:// blocks; run serve to start a local server bound to 127.0.0.1 and open the dashboard in the default browser (--port to pin a port, --no-open to skip launching a browser). The dashboard shows handoff first, Plan/phase selection, Planned/Observed/Verified file rows (a verified badge downgrades to mismatched when observed attribution disagrees with the plan), a language toggle, clickable module relations, amendments, and issues. Treat status.json.phaseGraph as the two-level visualization authority: render the complete Phase dependency graph first, then exactly one focused Phase's internal task graph with cross-Phase boundary links. "All phases" aggregates the Plan but retains that focused graph, a Phase selection scopes impact to the Phase, and a task-node selection opens inline details while also scoping the compact Plan impact map, module detail, and change rows to that task; explicit actions focus its Phase or switch to its list. Derive the same projection when an older frozen V2 snapshot lacks phaseGraph. Module impact uses fixed-size nodes (or compact cards for a small edgeless map) rather than stretching to fill the panel. Place the selected module explanation beside the map on wide layouts, and lead with why the module is directly changed or transitively affected before boundary metadata, relations, and current-scope files. Its per-plan impact map reads only that plan's own frozen/generated status.json; the "global map" toggle alone reads the live root map.
For dashboard QA, run scripts/create_dashboard_fixture.sh EMPTY_ROOT. It creates a disposable 12-Phase project with module dependencies, cross-Phase flow, and branch/merge task graphs, and refuses to overwrite an existing Qing Plans store. Use this fixture instead of a real project's current Plan when judging visualization scale or interactions.
Write and report in the user's language
Write goals, purposes, reasons, evidence, issues, stop reasons, and next actions in the user's language. Report the current plan and phase, item just changed, completed/total count, handoff portability or blocker, and next action.