@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
|
@@ -2,6 +2,12 @@ import { CLI_NAME } from "../../branding.js";
|
|
|
2
2
|
import { allocateEntityId, loadStateSnapshot, nowIso, saveStateTransaction } from "../state.js";
|
|
3
3
|
import { slugify, getRuntime, persistAndRender } from "../legacy-operations.js";
|
|
4
4
|
import { withStateLock } from "../state-lock.js";
|
|
5
|
+
function firstNonEmpty(values) {
|
|
6
|
+
return (values || []).map((value) => value.trim()).find(Boolean) || '';
|
|
7
|
+
}
|
|
8
|
+
function routeLabelFromGap(title, routePath) {
|
|
9
|
+
return title.trim() || routePath;
|
|
10
|
+
}
|
|
5
11
|
export class FrontendGapService {
|
|
6
12
|
stores;
|
|
7
13
|
constructor(stores) {
|
|
@@ -41,17 +47,20 @@ export class FrontendGapService {
|
|
|
41
47
|
for (const routePath of options?.routes || []) {
|
|
42
48
|
const routeId = `route-${slugify(routePath) || 'root'}`;
|
|
43
49
|
const existing = snapshot.frontendMap.routes.find((route) => route.id === routeId);
|
|
50
|
+
const navSurface = firstNonEmpty(options?.menu);
|
|
44
51
|
if (existing) {
|
|
45
52
|
existing.ui_status = existing.ui_status === 'OK' ? 'PARTIAL' : existing.ui_status;
|
|
46
53
|
existing.source_gap_ids = Array.from(new Set([...existing.source_gap_ids, id]));
|
|
54
|
+
existing.label = existing.label || routeLabelFromGap(title, routePath);
|
|
55
|
+
existing.nav_surface = existing.nav_surface || navSurface;
|
|
47
56
|
}
|
|
48
57
|
else {
|
|
49
58
|
snapshot.frontendMap.routes.push({
|
|
50
59
|
id: routeId,
|
|
51
60
|
path: routePath,
|
|
52
61
|
parent_id: '',
|
|
53
|
-
label:
|
|
54
|
-
nav_surface:
|
|
62
|
+
label: routeLabelFromGap(title, routePath),
|
|
63
|
+
nav_surface: navSurface,
|
|
55
64
|
ui_status: 'GAP',
|
|
56
65
|
source_gap_ids: [id],
|
|
57
66
|
implemented_files: [],
|
|
@@ -83,17 +92,20 @@ export class FrontendGapService {
|
|
|
83
92
|
gap.resolved_by_feature = options?.feature || '';
|
|
84
93
|
gap.implemented_files = options?.files || [];
|
|
85
94
|
gap.updated_at = now;
|
|
86
|
-
const routeTargets = new Set([...
|
|
95
|
+
const routeTargets = new Set([...gap.route_targets, ...(options?.routes || [])]);
|
|
96
|
+
const relatedRouteIds = new Set(gap.related_route_ids);
|
|
97
|
+
const navSurface = firstNonEmpty(gap.menu_targets);
|
|
87
98
|
for (const routePath of routeTargets) {
|
|
88
99
|
const routeId = `route-${slugify(routePath) || 'root'}`;
|
|
100
|
+
relatedRouteIds.add(routeId);
|
|
89
101
|
const route = snapshot.frontendMap.routes.find((entry) => entry.id === routeId);
|
|
90
102
|
if (!route) {
|
|
91
103
|
snapshot.frontendMap.routes.push({
|
|
92
104
|
id: routeId,
|
|
93
105
|
path: routePath,
|
|
94
106
|
parent_id: '',
|
|
95
|
-
label:
|
|
96
|
-
nav_surface:
|
|
107
|
+
label: routeLabelFromGap(gap.title, routePath),
|
|
108
|
+
nav_surface: navSurface,
|
|
97
109
|
ui_status: 'OK',
|
|
98
110
|
source_gap_ids: [gap.id],
|
|
99
111
|
implemented_files: options?.files || [],
|
|
@@ -102,9 +114,12 @@ export class FrontendGapService {
|
|
|
102
114
|
continue;
|
|
103
115
|
}
|
|
104
116
|
route.ui_status = 'OK';
|
|
105
|
-
route.
|
|
106
|
-
route.
|
|
117
|
+
route.label = route.label || routeLabelFromGap(gap.title, routePath);
|
|
118
|
+
route.nav_surface = route.nav_surface || navSurface;
|
|
119
|
+
route.implemented_files = Array.from(new Set([...route.implemented_files, ...(options?.files || [])]));
|
|
120
|
+
route.source_gap_ids = Array.from(new Set([...route.source_gap_ids, gap.id]));
|
|
107
121
|
}
|
|
122
|
+
gap.related_route_ids = Array.from(relatedRouteIds);
|
|
108
123
|
await saveStateTransaction(paths, {
|
|
109
124
|
frontendGaps: snapshot.frontendGaps,
|
|
110
125
|
frontendMap: snapshot.frontendMap,
|
|
@@ -10,7 +10,7 @@ export declare class FrontendImpactService {
|
|
|
10
10
|
render?: boolean;
|
|
11
11
|
}): Promise<{
|
|
12
12
|
feature_id: string;
|
|
13
|
-
frontend_impact_status: "
|
|
13
|
+
frontend_impact_status: "none" | "unknown" | "required";
|
|
14
14
|
frontend_impact_reason: string;
|
|
15
15
|
frontend_impact_declared_at: string;
|
|
16
16
|
frontend_surface_tokens: string[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type GovernanceControlPlaneRuntimeMode = 'native' | 'contract';
|
|
2
|
+
export type GovernanceControlPlaneRuntimeDependencyResolver = (packageName: string) => string;
|
|
3
|
+
export interface GovernanceControlPlaneRuntimeAdapterStatus<TRuntime extends string = string> {
|
|
4
|
+
runtime: TRuntime;
|
|
5
|
+
package: string;
|
|
6
|
+
available: boolean;
|
|
7
|
+
mode: GovernanceControlPlaneRuntimeMode;
|
|
8
|
+
reason: string;
|
|
9
|
+
}
|
|
10
|
+
export interface GovernanceControlPlaneRuntimeAdapters {
|
|
11
|
+
ui_write_policy: 'cli-shell-out-only';
|
|
12
|
+
canonical_state: '.sdd/state/*.yaml';
|
|
13
|
+
frontend: GovernanceControlPlaneRuntimeAdapterStatus<'angular-spa'>;
|
|
14
|
+
realtime: GovernanceControlPlaneRuntimeAdapterStatus<'socket.io'>;
|
|
15
|
+
}
|
|
16
|
+
export declare function resolveGovernanceControlPlaneRuntimeAdapters(resolver?: GovernanceControlPlaneRuntimeDependencyResolver): GovernanceControlPlaneRuntimeAdapters;
|
|
17
|
+
//# sourceMappingURL=governance-control-plane-runtime-adapters.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
const FRONTEND_RUNTIME_PACKAGE = '@angular/core';
|
|
3
|
+
const REALTIME_RUNTIME_PACKAGE = 'socket.io';
|
|
4
|
+
export function resolveGovernanceControlPlaneRuntimeAdapters(resolver = defaultRuntimeDependencyResolver) {
|
|
5
|
+
return {
|
|
6
|
+
ui_write_policy: 'cli-shell-out-only',
|
|
7
|
+
canonical_state: '.sdd/state/*.yaml',
|
|
8
|
+
frontend: resolveAdapterStatus('angular-spa', FRONTEND_RUNTIME_PACKAGE, resolver),
|
|
9
|
+
realtime: resolveAdapterStatus('socket.io', REALTIME_RUNTIME_PACKAGE, resolver),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function resolveAdapterStatus(runtime, packageName, resolver) {
|
|
13
|
+
try {
|
|
14
|
+
resolver(packageName);
|
|
15
|
+
return {
|
|
16
|
+
runtime,
|
|
17
|
+
package: packageName,
|
|
18
|
+
available: true,
|
|
19
|
+
mode: 'native',
|
|
20
|
+
reason: `${packageName} resolved; native runtime adapter is available.`,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
const detail = error instanceof Error ? error.message : `Unable to resolve ${packageName}`;
|
|
25
|
+
return {
|
|
26
|
+
runtime,
|
|
27
|
+
package: packageName,
|
|
28
|
+
available: true,
|
|
29
|
+
mode: 'contract',
|
|
30
|
+
reason: `${packageName} unresolved; using internal contract adapter (${detail}).`,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function defaultRuntimeDependencyResolver(packageName) {
|
|
35
|
+
const runtimeRequire = createRequire(import.meta.url);
|
|
36
|
+
return runtimeRequire.resolve(packageName);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=governance-control-plane-runtime-adapters.js.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type SddStateSnapshot } from '../state.js';
|
|
2
|
+
export type ControlPlaneMutationAction = 'frontend-impact' | 'finalize';
|
|
3
|
+
export interface GovernanceControlPlaneManifest {
|
|
4
|
+
protocol: 'codesdd-governance-control-plane/v1';
|
|
5
|
+
architecture: {
|
|
6
|
+
frontend: 'angular-spa';
|
|
7
|
+
api: 'rest';
|
|
8
|
+
realtime: 'socket.io';
|
|
9
|
+
ui_write_policy: 'cli-shell-out-only';
|
|
10
|
+
canonical_state: '.sdd/state/*.yaml';
|
|
11
|
+
};
|
|
12
|
+
rest: {
|
|
13
|
+
read_endpoints: Array<{
|
|
14
|
+
method: 'GET';
|
|
15
|
+
path: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}>;
|
|
18
|
+
write_intent_endpoint: {
|
|
19
|
+
method: 'POST';
|
|
20
|
+
path: '/api/intents/cli-shell-out';
|
|
21
|
+
behavior: 'intent-only-by-default';
|
|
22
|
+
allowed_actions: ControlPlaneMutationAction[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
realtime: {
|
|
26
|
+
transport: 'socket.io';
|
|
27
|
+
available: boolean;
|
|
28
|
+
channel: 'codesdd.state.changed';
|
|
29
|
+
reason: string;
|
|
30
|
+
};
|
|
31
|
+
blockers: string[];
|
|
32
|
+
}
|
|
33
|
+
export interface GovernanceProjection {
|
|
34
|
+
generated_at: string;
|
|
35
|
+
backlog: SddStateSnapshot['backlog'];
|
|
36
|
+
finalize_queue: SddStateSnapshot['finalizeQueue'];
|
|
37
|
+
frontend_decisions: SddStateSnapshot['frontendDecisions'];
|
|
38
|
+
}
|
|
39
|
+
export interface GovernanceMutationIntent {
|
|
40
|
+
action: ControlPlaneMutationAction;
|
|
41
|
+
command: {
|
|
42
|
+
bin: string;
|
|
43
|
+
args: string[];
|
|
44
|
+
cwd: string;
|
|
45
|
+
};
|
|
46
|
+
gate: {
|
|
47
|
+
executes_immediately: false;
|
|
48
|
+
required_flag: '--allow-mutation-execution';
|
|
49
|
+
ui_can_write_state_directly: false;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export declare class GovernanceControlPlaneService {
|
|
53
|
+
manifest(projectRoot: string): Promise<GovernanceControlPlaneManifest>;
|
|
54
|
+
readProjection(projectRoot: string): Promise<GovernanceProjection>;
|
|
55
|
+
readBacklogFeature(projectRoot: string, featureId: string): Promise<Record<string, unknown>>;
|
|
56
|
+
planMutationIntent(projectRoot: string, action: ControlPlaneMutationAction, params: Record<string, string>): GovernanceMutationIntent;
|
|
57
|
+
executeMutationIntent(intent: GovernanceMutationIntent, options?: {
|
|
58
|
+
allowMutationExecution?: boolean;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
executed: boolean;
|
|
61
|
+
stdout: string;
|
|
62
|
+
stderr: string;
|
|
63
|
+
}>;
|
|
64
|
+
private buildActionArgs;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=governance-control-plane.service.d.ts.map
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { promisify } from 'node:util';
|
|
3
|
+
import { execFile } from 'node:child_process';
|
|
4
|
+
import { loadProjectSddConfig, loadStateSnapshot, nowIso, resolveSddPaths, } from '../state.js';
|
|
5
|
+
import { resolveGovernanceControlPlaneRuntimeAdapters } from './governance-control-plane-runtime-adapters.js';
|
|
6
|
+
const execFileAsync = promisify(execFile);
|
|
7
|
+
export class GovernanceControlPlaneService {
|
|
8
|
+
async manifest(projectRoot) {
|
|
9
|
+
const runtimeAdapters = resolveGovernanceControlPlaneRuntimeAdapters();
|
|
10
|
+
const { realtime, frontend } = runtimeAdapters;
|
|
11
|
+
const blockers = [];
|
|
12
|
+
if (!frontend.available) {
|
|
13
|
+
blockers.push(`Angular SPA runtime adapter is unavailable: ${frontend.reason}`);
|
|
14
|
+
}
|
|
15
|
+
if (!realtime.available) {
|
|
16
|
+
blockers.push(`Socket.io realtime runtime adapter is unavailable: ${realtime.reason}`);
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
protocol: 'codesdd-governance-control-plane/v1',
|
|
20
|
+
architecture: {
|
|
21
|
+
frontend: frontend.runtime,
|
|
22
|
+
api: 'rest',
|
|
23
|
+
realtime: realtime.runtime,
|
|
24
|
+
ui_write_policy: runtimeAdapters.ui_write_policy,
|
|
25
|
+
canonical_state: runtimeAdapters.canonical_state,
|
|
26
|
+
},
|
|
27
|
+
rest: {
|
|
28
|
+
read_endpoints: [
|
|
29
|
+
{
|
|
30
|
+
method: 'GET',
|
|
31
|
+
path: '/api/state/projection',
|
|
32
|
+
description: 'Read-only projection generated from canonical CodeSDD state files.',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
method: 'GET',
|
|
36
|
+
path: '/api/state/backlog/:featureId',
|
|
37
|
+
description: 'Read-only backlog detail for one FEAT from canonical state.',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
write_intent_endpoint: {
|
|
41
|
+
method: 'POST',
|
|
42
|
+
path: '/api/intents/cli-shell-out',
|
|
43
|
+
behavior: 'intent-only-by-default',
|
|
44
|
+
allowed_actions: ['frontend-impact', 'finalize'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
realtime: {
|
|
48
|
+
transport: realtime.runtime,
|
|
49
|
+
available: realtime.available,
|
|
50
|
+
channel: 'codesdd.state.changed',
|
|
51
|
+
reason: realtime.reason,
|
|
52
|
+
},
|
|
53
|
+
blockers,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
async readProjection(projectRoot) {
|
|
57
|
+
const config = await loadProjectSddConfig(projectRoot);
|
|
58
|
+
const paths = resolveSddPaths(projectRoot, config);
|
|
59
|
+
const snapshot = await loadStateSnapshot(paths, config);
|
|
60
|
+
return {
|
|
61
|
+
generated_at: nowIso(),
|
|
62
|
+
backlog: snapshot.backlog,
|
|
63
|
+
finalize_queue: snapshot.finalizeQueue,
|
|
64
|
+
frontend_decisions: snapshot.frontendDecisions,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
async readBacklogFeature(projectRoot, featureId) {
|
|
68
|
+
const projection = await this.readProjection(projectRoot);
|
|
69
|
+
const item = projection.backlog.items.find((entry) => entry.id === featureId);
|
|
70
|
+
if (!item) {
|
|
71
|
+
throw new Error(`Feature ${featureId} not found in canonical backlog state.`);
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
generated_at: projection.generated_at,
|
|
75
|
+
feature: item,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
planMutationIntent(projectRoot, action, params) {
|
|
79
|
+
const actionArgs = this.buildActionArgs(action, params);
|
|
80
|
+
return {
|
|
81
|
+
action,
|
|
82
|
+
command: {
|
|
83
|
+
bin: process.execPath,
|
|
84
|
+
args: [path.join(projectRoot, 'bin', 'codesdd.js'), ...actionArgs],
|
|
85
|
+
cwd: projectRoot,
|
|
86
|
+
},
|
|
87
|
+
gate: {
|
|
88
|
+
executes_immediately: false,
|
|
89
|
+
required_flag: '--allow-mutation-execution',
|
|
90
|
+
ui_can_write_state_directly: false,
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
async executeMutationIntent(intent, options) {
|
|
95
|
+
if (!options?.allowMutationExecution) {
|
|
96
|
+
throw new Error('Mutation execution is gated. Pass --allow-mutation-execution to proceed.');
|
|
97
|
+
}
|
|
98
|
+
const { stdout, stderr } = await execFileAsync(intent.command.bin, intent.command.args, {
|
|
99
|
+
cwd: intent.command.cwd,
|
|
100
|
+
});
|
|
101
|
+
return {
|
|
102
|
+
executed: true,
|
|
103
|
+
stdout,
|
|
104
|
+
stderr,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
buildActionArgs(action, params) {
|
|
108
|
+
if (action === 'frontend-impact') {
|
|
109
|
+
const featureId = requiredParam(params, 'featureId');
|
|
110
|
+
const status = requiredParam(params, 'status');
|
|
111
|
+
const args = ['sdd', 'frontend-impact', featureId, '--status', status];
|
|
112
|
+
if (params.reason)
|
|
113
|
+
args.push('--reason', params.reason);
|
|
114
|
+
if (params.routes)
|
|
115
|
+
args.push('--routes', params.routes);
|
|
116
|
+
if (params.surfaces)
|
|
117
|
+
args.push('--surfaces', params.surfaces);
|
|
118
|
+
return args;
|
|
119
|
+
}
|
|
120
|
+
if (action === 'finalize') {
|
|
121
|
+
const featureId = requiredParam(params, 'featureId');
|
|
122
|
+
return ['sdd', 'finalize', '--ref', featureId];
|
|
123
|
+
}
|
|
124
|
+
throw new Error(`Unsupported control-plane action: ${action}`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function requiredParam(params, key) {
|
|
128
|
+
const value = params[key];
|
|
129
|
+
if (!value || !value.trim()) {
|
|
130
|
+
throw new Error(`Missing required intent parameter: ${key}`);
|
|
131
|
+
}
|
|
132
|
+
return value.trim();
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=governance-control-plane.service.js.map
|
|
@@ -202,7 +202,7 @@ export class IngestDepositoService {
|
|
|
202
202
|
}
|
|
203
203
|
else {
|
|
204
204
|
startWarning =
|
|
205
|
-
'Nenhuma FEAT pronta para iniciar automaticamente (dependencias/locks pendentes). Use "
|
|
205
|
+
'Nenhuma FEAT pronta para iniciar automaticamente (dependencias/locks pendentes). Use "codesdd sdd next".';
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
await persistAndRender(paths, config, options?.render);
|
|
@@ -2,23 +2,26 @@ export interface LegacyCapabilityDefinition {
|
|
|
2
2
|
id: string;
|
|
3
3
|
displayName: string;
|
|
4
4
|
liveRootDir: string;
|
|
5
|
+
deprecatedLiveRootSegments?: string[][];
|
|
5
6
|
importedRootSegments: string[];
|
|
6
7
|
importedDepositoSegments: string[];
|
|
7
8
|
deprecatedImportedRootSegments?: string[][];
|
|
8
9
|
}
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
10
|
+
export declare const LEGACY_SPEC_CAPABILITY: LegacyCapabilityDefinition;
|
|
11
|
+
export declare const LEGACY_SPEC_DIR: string;
|
|
12
|
+
export declare const IMPORTED_LEGACY_SPEC_DIR: string;
|
|
12
13
|
export declare function resolveLegacyCapabilityLiveRoot(projectRoot: string, capability?: LegacyCapabilityDefinition): string;
|
|
13
14
|
export declare function resolveLegacyCapabilityLiveSubpath(projectRoot: string, capability: LegacyCapabilityDefinition, ...segments: string[]): string;
|
|
14
15
|
export declare function resolveLegacyCapabilityImportedRoot(projectRoot: string, capability?: LegacyCapabilityDefinition): string;
|
|
15
16
|
export declare function resolveLegacyCapabilityDeprecatedImportedRoots(projectRoot: string, capability?: LegacyCapabilityDefinition): string[];
|
|
17
|
+
export declare function resolveLegacyCapabilityDeprecatedLiveRoots(projectRoot: string, capability?: LegacyCapabilityDefinition): string[];
|
|
16
18
|
export declare function resolveLegacyCapabilityImportedDepositoRoot(depositoDir: string, capability?: LegacyCapabilityDefinition): string;
|
|
17
19
|
export declare function resolveLegacyCapabilityRoot(projectRoot?: string, capability?: LegacyCapabilityDefinition): string;
|
|
18
20
|
export declare function resolveLegacyCapabilitySubpath(projectRoot: string, capability: LegacyCapabilityDefinition, ...segments: string[]): string;
|
|
19
21
|
export declare function displayLegacyCapabilityPath(capability: LegacyCapabilityDefinition, ...segments: string[]): string;
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function
|
|
22
|
+
export declare function resolveLegacySpecRoot(projectRoot?: string): string;
|
|
23
|
+
export declare function resolveLegacySpecLiveRoot(projectRoot?: string): string;
|
|
24
|
+
export declare function resolveLegacySpecSubpath(projectRoot: string, ...segments: string[]): string;
|
|
25
|
+
export declare function resolveLegacySpecLiveSubpath(projectRoot: string, ...segments: string[]): string;
|
|
26
|
+
export declare function displayLegacySpecPath(...segments: string[]): string;
|
|
24
27
|
//# sourceMappingURL=legacy-capability.service.d.ts.map
|
|
@@ -1,31 +1,45 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
export const
|
|
4
|
-
id: '
|
|
5
|
-
displayName: '
|
|
6
|
-
liveRootDir: '
|
|
3
|
+
export const LEGACY_SPEC_CAPABILITY = {
|
|
4
|
+
id: 'legacy-spec',
|
|
5
|
+
displayName: 'Legacy spec corpus',
|
|
6
|
+
liveRootDir: 'legacy-spec',
|
|
7
|
+
deprecatedLiveRootSegments: [['codesdd']],
|
|
7
8
|
importedRootSegments: ['.sdd', 'sources', 'legacy', 'spec-corpus'],
|
|
8
9
|
importedDepositoSegments: ['legacy', 'spec-corpus'],
|
|
9
|
-
deprecatedImportedRootSegments: [
|
|
10
|
+
deprecatedImportedRootSegments: [
|
|
11
|
+
['.sdd', 'sources', 'legado', 'legacy-spec'],
|
|
12
|
+
['.sdd', 'sources', 'legado', 'codesdd'],
|
|
13
|
+
],
|
|
10
14
|
};
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export function resolveLegacyCapabilityLiveRoot(projectRoot, capability =
|
|
14
|
-
|
|
15
|
+
export const LEGACY_SPEC_DIR = LEGACY_SPEC_CAPABILITY.liveRootDir;
|
|
16
|
+
export const IMPORTED_LEGACY_SPEC_DIR = path.join(...LEGACY_SPEC_CAPABILITY.importedRootSegments);
|
|
17
|
+
export function resolveLegacyCapabilityLiveRoot(projectRoot, capability = LEGACY_SPEC_CAPABILITY) {
|
|
18
|
+
const canonicalRoot = path.join(projectRoot, capability.liveRootDir);
|
|
19
|
+
if (existsSync(canonicalRoot))
|
|
20
|
+
return canonicalRoot;
|
|
21
|
+
for (const deprecatedRoot of resolveLegacyCapabilityDeprecatedLiveRoots(projectRoot, capability)) {
|
|
22
|
+
if (existsSync(deprecatedRoot))
|
|
23
|
+
return deprecatedRoot;
|
|
24
|
+
}
|
|
25
|
+
return canonicalRoot;
|
|
15
26
|
}
|
|
16
27
|
export function resolveLegacyCapabilityLiveSubpath(projectRoot, capability, ...segments) {
|
|
17
28
|
return path.join(resolveLegacyCapabilityLiveRoot(projectRoot, capability), ...segments);
|
|
18
29
|
}
|
|
19
|
-
export function resolveLegacyCapabilityImportedRoot(projectRoot, capability =
|
|
30
|
+
export function resolveLegacyCapabilityImportedRoot(projectRoot, capability = LEGACY_SPEC_CAPABILITY) {
|
|
20
31
|
return path.join(projectRoot, ...capability.importedRootSegments);
|
|
21
32
|
}
|
|
22
|
-
export function resolveLegacyCapabilityDeprecatedImportedRoots(projectRoot, capability =
|
|
33
|
+
export function resolveLegacyCapabilityDeprecatedImportedRoots(projectRoot, capability = LEGACY_SPEC_CAPABILITY) {
|
|
23
34
|
return (capability.deprecatedImportedRootSegments || []).map((segments) => path.join(projectRoot, ...segments));
|
|
24
35
|
}
|
|
25
|
-
export function
|
|
36
|
+
export function resolveLegacyCapabilityDeprecatedLiveRoots(projectRoot, capability = LEGACY_SPEC_CAPABILITY) {
|
|
37
|
+
return (capability.deprecatedLiveRootSegments || []).map((segments) => path.join(projectRoot, ...segments));
|
|
38
|
+
}
|
|
39
|
+
export function resolveLegacyCapabilityImportedDepositoRoot(depositoDir, capability = LEGACY_SPEC_CAPABILITY) {
|
|
26
40
|
return path.join(depositoDir, ...capability.importedDepositoSegments);
|
|
27
41
|
}
|
|
28
|
-
export function resolveLegacyCapabilityRoot(projectRoot = process.cwd(), capability =
|
|
42
|
+
export function resolveLegacyCapabilityRoot(projectRoot = process.cwd(), capability = LEGACY_SPEC_CAPABILITY) {
|
|
29
43
|
const liveRoot = resolveLegacyCapabilityLiveRoot(projectRoot, capability);
|
|
30
44
|
if (existsSync(liveRoot))
|
|
31
45
|
return liveRoot;
|
|
@@ -44,16 +58,19 @@ export function resolveLegacyCapabilitySubpath(projectRoot, capability, ...segme
|
|
|
44
58
|
export function displayLegacyCapabilityPath(capability, ...segments) {
|
|
45
59
|
return path.join(capability.liveRootDir, ...segments);
|
|
46
60
|
}
|
|
47
|
-
export function
|
|
48
|
-
return resolveLegacyCapabilityRoot(projectRoot,
|
|
61
|
+
export function resolveLegacySpecRoot(projectRoot = process.cwd()) {
|
|
62
|
+
return resolveLegacyCapabilityRoot(projectRoot, LEGACY_SPEC_CAPABILITY);
|
|
63
|
+
}
|
|
64
|
+
export function resolveLegacySpecLiveRoot(projectRoot = process.cwd()) {
|
|
65
|
+
return resolveLegacyCapabilityLiveRoot(projectRoot, LEGACY_SPEC_CAPABILITY);
|
|
49
66
|
}
|
|
50
|
-
export function
|
|
51
|
-
return resolveLegacyCapabilitySubpath(projectRoot,
|
|
67
|
+
export function resolveLegacySpecSubpath(projectRoot, ...segments) {
|
|
68
|
+
return resolveLegacyCapabilitySubpath(projectRoot, LEGACY_SPEC_CAPABILITY, ...segments);
|
|
52
69
|
}
|
|
53
|
-
export function
|
|
54
|
-
return resolveLegacyCapabilityLiveSubpath(projectRoot,
|
|
70
|
+
export function resolveLegacySpecLiveSubpath(projectRoot, ...segments) {
|
|
71
|
+
return resolveLegacyCapabilityLiveSubpath(projectRoot, LEGACY_SPEC_CAPABILITY, ...segments);
|
|
55
72
|
}
|
|
56
|
-
export function
|
|
57
|
-
return displayLegacyCapabilityPath(
|
|
73
|
+
export function displayLegacySpecPath(...segments) {
|
|
74
|
+
return displayLegacyCapabilityPath(LEGACY_SPEC_CAPABILITY, ...segments);
|
|
58
75
|
}
|
|
59
76
|
//# sourceMappingURL=legacy-capability.service.js.map
|
|
@@ -1,11 +1,76 @@
|
|
|
1
1
|
import type { SddStores } from '../store/sdd-stores.js';
|
|
2
|
-
export type McpProviderId = 'codex' | 'claude-code' | 'kimmy-code' | 'kilo-code' | 'open-code' | 'generic';
|
|
3
|
-
export type
|
|
2
|
+
export type McpProviderId = 'codex' | 'claude-code' | 'deepagents' | 'kimmy-code' | 'kilo-code' | 'open-code' | 'generic';
|
|
3
|
+
export type CodeSddMcpToolName = 'codesdd.next' | 'codesdd.context' | 'codesdd.query' | 'codesdd.read' | 'codesdd.start' | 'codesdd.plugin.inspect' | 'codesdd.plugin.plan' | 'codesdd.plugin.apply_sandbox' | 'codesdd.quality.evidence' | 'codesdd.adr' | 'codesdd.check' | 'codesdd.diagnose' | 'codesdd.finalize_intent' | 'codesdd.frontend_impact' | 'codesdd.skill_prompt';
|
|
4
|
+
export type McpCompatibilityAliasName = never;
|
|
5
|
+
export type McpToolName = CodeSddMcpToolName | McpCompatibilityAliasName;
|
|
6
|
+
export type McpRuntimeToolOperation = 'next' | 'context' | 'query' | 'read' | 'start' | 'plugin-inspect' | 'plugin-plan' | 'plugin-apply-sandbox' | 'quality-evidence' | 'adr' | 'check' | 'diagnose' | 'finalize-intent' | 'frontend-impact' | 'skill-prompt';
|
|
7
|
+
export type McpRuntimeStateAccess = 'read' | 'read-write';
|
|
8
|
+
export type McpRuntimePolicyGate = 'read-only' | 'intent-only';
|
|
9
|
+
export type McpRuntimeRiskTier = 'low' | 'medium' | 'high' | 'critical';
|
|
10
|
+
export type McpRuntimeServiceName = 'NextService' | 'ContextService' | 'StructuralQueryService' | 'WorkspaceReadService' | 'StartService' | 'PluginCliService' | 'QualityEvidenceService' | 'AdrIndexService' | 'SddCheckCommand' | 'SddDiagnoseCommand' | 'GovernanceControlPlaneService' | 'SkillsInvokeService';
|
|
4
11
|
type JsonSchema = Record<string, unknown>;
|
|
12
|
+
export type PlannedMcpToolName = 'codesdd.agent.run' | 'codesdd.agent.plan' | 'codesdd.agent.evidence' | 'codesdd.agent.status';
|
|
13
|
+
export interface McpRuntimeStateBoundary {
|
|
14
|
+
id: 'codesdd-canonical-sdd-state';
|
|
15
|
+
canonical_state_root: '.sdd/state';
|
|
16
|
+
canonical_state_glob: '.sdd/state/*.yaml';
|
|
17
|
+
canonical_workspace_roots: ReadonlyArray<'.sdd/planned' | '.sdd/active' | '.sdd/archived'>;
|
|
18
|
+
adapter_boundary: 'SddStores';
|
|
19
|
+
runtime_persistence: 'delegated-to-codesdd-services';
|
|
20
|
+
hidden_state_allowed: false;
|
|
21
|
+
external_state_allowed: false;
|
|
22
|
+
}
|
|
23
|
+
export interface McpRuntimeToolRegistryEntry {
|
|
24
|
+
id: `runtime-tool:${CodeSddMcpToolName}`;
|
|
25
|
+
canonical_name: CodeSddMcpToolName;
|
|
26
|
+
operation: McpRuntimeToolOperation;
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
|
+
input_schema: JsonSchema;
|
|
30
|
+
output_schema: JsonSchema;
|
|
31
|
+
compatibility_aliases: ReadonlyArray<McpCompatibilityAliasName>;
|
|
32
|
+
governance: {
|
|
33
|
+
gate: McpRuntimePolicyGate;
|
|
34
|
+
risk_tier: McpRuntimeRiskTier;
|
|
35
|
+
evidence_behavior: string;
|
|
36
|
+
hitl_rule: string;
|
|
37
|
+
};
|
|
38
|
+
implementation: {
|
|
39
|
+
service: McpRuntimeServiceName;
|
|
40
|
+
state_access: McpRuntimeStateAccess;
|
|
41
|
+
reads: ReadonlyArray<string>;
|
|
42
|
+
writes: ReadonlyArray<string>;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface McpRuntimeRegistryManifest {
|
|
46
|
+
name: 'codesdd-runtime-tool-registry';
|
|
47
|
+
version: 1;
|
|
48
|
+
canonical_namespace: 'codesdd';
|
|
49
|
+
compatibility_namespaces: ReadonlyArray<string>;
|
|
50
|
+
state_boundary_ref: McpRuntimeStateBoundary['id'];
|
|
51
|
+
entries: Array<{
|
|
52
|
+
id: McpRuntimeToolRegistryEntry['id'];
|
|
53
|
+
canonical_name: CodeSddMcpToolName;
|
|
54
|
+
operation: McpRuntimeToolOperation;
|
|
55
|
+
governance: {
|
|
56
|
+
gate: McpRuntimePolicyGate;
|
|
57
|
+
risk_tier: McpRuntimeRiskTier;
|
|
58
|
+
evidence_behavior: string;
|
|
59
|
+
hitl_rule: string;
|
|
60
|
+
};
|
|
61
|
+
compatibility_aliases: McpCompatibilityAliasName[];
|
|
62
|
+
implementation: {
|
|
63
|
+
service: McpRuntimeServiceName;
|
|
64
|
+
state_access: McpRuntimeStateAccess;
|
|
65
|
+
reads: string[];
|
|
66
|
+
writes: string[];
|
|
67
|
+
};
|
|
68
|
+
}>;
|
|
69
|
+
}
|
|
5
70
|
export interface McpRuntimeManifest {
|
|
6
|
-
protocol: '
|
|
71
|
+
protocol: 'codesdd-mcp-bridge/v1';
|
|
7
72
|
server: {
|
|
8
|
-
name: '
|
|
73
|
+
name: 'codesdd';
|
|
9
74
|
version: 1;
|
|
10
75
|
};
|
|
11
76
|
provider: {
|
|
@@ -15,28 +80,78 @@ export interface McpRuntimeManifest {
|
|
|
15
80
|
session_contract: string;
|
|
16
81
|
};
|
|
17
82
|
tools: Array<{
|
|
18
|
-
|
|
83
|
+
registry_entry_ref: McpRuntimeToolRegistryEntry['id'];
|
|
84
|
+
name: CodeSddMcpToolName;
|
|
19
85
|
title: string;
|
|
20
86
|
description: string;
|
|
21
87
|
input_schema: JsonSchema;
|
|
88
|
+
output_schema: JsonSchema;
|
|
89
|
+
governance: {
|
|
90
|
+
gate: McpRuntimePolicyGate;
|
|
91
|
+
risk_tier: McpRuntimeRiskTier;
|
|
92
|
+
evidence_behavior: string;
|
|
93
|
+
hitl_rule: string;
|
|
94
|
+
};
|
|
95
|
+
compatibility_aliases: McpCompatibilityAliasName[];
|
|
22
96
|
}>;
|
|
97
|
+
planned_tools: Array<{
|
|
98
|
+
name: PlannedMcpToolName;
|
|
99
|
+
status: 'planned';
|
|
100
|
+
title: string;
|
|
101
|
+
description: string;
|
|
102
|
+
}>;
|
|
103
|
+
registry: McpRuntimeRegistryManifest;
|
|
104
|
+
state_boundary: McpRuntimeStateBoundary;
|
|
23
105
|
}
|
|
24
106
|
export interface McpRuntimeInvocation {
|
|
25
|
-
protocol: '
|
|
107
|
+
protocol: 'codesdd-mcp-bridge/v1';
|
|
26
108
|
provider: McpProviderId;
|
|
27
|
-
tool:
|
|
109
|
+
tool: CodeSddMcpToolName;
|
|
110
|
+
requested_tool: McpToolName;
|
|
111
|
+
compatibility_alias_used: boolean;
|
|
112
|
+
registry_resolution: {
|
|
113
|
+
registry: McpRuntimeRegistryManifest['name'];
|
|
114
|
+
registry_entry_ref: McpRuntimeToolRegistryEntry['id'];
|
|
115
|
+
canonical_tool: CodeSddMcpToolName;
|
|
116
|
+
requested_tool: McpToolName;
|
|
117
|
+
compatibility_alias_used: boolean;
|
|
118
|
+
state_access: McpRuntimeStateAccess;
|
|
119
|
+
};
|
|
120
|
+
state_boundary: McpRuntimeStateBoundary;
|
|
28
121
|
invoked_at: string;
|
|
29
122
|
result: unknown;
|
|
30
123
|
}
|
|
124
|
+
export declare const MCP_RUNTIME_STATE_BOUNDARY: {
|
|
125
|
+
readonly id: "codesdd-canonical-sdd-state";
|
|
126
|
+
readonly canonical_state_root: ".sdd/state";
|
|
127
|
+
readonly canonical_state_glob: ".sdd/state/*.yaml";
|
|
128
|
+
readonly canonical_workspace_roots: readonly [".sdd/planned", ".sdd/active", ".sdd/archived"];
|
|
129
|
+
readonly adapter_boundary: "SddStores";
|
|
130
|
+
readonly runtime_persistence: "delegated-to-codesdd-services";
|
|
131
|
+
readonly hidden_state_allowed: false;
|
|
132
|
+
readonly external_state_allowed: false;
|
|
133
|
+
};
|
|
134
|
+
export declare const MCP_RUNTIME_TOOL_REGISTRY: ReadonlyArray<McpRuntimeToolRegistryEntry>;
|
|
135
|
+
export declare const MCP_RUNTIME_SUPPORTED_TOOLS: ReadonlyArray<McpToolName>;
|
|
31
136
|
export declare class McpRuntimeService {
|
|
32
137
|
private readonly stores;
|
|
33
138
|
constructor(stores: SddStores);
|
|
34
139
|
manifest(provider?: string): McpRuntimeManifest;
|
|
35
140
|
invoke(projectRoot: string, input: {
|
|
36
141
|
provider?: string;
|
|
37
|
-
tool:
|
|
142
|
+
tool: string;
|
|
38
143
|
args?: Record<string, unknown>;
|
|
39
144
|
}): Promise<McpRuntimeInvocation>;
|
|
145
|
+
private queryState;
|
|
146
|
+
private readWorkspaceDocs;
|
|
147
|
+
private planStartIntent;
|
|
148
|
+
private inspectPlugin;
|
|
149
|
+
private planPlugin;
|
|
150
|
+
private readQualityEvidence;
|
|
151
|
+
private readAdrIndex;
|
|
152
|
+
private planFinalizeIntent;
|
|
153
|
+
private planFrontendImpactIntent;
|
|
154
|
+
private buildSkillPrompt;
|
|
40
155
|
}
|
|
41
156
|
export {};
|
|
42
157
|
//# sourceMappingURL=mcp-runtime.service.d.ts.map
|