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-10-14-add-github-copilot-prompts/tasks.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
## Implementation Tasks
|
|
2
|
+
|
|
3
|
+
- [x] Create `src/core/configurators/slash/github-copilot.ts` implementing `SlashCommandConfigurator` base class
|
|
4
|
+
- Implement `getRelativePath()` to return `.github/prompts/openspec-{proposal,apply,archive}.prompt.md`
|
|
5
|
+
- Implement `getFrontmatter()` to generate YAML frontmatter with `description` field and include `$ARGUMENTS` placeholder
|
|
6
|
+
- Implement `generateAll()` to create `.github/prompts/` directory and write three prompt files with frontmatter, markers, and shared template bodies
|
|
7
|
+
- Implement `updateExisting()` to refresh only the managed block between markers while preserving frontmatter
|
|
8
|
+
- Set `toolId = "github-copilot"` and `isAvailable = true`
|
|
9
|
+
|
|
10
|
+
- [x] Register GitHub Copilot configurator in `src/core/configurators/slash/registry.ts`
|
|
11
|
+
- Import `GitHubCopilotSlashCommandConfigurator`
|
|
12
|
+
- Add to `SLASH_COMMAND_CONFIGURATORS` array
|
|
13
|
+
- Update tool picker display name to "GitHub Copilot"
|
|
14
|
+
|
|
15
|
+
- [x] Update `src/core/init.ts` to include GitHub Copilot in the AI tool selection prompt
|
|
16
|
+
- Add GitHub Copilot to the available tools list with detection for existing `.github/prompts/openspec-*.prompt.md` files
|
|
17
|
+
- Display "(already configured)" when prompt files exist
|
|
18
|
+
|
|
19
|
+
- [x] Update `src/core/update.ts` to refresh GitHub Copilot prompts when they exist
|
|
20
|
+
- Call `updateExisting()` for GitHub Copilot configurator when `.github/prompts/` contains OpenSpec prompt files
|
|
21
|
+
|
|
22
|
+
- [x] Add integration tests for GitHub Copilot slash command generation
|
|
23
|
+
- Test `generateAll()` creates three prompt files with correct structure (frontmatter + markers + body)
|
|
24
|
+
- Test `updateExisting()` preserves frontmatter and only updates managed blocks
|
|
25
|
+
- Test that missing prompt files are not created during update
|
|
26
|
+
|
|
27
|
+
- [x] Update documentation
|
|
28
|
+
- Add GitHub Copilot to README slash-command support table
|
|
29
|
+
- Document `.github/prompts/` as the discovery location
|
|
30
|
+
- Add CHANGELOG entry for GitHub Copilot support
|
package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/proposal.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
- Kilo Code executes \"slash commands\" by loading markdown workflows from `.kilocode/workflows/` (or the global `~/.kilocode/workflows/`) and running them when a user types `/workflow-name.md`, making project-local workflow files the analogue to the slash-command files we already ship for other tools.\\
|
|
3
|
+
([Workflows | Kilo Code Docs](https://kilocode.ai/docs/features/slash-commands/workflows))
|
|
4
|
+
- Those workflows are plain markdown with step-by-step instructions that can call built-in tools and MCP integrations, so reusing OpenSpec's shared proposal/apply/archive bodies keeps behaviour aligned across assistants without inventing new content.
|
|
5
|
+
- OpenSpec already detects configured tools and refreshes marker-wrapped files during `init`/`update`; extending the same mechanism to `.kilocode/workflows/openspec-*.md` ensures Kilo Code stays in sync with one source of truth.
|
|
6
|
+
|
|
7
|
+
## What Changes
|
|
8
|
+
- Add Kilo Code to the `openspec init` tool picker with \"already configured\" detection, including wiring for extend mode so teams can refresh Kilo Code assets.
|
|
9
|
+
- Implement a `KiloCodeSlashCommandConfigurator` that creates `.kilocode/workflows/openspec-{proposal,apply,archive}.md`, ensuring the workflow directory exists and wrapping shared content in OpenSpec markers (no front matter required).
|
|
10
|
+
- Teach `openspec update` to refresh existing Kilo Code workflows (and only those that already exist) using the shared slash-command templates.
|
|
11
|
+
- Update documentation, release notes, and integration tests so the new workflow support is covered alongside Claude, Cursor, OpenCode, and Windsurf.
|
|
12
|
+
|
|
13
|
+
## Impact
|
|
14
|
+
- Specs: `cli-init`, `cli-update`
|
|
15
|
+
- Code: `src/core/config.ts`, `src/core/configurators/(registry|slash/*)`, `src/core/templates/slash-command-templates.ts`, CLI wiring for tool summaries
|
|
16
|
+
- Tests: init/update workflow coverage, regression for marker preservation in `.kilocode/workflows/`
|
|
17
|
+
- Docs: README / CHANGELOG updates advertising Kilo Code workflow support
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
- AGENTS.md standard (creates or refreshes AGENTS.md with OpenSpec markers)
|
|
14
|
+
- **AND** show "(already configured)" beside tools whose managed files exist so users understand selections will refresh content
|
|
15
|
+
- **AND** treat disabled tools as "coming soon" and keep them unselectable
|
|
16
|
+
- **AND** allow confirming with Enter after selecting one or more tools
|
|
17
|
+
|
|
18
|
+
### Requirement: Slash Command Configuration
|
|
19
|
+
The init command SHALL generate slash command files for supported editors using shared templates.
|
|
20
|
+
|
|
21
|
+
#### Scenario: Generating slash commands for Claude Code
|
|
22
|
+
- **WHEN** the user selects Claude Code during initialization
|
|
23
|
+
- **THEN** create `.claude/commands/openspec/proposal.md`, `.claude/commands/openspec/apply.md`, and `.claude/commands/openspec/archive.md`
|
|
24
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
25
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
26
|
+
|
|
27
|
+
#### Scenario: Generating slash commands for Cursor
|
|
28
|
+
- **WHEN** the user selects Cursor during initialization
|
|
29
|
+
- **THEN** create `.cursor/commands/openspec-proposal.md`, `.cursor/commands/openspec-apply.md`, and `.cursor/commands/openspec-archive.md`
|
|
30
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
31
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
32
|
+
|
|
33
|
+
#### Scenario: Generating slash commands for OpenCode
|
|
34
|
+
- **WHEN** the user selects OpenCode during initialization
|
|
35
|
+
- **THEN** create `.opencode/commands/openspec-proposal.md`, `.opencode/commands/openspec-apply.md`, and `.opencode/commands/openspec-archive.md`
|
|
36
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
37
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
38
|
+
|
|
39
|
+
#### Scenario: Generating slash commands for Kilo Code
|
|
40
|
+
- **WHEN** the user selects Kilo Code during initialization
|
|
41
|
+
- **THEN** create `.kilocode/workflows/openspec-proposal.md`, `.kilocode/workflows/openspec-apply.md`, and `.kilocode/workflows/openspec-archive.md`
|
|
42
|
+
- **AND** populate each file from shared templates (wrapped in OpenSpec markers) so workflow text matches other tools
|
|
43
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
@@ -0,0 +1,27 @@
|
|
|
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 Kilo Code
|
|
21
|
+
- **WHEN** `.kilocode/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
|
+
|
|
25
|
+
#### Scenario: Missing slash command file
|
|
26
|
+
- **WHEN** a tool lacks a slash command file
|
|
27
|
+
- **THEN** do not create a new file during update
|
package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/tasks.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## 1. CLI wiring
|
|
2
|
+
- [x] 1.1 Add Kilo Code to the selectable AI tools in `openspec init`, including "already configured" detection and success summaries.
|
|
3
|
+
- [x] 1.2 Register a `KiloCodeSlashCommandConfigurator` alongside other slash-command tools.
|
|
4
|
+
|
|
5
|
+
## 2. Workflow generation
|
|
6
|
+
- [x] 2.1 Implement the configurator so it creates `.kilocode/workflows/` (if needed) and writes `openspec-{proposal,apply,archive}.md` with OpenSpec markers.
|
|
7
|
+
- [x] 2.2 Reuse the shared slash-command bodies without front matter; verify resulting files stay Markdown-only with no extra metadata.
|
|
8
|
+
|
|
9
|
+
## 3. Update support
|
|
10
|
+
- [x] 3.1 Ensure `openspec update` refreshes existing Kilo Code workflows while skipping ones that are absent.
|
|
11
|
+
- [x] 3.2 Add regression coverage confirming marker content is replaced (not duplicated) during updates.
|
|
12
|
+
|
|
13
|
+
## 4. Documentation
|
|
14
|
+
- [x] 4.1 Update README / docs to note Kilo Code workflow support and path (`.kilocode/workflows/`).
|
|
15
|
+
- [x] 4.2 Mention the integration in CHANGELOG or release notes if applicable.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
The current `openspec init` command requires interactive prompts, preventing automation in CI/CD pipelines and scripted setups. Adding non-interactive options will enable programmatic initialization for automated workflows while maintaining the existing interactive experience as the default.
|
|
3
|
+
|
|
4
|
+
## What Changes
|
|
5
|
+
- Replace the multiple flag design with a single `--tools` option that accepts `all`, `none`, or a comma-separated list of tool IDs
|
|
6
|
+
- Update InitCommand to bypass interactive prompts when `--tools` is supplied and apply single-flag validation rules
|
|
7
|
+
- Document the non-interactive behavior via the CLI init spec delta (scenarios for `all`, `none`, list parsing, and invalid entries)
|
|
8
|
+
- Generate CLI help text dynamically from `AI_TOOLS` so supported tools stay in sync
|
|
9
|
+
|
|
10
|
+
## Impact
|
|
11
|
+
- Affected specs: `specs/cli-init/spec.md`
|
|
12
|
+
- Affected code: `src/cli/index.ts`, `src/core/init.ts`
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Delta for CLI Init Specification
|
|
2
|
+
|
|
3
|
+
## ADDED Requirements
|
|
4
|
+
### Requirement: Non-Interactive Mode
|
|
5
|
+
The command SHALL support non-interactive operation through command-line options for automation and CI/CD use cases.
|
|
6
|
+
|
|
7
|
+
#### Scenario: Select all tools non-interactively
|
|
8
|
+
- **WHEN** run with `--tools all`
|
|
9
|
+
- **THEN** automatically select every available AI tool without prompting
|
|
10
|
+
- **AND** proceed with initialization using the selected tools
|
|
11
|
+
|
|
12
|
+
#### Scenario: Select specific tools non-interactively
|
|
13
|
+
- **WHEN** run with `--tools claude,cursor`
|
|
14
|
+
- **THEN** parse the comma-separated tool IDs and validate against available tools
|
|
15
|
+
- **AND** proceed with initialization using only the specified valid tools
|
|
16
|
+
|
|
17
|
+
#### Scenario: Skip tool configuration non-interactively
|
|
18
|
+
- **WHEN** run with `--tools none`
|
|
19
|
+
- **THEN** skip AI tool configuration entirely
|
|
20
|
+
- **AND** only create the OpenSpec directory structure and template files
|
|
21
|
+
|
|
22
|
+
#### Scenario: Invalid tool specification
|
|
23
|
+
- **WHEN** run with `--tools` containing any IDs not present in the AI tool registry
|
|
24
|
+
- **THEN** exit with code 1 and display available values (`all`, `none`, or the supported tool IDs)
|
|
25
|
+
|
|
26
|
+
#### Scenario: Help text lists available tool IDs
|
|
27
|
+
- **WHEN** displaying CLI help for `openspec init`
|
|
28
|
+
- **THEN** show the `--tools` option description with the valid values derived from the AI tool registry
|
|
29
|
+
|
|
30
|
+
## MODIFIED Requirements
|
|
31
|
+
### Requirement: Interactive Mode
|
|
32
|
+
The command SHALL provide an interactive menu for AI tool selection with clear navigation instructions.
|
|
33
|
+
|
|
34
|
+
#### Scenario: Displaying interactive menu
|
|
35
|
+
- **WHEN** run in fresh or extend mode without non-interactive options
|
|
36
|
+
- **THEN** present a looping select menu that lets users toggle tools with Enter and finish via a "Done" option
|
|
37
|
+
- **AND** label already configured tools with "(already configured)" while keeping disabled options marked "coming soon"
|
|
38
|
+
- **AND** change the prompt copy in extend mode to "Which AI tools would you like to add or refresh?"
|
|
39
|
+
- **AND** display inline instructions clarifying that Enter toggles a tool and selecting "Done" confirms the list
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## 1. CLI Option Registration
|
|
2
|
+
- [x] 1.1 Replace the multiple flag design with a single `--tools <value>` option supporting `all|none|a,b,c` and keep strict argument validation.
|
|
3
|
+
- [x] 1.2 Populate the `--tools` help text dynamically from the `AI_TOOLS` registry.
|
|
4
|
+
|
|
5
|
+
## 2. InitCommand Modifications
|
|
6
|
+
- [x] 2.1 Accept the single tools option in the InitCommand constructor and plumb it through existing flows.
|
|
7
|
+
- [x] 2.2 Update tool selection logic to shortcut prompts for `all`, `none`, and explicit lists.
|
|
8
|
+
- [x] 2.3 Fail fast with exit code 1 and a helpful message when the parsed list contains unsupported tool IDs.
|
|
9
|
+
|
|
10
|
+
## 3. Specification Updates
|
|
11
|
+
- [x] 3.1 Capture the non-interactive scenarios (`all`, `none`, list, invalid) in the change delta without modifying `specs/cli-init/spec.md` directly.
|
|
12
|
+
- [x] 3.2 Document that CLI help reflects the available tool IDs managed by `AI_TOOLS`.
|
|
13
|
+
|
|
14
|
+
## 4. Testing
|
|
15
|
+
- [x] 4.1 Add unit coverage for parsing `--tools` values, including invalid entries.
|
|
16
|
+
- [x] 4.2 Add integration coverage ensuring non-interactive runs generate the expected files and exit codes.
|
|
17
|
+
- [x] 4.3 Verify the interactive flow remains unchanged when `--tools` is omitted.
|
package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/proposal.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
- Windsurf exposes "Workflows" as the vehicle for slash-like automation: saved Markdown files under `.windsurf/workflows/` that Cascade discovers across the workspace (including subdirectories and up to the git root), then executes when a user types `/workflow-name`. These files can be team-authored, must stay under 12k characters, and can call other workflows, making them the natural place to publish OpenSpec guidance for Windsurf users.\
|
|
3
|
+
([Windsurf Workflows documentation](https://docs.windsurf.com/windsurf/cascade/workflows))
|
|
4
|
+
- The Wave 12 changelog reiterates that workflows are invoked via slash commands and that Windsurf stores them in `.windsurf/workflows`, so the OpenSpec CLI just needs to generate Markdown there to participate in Windsurf's command palette.\
|
|
5
|
+
("Custom Workflows" section, [Windsurf changelog](https://windsurf.com/changelog))
|
|
6
|
+
- OpenSpec already ships shared command bodies for proposal/apply/archive and uses markers so commands stay up to date. Extending the same templates to Windsurf keeps behaviour consistent with Claude, Cursor, and OpenCode without inventing new content flows.
|
|
7
|
+
|
|
8
|
+
## What Changes
|
|
9
|
+
- Add Windsurf to the CLI tool picker (`openspec init`) and the slash-command registry so selecting it scaffolds `.windsurf/workflows/openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md` with marker-managed bodies.
|
|
10
|
+
- Shape each Windsurf workflow with a short heading/description plus the existing OpenSpec guardrails/steps wrapped in markers, ensuring the total payload remains well below the 12,000 character limit.
|
|
11
|
+
- Ensure `openspec update` refreshes existing Windsurf workflows (and only those that already exist) in-place, mirroring current behaviour for other editors.
|
|
12
|
+
- Extend unit tests for init/update to cover Windsurf generation and updates, and update the README/tooling docs to advertise Windsurf support.
|
|
13
|
+
|
|
14
|
+
## Impact
|
|
15
|
+
- Specs: `cli-init`, `cli-update`
|
|
16
|
+
- Code: `src/core/configurators/slash/*`, `src/core/templates/slash-command-templates.ts`, CLI prompts, README
|
|
17
|
+
- Tests: init/update integration coverage for Windsurf workflows
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
- AGENTS.md standard (creates or refreshes AGENTS.md with OpenSpec markers)
|
|
13
|
+
- **AND** show "(already configured)" beside tools whose managed files exist so users understand selections will refresh content
|
|
14
|
+
- **AND** treat disabled tools as "coming soon" and keep them unselectable
|
|
15
|
+
- **AND** allow confirming with Enter after selecting one or more tools
|
|
16
|
+
|
|
17
|
+
### Requirement: Slash Command Configuration
|
|
18
|
+
The init command SHALL generate slash command files for supported editors using shared templates.
|
|
19
|
+
|
|
20
|
+
#### Scenario: Generating slash commands for Claude Code
|
|
21
|
+
- **WHEN** the user selects Claude Code during initialization
|
|
22
|
+
- **THEN** create `.claude/commands/openspec/proposal.md`, `.claude/commands/openspec/apply.md`, and `.claude/commands/openspec/archive.md`
|
|
23
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
24
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
25
|
+
|
|
26
|
+
#### Scenario: Generating slash commands for Cursor
|
|
27
|
+
- **WHEN** the user selects Cursor during initialization
|
|
28
|
+
- **THEN** create `.cursor/commands/openspec-proposal.md`, `.cursor/commands/openspec-apply.md`, and `.cursor/commands/openspec-archive.md`
|
|
29
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
30
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
31
|
+
|
|
32
|
+
#### Scenario: Generating slash commands for OpenCode
|
|
33
|
+
- **WHEN** the user selects OpenCode during initialization
|
|
34
|
+
- **THEN** create `.opencode/commands/openspec-proposal.md`, `.opencode/commands/openspec-apply.md`, and `.opencode/commands/openspec-archive.md`
|
|
35
|
+
- **AND** populate each file from shared templates so command text matches other tools
|
|
36
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
37
|
+
|
|
38
|
+
#### Scenario: Generating slash commands for Windsurf
|
|
39
|
+
- **WHEN** the user selects Windsurf during initialization
|
|
40
|
+
- **THEN** create `.windsurf/workflows/openspec-proposal.md`, `.windsurf/workflows/openspec-apply.md`, and `.windsurf/workflows/openspec-archive.md`
|
|
41
|
+
- **AND** populate each file from shared templates (wrapped in OpenSpec markers) so workflow text matches other tools
|
|
42
|
+
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
|
|
25
|
+
#### Scenario: Missing slash command file
|
|
26
|
+
- **WHEN** a tool lacks a slash command file
|
|
27
|
+
- **THEN** do not create a new file during update
|
package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/tasks.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## 1. CLI wiring
|
|
2
|
+
- [x] 1.1 Add Windsurf to the selectable AI tools in `openspec init`, including "already configured" detection.
|
|
3
|
+
- [x] 1.2 Register a `WindsurfSlashCommandConfigurator` that writes workflows to `.windsurf/workflows/` and ensures the directory exists.
|
|
4
|
+
- [x] 1.3 Ensure `openspec update` pulls the Windsurf configurator when winds is selected and skips creation when files are absent.
|
|
5
|
+
|
|
6
|
+
## 2. Workflow templates
|
|
7
|
+
- [x] 2.1 Reuse the shared proposal/apply/archive bodies, adding Windsurf-specific headings/description before the OpenSpec markers.
|
|
8
|
+
- [x] 2.2 Confirm generated Markdown (per file) stays comfortably under the 12k character ceiling noted in the Windsurf docs.
|
|
9
|
+
|
|
10
|
+
## 3. Tests & safeguards
|
|
11
|
+
- [x] 3.1 Extend init tests to assert creation of `.windsurf/workflows/openspec-*.md` when Windsurf is chosen.
|
|
12
|
+
- [x] 3.2 Extend update tests to assert existing Windsurf workflows are refreshed and non-existent files are ignored.
|
|
13
|
+
- [x] 3.3 Add regression coverage for marker preservation inside Windsurf workflow files.
|
|
14
|
+
|
|
15
|
+
## 4. Documentation
|
|
16
|
+
- [x] 4.1 Update README (and any user-facing docs) to list Windsurf under native slash/workflow integrations.
|
|
17
|
+
- [x] 4.2 Call out Windsurf workflow support in release notes or CHANGELOG if applicable.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
Validation errors like "no deltas found" or "missing requirement text" do not tell agents how to recover, leading to repeated failures. Making error output specific about headers, required text, and next actions will help assistants fix issues in a single pass.
|
|
3
|
+
|
|
4
|
+
## What Changes
|
|
5
|
+
- Extend `openspec validate` error reporting so each failure names the exact header, file, and expected structure, including concrete examples of compliant Markdown.
|
|
6
|
+
- Tailor messages for the most common mistakes (missing delta sections, absent descriptive requirement text, missing scenarios) with actionable fixes and suggested debug commands.
|
|
7
|
+
- Update docs/help output so the improved messaging is discoverable (e.g., `--help`, troubleshooting section).
|
|
8
|
+
- Add regression coverage to lock in the richer messaging for the top validation paths.
|
|
9
|
+
|
|
10
|
+
## Impact
|
|
11
|
+
- Affected specs: `specs/cli-validate`
|
|
12
|
+
- Affected code: `src/commands/validate.ts`, `src/core/validation`, `docs/`
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
## MODIFIED Requirements
|
|
2
|
+
### Requirement: Validation SHALL provide actionable remediation steps
|
|
3
|
+
Validation output SHALL include specific guidance to fix each error, including expected structure, example headers, and suggested commands to verify fixes.
|
|
4
|
+
|
|
5
|
+
#### Scenario: No deltas found in change
|
|
6
|
+
- **WHEN** validating a change with zero parsed deltas
|
|
7
|
+
- **THEN** show error "No deltas found" with guidance:
|
|
8
|
+
- Explain that change specs must include `## ADDED Requirements`, `## MODIFIED Requirements`, `## REMOVED Requirements`, or `## RENAMED Requirements`
|
|
9
|
+
- Remind authors that files must live under `openspec/changes/{id}/specs/<capability>/spec.md`
|
|
10
|
+
- Include an explicit note: "Spec delta files cannot start with titles before the operation headers"
|
|
11
|
+
- Suggest running `openspec change show {id} --json --deltas-only` for debugging
|
|
12
|
+
|
|
13
|
+
#### Scenario: Missing required sections
|
|
14
|
+
- **WHEN** a required section is missing
|
|
15
|
+
- **THEN** include expected header names and a minimal skeleton:
|
|
16
|
+
- For Spec: `## Purpose`, `## Requirements`
|
|
17
|
+
- For Change: `## Why`, `## What Changes`
|
|
18
|
+
- Provide an example snippet of the missing section with placeholder prose ready to copy
|
|
19
|
+
- Mention the quick-reference section in `openspec/AGENTS.md` as the authoritative template
|
|
20
|
+
|
|
21
|
+
#### Scenario: Missing requirement descriptive text
|
|
22
|
+
- **WHEN** a requirement header lacks descriptive text before scenarios
|
|
23
|
+
- **THEN** emit an error explaining that `### Requirement:` lines must be followed by narrative text before any `#### Scenario:` headers
|
|
24
|
+
- Show compliant example: "### Requirement: Foo" followed by "The system SHALL ..."
|
|
25
|
+
- Suggest adding 1-2 sentences describing the normative behavior prior to listing scenarios
|
|
26
|
+
- Reference the pre-validation checklist in `openspec/AGENTS.md`
|
|
27
|
+
|
|
28
|
+
### Requirement: Validator SHALL detect likely misformatted scenarios and warn with a fix
|
|
29
|
+
The validator SHALL recognize bulleted lines that look like scenarios (e.g., lines beginning with WHEN/THEN/AND) and emit a targeted warning with a conversion example to `#### Scenario:`.
|
|
30
|
+
|
|
31
|
+
#### Scenario: Bulleted WHEN/THEN under a Requirement
|
|
32
|
+
- **WHEN** bullets that start with WHEN/THEN/AND are found under a requirement without any `#### Scenario:` headers
|
|
33
|
+
- **THEN** emit warning: "Scenarios must use '#### Scenario:' headers", and show a conversion template:
|
|
34
|
+
```
|
|
35
|
+
#### Scenario: Short name
|
|
36
|
+
- **WHEN** ...
|
|
37
|
+
- **THEN** ...
|
|
38
|
+
- **AND** ...
|
|
39
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## 1. Messaging enhancements
|
|
2
|
+
- [x] 1.1 Inventory current validation failures and map each to the desired message improvements.
|
|
3
|
+
- [x] 1.2 Implement structured error builders that include file paths, normalized header names, and example fixes.
|
|
4
|
+
- [x] 1.3 Ensure `openspec validate --help` and troubleshooting docs mention the richer messages and debug tips.
|
|
5
|
+
|
|
6
|
+
## 2. Tests
|
|
7
|
+
- [x] 2.1 Add unit tests for representative errors (no deltas, missing requirement body, missing scenarios) asserting the new wording.
|
|
8
|
+
- [x] 2.2 Add integration coverage verifying the Next steps footer reflects contextual guidance.
|
|
9
|
+
|
|
10
|
+
## 3. Documentation
|
|
11
|
+
- [x] 3.1 Update troubleshooting sections and CLI docs with sample output from the enhanced errors.
|
|
12
|
+
- [x] 3.2 Note the change in CHANGELOG or release notes if applicable.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
Agents fumble proposal formatting because the essential Markdown templates and formatting rules are buried mid-document. Reorganizing `openspec/AGENTS.md` with a prominent quick-reference and embedded examples will help assistants follow the process without guesswork.
|
|
3
|
+
|
|
4
|
+
## What Changes
|
|
5
|
+
- Restructure `openspec/AGENTS.md` so file formats and scaffold templates appear in a top-level quick-reference section before workflow prose.
|
|
6
|
+
- Embed copy/paste templates for `proposal.md`, `tasks.md`, `design.md`, and spec deltas alongside inline examples within the workflow steps.
|
|
7
|
+
- Add a pre-validation checklist that highlights the most common formatting pitfalls before running `openspec validate`.
|
|
8
|
+
- Split content into beginner vs. advanced sections to progressively disclose complexity while keeping advanced guidance accessible.
|
|
9
|
+
|
|
10
|
+
## Impact
|
|
11
|
+
- Affected specs: `specs/docs-agent-instructions`
|
|
12
|
+
- Affected code: `openspec/AGENTS.md`, `docs/`
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
## ADDED Requirements
|
|
2
|
+
### Requirement: Quick Reference Placement
|
|
3
|
+
The AI instructions SHALL begin with a quick-reference section that surfaces required file structures, templates, and formatting rules before any narrative guidance.
|
|
4
|
+
|
|
5
|
+
#### Scenario: Loading templates at the top
|
|
6
|
+
- **WHEN** `openspec/AGENTS.md` is regenerated or updated
|
|
7
|
+
- **THEN** the first substantive section after the title SHALL provide copy-ready headings for `proposal.md`, `tasks.md`, spec deltas, and scenario formatting
|
|
8
|
+
- **AND** link each template to the corresponding workflow step for deeper reading
|
|
9
|
+
|
|
10
|
+
### Requirement: Embedded Templates and Examples
|
|
11
|
+
`openspec/AGENTS.md` SHALL include complete copy/paste templates and inline examples exactly where agents make corresponding edits.
|
|
12
|
+
|
|
13
|
+
#### Scenario: Providing file templates
|
|
14
|
+
- **WHEN** authors reach the workflow guidance for drafting proposals and deltas
|
|
15
|
+
- **THEN** provide fenced Markdown templates that match the required structure (`## Why`, `## ADDED Requirements`, `#### Scenario:` etc.)
|
|
16
|
+
- **AND** accompany each template with a brief example showing correct header usage and scenario bullets
|
|
17
|
+
|
|
18
|
+
### Requirement: Pre-validation Checklist
|
|
19
|
+
`openspec/AGENTS.md` SHALL offer a concise pre-validation checklist that highlights common formatting mistakes before running `openspec validate`.
|
|
20
|
+
|
|
21
|
+
#### Scenario: Highlighting common validation failures
|
|
22
|
+
- **WHEN** a reader reaches the validation guidance
|
|
23
|
+
- **THEN** present a checklist reminding them to verify requirement headers, scenario formatting, and delta sections
|
|
24
|
+
- **AND** include reminders about at least `#### Scenario:` usage and descriptive requirement text before scenarios
|
|
25
|
+
|
|
26
|
+
### Requirement: Progressive Disclosure of Workflow Guidance
|
|
27
|
+
The documentation SHALL separate beginner essentials from advanced topics so newcomers can focus on core steps without losing access to advanced workflows.
|
|
28
|
+
|
|
29
|
+
#### Scenario: Organizing beginner and advanced sections
|
|
30
|
+
- **WHEN** reorganizing `openspec/AGENTS.md`
|
|
31
|
+
- **THEN** keep an introductory section limited to the minimum steps (scaffold, draft, validate, request review)
|
|
32
|
+
- **AND** move advanced topics (multi-capability changes, archiving details, tooling deep dives) into clearly labeled later sections
|
|
33
|
+
- **AND** provide anchor links from the quick-reference to those advanced sections
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## 1. Instruction redesign
|
|
2
|
+
- [x] 1.1 Draft a quick-reference section that surfaces file templates and formatting rules at the top of `openspec/AGENTS.md`.
|
|
3
|
+
- [x] 1.2 Reorganize the workflow narrative with inline examples and progressive disclosure for advanced topics.
|
|
4
|
+
|
|
5
|
+
## 2. Templates and checklists
|
|
6
|
+
- [x] 2.1 Add copy/paste templates for proposal, tasks, design, and spec delta files.
|
|
7
|
+
- [x] 2.2 Insert a pre-validation checklist capturing common lint failures before running `openspec validate`.
|
|
8
|
+
|
|
9
|
+
## 3. Documentation updates
|
|
10
|
+
- [x] 3.1 Update supporting docs or README pointers so contributors find the redesigned instructions.
|
|
11
|
+
- [x] 3.2 Confirm examples and references stay in sync with the new scaffold command guidance.
|
package/references/openspec/openspec/changes/archive/2025-10-14-slim-root-agents-file/proposal.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
The project root currently receives a full copy of the OpenSpec agent instructions, duplicating the content that also lives in `openspec/AGENTS.md`. When teams edit one copy but not the other, the files drift and onboarding assistants see conflicting guidance.
|
|
3
|
+
|
|
4
|
+
## What Changes
|
|
5
|
+
- Keep generating the complete template in `openspec/AGENTS.md` during `openspec init` and follow-up updates.
|
|
6
|
+
- Replace the root-level file (`AGENTS.md` or `CLAUDE.md`, depending on tool selection) with a short hand-off that explains the project uses OpenSpec and points directly to `openspec/AGENTS.md`.
|
|
7
|
+
- Add a dedicated stub template so both the init and update flows reuse the same minimal copy instructions.
|
|
8
|
+
- Update CLI tests and documentation to reflect the new root-level messaging and ensure the OpenSpec marker block still protects future updates.
|
|
9
|
+
|
|
10
|
+
## Impact
|
|
11
|
+
- Affected specs: `cli-init`, `cli-update`
|
|
12
|
+
- Affected code: `src/core/init.ts`, `src/core/update.ts`, `src/core/templates/agents-template.ts`
|
|
13
|
+
- Update assets/readmes that mention the root `AGENTS.md` contents to reference the new stub message.
|
package/references/openspec/openspec/changes/archive/2025-10-14-slim-root-agents-file/tasks.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## 1. Templates
|
|
2
|
+
- [x] 1.1 Add a shared stub template that renders the root agent instructions hand-off message.
|
|
3
|
+
- [x] 1.2 Ensure the stub covers both `AGENTS.md` and `CLAUDE.md` variants.
|
|
4
|
+
|
|
5
|
+
## 2. Init Flow
|
|
6
|
+
- [x] 2.1 Update `createInitArtifacts` to write the stub to the project root instead of the full instructions.
|
|
7
|
+
- [x] 2.2 Preserve the managed block markers so future updates can overwrite the stub safely.
|
|
8
|
+
|
|
9
|
+
## 3. Update Flow
|
|
10
|
+
- [x] 3.1 Make the update command refresh the root stub rather than the full instructions.
|
|
11
|
+
- [x] 3.2 Confirm the update log output still reflects the files that changed.
|
|
12
|
+
|
|
13
|
+
## 4. Tests & Docs
|
|
14
|
+
- [x] 4.1 Adjust CLI/init tests to match the new root content.
|
|
15
|
+
- [x] 4.2 Document the stub message in `openspec/specs/cli-init` and `openspec/specs/cli-update` (and any relevant README snippets).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
- Users frequently scroll to a tool and press Enter without toggling it, resulting in no configuration changes.
|
|
3
|
+
- The current workflow deviates from common CLI expectations where Enter confirms the highlighted item.
|
|
4
|
+
- Aligning behavior with user expectations reduces friction during onboarding.
|
|
5
|
+
|
|
6
|
+
## What Changes
|
|
7
|
+
- Update the init wizard so pressing Enter on a highlighted tool selects it before moving to the review step.
|
|
8
|
+
- Adjust interactive instructions to clarify Enter selects the current tool and Space still toggles selections.
|
|
9
|
+
- Refresh specs to capture the clarified behavior for the interactive menu.
|
|
10
|
+
|
|
11
|
+
## Impact
|
|
12
|
+
- Users who press Enter without toggling now configure the highlighted tool instead of exiting with no selections.
|
|
13
|
+
- Spacebar multi-select support remains unchanged for power users.
|
|
14
|
+
- Documentation better reflects how the wizard behaves.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## MODIFIED Requirements
|
|
2
|
+
### Requirement: Interactive Mode
|
|
3
|
+
The command SHALL provide an interactive menu for AI tool selection with clear navigation instructions.
|
|
4
|
+
#### Scenario: Displaying interactive menu
|
|
5
|
+
- **WHEN** run in fresh or extend mode
|
|
6
|
+
- **THEN** present a looping select menu that lets users toggle tools with Space and review selections with Enter
|
|
7
|
+
- **AND** when Enter is pressed on a highlighted selectable tool that is not already selected, automatically add it to the selection before moving to review so the highlighted tool is configured
|
|
8
|
+
- **AND** label already configured tools with "(already configured)" while keeping disabled options marked "coming soon"
|
|
9
|
+
- **AND** change the prompt copy in extend mode to "Which AI tools would you like to add or refresh?"
|
|
10
|
+
- **AND** display inline instructions clarifying that Space toggles tools and Enter selects the highlighted tool before reviewing selections
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## 1. Implementation
|
|
2
|
+
- [x] Update the tool selection wizard to auto-select the highlighted tool when Enter is pressed without prior toggles.
|
|
3
|
+
- [x] Refresh inline instructions copy so Enter behavior is clear.
|
|
4
|
+
- [x] Adjust or add tests if needed to cover the new selection flow.
|
|
5
|
+
|
|
6
|
+
## 2. Validation
|
|
7
|
+
- [x] Run `pnpm run build`.
|
|
8
|
+
- [x] Run `pnpm test` (or targeted suite) if applicable.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
OpenSpec currently creates the root-level `AGENTS.md` stub only when teams explicitly select the "AGENTS.md standard" tool during `openspec init`. Projects that skip that checkbox never get a managed stub, so non-native assistants (Copilot, Codeium, etc.) have no entry point and later `openspec update` runs silently create the file without any context. We need to bake the stub into initialization, clarify the tool selection experience, and keep the update workflow aligned so every teammate lands on the right instructions from day one.
|
|
3
|
+
|
|
4
|
+
## What Changes
|
|
5
|
+
- Update `openspec init` so the root `AGENTS.md` stub is always generated (first run and extend mode) and refreshed from a shared utility instead of being tied to a tool selection.
|
|
6
|
+
- Redesign the AI tool selection wizard to split options into "Natively supported" (Claude, Cursor, OpenCode, …) and an informational "Other tools" section that explains the always-on `AGENTS.md` hand-off.
|
|
7
|
+
- Adjust CLI specs, prompts, and success messaging to reflect the new categories while keeping extend-mode behaviour consistent.
|
|
8
|
+
- Update automated tests and fixtures to cover the unconditional stub creation and the reworked prompt flow.
|
|
9
|
+
- Refresh documentation and onboarding snippets so they no longer describe the stub as opt-in and instead call out the new grouping.
|
|
10
|
+
- Ensure `openspec update` continues to reconcile both `openspec/AGENTS.md` and the root stub, documenting the expected behaviour so mismatched setups self-heal.
|
|
11
|
+
|
|
12
|
+
## Impact
|
|
13
|
+
- Affected specs: `cli-init`, `cli-update`
|
|
14
|
+
- Affected code: `src/core/init.ts`, `src/core/config.ts`, `src/core/configurators/agents.ts`, `src/core/templates/agents-root-stub.ts`, `src/core/update.ts`, related tests under `test/core/`
|
|
15
|
+
- Docs & assets: README, CHANGELOG, any setup guides that reference choosing the "AGENTS.md standard" option
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
## MODIFIED Requirements
|
|
2
|
+
### Requirement: AI Tool Configuration
|
|
3
|
+
The command SHALL configure AI coding assistants with OpenSpec instructions using a grouped selection experience so teams can enable native integrations while always provisioning guidance for other assistants.
|
|
4
|
+
|
|
5
|
+
#### Scenario: Prompting for AI tool selection
|
|
6
|
+
- **WHEN** run interactively
|
|
7
|
+
- **THEN** present a multi-select wizard that separates options into two headings:
|
|
8
|
+
- **Natively supported providers** shows each available first-party integration (Claude Code, Cursor, OpenCode, …) with checkboxes
|
|
9
|
+
- **Other tools** explains that the root-level `AGENTS.md` stub is always generated for AGENTS-compatible assistants and cannot be deselected
|
|
10
|
+
- **AND** mark already configured native tools with "(already configured)" to signal that choosing them will refresh managed content
|
|
11
|
+
- **AND** keep disabled or unavailable providers labelled as "coming soon" so users know they cannot opt in yet
|
|
12
|
+
- **AND** allow confirming the selection even when no native provider is chosen because the root stub remains enabled by default
|
|
13
|
+
- **AND** change the base prompt copy in extend mode to "Which natively supported AI tools would you like to add or refresh?"
|
|
14
|
+
|
|
15
|
+
### Requirement: Exit Code Adjustments
|
|
16
|
+
`openspec init` SHALL treat extend mode without new native tool selections as a successful refresh.
|
|
17
|
+
|
|
18
|
+
#### Scenario: Allowing empty extend runs
|
|
19
|
+
- **WHEN** OpenSpec is already initialized and the user selects no additional natively supported tools
|
|
20
|
+
- **THEN** complete successfully while refreshing the root `AGENTS.md` stub
|
|
21
|
+
- **AND** exit with code 0
|
|
22
|
+
|
|
23
|
+
## ADDED Requirements
|
|
24
|
+
### Requirement: Root instruction stub
|
|
25
|
+
`openspec init` SHALL always scaffold the root-level `AGENTS.md` hand-off so every teammate finds the primary OpenSpec instructions.
|
|
26
|
+
|
|
27
|
+
#### Scenario: Creating root `AGENTS.md`
|
|
28
|
+
- **GIVEN** the project may or may not already contain an `AGENTS.md` file
|
|
29
|
+
- **WHEN** initialization completes in fresh or extend mode
|
|
30
|
+
- **THEN** create or refresh `AGENTS.md` at the repository root using the managed marker block from `TemplateManager.getAgentsStandardTemplate()`
|
|
31
|
+
- **AND** preserve any existing content outside the managed markers while replacing the stub text inside them
|
|
32
|
+
- **AND** create the stub regardless of which native AI tools are selected
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## MODIFIED Requirements
|
|
2
|
+
### Requirement: Tool-Agnostic Updates
|
|
3
|
+
The update command SHALL refresh OpenSpec-managed files in a predictable manner while respecting each team's chosen tooling.
|
|
4
|
+
|
|
5
|
+
#### Scenario: Updating files
|
|
6
|
+
- **WHEN** updating files
|
|
7
|
+
- **THEN** completely replace `openspec/AGENTS.md` with the latest template
|
|
8
|
+
- **AND** create or refresh the root-level `AGENTS.md` stub using the managed marker block, even if the file was previously absent
|
|
9
|
+
- **AND** update only the OpenSpec-managed sections inside existing AI tool files, leaving user-authored content untouched
|
|
10
|
+
- **AND** avoid creating new native-tool configuration files (slash commands, CLAUDE.md, etc.) unless they already exist
|
package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/tasks.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## 1. Implementation
|
|
2
|
+
- [x] 1.1 Refactor `openspec init` to always generate the root `AGENTS.md` stub (initial run and extend mode) via shared helper logic.
|
|
3
|
+
- [x] 1.2 Rework the AI tool selection wizard to surface "Natively supported" vs "Other tools" groupings and make the stub non-optional.
|
|
4
|
+
- [x] 1.3 Update CLI messaging, templates, and configurators so the new flow stays in sync across init and update commands.
|
|
5
|
+
- [x] 1.4 Refresh unit/integration tests to cover the unconditional stub and the regrouped prompt layout.
|
|
6
|
+
- [x] 1.5 Update documentation, README snippets, and CHANGELOG entries that mention the opt-in `AGENTS.md` experience.
|
|
7
|
+
|
|
8
|
+
## 2. Validation
|
|
9
|
+
- [x] 2.1 Run `pnpm test` targeting CLI init/update suites.
|
|
10
|
+
- [x] 2.2 Execute `openspec validate update-cli-init-root-agents --strict`.
|
|
11
|
+
- [x] 2.3 Perform a manual smoke test: run `openspec init` in a temp directory, confirm stub + grouped prompts, rerun in extend mode.
|