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
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Implementation Order and Dependencies
|
|
2
|
+
|
|
3
|
+
## Required Implementation Sequence
|
|
4
|
+
|
|
5
|
+
The following changes must be implemented in this specific order due to dependencies:
|
|
6
|
+
|
|
7
|
+
### Phase 1: Foundation
|
|
8
|
+
**1. add-zod-validation** (No dependencies)
|
|
9
|
+
- Creates all core schemas (RequirementSchema, ScenarioSchema, SpecSchema, ChangeSchema, DeltaSchema)
|
|
10
|
+
- Implements markdown parser utilities
|
|
11
|
+
- Implements validation infrastructure and rules
|
|
12
|
+
- Establishes validation patterns used by all commands
|
|
13
|
+
- Must be completed first
|
|
14
|
+
|
|
15
|
+
### Phase 2: Change Commands
|
|
16
|
+
**2. add-change-commands** (Depends on: add-zod-validation)
|
|
17
|
+
- Imports ChangeSchema and DeltaSchema from zod validation
|
|
18
|
+
- Reuses markdown parsing utilities
|
|
19
|
+
- Implements change command with built-in validation
|
|
20
|
+
- Uses validation infrastructure for change validate subcommand
|
|
21
|
+
- Cannot start until schemas and validation exist
|
|
22
|
+
|
|
23
|
+
### Phase 3: Spec Commands
|
|
24
|
+
**3. add-spec-commands** (Depends on: add-zod-validation, add-change-commands)
|
|
25
|
+
- Imports RequirementSchema, ScenarioSchema, SpecSchema from zod validation
|
|
26
|
+
- Reuses markdown parsing utilities
|
|
27
|
+
- Implements spec command with built-in validation
|
|
28
|
+
- Uses validation infrastructure for spec validate subcommand
|
|
29
|
+
- Builds on patterns established by change commands
|
|
30
|
+
|
|
31
|
+
## Dependency Graph
|
|
32
|
+
```
|
|
33
|
+
add-zod-validation
|
|
34
|
+
↓
|
|
35
|
+
add-change-commands
|
|
36
|
+
↓
|
|
37
|
+
add-spec-commands
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Key Dependencies
|
|
41
|
+
|
|
42
|
+
### Shared Code Dependencies
|
|
43
|
+
1. **Schemas**: All schemas created in add-zod-validation, used by both command implementations
|
|
44
|
+
2. **Validation**: Infrastructure created in add-zod-validation, integrated into both commands
|
|
45
|
+
3. **Parsers**: Markdown parsing utilities created in add-zod-validation, used by both commands
|
|
46
|
+
|
|
47
|
+
### File Dependencies
|
|
48
|
+
- `src/core/schemas/*.schema.ts` (created by add-zod-validation) → imported by both commands
|
|
49
|
+
- `src/core/validation/validator.ts` (created by add-zod-validation) → used by both commands
|
|
50
|
+
- `src/core/parsers/markdown-parser.ts` (created by add-zod-validation) → used by both commands
|
|
51
|
+
|
|
52
|
+
## Implementation Notes
|
|
53
|
+
|
|
54
|
+
### For Developers
|
|
55
|
+
1. Complete each phase fully before moving to the next
|
|
56
|
+
2. Run tests after each phase to ensure stability
|
|
57
|
+
3. The legacy `list` command remains functional throughout
|
|
58
|
+
|
|
59
|
+
### For CI/CD
|
|
60
|
+
1. Each change can be validated independently
|
|
61
|
+
2. Integration tests should run after each phase
|
|
62
|
+
3. Full system tests required after Phase 3
|
|
63
|
+
|
|
64
|
+
### Parallel Work Opportunities
|
|
65
|
+
Within each phase, the following can be done in parallel:
|
|
66
|
+
- **Phase 1**: Schema design, validation rules, and parser implementation
|
|
67
|
+
- **Phase 2**: Change command features and legacy compatibility work
|
|
68
|
+
- **Phase 3**: Spec command features and final integration
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
Google is rolling out Antigravity, a Windsurf-derived IDE that discovers workflows from `.agent/workflows/*.md`. Today OpenSpec can only scaffold slash commands for Windsurf directories, so Antigravity users cannot run the proposal/apply/archive flows from the IDE.
|
|
3
|
+
|
|
4
|
+
## What Changes
|
|
5
|
+
- Add Antigravity as a selectable native tool in `openspec init` so it creates `.agent/workflows/openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md` with YAML frontmatter containing only a `description` field plus the standard OpenSpec-managed body.
|
|
6
|
+
- Ensure `openspec update` refreshes the body of any existing Antigravity workflows inside `.agent/workflows/` without creating missing files, mirroring the Windsurf behavior.
|
|
7
|
+
- Share e2e/template coverage confirming the generator writes the proper directory, filename casing, and frontmatter format so Antigravity picks up the workflows.
|
|
8
|
+
|
|
9
|
+
## Impact
|
|
10
|
+
- Affected specs: `specs/cli-init`, `specs/cli-update`
|
|
11
|
+
- Expected code: CLI init/update tool registries, slash-command templates, associated tests
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## MODIFIED Requirements
|
|
2
|
+
### Requirement: Slash Command Configuration
|
|
3
|
+
The init command SHALL generate slash command files for supported editors using shared templates.
|
|
4
|
+
|
|
5
|
+
#### Scenario: Generating slash commands for Antigravity
|
|
6
|
+
- **WHEN** the user selects Antigravity during initialization
|
|
7
|
+
- **THEN** create `.agent/workflows/openspec-proposal.md`, `.agent/workflows/openspec-apply.md`, and `.agent/workflows/openspec-archive.md`
|
|
8
|
+
- **AND** ensure each file begins with YAML frontmatter that contains only a `description: <stage summary>` field followed by the shared OpenSpec workflow instructions wrapped in managed markers
|
|
9
|
+
- **AND** populate the workflow body with the same proposal/apply/archive guidance used for other tools so Antigravity behaves like Windsurf while pointing to the `.agent/workflows/` directory
|
|
@@ -0,0 +1,8 @@
|
|
|
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, and ensure the OpenCode archive command accepts change ID arguments.
|
|
4
|
+
|
|
5
|
+
#### Scenario: Updating slash commands for Antigravity
|
|
6
|
+
- **WHEN** `.agent/workflows/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
|
|
7
|
+
- **THEN** refresh the OpenSpec-managed portion of each file so the workflow copy matches other tools while preserving the existing single-field `description` frontmatter
|
|
8
|
+
- **AND** skip creating any missing workflow files during update, mirroring the behavior for Windsurf and other IDEs
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## 1. CLI init support
|
|
2
|
+
- [x] 1.1 Surface Antigravity in the native-tool picker (interactive + `--tools`) so it toggles alongside other IDEs.
|
|
3
|
+
- [x] 1.2 Generate `.agent/workflows/openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md` with YAML frontmatter restricted to a single `description` field for each stage and wrap the body in OpenSpec markers.
|
|
4
|
+
- [x] 1.3 Confirm workspace scaffolding covers missing directory creation and re-run scenarios so repeated init refreshes the managed block.
|
|
5
|
+
|
|
6
|
+
## 2. CLI update support
|
|
7
|
+
- [x] 2.1 Detect existing Antigravity workflow files during `openspec update` and refresh only the managed body, skipping creation when files are missing.
|
|
8
|
+
- [x] 2.2 Ensure update logic preserves the `description` frontmatter block exactly as written by init, including case and spacing, and refreshes body templates alongside other tools.
|
|
9
|
+
|
|
10
|
+
## 3. Templates and tests
|
|
11
|
+
- [x] 3.1 Add shared template entries for Antigravity that reuse the Windsurf copy but target `.agent/workflows` plus the description-only frontmatter requirement.
|
|
12
|
+
- [x] 3.2 Expand automated coverage (unit or integration) verifying init and update produce the expected file paths and frontmatter + body markers for Antigravity.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
Manual setup for new changes leads to formatting mistakes in spec deltas and slows agents who must recreate the same file skeletons for every proposal. A built-in scaffold command will generate compliant templates so assistants can focus on the change content instead of structure.
|
|
3
|
+
|
|
4
|
+
## What Changes
|
|
5
|
+
- Add an `openspec scaffold <change-id>` CLI command that creates a change directory (if it does not already exist) with validated `proposal.md`, `tasks.md`, and spec delta templates.
|
|
6
|
+
- Update CLI documentation and quick-reference guidance so agents discover the scaffold workflow before drafting files manually, including reminders on when to create spec deltas.
|
|
7
|
+
- Add automated coverage (unit/integ tests) to ensure the command respects naming rules, copies templates correctly, fails for existing directories, and produces output that passes `openspec validate --strict` untouched.
|
|
8
|
+
|
|
9
|
+
## Impact
|
|
10
|
+
- Affected specs: `specs/cli-scaffold`
|
|
11
|
+
- Affected code: `src/cli/index.ts`, `src/commands`, `docs/`
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
## ADDED Requirements
|
|
2
|
+
### Requirement: Scaffolding Command Registration
|
|
3
|
+
The CLI SHALL expose an `openspec scaffold <change-id>` command that validates the change identifier before generating files.
|
|
4
|
+
|
|
5
|
+
#### Scenario: Registering scaffold command
|
|
6
|
+
- **WHEN** a user runs `openspec scaffold add-user-notifications`
|
|
7
|
+
- **THEN** the CLI SHALL reject invalid identifiers (non kebab-case) before proceeding
|
|
8
|
+
- **AND** display usage documentation via `openspec scaffold --help`
|
|
9
|
+
- **AND** exit with code 0 after successful scaffolding
|
|
10
|
+
|
|
11
|
+
### Requirement: Change Directory Structure
|
|
12
|
+
The scaffold command SHALL create the standard change workspace (if it does not already exist) with proposal, tasks, optional design, and `specs/` directories laid out according to OpenSpec conventions.
|
|
13
|
+
|
|
14
|
+
#### Scenario: Generating change workspace
|
|
15
|
+
- **WHEN** scaffolding a new change with id `add-user-notifications`
|
|
16
|
+
- **THEN** create `openspec/changes/add-user-notifications/` if it does not exist
|
|
17
|
+
- **AND** copy the default template bundle (proposal, tasks, design placeholders) into that directory in a single operation
|
|
18
|
+
- **AND** create an empty `openspec/changes/add-user-notifications/specs/` directory ready for capability-specific deltas that will be authored later
|
|
19
|
+
|
|
20
|
+
### Requirement: Template Content Guidance
|
|
21
|
+
The scaffold command SHALL populate generated Markdown files with OpenSpec-compliant templates so authors can copy, edit, and pass validation without reformatting.
|
|
22
|
+
|
|
23
|
+
#### Scenario: Populating proposal and tasks templates
|
|
24
|
+
- **WHEN** the scaffold command writes `proposal.md`
|
|
25
|
+
- **THEN** include the `## Why`, `## What Changes`, and `## Impact` headings with placeholder guidance text
|
|
26
|
+
- **AND** ensure `tasks.md` starts with `## 1. Implementation` and numbered checklist items using `- [ ]` syntax
|
|
27
|
+
- **AND** annotate optional sections (like `design.md`) with inline TODO comments so users understand when to keep or delete them
|
|
28
|
+
- **AND** include a short reminder inside `specs/README.md` (or similar) instructing authors to add deltas once they know the affected capability
|
|
29
|
+
|
|
30
|
+
### Requirement: Idempotent Execution
|
|
31
|
+
The scaffold command SHALL be safe to rerun, preserving user edits while filling in any missing managed sections.
|
|
32
|
+
|
|
33
|
+
#### Scenario: Rerunning scaffold on existing change
|
|
34
|
+
- **WHEN** the command is executed again for an existing change directory containing user-edited files
|
|
35
|
+
- **THEN** leave existing content untouched except for managed placeholder regions or missing files that need creation
|
|
36
|
+
- **AND** update the filesystem summary to highlight which files were skipped, created, or refreshed
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## 1. CLI scaffolding command
|
|
2
|
+
- [ ] 1.1 Register an `openspec scaffold` command in the CLI entrypoint with `change-id` argument validation.
|
|
3
|
+
- [ ] 1.2 Implement generator logic that copies the default change template bundle (`proposal.md`, `tasks.md`, optional `design.md`, `specs/README.md`) into `openspec/changes/<id>/`, creating the directory tree in a single pass.
|
|
4
|
+
- [ ] 1.3 Detect when `openspec/changes/<id>/` already exists and exit with a clear error instead of overwriting user files.
|
|
5
|
+
|
|
6
|
+
## 2. Templates and documentation
|
|
7
|
+
- [ ] 2.1 Update `openspec/AGENTS.md` quick reference so agents see `openspec scaffold` before drafting files manually.
|
|
8
|
+
- [ ] 2.2 Refresh CLI docs/README/help text to mention the scaffold workflow, template bundle contents, and when to add spec deltas manually.
|
|
9
|
+
|
|
10
|
+
## 3. Test coverage
|
|
11
|
+
- [ ] 3.1 Add unit tests covering name validation, template copying, and existing-directory failures.
|
|
12
|
+
- [ ] 3.2 Add integration coverage ensuring a freshly scaffolded change (without deltas) passes `openspec validate --strict` until the author customizes it.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Technical Design
|
|
2
|
+
|
|
3
|
+
## Architecture Decisions
|
|
4
|
+
|
|
5
|
+
### Simplicity First
|
|
6
|
+
- No version tracking - always update when commanded
|
|
7
|
+
- Full replacement for OpenSpec-managed files only (e.g., `openspec/README.md`)
|
|
8
|
+
- Marker-based updates for user-owned files (e.g., `CLAUDE.md`)
|
|
9
|
+
- Templates bundled with package - no network required
|
|
10
|
+
- Minimal error handling - only check prerequisites
|
|
11
|
+
|
|
12
|
+
### Template Strategy
|
|
13
|
+
- Use existing template utilities
|
|
14
|
+
- `readmeTemplate` from `src/core/templates/readme-template.ts` for `openspec/README.md`
|
|
15
|
+
- `TemplateManager.getClaudeTemplate()` for `CLAUDE.md`
|
|
16
|
+
- Directory name is fixed to `openspec` (from `OPENSPEC_DIR_NAME`)
|
|
17
|
+
|
|
18
|
+
### File Operations
|
|
19
|
+
- Use async utilities for consistency
|
|
20
|
+
- `FileSystemUtils.writeFile` for `openspec/README.md`
|
|
21
|
+
- `FileSystemUtils.updateFileWithMarkers` for `CLAUDE.md`
|
|
22
|
+
- No atomic operations needed - users have git
|
|
23
|
+
- Check directory existence before proceeding
|
|
24
|
+
|
|
25
|
+
## Implementation
|
|
26
|
+
|
|
27
|
+
### Update Command (`src/core/update.ts`)
|
|
28
|
+
```typescript
|
|
29
|
+
export class UpdateCommand {
|
|
30
|
+
async execute(projectPath: string): Promise<void> {
|
|
31
|
+
const openspecDirName = OPENSPEC_DIR_NAME;
|
|
32
|
+
const openspecPath = path.join(projectPath, openspecDirName);
|
|
33
|
+
|
|
34
|
+
// 1. Check openspec directory exists
|
|
35
|
+
if (!await FileSystemUtils.directoryExists(openspecPath)) {
|
|
36
|
+
throw new Error(`No OpenSpec directory found. Run 'openspec init' first.`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// 2. Update README.md (full replacement)
|
|
40
|
+
const readmePath = path.join(openspecPath, 'README.md');
|
|
41
|
+
await FileSystemUtils.writeFile(readmePath, readmeTemplate);
|
|
42
|
+
|
|
43
|
+
// 3. Update CLAUDE.md (marker-based)
|
|
44
|
+
const claudePath = path.join(projectPath, 'CLAUDE.md');
|
|
45
|
+
const claudeContent = TemplateManager.getClaudeTemplate();
|
|
46
|
+
await FileSystemUtils.updateFileWithMarkers(
|
|
47
|
+
claudePath,
|
|
48
|
+
claudeContent,
|
|
49
|
+
OPENSPEC_MARKERS.start,
|
|
50
|
+
OPENSPEC_MARKERS.end
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
// 4. Success message (ASCII-safe, checkmark optional by terminal)
|
|
54
|
+
console.log('Updated OpenSpec instructions');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Why This Approach
|
|
60
|
+
|
|
61
|
+
### Benefits
|
|
62
|
+
- **Dead simple**: ~40 lines of code total
|
|
63
|
+
- **Fast**: No version checks, minimal parsing
|
|
64
|
+
- **Predictable**: Same result every time; idempotent
|
|
65
|
+
- **Maintainable**: Reuses existing utilities
|
|
66
|
+
|
|
67
|
+
### Trade-offs Accepted
|
|
68
|
+
- No version tracking (unnecessary complexity)
|
|
69
|
+
- Full overwrite only for OpenSpec-managed files
|
|
70
|
+
- Marker-managed updates for user-owned files
|
|
71
|
+
|
|
72
|
+
## Error Handling
|
|
73
|
+
|
|
74
|
+
Only handle critical errors:
|
|
75
|
+
- Missing `openspec` directory → throw error handled by CLI to present a friendly message
|
|
76
|
+
- File write failures → let errors bubble up to CLI
|
|
77
|
+
|
|
78
|
+
## Testing Strategy
|
|
79
|
+
|
|
80
|
+
Manual smoke tests are sufficient initially:
|
|
81
|
+
1. Run `openspec init` in a test project
|
|
82
|
+
2. Modify both files (including custom content around markers in `CLAUDE.md`)
|
|
83
|
+
3. Run `openspec update`
|
|
84
|
+
4. Verify `openspec/README.md` fully replaced; `CLAUDE.md` OpenSpec block updated without altering user content outside markers
|
|
85
|
+
5. Run the command twice to verify idempotency and no duplicate markers
|
|
86
|
+
6. Test with missing `openspec` directory (expect failure)
|
package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/proposal.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Add Update Command
|
|
2
|
+
|
|
3
|
+
## Why
|
|
4
|
+
|
|
5
|
+
Users need a way to update their local OpenSpec instructions (README.md and CLAUDE.md) when the OpenSpec package releases new versions with improved AI agent instructions or structural conventions.
|
|
6
|
+
|
|
7
|
+
## What Changes
|
|
8
|
+
|
|
9
|
+
- Add new `openspec update` CLI command that updates OpenSpec instructions
|
|
10
|
+
- Replace `openspec/README.md` with the latest template
|
|
11
|
+
- Safe because this file is fully OpenSpec-managed
|
|
12
|
+
- Update only the OpenSpec-managed block in `CLAUDE.md` using markers
|
|
13
|
+
- Preserve all user content outside markers
|
|
14
|
+
- If `CLAUDE.md` is missing, create it with the managed block
|
|
15
|
+
- Display success message after update (ASCII-safe): "Updated OpenSpec instructions"
|
|
16
|
+
- A leading checkmark MAY be shown when the terminal supports it
|
|
17
|
+
- Operation is idempotent (re-running yields identical results)
|
|
18
|
+
|
|
19
|
+
## Impact
|
|
20
|
+
|
|
21
|
+
- Affected specs: `cli-update` (new capability)
|
|
22
|
+
- Affected code:
|
|
23
|
+
- `src/core/update.ts` (new command class, mirrors `InitCommand` placement)
|
|
24
|
+
- `src/cli/index.ts` (register new command)
|
|
25
|
+
- Uses existing templates via `TemplateManager` and `readmeTemplate`
|
|
26
|
+
|
|
27
|
+
## Out of Scope
|
|
28
|
+
|
|
29
|
+
- No `.openspec/config.json` is introduced by this change. The default directory name `openspec` is used.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Update Command Specification
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
As a developer using OpenSpec, I want to update the OpenSpec instructions in my project when new versions are released, so that I can benefit from improvements to AI agent instructions.
|
|
6
|
+
|
|
7
|
+
## Core Requirements
|
|
8
|
+
|
|
9
|
+
### Update Behavior
|
|
10
|
+
|
|
11
|
+
The update command SHALL update OpenSpec instruction files to the latest templates.
|
|
12
|
+
|
|
13
|
+
WHEN a user runs `openspec update` THEN the command SHALL:
|
|
14
|
+
- Check if the `openspec` directory exists
|
|
15
|
+
- Replace `openspec/README.md` with the latest template (complete replacement)
|
|
16
|
+
- Update the OpenSpec-managed block in `CLAUDE.md` using markers
|
|
17
|
+
- Preserve user content outside markers
|
|
18
|
+
- Create `CLAUDE.md` if missing
|
|
19
|
+
- Display ASCII-safe success message: "Updated OpenSpec instructions"
|
|
20
|
+
|
|
21
|
+
### Prerequisites
|
|
22
|
+
|
|
23
|
+
The command SHALL require:
|
|
24
|
+
- An existing `openspec` directory (created by `openspec init`)
|
|
25
|
+
|
|
26
|
+
IF the `openspec` directory does not exist THEN:
|
|
27
|
+
- Display error: "No OpenSpec directory found. Run 'openspec init' first."
|
|
28
|
+
- Exit with code 1
|
|
29
|
+
|
|
30
|
+
### File Handling
|
|
31
|
+
|
|
32
|
+
The update command SHALL:
|
|
33
|
+
- Completely replace `openspec/README.md` with the latest template
|
|
34
|
+
- Update only the OpenSpec-managed block in `CLAUDE.md` using markers
|
|
35
|
+
- Use the default directory name `openspec`
|
|
36
|
+
- Be idempotent (repeated runs have no additional effect)
|
|
37
|
+
|
|
38
|
+
## Edge Cases
|
|
39
|
+
|
|
40
|
+
### File Permissions
|
|
41
|
+
IF file write fails THEN let the error bubble up naturally with file path.
|
|
42
|
+
|
|
43
|
+
### Missing CLAUDE.md
|
|
44
|
+
IF CLAUDE.md doesn't exist THEN create it with the template content.
|
|
45
|
+
|
|
46
|
+
### Custom Directory Name
|
|
47
|
+
Not supported in this change. The default directory name `openspec` SHALL be used.
|
|
48
|
+
|
|
49
|
+
## Success Criteria
|
|
50
|
+
|
|
51
|
+
Users SHALL be able to:
|
|
52
|
+
- Update OpenSpec instructions with a single command
|
|
53
|
+
- Get the latest AI agent instructions
|
|
54
|
+
- See clear confirmation of the update
|
|
55
|
+
|
|
56
|
+
The update process SHALL be:
|
|
57
|
+
- Simple and fast (no version checking)
|
|
58
|
+
- Predictable (same result every time)
|
|
59
|
+
- Self-contained (no network required)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Implementation Tasks
|
|
2
|
+
|
|
3
|
+
## 1. Update Command Implementation
|
|
4
|
+
- [x] 1.1 Create `src/core/update.ts` with `UpdateCommand` class
|
|
5
|
+
- [x] 1.2 Check if `openspec` directory exists (use `FileSystemUtils.directoryExists`)
|
|
6
|
+
- [x] 1.3 Write `readmeTemplate` to `openspec/README.md` using `FileSystemUtils.writeFile`
|
|
7
|
+
- [x] 1.4 Update `CLAUDE.md` using markers via `FileSystemUtils.updateFileWithMarkers` and `TemplateManager.getClaudeTemplate()`
|
|
8
|
+
- [x] 1.5 Display ASCII-safe success message: `Updated OpenSpec instructions`
|
|
9
|
+
|
|
10
|
+
## 2. CLI Integration
|
|
11
|
+
- [x] 2.1 Register `update` command in `src/cli/index.ts`
|
|
12
|
+
- [x] 2.2 Add command description: `Update OpenSpec instruction files`
|
|
13
|
+
- [x] 2.3 Handle errors with `ora().fail(...)` and exit code 1 (missing `openspec` directory, file write errors)
|
|
14
|
+
|
|
15
|
+
## 3. Testing
|
|
16
|
+
- [x] 3.1 Verify `openspec/README.md` is fully replaced with latest template
|
|
17
|
+
- [x] 3.2 Verify `CLAUDE.md` OpenSpec block updates without altering user content outside markers
|
|
18
|
+
- [x] 3.3 Verify idempotency (running twice yields identical files, no duplicate markers)
|
|
19
|
+
- [x] 3.4 Verify error when `openspec` directory is missing with friendly message
|
|
20
|
+
- [x] 3.5 Verify success message displays properly in ASCII-only terminals
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Add List Command to OpenSpec CLI
|
|
2
|
+
|
|
3
|
+
## Why
|
|
4
|
+
|
|
5
|
+
Developers need visibility into available changes and their status to understand the project's evolution and pending work.
|
|
6
|
+
|
|
7
|
+
## What Changes
|
|
8
|
+
|
|
9
|
+
- Add `openspec list` command that displays all changes in the changes/ directory
|
|
10
|
+
- Show each change name with task completion count (e.g., "add-auth: 3/5 tasks")
|
|
11
|
+
- Display completion status indicator (✓ for fully complete, progress for partial)
|
|
12
|
+
- Skip the archive/ subdirectory to focus on active changes
|
|
13
|
+
- Simple table output for easy scanning
|
|
14
|
+
|
|
15
|
+
## Impact
|
|
16
|
+
|
|
17
|
+
- Affected specs: New capability `cli-list` will be added
|
|
18
|
+
- Affected code:
|
|
19
|
+
- `src/cli/index.ts` - Add list command
|
|
20
|
+
- `src/core/list.ts` - New file with directory scanning and task parsing (~60 lines)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# List Command Specification
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
The `openspec list` command SHALL provide developers with a quick overview of all active changes in the project, showing their names and task completion status.
|
|
6
|
+
|
|
7
|
+
## Behavior
|
|
8
|
+
|
|
9
|
+
### Command Execution
|
|
10
|
+
|
|
11
|
+
WHEN `openspec list` is executed
|
|
12
|
+
THEN scan the `openspec/changes/` directory for change directories
|
|
13
|
+
AND exclude the `archive/` subdirectory from results
|
|
14
|
+
AND parse each change's `tasks.md` file to count task completion
|
|
15
|
+
|
|
16
|
+
### Task Counting
|
|
17
|
+
|
|
18
|
+
WHEN parsing a `tasks.md` file
|
|
19
|
+
THEN count tasks matching these patterns:
|
|
20
|
+
- Completed: Lines containing `- [x]`
|
|
21
|
+
- Incomplete: Lines containing `- [ ]`
|
|
22
|
+
AND calculate total tasks as the sum of completed and incomplete
|
|
23
|
+
|
|
24
|
+
### Output Format
|
|
25
|
+
|
|
26
|
+
WHEN displaying the list
|
|
27
|
+
THEN show a table with columns:
|
|
28
|
+
- Change name (directory name)
|
|
29
|
+
- Task progress (e.g., "3/5 tasks" or "✓ Complete")
|
|
30
|
+
- Status indicator:
|
|
31
|
+
- `✓` for fully completed changes (all tasks done)
|
|
32
|
+
- Progress fraction for partial completion
|
|
33
|
+
|
|
34
|
+
Example output:
|
|
35
|
+
```
|
|
36
|
+
Changes:
|
|
37
|
+
add-auth-feature 3/5 tasks
|
|
38
|
+
update-api-docs ✓ Complete
|
|
39
|
+
fix-validation 0/2 tasks
|
|
40
|
+
add-list-command 1/4 tasks
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Empty State
|
|
44
|
+
|
|
45
|
+
WHEN no active changes exist (only archive/ or empty changes/)
|
|
46
|
+
THEN display: "No active changes found."
|
|
47
|
+
|
|
48
|
+
### Error Handling
|
|
49
|
+
|
|
50
|
+
IF a change directory has no `tasks.md` file
|
|
51
|
+
THEN display the change with "No tasks" status
|
|
52
|
+
|
|
53
|
+
IF `openspec/changes/` directory doesn't exist
|
|
54
|
+
THEN display error: "No OpenSpec changes directory found. Run 'openspec init' first."
|
|
55
|
+
AND exit with code 1
|
|
56
|
+
|
|
57
|
+
### Sorting
|
|
58
|
+
|
|
59
|
+
Changes SHALL be displayed in alphabetical order by change name for consistency.
|
|
60
|
+
|
|
61
|
+
## Why
|
|
62
|
+
|
|
63
|
+
Developers need a quick way to:
|
|
64
|
+
- See what changes are in progress
|
|
65
|
+
- Identify which changes are ready to archive
|
|
66
|
+
- Understand the overall project evolution status
|
|
67
|
+
- Get a bird's-eye view without opening multiple files
|
|
68
|
+
|
|
69
|
+
This command provides that visibility with minimal effort, following OpenSpec's philosophy of simplicity and clarity.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Implementation Tasks
|
|
2
|
+
|
|
3
|
+
## 1. Core Implementation
|
|
4
|
+
- [x] 1.1 Create `src/core/list.ts` with list logic
|
|
5
|
+
- [x] 1.1.1 Implement directory scanning (exclude archive/)
|
|
6
|
+
- [x] 1.1.2 Implement task counting from tasks.md files
|
|
7
|
+
- [x] 1.1.3 Format output as simple table
|
|
8
|
+
- [x] 1.2 Add list command to CLI in `src/cli/index.ts`
|
|
9
|
+
- [x] 1.2.1 Register `openspec list` command
|
|
10
|
+
- [x] 1.2.2 Connect to list.ts implementation
|
|
11
|
+
|
|
12
|
+
## 2. Error Handling
|
|
13
|
+
- [x] 2.1 Handle missing openspec/changes/ directory
|
|
14
|
+
- [x] 2.2 Handle changes without tasks.md files
|
|
15
|
+
- [x] 2.3 Handle empty changes directory
|
|
16
|
+
|
|
17
|
+
## 3. Testing
|
|
18
|
+
- [x] 3.1 Add tests for list functionality
|
|
19
|
+
- [x] 3.1.1 Test with multiple changes
|
|
20
|
+
- [x] 3.1.2 Test with completed changes
|
|
21
|
+
- [x] 3.1.3 Test with no changes
|
|
22
|
+
- [x] 3.1.4 Test error conditions
|
|
23
|
+
|
|
24
|
+
## 4. Documentation
|
|
25
|
+
- [x] 4.1 Update CLI help text with list command
|
|
26
|
+
- [x] 4.2 Add list command to README if applicable
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Technical Design
|
|
2
|
+
|
|
3
|
+
## Technology Choices
|
|
4
|
+
|
|
5
|
+
### TypeScript Configuration
|
|
6
|
+
- **Strict mode**: Enable all strict type checking for better AI understanding
|
|
7
|
+
- **Target**: ES2022 for modern JavaScript features
|
|
8
|
+
- **Module**: ES2022 for modern ESM support
|
|
9
|
+
- **Module Resolution**: Node for proper package resolution
|
|
10
|
+
- **Output**: dist/ directory for compiled JavaScript
|
|
11
|
+
- **Source Maps**: Enable for debugging TypeScript directly
|
|
12
|
+
- **Declaration Files**: Generate .d.ts files for type definitions
|
|
13
|
+
- **ES Module Interop**: true for better CommonJS compatibility
|
|
14
|
+
- **Skip Lib Check**: false to ensure all types are validated
|
|
15
|
+
|
|
16
|
+
### Package Structure
|
|
17
|
+
```
|
|
18
|
+
openspec
|
|
19
|
+
├── bin/ # CLI entry point
|
|
20
|
+
├── dist/ # Compiled JavaScript
|
|
21
|
+
├── src/ # TypeScript source
|
|
22
|
+
│ ├── cli/ # Command implementations
|
|
23
|
+
│ ├── core/ # Core OpenSpec logic
|
|
24
|
+
│ └── utils/ # Shared utilities
|
|
25
|
+
├── package.json
|
|
26
|
+
├── tsconfig.json
|
|
27
|
+
└── build.js # Build script
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Dependency Strategy
|
|
31
|
+
- **Minimal dependencies**: Only essential packages
|
|
32
|
+
- **commander**: Industry-standard CLI framework
|
|
33
|
+
- **@inquirer/prompts**: Modern prompting library
|
|
34
|
+
- **No heavy frameworks**: Direct, readable implementation
|
|
35
|
+
|
|
36
|
+
### Build Approach
|
|
37
|
+
- Native TypeScript compilation via tsc
|
|
38
|
+
- Simple build.js script for packaging
|
|
39
|
+
- No complex build toolchain needed
|
|
40
|
+
- ESM output with proper .js extensions in imports
|
|
41
|
+
|
|
42
|
+
### Development Workflow
|
|
43
|
+
1. `pnpm install` - Install dependencies
|
|
44
|
+
2. `pnpm run build` - Compile TypeScript
|
|
45
|
+
3. `pnpm run dev` - Development mode
|
|
46
|
+
4. `pnpm link` - Test CLI locally
|
|
47
|
+
|
|
48
|
+
### Node.js Requirements
|
|
49
|
+
- **Minimum version**: Node.js 20.19.0
|
|
50
|
+
- **Recommended**: Node.js 22 LTS
|
|
51
|
+
- **Rationale**: Full ESM support without flags, modern JavaScript features
|
|
52
|
+
|
|
53
|
+
### ESM Configuration
|
|
54
|
+
- **Package type**: `"type": "module"` in package.json
|
|
55
|
+
- **File extensions**: Use .js extensions in TypeScript imports (compiles correctly)
|
|
56
|
+
- **Top-level await**: Available for cleaner async initialization
|
|
57
|
+
- **Future-proof**: Aligns with JavaScript standards
|
|
58
|
+
|
|
59
|
+
### TypeScript Best Practices
|
|
60
|
+
- **All code in TypeScript**: No .js files in src/, only .ts
|
|
61
|
+
- **Explicit types**: Prefer explicit typing over inference where it adds clarity
|
|
62
|
+
- **Interfaces over types**: Use interfaces for object shapes, types for unions/aliases
|
|
63
|
+
- **No any**: Strict mode prevents implicit any, use unknown when needed
|
|
64
|
+
- **Async/await**: Modern async patterns throughout
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Initialize TypeScript Project
|
|
2
|
+
|
|
3
|
+
## Why
|
|
4
|
+
The OpenSpec project needs a proper TypeScript foundation to build the minimal CLI that helps developers set up OpenSpec file structures and keep AI instructions updated.
|
|
5
|
+
|
|
6
|
+
## What Changes
|
|
7
|
+
- Create TypeScript project configuration with ESM modules (package.json, tsconfig.json)
|
|
8
|
+
- Set up the base directory structure for the CLI implementation
|
|
9
|
+
- Configure build scripts and development tooling
|
|
10
|
+
- Add essential dependencies for CLI development
|
|
11
|
+
- Create .gitignore for Node.js/TypeScript projects
|
|
12
|
+
- Set minimum Node.js version to 20.19.0 for native ESM support
|
|
13
|
+
|
|
14
|
+
## Impact
|
|
15
|
+
- Affected specs: None (initial project setup)
|
|
16
|
+
- Affected code: None (greenfield project)
|
|
17
|
+
- New directories: src/, dist/, node_modules/
|
|
18
|
+
- New files: package.json, tsconfig.json, .gitignore, build.js
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Tasks
|
|
2
|
+
|
|
3
|
+
## 1. Project Configuration
|
|
4
|
+
- [x] 1.1 Create package.json with project metadata, scripts, and ESM configuration
|
|
5
|
+
- [x] 1.2 Configure TypeScript with tsconfig.json for ESM output
|
|
6
|
+
- [x] 1.3 Add .gitignore for Node.js/TypeScript projects
|
|
7
|
+
- [x] 1.4 Set Node.js engine requirement to >=20.19.0
|
|
8
|
+
|
|
9
|
+
## 2. Directory Structure
|
|
10
|
+
- [x] 2.1 Create src/ directory for source code
|
|
11
|
+
- [x] 2.2 Create src/cli/ for CLI commands
|
|
12
|
+
- [x] 2.3 Create src/core/ for core OpenSpec logic
|
|
13
|
+
- [x] 2.4 Create src/utils/ for shared utilities
|
|
14
|
+
|
|
15
|
+
## 3. Build Configuration
|
|
16
|
+
- [x] 3.1 Create build.js for native TypeScript compilation
|
|
17
|
+
- [x] 3.2 Configure development scripts (build, dev)
|
|
18
|
+
- [x] 3.3 Set up package entry points with ESM exports
|
|
19
|
+
- [x] 3.4 Configure proper file extensions handling for ESM
|
|
20
|
+
|
|
21
|
+
## 4. Initial Dependencies
|
|
22
|
+
- [x] 4.1 Add TypeScript as dev dependency
|
|
23
|
+
- [x] 4.2 Add commander for CLI framework
|
|
24
|
+
- [x] 4.3 Add @inquirer/prompts for user interaction
|
|
25
|
+
- [x] 4.4 Add necessary type definitions
|