@codewalla_india/openspec 1.3.1 → 1.3.3
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 -22
- package/README.md +214 -133
- package/bin/openspec.js +5 -5
- package/dist/cli/index.js +99 -62
- package/dist/commands/change.d.ts +0 -2
- package/dist/commands/change.js +107 -86
- package/dist/commands/config.js +14 -16
- package/dist/commands/doctor.js +9 -4
- package/dist/commands/feedback.js +79 -30
- package/dist/commands/modify.d.ts +26 -0
- package/dist/commands/modify.js +147 -0
- package/dist/commands/schema.js +170 -91
- package/dist/commands/show.js +5 -2
- package/dist/commands/spec.js +49 -29
- package/dist/commands/store.js +15 -21
- package/dist/commands/validate.d.ts +8 -0
- package/dist/commands/validate.js +43 -20
- package/dist/commands/workflow/index.d.ts +2 -2
- package/dist/commands/workflow/index.js +1 -1
- package/dist/commands/workflow/instructions.d.ts +6 -26
- package/dist/commands/workflow/instructions.js +183 -376
- package/dist/commands/workflow/new-change.d.ts +0 -4
- package/dist/commands/workflow/new-change.js +10 -28
- package/dist/commands/workflow/shared.d.ts +34 -19
- package/dist/commands/workflow/shared.js +34 -4
- package/dist/commands/workflow/status.js +10 -32
- package/dist/commands/workflow/templates.js +15 -5
- package/dist/commands/workset.d.ts +2 -2
- package/dist/commands/workset.js +19 -22
- package/dist/comprehension-quiz/fingerprint.d.ts +39 -0
- package/dist/comprehension-quiz/fingerprint.js +84 -0
- package/dist/comprehension-quiz/index.d.ts +42 -0
- package/dist/comprehension-quiz/index.js +47 -0
- package/dist/comprehension-quiz/pass-record.d.ts +44 -0
- package/dist/comprehension-quiz/pass-record.js +98 -0
- package/dist/comprehension-quiz/providers/anthropic.d.ts +35 -0
- package/dist/comprehension-quiz/providers/anthropic.js +69 -0
- package/dist/comprehension-quiz/providers/factory.d.ts +44 -0
- package/dist/comprehension-quiz/providers/factory.js +174 -0
- package/dist/comprehension-quiz/providers/interface.d.ts +98 -0
- package/dist/comprehension-quiz/providers/interface.js +150 -0
- package/dist/comprehension-quiz/providers/local.d.ts +35 -0
- package/dist/comprehension-quiz/providers/local.js +69 -0
- package/dist/comprehension-quiz/providers/ollama.d.ts +35 -0
- package/dist/comprehension-quiz/providers/ollama.js +69 -0
- package/dist/comprehension-quiz/providers/openai.d.ts +35 -0
- package/dist/comprehension-quiz/providers/openai.js +72 -0
- package/dist/comprehension-quiz/question-generator.d.ts +117 -0
- package/dist/comprehension-quiz/question-generator.js +203 -0
- package/dist/comprehension-quiz/quiz-executor.d.ts +75 -0
- package/dist/comprehension-quiz/quiz-executor.js +181 -0
- package/dist/comprehension-quiz/types.d.ts +137 -0
- package/dist/comprehension-quiz/types.js +11 -0
- package/dist/core/archive.d.ts +14 -1
- package/dist/core/archive.js +1350 -190
- package/dist/core/artifact-graph/graph.d.ts +28 -9
- package/dist/core/artifact-graph/graph.js +94 -43
- package/dist/core/artifact-graph/index.d.ts +1 -1
- package/dist/core/artifact-graph/index.js +1 -1
- package/dist/core/artifact-graph/instruction-loader.d.ts +30 -3
- package/dist/core/artifact-graph/instruction-loader.js +70 -12
- package/dist/core/artifact-graph/outputs.d.ts +1 -0
- package/dist/core/artifact-graph/outputs.js +67 -5
- package/dist/core/artifact-graph/resolver.d.ts +14 -0
- package/dist/core/artifact-graph/resolver.js +69 -15
- package/dist/core/artifact-graph/types.js +21 -3
- package/dist/core/available-tools.d.ts +2 -2
- package/dist/core/available-tools.js +14 -3
- package/dist/core/change-metadata/schema.d.ts +2 -0
- package/dist/core/change-metadata/schema.js +13 -0
- package/dist/core/change-status-policy.d.ts +10 -1
- package/dist/core/change-status-policy.js +30 -2
- package/dist/core/command-generation/adapters/amazon-q.d.ts +4 -0
- package/dist/core/command-generation/adapters/amazon-q.js +11 -5
- package/dist/core/command-generation/adapters/antigravity.js +6 -5
- package/dist/core/command-generation/adapters/auggie.js +7 -6
- package/dist/core/command-generation/adapters/bob.d.ts +5 -1
- package/dist/core/command-generation/adapters/bob.js +11 -10
- package/dist/core/command-generation/adapters/claude.d.ts +1 -1
- package/dist/core/command-generation/adapters/claude.js +12 -17
- package/dist/core/command-generation/adapters/cline.js +5 -5
- package/dist/core/command-generation/adapters/codebuddy.js +8 -7
- package/dist/core/command-generation/adapters/continue.js +8 -7
- package/dist/core/command-generation/adapters/costrict.js +7 -6
- package/dist/core/command-generation/adapters/crush.js +9 -9
- package/dist/core/command-generation/adapters/cursor.js +8 -8
- package/dist/core/command-generation/adapters/devin.d.ts +19 -0
- package/dist/core/command-generation/adapters/devin.js +36 -0
- package/dist/core/command-generation/adapters/factory.js +7 -6
- package/dist/core/command-generation/adapters/gemini.js +40 -5
- package/dist/core/command-generation/adapters/github-copilot.js +6 -5
- package/dist/core/command-generation/adapters/iflow.js +9 -8
- package/dist/core/command-generation/adapters/index.d.ts +4 -2
- package/dist/core/command-generation/adapters/index.js +4 -2
- package/dist/core/command-generation/adapters/junie.js +6 -5
- package/dist/core/command-generation/adapters/kilocode.js +1 -1
- package/dist/core/command-generation/adapters/kiro.js +6 -5
- package/dist/core/command-generation/adapters/lingma.js +9 -9
- package/dist/core/command-generation/adapters/oh-my-pi.d.ts +21 -0
- package/dist/core/command-generation/adapters/oh-my-pi.js +42 -0
- package/dist/core/command-generation/adapters/opencode.js +6 -8
- package/dist/core/command-generation/adapters/pi.d.ts +2 -2
- package/dist/core/command-generation/adapters/pi.js +7 -10
- package/dist/core/command-generation/adapters/qoder.js +9 -9
- package/dist/core/command-generation/adapters/qwen.d.ts +7 -3
- package/dist/core/command-generation/adapters/qwen.js +14 -9
- package/dist/core/command-generation/adapters/roocode.d.ts +4 -4
- package/dist/core/command-generation/adapters/roocode.js +9 -9
- package/dist/core/command-generation/adapters/trae.d.ts +13 -0
- package/dist/core/command-generation/adapters/trae.js +28 -0
- package/dist/core/command-generation/adapters/zcode.d.ts +16 -0
- package/dist/core/command-generation/adapters/zcode.js +33 -0
- package/dist/core/command-generation/generator.d.ts +8 -0
- package/dist/core/command-generation/generator.js +15 -1
- package/dist/core/command-generation/index.d.ts +1 -1
- package/dist/core/command-generation/index.js +1 -1
- package/dist/core/command-generation/invocation.d.ts +73 -0
- package/dist/core/command-generation/invocation.js +77 -0
- package/dist/core/command-generation/registry.js +8 -4
- package/dist/core/command-generation/types.d.ts +9 -2
- package/dist/core/command-generation/yaml.d.ts +20 -6
- package/dist/core/command-generation/yaml.js +31 -21
- package/dist/core/command-surface.d.ts +15 -0
- package/dist/core/command-surface.js +33 -0
- package/dist/core/completions/command-registry.js +16 -61
- package/dist/core/completions/generators/bash-generator.js +41 -41
- package/dist/core/completions/generators/fish-generator.js +7 -7
- package/dist/core/completions/generators/powershell-generator.js +44 -37
- package/dist/core/completions/generators/zsh-generator.js +33 -33
- package/dist/core/completions/installers/zsh-installer.d.ts +9 -0
- package/dist/core/completions/installers/zsh-installer.js +20 -4
- package/dist/core/completions/templates/bash-templates.js +24 -24
- package/dist/core/completions/templates/fish-templates.js +38 -38
- package/dist/core/completions/templates/powershell-templates.js +28 -28
- package/dist/core/completions/templates/zsh-templates.js +39 -39
- package/dist/core/config-prompts.d.ts +1 -1
- package/dist/core/config-prompts.js +14 -1
- package/dist/core/config-schema.d.ts +10 -1
- package/dist/core/config-schema.js +67 -1
- package/dist/core/config.d.ts +15 -0
- package/dist/core/config.js +46 -5
- package/dist/core/file-state.js +56 -24
- package/dist/core/github-copilot/cloud-agent.d.ts +95 -0
- package/dist/core/github-copilot/cloud-agent.js +497 -0
- package/dist/core/global-config.d.ts +16 -0
- package/dist/core/init.d.ts +58 -0
- package/dist/core/init.js +474 -73
- package/dist/core/legacy-cleanup.d.ts +59 -0
- package/dist/core/legacy-cleanup.js +253 -24
- package/dist/core/list.js +23 -16
- package/dist/core/migration.d.ts +73 -1
- package/dist/core/migration.js +360 -11
- package/dist/core/modify/conflict-detector.d.ts +26 -0
- package/dist/core/modify/conflict-detector.js +62 -0
- package/dist/core/modify/dependency-propagator.d.ts +38 -0
- package/dist/core/modify/dependency-propagator.js +103 -0
- package/dist/core/modify/history-tracker.d.ts +34 -0
- package/dist/core/modify/history-tracker.js +114 -0
- package/dist/core/modify/index.d.ts +7 -0
- package/dist/core/modify/index.js +7 -0
- package/dist/core/onboarding-commands.d.ts +30 -0
- package/dist/core/onboarding-commands.js +38 -0
- package/dist/core/openspec-root.js +18 -15
- package/dist/core/parsers/change-parser.d.ts +17 -2
- package/dist/core/parsers/change-parser.js +35 -21
- package/dist/core/parsers/code-fence.d.ts +15 -0
- package/dist/core/parsers/code-fence.js +49 -0
- package/dist/core/parsers/markdown-parser.d.ts +0 -3
- package/dist/core/parsers/markdown-parser.js +7 -60
- package/dist/core/parsers/requirement-blocks.d.ts +29 -0
- package/dist/core/parsers/requirement-blocks.js +150 -31
- package/dist/core/parsers/requirement-text.d.ts +48 -0
- package/dist/core/parsers/requirement-text.js +98 -0
- package/dist/core/parsers/spec-structure.d.ts +1 -1
- package/dist/core/parsers/spec-structure.js +20 -30
- package/dist/core/profile-sync-drift.d.ts +0 -8
- package/dist/core/profile-sync-drift.js +49 -50
- package/dist/core/profiles.d.ts +2 -2
- package/dist/core/profiles.js +2 -2
- package/dist/core/project-config.d.ts +27 -18
- package/dist/core/project-config.js +101 -34
- package/dist/core/references.js +42 -4
- package/dist/core/relationship-health.d.ts +8 -0
- package/dist/core/relationship-health.js +13 -0
- package/dist/core/root-selection.d.ts +9 -6
- package/dist/core/root-selection.js +42 -5
- package/dist/core/schemas/base.schema.js +7 -2
- package/dist/core/shared/allowed-tools.d.ts +12 -0
- package/dist/core/shared/allowed-tools.js +12 -0
- package/dist/core/shared/index.d.ts +1 -0
- package/dist/core/shared/index.js +1 -0
- package/dist/core/shared/skill-content-equivalence.d.ts +7 -0
- package/dist/core/shared/skill-content-equivalence.js +41 -0
- package/dist/core/shared/skill-generation.js +17 -13
- package/dist/core/shared/skill-paths.d.ts +13 -0
- package/dist/core/shared/skill-paths.js +23 -0
- package/dist/core/shared/tool-detection.d.ts +27 -7
- package/dist/core/shared/tool-detection.js +167 -37
- package/dist/core/shared-skill-target.d.ts +16 -0
- package/dist/core/shared-skill-target.js +156 -0
- package/dist/core/specs-apply.d.ts +80 -33
- package/dist/core/specs-apply.js +667 -145
- package/dist/core/store/git.d.ts +13 -0
- package/dist/core/store/git.js +24 -0
- package/dist/core/store/operations.js +20 -0
- package/dist/core/templates/skill-templates.d.ts +3 -2
- package/dist/core/templates/skill-templates.js +3 -2
- package/dist/core/templates/workflows/apply-change.d.ts +10 -0
- package/dist/core/templates/workflows/apply-change.js +186 -224
- package/dist/core/templates/workflows/archive-change.js +387 -260
- package/dist/core/templates/workflows/bulk-archive-change.js +655 -475
- package/dist/core/templates/workflows/continue-change.js +210 -219
- package/dist/core/templates/workflows/explore.js +479 -443
- package/dist/core/templates/workflows/feedback.js +97 -97
- package/dist/core/templates/workflows/ff-change.js +200 -191
- package/dist/core/templates/workflows/modify-change.d.ts +4 -1
- package/dist/core/templates/workflows/modify-change.js +193 -71
- package/dist/core/templates/workflows/new-change.js +127 -134
- package/dist/core/templates/workflows/onboard.js +548 -542
- package/dist/core/templates/workflows/propose.js +273 -217
- package/dist/core/templates/workflows/store-selection.d.ts +1 -1
- package/dist/core/templates/workflows/store-selection.js +1 -1
- package/dist/core/templates/workflows/sync-specs.js +500 -273
- package/dist/core/templates/workflows/update-change.d.ts +10 -0
- package/dist/core/templates/workflows/update-change.js +177 -0
- package/dist/core/templates/workflows/verify-change.js +324 -326
- package/dist/core/update.d.ts +40 -5
- package/dist/core/update.js +411 -96
- package/dist/core/validation/constants.d.ts +4 -1
- package/dist/core/validation/constants.js +4 -1
- package/dist/core/validation/plan-validator.d.ts +8 -0
- package/dist/core/validation/plan-validator.js +45 -0
- package/dist/core/validation/task-numbering.d.ts +16 -0
- package/dist/core/validation/task-numbering.js +57 -0
- package/dist/core/validation/validator.d.ts +27 -3
- package/dist/core/validation/validator.js +337 -48
- package/dist/core/version-check.d.ts +152 -0
- package/dist/core/version-check.js +731 -0
- package/dist/core/view.js +13 -18
- package/dist/prompts/searchable-multi-select.js +1 -1
- package/dist/telemetry/caller-detection.d.ts +27 -0
- package/dist/telemetry/caller-detection.js +85 -0
- package/dist/telemetry/caller-detection.test.d.ts +5 -0
- package/dist/telemetry/config.d.ts +48 -2
- package/dist/telemetry/config.js +113 -11
- package/dist/telemetry/config.test.d.ts +5 -0
- package/dist/telemetry/deduplication.d.ts +35 -0
- package/dist/telemetry/deduplication.js +82 -0
- package/dist/telemetry/deduplication.test.d.ts +5 -0
- package/dist/telemetry/identity.d.ts +62 -22
- package/dist/telemetry/identity.js +147 -102
- package/dist/telemetry/index.d.ts +126 -15
- package/dist/telemetry/index.js +569 -37
- package/dist/telemetry/sanitization.d.ts +40 -0
- package/dist/telemetry/sanitization.js +114 -0
- package/dist/telemetry/sanitization.test.d.ts +5 -0
- package/dist/telemetry/throttling.d.ts +20 -0
- package/dist/telemetry/throttling.js +70 -0
- package/dist/ui/welcome-screen.d.ts +9 -1
- package/dist/ui/welcome-screen.js +91 -38
- package/dist/utils/change-metadata.d.ts +43 -0
- package/dist/utils/change-metadata.js +123 -7
- package/dist/utils/change-utils.d.ts +10 -4
- package/dist/utils/change-utils.js +20 -13
- package/dist/utils/ci.d.ts +12 -0
- package/dist/utils/ci.js +16 -0
- package/dist/utils/command-references.d.ts +92 -6
- package/dist/utils/command-references.js +180 -7
- package/dist/utils/date.d.ts +8 -0
- package/dist/utils/date.js +13 -0
- package/dist/utils/file-system.d.ts +10 -0
- package/dist/utils/file-system.js +70 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/interactive.d.ts +23 -0
- package/dist/utils/interactive.js +32 -0
- package/dist/utils/item-discovery.d.ts +19 -0
- package/dist/utils/item-discovery.js +30 -48
- package/dist/utils/shell-detection.d.ts +1 -1
- package/dist/utils/shell-detection.js +64 -11
- package/dist/utils/spec-discovery.d.ts +40 -0
- package/dist/utils/spec-discovery.js +115 -0
- package/dist/utils/task-progress.d.ts +29 -1
- package/dist/utils/task-progress.js +109 -15
- package/package.json +96 -84
- package/schemas/spec-driven/schema.yaml +252 -184
- package/schemas/spec-driven/templates/design.md +19 -19
- package/schemas/spec-driven/templates/plan-template.md +91 -0
- package/schemas/spec-driven/templates/proposal.md +29 -24
- package/schemas/spec-driven/templates/spec.md +11 -8
- package/schemas/spec-driven/templates/tasks.md +9 -9
- package/scripts/postinstall.js +83 -83
- package/dist/core/command-generation/adapters/codex.d.ts +0 -16
- package/dist/core/command-generation/adapters/codex.js +0 -39
- package/dist/core/command-generation/adapters/windsurf.d.ts +0 -14
- package/dist/core/command-generation/adapters/windsurf.js +0 -38
- package/dist/core/comprehension/config.d.ts +0 -20
- package/dist/core/comprehension/config.js +0 -23
- package/dist/core/comprehension/fingerprint.d.ts +0 -14
- package/dist/core/comprehension/fingerprint.js +0 -33
- package/dist/core/comprehension/index.d.ts +0 -57
- package/dist/core/comprehension/index.js +0 -87
- package/dist/core/comprehension/pass-record.d.ts +0 -29
- package/dist/core/comprehension/pass-record.js +0 -64
- package/dist/core/comprehension/stats.d.ts +0 -35
- package/dist/core/comprehension/stats.js +0 -133
- package/dist/core/templates/workflows/comprehension-guidance.d.ts +0 -9
- package/dist/core/templates/workflows/comprehension-guidance.js +0 -73
- package/dist/core/templates/workflows/mcp-guidance.d.ts +0 -13
- package/dist/core/templates/workflows/mcp-guidance.js +0 -131
- package/dist/core/templates/workflows/user-prompt-guidance.d.ts +0 -16
- package/dist/core/templates/workflows/user-prompt-guidance.js +0 -48
- package/dist/telemetry/caller.d.ts +0 -5
- package/dist/telemetry/caller.js +0 -29
- package/dist/telemetry/client.d.ts +0 -27
- package/dist/telemetry/client.js +0 -127
- package/dist/telemetry/command-context.d.ts +0 -13
- package/dist/telemetry/command-context.js +0 -59
- package/dist/telemetry/comprehension.d.ts +0 -44
- package/dist/telemetry/comprehension.js +0 -105
- package/dist/telemetry/content.d.ts +0 -10
- package/dist/telemetry/content.js +0 -56
- package/dist/telemetry/git-stats.d.ts +0 -12
- package/dist/telemetry/git-stats.js +0 -69
- package/dist/telemetry/identify-cache.d.ts +0 -7
- package/dist/telemetry/identify-cache.js +0 -47
- package/dist/telemetry/input.d.ts +0 -17
- package/dist/telemetry/input.js +0 -68
- package/dist/telemetry/marker.d.ts +0 -37
- package/dist/telemetry/marker.js +0 -67
- package/dist/telemetry/workflow.d.ts +0 -85
- package/dist/telemetry/workflow.js +0 -318
- package/schemas/spec-driven/templates/plan.md +0 -19
|
@@ -2,103 +2,103 @@ export function getFeedbackSkillTemplate() {
|
|
|
2
2
|
return {
|
|
3
3
|
name: 'feedback',
|
|
4
4
|
description: 'Collect and submit user feedback about OpenSpec with context enrichment and anonymization.',
|
|
5
|
-
instructions: `Help the user submit feedback about OpenSpec.
|
|
6
|
-
|
|
7
|
-
**Goal**: Guide the user through collecting, enriching, and submitting feedback while ensuring privacy through anonymization.
|
|
8
|
-
|
|
9
|
-
**Process**
|
|
10
|
-
|
|
11
|
-
1. **Gather context from the conversation**
|
|
12
|
-
- Review recent conversation history for context
|
|
13
|
-
- Identify what task was being performed
|
|
14
|
-
- Note what worked well or poorly
|
|
15
|
-
- Capture specific friction points or praise
|
|
16
|
-
|
|
17
|
-
2. **Draft enriched feedback**
|
|
18
|
-
- Create a clear, descriptive title (single sentence, no "Feedback:" prefix needed)
|
|
19
|
-
- Write a body that includes:
|
|
20
|
-
- What the user was trying to do
|
|
21
|
-
- What happened (good or bad)
|
|
22
|
-
- Relevant context from the conversation
|
|
23
|
-
- Any specific suggestions or requests
|
|
24
|
-
|
|
25
|
-
3. **Anonymize sensitive information**
|
|
26
|
-
- Replace file paths with \`<path>\` or generic descriptions
|
|
27
|
-
- Replace API keys, tokens, secrets with \`<redacted>\`
|
|
28
|
-
- Replace company/organization names with \`<company>\`
|
|
29
|
-
- Replace personal names with \`<user>\`
|
|
30
|
-
- Replace specific URLs with \`<url>\` unless public/relevant
|
|
31
|
-
- Keep technical details that help understand the issue
|
|
32
|
-
|
|
33
|
-
4. **Present draft for approval**
|
|
34
|
-
- Show the complete draft to the user
|
|
35
|
-
- Display both title and body clearly
|
|
36
|
-
- Ask for explicit approval before submitting
|
|
37
|
-
- Allow the user to request modifications
|
|
38
|
-
|
|
39
|
-
5. **Submit on confirmation**
|
|
40
|
-
- Use the \`openspec feedback\` command to submit
|
|
41
|
-
- Format: \`openspec feedback "title" --body "body content"\`
|
|
42
|
-
- The command will automatically add metadata (version, platform, timestamp)
|
|
43
|
-
|
|
44
|
-
**Example Draft**
|
|
45
|
-
|
|
46
|
-
\`\`\`
|
|
47
|
-
Title: Error handling in artifact workflow needs improvement
|
|
48
|
-
|
|
49
|
-
Body:
|
|
50
|
-
I was working on creating a new change and encountered an issue with
|
|
51
|
-
the artifact workflow. When I tried to continue after creating the
|
|
52
|
-
proposal, the system didn't clearly indicate that I needed to complete
|
|
53
|
-
the specs first.
|
|
54
|
-
|
|
55
|
-
Suggestion: Add clearer error messages that explain dependency chains
|
|
56
|
-
in the artifact workflow. Something like "Cannot create design.md
|
|
57
|
-
because specs are not complete (0/2 done)."
|
|
58
|
-
|
|
59
|
-
Context: Using the spec-driven schema with <path>/my-project
|
|
60
|
-
\`\`\`
|
|
61
|
-
|
|
62
|
-
**Anonymization Examples**
|
|
63
|
-
|
|
64
|
-
Before:
|
|
65
|
-
\`\`\`
|
|
66
|
-
Working on /Users/john/mycompany/auth-service/src/oauth.ts
|
|
67
|
-
Failed with API key: sk_live_abc123xyz
|
|
68
|
-
Working at Acme Corp
|
|
69
|
-
\`\`\`
|
|
70
|
-
|
|
71
|
-
After:
|
|
72
|
-
\`\`\`
|
|
73
|
-
Working on <path>/oauth.ts
|
|
74
|
-
Failed with API key: <redacted>
|
|
75
|
-
Working at <company>
|
|
76
|
-
\`\`\`
|
|
77
|
-
|
|
78
|
-
**Guardrails**
|
|
79
|
-
|
|
80
|
-
- MUST show complete draft before submitting
|
|
81
|
-
- MUST ask for explicit approval
|
|
82
|
-
- MUST anonymize sensitive information
|
|
83
|
-
- ALLOW user to modify draft before submitting
|
|
84
|
-
- DO NOT submit without user confirmation
|
|
85
|
-
- DO include relevant technical context
|
|
86
|
-
- DO keep conversation-specific insights
|
|
87
|
-
|
|
88
|
-
**User Confirmation Required**
|
|
89
|
-
|
|
90
|
-
Always ask:
|
|
91
|
-
\`\`\`
|
|
92
|
-
Here's the feedback I've drafted:
|
|
93
|
-
|
|
94
|
-
Title: [title]
|
|
95
|
-
|
|
96
|
-
Body:
|
|
97
|
-
[body]
|
|
98
|
-
|
|
99
|
-
Does this look good? I can modify it if you'd like, or submit it as-is.
|
|
100
|
-
\`\`\`
|
|
101
|
-
|
|
5
|
+
instructions: `Help the user submit feedback about OpenSpec.
|
|
6
|
+
|
|
7
|
+
**Goal**: Guide the user through collecting, enriching, and submitting feedback while ensuring privacy through anonymization.
|
|
8
|
+
|
|
9
|
+
**Process**
|
|
10
|
+
|
|
11
|
+
1. **Gather context from the conversation**
|
|
12
|
+
- Review recent conversation history for context
|
|
13
|
+
- Identify what task was being performed
|
|
14
|
+
- Note what worked well or poorly
|
|
15
|
+
- Capture specific friction points or praise
|
|
16
|
+
|
|
17
|
+
2. **Draft enriched feedback**
|
|
18
|
+
- Create a clear, descriptive title (single sentence, no "Feedback:" prefix needed)
|
|
19
|
+
- Write a body that includes:
|
|
20
|
+
- What the user was trying to do
|
|
21
|
+
- What happened (good or bad)
|
|
22
|
+
- Relevant context from the conversation
|
|
23
|
+
- Any specific suggestions or requests
|
|
24
|
+
|
|
25
|
+
3. **Anonymize sensitive information**
|
|
26
|
+
- Replace file paths with \`<path>\` or generic descriptions
|
|
27
|
+
- Replace API keys, tokens, secrets with \`<redacted>\`
|
|
28
|
+
- Replace company/organization names with \`<company>\`
|
|
29
|
+
- Replace personal names with \`<user>\`
|
|
30
|
+
- Replace specific URLs with \`<url>\` unless public/relevant
|
|
31
|
+
- Keep technical details that help understand the issue
|
|
32
|
+
|
|
33
|
+
4. **Present draft for approval**
|
|
34
|
+
- Show the complete draft to the user
|
|
35
|
+
- Display both title and body clearly
|
|
36
|
+
- Ask for explicit approval before submitting
|
|
37
|
+
- Allow the user to request modifications
|
|
38
|
+
|
|
39
|
+
5. **Submit on confirmation**
|
|
40
|
+
- Use the \`openspec feedback\` command to submit
|
|
41
|
+
- Format: \`openspec feedback "title" --body "body content"\`
|
|
42
|
+
- The command will automatically add metadata (version, platform, timestamp)
|
|
43
|
+
|
|
44
|
+
**Example Draft**
|
|
45
|
+
|
|
46
|
+
\`\`\`
|
|
47
|
+
Title: Error handling in artifact workflow needs improvement
|
|
48
|
+
|
|
49
|
+
Body:
|
|
50
|
+
I was working on creating a new change and encountered an issue with
|
|
51
|
+
the artifact workflow. When I tried to continue after creating the
|
|
52
|
+
proposal, the system didn't clearly indicate that I needed to complete
|
|
53
|
+
the specs first.
|
|
54
|
+
|
|
55
|
+
Suggestion: Add clearer error messages that explain dependency chains
|
|
56
|
+
in the artifact workflow. Something like "Cannot create design.md
|
|
57
|
+
because specs are not complete (0/2 done)."
|
|
58
|
+
|
|
59
|
+
Context: Using the spec-driven schema with <path>/my-project
|
|
60
|
+
\`\`\`
|
|
61
|
+
|
|
62
|
+
**Anonymization Examples**
|
|
63
|
+
|
|
64
|
+
Before:
|
|
65
|
+
\`\`\`
|
|
66
|
+
Working on /Users/john/mycompany/auth-service/src/oauth.ts
|
|
67
|
+
Failed with API key: sk_live_abc123xyz
|
|
68
|
+
Working at Acme Corp
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
After:
|
|
72
|
+
\`\`\`
|
|
73
|
+
Working on <path>/oauth.ts
|
|
74
|
+
Failed with API key: <redacted>
|
|
75
|
+
Working at <company>
|
|
76
|
+
\`\`\`
|
|
77
|
+
|
|
78
|
+
**Guardrails**
|
|
79
|
+
|
|
80
|
+
- MUST show complete draft before submitting
|
|
81
|
+
- MUST ask for explicit approval
|
|
82
|
+
- MUST anonymize sensitive information
|
|
83
|
+
- ALLOW user to modify draft before submitting
|
|
84
|
+
- DO NOT submit without user confirmation
|
|
85
|
+
- DO include relevant technical context
|
|
86
|
+
- DO keep conversation-specific insights
|
|
87
|
+
|
|
88
|
+
**User Confirmation Required**
|
|
89
|
+
|
|
90
|
+
Always ask:
|
|
91
|
+
\`\`\`
|
|
92
|
+
Here's the feedback I've drafted:
|
|
93
|
+
|
|
94
|
+
Title: [title]
|
|
95
|
+
|
|
96
|
+
Body:
|
|
97
|
+
[body]
|
|
98
|
+
|
|
99
|
+
Does this look good? I can modify it if you'd like, or submit it as-is.
|
|
100
|
+
\`\`\`
|
|
101
|
+
|
|
102
102
|
Only proceed with submission after user confirms.`,
|
|
103
103
|
license: 'MIT',
|
|
104
104
|
compatibility: 'Requires openspec CLI.',
|
|
@@ -1,104 +1,108 @@
|
|
|
1
1
|
import { STORE_SELECTION_GUIDANCE } from './store-selection.js';
|
|
2
|
-
import { PROMPT_CLARIFY, PROMPT_OPEN_ENDED, TELEMETRY_WORKFLOW_INPUT_GUIDANCE } from './user-prompt-guidance.js';
|
|
3
2
|
export function getFfChangeSkillTemplate() {
|
|
4
3
|
return {
|
|
5
4
|
name: 'openspec-ff-change',
|
|
6
5
|
description: 'Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.',
|
|
7
|
-
instructions: `Fast-forward through artifact creation - generate everything needed to start implementation in one go.
|
|
8
|
-
|
|
9
|
-
${STORE_SELECTION_GUIDANCE}
|
|
10
|
-
|
|
11
|
-
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
12
|
-
|
|
13
|
-
**Steps**
|
|
14
|
-
|
|
15
|
-
1. **If no clear input provided, ask what they want to build**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> "What change do you want to work on? Describe what you want to build or fix."
|
|
19
|
-
|
|
20
|
-
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
21
|
-
|
|
22
|
-
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
23
|
-
|
|
24
|
-
2. **Create the change directory**
|
|
25
|
-
\`\`\`bash
|
|
26
|
-
openspec new change "<name>"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
- \`
|
|
55
|
-
- \`
|
|
56
|
-
- \`
|
|
57
|
-
- \`
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
|
|
6
|
+
instructions: `Fast-forward through artifact creation - generate everything needed to start implementation in one go.
|
|
7
|
+
|
|
8
|
+
${STORE_SELECTION_GUIDANCE}
|
|
9
|
+
|
|
10
|
+
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
11
|
+
|
|
12
|
+
**Steps**
|
|
13
|
+
|
|
14
|
+
1. **If no clear input provided, ask what they want to build**
|
|
15
|
+
|
|
16
|
+
Ask the user (open-ended, no preset options):
|
|
17
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
18
|
+
|
|
19
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
20
|
+
|
|
21
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
22
|
+
|
|
23
|
+
2. **Create the change directory**
|
|
24
|
+
\`\`\`bash
|
|
25
|
+
openspec new change "<name>"
|
|
26
|
+
\`\`\`
|
|
27
|
+
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
28
|
+
|
|
29
|
+
3. **Get the artifact build order**
|
|
30
|
+
\`\`\`bash
|
|
31
|
+
openspec status --change "<name>" --json
|
|
32
|
+
\`\`\`
|
|
33
|
+
Parse the JSON to get:
|
|
34
|
+
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
35
|
+
- \`artifacts\`: list of all artifacts, each with its \`status\` and its \`requires\` edges (the artifact IDs it directly depends on)
|
|
36
|
+
- \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
|
|
37
|
+
|
|
38
|
+
4. **Create every artifact in the required set**
|
|
39
|
+
|
|
40
|
+
Use a todo list to track progress through the artifacts.
|
|
41
|
+
|
|
42
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
43
|
+
|
|
44
|
+
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
45
|
+
- Get instructions:
|
|
46
|
+
\`\`\`bash
|
|
47
|
+
openspec instructions <artifact-id> --change "<name>" --json
|
|
48
|
+
\`\`\`
|
|
49
|
+
- The instructions JSON includes:
|
|
50
|
+
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
51
|
+
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
52
|
+
- \`template\`: The structure to use for your output file
|
|
53
|
+
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
54
|
+
- \`skipped\`/\`warning\`: present when the change declares skip_specs and this artifact must NOT be created - stop and pick another artifact
|
|
55
|
+
- \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
|
|
56
|
+
- \`dependencies\`: Completed artifacts to read for context
|
|
57
|
+
- Read any completed dependency files for context - always re-read them from disk, even if you saw them earlier in the conversation (the user may have edited them)
|
|
58
|
+
- If the \`instruction\` field delegates creation to a specific skill or command, invoke it to produce the artifact instead of writing the file yourself, then verify the artifact file exists at \`resolvedOutputPath\`
|
|
59
|
+
- Otherwise create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`. If \`resolvedOutputPath\` is a glob, follow \`instruction\` to choose the concrete file path
|
|
60
|
+
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
61
|
+
- Show brief progress: "✓ Created <artifact-id>"
|
|
62
|
+
|
|
63
|
+
b. **Continue until every artifact in the required set exists (not just \`apply.requires\`)**
|
|
64
|
+
- After creating each artifact, re-run \`openspec status --change "<name>" --json\`
|
|
65
|
+
- The required set is \`applyRequires\` plus every artifact reachable from those by following the \`requires\` edges in \`status --json\` - walk them transitively (spec-driven closes over proposal, specs, design, tasks). Leave artifacts outside that set alone
|
|
66
|
+
- \`status\` is file-existence only, so an \`applyRequires\` artifact reading \`done\` does NOT mean its dependencies exist - writing \`tasks.md\` early marks \`tasks\` done while \`specs\` was never written. Use each artifact's \`requires\` edges, not its \`status\`, to build the required set: a \`done\` artifact still lists what it depends on
|
|
67
|
+
- An artifact already reading \`status: "skipped"\` is satisfied: the change declares \`skip_specs\` in \`.openspec.yaml\`, so its files must NOT exist. Never try to create one
|
|
68
|
+
- Create every artifact in the required set that is missing, then re-check - creating one can unblock others
|
|
69
|
+
- Skip one only when \`status\` already reports it \`skipped\`, or when its own \`instruction\` says it is conditional: run \`openspec instructions <artifact-id> --change "<name>" --json\` and skip only if its \`instruction\` field marks it optional (e.g. "create only if..."). Spec-driven's \`design.md\` qualifies; \`specs\` qualifies only via the \`skipped\` status above, never by your own judgment. Tell the user, and do not reconsider it
|
|
70
|
+
- Dependencies are enablers, not gates: if a required artifact is still \`blocked\` only because you skipped a conditional dependency, write it anyway
|
|
71
|
+
- Stop when every artifact in the required set is \`done\`, \`skipped\`, or was deliberately skipped
|
|
72
|
+
|
|
73
|
+
c. **If an artifact requires user input** (unclear context):
|
|
74
|
+
- Ask the user to clarify
|
|
75
|
+
- Then continue with creation
|
|
76
|
+
|
|
77
|
+
5. **Show final status**
|
|
78
|
+
\`\`\`bash
|
|
79
|
+
openspec status --change "<name>"
|
|
80
|
+
\`\`\`
|
|
81
|
+
|
|
82
|
+
**Output**
|
|
83
|
+
|
|
84
|
+
After completing all artifacts, summarize:
|
|
85
|
+
- Change name and location
|
|
86
|
+
- List of artifacts created with brief descriptions, plus any conditional artifact you skipped and why
|
|
87
|
+
- What's ready: "All artifacts needed for implementation are ready."
|
|
88
|
+
- Prompt: "Run \`/opsx:apply\` or ask me to implement to start working on the tasks."
|
|
89
|
+
|
|
90
|
+
**Artifact Creation Guidelines**
|
|
91
|
+
|
|
92
|
+
- Follow the \`instruction\` field from \`openspec instructions\` for each artifact type - it is the authoritative guidance, even for familiar artifact names
|
|
93
|
+
- If the \`instruction\` field directs you to use a specific skill or command to create the artifact, invoke it instead of writing the artifact directly
|
|
94
|
+
- The schema defines what each artifact should contain - follow it
|
|
95
|
+
- Read dependency artifacts for context before creating new ones
|
|
96
|
+
- Use \`template\` as the structure for your output file - fill in its sections
|
|
97
|
+
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
98
|
+
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
99
|
+
- These guide what you write, but should never appear in the output
|
|
100
|
+
|
|
101
|
+
**Guardrails**
|
|
102
|
+
- Create every artifact the apply phase transitively depends on, not just the ids listed in \`apply.requires\`
|
|
103
|
+
- Always read dependency artifacts before creating a new one - re-read from disk, not from conversation memory (files may have changed since you last saw them)
|
|
104
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
105
|
+
- If a change with that name already exists, suggest continuing that change instead
|
|
102
106
|
- Verify each artifact file exists after writing before proceeding to next`,
|
|
103
107
|
license: 'MIT',
|
|
104
108
|
compatibility: 'Requires openspec CLI.',
|
|
@@ -111,101 +115,106 @@ export function getOpsxFfCommandTemplate() {
|
|
|
111
115
|
description: 'Create a change and generate all artifacts needed for implementation in one go',
|
|
112
116
|
category: 'Workflow',
|
|
113
117
|
tags: ['workflow', 'artifacts', 'experimental'],
|
|
114
|
-
content: `Fast-forward through artifact creation - generate everything needed to start implementation.
|
|
115
|
-
|
|
116
|
-
${STORE_SELECTION_GUIDANCE}
|
|
117
|
-
|
|
118
|
-
**Input**: The argument after \`/opsx:ff\` is the change name (kebab-case), OR a description of what the user wants to build.
|
|
119
|
-
|
|
120
|
-
**Steps**
|
|
121
|
-
|
|
122
|
-
1. **If no input provided, ask what they want to build**
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
> "What change do you want to work on? Describe what you want to build or fix."
|
|
126
|
-
|
|
127
|
-
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
128
|
-
|
|
129
|
-
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
130
|
-
|
|
131
|
-
2. **Create the change directory**
|
|
132
|
-
\`\`\`bash
|
|
133
|
-
openspec new change "<name>"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
- \`
|
|
162
|
-
- \`
|
|
163
|
-
- \`
|
|
164
|
-
- \`
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
|
|
118
|
+
content: `Fast-forward through artifact creation - generate everything needed to start implementation.
|
|
119
|
+
|
|
120
|
+
${STORE_SELECTION_GUIDANCE}
|
|
121
|
+
|
|
122
|
+
**Input**: The argument after \`/opsx:ff\` is the change name (kebab-case), OR a description of what the user wants to build.
|
|
123
|
+
|
|
124
|
+
**Steps**
|
|
125
|
+
|
|
126
|
+
1. **If no input provided, ask what they want to build**
|
|
127
|
+
|
|
128
|
+
Ask the user (open-ended, no preset options):
|
|
129
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
130
|
+
|
|
131
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
132
|
+
|
|
133
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
134
|
+
|
|
135
|
+
2. **Create the change directory**
|
|
136
|
+
\`\`\`bash
|
|
137
|
+
openspec new change "<name>"
|
|
138
|
+
\`\`\`
|
|
139
|
+
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
140
|
+
|
|
141
|
+
3. **Get the artifact build order**
|
|
142
|
+
\`\`\`bash
|
|
143
|
+
openspec status --change "<name>" --json
|
|
144
|
+
\`\`\`
|
|
145
|
+
Parse the JSON to get:
|
|
146
|
+
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
147
|
+
- \`artifacts\`: list of all artifacts, each with its \`status\` and its \`requires\` edges (the artifact IDs it directly depends on)
|
|
148
|
+
- \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
|
|
149
|
+
|
|
150
|
+
4. **Create every artifact in the required set**
|
|
151
|
+
|
|
152
|
+
Use a todo list to track progress through the artifacts.
|
|
153
|
+
|
|
154
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
155
|
+
|
|
156
|
+
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
157
|
+
- Get instructions:
|
|
158
|
+
\`\`\`bash
|
|
159
|
+
openspec instructions <artifact-id> --change "<name>" --json
|
|
160
|
+
\`\`\`
|
|
161
|
+
- The instructions JSON includes:
|
|
162
|
+
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
163
|
+
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
164
|
+
- \`template\`: The structure to use for your output file
|
|
165
|
+
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
166
|
+
- \`skipped\`/\`warning\`: present when the change declares skip_specs and this artifact must NOT be created - stop and pick another artifact
|
|
167
|
+
- \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
|
|
168
|
+
- \`dependencies\`: Completed artifacts to read for context
|
|
169
|
+
- Read any completed dependency files for context - always re-read them from disk, even if you saw them earlier in the conversation (the user may have edited them)
|
|
170
|
+
- If the \`instruction\` field delegates creation to a specific skill or command, invoke it to produce the artifact instead of writing the file yourself, then verify the artifact file exists at \`resolvedOutputPath\`
|
|
171
|
+
- Otherwise create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`. If \`resolvedOutputPath\` is a glob, follow \`instruction\` to choose the concrete file path
|
|
172
|
+
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
173
|
+
- Show brief progress: "✓ Created <artifact-id>"
|
|
174
|
+
|
|
175
|
+
b. **Continue until every artifact in the required set exists (not just \`apply.requires\`)**
|
|
176
|
+
- After creating each artifact, re-run \`openspec status --change "<name>" --json\`
|
|
177
|
+
- The required set is \`applyRequires\` plus every artifact reachable from those by following the \`requires\` edges in \`status --json\` - walk them transitively (spec-driven closes over proposal, specs, design, tasks). Leave artifacts outside that set alone
|
|
178
|
+
- \`status\` is file-existence only, so an \`applyRequires\` artifact reading \`done\` does NOT mean its dependencies exist - writing \`tasks.md\` early marks \`tasks\` done while \`specs\` was never written. Use each artifact's \`requires\` edges, not its \`status\`, to build the required set: a \`done\` artifact still lists what it depends on
|
|
179
|
+
- An artifact already reading \`status: "skipped"\` is satisfied: the change declares \`skip_specs\` in \`.openspec.yaml\`, so its files must NOT exist. Never try to create one
|
|
180
|
+
- Create every artifact in the required set that is missing, then re-check - creating one can unblock others
|
|
181
|
+
- Skip one only when \`status\` already reports it \`skipped\`, or when its own \`instruction\` says it is conditional: run \`openspec instructions <artifact-id> --change "<name>" --json\` and skip only if its \`instruction\` field marks it optional (e.g. "create only if..."). Spec-driven's \`design.md\` qualifies; \`specs\` qualifies only via the \`skipped\` status above, never by your own judgment. Tell the user, and do not reconsider it
|
|
182
|
+
- Dependencies are enablers, not gates: if a required artifact is still \`blocked\` only because you skipped a conditional dependency, write it anyway
|
|
183
|
+
- Stop when every artifact in the required set is \`done\`, \`skipped\`, or was deliberately skipped
|
|
184
|
+
|
|
185
|
+
c. **If an artifact requires user input** (unclear context):
|
|
186
|
+
- Ask the user to clarify
|
|
187
|
+
- Then continue with creation
|
|
188
|
+
|
|
189
|
+
5. **Show final status**
|
|
190
|
+
\`\`\`bash
|
|
191
|
+
openspec status --change "<name>"
|
|
192
|
+
\`\`\`
|
|
193
|
+
|
|
194
|
+
**Output**
|
|
195
|
+
|
|
196
|
+
After completing all artifacts, summarize:
|
|
197
|
+
- Change name and location
|
|
198
|
+
- List of artifacts created with brief descriptions, plus any conditional artifact you skipped and why
|
|
199
|
+
- What's ready: "All artifacts needed for implementation are ready."
|
|
200
|
+
- Prompt: "Run \`/opsx:apply\` to start implementing."
|
|
201
|
+
|
|
202
|
+
**Artifact Creation Guidelines**
|
|
203
|
+
|
|
204
|
+
- Follow the \`instruction\` field from \`openspec instructions\` for each artifact type - it is the authoritative guidance, even for familiar artifact names
|
|
205
|
+
- If the \`instruction\` field directs you to use a specific skill or command to create the artifact, invoke it instead of writing the artifact directly
|
|
206
|
+
- The schema defines what each artifact should contain - follow it
|
|
207
|
+
- Read dependency artifacts for context before creating new ones
|
|
208
|
+
- Use \`template\` as the structure for your output file - fill in its sections
|
|
209
|
+
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
210
|
+
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
211
|
+
- These guide what you write, but should never appear in the output
|
|
212
|
+
|
|
213
|
+
**Guardrails**
|
|
214
|
+
- Create every artifact the apply phase transitively depends on, not just the ids listed in \`apply.requires\`
|
|
215
|
+
- Always read dependency artifacts before creating a new one - re-read from disk, not from conversation memory (files may have changed since you last saw them)
|
|
216
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
217
|
+
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
209
218
|
- Verify each artifact file exists after writing before proceeding to next`
|
|
210
219
|
};
|
|
211
220
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Skill Template Workflow Modules
|
|
2
|
+
* Skill Template Workflow Modules
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by splitting the legacy monolithic
|
|
5
|
+
* templates file into workflow-focused modules.
|
|
3
6
|
*/
|
|
4
7
|
import type { SkillTemplate, CommandTemplate } from '../types.js';
|
|
5
8
|
export declare function getModifyChangeSkillTemplate(): SkillTemplate;
|