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,105 @@
|
|
|
1
|
+
# cli-view Specification
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
The `openspec view` command provides a comprehensive dashboard view of the OpenSpec project state, displaying specifications, changes, and progress metrics in a unified, visually appealing format to help developers quickly understand project status.
|
|
6
|
+
## Requirements
|
|
7
|
+
### Requirement: Dashboard Display
|
|
8
|
+
|
|
9
|
+
The system SHALL provide a `view` command that displays a dashboard overview of specs and changes.
|
|
10
|
+
|
|
11
|
+
#### Scenario: Basic dashboard display
|
|
12
|
+
|
|
13
|
+
- **WHEN** user runs `openspec view`
|
|
14
|
+
- **THEN** system displays a formatted dashboard with sections for summary, active changes, completed changes, and specifications
|
|
15
|
+
|
|
16
|
+
#### Scenario: No OpenSpec directory
|
|
17
|
+
|
|
18
|
+
- **WHEN** user runs `openspec view` in a directory without OpenSpec
|
|
19
|
+
- **THEN** system displays error message "✗ No openspec directory found"
|
|
20
|
+
|
|
21
|
+
### Requirement: Summary Section
|
|
22
|
+
|
|
23
|
+
The dashboard SHALL display a summary section with key project metrics.
|
|
24
|
+
|
|
25
|
+
#### Scenario: Complete summary display
|
|
26
|
+
|
|
27
|
+
- **WHEN** dashboard is rendered with specs and changes
|
|
28
|
+
- **THEN** system shows total number of specifications and requirements
|
|
29
|
+
- **AND** shows number of active changes in progress
|
|
30
|
+
- **AND** shows number of completed changes
|
|
31
|
+
- **AND** shows overall task progress percentage
|
|
32
|
+
|
|
33
|
+
#### Scenario: Empty project summary
|
|
34
|
+
|
|
35
|
+
- **WHEN** no specs or changes exist
|
|
36
|
+
- **THEN** summary shows zero counts for all metrics
|
|
37
|
+
|
|
38
|
+
### Requirement: Active Changes Display
|
|
39
|
+
The dashboard SHALL show active changes with visual progress indicators.
|
|
40
|
+
|
|
41
|
+
#### Scenario: Active changes ordered by completion percentage
|
|
42
|
+
- **WHEN** multiple active changes are displayed with progress information
|
|
43
|
+
- **THEN** list them sorted by completion percentage ascending so 0% items appear first
|
|
44
|
+
- **AND** treat missing progress values as 0% for ordering
|
|
45
|
+
- **AND** break ties by change identifier in ascending alphabetical order to keep output deterministic
|
|
46
|
+
|
|
47
|
+
### Requirement: Completed Changes Display
|
|
48
|
+
|
|
49
|
+
The dashboard SHALL list completed changes in a separate section.
|
|
50
|
+
|
|
51
|
+
#### Scenario: Completed changes listing
|
|
52
|
+
|
|
53
|
+
- **WHEN** there are completed changes (all tasks done)
|
|
54
|
+
- **THEN** system shows them with checkmark indicators in a dedicated section
|
|
55
|
+
|
|
56
|
+
#### Scenario: Mixed completion states
|
|
57
|
+
|
|
58
|
+
- **WHEN** some changes are complete and others active
|
|
59
|
+
- **THEN** system separates them into appropriate sections
|
|
60
|
+
|
|
61
|
+
### Requirement: Specifications Display
|
|
62
|
+
|
|
63
|
+
The dashboard SHALL display specifications sorted by requirement count.
|
|
64
|
+
|
|
65
|
+
#### Scenario: Specs listing with counts
|
|
66
|
+
|
|
67
|
+
- **WHEN** specifications exist in the project
|
|
68
|
+
- **THEN** system shows specs sorted by requirement count (descending) with count labels
|
|
69
|
+
|
|
70
|
+
#### Scenario: Specs with parsing errors
|
|
71
|
+
|
|
72
|
+
- **WHEN** a spec file cannot be parsed
|
|
73
|
+
- **THEN** system includes it with 0 requirement count
|
|
74
|
+
|
|
75
|
+
### Requirement: Visual Formatting
|
|
76
|
+
|
|
77
|
+
The dashboard SHALL use consistent visual formatting with colors and symbols.
|
|
78
|
+
|
|
79
|
+
#### Scenario: Color coding
|
|
80
|
+
|
|
81
|
+
- **WHEN** dashboard elements are displayed
|
|
82
|
+
- **THEN** system uses cyan for specification items
|
|
83
|
+
- **AND** yellow for active changes
|
|
84
|
+
- **AND** green for completed items
|
|
85
|
+
- **AND** dim gray for supplementary text
|
|
86
|
+
|
|
87
|
+
#### Scenario: Progress bar rendering
|
|
88
|
+
|
|
89
|
+
- **WHEN** displaying progress bars
|
|
90
|
+
- **THEN** system uses filled blocks (█) for completed portions and light blocks (░) for remaining
|
|
91
|
+
|
|
92
|
+
### Requirement: Error Handling
|
|
93
|
+
|
|
94
|
+
The view command SHALL handle errors gracefully.
|
|
95
|
+
|
|
96
|
+
#### Scenario: File system errors
|
|
97
|
+
|
|
98
|
+
- **WHEN** file system operations fail
|
|
99
|
+
- **THEN** system continues with available data and omits inaccessible items
|
|
100
|
+
|
|
101
|
+
#### Scenario: Invalid data structures
|
|
102
|
+
|
|
103
|
+
- **WHEN** specs or changes have invalid format
|
|
104
|
+
- **THEN** system skips invalid items and continues rendering
|
|
105
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# docs-agent-instructions Specification
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
TBD - created by archiving change improve-agent-instruction-usability. Update Purpose after archive.
|
|
5
|
+
## Requirements
|
|
6
|
+
### Requirement: Quick Reference Placement
|
|
7
|
+
The AI instructions SHALL begin with a quick-reference section that surfaces required file structures, templates, and formatting rules before any narrative guidance.
|
|
8
|
+
|
|
9
|
+
#### Scenario: Loading templates at the top
|
|
10
|
+
- **WHEN** `openspec/AGENTS.md` is regenerated or updated
|
|
11
|
+
- **THEN** the first substantive section after the title SHALL provide copy-ready headings for `proposal.md`, `tasks.md`, spec deltas, and scenario formatting
|
|
12
|
+
- **AND** link each template to the corresponding workflow step for deeper reading
|
|
13
|
+
|
|
14
|
+
### Requirement: Embedded Templates and Examples
|
|
15
|
+
`openspec/AGENTS.md` SHALL include complete copy/paste templates and inline examples exactly where agents make corresponding edits.
|
|
16
|
+
|
|
17
|
+
#### Scenario: Providing file templates
|
|
18
|
+
- **WHEN** authors reach the workflow guidance for drafting proposals and deltas
|
|
19
|
+
- **THEN** provide fenced Markdown templates that match the required structure (`## Why`, `## ADDED Requirements`, `#### Scenario:` etc.)
|
|
20
|
+
- **AND** accompany each template with a brief example showing correct header usage and scenario bullets
|
|
21
|
+
|
|
22
|
+
### Requirement: Pre-validation Checklist
|
|
23
|
+
`openspec/AGENTS.md` SHALL offer a concise pre-validation checklist that highlights common formatting mistakes before running `openspec validate`.
|
|
24
|
+
|
|
25
|
+
#### Scenario: Highlighting common validation failures
|
|
26
|
+
- **WHEN** a reader reaches the validation guidance
|
|
27
|
+
- **THEN** present a checklist reminding them to verify requirement headers, scenario formatting, and delta sections
|
|
28
|
+
- **AND** include reminders about at least `#### Scenario:` usage and descriptive requirement text before scenarios
|
|
29
|
+
|
|
30
|
+
### Requirement: Progressive Disclosure of Workflow Guidance
|
|
31
|
+
The documentation SHALL separate beginner essentials from advanced topics so newcomers can focus on core steps without losing access to advanced workflows.
|
|
32
|
+
|
|
33
|
+
#### Scenario: Organizing beginner and advanced sections
|
|
34
|
+
- **WHEN** reorganizing `openspec/AGENTS.md`
|
|
35
|
+
- **THEN** keep an introductory section limited to the minimum steps (scaffold, draft, validate, request review)
|
|
36
|
+
- **AND** move advanced topics (multi-capability changes, archiving details, tooling deep dives) into clearly labeled later sections
|
|
37
|
+
- **AND** provide anchor links from the quick-reference to those advanced sections
|
|
38
|
+
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
# OpenSpec Conventions Specification
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
OpenSpec conventions SHALL define how system capabilities are documented, how changes are proposed and tracked, and how specifications evolve over time. This meta-specification serves as the source of truth for OpenSpec's own conventions.
|
|
6
|
+
## Requirements
|
|
7
|
+
### Requirement: Structured conventions for specs and changes
|
|
8
|
+
|
|
9
|
+
OpenSpec conventions SHALL mandate a structured spec format with clear requirement and scenario sections so tooling can parse consistently.
|
|
10
|
+
|
|
11
|
+
#### Scenario: Following the structured spec format
|
|
12
|
+
|
|
13
|
+
- **WHEN** writing or updating OpenSpec specifications
|
|
14
|
+
- **THEN** authors SHALL use `### Requirement: ...` followed by at least one `#### Scenario: ...` section
|
|
15
|
+
|
|
16
|
+
### Requirement: Project Structure
|
|
17
|
+
An OpenSpec project SHALL maintain a consistent directory structure for specifications and changes.
|
|
18
|
+
|
|
19
|
+
#### Scenario: Initializing project structure
|
|
20
|
+
- **WHEN** an OpenSpec project is initialized
|
|
21
|
+
- **THEN** it SHALL have this structure:
|
|
22
|
+
```
|
|
23
|
+
openspec/
|
|
24
|
+
├── project.md # Project-specific context
|
|
25
|
+
├── AGENTS.md # AI assistant instructions
|
|
26
|
+
├── specs/ # Current deployed capabilities
|
|
27
|
+
│ └── [capability]/ # Single, focused capability
|
|
28
|
+
│ ├── spec.md # WHAT and WHY
|
|
29
|
+
│ └── design.md # HOW (optional, for established patterns)
|
|
30
|
+
└── changes/ # Proposed changes
|
|
31
|
+
├── [change-name]/ # Descriptive change identifier
|
|
32
|
+
│ ├── proposal.md # Why, what, and impact
|
|
33
|
+
│ ├── tasks.md # Implementation checklist
|
|
34
|
+
│ ├── design.md # Technical decisions (optional)
|
|
35
|
+
│ └── specs/ # Complete future state
|
|
36
|
+
│ └── [capability]/
|
|
37
|
+
│ └── spec.md # Clean markdown (no diff syntax)
|
|
38
|
+
└── archive/ # Completed changes
|
|
39
|
+
└── YYYY-MM-DD-[name]/
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Requirement: Structured Format for Behavioral Specs
|
|
43
|
+
|
|
44
|
+
Behavioral specifications SHALL use a structured format with consistent section headers and keywords to ensure visual consistency and parseability.
|
|
45
|
+
|
|
46
|
+
#### Scenario: Writing requirement sections
|
|
47
|
+
|
|
48
|
+
- **WHEN** documenting a requirement in a behavioral specification
|
|
49
|
+
- **THEN** use a level-3 heading with format `### Requirement: [Name]`
|
|
50
|
+
- **AND** immediately follow with a SHALL statement describing core behavior
|
|
51
|
+
- **AND** keep requirement names descriptive and under 50 characters
|
|
52
|
+
|
|
53
|
+
#### Scenario: Documenting scenarios
|
|
54
|
+
|
|
55
|
+
- **WHEN** documenting specific behaviors or use cases
|
|
56
|
+
- **THEN** use level-4 headings with format `#### Scenario: [Description]`
|
|
57
|
+
- **AND** use bullet points with bold keywords for steps:
|
|
58
|
+
- **GIVEN** for initial state (optional)
|
|
59
|
+
- **WHEN** for conditions or triggers
|
|
60
|
+
- **THEN** for expected outcomes
|
|
61
|
+
- **AND** for additional outcomes or conditions
|
|
62
|
+
|
|
63
|
+
#### Scenario: Adding implementation details
|
|
64
|
+
|
|
65
|
+
- **WHEN** a step requires additional detail
|
|
66
|
+
- **THEN** use sub-bullets under the main step
|
|
67
|
+
- **AND** maintain consistent indentation
|
|
68
|
+
- Sub-bullets provide examples or specifics
|
|
69
|
+
- Keep sub-bullets concise
|
|
70
|
+
|
|
71
|
+
### Requirement: Header-Based Requirement Identification
|
|
72
|
+
|
|
73
|
+
Requirement headers SHALL serve as unique identifiers for programmatic matching between current specs and proposed changes.
|
|
74
|
+
|
|
75
|
+
#### Scenario: Matching requirements programmatically
|
|
76
|
+
|
|
77
|
+
- **WHEN** processing delta changes
|
|
78
|
+
- **THEN** use the `### Requirement: [Name]` header as the unique identifier
|
|
79
|
+
- **AND** match using normalized headers: `normalize(header) = trim(header)`
|
|
80
|
+
- **AND** compare headers with case-sensitive equality after normalization
|
|
81
|
+
|
|
82
|
+
#### Scenario: Handling requirement renames
|
|
83
|
+
|
|
84
|
+
- **WHEN** renaming a requirement
|
|
85
|
+
- **THEN** use a special `## RENAMED Requirements` section
|
|
86
|
+
- **AND** specify both old and new names explicitly:
|
|
87
|
+
```markdown
|
|
88
|
+
## RENAMED Requirements
|
|
89
|
+
- FROM: `### Requirement: Old Name`
|
|
90
|
+
- TO: `### Requirement: New Name`
|
|
91
|
+
```
|
|
92
|
+
- **AND** if content also changes, include under MODIFIED using the NEW header
|
|
93
|
+
|
|
94
|
+
#### Scenario: Validating header uniqueness
|
|
95
|
+
|
|
96
|
+
- **WHEN** creating or modifying requirements
|
|
97
|
+
- **THEN** ensure no duplicate headers exist within a spec
|
|
98
|
+
- **AND** validation tools SHALL flag duplicate headers as errors
|
|
99
|
+
|
|
100
|
+
### Requirement: Change Storage Convention
|
|
101
|
+
|
|
102
|
+
Change proposals SHALL store only the additions, modifications, and removals to specifications, not complete future states.
|
|
103
|
+
|
|
104
|
+
#### Scenario: Creating change proposals with additions
|
|
105
|
+
|
|
106
|
+
- **WHEN** creating a change proposal that adds new requirements
|
|
107
|
+
- **THEN** include only the new requirements under `## ADDED Requirements`
|
|
108
|
+
- **AND** each requirement SHALL include its complete content
|
|
109
|
+
- **AND** use the standard structured format for requirements and scenarios
|
|
110
|
+
|
|
111
|
+
#### Scenario: Creating change proposals with modifications
|
|
112
|
+
|
|
113
|
+
- **WHEN** creating a change proposal that modifies existing requirements
|
|
114
|
+
- **THEN** include the modified requirements under `## MODIFIED Requirements`
|
|
115
|
+
- **AND** use the same header text as in the current spec (normalized)
|
|
116
|
+
- **AND** include the complete modified requirement (not a diff)
|
|
117
|
+
- **AND** optionally annotate what changed with inline comments like `← (was X)`
|
|
118
|
+
|
|
119
|
+
#### Scenario: Creating change proposals with removals
|
|
120
|
+
|
|
121
|
+
- **WHEN** creating a change proposal that removes requirements
|
|
122
|
+
- **THEN** list them under `## REMOVED Requirements`
|
|
123
|
+
- **AND** use the normalized header text for identification
|
|
124
|
+
- **AND** include reason for removal
|
|
125
|
+
- **AND** document any migration path if applicable
|
|
126
|
+
|
|
127
|
+
The `changes/[name]/specs/` directory SHALL contain:
|
|
128
|
+
- Delta files showing only what changes
|
|
129
|
+
- Sections for ADDED, MODIFIED, REMOVED, and RENAMED requirements
|
|
130
|
+
- Normalized header matching for requirement identification
|
|
131
|
+
- Complete requirements using the structured format
|
|
132
|
+
- Clear indication of change type for each requirement
|
|
133
|
+
|
|
134
|
+
#### Scenario: Using standard output symbols
|
|
135
|
+
|
|
136
|
+
- **WHEN** displaying delta operations in CLI output
|
|
137
|
+
- **THEN** use these standard symbols:
|
|
138
|
+
- `+` for ADDED (green)
|
|
139
|
+
- `~` for MODIFIED (yellow)
|
|
140
|
+
- `-` for REMOVED (red)
|
|
141
|
+
- `→` for RENAMED (cyan)
|
|
142
|
+
|
|
143
|
+
### Requirement: Archive Process Enhancement
|
|
144
|
+
|
|
145
|
+
The archive process SHALL programmatically apply delta changes to current specifications using header-based matching.
|
|
146
|
+
|
|
147
|
+
#### Scenario: Archiving changes with deltas
|
|
148
|
+
|
|
149
|
+
- **WHEN** archiving a completed change
|
|
150
|
+
- **THEN** the archive command SHALL:
|
|
151
|
+
1. Parse RENAMED sections first and apply renames
|
|
152
|
+
2. Parse REMOVED sections and remove by normalized header match
|
|
153
|
+
3. Parse MODIFIED sections and replace by normalized header match (using new names if renamed)
|
|
154
|
+
4. Parse ADDED sections and append new requirements
|
|
155
|
+
- **AND** validate that all MODIFIED/REMOVED headers exist in current spec
|
|
156
|
+
- **AND** validate that ADDED headers don't already exist
|
|
157
|
+
- **AND** generate the updated spec in the main specs/ directory
|
|
158
|
+
|
|
159
|
+
#### Scenario: Handling conflicts during archive
|
|
160
|
+
|
|
161
|
+
- **WHEN** delta changes conflict with current spec state
|
|
162
|
+
- **THEN** the archive command SHALL report specific conflicts
|
|
163
|
+
- **AND** require manual resolution before proceeding
|
|
164
|
+
- **AND** provide clear guidance on resolving conflicts
|
|
165
|
+
|
|
166
|
+
### Requirement: Proposal Format
|
|
167
|
+
|
|
168
|
+
Proposals SHALL explicitly document all changes with clear from/to comparisons.
|
|
169
|
+
|
|
170
|
+
#### Scenario: Documenting changes
|
|
171
|
+
|
|
172
|
+
- **WHEN** documenting what changes
|
|
173
|
+
- **THEN** the proposal SHALL explicitly describe each change:
|
|
174
|
+
|
|
175
|
+
```markdown
|
|
176
|
+
**[Section or Behavior Name]**
|
|
177
|
+
- From: [current state/requirement]
|
|
178
|
+
- To: [future state/requirement]
|
|
179
|
+
- Reason: [why this change is needed]
|
|
180
|
+
- Impact: [breaking/non-breaking, who's affected]
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
This explicit format compensates for not having inline diffs and ensures reviewers understand exactly what will change.
|
|
184
|
+
|
|
185
|
+
### Requirement: Change Review
|
|
186
|
+
|
|
187
|
+
The system SHALL support multiple methods for reviewing proposed changes.
|
|
188
|
+
|
|
189
|
+
#### Scenario: Reviewing changes
|
|
190
|
+
|
|
191
|
+
- **WHEN** reviewing proposed changes
|
|
192
|
+
- **THEN** reviewers can compare using:
|
|
193
|
+
- GitHub PR diff view when changes are committed
|
|
194
|
+
- Command line: `diff -u specs/[capability]/spec.md changes/[name]/specs/[capability]/spec.md`
|
|
195
|
+
- Any visual diff tool comparing current vs future state
|
|
196
|
+
|
|
197
|
+
### Requirement: Structured Format Adoption
|
|
198
|
+
|
|
199
|
+
Behavioral specifications SHALL adopt the structured format with `### Requirement:` and `#### Scenario:` headers as the default.
|
|
200
|
+
|
|
201
|
+
#### Scenario: Use structured headings for behavior
|
|
202
|
+
|
|
203
|
+
- **WHEN** documenting behavioral requirements
|
|
204
|
+
- **THEN** use `### Requirement:` for requirements
|
|
205
|
+
- **AND** use `#### Scenario:` for scenarios with bold WHEN/THEN/AND keywords
|
|
206
|
+
|
|
207
|
+
### Requirement: Verb–Noun CLI Command Structure
|
|
208
|
+
OpenSpec CLI design SHALL use verbs as top-level commands with nouns provided as arguments or flags for scoping.
|
|
209
|
+
|
|
210
|
+
#### Scenario: Verb-first command discovery
|
|
211
|
+
- **WHEN** a user runs a command like `openspec list`
|
|
212
|
+
- **THEN** the verb communicates the action clearly
|
|
213
|
+
- **AND** nouns refine scope via flags or arguments (e.g., `--changes`, `--specs`)
|
|
214
|
+
|
|
215
|
+
#### Scenario: Backward compatibility for noun commands
|
|
216
|
+
- **WHEN** users run noun-prefixed commands such as `openspec spec ...` or `openspec change ...`
|
|
217
|
+
- **THEN** the CLI SHALL continue to support them for at least one release
|
|
218
|
+
- **AND** display a deprecation warning that points to verb-first alternatives
|
|
219
|
+
|
|
220
|
+
#### Scenario: Disambiguation guidance
|
|
221
|
+
- **WHEN** item names are ambiguous between changes and specs
|
|
222
|
+
- **THEN** `openspec show` and `openspec validate` SHALL accept `--type spec|change`
|
|
223
|
+
- **AND** the help text SHALL document this clearly
|
|
224
|
+
|
|
225
|
+
## Core Principles
|
|
226
|
+
|
|
227
|
+
The system SHALL follow these principles:
|
|
228
|
+
- Specs reflect what IS currently built and deployed
|
|
229
|
+
- Changes contain proposals for what SHOULD be changed
|
|
230
|
+
- AI drives the documentation process
|
|
231
|
+
- Specs are living documentation kept in sync with deployed code
|
|
232
|
+
|
|
233
|
+
## Directory Structure
|
|
234
|
+
|
|
235
|
+
### Requirement: Project Structure
|
|
236
|
+
|
|
237
|
+
An OpenSpec project SHALL maintain a consistent directory structure for specifications and changes.
|
|
238
|
+
|
|
239
|
+
#### Scenario: Initializing project structure
|
|
240
|
+
|
|
241
|
+
- **WHEN** an OpenSpec project is initialized
|
|
242
|
+
- **THEN** it SHALL have this structure:
|
|
243
|
+
```
|
|
244
|
+
openspec/
|
|
245
|
+
├── project.md # Project-specific context
|
|
246
|
+
├── AGENTS.md # AI assistant instructions
|
|
247
|
+
├── specs/ # Current deployed capabilities
|
|
248
|
+
│ └── [capability]/ # Single, focused capability
|
|
249
|
+
│ ├── spec.md # WHAT and WHY
|
|
250
|
+
│ └── design.md # HOW (optional, for established patterns)
|
|
251
|
+
└── changes/ # Proposed changes
|
|
252
|
+
├── [change-name]/ # Descriptive change identifier
|
|
253
|
+
│ ├── proposal.md # Why, what, and impact
|
|
254
|
+
│ ├── tasks.md # Implementation checklist
|
|
255
|
+
│ ├── design.md # Technical decisions (optional)
|
|
256
|
+
│ └── specs/ # Complete future state
|
|
257
|
+
│ └── [capability]/
|
|
258
|
+
│ └── spec.md # Clean markdown (no diff syntax)
|
|
259
|
+
└── archive/ # Completed changes
|
|
260
|
+
└── YYYY-MM-DD-[name]/
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Specification Format
|
|
264
|
+
|
|
265
|
+
### Requirement: Structured Format for Behavioral Specs
|
|
266
|
+
|
|
267
|
+
Behavioral specifications SHALL use a structured format with consistent section headers and keywords to ensure visual consistency and parseability.
|
|
268
|
+
|
|
269
|
+
#### Scenario: Writing requirement sections
|
|
270
|
+
|
|
271
|
+
- **WHEN** documenting a requirement in a behavioral specification
|
|
272
|
+
- **THEN** use a level-3 heading with format `### Requirement: [Name]`
|
|
273
|
+
- **AND** immediately follow with a SHALL statement describing core behavior
|
|
274
|
+
- **AND** keep requirement names descriptive and under 50 characters
|
|
275
|
+
|
|
276
|
+
#### Scenario: Documenting scenarios
|
|
277
|
+
|
|
278
|
+
- **WHEN** documenting specific behaviors or use cases
|
|
279
|
+
- **THEN** use level-4 headings with format `#### Scenario: [Description]`
|
|
280
|
+
- **AND** use bullet points with bold keywords for steps:
|
|
281
|
+
- **GIVEN** for initial state (optional)
|
|
282
|
+
- **WHEN** for conditions or triggers
|
|
283
|
+
- **THEN** for expected outcomes
|
|
284
|
+
- **AND** for additional outcomes or conditions
|
|
285
|
+
|
|
286
|
+
#### Scenario: Adding implementation details
|
|
287
|
+
|
|
288
|
+
- **WHEN** a step requires additional detail
|
|
289
|
+
- **THEN** use sub-bullets under the main step
|
|
290
|
+
- **AND** maintain consistent indentation
|
|
291
|
+
- Sub-bullets provide examples or specifics
|
|
292
|
+
- Keep sub-bullets concise
|
|
293
|
+
|
|
294
|
+
## Change Storage Convention
|
|
295
|
+
|
|
296
|
+
### Requirement: Header-Based Requirement Identification
|
|
297
|
+
|
|
298
|
+
Requirement headers SHALL serve as unique identifiers for programmatic matching between current specs and proposed changes.
|
|
299
|
+
|
|
300
|
+
#### Scenario: Matching requirements programmatically
|
|
301
|
+
|
|
302
|
+
- **WHEN** processing delta changes
|
|
303
|
+
- **THEN** use the `### Requirement: [Name]` header as the unique identifier
|
|
304
|
+
- **AND** match using normalized headers: `normalize(header) = trim(header)`
|
|
305
|
+
- **AND** compare headers with case-sensitive equality after normalization
|
|
306
|
+
|
|
307
|
+
#### Scenario: Handling requirement renames
|
|
308
|
+
|
|
309
|
+
- **WHEN** renaming a requirement
|
|
310
|
+
- **THEN** use a special `## RENAMED Requirements` section
|
|
311
|
+
- **AND** specify both old and new names explicitly:
|
|
312
|
+
```markdown
|
|
313
|
+
## RENAMED Requirements
|
|
314
|
+
- FROM: `### Requirement: Old Name`
|
|
315
|
+
- TO: `### Requirement: New Name`
|
|
316
|
+
```
|
|
317
|
+
- **AND** if content also changes, include under MODIFIED using the NEW header
|
|
318
|
+
|
|
319
|
+
#### Scenario: Validating header uniqueness
|
|
320
|
+
|
|
321
|
+
- **WHEN** creating or modifying requirements
|
|
322
|
+
- **THEN** ensure no duplicate headers exist within a spec
|
|
323
|
+
- **AND** validation tools SHALL flag duplicate headers as errors
|
|
324
|
+
|
|
325
|
+
### Requirement: Change Storage Convention
|
|
326
|
+
|
|
327
|
+
Change proposals SHALL store only the additions, modifications, and removals to specifications, not complete future states.
|
|
328
|
+
|
|
329
|
+
#### Scenario: Creating change proposals with additions
|
|
330
|
+
|
|
331
|
+
- **WHEN** creating a change proposal that adds new requirements
|
|
332
|
+
- **THEN** include only the new requirements under `## ADDED Requirements`
|
|
333
|
+
- **AND** each requirement SHALL include its complete content
|
|
334
|
+
- **AND** use the standard structured format for requirements and scenarios
|
|
335
|
+
|
|
336
|
+
#### Scenario: Creating change proposals with modifications
|
|
337
|
+
|
|
338
|
+
- **WHEN** creating a change proposal that modifies existing requirements
|
|
339
|
+
- **THEN** include the modified requirements under `## MODIFIED Requirements`
|
|
340
|
+
- **AND** use the same header text as in the current spec (normalized)
|
|
341
|
+
- **AND** include the complete modified requirement (not a diff)
|
|
342
|
+
- **AND** optionally annotate what changed with inline comments like `← (was X)`
|
|
343
|
+
|
|
344
|
+
#### Scenario: Creating change proposals with removals
|
|
345
|
+
|
|
346
|
+
- **WHEN** creating a change proposal that removes requirements
|
|
347
|
+
- **THEN** list them under `## REMOVED Requirements`
|
|
348
|
+
- **AND** use the normalized header text for identification
|
|
349
|
+
- **AND** include reason for removal
|
|
350
|
+
- **AND** document any migration path if applicable
|
|
351
|
+
|
|
352
|
+
The `changes/[name]/specs/` directory SHALL contain:
|
|
353
|
+
- Delta files showing only what changes
|
|
354
|
+
- Sections for ADDED, MODIFIED, REMOVED, and RENAMED requirements
|
|
355
|
+
- Normalized header matching for requirement identification
|
|
356
|
+
- Complete requirements using the structured format
|
|
357
|
+
- Clear indication of change type for each requirement
|
|
358
|
+
|
|
359
|
+
#### Scenario: Using standard output symbols
|
|
360
|
+
|
|
361
|
+
- **WHEN** displaying delta operations in CLI output
|
|
362
|
+
- **THEN** use these standard symbols:
|
|
363
|
+
- `+` for ADDED (green)
|
|
364
|
+
- `~` for MODIFIED (yellow)
|
|
365
|
+
- `-` for REMOVED (red)
|
|
366
|
+
- `→` for RENAMED (cyan)
|
|
367
|
+
|
|
368
|
+
### Requirement: Archive Process Enhancement
|
|
369
|
+
|
|
370
|
+
The archive process SHALL programmatically apply delta changes to current specifications using header-based matching.
|
|
371
|
+
|
|
372
|
+
#### Scenario: Archiving changes with deltas
|
|
373
|
+
|
|
374
|
+
- **WHEN** archiving a completed change
|
|
375
|
+
- **THEN** the archive command SHALL:
|
|
376
|
+
1. Parse RENAMED sections first and apply renames
|
|
377
|
+
2. Parse REMOVED sections and remove by normalized header match
|
|
378
|
+
3. Parse MODIFIED sections and replace by normalized header match (using new names if renamed)
|
|
379
|
+
4. Parse ADDED sections and append new requirements
|
|
380
|
+
- **AND** validate that all MODIFIED/REMOVED headers exist in current spec
|
|
381
|
+
- **AND** validate that ADDED headers don't already exist
|
|
382
|
+
- **AND** generate the updated spec in the main specs/ directory
|
|
383
|
+
|
|
384
|
+
#### Scenario: Handling conflicts during archive
|
|
385
|
+
|
|
386
|
+
- **WHEN** delta changes conflict with current spec state
|
|
387
|
+
- **THEN** the archive command SHALL report specific conflicts
|
|
388
|
+
- **AND** require manual resolution before proceeding
|
|
389
|
+
- **AND** provide clear guidance on resolving conflicts
|
|
390
|
+
|
|
391
|
+
### Requirement: Proposal Format
|
|
392
|
+
|
|
393
|
+
Proposals SHALL explicitly document all changes with clear from/to comparisons.
|
|
394
|
+
|
|
395
|
+
#### Scenario: Documenting changes
|
|
396
|
+
|
|
397
|
+
- **WHEN** documenting what changes
|
|
398
|
+
- **THEN** the proposal SHALL explicitly describe each change:
|
|
399
|
+
|
|
400
|
+
```markdown
|
|
401
|
+
**[Section or Behavior Name]**
|
|
402
|
+
- From: [current state/requirement]
|
|
403
|
+
- To: [future state/requirement]
|
|
404
|
+
- Reason: [why this change is needed]
|
|
405
|
+
- Impact: [breaking/non-breaking, who's affected]
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
This explicit format compensates for not having inline diffs and ensures reviewers understand exactly what will change.
|
|
409
|
+
|
|
410
|
+
## Change Lifecycle
|
|
411
|
+
|
|
412
|
+
The change process SHALL follow these states:
|
|
413
|
+
|
|
414
|
+
1. **Propose**: AI creates change with future state specs and explicit proposal
|
|
415
|
+
2. **Review**: Humans review proposal and future state
|
|
416
|
+
3. **Approve**: Change is approved for implementation
|
|
417
|
+
4. **Implement**: Follow tasks.md checklist (can span multiple PRs)
|
|
418
|
+
5. **Deploy**: Changes are deployed to production
|
|
419
|
+
6. **Update**: Specs in `specs/` are updated to match deployed reality
|
|
420
|
+
7. **Archive**: Change is moved to `archive/YYYY-MM-DD-[name]/`
|
|
421
|
+
|
|
422
|
+
## Viewing Changes
|
|
423
|
+
|
|
424
|
+
### Requirement: Change Review
|
|
425
|
+
|
|
426
|
+
The system SHALL support multiple methods for reviewing proposed changes.
|
|
427
|
+
|
|
428
|
+
#### Scenario: Reviewing changes
|
|
429
|
+
|
|
430
|
+
- **WHEN** reviewing proposed changes
|
|
431
|
+
- **THEN** reviewers can compare using:
|
|
432
|
+
- GitHub PR diff view when changes are committed
|
|
433
|
+
- Command line: `diff -u specs/[capability]/spec.md changes/[name]/specs/[capability]/spec.md`
|
|
434
|
+
- Any visual diff tool comparing current vs future state
|
|
435
|
+
|
|
436
|
+
The system relies on tools to generate diffs rather than storing them.
|
|
437
|
+
|
|
438
|
+
## Capability Naming
|
|
439
|
+
|
|
440
|
+
Capabilities SHALL use:
|
|
441
|
+
- Verb-noun patterns (e.g., `user-auth`, `payment-capture`)
|
|
442
|
+
- Hyphenated lowercase names
|
|
443
|
+
- Singular focus (one responsibility per capability)
|
|
444
|
+
- No nesting (flat structure under `specs/`)
|
|
445
|
+
|
|
446
|
+
## When Changes Require Proposals
|
|
447
|
+
|
|
448
|
+
A proposal SHALL be created for:
|
|
449
|
+
- New features or capabilities
|
|
450
|
+
- Breaking changes to existing behavior
|
|
451
|
+
- Architecture or pattern changes
|
|
452
|
+
- Performance optimizations that change behavior
|
|
453
|
+
- Security updates affecting access patterns
|
|
454
|
+
|
|
455
|
+
A proposal is NOT required for:
|
|
456
|
+
- Bug fixes restoring intended behavior
|
|
457
|
+
- Typos or formatting fixes
|
|
458
|
+
- Non-breaking dependency updates
|
|
459
|
+
- Adding tests for existing behavior
|
|
460
|
+
- Documentation clarifications
|
|
461
|
+
|
|
462
|
+
## Why This Approach
|
|
463
|
+
|
|
464
|
+
Clean future state storage provides:
|
|
465
|
+
- **Readability**: No diff syntax pollution
|
|
466
|
+
- **AI-compatibility**: Standard markdown that AI tools understand
|
|
467
|
+
- **Simplicity**: No special parsing or processing needed
|
|
468
|
+
- **Tool-agnostic**: Any diff tool can show changes
|
|
469
|
+
- **Clear intent**: Explicit proposals document reasoning
|
|
470
|
+
|
|
471
|
+
The structured format adds:
|
|
472
|
+
- **Visual Consistency**: Requirement and Scenario prefixes make sections instantly recognizable
|
|
473
|
+
- **Parseability**: Consistent structure enables tooling and automation
|
|
474
|
+
- **Gradual Adoption**: Existing specs can migrate incrementally
|