@codename_inc/spectre 5.2.1 → 5.3.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 (76) hide show
  1. package/package.json +2 -2
  2. package/plugins/spectre/.claude-plugin/plugin.json +1 -1
  3. package/plugins/spectre/hooks/scripts/load-knowledge.mjs +14 -3
  4. package/plugins/spectre/hooks/scripts/register_learning.mjs +8 -1
  5. package/plugins/spectre/hooks/scripts/test_load-knowledge.mjs +4 -4
  6. package/plugins/spectre/hooks/scripts/test_register-learning.mjs +2 -2
  7. package/plugins/spectre/skills/{apply → spectre-apply}/SKILL.md +3 -3
  8. package/plugins/spectre/skills/{architecture_review → spectre-architecture_review}/SKILL.md +1 -1
  9. package/plugins/spectre/skills/{clean → spectre-clean}/SKILL.md +1 -1
  10. package/plugins/spectre/skills/{code_review → spectre-code_review}/SKILL.md +1 -1
  11. package/plugins/spectre/skills/{create_plan → spectre-create_plan}/SKILL.md +32 -8
  12. package/plugins/spectre/skills/{create_tasks → spectre-create_tasks}/SKILL.md +1 -1
  13. package/plugins/spectre/skills/{create_test_guide → spectre-create_test_guide}/SKILL.md +1 -1
  14. package/plugins/spectre/skills/{evaluate → spectre-evaluate}/SKILL.md +3 -3
  15. package/plugins/spectre/skills/{execute → spectre-execute}/SKILL.md +3 -3
  16. package/plugins/spectre/skills/{fix → spectre-fix}/SKILL.md +1 -1
  17. package/plugins/spectre/skills/{forget → spectre-forget}/SKILL.md +1 -1
  18. package/plugins/spectre/skills/{guide → spectre-guide}/SKILL.md +1 -1
  19. package/plugins/spectre/skills/{handoff → spectre-handoff}/SKILL.md +1 -1
  20. package/plugins/spectre/skills/{kickoff → spectre-kickoff}/SKILL.md +1 -1
  21. package/plugins/spectre/skills/{learn → spectre-learn}/SKILL.md +2 -2
  22. package/plugins/spectre/skills/{plan → spectre-plan}/SKILL.md +39 -13
  23. package/plugins/spectre/skills/{plan_review → spectre-plan_review}/SKILL.md +36 -6
  24. package/plugins/spectre/skills/{prototype → spectre-prototype}/SKILL.md +1 -1
  25. package/plugins/spectre/skills/{quick_dev → spectre-quick_dev}/SKILL.md +1 -1
  26. package/plugins/spectre/skills/{rebase → spectre-rebase}/SKILL.md +1 -1
  27. package/plugins/spectre/skills/spectre-recall/SKILL.md +22 -0
  28. package/plugins/spectre/skills/{research → spectre-research}/SKILL.md +1 -1
  29. package/plugins/spectre/skills/{scope → spectre-scope}/SKILL.md +1 -1
  30. package/plugins/spectre/skills/{ship → spectre-ship}/SKILL.md +1 -1
  31. package/plugins/spectre/skills/{sweep → spectre-sweep}/SKILL.md +1 -1
  32. package/plugins/spectre/skills/{tdd → spectre-tdd}/SKILL.md +1 -1
  33. package/plugins/spectre/skills/{test → spectre-test}/SKILL.md +1 -1
  34. package/plugins/spectre/skills/{ux → spectre-ux}/SKILL.md +1 -1
  35. package/plugins/spectre/skills/{validate → spectre-validate}/SKILL.md +1 -1
  36. package/plugins/spectre-codex/hooks/scripts/load-knowledge.mjs +14 -3
  37. package/plugins/spectre-codex/hooks/scripts/register_learning.mjs +8 -1
  38. package/plugins/spectre-codex/skills/{apply → spectre-apply}/SKILL.md +3 -3
  39. package/plugins/spectre-codex/skills/{architecture_review → spectre-architecture_review}/SKILL.md +1 -1
  40. package/plugins/spectre-codex/skills/{clean → spectre-clean}/SKILL.md +1 -1
  41. package/plugins/spectre-codex/skills/{code_review → spectre-code_review}/SKILL.md +1 -1
  42. package/plugins/spectre-codex/skills/{create_plan → spectre-create_plan}/SKILL.md +32 -8
  43. package/plugins/spectre-codex/skills/{create_tasks → spectre-create_tasks}/SKILL.md +1 -1
  44. package/plugins/spectre-codex/skills/{create_test_guide → spectre-create_test_guide}/SKILL.md +1 -1
  45. package/plugins/spectre-codex/skills/{evaluate → spectre-evaluate}/SKILL.md +3 -3
  46. package/plugins/spectre-codex/skills/{execute → spectre-execute}/SKILL.md +3 -3
  47. package/plugins/spectre-codex/skills/{fix → spectre-fix}/SKILL.md +1 -1
  48. package/plugins/spectre-codex/skills/{forget → spectre-forget}/SKILL.md +1 -1
  49. package/plugins/spectre-codex/skills/{guide → spectre-guide}/SKILL.md +81 -81
  50. package/plugins/spectre-codex/skills/{handoff → spectre-handoff}/SKILL.md +1 -1
  51. package/plugins/spectre-codex/skills/{kickoff → spectre-kickoff}/SKILL.md +7 -7
  52. package/plugins/spectre-codex/skills/{learn → spectre-learn}/SKILL.md +2 -2
  53. package/plugins/spectre-codex/skills/{plan → spectre-plan}/SKILL.md +40 -14
  54. package/plugins/spectre-codex/skills/{plan_review → spectre-plan_review}/SKILL.md +38 -8
  55. package/plugins/spectre-codex/skills/{prototype → spectre-prototype}/SKILL.md +9 -9
  56. package/plugins/spectre-codex/skills/{quick_dev → spectre-quick_dev}/SKILL.md +2 -2
  57. package/plugins/spectre-codex/skills/{rebase → spectre-rebase}/SKILL.md +1 -1
  58. package/plugins/spectre-codex/skills/spectre-recall/SKILL.md +22 -0
  59. package/plugins/spectre-codex/skills/{research → spectre-research}/SKILL.md +1 -1
  60. package/plugins/spectre-codex/skills/{scope → spectre-scope}/SKILL.md +8 -8
  61. package/plugins/spectre-codex/skills/{ship → spectre-ship}/SKILL.md +4 -4
  62. package/plugins/spectre-codex/skills/{sweep → spectre-sweep}/SKILL.md +1 -1
  63. package/plugins/spectre-codex/skills/{tdd → spectre-tdd}/SKILL.md +1 -1
  64. package/plugins/spectre-codex/skills/{test → spectre-test}/SKILL.md +1 -1
  65. package/plugins/spectre-codex/skills/{ux → spectre-ux}/SKILL.md +6 -6
  66. package/plugins/spectre-codex/skills/{validate → spectre-validate}/SKILL.md +1 -1
  67. package/src/config.test.js +1 -1
  68. package/src/install.test.js +10 -6
  69. package/src/lib/constants.js +9 -9
  70. package/src/lib/install.js +29 -1
  71. package/src/lib/knowledge.js +7 -5
  72. package/src/pack.test.js +1 -1
  73. package/plugins/spectre/skills/recall/SKILL.md +0 -17
  74. package/plugins/spectre-codex/skills/recall/SKILL.md +0 -17
  75. /package/plugins/spectre/skills/{learn → spectre-learn}/references/recall-template.md +0 -0
  76. /package/plugins/spectre-codex/skills/{learn → spectre-learn}/references/recall-template.md +0 -0
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plan_review
2
+ name: spectre-plan_review
3
3
  description: 👻 | Independent multi-lens review of plan.md and/or tasks.md — finds overengineering, missing verification, hallucinated deps, weak references
4
4
  user-invocable: true
5
5
  ---
@@ -16,8 +16,15 @@ Treat the current command arguments as this workflow's input. When invoked from
16
16
 
17
17
  - **What** — Independent review of any available planning artifacts (`plan.md`, `tasks.md`, and optional `task_context.md`) from four specialized lenses, dispatched in parallel
18
18
  - **Outcome** — Structured findings with concrete edit suggestions; optional write-back to update the available artifacts
19
+ - **Artifact** — Always save a Markdown review report before any write-back so pre-integration findings are auditable
19
20
  - **Role** — Senior staff engineer + reviewer panel; bias toward pragmatic problem-solving, YAGNI enforcement, and verifiability
20
21
 
22
+ ## Canonical Scope Invariant
23
+
24
+ `concepts/scope.md` is canonical when present. If absent, use `specs/prd.md`, `specs/ux.md`, and explicit requirements in `task_context.md` as the scope source, in that order.
25
+
26
+ Reviewers may recommend deleting unrequested implementation details, unnecessary abstractions, weak verification, hallucinated references, bad dependencies, or task sequencing problems. They MUST NOT cut, narrow, expand, or reinterpret agreed scope. If a reviewer believes the agreed scope itself is too large, internally inconsistent, or missing a requirement, phrase that as a **Scope Change Required** recommendation for the user. Do not apply it to `plan.md` or `tasks.md` during write-back.
27
+
21
28
  ## ARGUMENTS Input
22
29
 
23
30
  <ARGUMENTS>
@@ -46,12 +53,15 @@ A single reviewer biases toward the issues it notices first. Published practice
46
53
  - `PLAN=${TASK_DIR}/specs/plan.md` (or scoped name)
47
54
  - `TASKS=${TASK_DIR}/specs/tasks.md` (or scoped name)
48
55
  - `CONTEXT=${TASK_DIR}/task_context.md`
56
+ - `SCOPE=${TASK_DIR}/concepts/scope.md` when present; otherwise use `specs/prd.md` / `specs/ux.md` as available
57
+ - `REVIEWS_DIR=${TASK_DIR}/reviews`
58
+ - `REVIEW_REPORT=${REVIEWS_DIR}/plan_review.md`; if that exists, use `plan_review_{YYYY-MM-DD_HHMMSS}.md` to avoid overwriting prior review evidence.
49
59
  - `plan.md` and `tasks.md` are independently reviewable. It is valid to review only `plan.md`, only `tasks.md`, or both.
50
60
  - `task_context.md` is helpful context but is not required. If it is missing, continue and note that requirements traceability is limited.
51
61
  - If both `plan.md` and `tasks.md` are missing, stop and suggest the user run `/spectre:plan` or `/spectre:create_tasks` first.
52
62
  - If exactly one of `plan.md` or `tasks.md` is missing, list it as absent context and continue. Do not decline, stop, or ask the user to create the missing artifact.
53
63
 
54
- - **Action** — ReadAvailable: Read each available file completely into context before dispatching reviewers. Reviewers receive curated excerpts plus an artifact manifest that says which files are present and absent. Every reviewer must review the artifacts that exist and must not treat absent artifacts as a blocker.
64
+ - **Action** — ReadAvailable: Read each available file completely into context before dispatching reviewers. Reviewers receive curated excerpts plus an artifact manifest that says which files are present and absent. Every reviewer must review the artifacts that exist and must not treat absent artifacts as a blocker. The manifest must label the canonical scope source and state that review findings may not remove or narrow scope.
55
65
 
56
66
  ## Step 2 — Dispatch Four Parallel Reviewers
57
67
 
@@ -64,13 +74,15 @@ Missing-artifact rule for every lens: review what exists. If a finding depends o
64
74
  > Review the available plan and/or task list for unrequested complexity. Agents have a documented "familiar-shape bias": shown a feature, they reproduce the mature-system shape from their training data (auth → adds rate-limiting; CRUD → adds soft-delete; form → adds optimistic UI; service → adds telemetry; module → adds feature flags). Your job is to find that bias here.
65
75
  >
66
76
  > Find:
67
- > 1. When `plan.md` is present: anything in Technical Approach that isn't traceable to a requirement in available context (`task_context.md` / scope / PRD). If context is absent, use the plan's own requirements and boundaries.
77
+ > 1. When `plan.md` is present: anything in Technical Approach that isn't traceable to a requirement in available context (`scope.md` / `task_context.md` / PRD / UX). If context is absent, use the plan's own requirements and boundaries.
68
78
  > 2. When `tasks.md` is present: tasks that implement something the available requirements don't ask for. If requirements context is absent, use the task list's stated goals and boundaries.
69
79
  > 3. Abstractions, interfaces, or layers introduced for a single concrete caller.
70
80
  > 4. Generality (config files, plugin points, factories) where the actual need is one specific behavior.
71
81
  > 5. Overlap with the `Out-of-Bounds — DO NOT add` list (if anything violates that list, it's a hard fail).
72
82
  >
73
- > Required output: nominate the SINGLE highest-leverage thing to delete and justify it. You must pick one. Then list other simplifications ranked by impact. For each finding, cite the exact file:line or section header it lives in.
83
+ > Scope guard: you may nominate implementation detail to delete only when it is not required by canonical scope. Do not nominate an agreed requirement, user-approved behavior, or required task as the thing to delete. If the best "cut" would change canonical scope, label it **Scope Change Required** and do not include it as an auto-applicable deletion.
84
+ >
85
+ > Required output: nominate the SINGLE highest-leverage implementation detail to delete and justify it. You must pick one unless every possible deletion would change canonical scope; in that case, say "No scope-safe deletion found" and provide the nearest Scope Change Required recommendation separately. Then list other simplifications ranked by impact. For each finding, cite the exact file:line or section header it lives in.
74
86
 
75
87
  ### Lens 2 — Verifiability (`@analyst`)
76
88
 
@@ -118,6 +130,7 @@ Missing-artifact rule for every lens: review what exists. If a finding depends o
118
130
  - **High** — meaningfully reduces output quality (missing RED test, weak canonical reference, prose criterion)
119
131
  - **Medium** — overengineering or reuse miss without functional blast radius
120
132
  - **Low** — stylistic or nice-to-have
133
+ - **Scope Change Required** — may be valid feedback, but would cut, expand, or reinterpret canonical scope and therefore needs explicit user approval before any artifact edit
121
134
 
122
135
  - **Action** — RenderFindingsTable: Output a single structured table. Schema is fixed.
123
136
 
@@ -143,11 +156,24 @@ Missing-artifact rule for every lens: review what exists. If a finding depends o
143
156
  - Low: {N}
144
157
  ```
145
158
 
159
+ - **Action** — SaveReviewArtifact: Before applying any edits to `plan.md` or `tasks.md`, save the pre-integration review findings as a Markdown report.
160
+ - Create `${REVIEWS_DIR}` if missing.
161
+ - Write `${REVIEW_REPORT}` using the RenderFindingsTable content plus:
162
+ - Reviewed artifacts: exact plan/tasks/context/scope paths present and absent.
163
+ - Canonical scope source used.
164
+ - Auto-apply mode: enabled/disabled.
165
+ - Timestamp.
166
+ - Explicit note: "This report captures plan_review findings before any write-back to plan.md or tasks.md."
167
+ - Do not overwrite an existing report. Use the timestamped filename if the default already exists.
168
+ - Include the saved report path in all subsequent summaries and in `ReportApplied`.
169
+
146
170
  ## Step 4 — Surface Findings & Apply Edits
147
171
 
148
- - **Action** — PresentFindings: Render the findings table inline.
172
+ - **Action** — PresentFindings: Render the findings table inline and include `Review report saved: {REVIEW_REPORT}`.
173
+
174
+ - **Action** — DetectAutoApplyMode: If ARGUMENTS contains `--auto-apply scope-safe`, skip the user selection prompt and apply all scope-safe Blocker and High findings, plus Medium/Low findings only when the Suggested Edit is unambiguous and cannot change canonical scope. Do not apply findings marked Scope Change Required. Continue to ApplyEdits and SelfCheck, then return the applied/skipped summary to the invoking workflow.
149
175
 
150
- - **Action** — OfferWriteBack: After the table, prompt:
176
+ - **Action** — OfferWriteBack: Unless `--auto-apply scope-safe` is present, after the table prompt:
151
177
 
152
178
  > Reply with which findings to apply:
153
179
  > - `all` — apply every suggested edit
@@ -163,17 +189,21 @@ Missing-artifact rule for every lens: review what exists. If a finding depends o
163
189
  - Open the named artifact (`plan.md` or `tasks.md`)
164
190
  - Apply the Suggested Edit verbatim where possible; if the edit needs adaptation, make the minimum change consistent with the finding's intent
165
191
  - Track which findings were applied
192
+ - Before writing, confirm the edit preserves every requirement and boundary in the canonical scope source. If it would remove, narrow, expand, or reinterpret scope, skip it and record it as "skipped: requires scope change."
166
193
 
167
194
  - **Action** — SelfCheck: After edits, run a fast pass over the modified sections:
168
195
  - Re-verify any file:line refs touched
169
196
  - Re-verify acceptance criteria are still executable
170
197
  - Confirm no edit introduced a new Out-of-Bounds violation
198
+ - Confirm canonical scope is still fully represented by the resulting plan/tasks
171
199
  - If any check fails, surface it and ask the user before continuing
172
200
 
173
201
  - **Action** — ReportApplied:
174
202
 
175
203
  > Applied: {list of finding numbers}. Skipped: {list}.
204
+ > Review report: {REVIEW_REPORT}.
176
205
  > {Path to updated artifact(s)}.
206
+ > Scope-change recommendations not applied: {list or "none"}.
177
207
 
178
208
  ## Step 5 — Next Steps
179
209
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: prototype
2
+ name: spectre-prototype
3
3
  description: 👻 | Generate a self-contained HTML prototype to validate a feature visually before planning - primary agent
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: quick_dev
2
+ name: spectre-quick_dev
3
3
  description: 👻 | Quickly scope, research, & plan s/m tasks - primary agent
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: rebase
2
+ name: spectre-rebase
3
3
  description: 👻 | Safe guided rebase w/conflict handling - primary agent
4
4
  user-invocable: true
5
5
  ---
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: spectre-recall
3
+ description: "👻 | Search Project Knowledge"
4
+ user-invocable: true
5
+ ---
6
+
7
+ # recall
8
+
9
+ ## Input Handling
10
+
11
+ Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded `$ARGUMENTS` value.
12
+
13
+ # /recall - Search Project Knowledge
14
+
15
+ Read the project knowledge recall skill directly, then follow its instructions for the query below:
16
+
17
+ - Claude Code path: `{{project_root}}/.claude/skills/spectre-recall/SKILL.md`
18
+ - Codex path: `{{project_root}}/.agents/skills/spectre-recall/SKILL.md`
19
+
20
+ If neither file exists, report that no project knowledge registry exists yet and suggest `/spectre:learn` after the current work produces something worth preserving.
21
+
22
+ **Search query**: $ARGUMENTS
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: research
2
+ name: spectre-research
3
3
  description: 👻 | Research codebase with parallel agents - primary agent
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: scope
2
+ name: spectre-scope
3
3
  description: 👻 | Interactively scope a feature or improvement, generating a complete Scope document with IN, OUT, and ANTI-SCOPE boundaries -- primary agent
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: ship
2
+ name: spectre-ship
3
3
  description: 👻 | Autonomous end-to-end: brain dump -> scope -> TDD -> commit -> rebase -> PR
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: sweep
2
+ name: spectre-sweep
3
3
  description: 👻 | Light pass cleanup - clean, lint, test, commit
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: tdd
2
+ name: spectre-tdd
3
3
  description: "Load this skill when executing TDD (Test-Driven Development) methodology. Use when implementing features via strict RED-GREEN-REFACTOR cycles, or when a prompt instructs execution via TDD."
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: test
2
+ name: spectre-test
3
3
  description: 👻 | Risk-aware test coverage & commit - primary agent
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: ux
2
+ name: spectre-ux
3
3
  description: 👻 | Define user flows, components, and UX behavior — generates the UX spec for a feature - primary agent
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: validate
2
+ name: spectre-validate
3
3
  description: 👻 | Comprehensive post implementation requirement validation using subagents
4
4
  user-invocable: true
5
5
  ---
@@ -7,7 +7,7 @@
7
7
  * AGENTS.override.md and returns a short visible status line.
8
8
  *
9
9
  * Reads:
10
- * - Apply skill from plugin: skills/apply/SKILL.md
10
+ * - Apply skill from plugin: skills/spectre-apply/SKILL.md
11
11
  * - Registry from project: .agents/skills/spectre-recall/references/registry.toon
12
12
  */
13
13
 
@@ -27,6 +27,13 @@ function resolvePluginSkillPath(pluginRoot, skillName, ...parts) {
27
27
  path.join(pluginRoot, 'skills', skillName, ...parts),
28
28
  path.join(pluginRoot, '..', 'skills', skillName, ...parts),
29
29
  ];
30
+ const legacyBareName = skillName.startsWith('spectre-') ? skillName.slice('spectre-'.length) : null;
31
+ if (legacyBareName) {
32
+ candidates.push(
33
+ path.join(pluginRoot, 'skills', legacyBareName, ...parts),
34
+ path.join(pluginRoot, '..', 'skills', legacyBareName, ...parts)
35
+ );
36
+ }
30
37
 
31
38
  for (const candidate of candidates) {
32
39
  if (fs.existsSync(candidate)) {
@@ -119,7 +126,7 @@ function main() {
119
126
  const projectDir = process.env.CLAUDE_PROJECT_DIR || process.cwd();
120
127
  const pluginRoot = getPluginRoot();
121
128
 
122
- const applySkillPath = resolvePluginSkillPath(pluginRoot, 'apply', 'SKILL.md');
129
+ const applySkillPath = resolvePluginSkillPath(pluginRoot, 'spectre-apply', 'SKILL.md');
123
130
 
124
131
  if (!fs.existsSync(applySkillPath)) {
125
132
  process.exit(0);
@@ -146,7 +153,11 @@ function main() {
146
153
  // Read apply skill and strip frontmatter
147
154
  let applyContent = fs.readFileSync(applySkillPath, 'utf8');
148
155
  applyContent = stripFrontmatter(applyContent);
149
- applyContent = applyContent.replaceAll('.claude/skills/', '.agents/skills/').replaceAll('/spectre:', '');
156
+ applyContent = applyContent
157
+ .replaceAll('.claude/skills/', '.agents/skills/')
158
+ .replace(/\/spectre:([A-Za-z0-9_-]+)/g, (_match, skillName) => {
159
+ return skillName.startsWith('spectre-') ? skillName : `spectre-${skillName}`;
160
+ });
150
161
 
151
162
  if (hasProjectKnowledgeSurface(projectDir, registryPath)) {
152
163
  writeManagedOverride(
@@ -174,6 +174,13 @@ function resolvePluginSkillPath(pluginRoot, skillName, ...parts) {
174
174
  path.join(pluginRoot, 'skills', skillName, ...parts),
175
175
  path.join(pluginRoot, '..', 'skills', skillName, ...parts),
176
176
  ];
177
+ const legacyBareName = skillName.startsWith('spectre-') ? skillName.slice('spectre-'.length) : null;
178
+ if (legacyBareName) {
179
+ candidates.push(
180
+ path.join(pluginRoot, 'skills', legacyBareName, ...parts),
181
+ path.join(pluginRoot, '..', 'skills', legacyBareName, ...parts)
182
+ );
183
+ }
177
184
 
178
185
  for (const candidate of candidates) {
179
186
  if (fs.existsSync(candidate)) {
@@ -228,7 +235,7 @@ function main() {
228
235
  // Script is at: <plugin_root>/hooks/scripts/register_learning.mjs
229
236
  pluginRoot = path.resolve(__dirname, '..', '..');
230
237
  }
231
- const templatePath = resolvePluginSkillPath(pluginRoot, 'learn', 'references', 'recall-template.md');
238
+ const templatePath = resolvePluginSkillPath(pluginRoot, 'spectre-learn', 'references', 'recall-template.md');
232
239
 
233
240
  // Ensure directories exist
234
241
  fs.mkdirSync(registryDir, { recursive: true });
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "apply"
2
+ name: "spectre-apply"
3
3
  description: "Use when starting implementation, debugging, or feature work on a project with captured knowledge."
4
4
  user-invocable: false
5
5
  ---
@@ -21,7 +21,7 @@ DO NOT search the codebase or dispatch agents BEFORE loading relevant knowledge
21
21
 
22
22
  **When a command explicitly tells you to load a skill, you MUST call the Skill tool to load it.** Do not improvise the workflow based on what you think the skill does. The skill defines a specific workflow with precise steps, output formats, file locations, and integrations. Your improvised version will be wrong.
23
23
 
24
- **You are also responsible for keeping knowledge current.** After completing significant work, proactively check whether loaded skills need updating and whether new skills should be captured via `Skill(learn)`. Do NOT wait for the user to ask.
24
+ **You are also responsible for keeping knowledge current.** After completing significant work, proactively check whether loaded skills need updating and whether new skills should be captured via `Skill(spectre-learn)`. Do NOT wait for the user to ask.
25
25
  </CRITICAL>
26
26
 
27
27
  ## Path Convention
@@ -49,7 +49,7 @@ The registry at `{{project_root}}/.agents/skills/spectre-recall/references/regis
49
49
  After completing work, check:
50
50
 
51
51
  1. **Loaded skill now outdated?** → Update it immediately
52
- 2. **Discovered something capture-worthy?** (gotcha, pattern, decision) → Capture via `Skill(learn)`
52
+ 2. **Discovered something capture-worthy?** (gotcha, pattern, decision) → Capture via `Skill(spectre-learn)`
53
53
  3. **Changed key files, flows, or architecture?** → Update the relevant feature skill
54
54
  4. **Made a decision with non-obvious rationale?** → Capture before the session ends
55
55
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "architecture_review"
2
+ name: "spectre-architecture_review"
3
3
  description: "👻 | Conduct principal architecture review"
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "clean"
2
+ name: "spectre-clean"
3
3
  description: "👻 | Complete cleanup flow - clean, inspect, lint, test - primary agent"
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "code_review"
2
+ name: "spectre-code_review"
3
3
  description: "👻 | Independent LLM Code Review - subagent"
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "create_plan"
2
+ name: "spectre-create_plan"
3
3
  description: "👻 | Create implementation plan from PRD - primary agent"
4
4
  user-invocable: true
5
5
  ---
@@ -27,6 +27,7 @@ Treat the current command arguments as this workflow's input. When invoked from
27
27
  - **Action** — CheckExistingResearch: Check if technical research already completed.
28
28
  - Read `TASK_DIR/task_context.md`; look for "## Technical Research" section.
29
29
  - **If** found with comprehensive analysis → use existing research; skip to Step 3.
30
+ - **If** ARGUMENTS contains `--depth light` and `TASK_DIR/task_context.md` already contains substantive router research (file locations, code understanding, codebase patterns, and impact summary) → use existing research; skip to Step 3.
30
31
  - **Else** → proceed with new research below.
31
32
  - **Action** — AutomatedResearch: Spawn parallel research agents for comprehensive analysis.
32
33
  - Use `@finder` to find all files related to feature area.
@@ -61,6 +62,8 @@ Treat the current command arguments as this workflow's input. When invoked from
61
62
 
62
63
  Dynamically generate up to 10 technical questions based on research findings. **IMPORTANT**: Only ask questions genuinely not answered in the PRD or discoverable through code investigation. Goal: eliminate scope and design ambiguity. If a question involves choosing between approaches, present options with Pros/Cons/Trade-offs.
63
64
 
65
+ - **Action** — LightModeClarifications: If ARGUMENTS contains `--depth light`, do NOT stop for user clarifications. Use conservative, codebase-consistent defaults and record them in the plan's **Filled Assumptions** section, then skip to Step 3. If an unresolved question would affect canonical scope, security/privacy, data correctness, or public API behavior, return control to `plan` with a tier reassessment recommendation instead of guessing.
66
+
64
67
  - **Action** — DetectClarificationMethod: Check if `AskUserQuestion` tool is available.
65
68
  - **If available** → use inline clarification flow (Path A).
66
69
  - **If not available** → use file-based clarification flow (Path B).
@@ -94,16 +97,17 @@ Dynamically generate up to 10 technical questions based on research findings. **
94
97
  - **Action** — DetermineDepth: Read `--depth` from ARGUMENTS
95
98
 
96
99
  - Default: `standard` if not specified
97
- - Options: `standard`, `comprehensive`
100
+ - Options: `light`, `standard`, `comprehensive`
101
+ - **Action** — DetectOrchestratedMode: If ARGUMENTS contains `--no-review`, this workflow is being invoked by `plan` as part of the meta-flow. Generate and save the plan, then return control to `plan` without asking for standalone user review.
98
102
 
99
103
  - **Action** — DesignTechnicalApproach: Create the implementation plan.
100
104
 
101
- Every plan, regardless of depth, MUST include these seven sections. They are the verification spine without them, downstream agents cannot self-check their work.
105
+ Every plan, regardless of depth, MUST include the verification spine. LIGHT is concise, not shallow: keep it brief and decisive, but still explain the solution shape, codebase pattern to follow, risks/assumptions, and how the work will be verified.
102
106
 
103
- **Required for both STANDARD and COMPREHENSIVE:**
107
+ **Required for LIGHT, STANDARD, and COMPREHENSIVE:**
104
108
  1. **Overview** — 1–2 paragraphs: what problem, what shape the solution takes, why this approach.
105
109
  2. **Technical Approach** — How the change actually lands: components touched, data flow, key decisions with rationale. Reference existing patterns from `@patterns` research by file:line (e.g., "follow the shape of `src/widgets/HotDogWidget.ts:42` for the registration step").
106
- 3. **Critical Files for Implementation** — 3–7 specific files from research. Format: `path/to/file.ts` — *reason* (Core logic to modify / Pattern to follow / Interface to implement / Test to extend). No guesses — only files surfaced during Step 1 research.
110
+ 3. **Critical Files for Implementation** — 1–7 specific files from research. Format: `path/to/file.ts` — *reason* (Core logic to modify / Pattern to follow / Interface to implement / Test to extend). No guesses — only files surfaced during Step 1 research.
107
111
  4. **External Dependencies — Verify Before Implementation** — Every third-party package required, with exact version and a one-line existence check. Format: `package@1.2.3 — verify: npm view package@1.2.3` (or pip equivalent). Required even if "no new packages" (write that explicitly). This is the slopsquatting fence: ~20% of AI-suggested packages don't exist; we catch that here, not in production.
108
112
  5. **Verification — How We Know This Works** — For each major change in Technical Approach, 1–3 falsifiable signals: a test name, an observable behavior, or a state/file condition. Prose like "the feature works" is not acceptable — it must be checkable. Format: `<change> → verifies by: <test name | observable behavior | state condition>`. These become acceptance criteria in `create_tasks` downstream.
109
113
  6. **Out-of-Bounds — DO NOT add** — 4–8 concrete things the implementation must NOT add, even if "best practice." Examples: rate limiting, retry/backoff, caching layer, optimistic UI, soft-delete, telemetry events, feature flags, admin UI. This is the YAGNI fence against familiar-shape bias (agents reproduce mature-system patterns unprompted). Be specific to this feature, not generic.
@@ -111,6 +115,12 @@ Dynamically generate up to 10 technical questions based on research findings. **
111
115
  - *Risks*: what could go wrong (e.g., concurrent write race, migration ordering, third-party rate limit). Each with a one-line mitigation or "accept and monitor."
112
116
  - *Filled Assumptions*: things the plan defaulted because the spec didn't say (e.g., "Assumed Postgres; spec didn't specify DB." "Assumed retry count = 0; spec didn't mention failure modes."). Reviewer-visible by design — these are the silent decisions that bite at execution.
113
117
 
118
+ **LIGHT constraints:**
119
+ - Keep the seven required sections compact: usually 1 short paragraph or 3–5 bullets per section.
120
+ - Prefer one clear implementation path that follows existing codebase patterns; do not enumerate broad alternatives.
121
+ - Do not add standalone clarification gates, review gates, plan_review, or expanded architecture sections.
122
+ - If the plan needs more than 3 critical files, a new abstraction, data migration, public API change, or unresolved scope/security/data correctness decision, stop and return a tier reassessment recommendation to `plan`.
123
+
114
124
  **COMPREHENSIVE additionally requires:**
115
125
  8. **Current State** — How the affected code path works today, with file:line refs. Anchored to research findings.
116
126
  9. **Implementation Phases** — Ordered phases, each with its own Verification subsection (Phase N succeeds when …). Phases must be sequenced by dependency, not by file. Migration phases come before consumer phases.
@@ -125,14 +135,28 @@ Dynamically generate up to 10 technical questions based on research findings. **
125
135
 
126
136
  - **Action** — RequestReview:
127
137
 
128
- > "Implementation plan saved to `{path}`. Review and reply with feedback or 'Approved' to proceed."
138
+ - **If `--no-review` is present**:
139
+
140
+ > "Draft implementation plan saved to `{path}`. Returning to `plan` for the next routed step."
141
+
142
+ Do NOT wait for user approval. Return control to the invoking `plan` workflow.
143
+
144
+ - **Else**:
129
145
 
130
- - **Wait** User provides feedback or approval
146
+ > "Implementation plan saved to `{path}`. Review and reply with feedback or 'Approved' to proceed."
147
+
148
+ - **Wait** — User provides feedback or approval, unless `--no-review` is present.
131
149
 
132
150
  ## Step (4/4) - Finalize and Present Next Steps
133
151
 
134
152
  - **Action** — ConfirmCompletion:
135
153
 
154
+ - **If `--no-review` is present**:
155
+
156
+ > "Draft implementation plan saved to `{plan_path}`. Returning to `plan`."
157
+
158
+ Stop here. Do not render the standalone Next Steps footer.
159
+
136
160
  > "🎯 Implementation Planning Complete. Documents: {plan_path}, task_context.md"
137
161
 
138
- - **Action** — RenderFooter: Use `Skill(spectre-guide)` skill for Next Steps footer
162
+ - **Action** — RenderFooter: Use `Skill(spectre-guide)` skill for Next Steps footer
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "create_tasks"
2
+ name: "spectre-create_tasks"
3
3
  description: "👻 | Transform requirements into executable tasks - primary agent"
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "create_test_guide"
2
+ name: "spectre-create_test_guide"
3
3
  description: "👻 | Generate right-sized manual test guides - primary agent"
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "evaluate"
2
+ name: "spectre-evaluate"
3
3
  description: "👻 | Architecture review + knowledge capture"
4
4
  user-invocable: true
5
5
  ---
@@ -27,7 +27,7 @@ $ARGUMENTS
27
27
 
28
28
  This command runs two activities in parallel:
29
29
 
30
- 1. **Architecture Review** — dispatched as a background Opus 4.6 subagent via `Skill(architecture_review)` (Claude slash route: `architecture_review`)
30
+ 1. **Architecture Review** — dispatched as a background Opus 4.6 subagent via `Skill(spectre-architecture_review)` (Claude slash route: `spectre-architecture_review`)
31
31
  2. **Learn** — run directly by loading the `spectre-learn` skill
32
32
 
33
33
  ## Step (1/2) - Dispatch Architecture Review
@@ -44,7 +44,7 @@ This command runs two activities in parallel:
44
44
  ## Step (2/2) - Capture Learnings
45
45
 
46
46
  - **Action** — Learn: Load the spectre-learn skill and follow its workflow
47
- - Load skill: `Skill(learn)`
47
+ - Load skill: `Skill(spectre-learn)`
48
48
  - **If** ARGUMENTS is provided: use it as the learning topic
49
49
  - **If** ARGUMENTS is empty: the skill will analyze recent conversation to identify what's worth capturing
50
50
  - Follow the full learning workflow from the skill (categorize, propose, write, register)
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "execute"
2
+ name: "spectre-execute"
3
3
  description: "👻 | Adaptive Wave-Based Build with Per-Wave Verification Gate"
4
4
  user-invocable: true
5
5
  ---
@@ -118,7 +118,7 @@ $ARGUMENTS
118
118
 
119
119
  ## Step 2 - Cross-Wave Validate
120
120
 
121
- - **Action** — SpawnValidation: @analyst runs `Skill(validate)` (Claude slash route: `validate`) with **narrowed scope**:
121
+ - **Action** — SpawnValidation: @analyst runs `Skill(spectre-validate)` (Claude slash route: `spectre-validate`) with **narrowed scope**:
122
122
  - Focus: cross-wave integration audit (did later waves silently break earlier waves' wiring?) + scope-creep audit (anything implemented that is NOT in the acceptance criteria?) + dead-computation sweep across the full cumulative diff
123
123
  - Skip: per-area wiring verification (already done per-wave in Step 1.3b's wiring lens)
124
124
 
@@ -126,7 +126,7 @@ $ARGUMENTS
126
126
 
127
127
  ## Step 3 - Prepare for QA
128
128
 
129
- - **Action** — GenerateTestGuide: @dev runs `Skill(create_test_guide)` (Claude slash route: `create_test_guide`)
129
+ - **Action** — GenerateTestGuide: @dev runs `Skill(spectre-create_test_guide)` (Claude slash route: `spectre-create_test_guide`)
130
130
  - Save to `{OUT_DIR}/test_guide.md`
131
131
 
132
132
  ## Step 4 - Report
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "fix"
2
+ name: "spectre-fix"
3
3
  description: "Investigate bugs & implement fixes - primary agent"
4
4
  user-invocable: true
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "forget"
2
+ name: "spectre-forget"
3
3
  description: "Clear session memory - archive all session files so next session starts fresh"
4
4
  user-invocable: true
5
5
  ---