@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
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const deepagentEnvContractSchema: z.ZodObject<{
|
|
3
|
+
schema_version: z.ZodLiteral<1>;
|
|
4
|
+
contract: z.ZodLiteral<"deepagent-env-contract/v1">;
|
|
5
|
+
runtime_mode: z.ZodDefault<z.ZodEnum<{
|
|
6
|
+
disabled: "disabled";
|
|
7
|
+
fake: "fake";
|
|
8
|
+
"deepagents-js": "deepagents-js";
|
|
9
|
+
}>>;
|
|
10
|
+
model_ref: z.ZodOptional<z.ZodString>;
|
|
11
|
+
planner_model_ref: z.ZodOptional<z.ZodString>;
|
|
12
|
+
reviewer_model_ref: z.ZodOptional<z.ZodString>;
|
|
13
|
+
coder_model_ref: z.ZodOptional<z.ZodString>;
|
|
14
|
+
execution_limits: z.ZodDefault<z.ZodObject<{
|
|
15
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
max_subagents: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
max_parallel: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
provider_profile: z.ZodOptional<z.ZodString>;
|
|
20
|
+
env_allowlist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
21
|
+
secret_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
22
|
+
credential_env_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
23
|
+
endpoint_env_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
24
|
+
sandbox_passthrough_rules: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
25
|
+
network_mode: z.ZodDefault<z.ZodEnum<{
|
|
26
|
+
disabled: "disabled";
|
|
27
|
+
enabled: "enabled";
|
|
28
|
+
restricted: "restricted";
|
|
29
|
+
}>>;
|
|
30
|
+
blocked_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
31
|
+
masked_config_fingerprint: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export declare const deepagentRunRequestSchema: z.ZodObject<{
|
|
34
|
+
schema_version: z.ZodLiteral<1>;
|
|
35
|
+
contract: z.ZodLiteral<"deepagent-run-request/v1">;
|
|
36
|
+
provider: z.ZodLiteral<"deepagents">;
|
|
37
|
+
feature_ref: z.ZodString;
|
|
38
|
+
mode: z.ZodEnum<{
|
|
39
|
+
validate: "validate";
|
|
40
|
+
"read-only": "read-only";
|
|
41
|
+
plan: "plan";
|
|
42
|
+
"apply-sandbox": "apply-sandbox";
|
|
43
|
+
"apply-approved": "apply-approved";
|
|
44
|
+
}>;
|
|
45
|
+
objective: z.ZodString;
|
|
46
|
+
allowed_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
47
|
+
write_scope: z.ZodObject<{
|
|
48
|
+
allow_project_writes: z.ZodDefault<z.ZodBoolean>;
|
|
49
|
+
allowed_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
network_policy: z.ZodObject<{
|
|
52
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
53
|
+
disabled: "disabled";
|
|
54
|
+
enabled: "enabled";
|
|
55
|
+
restricted: "restricted";
|
|
56
|
+
}>>;
|
|
57
|
+
allowlist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
env_contract: z.ZodObject<{
|
|
60
|
+
schema_version: z.ZodLiteral<1>;
|
|
61
|
+
contract: z.ZodLiteral<"deepagent-env-contract/v1">;
|
|
62
|
+
runtime_mode: z.ZodDefault<z.ZodEnum<{
|
|
63
|
+
disabled: "disabled";
|
|
64
|
+
fake: "fake";
|
|
65
|
+
"deepagents-js": "deepagents-js";
|
|
66
|
+
}>>;
|
|
67
|
+
model_ref: z.ZodOptional<z.ZodString>;
|
|
68
|
+
planner_model_ref: z.ZodOptional<z.ZodString>;
|
|
69
|
+
reviewer_model_ref: z.ZodOptional<z.ZodString>;
|
|
70
|
+
coder_model_ref: z.ZodOptional<z.ZodString>;
|
|
71
|
+
execution_limits: z.ZodDefault<z.ZodObject<{
|
|
72
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
max_subagents: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
max_parallel: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
provider_profile: z.ZodOptional<z.ZodString>;
|
|
77
|
+
env_allowlist: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
78
|
+
secret_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
79
|
+
credential_env_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
80
|
+
endpoint_env_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
81
|
+
sandbox_passthrough_rules: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
82
|
+
network_mode: z.ZodDefault<z.ZodEnum<{
|
|
83
|
+
disabled: "disabled";
|
|
84
|
+
enabled: "enabled";
|
|
85
|
+
restricted: "restricted";
|
|
86
|
+
}>>;
|
|
87
|
+
blocked_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
88
|
+
masked_config_fingerprint: z.ZodString;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
skill_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
91
|
+
plugin_envelopes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
92
|
+
plugin_id: z.ZodString;
|
|
93
|
+
capability: z.ZodString;
|
|
94
|
+
version: z.ZodString;
|
|
95
|
+
}, z.core.$strip>>>;
|
|
96
|
+
change_safety: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
explicit_modification_intent: z.ZodObject<{
|
|
98
|
+
operation: z.ZodEnum<{
|
|
99
|
+
replace: "replace";
|
|
100
|
+
add: "add";
|
|
101
|
+
modify: "modify";
|
|
102
|
+
remove: "remove";
|
|
103
|
+
refactor: "refactor";
|
|
104
|
+
optimize: "optimize";
|
|
105
|
+
}>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
context_lock: z.ZodDefault<z.ZodObject<{
|
|
108
|
+
allowed_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
109
|
+
forbidden_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
110
|
+
protected_core: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
change_budget: z.ZodDefault<z.ZodObject<{
|
|
113
|
+
max_files_changed: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
max_new_files: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
max_deleted_files: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
governed_override: z.ZodOptional<z.ZodObject<{
|
|
118
|
+
feature_id: z.ZodString;
|
|
119
|
+
intent: z.ZodEnum<{
|
|
120
|
+
replace: "replace";
|
|
121
|
+
add: "add";
|
|
122
|
+
modify: "modify";
|
|
123
|
+
remove: "remove";
|
|
124
|
+
refactor: "refactor";
|
|
125
|
+
optimize: "optimize";
|
|
126
|
+
}>;
|
|
127
|
+
rationale: z.ZodString;
|
|
128
|
+
write_scope: z.ZodArray<z.ZodString>;
|
|
129
|
+
expected_deletions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
130
|
+
rollback_plan: z.ZodString;
|
|
131
|
+
compensating_control: z.ZodString;
|
|
132
|
+
approver: z.ZodString;
|
|
133
|
+
expires_at: z.ZodString;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
}, z.core.$strip>>;
|
|
136
|
+
planned_file_changes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
137
|
+
path: z.ZodString;
|
|
138
|
+
operation: z.ZodEnum<{
|
|
139
|
+
replace: "replace";
|
|
140
|
+
rename: "rename";
|
|
141
|
+
create: "create";
|
|
142
|
+
delete: "delete";
|
|
143
|
+
modify: "modify";
|
|
144
|
+
}>;
|
|
145
|
+
previous_path: z.ZodOptional<z.ZodString>;
|
|
146
|
+
}, z.core.$strip>>>;
|
|
147
|
+
capability_inventory_before: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
148
|
+
kind: z.ZodEnum<{
|
|
149
|
+
event: "event";
|
|
150
|
+
schema: "schema";
|
|
151
|
+
route: "route";
|
|
152
|
+
page: "page";
|
|
153
|
+
cli_command: "cli_command";
|
|
154
|
+
public_contract: "public_contract";
|
|
155
|
+
core_flow: "core_flow";
|
|
156
|
+
governance_state: "governance_state";
|
|
157
|
+
}>;
|
|
158
|
+
id: z.ZodString;
|
|
159
|
+
path: z.ZodOptional<z.ZodString>;
|
|
160
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
161
|
+
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
162
|
+
}, z.core.$strip>>>;
|
|
163
|
+
capability_inventory_after: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
164
|
+
kind: z.ZodEnum<{
|
|
165
|
+
event: "event";
|
|
166
|
+
schema: "schema";
|
|
167
|
+
route: "route";
|
|
168
|
+
page: "page";
|
|
169
|
+
cli_command: "cli_command";
|
|
170
|
+
public_contract: "public_contract";
|
|
171
|
+
core_flow: "core_flow";
|
|
172
|
+
governance_state: "governance_state";
|
|
173
|
+
}>;
|
|
174
|
+
id: z.ZodString;
|
|
175
|
+
path: z.ZodOptional<z.ZodString>;
|
|
176
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
177
|
+
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
178
|
+
}, z.core.$strip>>>;
|
|
179
|
+
capability_inventory_required: z.ZodDefault<z.ZodBoolean>;
|
|
180
|
+
capability_required_kinds: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
181
|
+
event: "event";
|
|
182
|
+
schema: "schema";
|
|
183
|
+
route: "route";
|
|
184
|
+
page: "page";
|
|
185
|
+
cli_command: "cli_command";
|
|
186
|
+
public_contract: "public_contract";
|
|
187
|
+
core_flow: "core_flow";
|
|
188
|
+
governance_state: "governance_state";
|
|
189
|
+
}>>>;
|
|
190
|
+
reversa_scope: z.ZodObject<{
|
|
191
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
192
|
+
objective: z.ZodOptional<z.ZodString>;
|
|
193
|
+
targets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
expected_evidence: z.ZodArray<z.ZodString>;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
export declare const deepagentRunPlanSchema: z.ZodObject<{
|
|
198
|
+
schema_version: z.ZodLiteral<1>;
|
|
199
|
+
contract: z.ZodLiteral<"deepagent-run-plan/v1">;
|
|
200
|
+
run_id: z.ZodString;
|
|
201
|
+
feature_ref: z.ZodString;
|
|
202
|
+
mode: z.ZodEnum<{
|
|
203
|
+
validate: "validate";
|
|
204
|
+
"read-only": "read-only";
|
|
205
|
+
plan: "plan";
|
|
206
|
+
"apply-sandbox": "apply-sandbox";
|
|
207
|
+
"apply-approved": "apply-approved";
|
|
208
|
+
}>;
|
|
209
|
+
tactical_steps: z.ZodArray<z.ZodObject<{
|
|
210
|
+
id: z.ZodString;
|
|
211
|
+
title: z.ZodString;
|
|
212
|
+
objective: z.ZodString;
|
|
213
|
+
subagent: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>>;
|
|
215
|
+
subagent_routing: z.ZodArray<z.ZodObject<{
|
|
216
|
+
subagent: z.ZodString;
|
|
217
|
+
purpose: z.ZodString;
|
|
218
|
+
task_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
219
|
+
}, z.core.$strip>>;
|
|
220
|
+
required_approvals: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
221
|
+
expected_tool_calls: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
222
|
+
write_manifest_preview: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
223
|
+
validation_matrix: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
224
|
+
requirement: z.ZodString;
|
|
225
|
+
validation: z.ZodString;
|
|
226
|
+
evidence_kind: z.ZodString;
|
|
227
|
+
}, z.core.$strip>>>;
|
|
228
|
+
residual_risks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
229
|
+
id: z.ZodString;
|
|
230
|
+
severity: z.ZodEnum<{
|
|
231
|
+
low: "low";
|
|
232
|
+
medium: "medium";
|
|
233
|
+
high: "high";
|
|
234
|
+
critical: "critical";
|
|
235
|
+
}>;
|
|
236
|
+
summary: z.ZodString;
|
|
237
|
+
mitigation: z.ZodOptional<z.ZodString>;
|
|
238
|
+
}, z.core.$strip>>>;
|
|
239
|
+
}, z.core.$strip>;
|
|
240
|
+
export declare const deepagentToolCallEvidenceSchema: z.ZodObject<{
|
|
241
|
+
schema_version: z.ZodLiteral<1>;
|
|
242
|
+
contract: z.ZodLiteral<"deepagent-tool-call-evidence/v1">;
|
|
243
|
+
tool_name: z.ZodString;
|
|
244
|
+
input_hash: z.ZodString;
|
|
245
|
+
output_hash: z.ZodString;
|
|
246
|
+
state_access_class: z.ZodEnum<{
|
|
247
|
+
read: "read";
|
|
248
|
+
write: "write";
|
|
249
|
+
execute: "execute";
|
|
250
|
+
network: "network";
|
|
251
|
+
}>;
|
|
252
|
+
policy_gate: z.ZodString;
|
|
253
|
+
hitl_decision: z.ZodDefault<z.ZodEnum<{
|
|
254
|
+
none: "none";
|
|
255
|
+
edit: "edit";
|
|
256
|
+
approve: "approve";
|
|
257
|
+
reject: "reject";
|
|
258
|
+
respond: "respond";
|
|
259
|
+
}>>;
|
|
260
|
+
duration_ms: z.ZodNumber;
|
|
261
|
+
result: z.ZodEnum<{
|
|
262
|
+
error: "error";
|
|
263
|
+
blocked: "blocked";
|
|
264
|
+
ok: "ok";
|
|
265
|
+
}>;
|
|
266
|
+
}, z.core.$strip>;
|
|
267
|
+
export declare const deepagentSubagentEvidenceSchema: z.ZodObject<{
|
|
268
|
+
schema_version: z.ZodLiteral<1>;
|
|
269
|
+
contract: z.ZodLiteral<"deepagent-subagent-evidence/v1">;
|
|
270
|
+
subagent_name: z.ZodString;
|
|
271
|
+
prompt_purpose: z.ZodString;
|
|
272
|
+
tools_used: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
273
|
+
skills_used: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
274
|
+
inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
275
|
+
structured_output: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
276
|
+
confidence: z.ZodNumber;
|
|
277
|
+
risks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
278
|
+
id: z.ZodString;
|
|
279
|
+
severity: z.ZodEnum<{
|
|
280
|
+
low: "low";
|
|
281
|
+
medium: "medium";
|
|
282
|
+
high: "high";
|
|
283
|
+
critical: "critical";
|
|
284
|
+
}>;
|
|
285
|
+
summary: z.ZodString;
|
|
286
|
+
mitigation: z.ZodOptional<z.ZodString>;
|
|
287
|
+
}, z.core.$strip>>>;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
export declare const deepagentDecisionEvidenceSchema: z.ZodObject<{
|
|
290
|
+
schema_version: z.ZodLiteral<1>;
|
|
291
|
+
contract: z.ZodLiteral<"deepagent-decision-evidence/v1">;
|
|
292
|
+
decision_point: z.ZodString;
|
|
293
|
+
alternatives: z.ZodArray<z.ZodString>;
|
|
294
|
+
selected_option: z.ZodString;
|
|
295
|
+
adr_required: z.ZodBoolean;
|
|
296
|
+
rationale: z.ZodString;
|
|
297
|
+
approvals: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
export declare const deepagentQualityEvidenceSchema: z.ZodObject<{
|
|
300
|
+
schema_version: z.ZodLiteral<1>;
|
|
301
|
+
contract: z.ZodLiteral<"deepagent-quality-evidence/v1">;
|
|
302
|
+
matrix: z.ZodArray<z.ZodObject<{
|
|
303
|
+
requirement_id: z.ZodString;
|
|
304
|
+
validation_id: z.ZodString;
|
|
305
|
+
evidence_refs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
306
|
+
kind: z.ZodString;
|
|
307
|
+
ref: z.ZodString;
|
|
308
|
+
path: z.ZodOptional<z.ZodString>;
|
|
309
|
+
}, z.core.$strip>>>;
|
|
310
|
+
residual_risks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
311
|
+
id: z.ZodString;
|
|
312
|
+
severity: z.ZodEnum<{
|
|
313
|
+
low: "low";
|
|
314
|
+
medium: "medium";
|
|
315
|
+
high: "high";
|
|
316
|
+
critical: "critical";
|
|
317
|
+
}>;
|
|
318
|
+
summary: z.ZodString;
|
|
319
|
+
mitigation: z.ZodOptional<z.ZodString>;
|
|
320
|
+
}, z.core.$strip>>>;
|
|
321
|
+
}, z.core.$strip>>;
|
|
322
|
+
}, z.core.$strip>;
|
|
323
|
+
export declare const deepagentRunEvidenceSchema: z.ZodObject<{
|
|
324
|
+
schema_version: z.ZodLiteral<1>;
|
|
325
|
+
contract: z.ZodLiteral<"deepagent-run-evidence/v1">;
|
|
326
|
+
run_id: z.ZodString;
|
|
327
|
+
feature_ref: z.ZodString;
|
|
328
|
+
mode: z.ZodEnum<{
|
|
329
|
+
validate: "validate";
|
|
330
|
+
"read-only": "read-only";
|
|
331
|
+
plan: "plan";
|
|
332
|
+
"apply-sandbox": "apply-sandbox";
|
|
333
|
+
"apply-approved": "apply-approved";
|
|
334
|
+
}>;
|
|
335
|
+
status: z.ZodEnum<{
|
|
336
|
+
completed: "completed";
|
|
337
|
+
blocked: "blocked";
|
|
338
|
+
failed: "failed";
|
|
339
|
+
running: "running";
|
|
340
|
+
allowed: "allowed";
|
|
341
|
+
}>;
|
|
342
|
+
model_metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
343
|
+
config_fingerprint: z.ZodString;
|
|
344
|
+
plan_ref: z.ZodString;
|
|
345
|
+
artifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
346
|
+
validations: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
347
|
+
decisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
348
|
+
schema_version: z.ZodLiteral<1>;
|
|
349
|
+
contract: z.ZodLiteral<"deepagent-decision-evidence/v1">;
|
|
350
|
+
decision_point: z.ZodString;
|
|
351
|
+
alternatives: z.ZodArray<z.ZodString>;
|
|
352
|
+
selected_option: z.ZodString;
|
|
353
|
+
adr_required: z.ZodBoolean;
|
|
354
|
+
rationale: z.ZodString;
|
|
355
|
+
approvals: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
356
|
+
}, z.core.$strip>>>;
|
|
357
|
+
risks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
358
|
+
id: z.ZodString;
|
|
359
|
+
severity: z.ZodEnum<{
|
|
360
|
+
low: "low";
|
|
361
|
+
medium: "medium";
|
|
362
|
+
high: "high";
|
|
363
|
+
critical: "critical";
|
|
364
|
+
}>;
|
|
365
|
+
summary: z.ZodString;
|
|
366
|
+
mitigation: z.ZodOptional<z.ZodString>;
|
|
367
|
+
}, z.core.$strip>>>;
|
|
368
|
+
finalize_intent: z.ZodDefault<z.ZodBoolean>;
|
|
369
|
+
}, z.core.$strip>;
|
|
370
|
+
//# sourceMappingURL=deepagent-contracts.d.ts.map
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const FEATURE_REF_PATTERN = /^FEAT-\d{4}$/;
|
|
3
|
+
const deepagentModeSchema = z.enum([
|
|
4
|
+
'read-only',
|
|
5
|
+
'plan',
|
|
6
|
+
'validate',
|
|
7
|
+
'apply-sandbox',
|
|
8
|
+
'apply-approved',
|
|
9
|
+
]);
|
|
10
|
+
const deepagentStatusSchema = z.enum(['allowed', 'blocked', 'running', 'completed', 'failed']);
|
|
11
|
+
const deepagentNetworkModeSchema = z.enum(['disabled', 'restricted', 'enabled']);
|
|
12
|
+
const deepagentRuntimeModeSchema = z.enum(['disabled', 'fake', 'deepagents-js']);
|
|
13
|
+
const changeSafetyOperationSchema = z.enum(['add', 'modify', 'remove', 'replace', 'refactor', 'optimize']);
|
|
14
|
+
const plannedFileOperationSchema = z.enum(['create', 'modify', 'delete', 'rename', 'replace']);
|
|
15
|
+
const capabilityKindSchema = z.enum([
|
|
16
|
+
'route',
|
|
17
|
+
'page',
|
|
18
|
+
'cli_command',
|
|
19
|
+
'public_contract',
|
|
20
|
+
'schema',
|
|
21
|
+
'event',
|
|
22
|
+
'core_flow',
|
|
23
|
+
'governance_state',
|
|
24
|
+
]);
|
|
25
|
+
const deepagentExecutionLimitsSchema = z.object({
|
|
26
|
+
max_iterations: z.number().int().positive().optional(),
|
|
27
|
+
max_subagents: z.number().int().positive().optional(),
|
|
28
|
+
max_parallel: z.number().int().positive().optional(),
|
|
29
|
+
});
|
|
30
|
+
const deepagentEvidenceRefSchema = z.object({
|
|
31
|
+
kind: z.string().min(1),
|
|
32
|
+
ref: z.string().min(1),
|
|
33
|
+
path: z.string().min(1).optional(),
|
|
34
|
+
});
|
|
35
|
+
const changeSafetyContractSchema = z.object({
|
|
36
|
+
explicit_modification_intent: z.object({
|
|
37
|
+
operation: changeSafetyOperationSchema,
|
|
38
|
+
}),
|
|
39
|
+
context_lock: z
|
|
40
|
+
.object({
|
|
41
|
+
allowed_paths: z.array(z.string().min(1)).default([]),
|
|
42
|
+
forbidden_paths: z.array(z.string().min(1)).default([]),
|
|
43
|
+
protected_core: z.array(z.string().min(1)).default([]),
|
|
44
|
+
})
|
|
45
|
+
.default({ allowed_paths: [], forbidden_paths: [], protected_core: [] }),
|
|
46
|
+
change_budget: z
|
|
47
|
+
.object({
|
|
48
|
+
max_files_changed: z.number().int().nonnegative().optional(),
|
|
49
|
+
max_new_files: z.number().int().nonnegative().optional(),
|
|
50
|
+
max_deleted_files: z.number().int().nonnegative().optional(),
|
|
51
|
+
})
|
|
52
|
+
.default({}),
|
|
53
|
+
governed_override: z
|
|
54
|
+
.object({
|
|
55
|
+
feature_id: z.string().regex(FEATURE_REF_PATTERN),
|
|
56
|
+
intent: changeSafetyOperationSchema,
|
|
57
|
+
rationale: z.string().min(1),
|
|
58
|
+
write_scope: z.array(z.string().min(1)).min(1),
|
|
59
|
+
expected_deletions: z.array(z.string().min(1)).default([]),
|
|
60
|
+
rollback_plan: z.string().min(1),
|
|
61
|
+
compensating_control: z.string().min(1),
|
|
62
|
+
approver: z.string().min(1),
|
|
63
|
+
expires_at: z.string().datetime(),
|
|
64
|
+
})
|
|
65
|
+
.optional(),
|
|
66
|
+
});
|
|
67
|
+
const plannedFileChangeSchema = z.object({
|
|
68
|
+
path: z.string().min(1),
|
|
69
|
+
operation: plannedFileOperationSchema,
|
|
70
|
+
previous_path: z.string().min(1).optional(),
|
|
71
|
+
});
|
|
72
|
+
const capabilityInventoryItemSchema = z.object({
|
|
73
|
+
kind: capabilityKindSchema,
|
|
74
|
+
id: z.string().min(1),
|
|
75
|
+
path: z.string().min(1).optional(),
|
|
76
|
+
fingerprint: z.string().min(1).optional(),
|
|
77
|
+
metadata: z.record(z.string(), z.unknown()).default({}),
|
|
78
|
+
});
|
|
79
|
+
const deepagentRiskSchema = z.object({
|
|
80
|
+
id: z.string().min(1),
|
|
81
|
+
severity: z.enum(['low', 'medium', 'high', 'critical']),
|
|
82
|
+
summary: z.string().min(1),
|
|
83
|
+
mitigation: z.string().min(1).optional(),
|
|
84
|
+
});
|
|
85
|
+
export const deepagentEnvContractSchema = z.object({
|
|
86
|
+
schema_version: z.literal(1),
|
|
87
|
+
contract: z.literal('deepagent-env-contract/v1'),
|
|
88
|
+
runtime_mode: deepagentRuntimeModeSchema.default('disabled'),
|
|
89
|
+
model_ref: z.string().min(1).optional(),
|
|
90
|
+
planner_model_ref: z.string().min(1).optional(),
|
|
91
|
+
reviewer_model_ref: z.string().min(1).optional(),
|
|
92
|
+
coder_model_ref: z.string().min(1).optional(),
|
|
93
|
+
execution_limits: deepagentExecutionLimitsSchema.default({}),
|
|
94
|
+
provider_profile: z.string().min(1).optional(),
|
|
95
|
+
env_allowlist: z.array(z.string().min(1)).default([]),
|
|
96
|
+
secret_refs: z.array(z.string().min(1)).default([]),
|
|
97
|
+
credential_env_refs: z.array(z.string().min(1)).default([]),
|
|
98
|
+
endpoint_env_refs: z.array(z.string().min(1)).default([]),
|
|
99
|
+
sandbox_passthrough_rules: z.array(z.string().min(1)).default([]),
|
|
100
|
+
network_mode: deepagentNetworkModeSchema.default('disabled'),
|
|
101
|
+
blocked_paths: z.array(z.string().min(1)).default([]),
|
|
102
|
+
masked_config_fingerprint: z.string().min(1),
|
|
103
|
+
});
|
|
104
|
+
export const deepagentRunRequestSchema = z.object({
|
|
105
|
+
schema_version: z.literal(1),
|
|
106
|
+
contract: z.literal('deepagent-run-request/v1'),
|
|
107
|
+
provider: z.literal('deepagents'),
|
|
108
|
+
feature_ref: z.string().regex(FEATURE_REF_PATTERN),
|
|
109
|
+
mode: deepagentModeSchema,
|
|
110
|
+
objective: z.string().min(1),
|
|
111
|
+
allowed_tools: z.array(z.string().min(1)).default([]),
|
|
112
|
+
write_scope: z.object({
|
|
113
|
+
allow_project_writes: z.boolean().default(false),
|
|
114
|
+
allowed_paths: z.array(z.string().min(1)).default([]),
|
|
115
|
+
}),
|
|
116
|
+
network_policy: z.object({
|
|
117
|
+
mode: deepagentNetworkModeSchema.default('disabled'),
|
|
118
|
+
allowlist: z.array(z.string().min(1)).default([]),
|
|
119
|
+
}),
|
|
120
|
+
env_contract: deepagentEnvContractSchema,
|
|
121
|
+
skill_ids: z.array(z.string().min(1)).default([]),
|
|
122
|
+
plugin_envelopes: z
|
|
123
|
+
.array(z.object({
|
|
124
|
+
plugin_id: z.string().min(1),
|
|
125
|
+
capability: z.string().min(1),
|
|
126
|
+
version: z.string().min(1),
|
|
127
|
+
}))
|
|
128
|
+
.default([]),
|
|
129
|
+
change_safety: changeSafetyContractSchema.optional(),
|
|
130
|
+
planned_file_changes: z.array(plannedFileChangeSchema).default([]),
|
|
131
|
+
capability_inventory_before: z.array(capabilityInventoryItemSchema).default([]),
|
|
132
|
+
capability_inventory_after: z.array(capabilityInventoryItemSchema).default([]),
|
|
133
|
+
capability_inventory_required: z.boolean().default(false),
|
|
134
|
+
capability_required_kinds: z.array(capabilityKindSchema).default([]),
|
|
135
|
+
reversa_scope: z.object({
|
|
136
|
+
enabled: z.boolean().default(false),
|
|
137
|
+
objective: z.string().min(1).optional(),
|
|
138
|
+
targets: z.array(z.string().min(1)).default([]),
|
|
139
|
+
}),
|
|
140
|
+
expected_evidence: z.array(z.string().min(1)).min(1),
|
|
141
|
+
});
|
|
142
|
+
export const deepagentRunPlanSchema = z.object({
|
|
143
|
+
schema_version: z.literal(1),
|
|
144
|
+
contract: z.literal('deepagent-run-plan/v1'),
|
|
145
|
+
run_id: z.string().min(1),
|
|
146
|
+
feature_ref: z.string().regex(FEATURE_REF_PATTERN),
|
|
147
|
+
mode: deepagentModeSchema,
|
|
148
|
+
tactical_steps: z
|
|
149
|
+
.array(z.object({
|
|
150
|
+
id: z.string().min(1),
|
|
151
|
+
title: z.string().min(1),
|
|
152
|
+
objective: z.string().min(1),
|
|
153
|
+
subagent: z.string().min(1).optional(),
|
|
154
|
+
}))
|
|
155
|
+
.min(1),
|
|
156
|
+
subagent_routing: z.array(z.object({
|
|
157
|
+
subagent: z.string().min(1),
|
|
158
|
+
purpose: z.string().min(1),
|
|
159
|
+
task_ids: z.array(z.string().min(1)).default([]),
|
|
160
|
+
})),
|
|
161
|
+
required_approvals: z.array(z.string().min(1)).default([]),
|
|
162
|
+
expected_tool_calls: z.array(z.string().min(1)).default([]),
|
|
163
|
+
write_manifest_preview: z.array(z.string().min(1)).default([]),
|
|
164
|
+
validation_matrix: z
|
|
165
|
+
.array(z.object({
|
|
166
|
+
requirement: z.string().min(1),
|
|
167
|
+
validation: z.string().min(1),
|
|
168
|
+
evidence_kind: z.string().min(1),
|
|
169
|
+
}))
|
|
170
|
+
.default([]),
|
|
171
|
+
residual_risks: z.array(deepagentRiskSchema).default([]),
|
|
172
|
+
});
|
|
173
|
+
export const deepagentToolCallEvidenceSchema = z.object({
|
|
174
|
+
schema_version: z.literal(1),
|
|
175
|
+
contract: z.literal('deepagent-tool-call-evidence/v1'),
|
|
176
|
+
tool_name: z.string().min(1),
|
|
177
|
+
input_hash: z.string().min(1),
|
|
178
|
+
output_hash: z.string().min(1),
|
|
179
|
+
state_access_class: z.enum(['read', 'write', 'execute', 'network']),
|
|
180
|
+
policy_gate: z.string().min(1),
|
|
181
|
+
hitl_decision: z.enum(['none', 'approve', 'reject', 'edit', 'respond']).default('none'),
|
|
182
|
+
duration_ms: z.number().int().nonnegative(),
|
|
183
|
+
result: z.enum(['ok', 'error', 'blocked']),
|
|
184
|
+
});
|
|
185
|
+
export const deepagentSubagentEvidenceSchema = z.object({
|
|
186
|
+
schema_version: z.literal(1),
|
|
187
|
+
contract: z.literal('deepagent-subagent-evidence/v1'),
|
|
188
|
+
subagent_name: z.string().min(1),
|
|
189
|
+
prompt_purpose: z.string().min(1),
|
|
190
|
+
tools_used: z.array(z.string().min(1)).default([]),
|
|
191
|
+
skills_used: z.array(z.string().min(1)).default([]),
|
|
192
|
+
inputs: z.record(z.string(), z.unknown()).default({}),
|
|
193
|
+
structured_output: z.record(z.string(), z.unknown()).default({}),
|
|
194
|
+
confidence: z.number().min(0).max(1),
|
|
195
|
+
risks: z.array(deepagentRiskSchema).default([]),
|
|
196
|
+
});
|
|
197
|
+
export const deepagentDecisionEvidenceSchema = z.object({
|
|
198
|
+
schema_version: z.literal(1),
|
|
199
|
+
contract: z.literal('deepagent-decision-evidence/v1'),
|
|
200
|
+
decision_point: z.string().min(1),
|
|
201
|
+
alternatives: z.array(z.string().min(1)).min(1),
|
|
202
|
+
selected_option: z.string().min(1),
|
|
203
|
+
adr_required: z.boolean(),
|
|
204
|
+
rationale: z.string().min(1),
|
|
205
|
+
approvals: z.array(z.string().min(1)).default([]),
|
|
206
|
+
});
|
|
207
|
+
export const deepagentQualityEvidenceSchema = z.object({
|
|
208
|
+
schema_version: z.literal(1),
|
|
209
|
+
contract: z.literal('deepagent-quality-evidence/v1'),
|
|
210
|
+
matrix: z
|
|
211
|
+
.array(z.object({
|
|
212
|
+
requirement_id: z.string().min(1),
|
|
213
|
+
validation_id: z.string().min(1),
|
|
214
|
+
evidence_refs: z.array(deepagentEvidenceRefSchema).default([]),
|
|
215
|
+
residual_risks: z.array(deepagentRiskSchema).default([]),
|
|
216
|
+
}))
|
|
217
|
+
.min(1),
|
|
218
|
+
});
|
|
219
|
+
export const deepagentRunEvidenceSchema = z.object({
|
|
220
|
+
schema_version: z.literal(1),
|
|
221
|
+
contract: z.literal('deepagent-run-evidence/v1'),
|
|
222
|
+
run_id: z.string().min(1),
|
|
223
|
+
feature_ref: z.string().regex(FEATURE_REF_PATTERN),
|
|
224
|
+
mode: deepagentModeSchema,
|
|
225
|
+
status: deepagentStatusSchema,
|
|
226
|
+
model_metadata: z.record(z.string(), z.unknown()).default({}),
|
|
227
|
+
config_fingerprint: z.string().min(1),
|
|
228
|
+
plan_ref: z.string().min(1),
|
|
229
|
+
artifacts: z.array(z.string().min(1)).default([]),
|
|
230
|
+
validations: z.array(z.string().min(1)).default([]),
|
|
231
|
+
decisions: z.array(deepagentDecisionEvidenceSchema).default([]),
|
|
232
|
+
risks: z.array(deepagentRiskSchema).default([]),
|
|
233
|
+
finalize_intent: z.boolean().default(false),
|
|
234
|
+
});
|
|
235
|
+
//# sourceMappingURL=deepagent-contracts.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LENSES, extractSectionContent, validateDocumentAgainstLens } from '../lenses.js';
|
|
2
|
+
const ADR_TEMPLATE_SENTINELS = [
|
|
3
|
+
'Describe the context that motivated this architecture decision, including constraints and trade-offs.',
|
|
4
|
+
'Document the decision, the change scope, and the alternatives rejected.',
|
|
5
|
+
'List positive impacts, residual risks, and mitigation actions.',
|
|
6
|
+
];
|
|
7
|
+
export function evaluateAdrGovernorDocument(content) {
|
|
8
|
+
const trimmed = content.trim();
|
|
9
|
+
if (!trimmed) {
|
|
10
|
+
return ['ADR content is empty'];
|
|
11
|
+
}
|
|
12
|
+
const reasons = [];
|
|
13
|
+
const lensViolations = validateDocumentAgainstLens(trimmed, LENSES.adr);
|
|
14
|
+
if (lensViolations.length > 0) {
|
|
15
|
+
reasons.push(...lensViolations.map((violation) => `ADR lens violation: ${violation}`));
|
|
16
|
+
}
|
|
17
|
+
for (const sentinel of ADR_TEMPLATE_SENTINELS) {
|
|
18
|
+
if (trimmed.includes(sentinel)) {
|
|
19
|
+
reasons.push(`ADR still contains template placeholder text: ${sentinel}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
for (const section of ['## Context', '## Decision', '## Consequences']) {
|
|
23
|
+
const sectionContent = extractSectionContent(trimmed, section);
|
|
24
|
+
if (sectionContent.trim().length < 20) {
|
|
25
|
+
reasons.push(`${section} must contain concrete decision content`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return Array.from(new Set(reasons));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=adr-governor.js.map
|