context-planning 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +454 -0
  3. package/bin/commands/_helpers.js +53 -0
  4. package/bin/commands/_usage.js +67 -0
  5. package/bin/commands/capture.js +46 -0
  6. package/bin/commands/codebase-status.js +41 -0
  7. package/bin/commands/complete-milestone.js +57 -0
  8. package/bin/commands/config.js +70 -0
  9. package/bin/commands/doctor.js +139 -0
  10. package/bin/commands/gsd-import.js +90 -0
  11. package/bin/commands/inbox.js +81 -0
  12. package/bin/commands/index.js +33 -0
  13. package/bin/commands/init.js +87 -0
  14. package/bin/commands/install.js +43 -0
  15. package/bin/commands/scaffold-codebase.js +53 -0
  16. package/bin/commands/scaffold-milestone.js +58 -0
  17. package/bin/commands/scaffold-phase.js +65 -0
  18. package/bin/commands/status.js +42 -0
  19. package/bin/commands/statusline.js +108 -0
  20. package/bin/commands/tick.js +49 -0
  21. package/bin/commands/version.js +9 -0
  22. package/bin/commands/worktree.js +218 -0
  23. package/bin/commands/write-summary.js +54 -0
  24. package/bin/cp.cmd +2 -0
  25. package/bin/cp.js +54 -0
  26. package/commands/cp/capture.md +107 -0
  27. package/commands/cp/complete-milestone.md +166 -0
  28. package/commands/cp/execute-phase.md +220 -0
  29. package/commands/cp/map-codebase.md +211 -0
  30. package/commands/cp/new-milestone.md +136 -0
  31. package/commands/cp/new-project.md +132 -0
  32. package/commands/cp/plan-phase.md +195 -0
  33. package/commands/cp/progress.md +147 -0
  34. package/commands/cp/quick.md +104 -0
  35. package/commands/cp/resume.md +125 -0
  36. package/commands/cp/write-summary.md +33 -0
  37. package/docs/MIGRATION-v0.5.md +140 -0
  38. package/docs/architecture.md +189 -0
  39. package/docs/superpowers/plans/2026-05-20-v0-7-plan-16-01-design-md-infrastructure.md +1064 -0
  40. package/docs/superpowers/plans/2026-05-20-v0-7-plan-16-02-review-log-infrastructure.md +418 -0
  41. package/docs/superpowers/plans/2026-05-20-v0-7-plan-16-03-key-decisions-hard-block.md +295 -0
  42. package/docs/superpowers/specs/2026-05-20-generic-provider-harness-detection-design.md +380 -0
  43. package/docs/superpowers/specs/2026-05-20-v0-7-design-capture-design.md +400 -0
  44. package/docs/writing-providers.md +76 -0
  45. package/install/aider.js +204 -0
  46. package/install/claude.js +116 -0
  47. package/install/common.js +65 -0
  48. package/install/copilot.js +86 -0
  49. package/install/cursor.js +120 -0
  50. package/install/echo-provider.js +50 -0
  51. package/lib/codebase-mapper.js +169 -0
  52. package/lib/detect.js +280 -0
  53. package/lib/frontmatter.js +72 -0
  54. package/lib/gsd-compat.js +165 -0
  55. package/lib/import.js +543 -0
  56. package/lib/inbox.js +226 -0
  57. package/lib/lifecycle.js +929 -0
  58. package/lib/merge.js +157 -0
  59. package/lib/milestone.js +595 -0
  60. package/lib/paths.js +191 -0
  61. package/lib/provider.js +168 -0
  62. package/lib/roadmap.js +134 -0
  63. package/lib/state.js +99 -0
  64. package/lib/worktree.js +253 -0
  65. package/package.json +45 -0
  66. package/templates/DESIGN.md +78 -0
  67. package/templates/INBOX.md +13 -0
  68. package/templates/MILESTONE-CONTEXT.md +40 -0
  69. package/templates/MILESTONES.md +29 -0
  70. package/templates/PLAN.md +84 -0
  71. package/templates/PROJECT.md +43 -0
  72. package/templates/REVIEW-LOG.md +38 -0
  73. package/templates/ROADMAP.md +34 -0
  74. package/templates/STATE.md +78 -0
  75. package/templates/SUMMARY.md +75 -0
  76. package/templates/codebase/ARCHITECTURE.md +30 -0
  77. package/templates/codebase/CONCERNS.md +30 -0
  78. package/templates/codebase/CONVENTIONS.md +30 -0
  79. package/templates/codebase/INTEGRATIONS.md +30 -0
  80. package/templates/codebase/STACK.md +26 -0
  81. package/templates/codebase/STRUCTURE.md +32 -0
  82. package/templates/codebase/TESTING.md +39 -0
  83. package/templates/config.json +173 -0
  84. package/templates/phase-PLAN.md +32 -0
  85. package/templates/quick-PLAN.md +24 -0
  86. package/templates/quick-SUMMARY.md +25 -0
@@ -0,0 +1,147 @@
1
+ ---
2
+ name: cp-progress
3
+ description: Show where you are in the project — current phase, last activity, next plan, and progress %. Read-only.
4
+ argument-hint: ""
5
+ requires: []
6
+ ---
7
+
8
+ # /cp-progress
9
+
10
+ You are running `cp-progress`. This is a **read-only** diagnostic: tell the
11
+ user exactly where they are in the project and what the obvious next action
12
+ is. Do not modify any files.
13
+
14
+ ## TL;DR — use the `cp status` CLI wrapper
15
+
16
+ The `cp status` CLI command does almost everything this command needs.
17
+ Run it, format the output for the user, and add any extras (project name
18
+ from PROJECT.md, continue-here notice).
19
+
20
+ ```bash
21
+ cp status --json
22
+ ```
23
+
24
+ Returns:
25
+
26
+ ```json
27
+ {
28
+ "ok": true,
29
+ "milestone": "v0.1 MVP",
30
+ "milestoneStatus": "in-progress",
31
+ "phases": [
32
+ { "num": "1", "name": "Foundation", "done": 2, "total": 2 },
33
+ { "num": "2", "name": "Search", "done": 0, "total": 1 }
34
+ ],
35
+ "nextPlan": {
36
+ "phaseNum": "2",
37
+ "phaseName": "Search",
38
+ "planId": "02-01",
39
+ "desc": "search command"
40
+ },
41
+ "stateContentPresent": true
42
+ }
43
+ ```
44
+
45
+ If `cp` isn't on PATH, fall back to the manual procedure in the
46
+ ["Fallback"](#fallback--manual-implementation) section.
47
+
48
+ ## Step 1 — Read project name
49
+
50
+ Read the first `# heading` of `.planning/PROJECT.md` for the project name
51
+ (or fall back to the repo dir basename). This is the only thing
52
+ `cp status` doesn't surface.
53
+
54
+ ## Step 2 — Run `cp status`
55
+
56
+ ```bash
57
+ cp status --json
58
+ ```
59
+
60
+ If `ok: false`, surface the error message verbatim and suggest
61
+ `/cp-new-project` or `cp init`.
62
+
63
+ ## Step 3 — Detect continue-here
64
+
65
+ Check whether `.planning/.continue-here.md` (or
66
+ `.planning/phases/{NN-slug}/.continue-here.md`) exists. If so, you'll add a
67
+ suffix to the output.
68
+
69
+ ## Step 4 — Render the report
70
+
71
+ Format like this (substitute values from the JSON):
72
+
73
+ ```
74
+ cp progress
75
+ ───────────
76
+
77
+ Project: {project name}
78
+ Milestone: {milestone or "(none in progress)"}
79
+
80
+ You are here:
81
+ Phase {num}: {name} ({done}/{total} plans complete)
82
+ Plan {nextPlan.planId}: {nextPlan.desc} ← next action
83
+
84
+ Overall: {sum done}/{sum total} plans complete {progress bar — see below}
85
+
86
+ Phase breakdown:
87
+ ✓ Phase 1: Foundation (2/2 — Complete)
88
+ ▶ Phase 2: Search (0/1 — In progress)
89
+
90
+ Suggested next:
91
+ /cp-execute-phase {nextPlan.phaseNum} # PLAN exists for nextPlan? (see step 5)
92
+ /cp-plan-phase {nextPlan.phaseNum} # if not
93
+ ```
94
+
95
+ **Progress bar** — match `lib/state.progressBar(pct)` exactly so STATE.md
96
+ edits agree: `[██████░░░░] 60%` style (10-char bar of `█`/`░`).
97
+
98
+ **Phase legend:**
99
+ - `✓` Complete (done == total > 0)
100
+ - `▶` In progress (the one "you are here", or 0 < done < total)
101
+ - ` ` Not started (done == 0, total > 0)
102
+ - `?` Planned (total == 0 — no plan file yet)
103
+
104
+ ## Step 5 — Decide the suggested next command
105
+
106
+ Check `lib/paths.findPhaseDir(nextPlan.phaseNum)` — if it returns a real
107
+ dir AND that dir contains `{nextPlan.planId}-PLAN.md`, suggest
108
+ `/cp-execute-phase`. Otherwise suggest `/cp-plan-phase`.
109
+
110
+ (Simpler heuristic: if `phases[i].total > 0` in the JSON, suggest execute;
111
+ else suggest plan.)
112
+
113
+ ## Step 6 — Continue-here notice (if Step 3 found one)
114
+
115
+ ```
116
+ ↩ A continue-here.md is waiting. Run /cp-resume to restore mid-task context.
117
+ ```
118
+
119
+ ## Step 7 — Edge cases
120
+
121
+ - **No milestone in progress:** print "Milestone: (none in progress)" and
122
+ suggest `/cp-new-milestone "<name>"`.
123
+ - **All plans across all phases done:** suggest `/cp-complete-milestone`.
124
+ - **STATE.md disagrees with ROADMAP (e.g. STATE says Phase 4 but ROADMAP
125
+ shows Phase 4 has no plans yet):** surface as a warning line but trust
126
+ ROADMAP (which is what `cp status` reads from).
127
+
128
+ ## Fallback — manual implementation
129
+
130
+ If `cp` isn't on PATH, replicate `lib/lifecycle.statusReport(root)`:
131
+ - `roadmap.listPhases(content)` → phases array with `{num, name, plans[]}`
132
+ - Find the in-progress milestone heading (`### 🚧 {name} (In Progress)`
133
+ or just `(In Progress)` in the heading)
134
+ - Filter `listPhases` results to those whose `num` is in
135
+ `findMilestoneInRoadmap(content, name).phases`
136
+ - nextPlan = first phase × first plan where `!plan.done`
137
+
138
+ Then render as above.
139
+
140
+ ## Notes
141
+
142
+ - This command MUST NOT write any file. It only reads.
143
+ - Keep output compact; the user runs this often.
144
+ - The progress bar should match `lib/state.progressBar(pct)` exactly so
145
+ downstream STATE.md edits agree.
146
+ - `cp status` already handles the milestone/phase/next-plan logic with
147
+ 394-test coverage; prefer it over re-implementing.
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: cp-quick
3
+ description: Lightweight ad-hoc task. Creates a quick PLAN.md, drives it through the provider, records SUMMARY.md. No phase/roadmap baggage.
4
+ argument-hint: "<task description>"
5
+ requires: []
6
+ ---
7
+
8
+ # /cp-quick
9
+
10
+ You are running `cp-quick`. Use this for small, ad-hoc work that doesn't
11
+ deserve a full phase: a bug fix, a small refactor, a dependency bump.
12
+
13
+ ## Step 1 — Parse arguments
14
+
15
+ - If `$ARGUMENTS` starts with `list`: list everything under `.planning/quick/`
16
+ (one row per dir, status from frontmatter, no agent spawn). Stop.
17
+ - If `$ARGUMENTS` starts with `resume <slug>`: find
18
+ `.planning/quick/*-<slug>/`, load its PLAN.md, jump to Step 4.
19
+ - Otherwise: `TASK = $ARGUMENTS` is the task description. If empty, ask.
20
+
21
+ ## Step 2 — Slug + directory
22
+
23
+ - `slug` = lowercase, hyphenated first 5-8 words of TASK, max 40 chars,
24
+ `[a-z0-9-]+` only.
25
+ - `dir` = `.planning/quick/{YYYYMMDD}-{slug}/`. Create it.
26
+
27
+ ## Step 3 — Write a starter PLAN.md
28
+
29
+ Copy `templates/quick-PLAN.md` to `{dir}/PLAN.md`, substituting
30
+ `{{SLUG}}`, `{{TITLE}}` (first line of TASK, sentence case), `{{DESCRIPTION}}`
31
+ (full TASK), `{{DATE}}` (today).
32
+
33
+ ## Step 4 — Resolve the plan skill (light)
34
+
35
+ Run `npx cp doctor`. Resolve role `plan`.
36
+
37
+ For quick tasks we want a LIGHTER plan than full phases. Two options:
38
+
39
+ - (preferred) Invoke the provider's `plan` skill but instruct it to produce a
40
+ short plan (3–7 tasks max). Save into `{dir}/PLAN.md` (replace the
41
+ `## Approach` and `## Tasks` sections).
42
+ - If the provider's plan skill is unavailable: ask the user 2-3 clarifying
43
+ questions, then write a short task list inline.
44
+
45
+ Confirm the plan with the user before executing.
46
+
47
+ ## Step 5 — Execute
48
+
49
+ Resolve role `execute`.
50
+
51
+ - Preferred: provider's `execute` (Superpowers' `subagent-driven-development`
52
+ or `executing-plans` — whichever the provider config maps).
53
+ - Manual: drive task-by-task inline; commit each atomically.
54
+
55
+ Each task should produce a commit. Use Conventional Commits, prefixed with
56
+ `(quick: {slug}) `.
57
+
58
+ ## Step 6 — Write SUMMARY.md
59
+
60
+ When done, copy `templates/quick-SUMMARY.md` to `{dir}/SUMMARY.md`. Fill in:
61
+
62
+ - `{{SLUG}}`, `{{TITLE}}`, `{{ONE_LINER}}` (substantive!),
63
+ - `{{CREATED}}` from PLAN.md frontmatter, `{{COMPLETED}}` = now,
64
+ `{{DURATION_MIN}}` = diff,
65
+ - `{{PROVIDER}}` from cp-config,
66
+ - "What Changed" — files from `git diff --name-only {start_sha}..HEAD`,
67
+ - "Commits" — `git log --oneline {start_sha}..HEAD`.
68
+
69
+ Update PLAN.md frontmatter: `status: complete`.
70
+
71
+ ## Step 7 — Update STATE.md (lightly)
72
+
73
+ Quick tasks don't move the phase/plan counters. They only update:
74
+
75
+ - `Last activity:` = `today — quick task: {slug}`
76
+ - `Last session` / `Stopped at` in Session Continuity
77
+ - Append a row to the `## Quick Tasks Completed` table:
78
+ `| {YYYY-MM-DD} | {slug} | {one-liner} |`
79
+
80
+ The Quick Tasks Completed table is created by `cp init` and is
81
+ GSD-compatible (GSD's STATE.md template has the same section).
82
+
83
+ ## Step 8 — Commit and report
84
+
85
+ ```
86
+ cp: quick task — {slug}
87
+ ```
88
+
89
+ Print:
90
+ ```
91
+ ✓ Quick task complete: {slug}
92
+ {one-liner}
93
+ {N} commits, {M} files
94
+ SUMMARY: {dir}/SUMMARY.md
95
+ ```
96
+
97
+ ## Notes
98
+
99
+ - Quick tasks live OUTSIDE the phase/roadmap structure on purpose.
100
+ - Use a `--full` style of provider invocation (review + verification) ONLY
101
+ if the user passed `--full` in $ARGUMENTS.
102
+ - Resume support: if PLAN.md frontmatter shows `status: in-progress` when
103
+ `/cp-quick resume <slug>` is invoked, continue from where execution left
104
+ off rather than re-planning.
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: cp-resume
3
+ description: Restore mid-task context from .continue-here.md (if present) or STATE.md, then keep going.
4
+ argument-hint: ""
5
+ requires: [cp-progress, cp-execute-phase]
6
+ ---
7
+
8
+ # /cp-resume
9
+
10
+ You are running `cp-resume`. The user stopped in the middle of something and
11
+ wants to pick it back up. Your job is to **restore enough context to keep
12
+ going**, then either continue the active plan or hand off to the right
13
+ follow-up command.
14
+
15
+ ## Step 1 — Load planning context
16
+
17
+ Read in this order (each only if it exists):
18
+
19
+ 1. `.planning/.continue-here.md` — GSD-shape mid-task handoff note (highest
20
+ priority signal: the previous session wrote it intentionally).
21
+ 2. `.planning/STATE.md` — current position + last activity.
22
+ 3. `.planning/ROADMAP.md` — to translate STATE position into the
23
+ actual phase / plan that's in progress.
24
+ 4. `.planning/MILESTONE-CONTEXT.md` — current milestone goal, if any.
25
+ 5. The PLAN.md for the in-progress plan (derived from STATE.md + ROADMAP).
26
+
27
+ ## Step 2 — Identify the in-progress unit of work
28
+
29
+ There are three cases. Try them in order:
30
+
31
+ **(A) `.continue-here.md` exists**
32
+ - Trust it as the source of truth. Parse it for:
33
+ - "Stopped at" line (a free-form description of where work paused)
34
+ - Any "Next" / "TODO" bullet list
35
+ - File pointers (PLAN.md, code files mid-edit)
36
+ - This is GSD-compatible; format the file with the same shape so GSD's
37
+ `gsd-resume-work` will read it after a switch back.
38
+
39
+ **(B) STATE.md `Status:` is `In progress`**
40
+ - Use `Phase:` + `Plan:` from STATE.md to compute the active PLAN file:
41
+ - `lib/paths.findPhaseDir(phaseNum)` → phase dir
42
+ - filename `{phasePlanPrefix}-PLAN.md`
43
+ - Read that PLAN.md's frontmatter. If `status: in-progress`, find the first
44
+ `<task>` block whose `<done>` criteria are not yet met (best-effort
45
+ heuristic: agent should re-check via `<verify>` commands).
46
+
47
+ **(C) Nothing in progress**
48
+ - Fall through to `/cp-progress`'s recommended next action (the next pending
49
+ plan in the lowest-numbered phase).
50
+
51
+ ## Step 3 — Verify the workspace
52
+
53
+ Before suggesting the user keep going, sanity check:
54
+
55
+ - `git status` — uncommitted changes? Show them; ask if the user wants them
56
+ before resuming (they may be the partial work from the previous session).
57
+ - Run the PLAN.md's `<verify>` for any task marked `done` to confirm the
58
+ reported state matches reality. If a `done` task no longer passes verify,
59
+ flag it.
60
+ - If a plan claims `wave > 1` and `depends_on` includes a plan id, confirm
61
+ that prerequisite plan is checked in ROADMAP.md. If not, surface the
62
+ ordering issue.
63
+
64
+ ## Step 4 — Restore context to the user
65
+
66
+ Print:
67
+
68
+ ```
69
+ cp resume
70
+ ─────────
71
+
72
+ Project: {project name}
73
+ Milestone: {milestone name or "(none)"}
74
+
75
+ Resuming: Phase {N} ({phase name}), plan {phase-plan id}
76
+ Stopped at: {one-line summary from .continue-here.md or STATE.md "Last activity"}
77
+
78
+ Verified:
79
+ ✓ {task X is still passing}
80
+ ✗ {task Y now fails — needs re-investigation}
81
+ ? {task Z has no <verify> — skipped}
82
+
83
+ Uncommitted changes:
84
+ {git status --short output, or "(clean)"}
85
+
86
+ Plan file: .planning/phases/{phase-dir}/{phase}-{plan}-PLAN.md
87
+
88
+ Next action:
89
+ {pick the first unfinished <task> in PLAN.md and quote its <name>}
90
+
91
+ Run:
92
+ /cp-execute-phase {N} # continue automated execution
93
+ # or work this task manually and re-invoke /cp-resume when done
94
+ ```
95
+
96
+ ## Step 5 — Update STATE.md (Session Continuity only)
97
+
98
+ Write back to STATE.md `## Session Continuity` only — do not touch other
99
+ sections:
100
+
101
+ - `Last session: {today's date}`
102
+ - `Stopped at: {one-line summary}` (kept from previous if unchanged)
103
+ - `Resume file: .planning/.continue-here.md` (if it exists) or `(none)`
104
+
105
+ Use `lib/state.updateSessionContinuity`.
106
+
107
+ ## Step 6 — Hand off or stop
108
+
109
+ If the user wants automatic continuation and the active plan's `autonomous`
110
+ frontmatter is `true`, invoke `/cp-execute-phase N` directly.
111
+
112
+ If `autonomous: false` (checkpointed plan) or the user wants control, stop
113
+ here and let them drive.
114
+
115
+ ## Notes
116
+
117
+ - This command MAY write only to STATE.md `## Session Continuity` and
118
+ optionally `.planning/.continue-here.md` (to refresh "Resumed at"). It MUST
119
+ NOT modify ROADMAP.md, PROJECT.md, or any PLAN.md / SUMMARY.md.
120
+ - `.continue-here.md` is GSD-shaped — keep the same headings GSD writes:
121
+ `## Stopped at`, `## Next`, `## Context`.
122
+ - If `cp.behavior.atomic_commits` is true and you wrote to STATE.md, commit:
123
+ ```
124
+ cp: resume — session restored
125
+ ```
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: cp-write-summary
3
+ description: Write a phase SUMMARY from JSON frontmatter and optional markdown body.
4
+ argument-hint: "<plan-id> --from <json> [--body <md>] [--overwrite] [--dry-run]"
5
+ requires: []
6
+ ---
7
+
8
+ # /cp-write-summary
9
+
10
+ ## Required keys (v0.7 hard-block)
11
+
12
+ - `key-decisions`: **REQUIRED**. Array with ≥1 entry. Each entry is one
13
+ sentence describing a non-trivial decision made during the plan
14
+ (architecture, library choice, trade-off, deferred work, etc.).
15
+ Trivial / mechanical steps do not count.
16
+
17
+ The cp CLI exits with code 2 and prints the following exact message if
18
+ this constraint is violated:
19
+
20
+ Error: 'key-decisions' is required and must have ≥1 entry. See spec at
21
+ docs/superpowers/specs/2026-05-20-v0-7-design-capture-design.md
22
+
23
+ If a plan genuinely had no decisions worth recording (e.g. a typo fix),
24
+ note that explicitly: `key-decisions: ['mechanical edits only — no design decisions']`.
25
+
26
+ Use `cp write-summary` to write `{plan-id}-SUMMARY.md` into the phase directory.
27
+ Pass frontmatter JSON with `--from`; optionally supply markdown body content with
28
+ `--body`. Use `--dry-run` to preview the normalised frontmatter and `--overwrite`
29
+ to replace an existing summary.
30
+
31
+ ```bash
32
+ cp write-summary 16-03 --from summary.json --body summary-body.md
33
+ ```
@@ -0,0 +1,140 @@
1
+ # Migrating to cp v0.5
2
+
3
+ ## What changed
4
+
5
+ v0.5 restructures provider detection from hardcoded literal sentinel
6
+ matching to a data-driven **harnesses × providers** cross-product.
7
+ Adding a new harness (AI editor) or workflow provider is now a config-only
8
+ edit — no code changes needed.
9
+
10
+ ## Automatic migration
11
+
12
+ **Most users don't need to do anything.** The first time any `cp` command
13
+ runs in your project after upgrading to v0.5, `loadConfig()` automatically:
14
+
15
+ 1. Bumps `cp.version` from 1 to 2.
16
+ 2. Adds the `cp.harnesses` block (4 harnesses with `plugin_roots`).
17
+ 3. Adds `plugin_shape` to the `superpowers` provider.
18
+ 4. Adds the `echo-provider` schema-test stub.
19
+ 5. Unions any new sentinels into `cp.providers.*.detect.any_of`.
20
+ 6. Fills missing `behavior.*` keys.
21
+
22
+ A one-line notice is printed to stderr:
23
+ ```
24
+ cp: refreshed .planning/config.json with schema v1 → v2, new harness 'copilot', ...
25
+ ```
26
+
27
+ The merge is **purely additive** — your existing config values are never
28
+ overwritten or removed. Second invocation is a no-op.
29
+
30
+ ## Manual migration (optional)
31
+
32
+ If you prefer explicit control:
33
+
34
+ ```bash
35
+ # Preview what would change
36
+ cp config refresh --dry-run
37
+
38
+ # Apply
39
+ cp config refresh
40
+ ```
41
+
42
+ ## Before / after config shape
43
+
44
+ ### v0.4.x (schema v1)
45
+
46
+ ```json
47
+ {
48
+ "cp": {
49
+ "version": 1,
50
+ "workflow_provider": "superpowers",
51
+ "providers": {
52
+ "superpowers": {
53
+ "detect": {
54
+ "any_of": [".claude/plugins/superpowers", "..."]
55
+ },
56
+ "skills": { "brainstorm": "brainstorming", "..." }
57
+ },
58
+ "manual": { "..." }
59
+ },
60
+ "behavior": { "atomic_commits": true, "..." }
61
+ }
62
+ }
63
+ ```
64
+
65
+ ### v0.5.0 (schema v2)
66
+
67
+ ```json
68
+ {
69
+ "cp": {
70
+ "version": 2,
71
+ "workflow_provider": "superpowers",
72
+
73
+ "harnesses": {
74
+ "copilot": {
75
+ "description": "GitHub Copilot CLI",
76
+ "plugin_roots": ["~/.copilot/installed-plugins/*/"]
77
+ },
78
+ "claude": {
79
+ "description": "Claude Code",
80
+ "plugin_roots": ["~/.claude/plugins/", "~/.claude/skills/"]
81
+ },
82
+ "cursor": {
83
+ "description": "Cursor",
84
+ "plugin_roots": ["~/.cursor/extensions/*/"]
85
+ },
86
+ "aider": {
87
+ "description": "Aider (file-based, no plugin slot today)",
88
+ "plugin_roots": []
89
+ }
90
+ },
91
+
92
+ "providers": {
93
+ "superpowers": {
94
+ "plugin_shape": {
95
+ "dir_name": "superpowers",
96
+ "required_subdirs": ["skills/writing-plans", "skills/subagent-driven-development"]
97
+ },
98
+ "detect": { "any_of": ["... (8 sentinels, was 5 in v0.4.4)"] },
99
+ "skills": { "..." }
100
+ },
101
+ "echo-provider": {
102
+ "description": "Schema-test stub. Echoes the role name.",
103
+ "plugin_shape": { "dir_name": "echo-provider", "required_subdirs": [] },
104
+ "detect": { "any_of": [".planning/providers/echo-provider"] },
105
+ "skills": { "brainstorm": "echo", "..." }
106
+ },
107
+ "manual": { "..." }
108
+ },
109
+ "behavior": { "..." }
110
+ }
111
+ }
112
+ ```
113
+
114
+ ## `cp doctor` output changes
115
+
116
+ v0.5 rewrites the doctor output into 5 sections:
117
+
118
+ 1. **Harnesses detected** — which AI editors have plugins installed
119
+ 2. **Providers detected** — which workflow providers were found, and via which harness
120
+ 3. **Configured workflow_provider** — what's active, with switch hint
121
+ 4. **Roles → resolved skill** — same as before, with harness annotation
122
+ 5. **GSD compatibility** — unchanged
123
+
124
+ New flags: `--json` (machine-parsable), `--quiet` (configured + roles only).
125
+
126
+ ## Removing local workarounds
127
+
128
+ If you manually added `installed-plugins/superpowers-marketplace/superpowers`
129
+ to your project's `.planning/config.json` `detect.any_of` as a workaround
130
+ for the v0.4.4 detection bug, you can now remove it — the auto-heal merge
131
+ adds it from upstream defaults. Run `cp config refresh --dry-run` to verify.
132
+
133
+ ## New commands
134
+
135
+ | Command | Description |
136
+ |---|---|
137
+ | `cp config refresh [--dry-run]` | Re-sync local config with upstream defaults |
138
+ | `cp install echo-provider` | Install the schema-test stub provider |
139
+ | `cp doctor --json` | Machine-parsable detection report |
140
+ | `cp doctor --quiet` | Minimal: configured + roles only |