superpowers-spec 1.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.
- package/LICENSE +22 -0
- package/README.md +141 -0
- package/agents/code-reviewer.md +48 -0
- package/bin/openspec.js +3 -0
- package/bin/superpowers.js +3 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +482 -0
- package/dist/commands/change.d.ts +35 -0
- package/dist/commands/change.js +277 -0
- package/dist/commands/completion.d.ts +72 -0
- package/dist/commands/completion.js +257 -0
- package/dist/commands/config.d.ts +36 -0
- package/dist/commands/config.js +552 -0
- package/dist/commands/feedback.d.ts +9 -0
- package/dist/commands/feedback.js +183 -0
- package/dist/commands/schema.d.ts +6 -0
- package/dist/commands/schema.js +869 -0
- package/dist/commands/show.d.ts +14 -0
- package/dist/commands/show.js +132 -0
- package/dist/commands/spec.d.ts +15 -0
- package/dist/commands/spec.js +225 -0
- package/dist/commands/validate.d.ts +24 -0
- package/dist/commands/validate.js +294 -0
- package/dist/commands/workflow/index.d.ts +17 -0
- package/dist/commands/workflow/index.js +12 -0
- package/dist/commands/workflow/instructions.d.ts +29 -0
- package/dist/commands/workflow/instructions.js +381 -0
- package/dist/commands/workflow/new-change.d.ts +11 -0
- package/dist/commands/workflow/new-change.js +44 -0
- package/dist/commands/workflow/schemas.d.ts +10 -0
- package/dist/commands/workflow/schemas.js +34 -0
- package/dist/commands/workflow/shared.d.ts +57 -0
- package/dist/commands/workflow/shared.js +116 -0
- package/dist/commands/workflow/status.d.ts +14 -0
- package/dist/commands/workflow/status.js +75 -0
- package/dist/commands/workflow/templates.d.ts +16 -0
- package/dist/commands/workflow/templates.js +68 -0
- package/dist/core/archive.d.ts +11 -0
- package/dist/core/archive.js +318 -0
- package/dist/core/artifact-graph/graph.d.ts +56 -0
- package/dist/core/artifact-graph/graph.js +141 -0
- package/dist/core/artifact-graph/index.d.ts +7 -0
- package/dist/core/artifact-graph/index.js +13 -0
- package/dist/core/artifact-graph/instruction-loader.d.ts +143 -0
- package/dist/core/artifact-graph/instruction-loader.js +214 -0
- package/dist/core/artifact-graph/resolver.d.ts +81 -0
- package/dist/core/artifact-graph/resolver.js +257 -0
- package/dist/core/artifact-graph/schema.d.ts +13 -0
- package/dist/core/artifact-graph/schema.js +108 -0
- package/dist/core/artifact-graph/state.d.ts +12 -0
- package/dist/core/artifact-graph/state.js +54 -0
- package/dist/core/artifact-graph/types.d.ts +45 -0
- package/dist/core/artifact-graph/types.js +43 -0
- package/dist/core/available-tools.d.ts +16 -0
- package/dist/core/available-tools.js +30 -0
- package/dist/core/command-generation/adapters/amazon-q.d.ts +13 -0
- package/dist/core/command-generation/adapters/amazon-q.js +26 -0
- package/dist/core/command-generation/adapters/antigravity.d.ts +13 -0
- package/dist/core/command-generation/adapters/antigravity.js +26 -0
- package/dist/core/command-generation/adapters/auggie.d.ts +13 -0
- package/dist/core/command-generation/adapters/auggie.js +27 -0
- package/dist/core/command-generation/adapters/claude.d.ts +13 -0
- package/dist/core/command-generation/adapters/claude.js +50 -0
- package/dist/core/command-generation/adapters/cline.d.ts +14 -0
- package/dist/core/command-generation/adapters/cline.js +27 -0
- package/dist/core/command-generation/adapters/codebuddy.d.ts +13 -0
- package/dist/core/command-generation/adapters/codebuddy.js +28 -0
- package/dist/core/command-generation/adapters/codex.d.ts +16 -0
- package/dist/core/command-generation/adapters/codex.js +39 -0
- package/dist/core/command-generation/adapters/continue.d.ts +13 -0
- package/dist/core/command-generation/adapters/continue.js +28 -0
- package/dist/core/command-generation/adapters/costrict.d.ts +13 -0
- package/dist/core/command-generation/adapters/costrict.js +27 -0
- package/dist/core/command-generation/adapters/crush.d.ts +13 -0
- package/dist/core/command-generation/adapters/crush.js +30 -0
- package/dist/core/command-generation/adapters/cursor.d.ts +14 -0
- package/dist/core/command-generation/adapters/cursor.js +44 -0
- package/dist/core/command-generation/adapters/factory.d.ts +13 -0
- package/dist/core/command-generation/adapters/factory.js +27 -0
- package/dist/core/command-generation/adapters/gemini.d.ts +13 -0
- package/dist/core/command-generation/adapters/gemini.js +26 -0
- package/dist/core/command-generation/adapters/github-copilot.d.ts +13 -0
- package/dist/core/command-generation/adapters/github-copilot.js +26 -0
- package/dist/core/command-generation/adapters/iflow.d.ts +13 -0
- package/dist/core/command-generation/adapters/iflow.js +29 -0
- package/dist/core/command-generation/adapters/index.d.ts +29 -0
- package/dist/core/command-generation/adapters/index.js +29 -0
- package/dist/core/command-generation/adapters/kilocode.d.ts +14 -0
- package/dist/core/command-generation/adapters/kilocode.js +23 -0
- package/dist/core/command-generation/adapters/kiro.d.ts +13 -0
- package/dist/core/command-generation/adapters/kiro.js +26 -0
- package/dist/core/command-generation/adapters/opencode.d.ts +13 -0
- package/dist/core/command-generation/adapters/opencode.js +29 -0
- package/dist/core/command-generation/adapters/pi.d.ts +14 -0
- package/dist/core/command-generation/adapters/pi.js +41 -0
- package/dist/core/command-generation/adapters/qoder.d.ts +13 -0
- package/dist/core/command-generation/adapters/qoder.js +30 -0
- package/dist/core/command-generation/adapters/qwen.d.ts +13 -0
- package/dist/core/command-generation/adapters/qwen.js +26 -0
- package/dist/core/command-generation/adapters/roocode.d.ts +14 -0
- package/dist/core/command-generation/adapters/roocode.js +27 -0
- package/dist/core/command-generation/adapters/windsurf.d.ts +14 -0
- package/dist/core/command-generation/adapters/windsurf.js +51 -0
- package/dist/core/command-generation/generator.d.ts +21 -0
- package/dist/core/command-generation/generator.js +27 -0
- package/dist/core/command-generation/index.d.ts +22 -0
- package/dist/core/command-generation/index.js +24 -0
- package/dist/core/command-generation/registry.d.ts +36 -0
- package/dist/core/command-generation/registry.js +92 -0
- package/dist/core/command-generation/types.d.ts +56 -0
- package/dist/core/command-generation/types.js +8 -0
- package/dist/core/completions/command-registry.d.ts +7 -0
- package/dist/core/completions/command-registry.js +461 -0
- package/dist/core/completions/completion-provider.d.ts +60 -0
- package/dist/core/completions/completion-provider.js +102 -0
- package/dist/core/completions/factory.d.ts +64 -0
- package/dist/core/completions/factory.js +75 -0
- package/dist/core/completions/generators/bash-generator.d.ts +32 -0
- package/dist/core/completions/generators/bash-generator.js +174 -0
- package/dist/core/completions/generators/fish-generator.d.ts +32 -0
- package/dist/core/completions/generators/fish-generator.js +157 -0
- package/dist/core/completions/generators/powershell-generator.d.ts +33 -0
- package/dist/core/completions/generators/powershell-generator.js +207 -0
- package/dist/core/completions/generators/zsh-generator.d.ts +44 -0
- package/dist/core/completions/generators/zsh-generator.js +250 -0
- package/dist/core/completions/installers/bash-installer.d.ts +87 -0
- package/dist/core/completions/installers/bash-installer.js +318 -0
- package/dist/core/completions/installers/fish-installer.d.ts +43 -0
- package/dist/core/completions/installers/fish-installer.js +143 -0
- package/dist/core/completions/installers/powershell-installer.d.ts +88 -0
- package/dist/core/completions/installers/powershell-installer.js +327 -0
- package/dist/core/completions/installers/zsh-installer.d.ts +125 -0
- package/dist/core/completions/installers/zsh-installer.js +449 -0
- package/dist/core/completions/templates/bash-templates.d.ts +6 -0
- package/dist/core/completions/templates/bash-templates.js +24 -0
- package/dist/core/completions/templates/fish-templates.d.ts +7 -0
- package/dist/core/completions/templates/fish-templates.js +39 -0
- package/dist/core/completions/templates/powershell-templates.d.ts +6 -0
- package/dist/core/completions/templates/powershell-templates.js +25 -0
- package/dist/core/completions/templates/zsh-templates.d.ts +6 -0
- package/dist/core/completions/templates/zsh-templates.js +36 -0
- package/dist/core/completions/types.d.ts +79 -0
- package/dist/core/completions/types.js +2 -0
- package/dist/core/config-prompts.d.ts +9 -0
- package/dist/core/config-prompts.js +34 -0
- package/dist/core/config-schema.d.ts +86 -0
- package/dist/core/config-schema.js +213 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.js +33 -0
- package/dist/core/converters/json-converter.d.ts +6 -0
- package/dist/core/converters/json-converter.js +51 -0
- package/dist/core/global-config.d.ts +44 -0
- package/dist/core/global-config.js +125 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +3 -0
- package/dist/core/init.d.ts +39 -0
- package/dist/core/init.js +634 -0
- package/dist/core/legacy-cleanup.d.ts +162 -0
- package/dist/core/legacy-cleanup.js +512 -0
- package/dist/core/list.d.ts +9 -0
- package/dist/core/list.js +171 -0
- package/dist/core/migration.d.ts +23 -0
- package/dist/core/migration.js +108 -0
- package/dist/core/parsers/change-parser.d.ts +13 -0
- package/dist/core/parsers/change-parser.js +193 -0
- package/dist/core/parsers/markdown-parser.d.ts +22 -0
- package/dist/core/parsers/markdown-parser.js +187 -0
- package/dist/core/parsers/requirement-blocks.d.ts +37 -0
- package/dist/core/parsers/requirement-blocks.js +201 -0
- package/dist/core/profile-sync-drift.d.ts +38 -0
- package/dist/core/profile-sync-drift.js +200 -0
- package/dist/core/profiles.d.ts +26 -0
- package/dist/core/profiles.js +40 -0
- package/dist/core/project-config.d.ts +64 -0
- package/dist/core/project-config.js +223 -0
- package/dist/core/schemas/base.schema.d.ts +13 -0
- package/dist/core/schemas/base.schema.js +13 -0
- package/dist/core/schemas/change.schema.d.ts +73 -0
- package/dist/core/schemas/change.schema.js +31 -0
- package/dist/core/schemas/index.d.ts +4 -0
- package/dist/core/schemas/index.js +4 -0
- package/dist/core/schemas/spec.schema.d.ts +18 -0
- package/dist/core/schemas/spec.schema.js +15 -0
- package/dist/core/shared/index.d.ts +8 -0
- package/dist/core/shared/index.js +8 -0
- package/dist/core/shared/skill-generation.d.ts +49 -0
- package/dist/core/shared/skill-generation.js +96 -0
- package/dist/core/shared/tool-detection.d.ts +71 -0
- package/dist/core/shared/tool-detection.js +158 -0
- package/dist/core/specs-apply.d.ts +73 -0
- package/dist/core/specs-apply.js +384 -0
- package/dist/core/styles/palette.d.ts +7 -0
- package/dist/core/styles/palette.js +8 -0
- package/dist/core/templates/index.d.ts +8 -0
- package/dist/core/templates/index.js +9 -0
- package/dist/core/templates/skill-templates.d.ts +19 -0
- package/dist/core/templates/skill-templates.js +18 -0
- package/dist/core/templates/types.d.ts +19 -0
- package/dist/core/templates/types.js +5 -0
- package/dist/core/templates/workflows/apply-change.d.ts +10 -0
- package/dist/core/templates/workflows/apply-change.js +313 -0
- package/dist/core/templates/workflows/archive-change.d.ts +10 -0
- package/dist/core/templates/workflows/archive-change.js +271 -0
- package/dist/core/templates/workflows/bulk-archive-change.d.ts +10 -0
- package/dist/core/templates/workflows/bulk-archive-change.js +488 -0
- package/dist/core/templates/workflows/continue-change.d.ts +10 -0
- package/dist/core/templates/workflows/continue-change.js +232 -0
- package/dist/core/templates/workflows/explore.d.ts +10 -0
- package/dist/core/templates/workflows/explore.js +469 -0
- package/dist/core/templates/workflows/feedback.d.ts +9 -0
- package/dist/core/templates/workflows/feedback.js +108 -0
- package/dist/core/templates/workflows/ff-change.d.ts +10 -0
- package/dist/core/templates/workflows/ff-change.js +198 -0
- package/dist/core/templates/workflows/new-change.d.ts +10 -0
- package/dist/core/templates/workflows/new-change.js +143 -0
- package/dist/core/templates/workflows/onboard.d.ts +10 -0
- package/dist/core/templates/workflows/onboard.js +565 -0
- package/dist/core/templates/workflows/propose.d.ts +10 -0
- package/dist/core/templates/workflows/propose.js +223 -0
- package/dist/core/templates/workflows/sync-specs.d.ts +10 -0
- package/dist/core/templates/workflows/sync-specs.js +272 -0
- package/dist/core/templates/workflows/verify-change.d.ts +10 -0
- package/dist/core/templates/workflows/verify-change.js +332 -0
- package/dist/core/update.d.ts +77 -0
- package/dist/core/update.js +537 -0
- package/dist/core/validation/constants.d.ts +34 -0
- package/dist/core/validation/constants.js +40 -0
- package/dist/core/validation/types.d.ts +18 -0
- package/dist/core/validation/types.js +2 -0
- package/dist/core/validation/validator.d.ts +33 -0
- package/dist/core/validation/validator.js +409 -0
- package/dist/core/view.d.ts +8 -0
- package/dist/core/view.js +168 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/prompts/searchable-multi-select.d.ts +28 -0
- package/dist/prompts/searchable-multi-select.js +159 -0
- package/dist/telemetry/config.d.ts +32 -0
- package/dist/telemetry/config.js +68 -0
- package/dist/telemetry/index.d.ts +31 -0
- package/dist/telemetry/index.js +180 -0
- package/dist/ui/ascii-patterns.d.ts +16 -0
- package/dist/ui/ascii-patterns.js +133 -0
- package/dist/ui/welcome-screen.d.ts +10 -0
- package/dist/ui/welcome-screen.js +146 -0
- package/dist/utils/change-metadata.d.ts +51 -0
- package/dist/utils/change-metadata.js +147 -0
- package/dist/utils/change-utils.d.ts +62 -0
- package/dist/utils/change-utils.js +121 -0
- package/dist/utils/command-references.d.ts +18 -0
- package/dist/utils/command-references.js +20 -0
- package/dist/utils/file-system.d.ts +36 -0
- package/dist/utils/file-system.js +281 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/interactive.d.ts +18 -0
- package/dist/utils/interactive.js +21 -0
- package/dist/utils/item-discovery.d.ts +4 -0
- package/dist/utils/item-discovery.js +72 -0
- package/dist/utils/match.d.ts +3 -0
- package/dist/utils/match.js +22 -0
- package/dist/utils/shell-detection.d.ts +20 -0
- package/dist/utils/shell-detection.js +41 -0
- package/dist/utils/task-progress.d.ts +8 -0
- package/dist/utils/task-progress.js +36 -0
- package/extension-manifest.json +9 -0
- package/hooks/hooks.json +16 -0
- package/hooks/run-hook.cmd +46 -0
- package/hooks/session-start +51 -0
- package/package.json +87 -0
- package/schemas/spec-driven/schema.yaml +153 -0
- package/schemas/spec-driven/templates/design.md +19 -0
- package/schemas/spec-driven/templates/proposal.md +23 -0
- package/schemas/spec-driven/templates/spec.md +8 -0
- package/schemas/spec-driven/templates/tasks.md +9 -0
- package/scripts/postinstall.js +147 -0
- package/skills/dispatching-parallel-agents/SKILL.md +113 -0
- package/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/skills/receiving-code-review/SKILL.md +213 -0
- package/skills/requesting-code-review/SKILL.md +73 -0
- package/skills/requesting-code-review/code-reviewer.md +146 -0
- package/skills/subagent-driven-development/SKILL.md +98 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
- package/skills/subagent-driven-development/implementer-prompt.md +78 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/SKILL.md +356 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/using-git-worktrees/SKILL.md +212 -0
- package/skills/using-superpowers/SKILL.md +95 -0
- package/skills/verification-before-completion/SKILL.md +126 -0
- package/skills/writing-skills/SKILL.md +148 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
export function getSpProposeSkillTemplate() {
|
|
2
|
+
return {
|
|
3
|
+
name: 'superpowers-propose',
|
|
4
|
+
description: 'Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.',
|
|
5
|
+
instructions: `Propose a new change - create the change and generate all artifacts in one step.
|
|
6
|
+
|
|
7
|
+
I'll create a change with artifacts:
|
|
8
|
+
- proposal.md (what & why)
|
|
9
|
+
- design.md (how)
|
|
10
|
+
- tasks.md (implementation steps)
|
|
11
|
+
|
|
12
|
+
When ready to implement, run /sp:apply
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
17
|
+
|
|
18
|
+
**Steps**
|
|
19
|
+
|
|
20
|
+
1. **If no clear input provided, ask what they want to build**
|
|
21
|
+
|
|
22
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
23
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
24
|
+
|
|
25
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
26
|
+
|
|
27
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
28
|
+
|
|
29
|
+
2. **Create the change directory**
|
|
30
|
+
\`\`\`bash
|
|
31
|
+
superpowers new change "<name>"
|
|
32
|
+
\`\`\`
|
|
33
|
+
This creates a scaffolded change at \`superpowers/changes/<name>/\` with \`.superpowers.yaml\`.
|
|
34
|
+
|
|
35
|
+
3. **Get the artifact build order**
|
|
36
|
+
\`\`\`bash
|
|
37
|
+
superpowers status --change "<name>" --json
|
|
38
|
+
\`\`\`
|
|
39
|
+
Parse the JSON to get:
|
|
40
|
+
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
41
|
+
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
42
|
+
|
|
43
|
+
4. **Create artifacts in sequence until apply-ready**
|
|
44
|
+
|
|
45
|
+
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
46
|
+
|
|
47
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
48
|
+
|
|
49
|
+
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
50
|
+
- Get instructions:
|
|
51
|
+
\`\`\`bash
|
|
52
|
+
superpowers instructions <artifact-id> --change "<name>" --json
|
|
53
|
+
\`\`\`
|
|
54
|
+
- The instructions JSON includes:
|
|
55
|
+
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
56
|
+
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
57
|
+
- \`template\`: The structure to use for your output file
|
|
58
|
+
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
59
|
+
- \`outputPath\`: Where to write the artifact
|
|
60
|
+
- \`dependencies\`: Completed artifacts to read for context
|
|
61
|
+
- Read any completed dependency files for context
|
|
62
|
+
- Create the artifact file using \`template\` as the structure
|
|
63
|
+
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
64
|
+
- Show brief progress: "Created <artifact-id>"
|
|
65
|
+
|
|
66
|
+
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
67
|
+
- After creating each artifact, re-run \`superpowers status --change "<name>" --json\`
|
|
68
|
+
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
69
|
+
- Stop when all \`applyRequires\` artifacts are done
|
|
70
|
+
|
|
71
|
+
c. **If an artifact requires user input** (unclear context):
|
|
72
|
+
- Use **AskUserQuestion tool** to clarify
|
|
73
|
+
- Then continue with creation
|
|
74
|
+
|
|
75
|
+
5. **Show final status**
|
|
76
|
+
\`\`\`bash
|
|
77
|
+
superpowers status --change "<name>"
|
|
78
|
+
\`\`\`
|
|
79
|
+
|
|
80
|
+
**Output**
|
|
81
|
+
|
|
82
|
+
After completing all artifacts, summarize:
|
|
83
|
+
- Change name and location
|
|
84
|
+
- List of artifacts created with brief descriptions
|
|
85
|
+
- What's ready: "All artifacts created! Ready for implementation."
|
|
86
|
+
- Prompt: "Run \`/sp:apply\` or ask me to implement to start working on the tasks."
|
|
87
|
+
|
|
88
|
+
**Artifact Creation Guidelines**
|
|
89
|
+
|
|
90
|
+
- Follow the \`instruction\` field from \`superpowers instructions\` for each artifact type
|
|
91
|
+
- The schema defines what each artifact should contain - follow it
|
|
92
|
+
- Read dependency artifacts for context before creating new ones
|
|
93
|
+
- Use \`template\` as the structure for your output file - fill in its sections
|
|
94
|
+
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
95
|
+
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
96
|
+
- These guide what you write, but should never appear in the output
|
|
97
|
+
|
|
98
|
+
**Guardrails**
|
|
99
|
+
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
100
|
+
- Always read dependency artifacts before creating a new one
|
|
101
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
102
|
+
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
103
|
+
- Verify each artifact file exists after writing before proceeding to next
|
|
104
|
+
|
|
105
|
+
**Task Granularity in tasks.md**
|
|
106
|
+
- Each task should be bite-sized (2-5 minutes per step): write failing test → run it → implement minimal code → run tests → commit
|
|
107
|
+
- Tasks must include exact file paths, complete code snippets (not 'add validation'), and exact commands with expected output
|
|
108
|
+
- Follow DRY, YAGNI, TDD principles. Ensure frequent commits.
|
|
109
|
+
|
|
110
|
+
`,
|
|
111
|
+
license: 'MIT',
|
|
112
|
+
compatibility: 'Requires superpowers CLI.',
|
|
113
|
+
metadata: { author: 'superpowers', version: '1.0' },
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export function getSpProposeCommandTemplate() {
|
|
117
|
+
return {
|
|
118
|
+
name: 'SP: Propose',
|
|
119
|
+
description: 'Propose a new change - create it and generate all artifacts in one step',
|
|
120
|
+
category: 'Workflow',
|
|
121
|
+
tags: ['workflow', 'artifacts', 'experimental'],
|
|
122
|
+
content: `Propose a new change - create the change and generate all artifacts in one step.
|
|
123
|
+
|
|
124
|
+
I'll create a change with artifacts:
|
|
125
|
+
- proposal.md (what & why)
|
|
126
|
+
- design.md (how)
|
|
127
|
+
- tasks.md (implementation steps)
|
|
128
|
+
|
|
129
|
+
When ready to implement, run /sp:apply
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
**Input**: The argument after \`/sp:propose\` is the change name (kebab-case), OR a description of what the user wants to build.
|
|
134
|
+
|
|
135
|
+
**Steps**
|
|
136
|
+
|
|
137
|
+
1. **If no input provided, ask what they want to build**
|
|
138
|
+
|
|
139
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
140
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
141
|
+
|
|
142
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
143
|
+
|
|
144
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
145
|
+
|
|
146
|
+
2. **Create the change directory**
|
|
147
|
+
\`\`\`bash
|
|
148
|
+
superpowers new change "<name>"
|
|
149
|
+
\`\`\`
|
|
150
|
+
This creates a scaffolded change at \`superpowers/changes/<name>/\` with \`.superpowers.yaml\`.
|
|
151
|
+
|
|
152
|
+
3. **Get the artifact build order**
|
|
153
|
+
\`\`\`bash
|
|
154
|
+
superpowers status --change "<name>" --json
|
|
155
|
+
\`\`\`
|
|
156
|
+
Parse the JSON to get:
|
|
157
|
+
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
158
|
+
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
159
|
+
|
|
160
|
+
4. **Create artifacts in sequence until apply-ready**
|
|
161
|
+
|
|
162
|
+
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
163
|
+
|
|
164
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
165
|
+
|
|
166
|
+
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
167
|
+
- Get instructions:
|
|
168
|
+
\`\`\`bash
|
|
169
|
+
superpowers instructions <artifact-id> --change "<name>" --json
|
|
170
|
+
\`\`\`
|
|
171
|
+
- The instructions JSON includes:
|
|
172
|
+
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
173
|
+
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
174
|
+
- \`template\`: The structure to use for your output file
|
|
175
|
+
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
176
|
+
- \`outputPath\`: Where to write the artifact
|
|
177
|
+
- \`dependencies\`: Completed artifacts to read for context
|
|
178
|
+
- Read any completed dependency files for context
|
|
179
|
+
- Create the artifact file using \`template\` as the structure
|
|
180
|
+
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
181
|
+
- Show brief progress: "Created <artifact-id>"
|
|
182
|
+
|
|
183
|
+
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
184
|
+
- After creating each artifact, re-run \`superpowers status --change "<name>" --json\`
|
|
185
|
+
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
186
|
+
- Stop when all \`applyRequires\` artifacts are done
|
|
187
|
+
|
|
188
|
+
c. **If an artifact requires user input** (unclear context):
|
|
189
|
+
- Use **AskUserQuestion tool** to clarify
|
|
190
|
+
- Then continue with creation
|
|
191
|
+
|
|
192
|
+
5. **Show final status**
|
|
193
|
+
\`\`\`bash
|
|
194
|
+
superpowers status --change "<name>"
|
|
195
|
+
\`\`\`
|
|
196
|
+
|
|
197
|
+
**Output**
|
|
198
|
+
|
|
199
|
+
After completing all artifacts, summarize:
|
|
200
|
+
- Change name and location
|
|
201
|
+
- List of artifacts created with brief descriptions
|
|
202
|
+
- What's ready: "All artifacts created! Ready for implementation."
|
|
203
|
+
- Prompt: "Run \`/sp:apply\` to start implementing."
|
|
204
|
+
|
|
205
|
+
**Artifact Creation Guidelines**
|
|
206
|
+
|
|
207
|
+
- Follow the \`instruction\` field from \`superpowers instructions\` for each artifact type
|
|
208
|
+
- The schema defines what each artifact should contain - follow it
|
|
209
|
+
- Read dependency artifacts for context before creating new ones
|
|
210
|
+
- Use \`template\` as the structure for your output file - fill in its sections
|
|
211
|
+
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
212
|
+
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
213
|
+
- These guide what you write, but should never appear in the output
|
|
214
|
+
|
|
215
|
+
**Guardrails**
|
|
216
|
+
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
217
|
+
- Always read dependency artifacts before creating a new one
|
|
218
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
219
|
+
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
220
|
+
- Verify each artifact file exists after writing before proceeding to next`
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=propose.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill Template Workflow Modules
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by splitting the legacy monolithic
|
|
5
|
+
* templates file into workflow-focused modules.
|
|
6
|
+
*/
|
|
7
|
+
import type { SkillTemplate, CommandTemplate } from '../types.js';
|
|
8
|
+
export declare function getSyncSpecsSkillTemplate(): SkillTemplate;
|
|
9
|
+
export declare function getSpSyncCommandTemplate(): CommandTemplate;
|
|
10
|
+
//# sourceMappingURL=sync-specs.d.ts.map
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
export function getSyncSpecsSkillTemplate() {
|
|
2
|
+
return {
|
|
3
|
+
name: 'superpowers-sync-specs',
|
|
4
|
+
description: 'Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.',
|
|
5
|
+
instructions: `Sync delta specs from a change to main specs.
|
|
6
|
+
|
|
7
|
+
This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
|
|
8
|
+
|
|
9
|
+
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
10
|
+
|
|
11
|
+
**Steps**
|
|
12
|
+
|
|
13
|
+
1. **If no change name provided, prompt for selection**
|
|
14
|
+
|
|
15
|
+
Run \`superpowers list --json\` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
16
|
+
|
|
17
|
+
Show changes that have delta specs (under \`specs/\` directory).
|
|
18
|
+
|
|
19
|
+
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
20
|
+
|
|
21
|
+
2. **Find delta specs**
|
|
22
|
+
|
|
23
|
+
Look for delta spec files in \`superpowers/changes/<name>/specs/*/spec.md\`.
|
|
24
|
+
|
|
25
|
+
Each delta spec file contains sections like:
|
|
26
|
+
- \`## ADDED Requirements\` - New requirements to add
|
|
27
|
+
- \`## MODIFIED Requirements\` - Changes to existing requirements
|
|
28
|
+
- \`## REMOVED Requirements\` - Requirements to remove
|
|
29
|
+
- \`## RENAMED Requirements\` - Requirements to rename (FROM:/TO: format)
|
|
30
|
+
|
|
31
|
+
If no delta specs found, inform user and stop.
|
|
32
|
+
|
|
33
|
+
3. **For each delta spec, apply changes to main specs**
|
|
34
|
+
|
|
35
|
+
For each capability with a delta spec at \`superpowers/changes/<name>/specs/<capability>/spec.md\`:
|
|
36
|
+
|
|
37
|
+
a. **Read the delta spec** to understand the intended changes
|
|
38
|
+
|
|
39
|
+
b. **Read the main spec** at \`superpowers/specs/<capability>/spec.md\` (may not exist yet)
|
|
40
|
+
|
|
41
|
+
c. **Apply changes intelligently**:
|
|
42
|
+
|
|
43
|
+
**ADDED Requirements:**
|
|
44
|
+
- If requirement doesn't exist in main spec → add it
|
|
45
|
+
- If requirement already exists → update it to match (treat as implicit MODIFIED)
|
|
46
|
+
|
|
47
|
+
**MODIFIED Requirements:**
|
|
48
|
+
- Find the requirement in main spec
|
|
49
|
+
- Apply the changes - this can be:
|
|
50
|
+
- Adding new scenarios (don't need to copy existing ones)
|
|
51
|
+
- Modifying existing scenarios
|
|
52
|
+
- Changing the requirement description
|
|
53
|
+
- Preserve scenarios/content not mentioned in the delta
|
|
54
|
+
|
|
55
|
+
**REMOVED Requirements:**
|
|
56
|
+
- Remove the entire requirement block from main spec
|
|
57
|
+
|
|
58
|
+
**RENAMED Requirements:**
|
|
59
|
+
- Find the FROM requirement, rename to TO
|
|
60
|
+
|
|
61
|
+
d. **Create new main spec** if capability doesn't exist yet:
|
|
62
|
+
- Create \`superpowers/specs/<capability>/spec.md\`
|
|
63
|
+
- Add Purpose section (can be brief, mark as TBD)
|
|
64
|
+
- Add Requirements section with the ADDED requirements
|
|
65
|
+
|
|
66
|
+
4. **Show summary**
|
|
67
|
+
|
|
68
|
+
After applying all changes, summarize:
|
|
69
|
+
- Which capabilities were updated
|
|
70
|
+
- What changes were made (requirements added/modified/removed/renamed)
|
|
71
|
+
|
|
72
|
+
**Delta Spec Format Reference**
|
|
73
|
+
|
|
74
|
+
\`\`\`markdown
|
|
75
|
+
## ADDED Requirements
|
|
76
|
+
|
|
77
|
+
### Requirement: New Feature
|
|
78
|
+
The system SHALL do something new.
|
|
79
|
+
|
|
80
|
+
#### Scenario: Basic case
|
|
81
|
+
- **WHEN** user does X
|
|
82
|
+
- **THEN** system does Y
|
|
83
|
+
|
|
84
|
+
## MODIFIED Requirements
|
|
85
|
+
|
|
86
|
+
### Requirement: Existing Feature
|
|
87
|
+
#### Scenario: New scenario to add
|
|
88
|
+
- **WHEN** user does A
|
|
89
|
+
- **THEN** system does B
|
|
90
|
+
|
|
91
|
+
## REMOVED Requirements
|
|
92
|
+
|
|
93
|
+
### Requirement: Deprecated Feature
|
|
94
|
+
|
|
95
|
+
## RENAMED Requirements
|
|
96
|
+
|
|
97
|
+
- FROM: \`### Requirement: Old Name\`
|
|
98
|
+
- TO: \`### Requirement: New Name\`
|
|
99
|
+
\`\`\`
|
|
100
|
+
|
|
101
|
+
**Key Principle: Intelligent Merging**
|
|
102
|
+
|
|
103
|
+
Unlike programmatic merging, you can apply **partial updates**:
|
|
104
|
+
- To add a scenario, just include that scenario under MODIFIED - don't copy existing scenarios
|
|
105
|
+
- The delta represents *intent*, not a wholesale replacement
|
|
106
|
+
- Use your judgment to merge changes sensibly
|
|
107
|
+
|
|
108
|
+
**Output On Success**
|
|
109
|
+
|
|
110
|
+
\`\`\`
|
|
111
|
+
## Specs Synced: <change-name>
|
|
112
|
+
|
|
113
|
+
Updated main specs:
|
|
114
|
+
|
|
115
|
+
**<capability-1>**:
|
|
116
|
+
- Added requirement: "New Feature"
|
|
117
|
+
- Modified requirement: "Existing Feature" (added 1 scenario)
|
|
118
|
+
|
|
119
|
+
**<capability-2>**:
|
|
120
|
+
- Created new spec file
|
|
121
|
+
- Added requirement: "Another Feature"
|
|
122
|
+
|
|
123
|
+
Main specs are now updated. The change remains active - archive when implementation is complete.
|
|
124
|
+
\`\`\`
|
|
125
|
+
|
|
126
|
+
**Guardrails**
|
|
127
|
+
- Read both delta and main specs before making changes
|
|
128
|
+
- Preserve existing content not mentioned in delta
|
|
129
|
+
- If something is unclear, ask for clarification
|
|
130
|
+
- Show what you're changing as you go
|
|
131
|
+
- The operation should be idempotent - running twice should give same result`,
|
|
132
|
+
license: 'MIT',
|
|
133
|
+
compatibility: 'Requires superpowers CLI.',
|
|
134
|
+
metadata: { author: 'superpowers', version: '1.0' },
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export function getSpSyncCommandTemplate() {
|
|
138
|
+
return {
|
|
139
|
+
name: 'SP: Sync',
|
|
140
|
+
description: 'Sync delta specs from a change to main specs',
|
|
141
|
+
category: 'Workflow',
|
|
142
|
+
tags: ['workflow', 'specs', 'experimental'],
|
|
143
|
+
content: `Sync delta specs from a change to main specs.
|
|
144
|
+
|
|
145
|
+
This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
|
|
146
|
+
|
|
147
|
+
**Input**: Optionally specify a change name after \`/sp:sync\` (e.g., \`/sp:sync add-auth\`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
148
|
+
|
|
149
|
+
**Steps**
|
|
150
|
+
|
|
151
|
+
1. **If no change name provided, prompt for selection**
|
|
152
|
+
|
|
153
|
+
Run \`superpowers list --json\` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
154
|
+
|
|
155
|
+
Show changes that have delta specs (under \`specs/\` directory).
|
|
156
|
+
|
|
157
|
+
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
158
|
+
|
|
159
|
+
2. **Find delta specs**
|
|
160
|
+
|
|
161
|
+
Look for delta spec files in \`superpowers/changes/<name>/specs/*/spec.md\`.
|
|
162
|
+
|
|
163
|
+
Each delta spec file contains sections like:
|
|
164
|
+
- \`## ADDED Requirements\` - New requirements to add
|
|
165
|
+
- \`## MODIFIED Requirements\` - Changes to existing requirements
|
|
166
|
+
- \`## REMOVED Requirements\` - Requirements to remove
|
|
167
|
+
- \`## RENAMED Requirements\` - Requirements to rename (FROM:/TO: format)
|
|
168
|
+
|
|
169
|
+
If no delta specs found, inform user and stop.
|
|
170
|
+
|
|
171
|
+
3. **For each delta spec, apply changes to main specs**
|
|
172
|
+
|
|
173
|
+
For each capability with a delta spec at \`superpowers/changes/<name>/specs/<capability>/spec.md\`:
|
|
174
|
+
|
|
175
|
+
a. **Read the delta spec** to understand the intended changes
|
|
176
|
+
|
|
177
|
+
b. **Read the main spec** at \`superpowers/specs/<capability>/spec.md\` (may not exist yet)
|
|
178
|
+
|
|
179
|
+
c. **Apply changes intelligently**:
|
|
180
|
+
|
|
181
|
+
**ADDED Requirements:**
|
|
182
|
+
- If requirement doesn't exist in main spec → add it
|
|
183
|
+
- If requirement already exists → update it to match (treat as implicit MODIFIED)
|
|
184
|
+
|
|
185
|
+
**MODIFIED Requirements:**
|
|
186
|
+
- Find the requirement in main spec
|
|
187
|
+
- Apply the changes - this can be:
|
|
188
|
+
- Adding new scenarios (don't need to copy existing ones)
|
|
189
|
+
- Modifying existing scenarios
|
|
190
|
+
- Changing the requirement description
|
|
191
|
+
- Preserve scenarios/content not mentioned in the delta
|
|
192
|
+
|
|
193
|
+
**REMOVED Requirements:**
|
|
194
|
+
- Remove the entire requirement block from main spec
|
|
195
|
+
|
|
196
|
+
**RENAMED Requirements:**
|
|
197
|
+
- Find the FROM requirement, rename to TO
|
|
198
|
+
|
|
199
|
+
d. **Create new main spec** if capability doesn't exist yet:
|
|
200
|
+
- Create \`superpowers/specs/<capability>/spec.md\`
|
|
201
|
+
- Add Purpose section (can be brief, mark as TBD)
|
|
202
|
+
- Add Requirements section with the ADDED requirements
|
|
203
|
+
|
|
204
|
+
4. **Show summary**
|
|
205
|
+
|
|
206
|
+
After applying all changes, summarize:
|
|
207
|
+
- Which capabilities were updated
|
|
208
|
+
- What changes were made (requirements added/modified/removed/renamed)
|
|
209
|
+
|
|
210
|
+
**Delta Spec Format Reference**
|
|
211
|
+
|
|
212
|
+
\`\`\`markdown
|
|
213
|
+
## ADDED Requirements
|
|
214
|
+
|
|
215
|
+
### Requirement: New Feature
|
|
216
|
+
The system SHALL do something new.
|
|
217
|
+
|
|
218
|
+
#### Scenario: Basic case
|
|
219
|
+
- **WHEN** user does X
|
|
220
|
+
- **THEN** system does Y
|
|
221
|
+
|
|
222
|
+
## MODIFIED Requirements
|
|
223
|
+
|
|
224
|
+
### Requirement: Existing Feature
|
|
225
|
+
#### Scenario: New scenario to add
|
|
226
|
+
- **WHEN** user does A
|
|
227
|
+
- **THEN** system does B
|
|
228
|
+
|
|
229
|
+
## REMOVED Requirements
|
|
230
|
+
|
|
231
|
+
### Requirement: Deprecated Feature
|
|
232
|
+
|
|
233
|
+
## RENAMED Requirements
|
|
234
|
+
|
|
235
|
+
- FROM: \`### Requirement: Old Name\`
|
|
236
|
+
- TO: \`### Requirement: New Name\`
|
|
237
|
+
\`\`\`
|
|
238
|
+
|
|
239
|
+
**Key Principle: Intelligent Merging**
|
|
240
|
+
|
|
241
|
+
Unlike programmatic merging, you can apply **partial updates**:
|
|
242
|
+
- To add a scenario, just include that scenario under MODIFIED - don't copy existing scenarios
|
|
243
|
+
- The delta represents *intent*, not a wholesale replacement
|
|
244
|
+
- Use your judgment to merge changes sensibly
|
|
245
|
+
|
|
246
|
+
**Output On Success**
|
|
247
|
+
|
|
248
|
+
\`\`\`
|
|
249
|
+
## Specs Synced: <change-name>
|
|
250
|
+
|
|
251
|
+
Updated main specs:
|
|
252
|
+
|
|
253
|
+
**<capability-1>**:
|
|
254
|
+
- Added requirement: "New Feature"
|
|
255
|
+
- Modified requirement: "Existing Feature" (added 1 scenario)
|
|
256
|
+
|
|
257
|
+
**<capability-2>**:
|
|
258
|
+
- Created new spec file
|
|
259
|
+
- Added requirement: "Another Feature"
|
|
260
|
+
|
|
261
|
+
Main specs are now updated. The change remains active - archive when implementation is complete.
|
|
262
|
+
\`\`\`
|
|
263
|
+
|
|
264
|
+
**Guardrails**
|
|
265
|
+
- Read both delta and main specs before making changes
|
|
266
|
+
- Preserve existing content not mentioned in delta
|
|
267
|
+
- If something is unclear, ask for clarification
|
|
268
|
+
- Show what you're changing as you go
|
|
269
|
+
- The operation should be idempotent - running twice should give same result`
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=sync-specs.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill Template Workflow Modules
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by splitting the legacy monolithic
|
|
5
|
+
* templates file into workflow-focused modules.
|
|
6
|
+
*/
|
|
7
|
+
import type { SkillTemplate, CommandTemplate } from '../types.js';
|
|
8
|
+
export declare function getVerifyChangeSkillTemplate(): SkillTemplate;
|
|
9
|
+
export declare function getSpVerifyCommandTemplate(): CommandTemplate;
|
|
10
|
+
//# sourceMappingURL=verify-change.d.ts.map
|