@devtrack-solution/codesdd 1.2.2 → 1.2.4-rc3
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/.sdd/skills/curated/api-clean-flask-langgraph/SKILL.md +17 -17
- package/.sdd/skills/curated/devtrack-api/SKILL.md +170 -31
- package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +4 -2
- package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +2 -2
- package/.sdd/skills/curated/devtrack-api/references/architecture-governance.md +8 -7
- package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +93 -0
- package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +372 -0
- package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +13 -13
- package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +95 -0
- package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +294 -0
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +5 -5
- package/.sdd/skills/curated/devtrack-api/references/imports-lint.md +4 -0
- package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +41 -0
- package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +2 -2
- package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +7 -9
- package/LICENSE +1 -1
- package/README.md +399 -53
- package/bin/codesdd.js +3 -2
- package/dist/applications/sdd/index.d.ts +16 -0
- package/dist/applications/sdd/index.js +16 -0
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +11 -558
- package/dist/cli/program.d.ts +14 -0
- package/dist/cli/program.js +645 -0
- package/dist/commands/change.js +5 -5
- package/dist/commands/completion.d.ts +1 -1
- package/dist/commands/completion.js +9 -2
- package/dist/commands/config.js +320 -20
- package/dist/commands/feedback.js +1 -1
- package/dist/commands/schema.d.ts +63 -0
- package/dist/commands/schema.js +12 -12
- package/dist/commands/sdd/backlog.d.ts +3 -0
- package/dist/commands/sdd/backlog.js +54 -0
- package/dist/commands/sdd/execution.js +489 -28
- package/dist/commands/sdd/plugin.d.ts +3 -0
- package/dist/commands/sdd/plugin.js +158 -0
- package/dist/commands/sdd/shared.d.ts +1 -0
- package/dist/commands/sdd/shared.js +11 -22
- package/dist/commands/sdd/skills.js +7 -0
- package/dist/commands/sdd.js +107 -15
- package/dist/commands/spec.js +9 -9
- package/dist/commands/validate.js +6 -6
- package/dist/commands/workflow/instructions.js +6 -6
- package/dist/commands/workflow/new-change.js +3 -3
- package/dist/commands/workflow/shared.d.ts +1 -1
- package/dist/commands/workflow/shared.js +4 -4
- package/dist/core/archive.js +15 -5
- package/dist/core/artifact-graph/instruction-loader.d.ts +1 -1
- package/dist/core/artifact-graph/instruction-loader.js +3 -3
- package/dist/core/artifact-graph/resolver.d.ts +4 -4
- package/dist/core/artifact-graph/resolver.js +6 -6
- package/dist/core/branding.js +3 -3
- package/dist/core/cli/command-matrix.js +19 -1
- package/dist/core/cli-command-quality.d.ts +27 -0
- package/dist/core/cli-command-quality.js +180 -0
- package/dist/core/command-generation/adapters/costrict.d.ts +1 -1
- package/dist/core/command-generation/adapters/costrict.js +2 -2
- package/dist/core/command-generation/types.d.ts +1 -1
- package/dist/core/completions/command-registry.d.ts +1 -1
- package/dist/core/completions/command-registry.js +200 -12
- package/dist/core/completions/completion-provider.d.ts +14 -1
- package/dist/core/completions/completion-provider.js +29 -1
- package/dist/core/completions/generators/bash-generator.d.ts +1 -1
- package/dist/core/completions/generators/bash-generator.js +20 -12
- package/dist/core/completions/generators/fish-generator.d.ts +9 -1
- package/dist/core/completions/generators/fish-generator.js +39 -25
- package/dist/core/completions/generators/powershell-generator.d.ts +1 -1
- package/dist/core/completions/generators/powershell-generator.js +21 -11
- package/dist/core/completions/generators/zsh-generator.d.ts +3 -6
- package/dist/core/completions/generators/zsh-generator.js +21 -42
- package/dist/core/completions/installers/bash-installer.js +6 -6
- package/dist/core/completions/installers/fish-installer.js +1 -1
- package/dist/core/completions/installers/powershell-installer.js +14 -14
- package/dist/core/completions/installers/zsh-installer.d.ts +7 -1
- package/dist/core/completions/installers/zsh-installer.js +36 -8
- package/dist/core/completions/templates/bash-templates.d.ts +1 -1
- package/dist/core/completions/templates/bash-templates.js +12 -6
- package/dist/core/completions/templates/fish-templates.d.ts +2 -2
- package/dist/core/completions/templates/fish-templates.js +20 -9
- package/dist/core/completions/templates/powershell-templates.d.ts +1 -1
- package/dist/core/completions/templates/powershell-templates.js +13 -4
- package/dist/core/completions/templates/zsh-templates.d.ts +1 -1
- package/dist/core/completions/templates/zsh-templates.js +18 -9
- package/dist/core/config-schema.d.ts +20 -1
- package/dist/core/config-schema.js +70 -2
- package/dist/core/config.d.ts +3 -3
- package/dist/core/config.js +4 -4
- package/dist/core/global-config.d.ts +57 -12
- package/dist/core/global-config.js +344 -27
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +2 -2
- package/dist/core/init.d.ts +6 -1
- package/dist/core/init.js +99 -77
- package/dist/core/legacy-cleanup.d.ts +17 -17
- package/dist/core/legacy-cleanup.js +96 -79
- package/dist/core/list.js +18 -4
- package/dist/core/migration.d.ts +3 -1
- package/dist/core/migration.js +7 -8
- package/dist/core/parsers/change-parser.js +1 -1
- package/dist/core/parsers/markdown-parser.js +2 -2
- package/dist/core/profile-sync-drift.d.ts +1 -1
- package/dist/core/profile-sync-drift.js +13 -13
- package/dist/core/project-config.d.ts +4 -4
- package/dist/core/project-config.js +11 -11
- package/dist/core/schemas/change.schema.d.ts +1 -1
- package/dist/core/schemas/change.schema.js +1 -1
- package/dist/core/schemas/spec.schema.d.ts +1 -1
- package/dist/core/schemas/spec.schema.js +1 -1
- package/dist/core/sdd/adr.js +23 -1
- package/dist/core/sdd/agent-binding.d.ts +346 -0
- package/dist/core/sdd/agent-binding.js +343 -0
- package/dist/core/sdd/agent-runtime-contract.d.ts +204 -0
- package/dist/core/sdd/agent-runtime-contract.js +200 -0
- package/dist/core/sdd/backlog-cli.d.ts +16 -0
- package/dist/core/sdd/backlog-cli.js +146 -0
- package/dist/core/sdd/backlog-conflict-policy.d.ts +58 -0
- package/dist/core/sdd/backlog-conflict-policy.js +230 -0
- package/dist/core/sdd/backlog-projection.d.ts +8 -0
- package/dist/core/sdd/backlog-projection.js +89 -0
- package/dist/core/sdd/backlog-provider-contract.d.ts +252 -0
- package/dist/core/sdd/backlog-provider-contract.js +158 -0
- package/dist/core/sdd/bootstrap.js +2 -2
- package/dist/core/sdd/check.d.ts +44 -0
- package/dist/core/sdd/check.js +62 -24
- package/dist/core/sdd/contract.d.ts +13 -0
- package/dist/core/sdd/contract.js +36 -0
- package/dist/core/sdd/coordination/coordination-adapters.d.ts +53 -8
- package/dist/core/sdd/coordination/coordination-adapters.js +182 -16
- package/dist/core/sdd/coordination/index.d.ts +1 -0
- package/dist/core/sdd/coordination/index.js +1 -0
- package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
- package/dist/core/sdd/coordination/redis-runtime.js +698 -0
- package/dist/core/sdd/deepagent-contracts.d.ts +370 -0
- package/dist/core/sdd/deepagent-contracts.js +235 -0
- package/dist/core/sdd/deepagents/adr-governor.d.ts +2 -0
- package/dist/core/sdd/deepagents/adr-governor.js +30 -0
- package/dist/core/sdd/deepagents/backend.d.ts +63 -0
- package/dist/core/sdd/deepagents/backend.js +174 -0
- package/dist/core/sdd/deepagents/codesdd-tools.d.ts +39 -0
- package/dist/core/sdd/deepagents/codesdd-tools.js +83 -0
- package/dist/core/sdd/deepagents/evidence-mapper.d.ts +86 -0
- package/dist/core/sdd/deepagents/evidence-mapper.js +178 -0
- package/dist/core/sdd/deepagents/model-provider.d.ts +53 -0
- package/dist/core/sdd/deepagents/model-provider.js +379 -0
- package/dist/core/sdd/deepagents/policy-enforcement.d.ts +30 -0
- package/dist/core/sdd/deepagents/policy-enforcement.js +90 -0
- package/dist/core/sdd/deepagents/policy.d.ts +75 -0
- package/dist/core/sdd/deepagents/policy.js +358 -0
- package/dist/core/sdd/deepagents/quality-witness.d.ts +3 -0
- package/dist/core/sdd/deepagents/quality-witness.js +77 -0
- package/dist/core/sdd/deepagents/reversa-subagents.d.ts +75 -0
- package/dist/core/sdd/deepagents/reversa-subagents.js +182 -0
- package/dist/core/sdd/deepagents/runtime-factory.d.ts +90 -0
- package/dist/core/sdd/deepagents/runtime-factory.js +231 -0
- package/dist/core/sdd/deepagents/runtime-loader.d.ts +16 -0
- package/dist/core/sdd/deepagents/runtime-loader.js +65 -0
- package/dist/core/sdd/default-bootstrap-files.d.ts +3 -3
- package/dist/core/sdd/default-bootstrap-files.js +50 -10
- package/dist/core/sdd/default-skills.d.ts +30 -0
- package/dist/core/sdd/default-skills.js +288 -8
- package/dist/core/sdd/devtrack-api-appliance.d.ts +91 -0
- package/dist/core/sdd/devtrack-api-appliance.js +280 -0
- package/dist/core/sdd/devtrack-api-architecture.d.ts +31 -0
- package/dist/core/sdd/devtrack-api-architecture.js +608 -0
- package/dist/core/sdd/devtrack-api-import-boundary.d.ts +19 -0
- package/dist/core/sdd/devtrack-api-import-boundary.js +32 -0
- package/dist/core/sdd/diagnose.d.ts +59 -0
- package/dist/core/sdd/diagnose.js +37 -37
- package/dist/core/sdd/docs-sync.js +54 -20
- package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
- package/dist/core/sdd/domain/capability-diff.js +200 -0
- package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
- package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
- package/dist/core/sdd/domain/post-active-validation.d.ts +7 -0
- package/dist/core/sdd/domain/post-active-validation.js +61 -0
- package/dist/core/sdd/domain/semantic-intent-classifier.d.ts +29 -0
- package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -0
- package/dist/core/sdd/domain/transition-engine.js +1 -0
- package/dist/core/sdd/entity-reference.d.ts +5 -0
- package/dist/core/sdd/entity-reference.js +22 -0
- package/dist/core/sdd/foundation-artifact-map-validator.d.ts +16 -0
- package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
- package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
- package/dist/core/sdd/foundation-layer-manifest.js +117 -0
- package/dist/core/sdd/governance-backfill.d.ts +31 -0
- package/dist/core/sdd/governance-backfill.js +359 -0
- package/dist/core/sdd/governance-parser.d.ts +21 -0
- package/dist/core/sdd/governance-parser.js +91 -0
- package/dist/core/sdd/governance-schemas.d.ts +245 -0
- package/dist/core/sdd/governance-schemas.js +143 -0
- package/dist/core/sdd/{import-openspec.d.ts → import-legacy-spec.d.ts} +7 -7
- package/dist/core/sdd/{import-openspec.js → import-legacy-spec.js} +21 -29
- package/dist/core/sdd/init.d.ts +3 -0
- package/dist/core/sdd/init.js +6 -3
- package/dist/core/sdd/intent-guard.d.ts +22 -0
- package/dist/core/sdd/intent-guard.js +67 -0
- package/dist/core/sdd/json-schema.js +108 -6
- package/dist/core/sdd/knowledge-graph.d.ts +45 -0
- package/dist/core/sdd/knowledge-graph.js +288 -0
- package/dist/core/sdd/legacy-operations.js +507 -44
- package/dist/core/sdd/lenses.d.ts +1 -0
- package/dist/core/sdd/lenses.js +29 -1
- package/dist/core/sdd/migrate-workspace.js +95 -2
- package/dist/core/sdd/migrate.d.ts +1 -1
- package/dist/core/sdd/migrate.js +36 -2
- package/dist/core/sdd/package-security-gates.d.ts +21 -0
- package/dist/core/sdd/package-security-gates.js +119 -0
- package/dist/core/sdd/package-structure-gate.d.ts +83 -0
- package/dist/core/sdd/package-structure-gate.js +357 -0
- package/dist/core/sdd/parallel-feat-automation.d.ts +330 -0
- package/dist/core/sdd/parallel-feat-automation.js +424 -0
- package/dist/core/sdd/plugin-broker.d.ts +777 -0
- package/dist/core/sdd/plugin-broker.js +492 -0
- package/dist/core/sdd/plugin-certification.d.ts +79 -0
- package/dist/core/sdd/plugin-certification.js +453 -0
- package/dist/core/sdd/plugin-cli.d.ts +139 -0
- package/dist/core/sdd/plugin-cli.js +265 -0
- package/dist/core/sdd/plugin-evidence.d.ts +348 -0
- package/dist/core/sdd/plugin-evidence.js +307 -0
- package/dist/core/sdd/plugin-manifest.d.ts +232 -0
- package/dist/core/sdd/plugin-manifest.js +225 -0
- package/dist/core/sdd/plugin-policy-pack.d.ts +88 -0
- package/dist/core/sdd/plugin-policy-pack.js +236 -0
- package/dist/core/sdd/plugin-policy.d.ts +68 -0
- package/dist/core/sdd/plugin-policy.js +212 -0
- package/dist/core/sdd/plugin-registry.d.ts +447 -0
- package/dist/core/sdd/plugin-registry.js +138 -0
- package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
- package/dist/core/sdd/plugin-sdk-contract.js +268 -0
- package/dist/core/sdd/plugin-skill-binding.d.ts +151 -0
- package/dist/core/sdd/plugin-skill-binding.js +339 -0
- package/dist/core/sdd/quality-artifact-manifest-validator.d.ts +28 -0
- package/dist/core/sdd/quality-artifact-manifest-validator.js +167 -0
- package/dist/core/sdd/quality-evidence-renderer.d.ts +65 -0
- package/dist/core/sdd/quality-evidence-renderer.js +218 -0
- package/dist/core/sdd/quality-scenario-runner.d.ts +42 -0
- package/dist/core/sdd/quality-scenario-runner.js +613 -0
- package/dist/core/sdd/quality-validation.d.ts +620 -0
- package/dist/core/sdd/quality-validation.js +239 -0
- package/dist/core/sdd/release-readiness.d.ts +19 -0
- package/dist/core/sdd/release-readiness.js +472 -0
- package/dist/core/sdd/resolve-project-root.d.ts +2 -2
- package/dist/core/sdd/resolve-project-root.js +11 -5
- package/dist/core/sdd/runtime-boundary-contract.d.ts +45 -0
- package/dist/core/sdd/runtime-boundary-contract.js +90 -0
- package/dist/core/sdd/sanitize.d.ts +30 -1
- package/dist/core/sdd/sanitize.js +23 -23
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
- package/dist/core/sdd/services/agent-run.service.d.ts +97 -0
- package/dist/core/sdd/services/agent-run.service.js +261 -0
- package/dist/core/sdd/services/breakdown.service.js +2 -1
- package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
- package/dist/core/sdd/services/capability-diff.service.js +26 -0
- package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
- package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
- package/dist/core/sdd/services/context.service.d.ts +43 -340
- package/dist/core/sdd/services/context.service.js +341 -25
- package/dist/core/sdd/services/debate.service.js +15 -2
- package/dist/core/sdd/services/feature-lint.service.d.ts +22 -0
- package/dist/core/sdd/services/feature-lint.service.js +105 -5
- package/dist/core/sdd/services/finalize.service.d.ts +105 -0
- package/dist/core/sdd/services/finalize.service.js +499 -38
- package/dist/core/sdd/services/frontend-gap.service.js +22 -7
- package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
- package/dist/core/sdd/services/governance-control-plane-runtime-adapters.d.ts +17 -0
- package/dist/core/sdd/services/governance-control-plane-runtime-adapters.js +38 -0
- package/dist/core/sdd/services/governance-control-plane.service.d.ts +66 -0
- package/dist/core/sdd/services/governance-control-plane.service.js +134 -0
- package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
- package/dist/core/sdd/services/legacy-capability.service.d.ts +10 -7
- package/dist/core/sdd/services/legacy-capability.service.js +38 -21
- package/dist/core/sdd/services/mcp-runtime.service.d.ts +123 -8
- package/dist/core/sdd/services/mcp-runtime.service.js +1085 -33
- package/dist/core/sdd/services/onboard.service.js +2 -1
- package/dist/core/sdd/services/rebuild.service.js +6 -1
- package/dist/core/sdd/services/semantic-intent-classifier.service.d.ts +6 -0
- package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
- package/dist/core/sdd/services/skills-sync.service.d.ts +17 -5
- package/dist/core/sdd/services/skills-sync.service.js +55 -2
- package/dist/core/sdd/services/start.service.js +6 -4
- package/dist/core/sdd/skill-bundles-curation-schema.d.ts +66 -0
- package/dist/core/sdd/skill-bundles-curation-schema.js +52 -0
- package/dist/core/sdd/skill-evidence.d.ts +19 -0
- package/dist/core/sdd/skill-evidence.js +38 -0
- package/dist/core/sdd/skill-policy-pool.d.ts +46 -0
- package/dist/core/sdd/skill-policy-pool.js +185 -0
- package/dist/core/sdd/state.d.ts +23 -0
- package/dist/core/sdd/state.js +313 -66
- package/dist/core/sdd/store/sdd-stores.js +2 -2
- package/dist/core/sdd/structural-health.d.ts +55 -55
- package/dist/core/sdd/types.d.ts +60 -19
- package/dist/core/sdd/types.js +21 -0
- package/dist/core/sdd/upgrade-to-codesdd.d.ts +45 -0
- package/dist/core/sdd/upgrade-to-codesdd.js +179 -0
- package/dist/core/sdd/views.js +17 -0
- package/dist/core/sdd/workspace-schemas.d.ts +670 -19
- package/dist/core/sdd/workspace-schemas.js +285 -5
- package/dist/core/sdd/write-manifest.js +22 -4
- package/dist/core/shared/skill-generation.d.ts +1 -1
- package/dist/core/shared/skill-generation.js +15 -15
- package/dist/core/shared/tool-detection.d.ts +3 -3
- package/dist/core/shared/tool-detection.js +14 -14
- package/dist/core/specs-apply.js +6 -6
- package/dist/core/templates/index.d.ts +1 -1
- package/dist/core/templates/index.js +1 -1
- package/dist/core/templates/workflows/apply-change.js +14 -14
- package/dist/core/templates/workflows/archive-change.js +32 -32
- package/dist/core/templates/workflows/bulk-archive-change.js +25 -25
- package/dist/core/templates/workflows/continue-change.js +12 -12
- package/dist/core/templates/workflows/explore.js +29 -29
- package/dist/core/templates/workflows/feedback.js +6 -6
- package/dist/core/templates/workflows/ff-change.js +24 -24
- package/dist/core/templates/workflows/new-change.js +20 -20
- package/dist/core/templates/workflows/onboard.js +33 -33
- package/dist/core/templates/workflows/propose.js +23 -23
- package/dist/core/templates/workflows/sdd.js +8 -8
- package/dist/core/templates/workflows/sync-specs.js +19 -19
- package/dist/core/templates/workflows/verify-change.js +17 -17
- package/dist/core/update.d.ts +2 -2
- package/dist/core/update.js +16 -15
- package/dist/core/validation/constants.d.ts +1 -1
- package/dist/core/validation/constants.js +1 -1
- package/dist/core/view.js +11 -11
- package/dist/domains/sdd/index.d.ts +6 -0
- package/dist/domains/sdd/index.js +6 -0
- package/dist/infrastructures/sdd/index.d.ts +7 -0
- package/dist/infrastructures/sdd/index.js +6 -0
- package/dist/presentations/cli/sdd/index.d.ts +3 -0
- package/dist/presentations/cli/sdd/index.js +3 -0
- package/dist/shared/sdd/index.d.ts +3 -0
- package/dist/shared/sdd/index.js +2 -0
- package/dist/telemetry/config.d.ts +2 -1
- package/dist/telemetry/config.js +17 -8
- package/dist/telemetry/index.d.ts +10 -2
- package/dist/telemetry/index.js +40 -7
- package/dist/ui/ascii-patterns.d.ts +2 -2
- package/dist/ui/ascii-patterns.js +2 -2
- package/dist/ui/welcome-screen.js +2 -2
- package/dist/utils/change-metadata.d.ts +4 -4
- package/dist/utils/change-metadata.js +6 -6
- package/dist/utils/change-utils.d.ts +3 -3
- package/dist/utils/change-utils.js +5 -5
- package/dist/utils/file-system.js +1 -1
- package/dist/utils/interactive.js +1 -1
- package/dist/utils/item-discovery.js +4 -4
- package/dist/utils/legacy-spec-compat.d.ts +2 -0
- package/dist/utils/legacy-spec-compat.js +2 -0
- package/dist/utils/shell-detection.d.ts +1 -0
- package/dist/utils/shell-detection.js +16 -0
- package/package.json +34 -21
- package/schemas/sdd/1-spec.schema.json +1 -1
- package/schemas/sdd/2-plan.schema.json +280 -3
- package/schemas/sdd/3-tasks.schema.json +73 -1
- package/schemas/sdd/4-changelog.schema.json +1 -1
- package/schemas/sdd/5-quality.schema.json +701 -5
- package/schemas/sdd/adr.schema.json +148 -0
- package/schemas/sdd/agent-binding-adapter.schema.json +210 -0
- package/schemas/sdd/agent-binding-resolution.schema.json +338 -0
- package/schemas/sdd/agent-runtime-command-plan.schema.json +212 -0
- package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -0
- package/schemas/sdd/backlog-projection-plan.schema.json +180 -0
- package/schemas/sdd/backlog-provider-contract.schema.json +260 -0
- package/schemas/sdd/codesdd-plugin.schema.json +645 -0
- package/schemas/sdd/debate.schema.json +244 -0
- package/schemas/sdd/deepagent-decision-evidence.schema.json +58 -0
- package/schemas/sdd/deepagent-env-contract.schema.json +143 -0
- package/schemas/sdd/deepagent-quality-evidence.schema.json +108 -0
- package/schemas/sdd/deepagent-run-evidence.schema.json +192 -0
- package/schemas/sdd/deepagent-run-plan.schema.json +197 -0
- package/schemas/sdd/deepagent-run-request.schema.json +637 -0
- package/schemas/sdd/deepagent-subagent-evidence.schema.json +110 -0
- package/schemas/sdd/deepagent-tool-call-evidence.schema.json +78 -0
- package/schemas/sdd/discarded.schema.json +127 -0
- package/schemas/sdd/epic.schema.json +147 -0
- package/schemas/sdd/insight.schema.json +136 -0
- package/schemas/sdd/parallel-feat-automation-plan.schema.json +304 -0
- package/schemas/sdd/parallel-feat-automation-request.schema.json +109 -0
- package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
- package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
- package/schemas/sdd/plugin-artifact-manifest.schema.json +259 -0
- package/schemas/sdd/plugin-artifact-map.schema.json +223 -0
- package/schemas/sdd/plugin-compliance-index.schema.json +136 -0
- package/schemas/sdd/plugin-dry-run-plan.schema.json +260 -0
- package/schemas/sdd/plugin-evidence-manifest.schema.json +678 -0
- package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
- package/schemas/sdd/plugin-package-governance.schema.json +74 -0
- package/schemas/sdd/plugin-policy-evaluation.schema.json +92 -0
- package/schemas/sdd/plugin-policy-pack-evaluation.schema.json +94 -0
- package/schemas/sdd/plugin-policy-pack.schema.json +196 -0
- package/schemas/sdd/plugin-registry.schema.json +729 -0
- package/schemas/sdd/plugin-rollback-manifest.schema.json +87 -0
- package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +954 -0
- package/schemas/sdd/plugin-skill-binding-resolution.schema.json +305 -0
- package/schemas/sdd/plugin-skill-binding.schema.json +88 -0
- package/schemas/sdd/plugin-validation-manifest.schema.json +123 -0
- package/schemas/sdd/quality-architecture-schema.schema.json +216 -0
- package/schemas/sdd/quality-evidence-bundle.schema.json +1337 -0
- package/schemas/sdd/quality-run.schema.json +197 -0
- package/schemas/sdd/quality-scenario.schema.json +252 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
- package/schemas/sdd/workspace-catalog.schema.json +13232 -35
- package/schemas/spec-driven/schema.yaml +4 -4
- package/schemas/spec-driven/templates/proposal.md +1 -1
- package/dist/utils/openspec-compat.d.ts +0 -2
- package/dist/utils/openspec-compat.js +0 -2
|
@@ -7,6 +7,78 @@ export const workspaceGateSchema = z.object({
|
|
|
7
7
|
approved_by: z.string().optional(),
|
|
8
8
|
note: z.string().optional(),
|
|
9
9
|
});
|
|
10
|
+
export const workspacePolicyRequirementSchema = z.object({
|
|
11
|
+
skill_id: z.string().min(1),
|
|
12
|
+
policy_pool_ref: z.string().min(1),
|
|
13
|
+
source_contract_ref: z.string().min(1),
|
|
14
|
+
enforcement: z.enum(['blocking', 'advisory']),
|
|
15
|
+
required_rule_refs: z.array(z.string().min(1)).default([]),
|
|
16
|
+
required_evidence: z.array(z.string().min(1)).default([]),
|
|
17
|
+
});
|
|
18
|
+
export const workspacePolicyInjectionSchema = z.object({
|
|
19
|
+
version: z.literal(1),
|
|
20
|
+
generated_from: z.literal('recommended_skills'),
|
|
21
|
+
required_policies: z.array(workspacePolicyRequirementSchema).default([]),
|
|
22
|
+
});
|
|
23
|
+
const workspacePercentSchema = z.number().min(0).max(100);
|
|
24
|
+
export const workspaceValidationGateSchema = z.object({
|
|
25
|
+
name: z.string().min(1),
|
|
26
|
+
command: z.string().min(1),
|
|
27
|
+
expected: z.string().min(1),
|
|
28
|
+
});
|
|
29
|
+
export const workspaceExecutionStepSchema = z.object({
|
|
30
|
+
name: z.string().min(1),
|
|
31
|
+
command: z.string().min(1),
|
|
32
|
+
writes_state: z.boolean().default(false),
|
|
33
|
+
expected_state_writes: z.array(z.string().min(1)).default([]),
|
|
34
|
+
});
|
|
35
|
+
export const workspacePlanExecutionSchema = z
|
|
36
|
+
.object({
|
|
37
|
+
mode: z.enum(['single-feature', 'parallel-wave', 'chained-features']).default('single-feature'),
|
|
38
|
+
state_boundary_ref: z.literal('codesdd-canonical-sdd-state').default('codesdd-canonical-sdd-state'),
|
|
39
|
+
command_sequence: z.array(workspaceExecutionStepSchema).min(1),
|
|
40
|
+
allowed_state_writes: z.array(z.string().min(1)).default([]),
|
|
41
|
+
forbidden_state_writes: z.array(z.string().min(1)).default(['.codesdd/**', 'external-context/**']),
|
|
42
|
+
handoff_artifacts: z.array(z.string().min(1)).default([]),
|
|
43
|
+
})
|
|
44
|
+
.default({
|
|
45
|
+
mode: 'single-feature',
|
|
46
|
+
state_boundary_ref: 'codesdd-canonical-sdd-state',
|
|
47
|
+
command_sequence: [
|
|
48
|
+
{
|
|
49
|
+
name: 'SDD check',
|
|
50
|
+
command: 'codesdd sdd check --render',
|
|
51
|
+
writes_state: false,
|
|
52
|
+
expected_state_writes: [],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
allowed_state_writes: [],
|
|
56
|
+
forbidden_state_writes: ['.codesdd/**', 'external-context/**'],
|
|
57
|
+
handoff_artifacts: [],
|
|
58
|
+
});
|
|
59
|
+
export const workspacePlanGovernanceSchema = z
|
|
60
|
+
.object({
|
|
61
|
+
state_boundary: z.literal('codesdd-canonical-sdd-state').default('codesdd-canonical-sdd-state'),
|
|
62
|
+
planning_artifacts: z.array(z.string().min(1)).min(1),
|
|
63
|
+
decision_refs: z.array(z.string().min(1)).default([]),
|
|
64
|
+
planned_state_writes: z.array(z.string().min(1)).default([]),
|
|
65
|
+
rollback_plan: z.string().min(20),
|
|
66
|
+
validation_gates: z.array(workspaceValidationGateSchema).min(1),
|
|
67
|
+
})
|
|
68
|
+
.default({
|
|
69
|
+
state_boundary: 'codesdd-canonical-sdd-state',
|
|
70
|
+
planning_artifacts: ['.sdd/state/backlog.yaml'],
|
|
71
|
+
decision_refs: [],
|
|
72
|
+
planned_state_writes: [],
|
|
73
|
+
rollback_plan: 'Review and revert only the scoped CodeSDD feature workspace and state changes if validation fails.',
|
|
74
|
+
validation_gates: [
|
|
75
|
+
{
|
|
76
|
+
name: 'SDD check',
|
|
77
|
+
command: 'codesdd sdd check --render',
|
|
78
|
+
expected: 'CodeSDD state and generated views remain valid.',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
});
|
|
10
82
|
export const workspaceSpecSchema = z.object({
|
|
11
83
|
schema_version: z.literal(1),
|
|
12
84
|
feature_id: workspaceFeatureIdSchema,
|
|
@@ -39,6 +111,8 @@ export const workspaceSpecSchema = z.object({
|
|
|
39
111
|
export const workspacePlanSchema = z.object({
|
|
40
112
|
schema_version: z.literal(1),
|
|
41
113
|
feature_id: workspaceFeatureIdSchema,
|
|
114
|
+
governance: workspacePlanGovernanceSchema,
|
|
115
|
+
execution_plan: workspacePlanExecutionSchema,
|
|
42
116
|
architectural_impact: z.object({
|
|
43
117
|
description: z.string(),
|
|
44
118
|
affected_modules: z.array(z.string()),
|
|
@@ -52,8 +126,8 @@ export const workspacePlanSchema = z.object({
|
|
|
52
126
|
change_type: z.string(),
|
|
53
127
|
})),
|
|
54
128
|
quality_strategy: z.object({
|
|
55
|
-
unit_target:
|
|
56
|
-
integration_target:
|
|
129
|
+
unit_target: workspacePercentSchema,
|
|
130
|
+
integration_target: workspacePercentSchema,
|
|
57
131
|
approach: z.string(),
|
|
58
132
|
}),
|
|
59
133
|
suggested_skills: z.array(z.string()),
|
|
@@ -75,6 +149,7 @@ export const workspacePlanSchema = z.object({
|
|
|
75
149
|
architecture_tree_ascii: z.string().optional(),
|
|
76
150
|
})
|
|
77
151
|
.optional(),
|
|
152
|
+
policy_injection: workspacePolicyInjectionSchema.optional(),
|
|
78
153
|
});
|
|
79
154
|
export const workspaceTaskSchema = z.object({
|
|
80
155
|
id: z.string(),
|
|
@@ -93,8 +168,16 @@ export const workspaceTaskSchema = z.object({
|
|
|
93
168
|
export const workspaceTasksSchema = z.object({
|
|
94
169
|
schema_version: z.literal(1),
|
|
95
170
|
feature_id: workspaceFeatureIdSchema,
|
|
171
|
+
policy_injection: workspacePolicyInjectionSchema.optional(),
|
|
96
172
|
tasks: z.array(workspaceTaskSchema).min(5),
|
|
97
173
|
});
|
|
174
|
+
export const promptAssetPhaseSchema = z.enum(['preparation', 'implementation', 'testing', 'documentation', 'finalization']);
|
|
175
|
+
export const promptAssetSchemaV1 = z.object({
|
|
176
|
+
id: z.string().min(1),
|
|
177
|
+
version: z.literal(1),
|
|
178
|
+
phase: promptAssetPhaseSchema,
|
|
179
|
+
outputs: z.array(z.string().min(1)).min(1),
|
|
180
|
+
});
|
|
98
181
|
export const workspaceChangelogSchema = z.object({
|
|
99
182
|
schema_version: z.literal(1),
|
|
100
183
|
feature_id: workspaceFeatureIdSchema,
|
|
@@ -134,13 +217,132 @@ export const workspaceTraceabilitySchema = z.object({
|
|
|
134
217
|
}),
|
|
135
218
|
requirements: z.array(workspaceTraceabilityRequirementSchema).default([]),
|
|
136
219
|
});
|
|
220
|
+
export const workspaceQualityLedgerAxisSchema = z.object({
|
|
221
|
+
raw_score: workspacePercentSchema,
|
|
222
|
+
weighted_score: workspacePercentSchema,
|
|
223
|
+
rationale: z.string().min(1),
|
|
224
|
+
});
|
|
225
|
+
export const workspaceQualityLedgerWeightsSchema = z
|
|
226
|
+
.object({
|
|
227
|
+
coverage: workspacePercentSchema.default(30),
|
|
228
|
+
traceability: workspacePercentSchema.default(20),
|
|
229
|
+
integrity: workspacePercentSchema.default(20),
|
|
230
|
+
naming: workspacePercentSchema.default(10),
|
|
231
|
+
token: workspacePercentSchema.default(20),
|
|
232
|
+
})
|
|
233
|
+
.superRefine((weights, ctx) => {
|
|
234
|
+
const total = weights.coverage + weights.traceability + weights.integrity + weights.naming + weights.token;
|
|
235
|
+
if (total !== 100) {
|
|
236
|
+
ctx.addIssue({
|
|
237
|
+
code: z.ZodIssueCode.custom,
|
|
238
|
+
message: `q95_ledger.weights must total 100, got ${total}.`,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
export const workspaceQualityLedgerSchema = z
|
|
243
|
+
.object({
|
|
244
|
+
threshold: workspacePercentSchema.default(95),
|
|
245
|
+
score: workspacePercentSchema.default(0),
|
|
246
|
+
status: z.enum(['pass', 'fail', 'pending']).default('pending'),
|
|
247
|
+
computed_at: z.string().default(''),
|
|
248
|
+
weights: workspaceQualityLedgerWeightsSchema.default({
|
|
249
|
+
coverage: 30,
|
|
250
|
+
traceability: 20,
|
|
251
|
+
integrity: 20,
|
|
252
|
+
naming: 10,
|
|
253
|
+
token: 20,
|
|
254
|
+
}),
|
|
255
|
+
axes: z
|
|
256
|
+
.object({
|
|
257
|
+
coverage: workspaceQualityLedgerAxisSchema,
|
|
258
|
+
traceability: workspaceQualityLedgerAxisSchema,
|
|
259
|
+
integrity: workspaceQualityLedgerAxisSchema,
|
|
260
|
+
naming: workspaceQualityLedgerAxisSchema,
|
|
261
|
+
token: workspaceQualityLedgerAxisSchema,
|
|
262
|
+
})
|
|
263
|
+
.default({
|
|
264
|
+
coverage: {
|
|
265
|
+
raw_score: 0,
|
|
266
|
+
weighted_score: 0,
|
|
267
|
+
rationale: 'Computed during finalize.'
|
|
268
|
+
},
|
|
269
|
+
traceability: {
|
|
270
|
+
raw_score: 0,
|
|
271
|
+
weighted_score: 0,
|
|
272
|
+
rationale: 'Computed during finalize.'
|
|
273
|
+
},
|
|
274
|
+
integrity: {
|
|
275
|
+
raw_score: 0,
|
|
276
|
+
weighted_score: 0,
|
|
277
|
+
rationale: 'Computed during finalize.'
|
|
278
|
+
},
|
|
279
|
+
naming: {
|
|
280
|
+
raw_score: 0,
|
|
281
|
+
weighted_score: 0,
|
|
282
|
+
rationale: 'Computed during finalize.'
|
|
283
|
+
},
|
|
284
|
+
token: {
|
|
285
|
+
raw_score: 0,
|
|
286
|
+
weighted_score: 0,
|
|
287
|
+
rationale: 'Computed during finalize.'
|
|
288
|
+
},
|
|
289
|
+
}),
|
|
290
|
+
next_best_action: z.string().default('Record missing evidence to raise the lowest weighted axis.'),
|
|
291
|
+
})
|
|
292
|
+
.superRefine((ledger, ctx) => {
|
|
293
|
+
if (ledger.status === 'pass' && ledger.score < ledger.threshold) {
|
|
294
|
+
ctx.addIssue({
|
|
295
|
+
code: z.ZodIssueCode.custom,
|
|
296
|
+
path: ['status'],
|
|
297
|
+
message: 'q95_ledger.status cannot be pass when score is below threshold.',
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
export const workspaceTokenTelemetrySchema = z.object({
|
|
302
|
+
mode: z.enum(['compact', 'standard', 'full']).optional(),
|
|
303
|
+
budget_chars: z.number().int().positive().optional(),
|
|
304
|
+
actual_chars: z.number().int().nonnegative().optional(),
|
|
305
|
+
efficiency_percent: workspacePercentSchema.optional(),
|
|
306
|
+
gate: z.enum(['pass', 'warn', 'fail']).default('pass'),
|
|
307
|
+
evidence_ref: z.string().min(1).optional(),
|
|
308
|
+
notes: z.string().optional(),
|
|
309
|
+
});
|
|
310
|
+
export const workspaceTokenBudgetGatesSchema = z.object({
|
|
311
|
+
max_context_chars: z.number().int().positive().optional(),
|
|
312
|
+
require_numeric_efficiency: z.boolean().default(true),
|
|
313
|
+
fail_below_percent: workspacePercentSchema.default(95),
|
|
314
|
+
telemetry: z.array(workspaceTokenTelemetrySchema).default([]),
|
|
315
|
+
});
|
|
316
|
+
export const workspaceRuntimePerformanceTelemetrySchema = z.object({
|
|
317
|
+
command: z.string().min(1),
|
|
318
|
+
metric: z.enum(['duration_ms', 'p95_ms', 'memory_mb', 'cpu_percent']).default('duration_ms'),
|
|
319
|
+
threshold: z.number().nonnegative().optional(),
|
|
320
|
+
actual: z.number().nonnegative().optional(),
|
|
321
|
+
gate: z.enum(['pass', 'warn', 'fail']).default('pass'),
|
|
322
|
+
evidence_ref: z.string().min(1).optional(),
|
|
323
|
+
notes: z.string().optional(),
|
|
324
|
+
});
|
|
325
|
+
export const workspaceFlakinessTelemetrySchema = z.object({
|
|
326
|
+
command: z.string().min(1),
|
|
327
|
+
attempts: z.number().int().positive().optional(),
|
|
328
|
+
failures: z.number().int().nonnegative().optional(),
|
|
329
|
+
failure_rate_percent: workspacePercentSchema.optional(),
|
|
330
|
+
gate: z.enum(['pass', 'warn', 'fail']).default('pass'),
|
|
331
|
+
evidence_ref: z.string().min(1).optional(),
|
|
332
|
+
notes: z.string().optional(),
|
|
333
|
+
});
|
|
334
|
+
export const workspaceRuntimeQualityGatesSchema = z.object({
|
|
335
|
+
mode: z.enum(['observe', 'enforce']).default('observe'),
|
|
336
|
+
performance: z.array(workspaceRuntimePerformanceTelemetrySchema).default([]),
|
|
337
|
+
flakiness: z.array(workspaceFlakinessTelemetrySchema).default([]),
|
|
338
|
+
});
|
|
137
339
|
export const workspaceQualitySchema = z.object({
|
|
138
340
|
schema_version: z.literal(1),
|
|
139
341
|
feature_id: workspaceFeatureIdSchema,
|
|
140
342
|
coverage_targets: z.object({
|
|
141
|
-
unit:
|
|
142
|
-
integration:
|
|
143
|
-
modules: z.record(z.string(),
|
|
343
|
+
unit: workspacePercentSchema,
|
|
344
|
+
integration: workspacePercentSchema,
|
|
345
|
+
modules: z.record(z.string(), workspacePercentSchema).optional(),
|
|
144
346
|
}),
|
|
145
347
|
validation_strategies: z.array(z.object({
|
|
146
348
|
name: z.string(),
|
|
@@ -156,6 +358,7 @@ export const workspaceQualitySchema = z.object({
|
|
|
156
358
|
skill_evidence: z
|
|
157
359
|
.object({
|
|
158
360
|
required_skill_ids: z.array(z.string()),
|
|
361
|
+
policy_requirements: z.array(workspacePolicyRequirementSchema).default([]),
|
|
159
362
|
evidence: z.array(z.object({
|
|
160
363
|
skill_id: z.string().min(1),
|
|
161
364
|
note: z.string().min(10),
|
|
@@ -165,14 +368,25 @@ export const workspaceQualitySchema = z.object({
|
|
|
165
368
|
})
|
|
166
369
|
.default({
|
|
167
370
|
required_skill_ids: [],
|
|
371
|
+
policy_requirements: [],
|
|
168
372
|
evidence: [],
|
|
169
373
|
verification_rule: 'No skill evidence required for this feature.',
|
|
170
374
|
}),
|
|
375
|
+
policy_injection: workspacePolicyInjectionSchema.optional(),
|
|
171
376
|
acceptance_matrix: z.array(z.object({
|
|
172
377
|
criterion: z.string(),
|
|
173
378
|
status: z.enum(['met', 'not_met', 'na']),
|
|
174
379
|
evidence: z.string(),
|
|
175
380
|
})),
|
|
381
|
+
requirement_validation_evidence_risk_matrix: z
|
|
382
|
+
.array(z.object({
|
|
383
|
+
requirement_ref: z.string().min(1),
|
|
384
|
+
validation_refs: z.array(z.string().min(1)).min(1),
|
|
385
|
+
evidence_refs: z.array(z.string().min(1)).min(1),
|
|
386
|
+
residual_risk: z.string().min(5),
|
|
387
|
+
risk_status: z.enum(['open', 'mitigated', 'accepted']).default('open'),
|
|
388
|
+
}))
|
|
389
|
+
.default([]),
|
|
176
390
|
exceptions: z.array(z.object({
|
|
177
391
|
scope: z.string(),
|
|
178
392
|
reason: z.string(),
|
|
@@ -200,6 +414,57 @@ export const workspaceQualitySchema = z.object({
|
|
|
200
414
|
notes: z.string().optional(),
|
|
201
415
|
})
|
|
202
416
|
.optional(),
|
|
417
|
+
token_budget_gates: workspaceTokenBudgetGatesSchema.default({
|
|
418
|
+
require_numeric_efficiency: true,
|
|
419
|
+
fail_below_percent: 95,
|
|
420
|
+
telemetry: [],
|
|
421
|
+
}),
|
|
422
|
+
runtime_quality_gates: workspaceRuntimeQualityGatesSchema.default({
|
|
423
|
+
mode: 'observe',
|
|
424
|
+
performance: [],
|
|
425
|
+
flakiness: [],
|
|
426
|
+
}),
|
|
427
|
+
q95_ledger: workspaceQualityLedgerSchema.default({
|
|
428
|
+
threshold: 95,
|
|
429
|
+
score: 0,
|
|
430
|
+
status: 'pending',
|
|
431
|
+
computed_at: '',
|
|
432
|
+
weights: {
|
|
433
|
+
coverage: 30,
|
|
434
|
+
traceability: 20,
|
|
435
|
+
integrity: 20,
|
|
436
|
+
naming: 10,
|
|
437
|
+
token: 20,
|
|
438
|
+
},
|
|
439
|
+
axes: {
|
|
440
|
+
coverage: {
|
|
441
|
+
raw_score: 0,
|
|
442
|
+
weighted_score: 0,
|
|
443
|
+
rationale: 'Computed during finalize.'
|
|
444
|
+
},
|
|
445
|
+
traceability: {
|
|
446
|
+
raw_score: 0,
|
|
447
|
+
weighted_score: 0,
|
|
448
|
+
rationale: 'Computed during finalize.'
|
|
449
|
+
},
|
|
450
|
+
integrity: {
|
|
451
|
+
raw_score: 0,
|
|
452
|
+
weighted_score: 0,
|
|
453
|
+
rationale: 'Computed during finalize.'
|
|
454
|
+
},
|
|
455
|
+
naming: {
|
|
456
|
+
raw_score: 0,
|
|
457
|
+
weighted_score: 0,
|
|
458
|
+
rationale: 'Computed during finalize.'
|
|
459
|
+
},
|
|
460
|
+
token: {
|
|
461
|
+
raw_score: 0,
|
|
462
|
+
weighted_score: 0,
|
|
463
|
+
rationale: 'Computed during finalize.'
|
|
464
|
+
},
|
|
465
|
+
},
|
|
466
|
+
next_best_action: 'Record missing evidence to raise the lowest weighted axis.',
|
|
467
|
+
}),
|
|
203
468
|
});
|
|
204
469
|
export const workspaceDocumentSchemas = {
|
|
205
470
|
'1-spec.yaml': workspaceSpecSchema,
|
|
@@ -251,4 +516,19 @@ export function stringifyWorkspaceYamlDocument(fileName, value) {
|
|
|
251
516
|
parseWorkspaceYamlDocument(fileName, serialized);
|
|
252
517
|
return serialized;
|
|
253
518
|
}
|
|
519
|
+
export function parsePromptAssetYamlDocument(content) {
|
|
520
|
+
let parsed;
|
|
521
|
+
try {
|
|
522
|
+
parsed = parseYaml(content);
|
|
523
|
+
}
|
|
524
|
+
catch (error) {
|
|
525
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
526
|
+
throw new WorkspaceYamlError(`Prompt asset YAML parse failed: ${message}`);
|
|
527
|
+
}
|
|
528
|
+
const result = promptAssetSchemaV1.safeParse(parsed);
|
|
529
|
+
if (!result.success) {
|
|
530
|
+
throw new WorkspaceYamlError(`Prompt asset YAML schema validation failed: ${result.error.message}`);
|
|
531
|
+
}
|
|
532
|
+
return result.data;
|
|
533
|
+
}
|
|
254
534
|
//# sourceMappingURL=workspace-schemas.js.map
|
|
@@ -2,7 +2,7 @@ import { promises as fs } from 'node:fs';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { RootResolver } from './root-resolver.js';
|
|
4
4
|
import { loadProjectSddConfig, resolveSddPaths } from './state.js';
|
|
5
|
-
import { parseWorkspaceYamlDocument, workspaceSchemaForFile } from './workspace-schemas.js';
|
|
5
|
+
import { parsePromptAssetYamlDocument, parseWorkspaceYamlDocument, workspaceSchemaForFile } from './workspace-schemas.js';
|
|
6
6
|
export class SddWritePolicyError extends Error {
|
|
7
7
|
constructor(message) {
|
|
8
8
|
super(message);
|
|
@@ -276,10 +276,13 @@ function validateTemplatesPath(operation, policyPath, segments, label) {
|
|
|
276
276
|
return;
|
|
277
277
|
throw policyError(label, operation, policyPath, 'templates root may only be created as a directory');
|
|
278
278
|
}
|
|
279
|
-
if (segments.length === 2 &&
|
|
279
|
+
if (segments.length === 2 && operation.type === 'delete' && segments[1].endsWith('.md')) {
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
|
-
|
|
282
|
+
if (segments.length === 2 && /\.ya?ml$/.test(segments[1]) && operation.type !== 'mkdir') {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
throw policyError(label, operation, policyPath, 'templates accepts YAML files directly under root; Markdown templates may only be deleted during cleanup');
|
|
283
286
|
}
|
|
284
287
|
function validateSkillsPath(operation, policyPath, segments, label) {
|
|
285
288
|
if (segments.length === 1) {
|
|
@@ -315,10 +318,16 @@ function validatePromptsPath(operation, policyPath, segments, label) {
|
|
|
315
318
|
return;
|
|
316
319
|
throw policyError(label, operation, policyPath, 'prompts root may only be created as a directory');
|
|
317
320
|
}
|
|
321
|
+
if (segments.length === 3 && segments[1] === 'assets' && segments[2].endsWith('.yaml') && operation.type !== 'mkdir') {
|
|
322
|
+
if (operation.type === 'write') {
|
|
323
|
+
validatePromptAssetYamlContent(operation.content, label, operation, policyPath);
|
|
324
|
+
}
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
318
327
|
if (segments.length === 2 && segments[1].endsWith('.md') && operation.type !== 'mkdir') {
|
|
319
328
|
return;
|
|
320
329
|
}
|
|
321
|
-
throw policyError(label, operation, policyPath, 'prompts accepts markdown files directly under root');
|
|
330
|
+
throw policyError(label, operation, policyPath, 'prompts accepts markdown files directly under root and YAML assets under prompts/assets/');
|
|
322
331
|
}
|
|
323
332
|
function validateSourcesPath(operation, policyPath, segments, label) {
|
|
324
333
|
if (segments.length === 1) {
|
|
@@ -350,4 +359,13 @@ function validateWorkspaceYamlContent(content, fileName, label, operation, polic
|
|
|
350
359
|
throw policyError(label, operation, policyPath, `workspace YAML schema validation failed: ${message}`);
|
|
351
360
|
}
|
|
352
361
|
}
|
|
362
|
+
function validatePromptAssetYamlContent(content, label, operation, policyPath) {
|
|
363
|
+
try {
|
|
364
|
+
parsePromptAssetYamlDocument(content);
|
|
365
|
+
}
|
|
366
|
+
catch (err) {
|
|
367
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
368
|
+
throw policyError(label, operation, policyPath, `prompt asset YAML schema validation failed: ${message}`);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
353
371
|
//# sourceMappingURL=write-manifest.js.map
|
|
@@ -42,7 +42,7 @@ export declare function getCommandContents(workflowFilter?: readonly string[]):
|
|
|
42
42
|
* Generates skill file content with YAML frontmatter.
|
|
43
43
|
*
|
|
44
44
|
* @param template - The skill template
|
|
45
|
-
* @param generatedByVersion - The
|
|
45
|
+
* @param generatedByVersion - The CodeSDD version to embed in the file
|
|
46
46
|
* @param transformInstructions - Optional callback to transform the instructions content
|
|
47
47
|
*/
|
|
48
48
|
export declare function generateSkillContent(template: SkillTemplate, generatedByVersion: string, transformInstructions?: (instructions: string) => string): string;
|
|
@@ -18,18 +18,18 @@ function ensurePtBrGuardrail(content) {
|
|
|
18
18
|
*/
|
|
19
19
|
export function getSkillTemplates(workflowFilter) {
|
|
20
20
|
const all = [
|
|
21
|
-
{ template: getExploreSkillTemplate(), dirName: '
|
|
22
|
-
{ template: getNewChangeSkillTemplate(), dirName: '
|
|
23
|
-
{ template: getContinueChangeSkillTemplate(), dirName: '
|
|
24
|
-
{ template: getApplyChangeSkillTemplate(), dirName: '
|
|
25
|
-
{ template: getFfChangeSkillTemplate(), dirName: '
|
|
26
|
-
{ template: getSyncSpecsSkillTemplate(), dirName: '
|
|
27
|
-
{ template: getArchiveChangeSkillTemplate(), dirName: '
|
|
28
|
-
{ template: getBulkArchiveChangeSkillTemplate(), dirName: '
|
|
29
|
-
{ template: getVerifyChangeSkillTemplate(), dirName: '
|
|
30
|
-
{ template: getOnboardSkillTemplate(), dirName: '
|
|
31
|
-
{ template: getOpsxProposeSkillTemplate(), dirName: '
|
|
32
|
-
{ template: getSddSkillTemplate(), dirName: '
|
|
21
|
+
{ template: getExploreSkillTemplate(), dirName: 'codesdd-explore', workflowId: 'explore' },
|
|
22
|
+
{ template: getNewChangeSkillTemplate(), dirName: 'codesdd-new-change', workflowId: 'new' },
|
|
23
|
+
{ template: getContinueChangeSkillTemplate(), dirName: 'codesdd-continue-change', workflowId: 'continue' },
|
|
24
|
+
{ template: getApplyChangeSkillTemplate(), dirName: 'codesdd-apply-change', workflowId: 'apply' },
|
|
25
|
+
{ template: getFfChangeSkillTemplate(), dirName: 'codesdd-ff-change', workflowId: 'ff' },
|
|
26
|
+
{ template: getSyncSpecsSkillTemplate(), dirName: 'codesdd-sync-specs', workflowId: 'sync' },
|
|
27
|
+
{ template: getArchiveChangeSkillTemplate(), dirName: 'codesdd-archive-change', workflowId: 'archive' },
|
|
28
|
+
{ template: getBulkArchiveChangeSkillTemplate(), dirName: 'codesdd-bulk-archive-change', workflowId: 'bulk-archive' },
|
|
29
|
+
{ template: getVerifyChangeSkillTemplate(), dirName: 'codesdd-verify-change', workflowId: 'verify' },
|
|
30
|
+
{ template: getOnboardSkillTemplate(), dirName: 'codesdd-onboard', workflowId: 'onboard' },
|
|
31
|
+
{ template: getOpsxProposeSkillTemplate(), dirName: 'codesdd-propose', workflowId: 'propose' },
|
|
32
|
+
{ template: getSddSkillTemplate(), dirName: 'codesdd-sdd', workflowId: 'sdd' },
|
|
33
33
|
];
|
|
34
34
|
if (!workflowFilter)
|
|
35
35
|
return all;
|
|
@@ -81,7 +81,7 @@ export function getCommandContents(workflowFilter) {
|
|
|
81
81
|
* Generates skill file content with YAML frontmatter.
|
|
82
82
|
*
|
|
83
83
|
* @param template - The skill template
|
|
84
|
-
* @param generatedByVersion - The
|
|
84
|
+
* @param generatedByVersion - The CodeSDD version to embed in the file
|
|
85
85
|
* @param transformInstructions - Optional callback to transform the instructions content
|
|
86
86
|
*/
|
|
87
87
|
export function generateSkillContent(template, generatedByVersion, transformInstructions) {
|
|
@@ -93,9 +93,9 @@ export function generateSkillContent(template, generatedByVersion, transformInst
|
|
|
93
93
|
name: ${template.name}
|
|
94
94
|
description: ${template.description}
|
|
95
95
|
license: ${template.license || 'MIT'}
|
|
96
|
-
compatibility: ${template.compatibility || 'Requires
|
|
96
|
+
compatibility: ${template.compatibility || 'Requires codesdd CLI.'}
|
|
97
97
|
metadata:
|
|
98
|
-
author: ${template.metadata?.author || '
|
|
98
|
+
author: ${template.metadata?.author || 'codesdd'}
|
|
99
99
|
version: "${template.metadata?.version || '1.0'}"
|
|
100
100
|
generatedBy: "${generatedByVersion}"
|
|
101
101
|
---
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* Shared utilities for detecting tool configurations and version status.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* Names of skill directories created by
|
|
7
|
+
* Names of skill directories created by codesdd init.
|
|
8
8
|
*/
|
|
9
|
-
export declare const SKILL_NAMES: readonly ["
|
|
9
|
+
export declare const SKILL_NAMES: readonly ["codesdd-explore", "codesdd-new-change", "codesdd-continue-change", "codesdd-apply-change", "codesdd-ff-change", "codesdd-sync-specs", "codesdd-archive-change", "codesdd-bulk-archive-change", "codesdd-verify-change", "codesdd-onboard", "codesdd-propose"];
|
|
10
10
|
export type SkillName = (typeof SKILL_NAMES)[number];
|
|
11
11
|
/**
|
|
12
|
-
* IDs of command templates created by
|
|
12
|
+
* IDs of command templates created by codesdd init.
|
|
13
13
|
*/
|
|
14
14
|
export declare const COMMAND_IDS: readonly ["explore", "new", "continue", "apply", "ff", "sync", "archive", "bulk-archive", "verify", "onboard", "propose"];
|
|
15
15
|
export type CommandId = (typeof COMMAND_IDS)[number];
|
|
@@ -7,23 +7,23 @@ import path from 'path';
|
|
|
7
7
|
import * as fs from 'fs';
|
|
8
8
|
import { AI_TOOLS } from '../config.js';
|
|
9
9
|
/**
|
|
10
|
-
* Names of skill directories created by
|
|
10
|
+
* Names of skill directories created by codesdd init.
|
|
11
11
|
*/
|
|
12
12
|
export const SKILL_NAMES = [
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
13
|
+
'codesdd-explore',
|
|
14
|
+
'codesdd-new-change',
|
|
15
|
+
'codesdd-continue-change',
|
|
16
|
+
'codesdd-apply-change',
|
|
17
|
+
'codesdd-ff-change',
|
|
18
|
+
'codesdd-sync-specs',
|
|
19
|
+
'codesdd-archive-change',
|
|
20
|
+
'codesdd-bulk-archive-change',
|
|
21
|
+
'codesdd-verify-change',
|
|
22
|
+
'codesdd-onboard',
|
|
23
|
+
'codesdd-propose',
|
|
24
24
|
];
|
|
25
25
|
/**
|
|
26
|
-
* IDs of command templates created by
|
|
26
|
+
* IDs of command templates created by codesdd init.
|
|
27
27
|
*/
|
|
28
28
|
export const COMMAND_IDS = [
|
|
29
29
|
'explore',
|
|
@@ -92,7 +92,7 @@ export function extractGeneratedByVersion(skillFilePath) {
|
|
|
92
92
|
// ---
|
|
93
93
|
// ...
|
|
94
94
|
// metadata:
|
|
95
|
-
// author:
|
|
95
|
+
// author: codesdd
|
|
96
96
|
// version: "1.0"
|
|
97
97
|
// generatedBy: "0.23.0"
|
|
98
98
|
// ---
|
package/dist/core/specs-apply.js
CHANGED
|
@@ -9,7 +9,7 @@ import path from 'path';
|
|
|
9
9
|
import chalk from 'chalk';
|
|
10
10
|
import { extractRequirementsSection, parseDeltaSpec, normalizeRequirementName, } from './parsers/requirement-blocks.js';
|
|
11
11
|
import { Validator } from './validation/validator.js';
|
|
12
|
-
import {
|
|
12
|
+
import { resolveLegacySpecLiveSubpath } from './sdd/services/legacy-capability.service.js';
|
|
13
13
|
// -----------------------------------------------------------------------------
|
|
14
14
|
// Public API
|
|
15
15
|
// -----------------------------------------------------------------------------
|
|
@@ -264,7 +264,7 @@ export async function writeUpdatedSpec(update, rebuilt, counts) {
|
|
|
264
264
|
await fs.mkdir(targetDir, { recursive: true });
|
|
265
265
|
await fs.writeFile(update.target, rebuilt);
|
|
266
266
|
const specName = path.basename(path.dirname(update.target));
|
|
267
|
-
console.log(`Applying changes to
|
|
267
|
+
console.log(`Applying changes to legacy-spec/specs/${specName}/spec.md:`);
|
|
268
268
|
if (counts.added)
|
|
269
269
|
console.log(` + ${counts.added} added`);
|
|
270
270
|
if (counts.modified)
|
|
@@ -290,8 +290,8 @@ export function buildSpecSkeleton(specFolderName, changeName) {
|
|
|
290
290
|
* @returns Result of the operation with counts
|
|
291
291
|
*/
|
|
292
292
|
export async function applySpecs(projectRoot, changeName, options = {}) {
|
|
293
|
-
const changeDir =
|
|
294
|
-
const mainSpecsDir =
|
|
293
|
+
const changeDir = resolveLegacySpecLiveSubpath(projectRoot, 'changes', changeName);
|
|
294
|
+
const mainSpecsDir = resolveLegacySpecLiveSubpath(projectRoot, 'specs');
|
|
295
295
|
// Verify change exists
|
|
296
296
|
try {
|
|
297
297
|
const stat = await fs.stat(changeDir);
|
|
@@ -344,7 +344,7 @@ export async function applySpecs(projectRoot, changeName, options = {}) {
|
|
|
344
344
|
await fs.mkdir(targetDir, { recursive: true });
|
|
345
345
|
await fs.writeFile(p.update.target, p.rebuilt);
|
|
346
346
|
if (!options.silent) {
|
|
347
|
-
console.log(`Applying changes to
|
|
347
|
+
console.log(`Applying changes to legacy-spec/specs/${capability}/spec.md:`);
|
|
348
348
|
if (p.counts.added)
|
|
349
349
|
console.log(` + ${p.counts.added} added`);
|
|
350
350
|
if (p.counts.modified)
|
|
@@ -356,7 +356,7 @@ export async function applySpecs(projectRoot, changeName, options = {}) {
|
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
else if (!options.silent) {
|
|
359
|
-
console.log(`Would apply changes to
|
|
359
|
+
console.log(`Would apply changes to legacy-spec/specs/${capability}/spec.md:`);
|
|
360
360
|
if (p.counts.added)
|
|
361
361
|
console.log(` + ${p.counts.added} added`);
|
|
362
362
|
if (p.counts.modified)
|