@codewalla_india/openspec 1.0.1
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 +225 -0
- package/bin/openspec.js +5 -0
- package/dist/cli/index.d.ts +10 -0
- package/dist/cli/index.js +548 -0
- package/dist/commands/change.d.ts +39 -0
- package/dist/commands/change.js +279 -0
- package/dist/commands/completion.d.ts +72 -0
- package/dist/commands/completion.js +264 -0
- package/dist/commands/config.d.ts +36 -0
- package/dist/commands/config.js +552 -0
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.js +155 -0
- package/dist/commands/doctor.d.ts +8 -0
- package/dist/commands/doctor.js +163 -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/shared-gather.d.ts +14 -0
- package/dist/commands/shared-gather.js +31 -0
- package/dist/commands/shared-output.d.ts +18 -0
- package/dist/commands/shared-output.js +61 -0
- package/dist/commands/show.d.ts +19 -0
- package/dist/commands/show.js +177 -0
- package/dist/commands/spec.d.ts +19 -0
- package/dist/commands/spec.js +236 -0
- package/dist/commands/store.d.ts +3 -0
- package/dist/commands/store.js +547 -0
- package/dist/commands/validate.d.ts +26 -0
- package/dist/commands/validate.js +330 -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 +45 -0
- package/dist/commands/workflow/instructions.js +500 -0
- package/dist/commands/workflow/new-change.d.ts +20 -0
- package/dist/commands/workflow/new-change.js +106 -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 +84 -0
- package/dist/commands/workflow/shared.js +133 -0
- package/dist/commands/workflow/status.d.ts +16 -0
- package/dist/commands/workflow/status.js +92 -0
- package/dist/commands/workflow/templates.d.ts +16 -0
- package/dist/commands/workflow/templates.js +69 -0
- package/dist/commands/workset-input.d.ts +19 -0
- package/dist/commands/workset-input.js +112 -0
- package/dist/commands/workset-prompts.d.ts +12 -0
- package/dist/commands/workset-prompts.js +143 -0
- package/dist/commands/workset.d.ts +25 -0
- package/dist/commands/workset.js +446 -0
- package/dist/core/archive.d.ts +22 -0
- package/dist/core/archive.js +471 -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 +9 -0
- package/dist/core/artifact-graph/index.js +14 -0
- package/dist/core/artifact-graph/instruction-loader.d.ts +188 -0
- package/dist/core/artifact-graph/instruction-loader.js +233 -0
- package/dist/core/artifact-graph/outputs.d.ts +14 -0
- package/dist/core/artifact-graph/outputs.js +39 -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 +31 -0
- package/dist/core/artifact-graph/types.d.ts +40 -0
- package/dist/core/artifact-graph/types.js +29 -0
- package/dist/core/available-tools.d.ts +17 -0
- package/dist/core/available-tools.js +43 -0
- package/dist/core/change-metadata/index.d.ts +2 -0
- package/dist/core/change-metadata/index.js +2 -0
- package/dist/core/change-metadata/schema.d.ts +19 -0
- package/dist/core/change-metadata/schema.js +30 -0
- package/dist/core/change-status-policy.d.ts +37 -0
- package/dist/core/change-status-policy.js +35 -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/bob.d.ts +14 -0
- package/dist/core/command-generation/adapters/bob.js +32 -0
- package/dist/core/command-generation/adapters/claude.d.ts +13 -0
- package/dist/core/command-generation/adapters/claude.js +37 -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 +31 -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 +32 -0
- package/dist/core/command-generation/adapters/index.js +32 -0
- package/dist/core/command-generation/adapters/junie.d.ts +13 -0
- package/dist/core/command-generation/adapters/junie.js +26 -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/lingma.d.ts +13 -0
- package/dist/core/command-generation/adapters/lingma.js +30 -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 +18 -0
- package/dist/core/command-generation/adapters/pi.js +42 -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 +38 -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 +98 -0
- package/dist/core/command-generation/types.d.ts +56 -0
- package/dist/core/command-generation/types.js +8 -0
- package/dist/core/command-generation/yaml.d.ts +22 -0
- package/dist/core/command-generation/yaml.js +38 -0
- package/dist/core/completions/command-registry.d.ts +3 -0
- package/dist/core/completions/command-registry.js +778 -0
- package/dist/core/completions/completion-provider.d.ts +71 -0
- package/dist/core/completions/completion-provider.js +129 -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 +35 -0
- package/dist/core/completions/generators/bash-generator.js +230 -0
- package/dist/core/completions/generators/fish-generator.d.ts +32 -0
- package/dist/core/completions/generators/fish-generator.js +160 -0
- package/dist/core/completions/generators/powershell-generator.d.ts +36 -0
- package/dist/core/completions/generators/powershell-generator.js +266 -0
- package/dist/core/completions/generators/zsh-generator.d.ts +47 -0
- package/dist/core/completions/generators/zsh-generator.js +276 -0
- package/dist/core/completions/installers/bash-installer.d.ts +87 -0
- package/dist/core/completions/installers/bash-installer.js +321 -0
- package/dist/core/completions/installers/fish-installer.d.ts +43 -0
- package/dist/core/completions/installers/fish-installer.js +151 -0
- package/dist/core/completions/installers/powershell-installer.d.ts +102 -0
- package/dist/core/completions/installers/powershell-installer.js +415 -0
- package/dist/core/completions/installers/zsh-installer.d.ts +117 -0
- package/dist/core/completions/installers/zsh-installer.js +424 -0
- package/dist/core/completions/shared-flags.d.ts +13 -0
- package/dist/core/completions/shared-flags.js +33 -0
- package/dist/core/completions/templates/bash-templates.d.ts +6 -0
- package/dist/core/completions/templates/bash-templates.js +30 -0
- package/dist/core/completions/templates/fish-templates.d.ts +7 -0
- package/dist/core/completions/templates/fish-templates.js +45 -0
- package/dist/core/completions/templates/powershell-templates.d.ts +6 -0
- package/dist/core/completions/templates/powershell-templates.js +34 -0
- package/dist/core/completions/templates/zsh-templates.d.ts +6 -0
- package/dist/core/completions/templates/zsh-templates.js +45 -0
- package/dist/core/completions/types.d.ts +101 -0
- package/dist/core/completions/types.js +2 -0
- package/dist/core/comprehension/config.d.ts +20 -0
- package/dist/core/comprehension/config.js +23 -0
- package/dist/core/comprehension/fingerprint.d.ts +5 -0
- package/dist/core/comprehension/fingerprint.js +25 -0
- package/dist/core/comprehension/index.d.ts +49 -0
- package/dist/core/comprehension/index.js +78 -0
- package/dist/core/comprehension/pass-record.d.ts +29 -0
- package/dist/core/comprehension/pass-record.js +64 -0
- package/dist/core/comprehension/stats.d.ts +18 -0
- package/dist/core/comprehension/stats.js +41 -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 +87 -0
- package/dist/core/config-schema.js +239 -0
- package/dist/core/config.d.ts +18 -0
- package/dist/core/config.js +39 -0
- package/dist/core/converters/json-converter.d.ts +6 -0
- package/dist/core/converters/json-converter.js +51 -0
- package/dist/core/file-state.d.ts +36 -0
- package/dist/core/file-state.js +112 -0
- package/dist/core/global-config.d.ts +51 -0
- package/dist/core/global-config.js +124 -0
- package/dist/core/id.d.ts +17 -0
- package/dist/core/id.js +30 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.js +7 -0
- package/dist/core/init.d.ts +37 -0
- package/dist/core/init.js +613 -0
- package/dist/core/legacy-cleanup.d.ts +162 -0
- package/dist/core/legacy-cleanup.js +514 -0
- package/dist/core/list.d.ts +11 -0
- package/dist/core/list.js +185 -0
- package/dist/core/migration.d.ts +23 -0
- package/dist/core/migration.js +108 -0
- package/dist/core/openers.d.ts +77 -0
- package/dist/core/openers.js +251 -0
- package/dist/core/openspec-root.d.ts +45 -0
- package/dist/core/openspec-root.js +192 -0
- package/dist/core/parsers/change-parser.d.ts +13 -0
- package/dist/core/parsers/change-parser.js +197 -0
- package/dist/core/parsers/markdown-parser.d.ts +26 -0
- package/dist/core/parsers/markdown-parser.js +227 -0
- package/dist/core/parsers/requirement-blocks.d.ts +37 -0
- package/dist/core/parsers/requirement-blocks.js +201 -0
- package/dist/core/parsers/spec-structure.d.ts +9 -0
- package/dist/core/parsers/spec-structure.js +88 -0
- package/dist/core/planning-home.d.ts +16 -0
- package/dist/core/planning-home.js +67 -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 +120 -0
- package/dist/core/project-config.js +406 -0
- package/dist/core/references.d.ts +63 -0
- package/dist/core/references.js +310 -0
- package/dist/core/relationship-health.d.ts +65 -0
- package/dist/core/relationship-health.js +64 -0
- package/dist/core/root-selection.d.ts +122 -0
- package/dist/core/root-selection.js +337 -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 +78 -0
- package/dist/core/specs-apply.js +394 -0
- package/dist/core/store/errors.d.ts +20 -0
- package/dist/core/store/errors.js +22 -0
- package/dist/core/store/foundation.d.ts +56 -0
- package/dist/core/store/foundation.js +251 -0
- package/dist/core/store/git.d.ts +23 -0
- package/dist/core/store/git.js +137 -0
- package/dist/core/store/index.d.ts +5 -0
- package/dist/core/store/index.js +5 -0
- package/dist/core/store/operations.d.ts +114 -0
- package/dist/core/store/operations.js +783 -0
- package/dist/core/store/registry.d.ts +58 -0
- package/dist/core/store/registry.js +275 -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 +337 -0
- package/dist/core/templates/workflows/archive-change.d.ts +10 -0
- package/dist/core/templates/workflows/archive-change.js +278 -0
- package/dist/core/templates/workflows/bulk-archive-change.d.ts +10 -0
- package/dist/core/templates/workflows/bulk-archive-change.js +493 -0
- package/dist/core/templates/workflows/comprehension-guidance.d.ts +9 -0
- package/dist/core/templates/workflows/comprehension-guidance.js +58 -0
- package/dist/core/templates/workflows/continue-change.d.ts +10 -0
- package/dist/core/templates/workflows/continue-change.js +239 -0
- package/dist/core/templates/workflows/explore.d.ts +10 -0
- package/dist/core/templates/workflows/explore.js +464 -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 +205 -0
- package/dist/core/templates/workflows/mcp-guidance.d.ts +13 -0
- package/dist/core/templates/workflows/mcp-guidance.js +116 -0
- package/dist/core/templates/workflows/new-change.d.ts +10 -0
- package/dist/core/templates/workflows/new-change.js +148 -0
- package/dist/core/templates/workflows/onboard.d.ts +10 -0
- package/dist/core/templates/workflows/onboard.js +566 -0
- package/dist/core/templates/workflows/propose.d.ts +10 -0
- package/dist/core/templates/workflows/propose.js +228 -0
- package/dist/core/templates/workflows/store-selection.d.ts +8 -0
- package/dist/core/templates/workflows/store-selection.js +8 -0
- package/dist/core/templates/workflows/sync-specs.d.ts +10 -0
- package/dist/core/templates/workflows/sync-specs.js +291 -0
- package/dist/core/templates/workflows/verify-change.d.ts +10 -0
- package/dist/core/templates/workflows/verify-change.js +346 -0
- package/dist/core/update.d.ts +82 -0
- package/dist/core/update.js +557 -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 +44 -0
- package/dist/core/validation/validator.js +435 -0
- package/dist/core/view.d.ts +8 -0
- package/dist/core/view.js +168 -0
- package/dist/core/working-set.d.ts +47 -0
- package/dist/core/working-set.js +43 -0
- package/dist/core/worksets.d.ts +75 -0
- package/dist/core/worksets.js +245 -0
- package/dist/core/zod-issues.d.ts +4 -0
- package/dist/core/zod-issues.js +10 -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 +38 -0
- package/dist/telemetry/config.js +136 -0
- package/dist/telemetry/index.d.ts +31 -0
- package/dist/telemetry/index.js +164 -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 +55 -0
- package/dist/utils/change-metadata.js +141 -0
- package/dist/utils/change-utils.d.ts +71 -0
- package/dist/utils/change-utils.js +138 -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 +41 -0
- package/dist/utils/file-system.js +320 -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/package.json +84 -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 +83 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { STORE_SELECTION_GUIDANCE } from './store-selection.js';
|
|
2
|
+
export function getFfChangeSkillTemplate() {
|
|
3
|
+
return {
|
|
4
|
+
name: 'openspec-ff-change',
|
|
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.',
|
|
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
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
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 with their status and dependencies
|
|
36
|
+
- \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
|
|
37
|
+
|
|
38
|
+
4. **Create artifacts in sequence until apply-ready**
|
|
39
|
+
|
|
40
|
+
Use the **TodoWrite tool** 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
|
+
- \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
|
|
55
|
+
- \`dependencies\`: Completed artifacts to read for context
|
|
56
|
+
- Read any completed dependency files for context
|
|
57
|
+
- Create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`
|
|
58
|
+
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
59
|
+
- Show brief progress: "✓ Created <artifact-id>"
|
|
60
|
+
|
|
61
|
+
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
62
|
+
- After creating each artifact, re-run \`openspec status --change "<name>" --json\`
|
|
63
|
+
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
64
|
+
- Stop when all \`applyRequires\` artifacts are done
|
|
65
|
+
|
|
66
|
+
c. **If an artifact requires user input** (unclear context):
|
|
67
|
+
- Use **AskUserQuestion tool** to clarify
|
|
68
|
+
- Then continue with creation
|
|
69
|
+
|
|
70
|
+
5. **Show final status**
|
|
71
|
+
\`\`\`bash
|
|
72
|
+
openspec status --change "<name>"
|
|
73
|
+
\`\`\`
|
|
74
|
+
|
|
75
|
+
**Output**
|
|
76
|
+
|
|
77
|
+
After completing all artifacts, summarize:
|
|
78
|
+
- Change name and location
|
|
79
|
+
- List of artifacts created with brief descriptions
|
|
80
|
+
- What's ready: "All artifacts created! Ready for implementation."
|
|
81
|
+
- Prompt: "Run \`/opsx:apply\` or ask me to implement to start working on the tasks."
|
|
82
|
+
|
|
83
|
+
**Artifact Creation Guidelines**
|
|
84
|
+
|
|
85
|
+
- Follow the \`instruction\` field from \`openspec instructions\` for each artifact type
|
|
86
|
+
- The schema defines what each artifact should contain - follow it
|
|
87
|
+
- Read dependency artifacts for context before creating new ones
|
|
88
|
+
- Use \`template\` as the structure for your output file - fill in its sections
|
|
89
|
+
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
90
|
+
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
91
|
+
- These guide what you write, but should never appear in the output
|
|
92
|
+
|
|
93
|
+
**Guardrails**
|
|
94
|
+
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
95
|
+
- Always read dependency artifacts before creating a new one
|
|
96
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
97
|
+
- If a change with that name already exists, suggest continuing that change instead
|
|
98
|
+
- Verify each artifact file exists after writing before proceeding to next`,
|
|
99
|
+
license: 'MIT',
|
|
100
|
+
compatibility: 'Requires openspec CLI.',
|
|
101
|
+
metadata: { author: 'openspec', version: '1.0' },
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export function getOpsxFfCommandTemplate() {
|
|
105
|
+
return {
|
|
106
|
+
name: 'OPSX: Fast Forward',
|
|
107
|
+
description: 'Create a change and generate all artifacts needed for implementation in one go',
|
|
108
|
+
category: 'Workflow',
|
|
109
|
+
tags: ['workflow', 'artifacts', 'experimental'],
|
|
110
|
+
content: `Fast-forward through artifact creation - generate everything needed to start implementation.
|
|
111
|
+
|
|
112
|
+
${STORE_SELECTION_GUIDANCE}
|
|
113
|
+
|
|
114
|
+
**Input**: The argument after \`/opsx:ff\` is the change name (kebab-case), OR a description of what the user wants to build.
|
|
115
|
+
|
|
116
|
+
**Steps**
|
|
117
|
+
|
|
118
|
+
1. **If no input provided, ask what they want to build**
|
|
119
|
+
|
|
120
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
121
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
122
|
+
|
|
123
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
124
|
+
|
|
125
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
126
|
+
|
|
127
|
+
2. **Create the change directory**
|
|
128
|
+
\`\`\`bash
|
|
129
|
+
openspec new change "<name>"
|
|
130
|
+
\`\`\`
|
|
131
|
+
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
132
|
+
|
|
133
|
+
3. **Get the artifact build order**
|
|
134
|
+
\`\`\`bash
|
|
135
|
+
openspec status --change "<name>" --json
|
|
136
|
+
\`\`\`
|
|
137
|
+
Parse the JSON to get:
|
|
138
|
+
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
139
|
+
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
140
|
+
- \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
|
|
141
|
+
|
|
142
|
+
4. **Create artifacts in sequence until apply-ready**
|
|
143
|
+
|
|
144
|
+
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
145
|
+
|
|
146
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
147
|
+
|
|
148
|
+
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
149
|
+
- Get instructions:
|
|
150
|
+
\`\`\`bash
|
|
151
|
+
openspec instructions <artifact-id> --change "<name>" --json
|
|
152
|
+
\`\`\`
|
|
153
|
+
- The instructions JSON includes:
|
|
154
|
+
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
155
|
+
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
156
|
+
- \`template\`: The structure to use for your output file
|
|
157
|
+
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
158
|
+
- \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
|
|
159
|
+
- \`dependencies\`: Completed artifacts to read for context
|
|
160
|
+
- Read any completed dependency files for context
|
|
161
|
+
- Create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`
|
|
162
|
+
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
163
|
+
- Show brief progress: "✓ Created <artifact-id>"
|
|
164
|
+
|
|
165
|
+
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
166
|
+
- After creating each artifact, re-run \`openspec status --change "<name>" --json\`
|
|
167
|
+
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
168
|
+
- Stop when all \`applyRequires\` artifacts are done
|
|
169
|
+
|
|
170
|
+
c. **If an artifact requires user input** (unclear context):
|
|
171
|
+
- Use **AskUserQuestion tool** to clarify
|
|
172
|
+
- Then continue with creation
|
|
173
|
+
|
|
174
|
+
5. **Show final status**
|
|
175
|
+
\`\`\`bash
|
|
176
|
+
openspec status --change "<name>"
|
|
177
|
+
\`\`\`
|
|
178
|
+
|
|
179
|
+
**Output**
|
|
180
|
+
|
|
181
|
+
After completing all artifacts, summarize:
|
|
182
|
+
- Change name and location
|
|
183
|
+
- List of artifacts created with brief descriptions
|
|
184
|
+
- What's ready: "All artifacts created! Ready for implementation."
|
|
185
|
+
- Prompt: "Run \`/opsx:apply\` to start implementing."
|
|
186
|
+
|
|
187
|
+
**Artifact Creation Guidelines**
|
|
188
|
+
|
|
189
|
+
- Follow the \`instruction\` field from \`openspec instructions\` for each artifact type
|
|
190
|
+
- The schema defines what each artifact should contain - follow it
|
|
191
|
+
- Read dependency artifacts for context before creating new ones
|
|
192
|
+
- Use \`template\` as the structure for your output file - fill in its sections
|
|
193
|
+
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
194
|
+
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
195
|
+
- These guide what you write, but should never appear in the output
|
|
196
|
+
|
|
197
|
+
**Guardrails**
|
|
198
|
+
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
199
|
+
- Always read dependency artifacts before creating a new one
|
|
200
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
201
|
+
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
202
|
+
- Verify each artifact file exists after writing before proceeding to next`
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=ff-change.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared MCP guidance for Codewalla workflow templates.
|
|
3
|
+
*
|
|
4
|
+
* Interpolated into propose, apply, and verify workflows so generated
|
|
5
|
+
* skills and slash commands consistently teach when to use Atlassian, Context7,
|
|
6
|
+
* and Playwright MCP tools.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ATLASSIAN_ENRICHMENT_GUIDANCE = "3.5. **Enrich from Jira (if ticket key available)**\n\n Scan the change name, proposal.md, and design.md for a Jira issue key\n (pattern: one or more capital letters, a dash, one or more digits \u2014 e.g., CW-123, PROJ-456).\n\n If a ticket key is found, use the **Atlassian MCP**:\n\n **a. Fetch the issue**\n - Retrieve: summary, description, issue type, status, labels\n - Extract any \"Acceptance Criteria\" section from the description\n - Note the assignee and reporter\n\n **b. Walk the parent hierarchy**\n - If the issue has a parent (sub-task \u2192 story, or story \u2192 epic):\n - Fetch the parent ticket for business goal context\n - If parent has a parent (epic), fetch that too for initiative framing\n - Note the full path: Initiative \u2192 Epic \u2192 Story \u2192 Sub-task\n\n **c. Fetch recent comments**\n - Get comments, ordered by date\n - Look for scope reduction (\"out of scope\", \"defer X\"), changed approach,\n blocker resolutions, or QA/review feedback added after planning\n\n **d. Cross-check against tasks.md**\n - For each acceptance criterion in Jira: verify at least one task covers it\n - If an AC has no corresponding task \u2192 add it to the flagged list\n - For any comment that changed scope post-planning \u2192 note the discrepancy\n\n **Output:** Print a \"Jira Context\" section showing:\n - Ticket key + summary, type, status\n - Parent chain (if any)\n - ACs: covered \u2713 / not covered \u2717\n - Scope-change comments (if any, with date)\n - \"Proceeding with implementation\" or \"\u26A0 Pausing \u2014 scope mismatch found, confirm before continuing\"\n\n **If no ticket key found or Atlassian MCP unavailable:** Skip silently and continue.";
|
|
9
|
+
export declare const ATLASSIAN_PROPOSE_GUIDANCE = "0. **Import from Jira (if a ticket key is provided)**\n\n If the user's input contains or is a Jira issue key (e.g., \"CW-1234\" or \"CW-1234 add dark mode\"):\n\n Use the **Atlassian MCP** to fetch the issue:\n - summary \u2192 becomes the change name candidate (kebab-case it)\n - description \u2192 seed for proposal.md \"Why\" and \"What Changes\" sections\n - acceptance criteria \u2192 seed for specs artifact requirements\n - parent epic \u2192 context for the \"Impact\" section of the proposal\n\n Walk the parent chain:\n - Fetch the epic (or story parent) for business-level framing\n - Include the epic goal as opening context in the proposal\n\n After fetching, proceed to step 1 using the ticket data as pre-filled input.\n Tell the user: \"Found CW-1234: '<summary>'. Creating change from Jira ticket.\"\n\n **If no ticket key:** proceed normally from step 1.";
|
|
10
|
+
export declare const CONTEXT7_LOOKUP_GUIDANCE = " **Before implementing each task \u2014 library check:**\n\n If the task description references a specific library, framework, or package\n (e.g., \"implement with Prisma\", \"add React Query cache\", \"use Drizzle ORM transactions\",\n \"migrate to Next.js App Router\", \"use tRPC v11 procedure\"):\n\n 1. Call `resolve-library-id` (Context7 MCP) with the library name to get its Context7 ID\n 2. Call `query-docs` with the Context7 ID and the specific question from the task\n \u2014 e.g., \"How to use transactions with Drizzle ORM 0.38?\"\n 3. Use the returned documentation to guide the implementation\n\n **When to trigger this check:**\n - Task mentions a package by name\n - Task uses version-specific language (\"v5 API\", \"new hook syntax\")\n - Task involves migration between library versions\n - The codebase's package.json shows a recently updated dependency relevant to the task\n\n **When to skip:**\n - Task is purely business logic (no library API involved)\n - You already fetched docs for this library in a previous task this session\n (reuse the earlier result, don't call again)\n\n **Cap:** Do not call Context7 more than 3 times per apply session.";
|
|
11
|
+
export declare const PLAYWRIGHT_APPLY_GUARDRAIL = "- Do NOT run Playwright or browser tests during apply. If the user explicitly asks to also \"run tests\", \"verify UI\", or \"check in browser\" in the same message, complete all tasks first, then invoke openspec-verify-change (or `/opsx:verify`) to handle browser verification \u2014 do not do it inline during apply";
|
|
12
|
+
export declare const PLAYWRIGHT_VERIFY_GUIDANCE = "8. **Browser verification (Playwright)**\n\n After codebase analysis (steps 5\u20137), assess if the change touches UI or web pages:\n - proposal.md or tasks.md mentions pages, components, screens, UI, CSS, visual, layout\n\n **If yes, use the Playwright MCP:**\n\n **a. Check for a running dev server**\n - Scan package.json `scripts` for: `dev`, `start`, `preview`, `serve`\n - Check if localhost is reachable (common ports: 3000, 3001, 5173, 8080)\n - If a URL is available, announce it. If not, note \"No dev server detected \u2014 skipping visual verification.\"\n\n **b. If dev server is reachable:**\n - Use `browser_navigate` to open the affected page(s) identified from the change\n - Use `browser_take_screenshot` to capture the current visual state\n - Use `browser_snapshot` to get the accessibility tree and verify key elements\n - Use `browser_console_messages` to check for JS errors introduced by this change\n - If network requests are relevant: `browser_network_requests` to spot regressions\n\n **c. Playwright test files**\n Search the project for:\n - `**/*.spec.ts`, `**/*.e2e.ts`, `**/playwright/**/*.ts`, `**/e2e/**/*.ts`\n If test files related to the changed pages/components are found:\n - List them\n - If the user asks you to run them, execute and report pass/fail inline\n\n **If no dev server is reachable:**\n Add a SUGGESTION to the report: \"Start dev server and re-run /opsx:verify for visual confirmation.\"\n\n Include browser results in the verification report (step 9).";
|
|
13
|
+
//# sourceMappingURL=mcp-guidance.d.ts.map
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared MCP guidance for Codewalla workflow templates.
|
|
3
|
+
*
|
|
4
|
+
* Interpolated into propose, apply, and verify workflows so generated
|
|
5
|
+
* skills and slash commands consistently teach when to use Atlassian, Context7,
|
|
6
|
+
* and Playwright MCP tools.
|
|
7
|
+
*/
|
|
8
|
+
export const ATLASSIAN_ENRICHMENT_GUIDANCE = `3.5. **Enrich from Jira (if ticket key available)**
|
|
9
|
+
|
|
10
|
+
Scan the change name, proposal.md, and design.md for a Jira issue key
|
|
11
|
+
(pattern: one or more capital letters, a dash, one or more digits — e.g., CW-123, PROJ-456).
|
|
12
|
+
|
|
13
|
+
If a ticket key is found, use the **Atlassian MCP**:
|
|
14
|
+
|
|
15
|
+
**a. Fetch the issue**
|
|
16
|
+
- Retrieve: summary, description, issue type, status, labels
|
|
17
|
+
- Extract any "Acceptance Criteria" section from the description
|
|
18
|
+
- Note the assignee and reporter
|
|
19
|
+
|
|
20
|
+
**b. Walk the parent hierarchy**
|
|
21
|
+
- If the issue has a parent (sub-task → story, or story → epic):
|
|
22
|
+
- Fetch the parent ticket for business goal context
|
|
23
|
+
- If parent has a parent (epic), fetch that too for initiative framing
|
|
24
|
+
- Note the full path: Initiative → Epic → Story → Sub-task
|
|
25
|
+
|
|
26
|
+
**c. Fetch recent comments**
|
|
27
|
+
- Get comments, ordered by date
|
|
28
|
+
- Look for scope reduction ("out of scope", "defer X"), changed approach,
|
|
29
|
+
blocker resolutions, or QA/review feedback added after planning
|
|
30
|
+
|
|
31
|
+
**d. Cross-check against tasks.md**
|
|
32
|
+
- For each acceptance criterion in Jira: verify at least one task covers it
|
|
33
|
+
- If an AC has no corresponding task → add it to the flagged list
|
|
34
|
+
- For any comment that changed scope post-planning → note the discrepancy
|
|
35
|
+
|
|
36
|
+
**Output:** Print a "Jira Context" section showing:
|
|
37
|
+
- Ticket key + summary, type, status
|
|
38
|
+
- Parent chain (if any)
|
|
39
|
+
- ACs: covered ✓ / not covered ✗
|
|
40
|
+
- Scope-change comments (if any, with date)
|
|
41
|
+
- "Proceeding with implementation" or "⚠ Pausing — scope mismatch found, confirm before continuing"
|
|
42
|
+
|
|
43
|
+
**If no ticket key found or Atlassian MCP unavailable:** Skip silently and continue.`;
|
|
44
|
+
export const ATLASSIAN_PROPOSE_GUIDANCE = `0. **Import from Jira (if a ticket key is provided)**
|
|
45
|
+
|
|
46
|
+
If the user's input contains or is a Jira issue key (e.g., "CW-1234" or "CW-1234 add dark mode"):
|
|
47
|
+
|
|
48
|
+
Use the **Atlassian MCP** to fetch the issue:
|
|
49
|
+
- summary → becomes the change name candidate (kebab-case it)
|
|
50
|
+
- description → seed for proposal.md "Why" and "What Changes" sections
|
|
51
|
+
- acceptance criteria → seed for specs artifact requirements
|
|
52
|
+
- parent epic → context for the "Impact" section of the proposal
|
|
53
|
+
|
|
54
|
+
Walk the parent chain:
|
|
55
|
+
- Fetch the epic (or story parent) for business-level framing
|
|
56
|
+
- Include the epic goal as opening context in the proposal
|
|
57
|
+
|
|
58
|
+
After fetching, proceed to step 1 using the ticket data as pre-filled input.
|
|
59
|
+
Tell the user: "Found CW-1234: '<summary>'. Creating change from Jira ticket."
|
|
60
|
+
|
|
61
|
+
**If no ticket key:** proceed normally from step 1.`;
|
|
62
|
+
export const CONTEXT7_LOOKUP_GUIDANCE = ` **Before implementing each task — library check:**
|
|
63
|
+
|
|
64
|
+
If the task description references a specific library, framework, or package
|
|
65
|
+
(e.g., "implement with Prisma", "add React Query cache", "use Drizzle ORM transactions",
|
|
66
|
+
"migrate to Next.js App Router", "use tRPC v11 procedure"):
|
|
67
|
+
|
|
68
|
+
1. Call \`resolve-library-id\` (Context7 MCP) with the library name to get its Context7 ID
|
|
69
|
+
2. Call \`query-docs\` with the Context7 ID and the specific question from the task
|
|
70
|
+
— e.g., "How to use transactions with Drizzle ORM 0.38?"
|
|
71
|
+
3. Use the returned documentation to guide the implementation
|
|
72
|
+
|
|
73
|
+
**When to trigger this check:**
|
|
74
|
+
- Task mentions a package by name
|
|
75
|
+
- Task uses version-specific language ("v5 API", "new hook syntax")
|
|
76
|
+
- Task involves migration between library versions
|
|
77
|
+
- The codebase's package.json shows a recently updated dependency relevant to the task
|
|
78
|
+
|
|
79
|
+
**When to skip:**
|
|
80
|
+
- Task is purely business logic (no library API involved)
|
|
81
|
+
- You already fetched docs for this library in a previous task this session
|
|
82
|
+
(reuse the earlier result, don't call again)
|
|
83
|
+
|
|
84
|
+
**Cap:** Do not call Context7 more than 3 times per apply session.`;
|
|
85
|
+
export const PLAYWRIGHT_APPLY_GUARDRAIL = `- Do NOT run Playwright or browser tests during apply. If the user explicitly asks to also "run tests", "verify UI", or "check in browser" in the same message, complete all tasks first, then invoke openspec-verify-change (or \`/opsx:verify\`) to handle browser verification — do not do it inline during apply`;
|
|
86
|
+
export const PLAYWRIGHT_VERIFY_GUIDANCE = `8. **Browser verification (Playwright)**
|
|
87
|
+
|
|
88
|
+
After codebase analysis (steps 5–7), assess if the change touches UI or web pages:
|
|
89
|
+
- proposal.md or tasks.md mentions pages, components, screens, UI, CSS, visual, layout
|
|
90
|
+
|
|
91
|
+
**If yes, use the Playwright MCP:**
|
|
92
|
+
|
|
93
|
+
**a. Check for a running dev server**
|
|
94
|
+
- Scan package.json \`scripts\` for: \`dev\`, \`start\`, \`preview\`, \`serve\`
|
|
95
|
+
- Check if localhost is reachable (common ports: 3000, 3001, 5173, 8080)
|
|
96
|
+
- If a URL is available, announce it. If not, note "No dev server detected — skipping visual verification."
|
|
97
|
+
|
|
98
|
+
**b. If dev server is reachable:**
|
|
99
|
+
- Use \`browser_navigate\` to open the affected page(s) identified from the change
|
|
100
|
+
- Use \`browser_take_screenshot\` to capture the current visual state
|
|
101
|
+
- Use \`browser_snapshot\` to get the accessibility tree and verify key elements
|
|
102
|
+
- Use \`browser_console_messages\` to check for JS errors introduced by this change
|
|
103
|
+
- If network requests are relevant: \`browser_network_requests\` to spot regressions
|
|
104
|
+
|
|
105
|
+
**c. Playwright test files**
|
|
106
|
+
Search the project for:
|
|
107
|
+
- \`**/*.spec.ts\`, \`**/*.e2e.ts\`, \`**/playwright/**/*.ts\`, \`**/e2e/**/*.ts\`
|
|
108
|
+
If test files related to the changed pages/components are found:
|
|
109
|
+
- List them
|
|
110
|
+
- If the user asks you to run them, execute and report pass/fail inline
|
|
111
|
+
|
|
112
|
+
**If no dev server is reachable:**
|
|
113
|
+
Add a SUGGESTION to the report: "Start dev server and re-run /opsx:verify for visual confirmation."
|
|
114
|
+
|
|
115
|
+
Include browser results in the verification report (step 9).`;
|
|
116
|
+
//# sourceMappingURL=mcp-guidance.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 getNewChangeSkillTemplate(): SkillTemplate;
|
|
9
|
+
export declare function getOpsxNewCommandTemplate(): CommandTemplate;
|
|
10
|
+
//# sourceMappingURL=new-change.d.ts.map
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { STORE_SELECTION_GUIDANCE } from './store-selection.js';
|
|
2
|
+
export function getNewChangeSkillTemplate() {
|
|
3
|
+
return {
|
|
4
|
+
name: 'openspec-new-change',
|
|
5
|
+
description: 'Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.',
|
|
6
|
+
instructions: `Start a new change using the experimental artifact-driven approach.
|
|
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
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
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. **Determine the workflow schema**
|
|
24
|
+
|
|
25
|
+
Use the default schema (omit \`--schema\`) unless the user explicitly requests a different workflow.
|
|
26
|
+
|
|
27
|
+
**Use a different schema only if the user mentions:**
|
|
28
|
+
- A specific schema name → use \`--schema <name>\`
|
|
29
|
+
- "show workflows" or "what workflows" → run \`openspec schemas --json\` and let them choose
|
|
30
|
+
|
|
31
|
+
**Otherwise**: Omit \`--schema\` to use the default.
|
|
32
|
+
|
|
33
|
+
3. **Create the change directory**
|
|
34
|
+
\`\`\`bash
|
|
35
|
+
openspec new change "<name>"
|
|
36
|
+
\`\`\`
|
|
37
|
+
Add \`--schema <name>\` only if the user requested a specific workflow.
|
|
38
|
+
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
39
|
+
|
|
40
|
+
4. **Show the artifact status**
|
|
41
|
+
\`\`\`bash
|
|
42
|
+
openspec status --change "<name>" --json
|
|
43
|
+
\`\`\`
|
|
44
|
+
Use the returned \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`nextSteps\` instead of assuming repo-local paths.
|
|
45
|
+
|
|
46
|
+
5. **Get instructions for the first artifact**
|
|
47
|
+
The first artifact depends on the schema (e.g., \`proposal\` for spec-driven).
|
|
48
|
+
Check the status output to find the first artifact with status "ready".
|
|
49
|
+
\`\`\`bash
|
|
50
|
+
openspec instructions <first-artifact-id> --change "<name>"
|
|
51
|
+
\`\`\`
|
|
52
|
+
This outputs the template and context for creating the first artifact.
|
|
53
|
+
|
|
54
|
+
6. **STOP and wait for user direction**
|
|
55
|
+
|
|
56
|
+
**Output**
|
|
57
|
+
|
|
58
|
+
After completing the steps, summarize:
|
|
59
|
+
- Change name and location
|
|
60
|
+
- Schema/workflow being used and its artifact sequence
|
|
61
|
+
- Current status (0/N artifacts complete)
|
|
62
|
+
- The template for the first artifact
|
|
63
|
+
- Prompt: "Ready to create the first artifact? Just describe what this change is about and I'll draft it, or ask me to continue."
|
|
64
|
+
|
|
65
|
+
**Guardrails**
|
|
66
|
+
- Do NOT create any artifacts yet - just show the instructions
|
|
67
|
+
- Do NOT advance beyond showing the first artifact template
|
|
68
|
+
- If the name is invalid (not kebab-case), ask for a valid name
|
|
69
|
+
- If a change with that name already exists, suggest continuing that change instead
|
|
70
|
+
- Pass --schema if using a non-default workflow`,
|
|
71
|
+
license: 'MIT',
|
|
72
|
+
compatibility: 'Requires openspec CLI.',
|
|
73
|
+
metadata: { author: 'openspec', version: '1.0' },
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export function getOpsxNewCommandTemplate() {
|
|
77
|
+
return {
|
|
78
|
+
name: 'OPSX: New',
|
|
79
|
+
description: 'Start a new change using the experimental artifact workflow (OPSX)',
|
|
80
|
+
category: 'Workflow',
|
|
81
|
+
tags: ['workflow', 'artifacts', 'experimental'],
|
|
82
|
+
content: `Start a new change using the experimental artifact-driven approach.
|
|
83
|
+
|
|
84
|
+
${STORE_SELECTION_GUIDANCE}
|
|
85
|
+
|
|
86
|
+
**Input**: The argument after \`/opsx:new\` is the change name (kebab-case), OR a description of what the user wants to build.
|
|
87
|
+
|
|
88
|
+
**Steps**
|
|
89
|
+
|
|
90
|
+
1. **If no input provided, ask what they want to build**
|
|
91
|
+
|
|
92
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
93
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
94
|
+
|
|
95
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
96
|
+
|
|
97
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
98
|
+
|
|
99
|
+
2. **Determine the workflow schema**
|
|
100
|
+
|
|
101
|
+
Use the default schema (omit \`--schema\`) unless the user explicitly requests a different workflow.
|
|
102
|
+
|
|
103
|
+
**Use a different schema only if the user mentions:**
|
|
104
|
+
- A specific schema name → use \`--schema <name>\`
|
|
105
|
+
- "show workflows" or "what workflows" → run \`openspec schemas --json\` and let them choose
|
|
106
|
+
|
|
107
|
+
**Otherwise**: Omit \`--schema\` to use the default.
|
|
108
|
+
|
|
109
|
+
3. **Create the change directory**
|
|
110
|
+
\`\`\`bash
|
|
111
|
+
openspec new change "<name>"
|
|
112
|
+
\`\`\`
|
|
113
|
+
Add \`--schema <name>\` only if the user requested a specific workflow.
|
|
114
|
+
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
115
|
+
|
|
116
|
+
4. **Show the artifact status**
|
|
117
|
+
\`\`\`bash
|
|
118
|
+
openspec status --change "<name>" --json
|
|
119
|
+
\`\`\`
|
|
120
|
+
Use the returned \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`nextSteps\` instead of assuming repo-local paths.
|
|
121
|
+
|
|
122
|
+
5. **Get instructions for the first artifact**
|
|
123
|
+
The first artifact depends on the schema. Check the status output to find the first artifact with status "ready".
|
|
124
|
+
\`\`\`bash
|
|
125
|
+
openspec instructions <first-artifact-id> --change "<name>"
|
|
126
|
+
\`\`\`
|
|
127
|
+
This outputs the template and context for creating the first artifact.
|
|
128
|
+
|
|
129
|
+
6. **STOP and wait for user direction**
|
|
130
|
+
|
|
131
|
+
**Output**
|
|
132
|
+
|
|
133
|
+
After completing the steps, summarize:
|
|
134
|
+
- Change name and location
|
|
135
|
+
- Schema/workflow being used and its artifact sequence
|
|
136
|
+
- Current status (0/N artifacts complete)
|
|
137
|
+
- The template for the first artifact
|
|
138
|
+
- Prompt: "Ready to create the first artifact? Run \`/opsx:continue\` or just describe what this change is about and I'll draft it."
|
|
139
|
+
|
|
140
|
+
**Guardrails**
|
|
141
|
+
- Do NOT create any artifacts yet - just show the instructions
|
|
142
|
+
- Do NOT advance beyond showing the first artifact template
|
|
143
|
+
- If the name is invalid (not kebab-case), ask for a valid name
|
|
144
|
+
- If a change with that name already exists, suggest using \`/opsx:continue\` instead
|
|
145
|
+
- Pass --schema if using a non-default workflow`
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=new-change.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 getOnboardSkillTemplate(): SkillTemplate;
|
|
9
|
+
export declare function getOpsxOnboardCommandTemplate(): CommandTemplate;
|
|
10
|
+
//# sourceMappingURL=onboard.d.ts.map
|