@codename_inc/spectre 5.2.2 → 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- package/plugins/spectre/skills/{plan_review → spectre-plan_review}/SKILL.md +1 -1
- 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 +1 -1
- 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 +4 -4
- package/plugins/spectre-codex/skills/{plan_review → spectre-plan_review}/SKILL.md +3 -3
- 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: 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
|
---
|
|
@@ -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**: After tier routing, this workflow MUST invoke nested workflows via the Skill tool. LIGHT must invoke `Skill(create_plan)` and `Skill(create_tasks)`; STANDARD/COMPREHENSIVE must invoke `Skill(create_plan)`, `Skill(create_tasks)`, and `Skill(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.
|
|
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
|
|
|
@@ -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
|
|
@@ -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 });
|
|
@@ -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: "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)
|