@codename_inc/spectre 3.7.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +3 -4
  2. package/package.json +3 -2
  3. package/plugins/spectre/.claude-plugin/plugin.json +1 -1
  4. package/plugins/spectre/bin/spectre-register +5 -0
  5. package/plugins/spectre/hooks/hooks.json +3 -14
  6. package/plugins/spectre/hooks/scripts/bootstrap.mjs +98 -0
  7. package/plugins/spectre/hooks/scripts/handoff-resume.mjs +404 -0
  8. package/plugins/spectre/hooks/scripts/lib.mjs +82 -0
  9. package/plugins/spectre/hooks/scripts/load-knowledge.mjs +189 -0
  10. package/plugins/spectre/hooks/scripts/register_learning.mjs +264 -0
  11. package/plugins/spectre/hooks/scripts/{test_bootstrap.cjs → test_bootstrap.mjs} +12 -7
  12. package/plugins/spectre/hooks/scripts/{test_handoff-resume.cjs → test_handoff-resume.mjs} +13 -11
  13. package/plugins/spectre/hooks/scripts/{test_load-knowledge.cjs → test_load-knowledge.mjs} +103 -22
  14. package/plugins/spectre/hooks/scripts/test_register-learning.mjs +335 -0
  15. package/plugins/spectre/skills/apply/SKILL.md +87 -0
  16. package/plugins/spectre/{commands/architecture_review.md → skills/architecture_review/SKILL.md} +9 -0
  17. package/plugins/spectre/{commands/clean.md → skills/clean/SKILL.md} +9 -0
  18. package/plugins/spectre/{commands/code_review.md → skills/code_review/SKILL.md} +9 -0
  19. package/plugins/spectre/{commands/create_plan.md → skills/create_plan/SKILL.md} +9 -0
  20. package/plugins/spectre/{commands/create_tasks.md → skills/create_tasks/SKILL.md} +9 -0
  21. package/plugins/spectre/{commands/create_test_guide.md → skills/create_test_guide/SKILL.md} +9 -0
  22. package/plugins/spectre/{commands/evaluate.md → skills/evaluate/SKILL.md} +11 -2
  23. package/plugins/spectre/{commands/execute.md → skills/execute/SKILL.md} +12 -3
  24. package/plugins/spectre/{commands/fix.md → skills/fix/SKILL.md} +9 -0
  25. package/plugins/spectre/{commands/forget.md → skills/forget/SKILL.md} +9 -0
  26. package/plugins/spectre/skills/{spectre-guide → guide}/SKILL.md +2 -1
  27. package/plugins/spectre/{commands/handoff.md → skills/handoff/SKILL.md} +9 -0
  28. package/plugins/spectre/{commands/kickoff.md → skills/kickoff/SKILL.md} +9 -0
  29. package/plugins/spectre/skills/{spectre-learn → learn}/SKILL.md +19 -59
  30. package/plugins/spectre/skills/learn/references/recall-template.md +34 -0
  31. package/plugins/spectre/{commands/plan.md → skills/plan/SKILL.md} +66 -25
  32. package/plugins/spectre/{commands/plan_review.md → skills/plan_review/SKILL.md} +9 -0
  33. package/plugins/spectre/{commands/quick_dev.md → skills/quick_dev/SKILL.md} +9 -0
  34. package/plugins/spectre/{commands/rebase.md → skills/rebase/SKILL.md} +9 -0
  35. package/plugins/spectre/skills/recall/SKILL.md +17 -0
  36. package/plugins/spectre/{commands/research.md → skills/research/SKILL.md} +9 -0
  37. package/plugins/spectre/{commands/scope.md → skills/scope/SKILL.md} +9 -0
  38. package/plugins/spectre/{commands/ship.md → skills/ship/SKILL.md} +9 -0
  39. package/plugins/spectre/{commands/sweep.md → skills/sweep/SKILL.md} +9 -0
  40. package/plugins/spectre/skills/tdd/SKILL.md +111 -0
  41. package/plugins/spectre/{commands/test.md → skills/test/SKILL.md} +9 -0
  42. package/plugins/spectre/{commands/ux_spec.md → skills/ux_spec/SKILL.md} +9 -0
  43. package/plugins/spectre/{commands/validate.md → skills/validate/SKILL.md} +9 -0
  44. package/plugins/spectre-codex/agents/analyst.toml +117 -0
  45. package/plugins/spectre-codex/agents/dev.toml +65 -0
  46. package/plugins/spectre-codex/agents/finder.toml +101 -0
  47. package/plugins/spectre-codex/agents/patterns.toml +203 -0
  48. package/plugins/spectre-codex/agents/reviewer.toml +123 -0
  49. package/plugins/spectre-codex/agents/sync.toml +146 -0
  50. package/plugins/spectre-codex/agents/tester.toml +205 -0
  51. package/plugins/spectre-codex/agents/web-research.toml +104 -0
  52. package/plugins/spectre-codex/hooks/hooks.json +23 -0
  53. package/plugins/{spectre/hooks/scripts/bootstrap.cjs → spectre-codex/hooks/scripts/bootstrap.mjs} +15 -16
  54. package/plugins/{spectre/hooks/scripts/handoff-resume.cjs → spectre-codex/hooks/scripts/handoff-resume.mjs} +21 -27
  55. package/plugins/{spectre/hooks/scripts/lib.cjs → spectre-codex/hooks/scripts/lib.mjs} +3 -4
  56. package/plugins/spectre-codex/hooks/scripts/load-knowledge.mjs +189 -0
  57. package/plugins/spectre-codex/hooks/scripts/register_learning.mjs +264 -0
  58. package/plugins/spectre-codex/skills/apply/SKILL.md +87 -0
  59. package/plugins/spectre-codex/skills/architecture_review/SKILL.md +129 -0
  60. package/plugins/spectre-codex/skills/clean/SKILL.md +322 -0
  61. package/plugins/spectre-codex/skills/code_review/SKILL.md +417 -0
  62. package/plugins/spectre-codex/skills/create_plan/SKILL.md +126 -0
  63. package/plugins/spectre-codex/skills/create_tasks/SKILL.md +383 -0
  64. package/plugins/spectre-codex/skills/create_test_guide/SKILL.md +129 -0
  65. package/plugins/spectre-codex/skills/evaluate/SKILL.md +59 -0
  66. package/plugins/spectre-codex/skills/execute/SKILL.md +96 -0
  67. package/plugins/spectre-codex/skills/fix/SKILL.md +70 -0
  68. package/plugins/spectre-codex/skills/forget/SKILL.md +67 -0
  69. package/plugins/spectre-codex/skills/guide/SKILL.md +359 -0
  70. package/plugins/spectre-codex/skills/handoff/SKILL.md +170 -0
  71. package/plugins/spectre-codex/skills/kickoff/SKILL.md +124 -0
  72. package/plugins/spectre-codex/skills/learn/SKILL.md +595 -0
  73. package/plugins/{spectre/skills/spectre-learn → spectre-codex/skills/learn}/references/recall-template.md +4 -1
  74. package/plugins/spectre-codex/skills/plan/SKILL.md +211 -0
  75. package/plugins/spectre-codex/skills/plan_review/SKILL.md +42 -0
  76. package/plugins/spectre-codex/skills/quick_dev/SKILL.md +110 -0
  77. package/plugins/spectre-codex/skills/rebase/SKILL.md +82 -0
  78. package/plugins/spectre-codex/skills/recall/SKILL.md +17 -0
  79. package/plugins/spectre-codex/skills/research/SKILL.md +168 -0
  80. package/plugins/spectre-codex/skills/scope/SKILL.md +128 -0
  81. package/plugins/spectre-codex/skills/ship/SKILL.md +181 -0
  82. package/plugins/spectre-codex/skills/sweep/SKILL.md +91 -0
  83. package/plugins/{spectre/skills/spectre-tdd → spectre-codex/skills/tdd}/SKILL.md +1 -1
  84. package/plugins/spectre-codex/skills/test/SKILL.md +389 -0
  85. package/plugins/spectre-codex/skills/ux_spec/SKILL.md +100 -0
  86. package/plugins/spectre-codex/skills/validate/SKILL.md +352 -0
  87. package/src/config.test.js +6 -5
  88. package/src/install.test.js +100 -11
  89. package/src/lib/config.js +107 -54
  90. package/src/lib/constants.js +17 -23
  91. package/src/lib/doctor.js +19 -22
  92. package/src/lib/install.js +98 -313
  93. package/src/lib/knowledge.js +7 -37
  94. package/src/lib/paths.js +0 -12
  95. package/src/pack.test.js +87 -0
  96. package/plugins/spectre/commands/learn.md +0 -15
  97. package/plugins/spectre/commands/recall.md +0 -5
  98. package/plugins/spectre/hooks/scripts/load-knowledge.cjs +0 -120
  99. package/plugins/spectre/hooks/scripts/precompact-warning.cjs +0 -19
  100. package/plugins/spectre/hooks/scripts/register_learning.cjs +0 -144
  101. package/plugins/spectre/hooks/scripts/test_register-learning.cjs +0 -146
  102. package/plugins/spectre/skills/spectre-apply/SKILL.md +0 -189
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: "scope"
3
+ description: "👻 | Interactively scope a feature or improvement, generating a complete Scope document that clarifies what's IN and OUT -- primary agent"
4
+ user-invocable: true
5
+ ---
6
+
7
+ # scope
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
+ # scope: Interactive Feature Scoping
14
+
15
+ Collaborative workflow for structuring unstructured thoughts into clear scope boundaries through contextual brainstorming and targeted clarifications. Focuses on user value and scope boundaries before technical considerations. Output: comprehensive scope document with clear boundaries, user value, and key decisions saved to `{OUT_DIR}/concepts/scope.md`.
16
+
17
+ ## ARGUMENTS
18
+
19
+ <ARGUMENTS> $ARGUMENTS </ARGUMENTS>
20
+
21
+ ## Step 1: Immediate Reply & Gather Context
22
+
23
+ - **Action** — ImmediateReply: Respond before any tools.
24
+ - **If** `FROM_KICKOFF=true` → acknowledge kickoff context, read `KICKOFF_DOC`, extract (Core Problem, User Value, Decisions Made, Remaining Ambiguities, Key Code Refs), **SKIP to Step 3**
25
+ - **Else If** ARGUMENTS empty → probe for context enthusiastically
26
+ - **Else** → proceed to Step 2
27
+ - **CRITICAL**: No tool calls except reading kickoff doc when FROM_KICKOFF=true
28
+
29
+ ## Step 2: Interactive Scope Exploration
30
+
31
+ **SKIP IF FROM_KICKOFF=true**
32
+
33
+ - **Action** — ExploreScope: Collaborative dialogue focused on boundaries and user experience.
34
+
35
+ **CRITICAL**: Focus on WHAT, not HOW. Defer all technical/implementation questions until scope boundaries are finalized. Only ask technical questions if the scope itself is inherently technical (e.g., "migrate database from X to Y").
36
+
37
+ **PATTERN**: Lead with a rich initial exploration. In your FIRST response, propose concrete hypotheses AND ask 5-8 questions across multiple dimensions. Give the user a full landscape to react to, not a single thread to follow.
38
+
39
+ **FIRST RESPONSE FORMAT**:
40
+
41
+ > Here's my initial read on this, plus questions to help us explore the bounds:
42
+ >
43
+ > **My hypothesis**: [problem statement, who it affects, proposed IN/OUT]
44
+ >
45
+ > **Questions to explore**:
46
+ > 1. [User problem question]
47
+ > 2. [UX flow question]
48
+ > 3. [Boundary edge question]
49
+ > 4. [Alternative approach question]
50
+ > 5. [Success criteria question]
51
+ > 6. [Edge case question]
52
+ > ...
53
+ >
54
+ > Answer any/all that spark thoughts. Skip what's obvious.
55
+
56
+ **Question types to include** (aim for 5-8 total, mix from these):
57
+
58
+ - **User & Problem**: Who feels this most? What triggers the need? What's the cost of not solving it?
59
+ - **UX & Feel**: Should this feel fast or thorough? Guided or flexible? What's the ideal flow?
60
+ - **Boundaries**: What about [adjacent thing]—IN or OUT? If unlimited time, what else? What's essential for v1?
61
+ - **Alternatives**: I could see this as [A] or [B]. Which direction?
62
+ - **Edge cases**: What happens when [unusual situation]? Should we handle [error state]?
63
+ - **Success**: What makes you say "this shipped well"? What's the one thing we can't get wrong?
64
+
65
+ **DO NOT ask about**: implementation approach, technical trade-offs, architecture, or integration details until boundaries are confirmed.
66
+
67
+ - **Action** — IterateBoundaries: After user responds, refine boundaries and ask targeted follow-ups on gaps.
68
+
69
+ > **Current Boundaries**: ✅ **IN**: \[list\] ❌ **OUT**: \[list\] ⚠️ **Unsure**: \[edge cases\]
70
+ >
71
+ > Any items to move? Add exclusions? Clarify edges? Reply 'looks good' to continue.
72
+
73
+ - **Wait** — User confirms Scope boundaries are accurate
74
+
75
+ ## Step 3: Generate Targeted Clarifications
76
+
77
+ - **Action** — DetermineOutputDir:
78
+
79
+ - **If** FROM_KICKOFF → use same dir as kickoff doc
80
+ - **Else** → `OUT_DIR = user_specified || docs/tasks/{branch_name}`
81
+ - `mkdir -p "$OUT_DIR"`
82
+
83
+ - **Action** — GenerateTargetedQuestions: Create 3-6 questions based ONLY on remaining scope ambiguities from Step 2 (or kickoff's "Remaining Ambiguities").
84
+
85
+ **CRITICAL**: Only ask about unresolved scope ambiguities. Technical questions (architecture, trade-offs, integration) belong in `plan`, not here.
86
+
87
+ - **Action** — SaveClarifications: Create `{OUT_DIR}/clarifications/scope_clarifications_{timestamp}.md`:
88
+
89
+ - Header: concept name, confirmed boundaries so far
90
+ - Questions: Each focused on a scope edge case with `<response></response>` block
91
+
92
+ - **Action** — PromptUser: "Saved clarifications to `{path}`. Answer in `<response>` blocks. Reply 'Read it' when ready."
93
+
94
+ - **Wait** — User replies
95
+
96
+ - **Action** — ReadClarifications: Read file, use responses (proceed with assumptions if empty)
97
+
98
+ ## Step 4: Create Scope Document
99
+
100
+ - **Action** — CreateScopeDoc: Generate `{OUT_DIR}/concepts/scope.md` (use scoped filename if exists).
101
+
102
+ **Priority**: User value and boundaries BEFORE technical details.
103
+
104
+ **Sections**: The Problem (pain, impact, current state) → Target Users (primary, secondary, needs) → Success Criteria (outcomes, metrics) → User Experience (journeys, principles, trade-offs) → Scope Boundaries (in/out/maybe/future) → Constraints (platform, perf, a11y, scale) → Integration (touches, avoids, dependencies) → Decisions (from clarifications + rationale) → Risks (UX, scope creep, open questions) → Next Steps (`plan` or `create_tasks`, complexity S/M/L)
105
+
106
+ ## Step 5: Light Technical Context (Optional)
107
+
108
+ **Only if scope identifies specific technical/architecture integration points.**
109
+
110
+ - **Action** — IdentifyTouchpoints: Identify desired areas of research, and dispatch parallel @analyst subagents to research each area. Surface-level only (component names, NOT implementation). List features this interacts with, constraints worth documenting, areas to avoid.
111
+
112
+ - **Action** — UpdateScopeDoc: Add findings to Integration & Constraints sections if relevant.
113
+
114
+ ## Step 6: Final Review & Next Steps
115
+
116
+ - **Action** — PresentDocForReview: Show final boundaries and next steps together.
117
+
118
+ > **Scope Complete**: `{OUT_DIR}/concepts/scope.md`
119
+ >
120
+ > **Final Boundaries**: ✅ **IN**: \[from doc\] ❌ **OUT**: \[from doc\] ⚠️ **Maybe/Future**: \[from doc\]
121
+ >
122
+ > Docs saved: `{OUT_DIR}/concepts/scope.md`, `{OUT_DIR}/clarifications/scope_clarifications_{timestamp}.md`
123
+ >
124
+ > Reply with any edits, updates, or clarifications — otherwise pick a next step:
125
+
126
+ - **Action** — RenderFooter: Render Next Steps using `Skill(spectre-guide)` skill.
127
+
128
+ > **NOTE**: Do NOT wait for explicit approval. Present next steps immediately inline with the review. User can reply with scope edits OR jump straight into a next step command. If user replies with edits, apply them to the scope doc and re-present.
@@ -0,0 +1,181 @@
1
+ ---
2
+ name: "ship"
3
+ description: "👻 | Autonomous end-to-end: brain dump -> scope -> TDD -> commit -> rebase -> PR"
4
+ user-invocable: true
5
+ ---
6
+
7
+ # ship
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
+ # ship: Autonomous End-to-End Delivery
14
+
15
+ Take a brain dump and autonomously produce a reviewable PR. Zero confirmation gates — scope, implement with TDD, sweep, rebase, and open a PR.
16
+
17
+ **Execution Style**: Fully autonomous. No user approval gates. Parse intent, build it, ship the PR.
18
+
19
+ ## ARGUMENTS
20
+
21
+ &lt;ARGUMENTS&gt; $ARGUMENTS &lt;/ARGUMENTS&gt;
22
+
23
+ ## Step (1/8) - Parse Context
24
+
25
+ - **Action** — ParseBrainDump: Extract from ARGUMENTS:
26
+ - `INTENT_TYPE`: `feat` or `fix` (infer from context — new behavior = feat, broken behavior = fix)
27
+ - `TARGET_BRANCH`: Extract if specified (e.g., "rebase onto develop"), default `origin/main`
28
+ - `SCOPE_SUMMARY`: 1-2 sentence distillation of what to build/fix
29
+ - `RELEVANT_FILES`: Any files, components, or areas mentioned
30
+ - `CONTEXT`: Remaining context, constraints, preferences
31
+ - **Action** — ValidateInput:
32
+ - **If** ARGUMENTS empty → ask user for brain dump, then proceed autonomously
33
+ - **Else** → proceed
34
+
35
+ ## Step (2/8) - Ensure Worktree
36
+
37
+ - **Action** — DetectBranch: `git rev-parse --abbrev-ref HEAD`
38
+ - **If** already in a worktree or on a non-main branch (not `main`, not `master`) → use current context, proceed
39
+ - **If** on `main` or `master` → use `EnterWorktree` to create an isolated worktree
40
+ - **Action** — SetBranchName: Capture current branch name as `BRANCH_NAME` for artifact paths
41
+
42
+ ## Step (3/8) - Quick Scope
43
+
44
+ - **Action** — DispatchResearch: Spawn parallel lightweight agents:
45
+
46
+ - `@finder` — Locate files related to `RELEVANT_FILES` and `SCOPE_SUMMARY`
47
+ - `@analyst` — Understand the relevant code area, key interfaces, existing patterns
48
+
49
+ - **Action** — WriteScopeDoc: Create `docs/tasks/{BRANCH_NAME}/concepts/scope.md`:
50
+
51
+ ```markdown
52
+ # Scope: {SCOPE_SUMMARY}
53
+
54
+ ## Objective
55
+ {1-2 sentences from brain dump}
56
+
57
+ ## Type
58
+ {feat or fix}
59
+
60
+ ## In Scope
61
+ - {bullet list of what will be done}
62
+
63
+ ## Out of Scope
64
+ - {what this explicitly won't touch}
65
+
66
+ ## Target Branch
67
+ {TARGET_BRANCH}
68
+
69
+ ## Key Files
70
+ {from research — relevant files and their roles}
71
+ ```
72
+
73
+ Keep it \~20 lines. This is a lightweight scope, not full `scope`.
74
+
75
+ ## Step (4/8) - Create Tasks
76
+
77
+ - **Action** — CreateTasks: Use `TaskCreate` to create 3-8 tasks proportional to scope complexity.
78
+ - Each task gets: clear `subject` (imperative), `description` (what to do + acceptance criteria), `activeForm` (present continuous)
79
+ - Order tasks by dependency — foundational work first
80
+ - Tasks are ephemeral and operational — no file artifact needed
81
+
82
+ ## Step (5/8) - Execute with TDD
83
+
84
+ - **Action** — ExecuteLoop: For each task sequentially:
85
+
86
+ 1. `TaskUpdate` → `in_progress`
87
+ 2. Load `Skill(spectre-tdd)` for TDD methodology
88
+ 3. Execute: RED (write failing test) → GREEN (minimal implementation) → REFACTOR (clean up)
89
+ 4. Commit with conventional format: `{INTENT_TYPE}({scope}): {description}`
90
+ 5. `TaskUpdate` → `completed`
91
+
92
+ **Rules**:
93
+
94
+ - One commit per task minimum
95
+ - Conventional commit format always
96
+ - TDD methodology for implementation tasks (skip for config/doc-only tasks)
97
+ - If a task reveals new work, create additional tasks rather than scope-creeping the current one
98
+
99
+ ## Step (6/8) - Sweep
100
+
101
+ Inline sweep — same checklist as `sweep`, no subagents:
102
+
103
+ ### 6.1 Diff Sanity Check
104
+
105
+ - Review full diff for unintentional changes (whitespace-only edits, merge artifacts)
106
+ - Verify no accidentally staged files outside the intended scope
107
+ - Confirm no secrets, API keys, credentials, or sensitive data in diff
108
+
109
+ ### 6.2 Logging Audit
110
+
111
+ - Remove temporary/debug logging (console.log, print, debug flags)
112
+ - Preserve intentional logs: errors, critical warnings, key state transitions
113
+ - Verify log levels are appropriate for production context
114
+
115
+ ### 6.3 Code Hygiene
116
+
117
+ - Remove commented-out code (it's in git history if needed)
118
+ - Resolve or document any TODO/FIXME/HACK introduced in this session
119
+ - Remove hardcoded test values that should be config/env
120
+
121
+ ### 6.4 Opportunistic Dead Code Cleanup
122
+
123
+ - Orphaned imports with no usage in the file
124
+ - Unused variables or functions declared but never referenced
125
+ - Debug artifacts (debugger statements, leftover TODO/FIXME from this work)
126
+
127
+ ### 6.5 Lint (Strict)
128
+
129
+ - Run the project linter and **fix all violations** — no skipping, no eslint-disable
130
+ - Address structural lint issues by refactoring, not suppressing
131
+
132
+ ### 6.6 Test
133
+
134
+ - Run affected tests + full test suite
135
+ - Fix any failures caused by the changes
136
+ - Do NOT write new tests here — that was done in Step 5
137
+
138
+ ### 6.7 Commit Sweep Fixes
139
+
140
+ - If sweep produced changes, commit: `chore({scope}): sweep cleanup`
141
+
142
+ ## Step (7/8) - Rebase
143
+
144
+ - **Action** — FetchLatest: `git fetch origin`
145
+ - **Action** — CreateSafetyRef: `git branch backup/ship-$(date +%Y%m%d-%H%M%S)`
146
+ - **Action** — Rebase: `git rebase {TARGET_BRANCH}`
147
+ - **If** conflicts → resolve automatically, favoring target branch conventions
148
+ - Track resolution decisions for PR summary
149
+ - **Action** — VerifyPostRebase:
150
+ - Run linter — fix violations
151
+ - Run full test suite — fix failures
152
+ - Confirm commit count and no unexpected changes
153
+
154
+ ## Step (8/8) - Create PR
155
+
156
+ - **Action** — PushBranch: `git push -u origin {BRANCH_NAME}`
157
+
158
+ - **Action** — CreatePR: `gh pr create` with:
159
+
160
+ **Title**: `{INTENT_TYPE}({scope}): {SCOPE_SUMMARY}` (under 70 chars)
161
+
162
+ **Body**:
163
+
164
+ ```markdown
165
+ ## Summary
166
+ {From scope doc — objective and what was done}
167
+
168
+ ## Changes
169
+ {Bulleted list derived from completed tasks}
170
+
171
+ ## Test Plan
172
+ {Bulleted checklist — what was tested, what to verify manually}
173
+
174
+ Shipped autonomously via `ship`
175
+ ```
176
+
177
+ - **Action** — OutputPRUrl: Display the PR URL as the final deliverable
178
+
179
+ ## Next Steps
180
+
181
+ Use `Skill(spectre-guide)` skill to render the Next Steps footer.
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: "sweep"
3
+ description: "👻 | Light pass cleanup - clean, lint, test, commit"
4
+ user-invocable: true
5
+ ---
6
+
7
+ # sweep
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
+
14
+ ## Pre-Commit Sweep
15
+
16
+ You are preparing uncommitted or recently committed changes for check-in. Perform a systematic cleanup, then commit with descriptive conventional commits.
17
+
18
+ **Execution Style**: Fast, formulaic checklist. No subagents, no user approval gates. Execute each step and move on.
19
+
20
+ ### 1. Diff Sanity Check
21
+
22
+ - Review full diff for unintentional changes (whitespace-only edits, merge artifacts)
23
+ - Verify no accidentally staged files outside the intended scope
24
+ - Confirm no secrets, API keys, credentials, or sensitive data in diff
25
+
26
+ ### 2. Logging Audit
27
+
28
+ - Remove temporary/debug logging (console.log, print, debug flags, etc.)
29
+ - Preserve intentional logs: errors, critical warnings, key state transitions
30
+ - Verify log levels are appropriate for production context
31
+
32
+ ### 3. Code Hygiene
33
+
34
+ - Remove commented-out code (it's in git history if needed)
35
+ - Resolve or document any TODO/FIXME/HACK introduced in this session
36
+ - Remove hardcoded test values that should be config/env
37
+
38
+ ### 4. Opportunistic Dead Code Cleanup
39
+
40
+ Quick scan of changed files only — remove anything obviously dead, no deep investigation:
41
+
42
+ - Orphaned imports with no usage in the file
43
+ - Unused variables or functions declared but never referenced
44
+ - Commented-out code blocks
45
+ - Debug artifacts (debugger statements, leftover TODO/FIXME from this work)
46
+
47
+ Do not hunt for dead code beyond the changed files. This is opportunistic, not forensic.
48
+
49
+ ### 5. Lint (Strict)
50
+
51
+ - Run the project linter and **fix all violations** — no skipping, no eslint-disable
52
+ - Address structural lint issues (file size, complexity thresholds) by refactoring, not suppressing
53
+ - Verify .gitignore coverage (no temp files, build artifacts, IDE configs)
54
+
55
+ ### 6. Test
56
+
57
+ - Identify test files related to the changed files (co-located tests, imports, shared modules)
58
+ - Run those tests and the broader test suite
59
+ - Fix any failures caused by the changes
60
+ - Do NOT write new tests in this step — this is a sweep, not a test authoring pass
61
+
62
+ ### 7. Commit
63
+
64
+ Group changes into logical conventional commits. Commits are project history and critical context for LLMs and future developers — invest in making them descriptive.
65
+
66
+ **Format**: `type(scope): description`
67
+
68
+ **Types**: feat, fix, refactor, test, chore, docs, style, perf
69
+
70
+ **Grouping** — separate commits by concern:
71
+ - Feature/behavior additions → `feat`
72
+ - Refactors/cleanup with no behavior change → `refactor`
73
+ - Bug fixes → `fix`
74
+ - Test additions/updates → `test`
75
+ - Config/dependency changes → `chore`
76
+ - Documentation → `docs`
77
+
78
+ **Commit message quality**:
79
+ - Subject line answers: what changed and why (not "fix stuff" or "update files")
80
+ - Include scope to locate the change: `feat(auth): add token refresh on 401 response`
81
+ - If the commit touches multiple concerns, it's too big — split it
82
+ - Body (optional) adds context: motivation, trade-offs, what was considered and rejected
83
+
84
+ **Anti-patterns**:
85
+ - `fix: updates` — says nothing
86
+ - `refactor: clean up` — clean up what? why?
87
+ - One giant commit for unrelated changes
88
+
89
+ ### 8. Render Footer
90
+
91
+ Use `Skill(spectre-guide)` skill for Next Steps footer.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: spectre-tdd
2
+ name: "tdd"
3
3
  description: "Load this skill when executing TDD (Test-Driven Development) methodology. Use when implementing features via strict RED-GREEN-REFACTOR cycles, or when a prompt instructs execution via TDD."
4
4
  ---
5
5