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,234 @@
|
|
|
1
|
+
export interface RequirementBlock {
|
|
2
|
+
headerLine: string; // e.g., '### Requirement: Something'
|
|
3
|
+
name: string; // e.g., 'Something'
|
|
4
|
+
raw: string; // full block including headerLine and following content
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface RequirementsSectionParts {
|
|
8
|
+
before: string;
|
|
9
|
+
headerLine: string; // the '## Requirements' line
|
|
10
|
+
preamble: string; // content between headerLine and first requirement block
|
|
11
|
+
bodyBlocks: RequirementBlock[]; // parsed requirement blocks in order
|
|
12
|
+
after: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function normalizeRequirementName(name: string): string {
|
|
16
|
+
return name.trim();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const REQUIREMENT_HEADER_REGEX = /^###\s*Requirement:\s*(.+)\s*$/;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Extracts the Requirements section from a spec file and parses requirement blocks.
|
|
23
|
+
*/
|
|
24
|
+
export function extractRequirementsSection(content: string): RequirementsSectionParts {
|
|
25
|
+
const normalized = normalizeLineEndings(content);
|
|
26
|
+
const lines = normalized.split('\n');
|
|
27
|
+
const reqHeaderIndex = lines.findIndex(l => /^##\s+Requirements\s*$/i.test(l));
|
|
28
|
+
|
|
29
|
+
if (reqHeaderIndex === -1) {
|
|
30
|
+
// No requirements section; create an empty one at the end
|
|
31
|
+
const before = content.trimEnd();
|
|
32
|
+
const headerLine = '## Requirements';
|
|
33
|
+
return {
|
|
34
|
+
before: before ? before + '\n\n' : '',
|
|
35
|
+
headerLine,
|
|
36
|
+
preamble: '',
|
|
37
|
+
bodyBlocks: [],
|
|
38
|
+
after: '\n',
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Find end of this section: next line that starts with '## ' at same or higher level
|
|
43
|
+
let endIndex = lines.length;
|
|
44
|
+
for (let i = reqHeaderIndex + 1; i < lines.length; i++) {
|
|
45
|
+
if (/^##\s+/.test(lines[i])) {
|
|
46
|
+
endIndex = i;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const before = lines.slice(0, reqHeaderIndex).join('\n');
|
|
52
|
+
const headerLine = lines[reqHeaderIndex];
|
|
53
|
+
const sectionBodyLines = lines.slice(reqHeaderIndex + 1, endIndex);
|
|
54
|
+
|
|
55
|
+
// Parse requirement blocks within section body
|
|
56
|
+
const blocks: RequirementBlock[] = [];
|
|
57
|
+
let cursor = 0;
|
|
58
|
+
let preambleLines: string[] = [];
|
|
59
|
+
|
|
60
|
+
// Collect preamble lines until first requirement header
|
|
61
|
+
while (cursor < sectionBodyLines.length && !/^###\s+Requirement:/.test(sectionBodyLines[cursor])) {
|
|
62
|
+
preambleLines.push(sectionBodyLines[cursor]);
|
|
63
|
+
cursor++;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
while (cursor < sectionBodyLines.length) {
|
|
67
|
+
const headerStart = cursor;
|
|
68
|
+
const headerLineCandidate = sectionBodyLines[cursor];
|
|
69
|
+
const headerMatch = headerLineCandidate.match(REQUIREMENT_HEADER_REGEX);
|
|
70
|
+
if (!headerMatch) {
|
|
71
|
+
// Not a requirement header; skip line defensively
|
|
72
|
+
cursor++;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const name = normalizeRequirementName(headerMatch[1]);
|
|
76
|
+
cursor++;
|
|
77
|
+
// Gather lines until next requirement header or end of section
|
|
78
|
+
const bodyLines: string[] = [headerLineCandidate];
|
|
79
|
+
while (cursor < sectionBodyLines.length && !/^###\s+Requirement:/.test(sectionBodyLines[cursor]) && !/^##\s+/.test(sectionBodyLines[cursor])) {
|
|
80
|
+
bodyLines.push(sectionBodyLines[cursor]);
|
|
81
|
+
cursor++;
|
|
82
|
+
}
|
|
83
|
+
const raw = bodyLines.join('\n').trimEnd();
|
|
84
|
+
blocks.push({ headerLine: headerLineCandidate, name, raw });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const after = lines.slice(endIndex).join('\n');
|
|
88
|
+
const preamble = preambleLines.join('\n').trimEnd();
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
before: before.trimEnd() ? before + '\n' : before,
|
|
92
|
+
headerLine,
|
|
93
|
+
preamble,
|
|
94
|
+
bodyBlocks: blocks,
|
|
95
|
+
after: after.startsWith('\n') ? after : '\n' + after,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface DeltaPlan {
|
|
100
|
+
added: RequirementBlock[];
|
|
101
|
+
modified: RequirementBlock[];
|
|
102
|
+
removed: string[]; // requirement names
|
|
103
|
+
renamed: Array<{ from: string; to: string }>;
|
|
104
|
+
sectionPresence: {
|
|
105
|
+
added: boolean;
|
|
106
|
+
modified: boolean;
|
|
107
|
+
removed: boolean;
|
|
108
|
+
renamed: boolean;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function normalizeLineEndings(content: string): string {
|
|
113
|
+
return content.replace(/\r\n?/g, '\n');
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Parse a delta-formatted spec change file content into a DeltaPlan with raw blocks.
|
|
118
|
+
*/
|
|
119
|
+
export function parseDeltaSpec(content: string): DeltaPlan {
|
|
120
|
+
const normalized = normalizeLineEndings(content);
|
|
121
|
+
const sections = splitTopLevelSections(normalized);
|
|
122
|
+
const addedLookup = getSectionCaseInsensitive(sections, 'ADDED Requirements');
|
|
123
|
+
const modifiedLookup = getSectionCaseInsensitive(sections, 'MODIFIED Requirements');
|
|
124
|
+
const removedLookup = getSectionCaseInsensitive(sections, 'REMOVED Requirements');
|
|
125
|
+
const renamedLookup = getSectionCaseInsensitive(sections, 'RENAMED Requirements');
|
|
126
|
+
const added = parseRequirementBlocksFromSection(addedLookup.body);
|
|
127
|
+
const modified = parseRequirementBlocksFromSection(modifiedLookup.body);
|
|
128
|
+
const removedNames = parseRemovedNames(removedLookup.body);
|
|
129
|
+
const renamedPairs = parseRenamedPairs(renamedLookup.body);
|
|
130
|
+
return {
|
|
131
|
+
added,
|
|
132
|
+
modified,
|
|
133
|
+
removed: removedNames,
|
|
134
|
+
renamed: renamedPairs,
|
|
135
|
+
sectionPresence: {
|
|
136
|
+
added: addedLookup.found,
|
|
137
|
+
modified: modifiedLookup.found,
|
|
138
|
+
removed: removedLookup.found,
|
|
139
|
+
renamed: renamedLookup.found,
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function splitTopLevelSections(content: string): Record<string, string> {
|
|
145
|
+
const lines = content.split('\n');
|
|
146
|
+
const result: Record<string, string> = {};
|
|
147
|
+
const indices: Array<{ title: string; index: number; level: number }> = [];
|
|
148
|
+
for (let i = 0; i < lines.length; i++) {
|
|
149
|
+
const m = lines[i].match(/^(##)\s+(.+)$/);
|
|
150
|
+
if (m) {
|
|
151
|
+
const level = m[1].length; // only care for '##'
|
|
152
|
+
indices.push({ title: m[2].trim(), index: i, level });
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
for (let i = 0; i < indices.length; i++) {
|
|
156
|
+
const current = indices[i];
|
|
157
|
+
const next = indices[i + 1];
|
|
158
|
+
const body = lines.slice(current.index + 1, next ? next.index : lines.length).join('\n');
|
|
159
|
+
result[current.title] = body;
|
|
160
|
+
}
|
|
161
|
+
return result;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function getSectionCaseInsensitive(sections: Record<string, string>, desired: string): { body: string; found: boolean } {
|
|
165
|
+
const target = desired.toLowerCase();
|
|
166
|
+
for (const [title, body] of Object.entries(sections)) {
|
|
167
|
+
if (title.toLowerCase() === target) return { body, found: true };
|
|
168
|
+
}
|
|
169
|
+
return { body: '', found: false };
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function parseRequirementBlocksFromSection(sectionBody: string): RequirementBlock[] {
|
|
173
|
+
if (!sectionBody) return [];
|
|
174
|
+
const lines = normalizeLineEndings(sectionBody).split('\n');
|
|
175
|
+
const blocks: RequirementBlock[] = [];
|
|
176
|
+
let i = 0;
|
|
177
|
+
while (i < lines.length) {
|
|
178
|
+
// Seek next requirement header
|
|
179
|
+
while (i < lines.length && !/^###\s+Requirement:/.test(lines[i])) i++;
|
|
180
|
+
if (i >= lines.length) break;
|
|
181
|
+
const headerLine = lines[i];
|
|
182
|
+
const m = headerLine.match(REQUIREMENT_HEADER_REGEX);
|
|
183
|
+
if (!m) { i++; continue; }
|
|
184
|
+
const name = normalizeRequirementName(m[1]);
|
|
185
|
+
const buf: string[] = [headerLine];
|
|
186
|
+
i++;
|
|
187
|
+
while (i < lines.length && !/^###\s+Requirement:/.test(lines[i]) && !/^##\s+/.test(lines[i])) {
|
|
188
|
+
buf.push(lines[i]);
|
|
189
|
+
i++;
|
|
190
|
+
}
|
|
191
|
+
blocks.push({ headerLine, name, raw: buf.join('\n').trimEnd() });
|
|
192
|
+
}
|
|
193
|
+
return blocks;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function parseRemovedNames(sectionBody: string): string[] {
|
|
197
|
+
if (!sectionBody) return [];
|
|
198
|
+
const names: string[] = [];
|
|
199
|
+
const lines = normalizeLineEndings(sectionBody).split('\n');
|
|
200
|
+
for (const line of lines) {
|
|
201
|
+
const m = line.match(REQUIREMENT_HEADER_REGEX);
|
|
202
|
+
if (m) {
|
|
203
|
+
names.push(normalizeRequirementName(m[1]));
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
// Also support bullet list of headers
|
|
207
|
+
const bullet = line.match(/^\s*-\s*`?###\s*Requirement:\s*(.+?)`?\s*$/);
|
|
208
|
+
if (bullet) {
|
|
209
|
+
names.push(normalizeRequirementName(bullet[1]));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return names;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function parseRenamedPairs(sectionBody: string): Array<{ from: string; to: string }> {
|
|
216
|
+
if (!sectionBody) return [];
|
|
217
|
+
const pairs: Array<{ from: string; to: string }> = [];
|
|
218
|
+
const lines = normalizeLineEndings(sectionBody).split('\n');
|
|
219
|
+
let current: { from?: string; to?: string } = {};
|
|
220
|
+
for (const line of lines) {
|
|
221
|
+
const fromMatch = line.match(/^\s*-?\s*FROM:\s*`?###\s*Requirement:\s*(.+?)`?\s*$/);
|
|
222
|
+
const toMatch = line.match(/^\s*-?\s*TO:\s*`?###\s*Requirement:\s*(.+?)`?\s*$/);
|
|
223
|
+
if (fromMatch) {
|
|
224
|
+
current.from = normalizeRequirementName(fromMatch[1]);
|
|
225
|
+
} else if (toMatch) {
|
|
226
|
+
current.to = normalizeRequirementName(toMatch[1]);
|
|
227
|
+
if (current.from && current.to) {
|
|
228
|
+
pairs.push({ from: current.from, to: current.to });
|
|
229
|
+
current = {};
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return pairs;
|
|
234
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { VALIDATION_MESSAGES } from '../validation/constants.js';
|
|
3
|
+
|
|
4
|
+
export const ScenarioSchema = z.object({
|
|
5
|
+
rawText: z.string().min(1, VALIDATION_MESSAGES.SCENARIO_EMPTY),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export const RequirementSchema = z.object({
|
|
9
|
+
text: z.string()
|
|
10
|
+
.min(1, VALIDATION_MESSAGES.REQUIREMENT_EMPTY)
|
|
11
|
+
.refine(
|
|
12
|
+
(text) => text.includes('SHALL') || text.includes('MUST'),
|
|
13
|
+
VALIDATION_MESSAGES.REQUIREMENT_NO_SHALL
|
|
14
|
+
),
|
|
15
|
+
scenarios: z.array(ScenarioSchema)
|
|
16
|
+
.min(1, VALIDATION_MESSAGES.REQUIREMENT_NO_SCENARIOS),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type Scenario = z.infer<typeof ScenarioSchema>;
|
|
20
|
+
export type Requirement = z.infer<typeof RequirementSchema>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RequirementSchema } from './base.schema.js';
|
|
3
|
+
import {
|
|
4
|
+
MIN_WHY_SECTION_LENGTH,
|
|
5
|
+
MAX_WHY_SECTION_LENGTH,
|
|
6
|
+
MAX_DELTAS_PER_CHANGE,
|
|
7
|
+
VALIDATION_MESSAGES
|
|
8
|
+
} from '../validation/constants.js';
|
|
9
|
+
|
|
10
|
+
export const DeltaOperationType = z.enum(['ADDED', 'MODIFIED', 'REMOVED', 'RENAMED']);
|
|
11
|
+
|
|
12
|
+
export const DeltaSchema = z.object({
|
|
13
|
+
spec: z.string().min(1, VALIDATION_MESSAGES.DELTA_SPEC_EMPTY),
|
|
14
|
+
operation: DeltaOperationType,
|
|
15
|
+
description: z.string().min(1, VALIDATION_MESSAGES.DELTA_DESCRIPTION_EMPTY),
|
|
16
|
+
requirement: RequirementSchema.optional(),
|
|
17
|
+
requirements: z.array(RequirementSchema).optional(),
|
|
18
|
+
rename: z.object({
|
|
19
|
+
from: z.string(),
|
|
20
|
+
to: z.string(),
|
|
21
|
+
}).optional(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const ChangeSchema = z.object({
|
|
25
|
+
name: z.string().min(1, VALIDATION_MESSAGES.CHANGE_NAME_EMPTY),
|
|
26
|
+
why: z.string()
|
|
27
|
+
.min(MIN_WHY_SECTION_LENGTH, VALIDATION_MESSAGES.CHANGE_WHY_TOO_SHORT)
|
|
28
|
+
.max(MAX_WHY_SECTION_LENGTH, VALIDATION_MESSAGES.CHANGE_WHY_TOO_LONG),
|
|
29
|
+
whatChanges: z.string().min(1, VALIDATION_MESSAGES.CHANGE_WHAT_EMPTY),
|
|
30
|
+
deltas: z.array(DeltaSchema)
|
|
31
|
+
.min(1, VALIDATION_MESSAGES.CHANGE_NO_DELTAS)
|
|
32
|
+
.max(MAX_DELTAS_PER_CHANGE, VALIDATION_MESSAGES.CHANGE_TOO_MANY_DELTAS),
|
|
33
|
+
metadata: z.object({
|
|
34
|
+
version: z.string().default('1.0.0'),
|
|
35
|
+
format: z.literal('openspec-change'),
|
|
36
|
+
sourcePath: z.string().optional(),
|
|
37
|
+
}).optional(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export type DeltaOperation = z.infer<typeof DeltaOperationType>;
|
|
41
|
+
export type Delta = z.infer<typeof DeltaSchema>;
|
|
42
|
+
export type Change = z.infer<typeof ChangeSchema>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export {
|
|
2
|
+
ScenarioSchema,
|
|
3
|
+
RequirementSchema,
|
|
4
|
+
type Scenario,
|
|
5
|
+
type Requirement,
|
|
6
|
+
} from './base.schema.js';
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
SpecSchema,
|
|
10
|
+
type Spec,
|
|
11
|
+
} from './spec.schema.js';
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
DeltaOperationType,
|
|
15
|
+
DeltaSchema,
|
|
16
|
+
ChangeSchema,
|
|
17
|
+
type DeltaOperation,
|
|
18
|
+
type Delta,
|
|
19
|
+
type Change,
|
|
20
|
+
} from './change.schema.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RequirementSchema } from './base.schema.js';
|
|
3
|
+
import { VALIDATION_MESSAGES } from '../validation/constants.js';
|
|
4
|
+
|
|
5
|
+
export const SpecSchema = z.object({
|
|
6
|
+
name: z.string().min(1, VALIDATION_MESSAGES.SPEC_NAME_EMPTY),
|
|
7
|
+
overview: z.string().min(1, VALIDATION_MESSAGES.SPEC_PURPOSE_EMPTY),
|
|
8
|
+
requirements: z.array(RequirementSchema)
|
|
9
|
+
.min(1, VALIDATION_MESSAGES.SPEC_NO_REQUIREMENTS),
|
|
10
|
+
metadata: z.object({
|
|
11
|
+
version: z.string().default('1.0.0'),
|
|
12
|
+
format: z.literal('openspec'),
|
|
13
|
+
sourcePath: z.string().optional(),
|
|
14
|
+
}).optional(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type Spec = z.infer<typeof SpecSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const agentsRootStubTemplate = `# OpenSpec Instructions
|
|
2
|
+
|
|
3
|
+
These instructions are for AI assistants working in this project.
|
|
4
|
+
|
|
5
|
+
Always open \`@/openspec/AGENTS.md\` when the request:
|
|
6
|
+
- Mentions planning or proposals (words like proposal, spec, change, plan)
|
|
7
|
+
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
|
|
8
|
+
- Sounds ambiguous and you need the authoritative spec before coding
|
|
9
|
+
|
|
10
|
+
Use \`@/openspec/AGENTS.md\` to learn:
|
|
11
|
+
- How to create and apply change proposals
|
|
12
|
+
- Spec format and conventions
|
|
13
|
+
- Project structure and guidelines
|
|
14
|
+
|
|
15
|
+
Keep this managed block so 'openspec update' can refresh the instructions.
|
|
16
|
+
`;
|