openspecui 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitmodules +3 -0
- package/CHAT.md +3 -0
- package/package.json +12 -0
- package/references/openspec/.changeset/README.md +6 -0
- package/references/openspec/.changeset/config.json +12 -0
- package/references/openspec/.coderabbit.yaml +11 -0
- package/references/openspec/.devcontainer/README.md +92 -0
- package/references/openspec/.devcontainer/devcontainer.json +68 -0
- package/references/openspec/.github/CODEOWNERS +2 -0
- package/references/openspec/.github/workflows/ci.yml +222 -0
- package/references/openspec/.github/workflows/release-prepare.yml +50 -0
- package/references/openspec/AGENTS.md +18 -0
- package/references/openspec/CHANGELOG.md +205 -0
- package/references/openspec/LICENSE +22 -0
- package/references/openspec/README.md +374 -0
- package/references/openspec/assets/openspec_dashboard.png +0 -0
- package/references/openspec/assets/openspec_pixel_dark.svg +89 -0
- package/references/openspec/assets/openspec_pixel_light.svg +89 -0
- package/references/openspec/bin/openspec.js +3 -0
- package/references/openspec/build.js +31 -0
- package/references/openspec/openspec/AGENTS.md +454 -0
- package/references/openspec/openspec/changes/IMPLEMENTATION_ORDER.md +68 -0
- package/references/openspec/openspec/changes/add-antigravity-support/proposal.md +11 -0
- package/references/openspec/openspec/changes/add-antigravity-support/specs/cli-init/spec.md +9 -0
- package/references/openspec/openspec/changes/add-antigravity-support/specs/cli-update/spec.md +8 -0
- package/references/openspec/openspec/changes/add-antigravity-support/tasks.md +12 -0
- package/references/openspec/openspec/changes/add-scaffold-command/proposal.md +11 -0
- package/references/openspec/openspec/changes/add-scaffold-command/specs/cli-scaffold/spec.md +36 -0
- package/references/openspec/openspec/changes/add-scaffold-command/tasks.md +12 -0
- package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/design.md +86 -0
- package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/proposal.md +29 -0
- package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/specs/cli-update/spec.md +59 -0
- package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/tasks.md +20 -0
- package/references/openspec/openspec/changes/archive/2025-01-13-add-list-command/proposal.md +20 -0
- package/references/openspec/openspec/changes/archive/2025-01-13-add-list-command/specs/cli-list/spec.md +69 -0
- package/references/openspec/openspec/changes/archive/2025-01-13-add-list-command/tasks.md +26 -0
- package/references/openspec/openspec/changes/archive/2025-08-05-initialize-typescript-project/design.md +64 -0
- package/references/openspec/openspec/changes/archive/2025-08-05-initialize-typescript-project/proposal.md +18 -0
- package/references/openspec/openspec/changes/archive/2025-08-05-initialize-typescript-project/tasks.md +25 -0
- package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/design.md +104 -0
- package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/proposal.md +30 -0
- package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/specs/cli-init/spec.md +148 -0
- package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/tasks.md +38 -0
- package/references/openspec/openspec/changes/archive/2025-08-06-adopt-future-state-storage/proposal.md +24 -0
- package/references/openspec/openspec/changes/archive/2025-08-06-adopt-future-state-storage/specs/openspec-conventions/spec.md +120 -0
- package/references/openspec/openspec/changes/archive/2025-08-06-adopt-future-state-storage/tasks.md +38 -0
- package/references/openspec/openspec/changes/archive/2025-08-11-add-complexity-guidelines/proposal.md +13 -0
- package/references/openspec/openspec/changes/archive/2025-08-11-add-complexity-guidelines/specs/openspec-docs/README.md +472 -0
- package/references/openspec/openspec/changes/archive/2025-08-11-add-complexity-guidelines/tasks.md +9 -0
- package/references/openspec/openspec/changes/archive/2025-08-13-add-archive-command/proposal.md +15 -0
- package/references/openspec/openspec/changes/archive/2025-08-13-add-archive-command/specs/cli-archive/spec.md +111 -0
- package/references/openspec/openspec/changes/archive/2025-08-13-add-archive-command/tasks.md +44 -0
- package/references/openspec/openspec/changes/archive/2025-08-13-add-diff-command/proposal.md +19 -0
- package/references/openspec/openspec/changes/archive/2025-08-13-add-diff-command/specs/cli-diff/spec.md +77 -0
- package/references/openspec/openspec/changes/archive/2025-08-13-add-diff-command/tasks.md +23 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/design.md +56 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/proposal.md +17 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/specs/cli-change/spec.md +48 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/specs/cli-list/spec.md +12 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/tasks.md +34 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/proposal.md +20 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/specs/cli-change/spec.md +23 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/specs/cli-show/spec.md +83 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/specs/cli-spec/spec.md +23 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/tasks.md +142 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-skip-specs-archive-option/proposal.md +13 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-skip-specs-archive-option/specs/cli-archive/spec.md +191 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-skip-specs-archive-option/tasks.md +57 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/design.md +45 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/proposal.md +19 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/specs/cli-spec/spec.md +43 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/tasks.md +22 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/design.md +104 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/proposal.md +22 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/specs/cli-archive/spec.md +18 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/specs/cli-diff/spec.md +12 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/tasks.md +59 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/proposal.md +93 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/specs/cli-archive/spec.md +48 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/specs/cli-diff/spec.md +45 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/specs/openspec-conventions/spec.md +101 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/tasks.md +55 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/design.md +19 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/proposal.md +67 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/specs/cli-list/spec.md +57 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/specs/openspec-conventions/spec.md +23 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/tasks.md +27 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/proposal.md +20 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/specs/cli-change/spec.md +22 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/specs/cli-spec/spec.md +23 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/specs/cli-validate/spec.md +149 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/tasks.md +81 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-fix-update-tool-selection/proposal.md +40 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-fix-update-tool-selection/specs/cli-update/spec.md +23 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-fix-update-tool-selection/tasks.md +21 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-improve-validate-error-messages/proposal.md +25 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-improve-validate-error-messages/specs/cli-validate/spec.md +55 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-improve-validate-error-messages/tasks.md +21 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-structured-spec-format/proposal.md +36 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-structured-spec-format/specs/openspec-conventions/spec.md +192 -0
- package/references/openspec/openspec/changes/archive/2025-08-19-structured-spec-format/tasks.md +19 -0
- package/references/openspec/openspec/changes/archive/2025-09-12-add-view-dashboard-command/proposal.md +38 -0
- package/references/openspec/openspec/changes/archive/2025-09-12-add-view-dashboard-command/specs/cli-view/spec.md +109 -0
- package/references/openspec/openspec/changes/archive/2025-09-12-add-view-dashboard-command/tasks.md +47 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/proposal.md +28 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/specs/cli-init/spec.md +71 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/specs/cli-update/spec.md +41 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/tasks.md +17 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-multi-agent-init/proposal.md +35 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-multi-agent-init/specs/cli-init/spec.md +45 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-multi-agent-init/tasks.md +16 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/proposal.md +119 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/specs/cli-init/spec.md +21 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/specs/cli-update/spec.md +22 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/tasks.md +20 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-cli-e2e-plan/proposal.md +19 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-cli-e2e-plan/tasks.md +9 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-deterministic-tests/proposal.md +78 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-deterministic-tests/tasks.md +25 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-init-onboarding/proposal.md +13 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-init-onboarding/specs/cli-init/spec.md +92 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-init-onboarding/tasks.md +12 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-remove-diff-command/proposal.md +81 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-remove-diff-command/tasks.md +37 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-sort-active-changes-by-progress/proposal.md +25 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-sort-active-changes-by-progress/specs/cli-view/spec.md +9 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-sort-active-changes-by-progress/tasks.md +8 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/proposal.md +29 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/specs/cli-init/spec.md +40 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/specs/cli-update/spec.md +22 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/specs/openspec-conventions/spec.md +27 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/tasks.md +22 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/design.md +130 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/proposal.md +117 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/tasks.md +69 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-markdown-parser-crlf/proposal.md +19 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-markdown-parser-crlf/specs/cli-validate/spec.md +9 -0
- package/references/openspec/openspec/changes/archive/2025-09-29-update-markdown-parser-crlf/tasks.md +11 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/proposal.md +25 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/specs/cli-init/spec.md +56 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/specs/cli-update/spec.md +41 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/tasks.md +19 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/proposal.md +25 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/specs/cli-init/spec.md +48 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/specs/cli-update/spec.md +48 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/tasks.md +30 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/proposal.md +17 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/specs/cli-init/spec.md +43 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/specs/cli-update/spec.md +27 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/tasks.md +15 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-non-interactive-init-options/proposal.md +12 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-non-interactive-init-options/specs/cli-init/spec.md +39 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-non-interactive-init-options/tasks.md +17 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/proposal.md +17 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/specs/cli-init/spec.md +42 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/specs/cli-update/spec.md +27 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/tasks.md +17 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-enhance-validation-error-messages/proposal.md +12 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-enhance-validation-error-messages/specs/cli-validate/spec.md +39 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-enhance-validation-error-messages/tasks.md +12 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-improve-agent-instruction-usability/proposal.md +12 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-improve-agent-instruction-usability/specs/docs-agent-instructions/spec.md +33 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-improve-agent-instruction-usability/tasks.md +11 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-slim-root-agents-file/proposal.md +13 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-slim-root-agents-file/tasks.md +15 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-enter-selection/proposal.md +14 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-enter-selection/specs/cli-init/spec.md +10 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-enter-selection/tasks.md +8 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/proposal.md +15 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/specs/cli-init/spec.md +32 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/specs/cli-update/spec.md +10 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/tasks.md +11 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-update-release-automation/proposal.md +49 -0
- package/references/openspec/openspec/changes/archive/2025-10-14-update-release-automation/tasks.md +12 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-archive-command-arguments/proposal.md +17 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-archive-command-arguments/specs/cli-update/spec.md +32 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-archive-command-arguments/tasks.md +15 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-cline-support/proposal.md +15 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-cline-support/specs/cli-init/spec.md +97 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-cline-support/tasks.md +19 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-crush-support/proposal.md +13 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-crush-support/specs/cli-init/spec.md +67 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-crush-support/tasks.md +7 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/proposal.md +12 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/specs/cli-init/spec.md +54 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/specs/cli-update/spec.md +54 -0
- package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/tasks.md +11 -0
- package/references/openspec/openspec/changes/fix-cline-workflows-implementation/proposal.md +13 -0
- package/references/openspec/openspec/changes/fix-cline-workflows-implementation/specs/cli-init/spec.md +11 -0
- package/references/openspec/openspec/changes/fix-cline-workflows-implementation/tasks.md +13 -0
- package/references/openspec/openspec/changes/make-validation-scope-aware/proposal.md +12 -0
- package/references/openspec/openspec/changes/make-validation-scope-aware/specs/cli-validate/spec.md +25 -0
- package/references/openspec/openspec/changes/make-validation-scope-aware/tasks.md +16 -0
- package/references/openspec/openspec/project.md +53 -0
- package/references/openspec/openspec/specs/cli-archive/spec.md +210 -0
- package/references/openspec/openspec/specs/cli-change/spec.md +91 -0
- package/references/openspec/openspec/specs/cli-init/spec.md +311 -0
- package/references/openspec/openspec/specs/cli-list/spec.md +103 -0
- package/references/openspec/openspec/specs/cli-show/spec.md +85 -0
- package/references/openspec/openspec/specs/cli-spec/spec.md +87 -0
- package/references/openspec/openspec/specs/cli-update/spec.md +190 -0
- package/references/openspec/openspec/specs/cli-validate/spec.md +218 -0
- package/references/openspec/openspec/specs/cli-view/spec.md +105 -0
- package/references/openspec/openspec/specs/docs-agent-instructions/spec.md +38 -0
- package/references/openspec/openspec/specs/openspec-conventions/spec.md +474 -0
- package/references/openspec/openspec-parallel-merge-plan.md +98 -0
- package/references/openspec/package.json +73 -0
- package/references/openspec/pnpm-lock.yaml +2324 -0
- package/references/openspec/scripts/pack-version-check.mjs +111 -0
- package/references/openspec/src/cli/index.ts +253 -0
- package/references/openspec/src/commands/change.ts +291 -0
- package/references/openspec/src/commands/show.ts +139 -0
- package/references/openspec/src/commands/spec.ts +250 -0
- package/references/openspec/src/commands/validate.ts +305 -0
- package/references/openspec/src/core/archive.ts +606 -0
- package/references/openspec/src/core/config.ts +41 -0
- package/references/openspec/src/core/configurators/agents.ts +23 -0
- package/references/openspec/src/core/configurators/base.ts +6 -0
- package/references/openspec/src/core/configurators/claude.ts +23 -0
- package/references/openspec/src/core/configurators/cline.ts +23 -0
- package/references/openspec/src/core/configurators/codebuddy.ts +24 -0
- package/references/openspec/src/core/configurators/costrict.ts +23 -0
- package/references/openspec/src/core/configurators/iflow.ts +23 -0
- package/references/openspec/src/core/configurators/qoder.ts +53 -0
- package/references/openspec/src/core/configurators/qwen.ts +47 -0
- package/references/openspec/src/core/configurators/registry.ts +49 -0
- package/references/openspec/src/core/configurators/slash/amazon-q.ts +51 -0
- package/references/openspec/src/core/configurators/slash/antigravity.ts +28 -0
- package/references/openspec/src/core/configurators/slash/auggie.ts +37 -0
- package/references/openspec/src/core/configurators/slash/base.ts +95 -0
- package/references/openspec/src/core/configurators/slash/claude.ts +42 -0
- package/references/openspec/src/core/configurators/slash/cline.ts +27 -0
- package/references/openspec/src/core/configurators/slash/codebuddy.ts +43 -0
- package/references/openspec/src/core/configurators/slash/codex.ts +126 -0
- package/references/openspec/src/core/configurators/slash/costrict.ts +36 -0
- package/references/openspec/src/core/configurators/slash/crush.ts +42 -0
- package/references/openspec/src/core/configurators/slash/cursor.ts +42 -0
- package/references/openspec/src/core/configurators/slash/factory.ts +41 -0
- package/references/openspec/src/core/configurators/slash/gemini.ts +27 -0
- package/references/openspec/src/core/configurators/slash/github-copilot.ts +39 -0
- package/references/openspec/src/core/configurators/slash/iflow.ts +42 -0
- package/references/openspec/src/core/configurators/slash/kilocode.ts +21 -0
- package/references/openspec/src/core/configurators/slash/opencode.ts +83 -0
- package/references/openspec/src/core/configurators/slash/qoder.ts +84 -0
- package/references/openspec/src/core/configurators/slash/qwen.ts +55 -0
- package/references/openspec/src/core/configurators/slash/registry.ts +81 -0
- package/references/openspec/src/core/configurators/slash/roocode.ts +27 -0
- package/references/openspec/src/core/configurators/slash/toml-base.ts +66 -0
- package/references/openspec/src/core/configurators/slash/windsurf.ts +27 -0
- package/references/openspec/src/core/converters/json-converter.ts +61 -0
- package/references/openspec/src/core/index.ts +2 -0
- package/references/openspec/src/core/init.ts +986 -0
- package/references/openspec/src/core/list.ts +104 -0
- package/references/openspec/src/core/parsers/change-parser.ts +234 -0
- package/references/openspec/src/core/parsers/markdown-parser.ts +237 -0
- package/references/openspec/src/core/parsers/requirement-blocks.ts +234 -0
- package/references/openspec/src/core/schemas/base.schema.ts +20 -0
- package/references/openspec/src/core/schemas/change.schema.ts +42 -0
- package/references/openspec/src/core/schemas/index.ts +20 -0
- package/references/openspec/src/core/schemas/spec.schema.ts +17 -0
- package/references/openspec/src/core/styles/palette.ts +8 -0
- package/references/openspec/src/core/templates/agents-root-stub.ts +16 -0
- package/references/openspec/src/core/templates/agents-template.ts +457 -0
- package/references/openspec/src/core/templates/claude-template.ts +1 -0
- package/references/openspec/src/core/templates/cline-template.ts +1 -0
- package/references/openspec/src/core/templates/costrict-template.ts +1 -0
- package/references/openspec/src/core/templates/index.ts +50 -0
- package/references/openspec/src/core/templates/project-template.ts +38 -0
- package/references/openspec/src/core/templates/slash-command-templates.ts +60 -0
- package/references/openspec/src/core/update.ts +129 -0
- package/references/openspec/src/core/validation/constants.ts +48 -0
- package/references/openspec/src/core/validation/types.ts +19 -0
- package/references/openspec/src/core/validation/validator.ts +448 -0
- package/references/openspec/src/core/view.ts +189 -0
- package/references/openspec/src/index.ts +2 -0
- package/references/openspec/src/utils/file-system.ts +187 -0
- package/references/openspec/src/utils/index.ts +2 -0
- package/references/openspec/src/utils/interactive.ts +7 -0
- package/references/openspec/src/utils/item-discovery.ts +45 -0
- package/references/openspec/src/utils/match.ts +26 -0
- package/references/openspec/src/utils/task-progress.ts +43 -0
- package/references/openspec/test/cli-e2e/basic.test.ts +156 -0
- package/references/openspec/test/commands/change.interactive-show.test.ts +45 -0
- package/references/openspec/test/commands/change.interactive-validate.test.ts +48 -0
- package/references/openspec/test/commands/show.test.ts +123 -0
- package/references/openspec/test/commands/spec.interactive-show.test.ts +44 -0
- package/references/openspec/test/commands/spec.interactive-validate.test.ts +44 -0
- package/references/openspec/test/commands/spec.test.ts +324 -0
- package/references/openspec/test/commands/validate.enriched-output.test.ts +49 -0
- package/references/openspec/test/commands/validate.test.ts +133 -0
- package/references/openspec/test/core/archive.test.ts +680 -0
- package/references/openspec/test/core/commands/change-command.list.test.ts +76 -0
- package/references/openspec/test/core/commands/change-command.show-validate.test.ts +111 -0
- package/references/openspec/test/core/converters/json-converter.test.ts +184 -0
- package/references/openspec/test/core/init.test.ts +1710 -0
- package/references/openspec/test/core/list.test.ts +165 -0
- package/references/openspec/test/core/parsers/change-parser.test.ts +52 -0
- package/references/openspec/test/core/parsers/markdown-parser.test.ts +291 -0
- package/references/openspec/test/core/update.test.ts +1642 -0
- package/references/openspec/test/core/validation.enriched-messages.test.ts +74 -0
- package/references/openspec/test/core/validation.test.ts +489 -0
- package/references/openspec/test/core/view.test.ts +79 -0
- package/references/openspec/test/fixtures/tmp-init/openspec/changes/c1/proposal.md +7 -0
- package/references/openspec/test/fixtures/tmp-init/openspec/changes/c1/specs/alpha/spec.md +8 -0
- package/references/openspec/test/fixtures/tmp-init/openspec/specs/alpha/spec.md +12 -0
- package/references/openspec/test/helpers/run-cli.ts +139 -0
- package/references/openspec/test/utils/file-system.test.ts +211 -0
- package/references/openspec/test/utils/marker-updates.test.ts +287 -0
- package/references/openspec/tsconfig.json +21 -0
- package/references/openspec/vitest.config.ts +25 -0
- package/references/openspec/vitest.setup.ts +6 -0
package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/design.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Design: Agent Instructions Update
|
|
2
|
+
|
|
3
|
+
## Approach
|
|
4
|
+
|
|
5
|
+
### Information Architecture
|
|
6
|
+
- **Front-load critical information** - Three-stage workflow comes first
|
|
7
|
+
- **Clear hierarchy** - Core Workflow → Quick Start → Commands → Details → Edge Cases
|
|
8
|
+
- **50% length reduction** - Target ~285 lines from current ~575 lines
|
|
9
|
+
- **Imperative mood** - "Create proposal" vs "You should create a proposal"
|
|
10
|
+
- **Bullet points over paragraphs** - Scannable, concise information
|
|
11
|
+
|
|
12
|
+
### Three-Stage Workflow Documentation
|
|
13
|
+
The workflow is now prominently featured as a core concept:
|
|
14
|
+
1. **Creating** - Proposal generation phase
|
|
15
|
+
2. **Implementing** - Code development phase with explicit steps:
|
|
16
|
+
- Read proposal.md for understanding
|
|
17
|
+
- Read design.md for technical context
|
|
18
|
+
- Read tasks.md for checklist
|
|
19
|
+
- Implement tasks sequentially
|
|
20
|
+
- Mark complete immediately after each task
|
|
21
|
+
3. **Archiving** - Post-deployment finalization phase
|
|
22
|
+
|
|
23
|
+
This structure helps agents understand the lifecycle and their role at each stage. The implementation phase is particularly detailed to prevent common mistakes like skipping documentation or batching task completion.
|
|
24
|
+
|
|
25
|
+
### CLI Documentation Updates
|
|
26
|
+
- **Comprehensive command coverage** - All 9 primary commands documented
|
|
27
|
+
- **`openspec list` prominence** - Essential for discovering changes and specs
|
|
28
|
+
- **Interactive mode documentation** - How agents can use prompts effectively
|
|
29
|
+
- **Complete flag documentation** - All options like --json, --type, --skip-specs
|
|
30
|
+
- **Deprecation cleanup** - Remove noun-first patterns (openspec change show)
|
|
31
|
+
|
|
32
|
+
### Agent-Specific Enhancements
|
|
33
|
+
Based on industry best practices for coding agents (Claude Code, Cursor, etc.):
|
|
34
|
+
|
|
35
|
+
**Implementation Workflow**
|
|
36
|
+
- Explicit steps prevent skipping critical context
|
|
37
|
+
- Reading proposal/design first ensures understanding before coding
|
|
38
|
+
- Sequential task completion maintains focus
|
|
39
|
+
- Immediate marking prevents losing track of progress
|
|
40
|
+
- Addresses common failure mode: jumping straight to code
|
|
41
|
+
|
|
42
|
+
**Spec Discovery Workflow**
|
|
43
|
+
- Always check existing specs before creating new ones
|
|
44
|
+
- Use `openspec list --specs` to discover current capabilities
|
|
45
|
+
- Prefer modifying existing specs over creating duplicates
|
|
46
|
+
- Prevents fragmentation and maintains coherent architecture
|
|
47
|
+
|
|
48
|
+
**Decision Clarity**
|
|
49
|
+
- Clear decision trees eliminating ambiguous conditions
|
|
50
|
+
- Concrete examples for each decision branch
|
|
51
|
+
- Simplified bug vs feature determination
|
|
52
|
+
|
|
53
|
+
**Tool Usage Guidance**
|
|
54
|
+
- Tool selection matrix (when to use Grep vs Glob vs Read)
|
|
55
|
+
- Error recovery patterns for common failures
|
|
56
|
+
- Verification workflows to confirm correctness
|
|
57
|
+
|
|
58
|
+
**Context Management**
|
|
59
|
+
- "Before Any Task" checklist for gathering context
|
|
60
|
+
- What to read before starting any work
|
|
61
|
+
- How to maintain state across interactions
|
|
62
|
+
|
|
63
|
+
**Spec File Structure Documentation**
|
|
64
|
+
- Complete examples with ADDED/MODIFIED/REMOVED sections
|
|
65
|
+
- Critical scenario formatting (#### Scenario: headers)
|
|
66
|
+
- Delta file location clarity (changes/{name}/specs/)
|
|
67
|
+
- Addresses most common creation errors from retrospective
|
|
68
|
+
|
|
69
|
+
**Troubleshooting and Debugging**
|
|
70
|
+
- Common error messages with solutions
|
|
71
|
+
- Delta detection debugging steps
|
|
72
|
+
- Validation best practices
|
|
73
|
+
- JSON output for inspection
|
|
74
|
+
- Prevents hours of frustration from silent failures
|
|
75
|
+
|
|
76
|
+
**Best Practices**
|
|
77
|
+
- Be concise (one-line answers when appropriate)
|
|
78
|
+
- Be specific (file.ts:42 line references)
|
|
79
|
+
- Start simple (<100 lines, single-file defaults)
|
|
80
|
+
- Justify complexity (require metrics/data)
|
|
81
|
+
|
|
82
|
+
## Design Rationale
|
|
83
|
+
|
|
84
|
+
### Why These Changes Matter
|
|
85
|
+
|
|
86
|
+
**Cognitive Load Reduction**
|
|
87
|
+
- Agents process instructions better with clear structure
|
|
88
|
+
- Front-loading critical info reduces scanning time
|
|
89
|
+
- Decision trees eliminate analysis paralysis
|
|
90
|
+
|
|
91
|
+
**Industry Alignment**
|
|
92
|
+
- Follows patterns proven effective in Claude Code, Cursor, GitHub Copilot
|
|
93
|
+
- Addresses common failure modes (ambiguous decisions, missing context)
|
|
94
|
+
- Optimizes for LLM strengths (pattern matching) vs weaknesses (calculations)
|
|
95
|
+
|
|
96
|
+
**Addressing Critical Pain Points (from Retrospective)**
|
|
97
|
+
- **Scenario formatting** - Biggest struggle, now explicitly documented with examples
|
|
98
|
+
- **Complete spec structure** - Full examples prevent structural errors
|
|
99
|
+
- **Delta detection issues** - Debugging commands help diagnose problems
|
|
100
|
+
- **Silent parsing failures** - Troubleshooting section explains common issues
|
|
101
|
+
|
|
102
|
+
**Practical Impact**
|
|
103
|
+
- Faster agent comprehension of tasks
|
|
104
|
+
- Fewer misinterpretations of requirements
|
|
105
|
+
- More consistent implementation quality
|
|
106
|
+
- Better error recovery when things go wrong
|
|
107
|
+
- Prevents the most common errors identified in user experience
|
|
108
|
+
|
|
109
|
+
## Trade-offs
|
|
110
|
+
|
|
111
|
+
### What We're Removing
|
|
112
|
+
- Lengthy explanations of concepts that can be inferred
|
|
113
|
+
- Redundant examples that don't add clarity
|
|
114
|
+
- Verbose edge case documentation (moved to reference section)
|
|
115
|
+
- Deprecated command documentation
|
|
116
|
+
|
|
117
|
+
### What We're Keeping
|
|
118
|
+
- All critical workflow steps
|
|
119
|
+
- Complete CLI command reference
|
|
120
|
+
- Complexity management principles
|
|
121
|
+
- Directory structure visualization
|
|
122
|
+
- Quick reference summary
|
|
123
|
+
|
|
124
|
+
## Implementation Notes
|
|
125
|
+
|
|
126
|
+
The CLAUDE.md template is intentionally more concise than README.md since:
|
|
127
|
+
- It appears in every project root
|
|
128
|
+
- Agents can reference the full README.md for details
|
|
129
|
+
- It needs to load quickly in AI context windows
|
|
130
|
+
- Focus is on immediate actionable guidance
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Update OpenSpec Agent Instructions
|
|
2
|
+
|
|
3
|
+
## Why
|
|
4
|
+
|
|
5
|
+
The current OpenSpec agent instructions need updates to follow best practices for AI assistant instructions (brevity, clarity, removing ambiguity), ensure CLI commands are current with the actual implementation, and properly document the three-stage workflow pattern that agents should follow.
|
|
6
|
+
|
|
7
|
+
## What Changes
|
|
8
|
+
|
|
9
|
+
### Core Structure Improvements
|
|
10
|
+
- **Front-load the 3-stage workflow** as the primary mental model:
|
|
11
|
+
1. Creating a change proposal (proposal.md, spec deltas, design.md, tasks.md)
|
|
12
|
+
2. Implementing a change proposal:
|
|
13
|
+
- First read proposal.md to understand the change
|
|
14
|
+
- Read design.md if it exists for technical context
|
|
15
|
+
- Read tasks.md for the implementation checklist
|
|
16
|
+
- Complete tasks one by one
|
|
17
|
+
- Mark each task complete immediately after finishing
|
|
18
|
+
3. Archiving the change proposal (using archive command after deployment)
|
|
19
|
+
- **Reduce instruction length by 50%** while maintaining all critical information
|
|
20
|
+
- **Restructure with clear hierarchy**: Core Workflow → Quick Start → Commands → Details → Edge Cases
|
|
21
|
+
|
|
22
|
+
### Decision Clarity Enhancements
|
|
23
|
+
- **Add clear decision trees** for common scenarios (bug vs feature, proposal needed vs not)
|
|
24
|
+
- **Remove ambiguous conditions** that confuse agent decision-making
|
|
25
|
+
- **Add "Before Any Task" checklist** for context gathering
|
|
26
|
+
- **Add "Before Creating Specs" rule** - Always check existing specs first to avoid duplicates
|
|
27
|
+
|
|
28
|
+
### CLI Documentation Updates
|
|
29
|
+
- **Complete command documentation** with all current functionality:
|
|
30
|
+
- `openspec init [path]` - Initialize OpenSpec in a project
|
|
31
|
+
- `openspec list` - List all active changes (default)
|
|
32
|
+
- `openspec list --specs` - List all specifications
|
|
33
|
+
- `openspec show [item]` - Display change or spec with auto-detection
|
|
34
|
+
- `openspec show` - Interactive mode for selection
|
|
35
|
+
- `openspec diff [change]` - Show spec differences for a change
|
|
36
|
+
- `openspec validate [item]` - Validate changes or specs
|
|
37
|
+
- `openspec archive [change]` - Archive completed change after deployment
|
|
38
|
+
- `openspec update [path]` - Update OpenSpec instruction files
|
|
39
|
+
- **Document all flags and options**:
|
|
40
|
+
- `--json` output format for programmatic use
|
|
41
|
+
- `--type change|spec` for disambiguation
|
|
42
|
+
- `--skip-specs` for tooling-only archives
|
|
43
|
+
- `--strict` for strict validation mode
|
|
44
|
+
- `--no-interactive` to disable prompts
|
|
45
|
+
- **Remove deprecated command references** (noun-first patterns like `openspec change show`)
|
|
46
|
+
- **Add concrete examples** for each command variation
|
|
47
|
+
- **Document debugging commands**:
|
|
48
|
+
- `openspec show [change] --json --deltas-only` for inspecting deltas
|
|
49
|
+
- `openspec validate [change] --strict` for comprehensive validation
|
|
50
|
+
|
|
51
|
+
### Spec File Structure Documentation
|
|
52
|
+
- **Complete spec file examples** showing proper structure:
|
|
53
|
+
```markdown
|
|
54
|
+
## ADDED Requirements
|
|
55
|
+
### Requirement: Clear requirement statement
|
|
56
|
+
The system SHALL provide the functionality...
|
|
57
|
+
|
|
58
|
+
#### Scenario: Descriptive scenario name
|
|
59
|
+
- **WHEN** condition occurs
|
|
60
|
+
- **THEN** expected outcome
|
|
61
|
+
- **AND** additional outcomes
|
|
62
|
+
```
|
|
63
|
+
- **Scenario formatting requirements** (critical - most common error):
|
|
64
|
+
- MUST use `#### Scenario:` headers (4 hashtags)
|
|
65
|
+
- NOT bullet lists or bold text
|
|
66
|
+
- Each requirement MUST have at least one scenario
|
|
67
|
+
- **Delta file location** - Clear explanation:
|
|
68
|
+
- Spec files go in `changes/{name}/specs/` directory
|
|
69
|
+
- Deltas are automatically extracted from these files
|
|
70
|
+
- Use operation prefixes: ADDED, MODIFIED, REMOVED, RENAMED
|
|
71
|
+
|
|
72
|
+
### Troubleshooting Section
|
|
73
|
+
- **Common errors and solutions**:
|
|
74
|
+
- "Change must have at least one delta" → Check specs/ directory exists with .md files
|
|
75
|
+
- "Requirement must have at least one scenario" → Check scenario uses `#### Scenario:` format
|
|
76
|
+
- Silent scenario parsing failures → Verify exact header format
|
|
77
|
+
- **Delta detection debugging**:
|
|
78
|
+
- Use `openspec show [change] --json --deltas-only` to inspect parsed deltas
|
|
79
|
+
- Check that spec files have operation prefixes (## ADDED Requirements)
|
|
80
|
+
- Verify specs/ subdirectory structure
|
|
81
|
+
- **Validation best practices**:
|
|
82
|
+
- Always use `--strict` flag for comprehensive checks
|
|
83
|
+
- Use JSON output for debugging: `--json | jq '.deltas'`
|
|
84
|
+
|
|
85
|
+
### Agent-Specific Improvements
|
|
86
|
+
- **Implementation workflow** - Clear step-by-step process:
|
|
87
|
+
1. Read proposal.md to understand what's being built
|
|
88
|
+
2. Read design.md (if exists) for technical decisions
|
|
89
|
+
3. Read tasks.md for the implementation checklist
|
|
90
|
+
4. Implement tasks one by one in order
|
|
91
|
+
5. Mark each task complete immediately: `- [x] Task completed`
|
|
92
|
+
6. Never skip ahead or batch task completion
|
|
93
|
+
- **Spec discovery workflow** - Always check existing specs before creating new ones:
|
|
94
|
+
- Use `openspec list --specs` to see all current specs
|
|
95
|
+
- Check if capability already exists before creating
|
|
96
|
+
- Prefer modifying existing specs over creating duplicates
|
|
97
|
+
- **Tool selection matrix** - When to use Grep vs Glob vs Read
|
|
98
|
+
- **Error recovery patterns** - How to handle common failures
|
|
99
|
+
- **Context management guide** - What to read before starting tasks
|
|
100
|
+
- **Verification workflows** - How to confirm changes are correct
|
|
101
|
+
|
|
102
|
+
### Best Practices Section
|
|
103
|
+
- **Be concise** - One-line answers when appropriate
|
|
104
|
+
- **Be specific** - Use exact file paths and line numbers (file.ts:42)
|
|
105
|
+
- **Start simple** - Default to <100 lines, single-file implementations
|
|
106
|
+
- **Justify complexity** - Require data/metrics for any optimization
|
|
107
|
+
|
|
108
|
+
## Impact
|
|
109
|
+
|
|
110
|
+
- Affected specs: None (this is a tooling/documentation change)
|
|
111
|
+
- Affected code:
|
|
112
|
+
- `src/core/templates/claude-template.ts` - Update CLAUDE.md template
|
|
113
|
+
- Affected documentation:
|
|
114
|
+
- `openspec/README.md` - Main OpenSpec instructions
|
|
115
|
+
- CLAUDE.md files generated by `openspec init` command
|
|
116
|
+
|
|
117
|
+
Note: This is a tooling/infrastructure change that doesn't require spec updates. When archiving, use `openspec archive update-agent-instructions --skip-specs`.
|
package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/tasks.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Implementation Tasks
|
|
2
|
+
|
|
3
|
+
## 1. Restructure OpenSpec README.md
|
|
4
|
+
- [x] 1.1 Front-load the three-stage workflow as primary content
|
|
5
|
+
- [x] 1.2 Restructure with hierarchy: Core Workflow → Quick Start → Commands → Details → Edge Cases
|
|
6
|
+
- [x] 1.3 Reduce total length by 50% (target: ~285 lines from current ~575)
|
|
7
|
+
- [x] 1.4 Add "Before Any Task" context-gathering checklist
|
|
8
|
+
- [x] 1.5 Add "Before Creating Specs" rule to check existing specs first
|
|
9
|
+
|
|
10
|
+
## 2. Add Decision Clarity
|
|
11
|
+
- [x] 2.1 Create clear decision trees for "Create Proposal?" scenarios
|
|
12
|
+
- [x] 2.2 Remove ambiguous conditions that confuse agents
|
|
13
|
+
- [x] 2.3 Add concrete examples for each decision branch
|
|
14
|
+
- [x] 2.4 Simplify bug vs feature determination logic
|
|
15
|
+
- [x] 2.5 Add explicit Stage 2 implementation steps (read → implement → mark complete)
|
|
16
|
+
|
|
17
|
+
## 3. Update CLI Documentation
|
|
18
|
+
- [x] 3.1 Document `openspec list` and `openspec list --specs` commands
|
|
19
|
+
- [x] 3.2 Document `openspec show` with all flags and interactive mode
|
|
20
|
+
- [x] 3.3 Document `openspec diff [change]` for viewing spec differences
|
|
21
|
+
- [x] 3.4 Document `openspec archive` with --skip-specs option
|
|
22
|
+
- [x] 3.5 Document `openspec validate` with --strict and batch modes
|
|
23
|
+
- [x] 3.6 Document `openspec init` and `openspec update` commands
|
|
24
|
+
- [x] 3.7 Remove all deprecated noun-first command references
|
|
25
|
+
- [x] 3.8 Add concrete usage examples for each command variation
|
|
26
|
+
- [x] 3.9 Document all flags: --json, --type, --no-interactive, etc.
|
|
27
|
+
- [x] 3.10 Document debugging commands: `show --json --deltas-only`
|
|
28
|
+
|
|
29
|
+
## 4. Add Spec File Documentation
|
|
30
|
+
- [x] 4.1 Add complete spec file structure example with ADDED/MODIFIED sections
|
|
31
|
+
- [x] 4.2 Document scenario formatting requirements (#### Scenario: headers)
|
|
32
|
+
- [x] 4.3 Explain delta file location (changes/{name}/specs/ directory)
|
|
33
|
+
- [x] 4.4 Show how deltas are automatically extracted
|
|
34
|
+
- [x] 4.5 Include warning about most common error (scenario formatting)
|
|
35
|
+
|
|
36
|
+
## 5. Add Troubleshooting Section
|
|
37
|
+
- [x] 5.1 Document common errors and their solutions
|
|
38
|
+
- [x] 5.2 Add delta detection debugging steps
|
|
39
|
+
- [x] 5.3 Include validation best practices (--strict flag)
|
|
40
|
+
- [x] 5.4 Show how to use JSON output for debugging
|
|
41
|
+
- [x] 5.5 Add examples of silent parsing failures
|
|
42
|
+
|
|
43
|
+
## 6. Add Agent-Specific Sections
|
|
44
|
+
- [x] 6.1 Add implementation workflow (read docs → implement tasks → mark complete)
|
|
45
|
+
- [x] 6.2 Add spec discovery workflow (check existing before creating)
|
|
46
|
+
- [x] 6.3 Create tool selection matrix (Grep vs Glob vs Read)
|
|
47
|
+
- [x] 6.4 Add error recovery patterns section
|
|
48
|
+
- [x] 6.5 Add context management guide
|
|
49
|
+
- [x] 6.6 Add verification workflows section
|
|
50
|
+
- [x] 6.7 Add best practices section (concise, specific, simple)
|
|
51
|
+
|
|
52
|
+
## 7. Update CLAUDE.md Template
|
|
53
|
+
- [x] 7.1 Update `src/core/templates/claude-template.ts` with streamlined content
|
|
54
|
+
- [x] 7.2 Include three-stage workflow prominently
|
|
55
|
+
- [x] 7.3 Add comprehensive CLI quick reference (list, show, diff, archive, etc.)
|
|
56
|
+
- [x] 7.4 Add "Before Any Task" checklist
|
|
57
|
+
- [x] 7.5 Add "Before Creating Specs" rule
|
|
58
|
+
- [x] 7.6 Keep complexity management principles
|
|
59
|
+
- [x] 7.7 Add critical scenario formatting note (#### Scenario: headers)
|
|
60
|
+
- [x] 7.8 Include debugging command reference
|
|
61
|
+
|
|
62
|
+
## 8. Testing and Validation
|
|
63
|
+
- [x] 8.1 Test all documented CLI commands for accuracy
|
|
64
|
+
- [x] 8.2 Run `openspec init` to verify CLAUDE.md generation
|
|
65
|
+
- [x] 8.3 Validate instruction clarity with example scenarios
|
|
66
|
+
- [x] 8.4 Ensure no critical information was lost in streamlining
|
|
67
|
+
- [x] 8.5 Verify decision trees eliminate ambiguity
|
|
68
|
+
- [x] 8.6 Test scenario formatting examples work correctly
|
|
69
|
+
- [x] 8.7 Verify troubleshooting steps resolve common errors
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Update Markdown Parser CRLF Handling
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
Windows users report that `openspec validate` raises “Change must have a Why section” even when the section exists (see GitHub issue #77). The CLI currently splits markdown on `\n` and compares headers without stripping `\r`, so files saved with CRLF line endings keep a trailing carriage return in the header token. As a result the parser fails to detect `## Why`/`## What Changes`, triggering false validation errors and breaking the workflow on Windows-default editors.
|
|
5
|
+
|
|
6
|
+
## Solution
|
|
7
|
+
- Normalize markdown content inside the parser so CRLF and lone-CR inputs are treated as `\n` before section detection, trimming any carriage returns from titles and content comparisons.
|
|
8
|
+
- Reuse the normalized reader everywhere `MarkdownParser` is constructed to keep behavior consistent for validation, view, spec, and list flows.
|
|
9
|
+
- Add regression coverage that reproduces the failure (unit test around `parseChange` and a CLI spawn/e2e test that writes a CRLF change then runs `openspec validate`).
|
|
10
|
+
- Update the `cli-validate` spec to codify the expectation that required sections are recognized regardless of line-ending style.
|
|
11
|
+
|
|
12
|
+
## Benefits
|
|
13
|
+
- Restores correct validation behavior for Windows editors without requiring manual line-ending conversion.
|
|
14
|
+
- Locks in the fix with targeted tests so future parser refactors keep cross-platform support.
|
|
15
|
+
- Clarifies the spec so downstream work (e.g., cross-shell e2e plan) understands the non-negotiable behavior.
|
|
16
|
+
|
|
17
|
+
## Risks
|
|
18
|
+
- Low: parser normalization touches shared code paths that parse specs and changes; need to ensure no regressions in other command consumers (mitigated by existing parser tests plus the new CRLF fixtures).
|
|
19
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## ADDED Requirements
|
|
2
|
+
### Requirement: Parser SHALL handle cross-platform line endings
|
|
3
|
+
The markdown parser SHALL correctly identify sections regardless of line ending format (LF, CRLF, CR).
|
|
4
|
+
|
|
5
|
+
#### Scenario: Required sections parsed with CRLF line endings
|
|
6
|
+
- **GIVEN** a change proposal markdown saved with CRLF line endings
|
|
7
|
+
- **AND** the document contains `## Why` and `## What Changes`
|
|
8
|
+
- **WHEN** running `openspec validate <change-id>`
|
|
9
|
+
- **THEN** validation SHALL recognize the sections and NOT raise parsing errors
|
package/references/openspec/openspec/changes/archive/2025-09-29-update-markdown-parser-crlf/tasks.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## 1. Guard the regression
|
|
2
|
+
- [x] 1.1 Add a unit test that feeds a CRLF change document into `MarkdownParser.parseChange` and asserts `Why`/`What Changes` are detected.
|
|
3
|
+
- [x] 1.2 Add a CLI spawn/e2e test that writes a CRLF change, runs `openspec validate`, and expects success.
|
|
4
|
+
|
|
5
|
+
## 2. Normalize parsing
|
|
6
|
+
- [x] 2.1 Normalize line endings when constructing `MarkdownParser` so headers and content comparisons ignore `\r`.
|
|
7
|
+
- [x] 2.2 Ensure all CLI entry points (validate, view, spec conversion) reuse the normalized parser path.
|
|
8
|
+
|
|
9
|
+
## 3. Document and verify
|
|
10
|
+
- [x] 3.1 Update the `cli-validate` spec with a scenario covering CRLF line endings.
|
|
11
|
+
- [x] 3.2 Run the parser and CLI test suites (`pnpm test`, relevant spawn tests) to confirm the fix.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
- Codex (the VS Code extension formerly known as Codeium Chat) exposes "slash commands" by reading Markdown prompt files from `~/.codex/prompts/`. Each file name becomes the `/command` users can run, with YAML frontmatter for metadata (`description`, `argument-hint`) and `$ARGUMENTS` to capture user input. The workflow screenshot shared by Kevin Kern ("Codex problem analyzer") shows the format OpenSpec should target so teams can invoke curated workflows straight from the chat palette.
|
|
3
|
+
- Teams already rely on OpenSpec to manage the slash-command surface area for Claude, Cursor, OpenCode, Kilo Code, and Windsurf. Leaving Codex out forces them to manually copy/paste OpenSpec guardrails into `~/.codex/prompts/*.md`, which drifts quickly and undermines the "single source of truth" promise of the CLI.
|
|
4
|
+
- Codex commands live outside the repository (under the user's home directory), so shipping an automated configurator that both scaffolds the prompts and keeps them refreshed via `openspec update` eliminates error-prone manual steps and keeps OpenSpec instructions synchronized across assistants.
|
|
5
|
+
|
|
6
|
+
## What Changes
|
|
7
|
+
- Add Codex to the `openspec init` tool picker with the same "already configured" detection we use for other editors, wiring an implementation that writes managed Markdown prompts directly to Codex's global directory (`~/.codex/prompts` or `$CODEX_HOME/prompts`) with OpenSpec marker blocks.
|
|
8
|
+
- Produce three Codex prompt files—`openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`—whose content mirrors the shared slash-command templates while using YAML frontmatter (`description` and `argument-hint` fields) and `$ARGUMENTS` to capture all arguments as a single string (matching the GitHub Copilot pattern and official Codex specification).
|
|
9
|
+
- Document Codex's global-only discovery and that OpenSpec writes prompts directly to `~/.codex/prompts` (or `$CODEX_HOME/prompts`).
|
|
10
|
+
- Teach `openspec update` to refresh existing Codex prompts in-place (and only when they already exist) in the global directory, updating both frontmatter and body.
|
|
11
|
+
- Document Codex support alongside other slash-command integrations and add regression coverage that exercises init/update behaviour against a temporary global prompts directory via `CODEX_HOME`.
|
|
12
|
+
|
|
13
|
+
## Impact
|
|
14
|
+
- Specs: `cli-init`, `cli-update`
|
|
15
|
+
- Code: `src/core/config.ts`, `src/core/configurators/slash/*`, `src/core/templates/slash-command-templates.ts`, CLI tool summaries, docs
|
|
16
|
+
- Tests: integration coverage for Codex prompt scaffolding and refresh logic
|
|
17
|
+
- Docs: README and CHANGELOG entries announcing Codex slash-command support
|
|
18
|
+
|
|
19
|
+
## Current Spec Reference
|
|
20
|
+
- `specs/cli-init/spec.md`
|
|
21
|
+
- Requirements cover init UX, directory scaffolding, AI tool configuration, and the existing slash-command support for Claude Code, Cursor, and OpenCode.
|
|
22
|
+
- Our `## MODIFIED` delta in `changes/.../specs/cli-init/spec.md` copies the full "Slash Command Configuration" requirement (header, description, and all scenarios) before appending the new Codex scenario so archiving will retain every prior scenario.
|
|
23
|
+
- `specs/cli-update/spec.md`
|
|
24
|
+
- Requirements define update preconditions, template refresh behavior, and slash-command refresh logic for Claude Code, Cursor, and OpenCode.
|
|
25
|
+
- The corresponding delta preserves the entire "Slash Command Updates" requirement while adding the Codex refresh scenario, ensuring the archive workflow replaces the block without losing the existing scenarios or the "Missing slash command file" guardrail.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
## MODIFIED Requirements
|
|
2
|
+
### Requirement: AI Tool Configuration
|
|
3
|
+
The command SHALL configure AI coding assistants with OpenSpec instructions using a marker system.
|
|
4
|
+
#### Scenario: Prompting for AI tool selection
|
|
5
|
+
- **WHEN** run interactively
|
|
6
|
+
- **THEN** prompt the user with "Which AI tools do you use?" using a multi-select menu
|
|
7
|
+
- **AND** list every available tool with a checkbox:
|
|
8
|
+
- Claude Code (creates or refreshes CLAUDE.md and slash commands)
|
|
9
|
+
- Cursor (creates or refreshes `.cursor/commands/*` slash commands)
|
|
10
|
+
- OpenCode (creates or refreshes `.opencode/command/openspec-*.md` slash commands)
|
|
11
|
+
- Windsurf (creates or refreshes `.windsurf/workflows/openspec-*.md` workflows)
|
|
12
|
+
- Kilo Code (creates or refreshes `.kilocode/workflows/openspec-*.md` workflows)
|
|
13
|
+
- Codex (creates or refreshes global prompts at `~/.codex/prompts/openspec-*.md`)
|
|
14
|
+
- AGENTS.md standard (creates or refreshes AGENTS.md with OpenSpec markers)
|
|
15
|
+
- **AND** show "(already configured)" beside tools whose managed files exist so users understand selections will refresh content
|
|
16
|
+
- **AND** treat disabled tools as "coming soon" and keep them unselectable
|
|
17
|
+
- **AND** allow confirming with Enter after selecting one or more tools
|
|
18
|
+
|
|
19
|
+
### Requirement: Slash Command Configuration
|
|
20
|
+
The init command SHALL generate slash command files for supported editors using shared templates.
|
|
21
|
+
|
|
22
|
+
#### Scenario: Generating slash commands for Claude Code
|
|
23
|
+
- **WHEN** the user selects Claude Code during initialization
|
|
24
|
+
- **THEN** create `.claude/commands/openspec/proposal.md`, `.claude/commands/openspec/apply.md`, and `.claude/commands/openspec/archive.md`
|
|
25
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
26
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
27
|
+
|
|
28
|
+
#### Scenario: Generating slash commands for Cursor
|
|
29
|
+
- **WHEN** the user selects Cursor during initialization
|
|
30
|
+
- **THEN** create `.cursor/commands/openspec-proposal.md`, `.cursor/commands/openspec-apply.md`, and `.cursor/commands/openspec-archive.md`
|
|
31
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
32
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
33
|
+
|
|
34
|
+
#### Scenario: Generating slash commands for OpenCode
|
|
35
|
+
- **WHEN** the user selects OpenCode during initialization
|
|
36
|
+
- **THEN** create `.opencode/command/openspec-proposal.md`, `.opencode/command/openspec-apply.md`, and `.opencode/command/openspec-archive.md`
|
|
37
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
38
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
39
|
+
|
|
40
|
+
#### Scenario: Generating slash commands for Windsurf
|
|
41
|
+
- **WHEN** the user selects Windsurf during initialization
|
|
42
|
+
- **THEN** create `.windsurf/workflows/openspec-proposal.md`, `.windsurf/workflows/openspec-apply.md`, and `.windsurf/workflows/openspec-archive.md`
|
|
43
|
+
- **AND** populate each file from shared templates (wrapped in OpenSpec markers) so workflow text matches other tools
|
|
44
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
45
|
+
|
|
46
|
+
#### Scenario: Generating slash commands for Kilo Code
|
|
47
|
+
- **WHEN** the user selects Kilo Code during initialization
|
|
48
|
+
- **THEN** create `.kilocode/workflows/openspec-proposal.md`, `.kilocode/workflows/openspec-apply.md`, and `.kilocode/workflows/openspec-archive.md`
|
|
49
|
+
- **AND** populate each file from shared templates (wrapped in OpenSpec markers) so workflow text matches other tools
|
|
50
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
51
|
+
|
|
52
|
+
#### Scenario: Generating slash commands for Codex
|
|
53
|
+
- **WHEN** the user selects Codex during initialization
|
|
54
|
+
- **THEN** create global prompt files at `~/.codex/prompts/openspec-proposal.md`, `~/.codex/prompts/openspec-apply.md`, and `~/.codex/prompts/openspec-archive.md` (or under `$CODEX_HOME/prompts` if set)
|
|
55
|
+
- **AND** populate each file from shared templates that map the first numbered placeholder (`$1`) to the primary user input (e.g., change identifier or question text)
|
|
56
|
+
- **AND** wrap the generated content in OpenSpec markers so `openspec update` can refresh the prompts without touching surrounding custom notes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
## MODIFIED Requirements
|
|
2
|
+
### Requirement: Slash Command Updates
|
|
3
|
+
The update command SHALL refresh existing slash command files for configured tools without creating new ones.
|
|
4
|
+
|
|
5
|
+
#### Scenario: Updating slash commands for Claude Code
|
|
6
|
+
- **WHEN** `.claude/commands/openspec/` contains `proposal.md`, `apply.md`, and `archive.md`
|
|
7
|
+
- **THEN** refresh each file using shared templates
|
|
8
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
9
|
+
|
|
10
|
+
#### Scenario: Updating slash commands for Cursor
|
|
11
|
+
- **WHEN** `.cursor/commands/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
12
|
+
- **THEN** refresh each file using shared templates
|
|
13
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
14
|
+
|
|
15
|
+
#### Scenario: Updating slash commands for OpenCode
|
|
16
|
+
- **WHEN** `.opencode/command/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
17
|
+
- **THEN** refresh each file using shared templates
|
|
18
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
19
|
+
|
|
20
|
+
#### Scenario: Updating slash commands for Windsurf
|
|
21
|
+
- **WHEN** `.windsurf/workflows/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
22
|
+
- **THEN** refresh each file using shared templates wrapped in OpenSpec markers
|
|
23
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
24
|
+
- **AND** skip creating missing files (the update command only refreshes what already exists)
|
|
25
|
+
|
|
26
|
+
#### Scenario: Updating slash commands for Kilo Code
|
|
27
|
+
- **WHEN** `.kilocode/workflows/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
28
|
+
- **THEN** refresh each file using shared templates wrapped in OpenSpec markers
|
|
29
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
30
|
+
- **AND** skip creating missing files (the update command only refreshes what already exists)
|
|
31
|
+
|
|
32
|
+
#### Scenario: Updating slash commands for Codex
|
|
33
|
+
- **GIVEN** the global Codex prompt directory contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
34
|
+
- **WHEN** a user runs `openspec update`
|
|
35
|
+
- **THEN** refresh each file using the shared slash-command templates (including placeholder guidance)
|
|
36
|
+
- **AND** preserve any unmanaged content outside the OpenSpec marker block
|
|
37
|
+
- **AND** skip creation when a Codex prompt file is missing
|
|
38
|
+
|
|
39
|
+
#### Scenario: Missing slash command file
|
|
40
|
+
- **WHEN** a tool lacks a slash command file
|
|
41
|
+
- **THEN** do not create a new file during update
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
## 1. CLI integration
|
|
2
|
+
- [x] 1.1 Add Codex to the init tool picker with display text that clarifies prompts live in the global `.codex/prompts/` directory and implement "already configured" detection by checking for managed Codex prompt files.
|
|
3
|
+
- [x] 1.2 Implement a `CodexSlashCommandConfigurator` that writes `.codex/prompts/openspec-{proposal,apply,archive}.md`, ensuring the prompt directory exists and wrapping content in OpenSpec markers.
|
|
4
|
+
// (No helper command required)
|
|
5
|
+
- [x] 1.3 Register the configurator with the slash-command registry and include Codex in init/update wiring so both commands invoke the new configurator when appropriate.
|
|
6
|
+
|
|
7
|
+
## 2. Prompt templates
|
|
8
|
+
- [x] 2.1 Extend the shared slash-command templates (or add a Codex-specific wrapper) to inject numbered placeholders (`$1`, `$2`, …) where Codex expects user-supplied arguments.
|
|
9
|
+
- [x] 2.2 Verify generated Markdown stays within Codex's formatting expectations (no front matter, heading-first layout) and matches the problem-analyzer style shown in the reference screenshot.
|
|
10
|
+
|
|
11
|
+
## 3. Update support & tests
|
|
12
|
+
- [x] 3.1 Update the `openspec update` flow to refresh existing Codex prompts without creating new ones when files are missing.
|
|
13
|
+
- [x] 3.2 Add integration coverage that exercises init/update against a temporary global Codex prompts directory by setting `CODEX_HOME`, asserting marker preservation and idempotent updates.
|
|
14
|
+
- [x] 3.3 Document Codex's global-only discovery and automatic installation in README and CHANGELOG.
|
|
15
|
+
- [x] 3.3 Confirm error handling surfaces clear paths when the CLI cannot write to the Codex prompt directory (permissions, missing home directory, etc.).
|
|
16
|
+
|
|
17
|
+
## 4. Documentation
|
|
18
|
+
- [x] 4.1 Document Codex slash-command support in the README and changelog alongside other assistant integrations.
|
|
19
|
+
- [x] 4.2 Add a release note snippet that points Codex users to the generated `/openspec-proposal`, `/openspec-apply`, and `/openspec-archive` commands.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
- GitHub Copilot supports custom slash commands through markdown files in `.github/prompts/<name>.prompt.md`. Each file includes YAML frontmatter with a `description` label and uses `$ARGUMENTS` to capture user input. This format allows teams to expose curated workflows directly in Copilot's chat interface.
|
|
3
|
+
- Teams already rely on OpenSpec to manage slash-command configurations for Claude Code, Cursor, OpenCode, Codex, Kilo Code, and Windsurf. Excluding GitHub Copilot forces developers to manually maintain OpenSpec prompts in `.github/prompts/`, which leads to drift and undermines OpenSpec's "single source of truth" promise.
|
|
4
|
+
- GitHub Copilot discovers prompts from the repository's `.github/prompts/` directory, making it straightforward to version control and share across the team. Adding automated generation and refresh through `openspec init` and `openspec update` eliminates manual synchronization and keeps OpenSpec instructions consistent across all AI assistants.
|
|
5
|
+
|
|
6
|
+
## What Changes
|
|
7
|
+
- Add GitHub Copilot to the `openspec init` tool picker with "already configured" detection similar to other editors, wiring an implementation that writes managed Markdown prompt files to `.github/prompts/` with OpenSpec marker blocks.
|
|
8
|
+
- Generate three GitHub Copilot prompt files—`openspec-proposal.prompt.md`, `openspec-apply.prompt.md`, and `openspec-archive.prompt.md`—whose content mirrors shared slash-command templates while conforming to Copilot's frontmatter and `$ARGUMENTS` placeholder convention.
|
|
9
|
+
- Document GitHub Copilot's repository-based discovery and that OpenSpec writes prompts to `.github/prompts/` with managed blocks.
|
|
10
|
+
- Teach `openspec update` to refresh existing GitHub Copilot prompts in-place (only when they already exist) in the repository's `.github/prompts/` directory.
|
|
11
|
+
- Document GitHub Copilot support alongside other slash-command integrations and add test coverage that exercises init/update behavior for `.github/prompts/` files.
|
|
12
|
+
|
|
13
|
+
## Impact
|
|
14
|
+
- Specs: `cli-init`, `cli-update`
|
|
15
|
+
- Code: `src/core/configurators/slash/github-copilot.ts` (new), `src/core/configurators/slash/registry.ts`, `src/core/templates/slash-command-templates.ts`, CLI tool summaries, docs
|
|
16
|
+
- Tests: integration coverage for GitHub Copilot prompt scaffolding and refresh logic
|
|
17
|
+
- Docs: README and CHANGELOG entries announcing GitHub Copilot slash-command support
|
|
18
|
+
|
|
19
|
+
## Current Spec Reference
|
|
20
|
+
- `specs/cli-init/spec.md`
|
|
21
|
+
- Requirements cover init UX, directory scaffolding, AI tool configuration, and existing slash-command support for Claude Code, Cursor, OpenCode, Codex, Kilo Code, and Windsurf.
|
|
22
|
+
- Our `## MODIFIED` delta in `changes/.../specs/cli-init/spec.md` will copy the full "Slash Command Configuration" requirement (header, description, and all scenarios) before appending the new GitHub Copilot scenario so archiving retains every prior scenario.
|
|
23
|
+
- `specs/cli-update/spec.md`
|
|
24
|
+
- Requirements define update preconditions, template refresh behavior, and slash-command refresh logic for existing tools.
|
|
25
|
+
- The corresponding delta preserves the entire "Slash Command Updates" requirement while adding the GitHub Copilot refresh scenario, ensuring the archive workflow replaces the block without losing existing scenarios or the "Missing slash command file" guardrail.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
## MODIFIED Requirements
|
|
2
|
+
|
|
3
|
+
### Requirement: Slash Command Configuration
|
|
4
|
+
The init command SHALL generate slash command files for supported editors using shared templates.
|
|
5
|
+
|
|
6
|
+
#### Scenario: Generating slash commands for Claude Code
|
|
7
|
+
- **WHEN** the user selects Claude Code during initialization
|
|
8
|
+
- **THEN** create `.claude/commands/openspec/proposal.md`, `.claude/commands/openspec/apply.md`, and `.claude/commands/openspec/archive.md`
|
|
9
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
10
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
11
|
+
|
|
12
|
+
#### Scenario: Generating slash commands for Cursor
|
|
13
|
+
- **WHEN** the user selects Cursor during initialization
|
|
14
|
+
- **THEN** create `.cursor/commands/openspec-proposal.md`, `.cursor/commands/openspec-apply.md`, and `.cursor/commands/openspec-archive.md`
|
|
15
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
16
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
17
|
+
|
|
18
|
+
#### Scenario: Generating slash commands for OpenCode
|
|
19
|
+
- **WHEN** the user selects OpenCode during initialization
|
|
20
|
+
- **THEN** create `.opencode/commands/openspec-proposal.md`, `.opencode/commands/openspec-apply.md`, and `.opencode/commands/openspec-archive.md`
|
|
21
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
22
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
23
|
+
|
|
24
|
+
#### Scenario: Generating slash commands for Windsurf
|
|
25
|
+
- **WHEN** the user selects Windsurf during initialization
|
|
26
|
+
- **THEN** create `.windsurf/workflows/openspec-proposal.md`, `.windsurf/workflows/openspec-apply.md`, and `.windsurf/workflows/openspec-archive.md`
|
|
27
|
+
- **AND** populate each file from shared templates (wrapped in OpenSpec markers) so workflow text matches other tools
|
|
28
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
29
|
+
|
|
30
|
+
#### Scenario: Generating slash commands for Kilo Code
|
|
31
|
+
- **WHEN** the user selects Kilo Code during initialization
|
|
32
|
+
- **THEN** create `.kilocode/workflows/openspec-proposal.md`, `.kilocode/workflows/openspec-apply.md`, and `.kilocode/workflows/openspec-archive.md`
|
|
33
|
+
- **AND** populate each file from shared templates (wrapped in OpenSpec markers) so workflow text matches other tools
|
|
34
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
35
|
+
|
|
36
|
+
#### Scenario: Generating slash commands for Codex
|
|
37
|
+
- **WHEN** the user selects Codex during initialization
|
|
38
|
+
- **THEN** create global prompt files at `~/.codex/prompts/openspec-proposal.md`, `~/.codex/prompts/openspec-apply.md`, and `~/.codex/prompts/openspec-archive.md` (or under `$CODEX_HOME/prompts` if set)
|
|
39
|
+
- **AND** populate each file from shared templates that map the first numbered placeholder (`$1`) to the primary user input (e.g., change identifier or question text)
|
|
40
|
+
- **AND** wrap the generated content in OpenSpec markers so `openspec update` can refresh the prompts without touching surrounding custom notes
|
|
41
|
+
|
|
42
|
+
#### Scenario: Generating slash commands for GitHub Copilot
|
|
43
|
+
- **WHEN** the user selects GitHub Copilot during initialization
|
|
44
|
+
- **THEN** create `.github/prompts/openspec-proposal.prompt.md`, `.github/prompts/openspec-apply.prompt.md`, and `.github/prompts/openspec-archive.prompt.md`
|
|
45
|
+
- **AND** populate each file with YAML frontmatter containing a `description` field that summarizes the workflow stage
|
|
46
|
+
- **AND** include `$ARGUMENTS` placeholder to capture user input
|
|
47
|
+
- **AND** wrap the shared template body with OpenSpec markers so `openspec update` can refresh the content
|
|
48
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
## MODIFIED Requirements
|
|
2
|
+
|
|
3
|
+
### Requirement: Slash Command Updates
|
|
4
|
+
The update command SHALL refresh existing slash command files for configured tools without creating new ones.
|
|
5
|
+
|
|
6
|
+
#### Scenario: Updating slash commands for Claude Code
|
|
7
|
+
- **WHEN** `.claude/commands/openspec/` contains `proposal.md`, `apply.md`, and `archive.md`
|
|
8
|
+
- **THEN** refresh each file using shared templates
|
|
9
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
10
|
+
|
|
11
|
+
#### Scenario: Updating slash commands for Cursor
|
|
12
|
+
- **WHEN** `.cursor/commands/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
13
|
+
- **THEN** refresh each file using shared templates
|
|
14
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
15
|
+
|
|
16
|
+
#### Scenario: Updating slash commands for OpenCode
|
|
17
|
+
- **WHEN** `.opencode/command/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
18
|
+
- **THEN** refresh each file using shared templates
|
|
19
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
20
|
+
|
|
21
|
+
#### Scenario: Updating slash commands for Windsurf
|
|
22
|
+
- **WHEN** `.windsurf/workflows/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
23
|
+
- **THEN** refresh each file using shared templates wrapped in OpenSpec markers
|
|
24
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
25
|
+
- **AND** skip creating missing files (the update command only refreshes what already exists)
|
|
26
|
+
|
|
27
|
+
#### Scenario: Updating slash commands for Kilo Code
|
|
28
|
+
- **WHEN** `.kilocode/workflows/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
29
|
+
- **THEN** refresh each file using shared templates wrapped in OpenSpec markers
|
|
30
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
31
|
+
- **AND** skip creating missing files (the update command only refreshes what already exists)
|
|
32
|
+
|
|
33
|
+
#### Scenario: Updating slash commands for Codex
|
|
34
|
+
- **GIVEN** the global Codex prompt directory contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
35
|
+
- **WHEN** a user runs `openspec update`
|
|
36
|
+
- **THEN** refresh each file using the shared slash-command templates (including placeholder guidance)
|
|
37
|
+
- **AND** preserve any unmanaged content outside the OpenSpec marker block
|
|
38
|
+
- **AND** skip creation when a Codex prompt file is missing
|
|
39
|
+
|
|
40
|
+
#### Scenario: Updating slash commands for GitHub Copilot
|
|
41
|
+
- **WHEN** `.github/prompts/` contains `openspec-proposal.prompt.md`, `openspec-apply.prompt.md`, and `openspec-archive.prompt.md`
|
|
42
|
+
- **THEN** refresh each file using shared templates while preserving the YAML frontmatter
|
|
43
|
+
- **AND** update only the OpenSpec-managed block between markers
|
|
44
|
+
- **AND** ensure templates include instructions for the relevant workflow stage
|
|
45
|
+
|
|
46
|
+
#### Scenario: Missing slash command file
|
|
47
|
+
- **WHEN** a tool lacks a slash command file
|
|
48
|
+
- **THEN** do not create a new file during update
|