@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
|
@@ -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
|
---
|
|
@@ -22,10 +22,10 @@ Produce a self-contained, clickable HTML artifact that makes a feature visible
|
|
|
22
22
|
|
|
23
23
|
Detect mode from environment markers, ARGUMENTS, and existing docs. **Order matters** — check from most context to least:
|
|
24
24
|
|
|
25
|
-
- **Complete ux.md exists** (post-ux) — full Stage 2 spec is on disk. The prototype's job is to **render the spec**, not synthesize it. Default fidelity: **high-fi**. Skip all intake except visual anchor. Treat ux.md as authoritative — don't invent screens, don't contradict documented states or copy. On completion, recommend `plan` or `create_tasks`.
|
|
25
|
+
- **Complete ux.md exists** (post-ux) — full Stage 2 spec is on disk. The prototype's job is to **render the spec**, not synthesize it. Default fidelity: **high-fi**. Skip all intake except visual anchor. Treat ux.md as authoritative — don't invent screens, don't contradict documented states or copy. On completion, recommend `spectre-plan` or `spectre-create_tasks`.
|
|
26
26
|
- **`FROM_UX=true`** — invoked mid-flow from `ux` Stage 1 → Stage 2 gate. Only approved flows exist (no detailed spec yet). Skip flow-discovery intake. Default fidelity: **mid-fi**. On completion, point user back to `ux` Stage 2.
|
|
27
|
-
- **`--explore` flag in ARGUMENTS** — pre-scope discovery. Concept is unvalidated. Default fidelity: **low-fi**. On completion, recommend `scope` as next step.
|
|
28
|
-
- **scope.md exists for this branch** (no ux.md) — post-scope validation. Default fidelity: **mid-fi**. On completion, recommend `ux` or `plan` based on feature complexity.
|
|
27
|
+
- **`--explore` flag in ARGUMENTS** — pre-scope discovery. Concept is unvalidated. Default fidelity: **low-fi**. On completion, recommend `spectre-scope` as next step.
|
|
28
|
+
- **scope.md exists for this branch** (no ux.md) — post-scope validation. Default fidelity: **mid-fi**. On completion, recommend `spectre-ux` or `spectre-plan` based on feature complexity.
|
|
29
29
|
- **Standalone, no context** — ask the user what they're prototyping. Default fidelity: **mid-fi**.
|
|
30
30
|
|
|
31
31
|
---
|
|
@@ -50,7 +50,7 @@ Detect mode from environment markers, ARGUMENTS, and existing docs. **Order matt
|
|
|
50
50
|
- Read whichever exist FULLY (no offset/limit)
|
|
51
51
|
|
|
52
52
|
- **Action** — ClassifyUxDoc: If `ux.md` exists, classify its completeness — this drives fidelity AND how much intake to skip.
|
|
53
|
-
- **Complete** — contains all of: Screens, Layouts, Components, Interactions, States, Content sections (the Stage 2 deliverables from `ux`). Treat as authoritative. Skip flow-discovery questions. Set mode = **post-ux**.
|
|
53
|
+
- **Complete** — contains all of: Screens, Layouts, Components, Interactions, States, Content sections (the Stage 2 deliverables from `spectre-ux`). Treat as authoritative. Skip flow-discovery questions. Set mode = **post-ux**.
|
|
54
54
|
- **Flows-only** — contains user flows / journeys but missing Stage 2 sections. Treat flows as approved input but expect to make UI decisions. Set mode = **flows-only ux**.
|
|
55
55
|
- **Absent** — fall back to scope.md / prd.md / standalone modes.
|
|
56
56
|
|
|
@@ -181,7 +181,7 @@ Wait for ALL subagents to complete. Synthesize their outputs, then generate a si
|
|
|
181
181
|
Key assumptions: {bullet list of design decisions and content assumptions}
|
|
182
182
|
Filled assumptions: {only in post-ux mode — items the spec was silent on that the prototype filled in; review these against the spec}
|
|
183
183
|
NOT included: {explicit list of what was deliberately left out}
|
|
184
|
-
Next step: plan OR resume ux Stage 2
|
|
184
|
+
Next step: spectre-plan OR resume spectre-ux Stage 2
|
|
185
185
|
-->
|
|
186
186
|
```
|
|
187
187
|
3. **Design tokens comment block** in `<head>`:
|
|
@@ -275,9 +275,9 @@ Surface any violations as caveats in the handoff. Don't silently ship a broken p
|
|
|
275
275
|
- Re-present with a one-line diff per added item: `ux.md ← added: {item} (in {section})`.
|
|
276
276
|
|
|
277
277
|
- **Action** — RenderFooter: Render Next Steps using `Skill(spectre-guide)` skill, with mode-specific recommendation:
|
|
278
|
-
- **If `FROM_UX=true`** → recommend: "Resume `ux` Stage 2 with this prototype as input"
|
|
279
|
-
- **If `--explore`** → recommend: `scope` with the prototype as anchor
|
|
280
|
-
- **If post-scope** → recommend: `ux` (if flows still need detail) or `plan` (if ready to build)
|
|
278
|
+
- **If `FROM_UX=true`** → recommend: "Resume `spectre-ux` Stage 2 with this prototype as input"
|
|
279
|
+
- **If `--explore`** → recommend: `spectre-scope` with the prototype as anchor
|
|
280
|
+
- **If post-scope** → recommend: `spectre-ux` (if flows still need detail) or `spectre-plan` (if ready to build)
|
|
281
281
|
- **Else** → standard Next Steps options
|
|
282
282
|
|
|
283
283
|
---
|
|
@@ -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
|
---
|
|
@@ -97,7 +97,7 @@ $ARGUMENTS
|
|
|
97
97
|
- Exclude: code snippets, line-by-line steps
|
|
98
98
|
- 2-3 acceptance criteria per sub-task
|
|
99
99
|
|
|
100
|
-
**Bounds**: ~3 phases, ~8 parent tasks max. If exceeds → suggest `create_tasks`
|
|
100
|
+
**Bounds**: ~3 phases, ~8 parent tasks max. If exceeds → suggest `spectre-create_tasks`
|
|
101
101
|
|
|
102
102
|
- **Action** — ValidateCoverage: Verify all in-scope items have tasks; no out-of-scope tasks added
|
|
103
103
|
|
|
@@ -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}}/.agents/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: "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
|
---
|
|
@@ -30,7 +30,7 @@ Collaborative workflow for structuring unstructured thoughts into clear scope bo
|
|
|
30
30
|
- `branch_name=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo unknown)`
|
|
31
31
|
- Look for: `docs/tasks/{branch_name}/concepts/scope.md`, `docs/tasks/{branch_name}/task_context.md`
|
|
32
32
|
- **If** prior `scope.md` exists → read fully; treat this invocation as a re-scope. Surface what was already settled and ask only about what's new or changed.
|
|
33
|
-
- **If** captured project knowledge is available (via `apply`-style memory or session logs) → surface decisions/patterns/gotchas relevant to this area before asking the user.
|
|
33
|
+
- **If** captured project knowledge is available (via `spectre-apply`-style memory or session logs) → surface decisions/patterns/gotchas relevant to this area before asking the user.
|
|
34
34
|
|
|
35
35
|
## Step 2: Ground the Hypothesis (Fast)
|
|
36
36
|
|
|
@@ -41,9 +41,9 @@ Collaborative workflow for structuring unstructured thoughts into clear scope bo
|
|
|
41
41
|
- **One `grep` or `glob`** — when you need to verify a specific assumption ("does X already exist?")
|
|
42
42
|
|
|
43
43
|
**Constraints**:
|
|
44
|
-
- **One call only.** This is grounding, not research. Tech research is `plan`'s job.
|
|
44
|
+
- **One call only.** This is grounding, not research. Tech research is `spectre-plan`'s job.
|
|
45
45
|
- **Fast.** If the call would take more than a few seconds, skip it and ask the user instead.
|
|
46
|
-
- If you need more than one signal, that's a sign this should be a `kickoff` rather than a `scope`.
|
|
46
|
+
- If you need more than one signal, that's a sign this should be a `spectre-kickoff` rather than a `spectre-scope`.
|
|
47
47
|
|
|
48
48
|
## Step 3: Interactive Scope Exploration
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ Collaborative workflow for structuring unstructured thoughts into clear scope bo
|
|
|
51
51
|
|
|
52
52
|
- **Action** — ExploreScope: Collaborative dialogue focused on boundaries, user experience, and anti-scope.
|
|
53
53
|
|
|
54
|
-
**CRITICAL**: Focus on WHAT, not HOW. Defer all technical/implementation questions to `plan`. Only ask technical questions if the scope itself is inherently technical (e.g., "migrate database from X to Y").
|
|
54
|
+
**CRITICAL**: Focus on WHAT, not HOW. Defer all technical/implementation questions to `spectre-plan`. Only ask technical questions if the scope itself is inherently technical (e.g., "migrate database from X to Y").
|
|
55
55
|
|
|
56
56
|
**PATTERN**: Lead with a grounded hypothesis (informed by Step 2's lookup) AND ask 5–8 questions across multiple dimensions. Mark each question as **(blocking)** or *(optional)* so the user can skim and skip.
|
|
57
57
|
|
|
@@ -82,7 +82,7 @@ Collaborative workflow for structuring unstructured thoughts into clear scope bo
|
|
|
82
82
|
- **Edge cases**: What happens when [unusual situation]?
|
|
83
83
|
- **Success**: What makes you say "this shipped well"?
|
|
84
84
|
|
|
85
|
-
**DO NOT ask about**: implementation approach, technical trade-offs, architecture, or integration details — those belong in `plan`.
|
|
85
|
+
**DO NOT ask about**: implementation approach, technical trade-offs, architecture, or integration details — those belong in `spectre-plan`.
|
|
86
86
|
|
|
87
87
|
- **Action** — IterateBoundaries: After user responds, refine boundaries and ask targeted follow-ups on gaps.
|
|
88
88
|
|
|
@@ -114,7 +114,7 @@ Collaborative workflow for structuring unstructured thoughts into clear scope bo
|
|
|
114
114
|
- For trade-off decisions, present options with concise pros/cons.
|
|
115
115
|
- If more than 4 questions, ask in batches — most important first.
|
|
116
116
|
|
|
117
|
-
**CRITICAL**: Only ask about unresolved scope ambiguities. Technical questions belong in `plan`, not here.
|
|
117
|
+
**CRITICAL**: Only ask about unresolved scope ambiguities. Technical questions belong in `spectre-plan`, not here.
|
|
118
118
|
|
|
119
119
|
### Path B: File-Based Clarifications (no AskUserQuestion)
|
|
120
120
|
|
|
@@ -145,7 +145,7 @@ Collaborative workflow for structuring unstructured thoughts into clear scope bo
|
|
|
145
145
|
7. **Constraints** — platform, perf, a11y, scale (user-provided only)
|
|
146
146
|
8. **Decisions** — from clarifications + rationale
|
|
147
147
|
9. **Risks** — UX, scope creep, open questions
|
|
148
|
-
10. **Next Steps** — `plan` or `create_tasks`, complexity S/M/L
|
|
148
|
+
10. **Next Steps** — `spectre-plan` or `spectre-create_tasks`, complexity S/M/L
|
|
149
149
|
|
|
150
150
|
**Note on ANTI-SCOPE vs OUT**:
|
|
151
151
|
- **OUT** = we're not building it (yet, or for this release).
|
|
@@ -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
|
---
|
|
@@ -70,7 +70,7 @@ Take a brain dump and autonomously produce a reviewable PR. Zero confirmation ga
|
|
|
70
70
|
{from research — relevant files and their roles}
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
Keep it \~20 lines. This is a lightweight scope, not full `scope`.
|
|
73
|
+
Keep it \~20 lines. This is a lightweight scope, not full `spectre-scope`.
|
|
74
74
|
|
|
75
75
|
## Step (4/8) - Create Tasks
|
|
76
76
|
|
|
@@ -98,7 +98,7 @@ Take a brain dump and autonomously produce a reviewable PR. Zero confirmation ga
|
|
|
98
98
|
|
|
99
99
|
## Step (6/8) - Sweep
|
|
100
100
|
|
|
101
|
-
Inline sweep — same checklist as `sweep`, no subagents:
|
|
101
|
+
Inline sweep — same checklist as `spectre-sweep`, no subagents:
|
|
102
102
|
|
|
103
103
|
### 6.1 Diff Sanity Check
|
|
104
104
|
|
|
@@ -171,7 +171,7 @@ Inline sweep — same checklist as `sweep`, no subagents:
|
|
|
171
171
|
## Test Plan
|
|
172
172
|
{Bulleted checklist — what was tested, what to verify manually}
|
|
173
173
|
|
|
174
|
-
Shipped autonomously via `ship`
|
|
174
|
+
Shipped autonomously via `spectre-ship`
|
|
175
175
|
```
|
|
176
176
|
|
|
177
177
|
- **Action** — OutputPRUrl: Display the PR URL as the final deliverable
|
|
@@ -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
|
---
|
|
@@ -28,7 +28,7 @@ Transform product requirements into a definitive behavioral specification. Two s
|
|
|
28
28
|
- `docs/tasks/{branch}/concepts/scope.md` — the canonical scope doc (preferred)
|
|
29
29
|
- `docs/tasks/{branch}/specs/prd.md` — if a PRD was generated separately
|
|
30
30
|
- `docs/tasks/{branch}/task_summary.md` — if present
|
|
31
|
-
- **If none exist** → ask the user for scope context (or recommend `scope` first) before proceeding.
|
|
31
|
+
- **If none exist** → ask the user for scope context (or recommend `spectre-scope` first) before proceeding.
|
|
32
32
|
2. **Research patterns**: Dispatch `@patterns` to find existing screens/components similar to what we're building. Note conventions, reusable elements, and any design tokens.
|
|
33
33
|
3. **Identify user segments**: List the user segments this feature serves — first-time vs returning, anonymous vs signed-in, free vs paid, role-based variants. UX often diverges across segments and missing this is a common cause of rework.
|
|
34
34
|
4. **Identify journeys**: List user goals, entry points, and completion states.
|
|
@@ -102,11 +102,11 @@ Prompt:
|
|
|
102
102
|
>
|
|
103
103
|
> Written to `{path}`. Please review: Any behaviors wrong or missing? Edge cases not covered? Segment differences captured?
|
|
104
104
|
>
|
|
105
|
-
> **Want a prototype to validate visually before approving?** `prototype` will render this spec (high-fi, no synthesis) and flag assumptions where I had to fill in details — catches issues prose review misses. Reply `prototype` to run it now.
|
|
105
|
+
> **Want a prototype to validate visually before approving?** `spectre-prototype` will render this spec (high-fi, no synthesis) and flag assumptions where I had to fill in details — catches issues prose review misses. Reply `prototype` to run it now.
|
|
106
106
|
>
|
|
107
107
|
> Otherwise, reply with feedback, or **"Approved"** to finalize.
|
|
108
108
|
|
|
109
|
-
**Wait for approval, feedback, or prototype request.** If user replies `prototype`, invoke `prototype` (the post-ux mode auto-detects the complete ux.md). Once prototype completes and any spec updates from filled assumptions are applied, return here for final approval.
|
|
109
|
+
**Wait for approval, feedback, or prototype request.** If user replies `prototype`, invoke `spectre-prototype` (the post-ux mode auto-detects the complete ux.md). Once prototype completes and any spec updates from filled assumptions are applied, return here for final approval.
|
|
110
110
|
|
|
111
111
|
## Step 5 — Handoff
|
|
112
112
|
|
|
@@ -116,6 +116,6 @@ Read `.spectre/next_steps_guide.md` and render Next Steps footer:
|
|
|
116
116
|
|
|
117
117
|
```
|
|
118
118
|
Next Steps | Phase: Scope | Status: UX Complete
|
|
119
|
-
Recommendation: {contextual next action — if no prototype was generated, suggest prototype to validate the spec visually before /plan}
|
|
120
|
-
Options: prototype (validate spec visually), create_plan, create_tasks, tdd
|
|
119
|
+
Recommendation: {contextual next action — if no prototype was generated, suggest spectre-prototype to validate the spec visually before /plan}
|
|
120
|
+
Options: spectre-prototype (validate spec visually), spectre-create_plan, spectre-create_tasks, spectre-tdd
|
|
121
121
|
```
|
package/src/config.test.js
CHANGED
|
@@ -131,5 +131,5 @@ test('buildSessionStartOutput keeps knowledge active when no handoff exists and
|
|
|
131
131
|
assert.doesNotMatch(overrideContent, /spectre-session:start/);
|
|
132
132
|
assert.match(overrideContent, /spectre-knowledge:start/);
|
|
133
133
|
assert.match(overrideContent, /If ANY skill's triggers or description match your current task, you MUST load the skill FIRST/);
|
|
134
|
-
assert.match(overrideContent, /Capture via `Skill\(learn\)`/);
|
|
134
|
+
assert.match(overrideContent, /Capture via `Skill\(spectre-learn\)`/);
|
|
135
135
|
});
|
package/src/install.test.js
CHANGED
|
@@ -34,26 +34,30 @@ test('project install writes workflow skills, agent config, and official Session
|
|
|
34
34
|
delete process.env.CODEX_HOME;
|
|
35
35
|
|
|
36
36
|
try {
|
|
37
|
+
fs.mkdirSync(path.join(projectDir, '.codex', 'skills', 'scope'), { recursive: true });
|
|
38
|
+
fs.writeFileSync(path.join(projectDir, '.codex', 'skills', 'scope', 'SKILL.md'), 'legacy bare scope skill\n');
|
|
39
|
+
|
|
37
40
|
const { main } = await import('./main.js');
|
|
38
41
|
await main(['install', 'codex', '--scope', 'project', '--project-dir', projectDir]);
|
|
39
42
|
|
|
40
43
|
const codeHome = path.join(projectDir, '.codex');
|
|
41
|
-
const scopeSkillPath = path.join(codeHome, 'skills', 'scope', 'SKILL.md');
|
|
44
|
+
const scopeSkillPath = path.join(codeHome, 'skills', 'spectre-scope', 'SKILL.md');
|
|
42
45
|
assert.ok(fs.existsSync(scopeSkillPath));
|
|
46
|
+
assert.ok(!fs.existsSync(path.join(codeHome, 'skills', 'scope')));
|
|
43
47
|
const scopeSkill = fs.readFileSync(scopeSkillPath, 'utf8');
|
|
44
48
|
assert.match(scopeSkill, /# scope: Interactive Feature Scoping/);
|
|
45
49
|
assert.doesNotMatch(scopeSkill, /This is the Codex skill replacement for the deprecated custom prompt \/spectre:scope/);
|
|
46
|
-
assert.doesNotMatch(scopeSkill, /Skill\(
|
|
50
|
+
assert.doesNotMatch(scopeSkill, /Skill\(scope\)/);
|
|
47
51
|
|
|
48
|
-
const applySkillPath = path.join(codeHome, 'skills', 'apply', 'SKILL.md');
|
|
52
|
+
const applySkillPath = path.join(codeHome, 'skills', 'spectre-apply', 'SKILL.md');
|
|
49
53
|
assert.ok(fs.existsSync(applySkillPath));
|
|
50
54
|
assert.match(fs.readFileSync(applySkillPath, 'utf8'), /If ANY skill's triggers or description match your current task, you MUST load the skill FIRST/);
|
|
51
55
|
|
|
52
|
-
const learnSkillPath = path.join(codeHome, 'skills', 'learn', 'SKILL.md');
|
|
56
|
+
const learnSkillPath = path.join(codeHome, 'skills', 'spectre-learn', 'SKILL.md');
|
|
53
57
|
assert.ok(fs.existsSync(learnSkillPath));
|
|
54
58
|
assert.match(fs.readFileSync(learnSkillPath, 'utf8'), /### 13\. Register the Learning/);
|
|
55
59
|
assert.match(fs.readFileSync(learnSkillPath, 'utf8'), /\.agents\/skills\/spectre-recall\/references\/registry\.toon/);
|
|
56
|
-
assert.ok(fs.existsSync(path.join(codeHome, 'skills', 'learn', 'references', 'recall-template.md')));
|
|
60
|
+
assert.ok(fs.existsSync(path.join(codeHome, 'skills', 'spectre-learn', 'references', 'recall-template.md')));
|
|
57
61
|
|
|
58
62
|
const agentPath = path.join(codeHome, 'spectre', 'agents', 'dev.toml');
|
|
59
63
|
assert.ok(fs.existsSync(agentPath));
|
|
@@ -335,7 +339,7 @@ test('project uninstall removes managed workflow skills, agent config, and proje
|
|
|
335
339
|
|
|
336
340
|
const codeHome = path.join(projectDir, '.codex');
|
|
337
341
|
|
|
338
|
-
assert.ok(!fs.existsSync(path.join(codeHome, 'skills', 'scope')));
|
|
342
|
+
assert.ok(!fs.existsSync(path.join(codeHome, 'skills', 'spectre-scope')));
|
|
339
343
|
assert.ok(!fs.existsSync(path.join(codeHome, 'spectre')));
|
|
340
344
|
|
|
341
345
|
const config = fs.readFileSync(path.join(codeHome, 'config.toml'), 'utf8');
|
package/src/lib/constants.js
CHANGED
|
@@ -29,18 +29,18 @@ export function listSpectreAgents() {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export const SHARED_SKILLS = [
|
|
32
|
-
'apply',
|
|
33
|
-
'guide',
|
|
34
|
-
'learn',
|
|
35
|
-
'tdd'
|
|
32
|
+
'spectre-apply',
|
|
33
|
+
'spectre-guide',
|
|
34
|
+
'spectre-learn',
|
|
35
|
+
'spectre-tdd'
|
|
36
36
|
];
|
|
37
37
|
|
|
38
38
|
export const WORKFLOW_PROBE_SKILLS = [
|
|
39
|
-
'scope',
|
|
40
|
-
'plan',
|
|
41
|
-
'execute',
|
|
42
|
-
'clean',
|
|
43
|
-
'test'
|
|
39
|
+
'spectre-scope',
|
|
40
|
+
'spectre-plan',
|
|
41
|
+
'spectre-execute',
|
|
42
|
+
'spectre-clean',
|
|
43
|
+
'spectre-test'
|
|
44
44
|
];
|
|
45
45
|
|
|
46
46
|
export function repoMetadata() {
|
package/src/lib/install.js
CHANGED
|
@@ -88,6 +88,10 @@ function managedCodexSkillNames({ requireGenerated = false } = {}) {
|
|
|
88
88
|
])).sort();
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
function legacyBareSkillName(skillName) {
|
|
92
|
+
return skillName.startsWith('spectre-') ? skillName.slice('spectre-'.length) : null;
|
|
93
|
+
}
|
|
94
|
+
|
|
91
95
|
function replaceDirectory(sourceDir, targetDir) {
|
|
92
96
|
if (!fs.existsSync(sourceDir)) {
|
|
93
97
|
throw new Error(`Missing generated Codex asset directory: ${sourceDir}. Run npm run sync-codex first.`);
|
|
@@ -104,12 +108,34 @@ function removeLegacyPrefixedSkillDirs() {
|
|
|
104
108
|
return;
|
|
105
109
|
}
|
|
106
110
|
|
|
111
|
+
const managedNames = managedCodexSkillNames();
|
|
112
|
+
|
|
107
113
|
for (const entry of fs.readdirSync(skillsRoot, { withFileTypes: true })) {
|
|
108
114
|
if (!entry.isDirectory() || !entry.name.startsWith('spectre-')) {
|
|
109
115
|
continue;
|
|
110
116
|
}
|
|
111
117
|
const bareName = entry.name.slice('spectre-'.length);
|
|
112
|
-
if (
|
|
118
|
+
if (managedNames.includes(bareName)) {
|
|
119
|
+
fs.rmSync(path.join(skillsRoot, entry.name), { recursive: true, force: true });
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function removeLegacyBareSkillDirs() {
|
|
125
|
+
const skillsRoot = codexSkillsDir();
|
|
126
|
+
if (!fs.existsSync(skillsRoot)) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const legacyNames = new Set(managedCodexSkillNames().map(legacyBareSkillName).filter(Boolean));
|
|
131
|
+
|
|
132
|
+
for (const entry of fs.readdirSync(skillsRoot, { withFileTypes: true })) {
|
|
133
|
+
if (!entry.isDirectory() || !legacyNames.has(entry.name)) {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const skillPath = path.join(skillsRoot, entry.name, 'SKILL.md');
|
|
138
|
+
if (fs.existsSync(skillPath)) {
|
|
113
139
|
fs.rmSync(path.join(skillsRoot, entry.name), { recursive: true, force: true });
|
|
114
140
|
}
|
|
115
141
|
}
|
|
@@ -121,6 +147,7 @@ function installGeneratedCodexSkills() {
|
|
|
121
147
|
ensureDir(skillsRoot);
|
|
122
148
|
|
|
123
149
|
removeLegacyPrefixedSkillDirs();
|
|
150
|
+
removeLegacyBareSkillDirs();
|
|
124
151
|
|
|
125
152
|
for (const skillName of managedCodexSkillNames({ requireGenerated: true })) {
|
|
126
153
|
const skillDir = path.join(skillsRoot, skillName);
|
|
@@ -250,6 +277,7 @@ export function uninstallCodex({ scope, projectDir }) {
|
|
|
250
277
|
}
|
|
251
278
|
|
|
252
279
|
removeLegacyPrefixedSkillDirs();
|
|
280
|
+
removeLegacyBareSkillDirs();
|
|
253
281
|
|
|
254
282
|
for (const skillName of managedCodexSkillNames()) {
|
|
255
283
|
const skillDir = path.join(codexSkillsDir(), skillName);
|
package/src/lib/knowledge.js
CHANGED
|
@@ -20,7 +20,9 @@ function rewriteProjectSkillPaths(content) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function rewriteCodexCommandRefs(content) {
|
|
23
|
-
return content.
|
|
23
|
+
return content.replace(/\/spectre:([A-Za-z0-9_-]+)/g, (_match, skillName) => {
|
|
24
|
+
return skillName.startsWith('spectre-') ? skillName : `spectre-${skillName}`;
|
|
25
|
+
});
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
function markUserInvocable(content, value = true) {
|
|
@@ -70,7 +72,7 @@ function pluginSkillPath(skillName) {
|
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
function recallTemplatePath() {
|
|
73
|
-
return path.join(spectrePluginRoot(), 'skills', 'learn', 'references', 'recall-template.md');
|
|
75
|
+
return path.join(spectrePluginRoot(), 'skills', 'spectre-learn', 'references', 'recall-template.md');
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
function pluginSkillContent(skillName) {
|
|
@@ -78,11 +80,11 @@ function pluginSkillContent(skillName) {
|
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
export function codexSharedSkillContent(skillName) {
|
|
81
|
-
if (skillName === 'apply') {
|
|
83
|
+
if (skillName === 'spectre-apply') {
|
|
82
84
|
return `${normalizeSkillMarkdown(rewriteCodexCommandRefs(rewriteProjectSkillPaths(pluginSkillContent(skillName))))}\n`;
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
if (skillName === 'learn') {
|
|
87
|
+
if (skillName === 'spectre-learn') {
|
|
86
88
|
return `${normalizeSkillMarkdown(markUserInvocable(rewriteCodexCommandRefs(codexPathConvention(codexLearnIntro(rewriteProjectSkillPaths(pluginSkillContent(skillName)))))))}\n`;
|
|
87
89
|
}
|
|
88
90
|
|
|
@@ -142,7 +144,7 @@ export function ensureKnowledgeFiles(projectDir) {
|
|
|
142
144
|
export function buildKnowledgeOverrideBody(projectDir) {
|
|
143
145
|
ensureKnowledgeFiles(projectDir);
|
|
144
146
|
const applyContent = stripFrontmatter(
|
|
145
|
-
rewriteCodexCommandRefs(rewriteProjectSkillPaths(pluginSkillContent('apply')))
|
|
147
|
+
rewriteCodexCommandRefs(rewriteProjectSkillPaths(pluginSkillContent('spectre-apply')))
|
|
146
148
|
);
|
|
147
149
|
|
|
148
150
|
return normalizeSkillMarkdown(applyContent);
|
package/src/pack.test.js
CHANGED
|
@@ -64,7 +64,7 @@ test('packed npm artifact installs Codex assets from generated tree', { concurre
|
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
const codexHome = path.join(projectDir, '.codex');
|
|
67
|
-
assert.ok(fs.existsSync(path.join(codexHome, 'skills', 'plan', 'SKILL.md')));
|
|
67
|
+
assert.ok(fs.existsSync(path.join(codexHome, 'skills', 'spectre-plan', 'SKILL.md')));
|
|
68
68
|
assert.ok(fs.existsSync(path.join(codexHome, 'spectre', 'agents', 'dev.toml')));
|
|
69
69
|
assert.ok(fs.existsSync(path.join(codexHome, 'spectre', 'hooks', 'scripts', 'load-knowledge.mjs')));
|
|
70
70
|
assert.ok(!fs.existsSync(path.join(codexHome, 'spectre', 'hooks', 'session-start.mjs')));
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 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
|
-
Load the `spectre-recall` skill and follow its instructions.
|
|
16
|
-
|
|
17
|
-
**Search query**: $ARGUMENTS
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "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
|
-
Load the `spectre-recall` skill and follow its instructions.
|
|
16
|
-
|
|
17
|
-
**Search query**: $ARGUMENTS
|
|
File without changes
|
|
File without changes
|