@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.
- package/package.json +2 -2
- package/plugins/spectre/.claude-plugin/plugin.json +1 -1
- package/plugins/spectre/hooks/scripts/load-knowledge.mjs +14 -3
- package/plugins/spectre/hooks/scripts/register_learning.mjs +8 -1
- package/plugins/spectre/hooks/scripts/test_load-knowledge.mjs +4 -4
- package/plugins/spectre/hooks/scripts/test_register-learning.mjs +2 -2
- package/plugins/spectre/skills/{apply → spectre-apply}/SKILL.md +3 -3
- package/plugins/spectre/skills/{architecture_review → spectre-architecture_review}/SKILL.md +1 -1
- package/plugins/spectre/skills/{clean → spectre-clean}/SKILL.md +1 -1
- package/plugins/spectre/skills/{code_review → spectre-code_review}/SKILL.md +1 -1
- package/plugins/spectre/skills/{create_plan → spectre-create_plan}/SKILL.md +32 -8
- package/plugins/spectre/skills/{create_tasks → spectre-create_tasks}/SKILL.md +1 -1
- package/plugins/spectre/skills/{create_test_guide → spectre-create_test_guide}/SKILL.md +1 -1
- package/plugins/spectre/skills/{evaluate → spectre-evaluate}/SKILL.md +3 -3
- package/plugins/spectre/skills/{execute → spectre-execute}/SKILL.md +3 -3
- package/plugins/spectre/skills/{fix → spectre-fix}/SKILL.md +1 -1
- package/plugins/spectre/skills/{forget → spectre-forget}/SKILL.md +1 -1
- package/plugins/spectre/skills/{guide → spectre-guide}/SKILL.md +1 -1
- package/plugins/spectre/skills/{handoff → spectre-handoff}/SKILL.md +1 -1
- package/plugins/spectre/skills/{kickoff → spectre-kickoff}/SKILL.md +1 -1
- package/plugins/spectre/skills/{learn → spectre-learn}/SKILL.md +2 -2
- package/plugins/spectre/skills/{plan → spectre-plan}/SKILL.md +39 -13
- package/plugins/spectre/skills/{plan_review → spectre-plan_review}/SKILL.md +36 -6
- package/plugins/spectre/skills/{prototype → spectre-prototype}/SKILL.md +1 -1
- package/plugins/spectre/skills/{quick_dev → spectre-quick_dev}/SKILL.md +1 -1
- package/plugins/spectre/skills/{rebase → spectre-rebase}/SKILL.md +1 -1
- package/plugins/spectre/skills/spectre-recall/SKILL.md +22 -0
- package/plugins/spectre/skills/{research → spectre-research}/SKILL.md +1 -1
- package/plugins/spectre/skills/{scope → spectre-scope}/SKILL.md +1 -1
- package/plugins/spectre/skills/{ship → spectre-ship}/SKILL.md +1 -1
- package/plugins/spectre/skills/{sweep → spectre-sweep}/SKILL.md +1 -1
- package/plugins/spectre/skills/{tdd → spectre-tdd}/SKILL.md +1 -1
- package/plugins/spectre/skills/{test → spectre-test}/SKILL.md +1 -1
- package/plugins/spectre/skills/{ux → spectre-ux}/SKILL.md +1 -1
- package/plugins/spectre/skills/{validate → spectre-validate}/SKILL.md +1 -1
- package/plugins/spectre-codex/hooks/scripts/load-knowledge.mjs +14 -3
- package/plugins/spectre-codex/hooks/scripts/register_learning.mjs +8 -1
- package/plugins/spectre-codex/skills/{apply → spectre-apply}/SKILL.md +3 -3
- package/plugins/spectre-codex/skills/{architecture_review → spectre-architecture_review}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{clean → spectre-clean}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{code_review → spectre-code_review}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{create_plan → spectre-create_plan}/SKILL.md +32 -8
- package/plugins/spectre-codex/skills/{create_tasks → spectre-create_tasks}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{create_test_guide → spectre-create_test_guide}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{evaluate → spectre-evaluate}/SKILL.md +3 -3
- package/plugins/spectre-codex/skills/{execute → spectre-execute}/SKILL.md +3 -3
- package/plugins/spectre-codex/skills/{fix → spectre-fix}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{forget → spectre-forget}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{guide → spectre-guide}/SKILL.md +81 -81
- package/plugins/spectre-codex/skills/{handoff → spectre-handoff}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{kickoff → spectre-kickoff}/SKILL.md +7 -7
- package/plugins/spectre-codex/skills/{learn → spectre-learn}/SKILL.md +2 -2
- package/plugins/spectre-codex/skills/{plan → spectre-plan}/SKILL.md +40 -14
- package/plugins/spectre-codex/skills/{plan_review → spectre-plan_review}/SKILL.md +38 -8
- package/plugins/spectre-codex/skills/{prototype → spectre-prototype}/SKILL.md +9 -9
- package/plugins/spectre-codex/skills/{quick_dev → spectre-quick_dev}/SKILL.md +2 -2
- package/plugins/spectre-codex/skills/{rebase → spectre-rebase}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/spectre-recall/SKILL.md +22 -0
- package/plugins/spectre-codex/skills/{research → spectre-research}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{scope → spectre-scope}/SKILL.md +8 -8
- package/plugins/spectre-codex/skills/{ship → spectre-ship}/SKILL.md +4 -4
- package/plugins/spectre-codex/skills/{sweep → spectre-sweep}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{tdd → spectre-tdd}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{test → spectre-test}/SKILL.md +1 -1
- package/plugins/spectre-codex/skills/{ux → spectre-ux}/SKILL.md +6 -6
- package/plugins/spectre-codex/skills/{validate → spectre-validate}/SKILL.md +1 -1
- package/src/config.test.js +1 -1
- package/src/install.test.js +10 -6
- package/src/lib/constants.js +9 -9
- package/src/lib/install.js +29 -1
- package/src/lib/knowledge.js +7 -5
- package/src/pack.test.js +1 -1
- package/plugins/spectre/skills/recall/SKILL.md +0 -17
- package/plugins/spectre-codex/skills/recall/SKILL.md +0 -17
- /package/plugins/spectre/skills/{learn → spectre-learn}/references/recall-template.md +0 -0
- /package/plugins/spectre-codex/skills/{learn → spectre-learn}/references/recall-template.md +0 -0
package/package.json
CHANGED
|
@@ -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
|
|
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 });
|
|
@@ -23,10 +23,10 @@ function createTmpDir() {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
function createApplySkill(pluginDir) {
|
|
26
|
-
const skillPath = path.join(pluginDir, 'skills', 'apply', 'SKILL.md');
|
|
26
|
+
const skillPath = path.join(pluginDir, 'skills', 'spectre-apply', 'SKILL.md');
|
|
27
27
|
fs.mkdirSync(path.dirname(skillPath), { recursive: true });
|
|
28
28
|
fs.writeFileSync(skillPath,
|
|
29
|
-
'---\nname: apply\n---\n\n# Apply Knowledge\n\n' +
|
|
29
|
+
'---\nname: spectre-apply\n---\n\n# Apply Knowledge\n\n' +
|
|
30
30
|
'## How to Find Skills\n\nScan available skills.\n\n' +
|
|
31
31
|
'## Workflow\n\nDo things.\n'
|
|
32
32
|
);
|
|
@@ -34,10 +34,10 @@ function createApplySkill(pluginDir) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function createCodexApplySkill(codexHome) {
|
|
37
|
-
const skillPath = path.join(codexHome, 'skills', 'apply', 'SKILL.md');
|
|
37
|
+
const skillPath = path.join(codexHome, 'skills', 'spectre-apply', 'SKILL.md');
|
|
38
38
|
fs.mkdirSync(path.dirname(skillPath), { recursive: true });
|
|
39
39
|
fs.writeFileSync(skillPath,
|
|
40
|
-
'---\nname: apply\n---\n\n# Apply Knowledge\n\n' +
|
|
40
|
+
'---\nname: spectre-apply\n---\n\n# Apply Knowledge\n\n' +
|
|
41
41
|
'## How to Find Skills\n\nScan available skills.\n\n' +
|
|
42
42
|
'## Workflow\n\nDo things.\n'
|
|
43
43
|
);
|
|
@@ -114,7 +114,7 @@ describe('register_learning', () => {
|
|
|
114
114
|
const pluginRoot = path.join(tmp, 'plugin');
|
|
115
115
|
|
|
116
116
|
// Create template
|
|
117
|
-
const templateDir = path.join(pluginRoot, 'skills', 'learn', 'references');
|
|
117
|
+
const templateDir = path.join(pluginRoot, 'skills', 'spectre-learn', 'references');
|
|
118
118
|
fs.mkdirSync(templateDir, { recursive: true });
|
|
119
119
|
fs.writeFileSync(
|
|
120
120
|
path.join(templateDir, 'recall-template.md'),
|
|
@@ -146,7 +146,7 @@ describe('register_learning', () => {
|
|
|
146
146
|
const codexHome = path.join(tmp, 'codex-home');
|
|
147
147
|
const runtimeRoot = path.join(codexHome, 'spectre');
|
|
148
148
|
|
|
149
|
-
const templateDir = path.join(codexHome, 'skills', 'learn', 'references');
|
|
149
|
+
const templateDir = path.join(codexHome, 'skills', 'spectre-learn', 'references');
|
|
150
150
|
fs.mkdirSync(templateDir, { recursive: true });
|
|
151
151
|
fs.writeFileSync(
|
|
152
152
|
path.join(templateDir, 'recall-template.md'),
|
|
@@ -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}}/.claude/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: 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
|
|
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
|
|
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** —
|
|
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
|
-
|
|
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
|
-
|
|
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:spectre-guide` skill for Next Steps footer
|
|
162
|
+
- **Action** — RenderFooter: Use `@skill-spectre:spectre-guide` skill for Next Steps footer
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: evaluate
|
|
2
|
+
name: spectre-evaluate
|
|
3
3
|
description: "\ud83d\udc7b | 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: `/spectre: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: `/spectre: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: `/spectre: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: learn
|
|
2
|
+
name: spectre-learn
|
|
3
3
|
description: Use when user invokes /learn or wants to save patterns, decisions, gotchas, procedures, or feature knowledge from a conversation for later re-use. Look for user requests like "please remember" or "what did we learn from this?".
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
@@ -11,7 +11,7 @@ You capture durable project knowledge into Skills that Claude Code loads on-dema
|
|
|
11
11
|
<CRITICAL>
|
|
12
12
|
## Exclusive Knowledge Handler
|
|
13
13
|
|
|
14
|
-
When this skill is invoked (via `/learn`, `/spectre:learn`, or `Skill(learn)`), it is the **exclusive handler** for knowledge capture. It supersedes ALL other memory systems.
|
|
14
|
+
When this skill is invoked (via `/learn`, `/spectre:learn`, or `Skill(spectre-learn)`), it is the **exclusive handler** for knowledge capture. It supersedes ALL other memory systems.
|
|
15
15
|
|
|
16
16
|
**Do NOT**:
|
|
17
17
|
- Write to `MEMORY.md` or any auto-memory directory
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plan
|
|
2
|
+
name: spectre-plan
|
|
3
3
|
description: 👻 | Unified planning entry point - researches, assesses complexity, routes to workflow - primary agent
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
@@ -15,7 +15,7 @@ Treat the current command arguments as this workflow's input. When invoked from
|
|
|
15
15
|
## Description
|
|
16
16
|
|
|
17
17
|
- **What** — Research codebase, assess complexity, route to appropriate workflow (direct tasks or plan-first)
|
|
18
|
-
- **Outcome** —
|
|
18
|
+
- **Outcome** — A right-sized `plan.md` + `tasks.md`; STANDARD/COMPREHENSIVE include review and a final execution gate, while LIGHT stays non-blocking.
|
|
19
19
|
|
|
20
20
|
## ARGUMENTS Input
|
|
21
21
|
|
|
@@ -23,7 +23,7 @@ Treat the current command arguments as this workflow's input. When invoked from
|
|
|
23
23
|
|
|
24
24
|
## MANDATORY COMPLIANCE RULES
|
|
25
25
|
|
|
26
|
-
> **⚠️ NON-NEGOTIABLE**:
|
|
26
|
+
> **⚠️ NON-NEGOTIABLE**: After tier routing, this workflow MUST invoke nested workflows via the Skill tool. LIGHT must invoke `Skill(spectre-create_plan)` and `Skill(spectre-create_tasks)`; STANDARD/COMPREHENSIVE must invoke `Skill(spectre-create_plan)`, `Skill(spectre-create_tasks)`, and `Skill(spectre-plan_review)` (Claude slash route: `/spectre:create_plan`, `/spectre:create_tasks`, and `/spectre:plan_review`). Failure to invoke the required skills is a critical error. Do NOT summarize, describe, or skip these workflows. INVOKE THEM.
|
|
27
27
|
|
|
28
28
|
**After ANY user conversation or questions:**
|
|
29
29
|
|
|
@@ -33,14 +33,16 @@ Treat the current command arguments as this workflow's input. When invoked from
|
|
|
33
33
|
|
|
34
34
|
**You MUST call these skills (not describe them):**
|
|
35
35
|
|
|
36
|
-
- Use the **Skill** tool with `skill: "spectre-create_plan"` and `args: "{path} --depth {tier}"` — generates plan.md
|
|
36
|
+
- Use the **Skill** tool with `skill: "spectre-create_plan"` and `args: "{path} --depth {tier}"` — generates plan.md, including LIGHT
|
|
37
37
|
- Use the **Skill** tool with `skill: "spectre-create_tasks"` and `args: "{path}"` — generates tasks.md
|
|
38
|
+
- Use the **Skill** tool with `skill: "spectre-plan_review"` and `args: "{OUT_DIR} --auto-apply scope-safe"` — reviews and integrates scope-safe feedback for STANDARD/COMPREHENSIVE
|
|
38
39
|
|
|
39
40
|
## Instructions
|
|
40
41
|
|
|
41
42
|
- Research before routing; present architectural options for user buy-in
|
|
42
43
|
- Route based on hard-stops and clarity, not point-scoring
|
|
43
44
|
- Never overwrite existing `tasks.md` or `plan.md` — use scoped names
|
|
45
|
+
- Treat `concepts/scope.md` (then `specs/prd.md` / `specs/ux.md` when present) as canonical. Plan generation, task generation, review, and feedback integration may change implementation approach, sequencing, verification, references, and YAGNI fences, but MUST NOT cut, narrow, expand, or reinterpret the agreed scope without an explicit user scope-change gate.
|
|
44
46
|
|
|
45
47
|
## Step 1 - Research Codebase
|
|
46
48
|
|
|
@@ -124,7 +126,7 @@ Use research findings from Step 1 to determine appropriate planning depth.
|
|
|
124
126
|
|
|
125
127
|
## Step 3 - High-Level Design
|
|
126
128
|
|
|
127
|
-
**SKIP IF LIGHT** — proceed directly to Step 4.
|
|
129
|
+
**SKIP IF LIGHT** — proceed directly to Step 4. LIGHT still generates a real plan in Step 4; it only skips this human alignment gate.
|
|
128
130
|
|
|
129
131
|
Goal: align on the *shape* of the solution before generating a full plan. This catches misalignments early and gives the user a chance to redirect before reading a long plan doc.
|
|
130
132
|
|
|
@@ -171,7 +173,7 @@ Goal: align on the *shape* of the solution before generating a full plan. This c
|
|
|
171
173
|
|
|
172
174
|
- **Action** — PersistDesign: Append a "Selected Design" section to `{OUT_DIR}/task_context.md` capturing the agreed approach, key decisions, and resolved questions. This is what `create_plan` consumes.
|
|
173
175
|
|
|
174
|
-
> **CHECKPOINT**: After alignment, proceed IMMEDIATELY to Step 4. The
|
|
176
|
+
> **CHECKPOINT**: After alignment, proceed IMMEDIATELY to Step 4. This is the early gate. The next valid actions are Skill invocations that generate the draft plan, generate tasks, run plan_review, integrate scope-safe feedback, and then present the final plan/tasks for the user's final gate.
|
|
175
177
|
|
|
176
178
|
## Step 4 - Route to Workflow
|
|
177
179
|
|
|
@@ -187,6 +189,7 @@ Goal: align on the *shape* of the solution before generating a full plan. This c
|
|
|
187
189
|
│ │
|
|
188
190
|
│ ✅ CORRECT: Skill tool with skill: "spectre-create_plan", args: "..." │
|
|
189
191
|
│ ✅ CORRECT: Skill tool with skill: "spectre-create_tasks", args: "..."│
|
|
192
|
+
│ ✅ CORRECT: Skill tool with skill: "spectre-plan_review", args: "..." │
|
|
190
193
|
└────────────────────────────────────────────────────────────────────────┘
|
|
191
194
|
```
|
|
192
195
|
|
|
@@ -202,6 +205,7 @@ Goal: align on the *shape* of the solution before generating a full plan. This c
|
|
|
202
205
|
|
|
203
206
|
- Use the Skill tool: `skill: "spectre-create_plan"`, `args: "{OUT_DIR}/task_context.md --depth {tier}"`
|
|
204
207
|
- Use the Skill tool: `skill: "spectre-create_tasks"`, `args: "{OUT_DIR}/task_context.md"`
|
|
208
|
+
- For STANDARD/COMPREHENSIVE, use the Skill tool: `skill: "spectre-plan_review"`, `args: "{OUT_DIR} --auto-apply scope-safe"`
|
|
205
209
|
|
|
206
210
|
---
|
|
207
211
|
|
|
@@ -209,27 +213,34 @@ Goal: align on the *shape* of the solution before generating a full plan. This c
|
|
|
209
213
|
|
|
210
214
|
- **If LIGHT**:
|
|
211
215
|
|
|
216
|
+
- **INVOKE NOW** → Skill tool with `skill: "spectre-create_plan"`, `args: "{OUT_DIR}/task_context.md --depth light --no-review"`
|
|
217
|
+
- **Wait** — Returns concise plan with solution shape, patterns, risks, and verification approach
|
|
212
218
|
- **INVOKE NOW** → Skill tool with `skill: "spectre-create_tasks"`, `args: "{OUT_DIR}/task_context.md --depth light"`
|
|
213
|
-
- **Wait** — Returns task breakdown
|
|
219
|
+
- **Wait** — Returns task breakdown grounded in the light plan
|
|
220
|
+
- **Action** — PresentLightArtifacts: Summarize `{OUT_DIR}/specs/plan.md` and `{OUT_DIR}/specs/tasks.md`. State that LIGHT skipped `plan_review` and the human execution gate by design.
|
|
214
221
|
- Skip to footer
|
|
215
222
|
|
|
216
223
|
- **ElseIf STANDARD**:
|
|
217
224
|
|
|
218
|
-
- **INVOKE NOW** → Skill tool with `skill: "spectre-create_plan"`, `args: "{OUT_DIR}/task_context.md --depth standard"`
|
|
225
|
+
- **INVOKE NOW** → Skill tool with `skill: "spectre-create_plan"`, `args: "{OUT_DIR}/task_context.md --depth standard --no-review"`
|
|
219
226
|
- **Wait** — Returns focused plan (Overview, Approach, Out of Scope)
|
|
220
|
-
- **Action** — PromptUser: "Review plan. Reply 'Approved' or provide feedback."
|
|
221
|
-
- **Wait** — User approval
|
|
222
227
|
- **INVOKE NOW** → Skill tool with `skill: "spectre-create_tasks"`, `args: "{OUT_DIR}/task_context.md"`
|
|
223
228
|
- **Wait** — Returns task breakdown
|
|
229
|
+
- **INVOKE NOW** → Skill tool with `skill: "spectre-plan_review"`, `args: "{OUT_DIR} --auto-apply scope-safe"`
|
|
230
|
+
- **Wait** — Returns findings, applied edits, skipped scope-changing recommendations, and updated artifacts
|
|
231
|
+
- **Action** — IntegratePlanReviewFeedback: Read the plan_review report path returned by `plan_review`. Confirm every scope-safe Blocker/High finding is reflected in `plan.md` and/or `tasks.md`. If `plan_review` produced a scope-safe suggested edit but did not apply it because it needed minor adaptation, apply the smallest artifact edit now and record it in the final summary. Do not apply Scope Change Required findings.
|
|
232
|
+
- Continue to Final Gate
|
|
224
233
|
|
|
225
234
|
- **ElseIf COMPREHENSIVE**:
|
|
226
235
|
|
|
227
|
-
- **INVOKE NOW** → Skill tool with `skill: "spectre-create_plan"`, `args: "{OUT_DIR}/task_context.md --depth comprehensive"`
|
|
236
|
+
- **INVOKE NOW** → Skill tool with `skill: "spectre-create_plan"`, `args: "{OUT_DIR}/task_context.md --depth comprehensive --no-review"`
|
|
228
237
|
- **Wait** — Returns full plan (all sections: Architecture, Phases, API Design, Testing Strategy, etc.)
|
|
229
|
-
- **Action** — PromptUser: "Review plan. Reply 'Approved' or provide feedback."
|
|
230
|
-
- **Wait** — User approval
|
|
231
238
|
- **INVOKE NOW** → Skill tool with `skill: "spectre-create_tasks"`, `args: "{OUT_DIR}/task_context.md"`
|
|
232
239
|
- **Wait** — Returns task breakdown
|
|
240
|
+
- **INVOKE NOW** → Skill tool with `skill: "spectre-plan_review"`, `args: "{OUT_DIR} --auto-apply scope-safe"`
|
|
241
|
+
- **Wait** — Returns findings, applied edits, skipped scope-changing recommendations, and updated artifacts
|
|
242
|
+
- **Action** — IntegratePlanReviewFeedback: Read the plan_review report path returned by `plan_review`. Confirm every scope-safe Blocker/High finding is reflected in `plan.md` and/or `tasks.md`. If `plan_review` produced a scope-safe suggested edit but did not apply it because it needed minor adaptation, apply the smallest artifact edit now and record it in the final summary. Do not apply Scope Change Required findings.
|
|
243
|
+
- Continue to Final Gate
|
|
233
244
|
|
|
234
245
|
---
|
|
235
246
|
|
|
@@ -253,4 +264,19 @@ Only proceed past this checkpoint when the user confirms.
|
|
|
253
264
|
|
|
254
265
|
---
|
|
255
266
|
|
|
267
|
+
### Final Gate
|
|
268
|
+
|
|
269
|
+
- **Action** — PresentFinalArtifacts:
|
|
270
|
+
- Summarize final artifact paths: `{OUT_DIR}/specs/plan.md`, `{OUT_DIR}/specs/tasks.md`, and the saved plan_review report under `{OUT_DIR}/reviews/`.
|
|
271
|
+
- Summarize review integration: findings applied by `plan_review`, any additional plan-orchestrator edits applied to integrate feedback, skipped edits, and any recommendations that were blocked because they would change canonical scope.
|
|
272
|
+
- If plan_review surfaced a scope-changing recommendation, state: "This requires a scope change; I did not apply it." Ask the user whether to reopen scope or approve the current canonical-scope-preserving plan/tasks.
|
|
273
|
+
- Otherwise prompt: "Final reviewed plan/tasks are ready. Reply `Approved` to proceed to execution, or provide final feedback."
|
|
274
|
+
|
|
275
|
+
- **Wait** — User final approval or feedback.
|
|
276
|
+
|
|
277
|
+
- **If feedback preserves canonical scope** — apply the smallest edits to `plan.md`/`tasks.md`, re-run `plan_review {OUT_DIR} --auto-apply scope-safe` if the feedback changes implementation approach, verification, dependencies, task sequencing, or references, then present the Final Gate again.
|
|
278
|
+
- **If feedback changes canonical scope** — stop and route back to `/spectre:scope` (or explicitly update the canonical scope artifact if the user directs it). Do not silently update plan/tasks against stale scope.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
256
282
|
- **Action** — RenderFooter: Use `@skill-spectre:spectre-guide` skill for Next Steps
|