@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,182 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const FEATURE_REF_PATTERN = /^FEAT-\d{4}$/;
|
|
3
|
+
const WINDOWS_ABSOLUTE_PATH_PATTERN = /^[A-Za-z]:[\\/]/;
|
|
4
|
+
const ALL_DOMAINS = [
|
|
5
|
+
'legacy-analysis',
|
|
6
|
+
'rules',
|
|
7
|
+
'screens',
|
|
8
|
+
'data',
|
|
9
|
+
'architecture',
|
|
10
|
+
'migration',
|
|
11
|
+
'microservices',
|
|
12
|
+
'specs',
|
|
13
|
+
'equivalence-validation',
|
|
14
|
+
];
|
|
15
|
+
const DOMAIN_ROUTE_MAP = {
|
|
16
|
+
'legacy-analysis': {
|
|
17
|
+
subagent_id: 'sdd-reverse-orchestrator',
|
|
18
|
+
evidence_slug: 'legacy-analysis',
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
subagent_id: 'sdd-reverse-business-rules-detective',
|
|
22
|
+
evidence_slug: 'rules',
|
|
23
|
+
},
|
|
24
|
+
screens: {
|
|
25
|
+
subagent_id: 'sdd-reverse-surface-scout',
|
|
26
|
+
evidence_slug: 'screens',
|
|
27
|
+
},
|
|
28
|
+
data: {
|
|
29
|
+
subagent_id: 'sdd-reverse-domain-essence-extractor',
|
|
30
|
+
evidence_slug: 'data',
|
|
31
|
+
},
|
|
32
|
+
architecture: {
|
|
33
|
+
subagent_id: 'sdd-reverse-module-archaeologist',
|
|
34
|
+
evidence_slug: 'architecture',
|
|
35
|
+
},
|
|
36
|
+
migration: {
|
|
37
|
+
subagent_id: 'sdd-reverse-migration-planner',
|
|
38
|
+
evidence_slug: 'migration',
|
|
39
|
+
},
|
|
40
|
+
microservices: {
|
|
41
|
+
subagent_id: 'sdd-reverse-forward-planner',
|
|
42
|
+
evidence_slug: 'microservices',
|
|
43
|
+
},
|
|
44
|
+
specs: {
|
|
45
|
+
subagent_id: 'sdd-reverse-spec-writer',
|
|
46
|
+
evidence_slug: 'specs',
|
|
47
|
+
},
|
|
48
|
+
'equivalence-validation': {
|
|
49
|
+
subagent_id: 'sdd-reverse-reconstructor',
|
|
50
|
+
evidence_slug: 'equivalence-validation',
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
export const reversaDomainSchema = z.enum(ALL_DOMAINS);
|
|
54
|
+
export const deepAgentsReversaRequestSchema = z.object({
|
|
55
|
+
feature_ref: z.string().regex(FEATURE_REF_PATTERN),
|
|
56
|
+
domains: z.array(reversaDomainSchema).default([...ALL_DOMAINS]),
|
|
57
|
+
legacy_sources: z.array(z.string().min(1)).default([]),
|
|
58
|
+
});
|
|
59
|
+
const reversaRouteSchema = z.object({
|
|
60
|
+
domain: reversaDomainSchema,
|
|
61
|
+
subagent_id: z.string().min(1),
|
|
62
|
+
skill_ref: z.string().min(1),
|
|
63
|
+
legacy_input_refs: z.array(z.string().min(1)).default([]),
|
|
64
|
+
evidence_refs: z.array(z.string().min(1)).default([]),
|
|
65
|
+
quality_refs: z.array(z.string().min(1)).default([]),
|
|
66
|
+
});
|
|
67
|
+
export const deepAgentsReversaPlanSchema = z.object({
|
|
68
|
+
schema_version: z.literal(1),
|
|
69
|
+
feature_ref: z.string().regex(FEATURE_REF_PATTERN),
|
|
70
|
+
runtime_provider: z.literal('deepagents'),
|
|
71
|
+
status: z.enum(['ready', 'blocked']),
|
|
72
|
+
fail_closed: z.literal(true),
|
|
73
|
+
reasons: z.array(z.string()).default([]),
|
|
74
|
+
canonical_authority: z.object({
|
|
75
|
+
governance_system: z.literal('CodeSDD'),
|
|
76
|
+
canonical_state_path: z.literal('.sdd/state/**'),
|
|
77
|
+
direct_state_mutation_allowed: z.literal(false),
|
|
78
|
+
}),
|
|
79
|
+
legacy_input_policy: z.object({
|
|
80
|
+
trust_model: z.literal('untrusted'),
|
|
81
|
+
source_attestation_required: z.literal(true),
|
|
82
|
+
accepted_sources: z.array(z.string().min(1)).default([]),
|
|
83
|
+
rejected_sources: z
|
|
84
|
+
.array(z.object({
|
|
85
|
+
path: z.string().min(1),
|
|
86
|
+
reason: z.string().min(1),
|
|
87
|
+
}))
|
|
88
|
+
.default([]),
|
|
89
|
+
}),
|
|
90
|
+
routes: z.array(reversaRouteSchema).default([]),
|
|
91
|
+
});
|
|
92
|
+
export function planDeepAgentsReversaSubagents(request) {
|
|
93
|
+
const parsed = deepAgentsReversaRequestSchema.parse(request);
|
|
94
|
+
const acceptedSources = [];
|
|
95
|
+
const rejectedSources = [];
|
|
96
|
+
for (const source of parsed.legacy_sources) {
|
|
97
|
+
const normalized = normalizeRelativePath(source);
|
|
98
|
+
if (!normalized) {
|
|
99
|
+
rejectedSources.push({
|
|
100
|
+
path: source,
|
|
101
|
+
reason: 'Source path is not a safe project-relative path.',
|
|
102
|
+
});
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
if (isCanonicalStatePath(normalized)) {
|
|
106
|
+
rejectedSources.push({
|
|
107
|
+
path: source,
|
|
108
|
+
reason: 'Legacy source path cannot target canonical state files under .sdd/state/.',
|
|
109
|
+
});
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
acceptedSources.push(normalized);
|
|
113
|
+
}
|
|
114
|
+
const reasons = rejectedSources.map((entry) => `${entry.path}: ${entry.reason}`);
|
|
115
|
+
const domains = uniqueDomains(parsed.domains);
|
|
116
|
+
const routes = reasons.length > 0
|
|
117
|
+
? []
|
|
118
|
+
: domains.map((domain) => buildRoute(parsed.feature_ref, domain, acceptedSources));
|
|
119
|
+
return deepAgentsReversaPlanSchema.parse({
|
|
120
|
+
schema_version: 1,
|
|
121
|
+
feature_ref: parsed.feature_ref,
|
|
122
|
+
runtime_provider: 'deepagents',
|
|
123
|
+
status: reasons.length === 0 ? 'ready' : 'blocked',
|
|
124
|
+
fail_closed: true,
|
|
125
|
+
reasons,
|
|
126
|
+
canonical_authority: {
|
|
127
|
+
governance_system: 'CodeSDD',
|
|
128
|
+
canonical_state_path: '.sdd/state/**',
|
|
129
|
+
direct_state_mutation_allowed: false,
|
|
130
|
+
},
|
|
131
|
+
legacy_input_policy: {
|
|
132
|
+
trust_model: 'untrusted',
|
|
133
|
+
source_attestation_required: true,
|
|
134
|
+
accepted_sources: acceptedSources,
|
|
135
|
+
rejected_sources: rejectedSources,
|
|
136
|
+
},
|
|
137
|
+
routes,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
function buildRoute(featureRef, domain, acceptedSources) {
|
|
141
|
+
const config = DOMAIN_ROUTE_MAP[domain];
|
|
142
|
+
const evidenceRoot = `.sdd/evidence/reversa/${featureRef}`;
|
|
143
|
+
return {
|
|
144
|
+
domain,
|
|
145
|
+
subagent_id: config.subagent_id,
|
|
146
|
+
skill_ref: `.sdd/skills/curated/${config.subagent_id}/SKILL.md`,
|
|
147
|
+
legacy_input_refs: acceptedSources,
|
|
148
|
+
evidence_refs: [
|
|
149
|
+
`${evidenceRoot}/legacy-input-attestation.yaml`,
|
|
150
|
+
`${evidenceRoot}/${config.evidence_slug}.yaml`,
|
|
151
|
+
],
|
|
152
|
+
quality_refs: [
|
|
153
|
+
`.sdd/active/${featureRef}/5-quality.yaml#requirement_validation_evidence_risk_matrix`,
|
|
154
|
+
],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function uniqueDomains(domains) {
|
|
158
|
+
const seen = new Set();
|
|
159
|
+
const unique = [];
|
|
160
|
+
for (const domain of domains) {
|
|
161
|
+
if (!seen.has(domain)) {
|
|
162
|
+
seen.add(domain);
|
|
163
|
+
unique.push(domain);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return unique;
|
|
167
|
+
}
|
|
168
|
+
function normalizeRelativePath(value) {
|
|
169
|
+
const normalized = value.replace(/\\/gu, '/').replace(/^\.\//u, '');
|
|
170
|
+
if (!normalized || normalized === '.' || normalized.startsWith('/') || WINDOWS_ABSOLUTE_PATH_PATTERN.test(normalized)) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
const segments = normalized.split('/').filter(Boolean);
|
|
174
|
+
if (segments.some((segment) => segment === '..')) {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
return segments.join('/');
|
|
178
|
+
}
|
|
179
|
+
function isCanonicalStatePath(value) {
|
|
180
|
+
return value === '.sdd/state' || value.startsWith('.sdd/state/');
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=reversa-subagents.js.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { CreateDeepAgentParams } from 'deepagents';
|
|
2
|
+
import type { DeepAgentsExecutionMode, DeepAgentsTrustTier } from './backend.js';
|
|
3
|
+
import { type DeepAgentsOpenAiImporter } from './model-provider.js';
|
|
4
|
+
import { type DeepAgentsOperation, type DeepAgentsPolicySnapshot, type DeepAgentsRuntimeMode, type DeepAgentsRuntimeReadiness } from './policy.js';
|
|
5
|
+
import { type DeepAgentsRuntimePolicyDecision } from './policy-enforcement.js';
|
|
6
|
+
import { type DeepAgentsRuntimeImporter, type DeepAgentsRuntimeLoadResult } from './runtime-loader.js';
|
|
7
|
+
export type DeepAgentsRuntimeAdapterStatus = 'disabled' | 'ready' | 'blocked';
|
|
8
|
+
export type DeepAgentsAgent = {
|
|
9
|
+
invoke(input: unknown, config?: unknown): Promise<unknown>;
|
|
10
|
+
};
|
|
11
|
+
export type DeepAgentsAgentConfig = CreateDeepAgentParams;
|
|
12
|
+
export type DeepAgentsInterruptConfig = NonNullable<CreateDeepAgentParams['interruptOn']>;
|
|
13
|
+
export interface DeepAgentsRuntimeFactoryRequest {
|
|
14
|
+
featureRef: string;
|
|
15
|
+
objective: string;
|
|
16
|
+
mode?: DeepAgentsExecutionMode;
|
|
17
|
+
name?: string;
|
|
18
|
+
runId?: string;
|
|
19
|
+
systemPrompt?: string;
|
|
20
|
+
tools?: DeepAgentsAgentConfig['tools'];
|
|
21
|
+
subagents?: DeepAgentsAgentConfig['subagents'];
|
|
22
|
+
skills?: string[];
|
|
23
|
+
backend?: DeepAgentsAgentConfig['backend'];
|
|
24
|
+
interruptOn?: DeepAgentsAgentConfig['interruptOn'];
|
|
25
|
+
expectedEvidence?: string[];
|
|
26
|
+
projectRoot?: string;
|
|
27
|
+
trustTier?: DeepAgentsTrustTier;
|
|
28
|
+
writeScope?: string[];
|
|
29
|
+
plannedWrites?: string[];
|
|
30
|
+
requestedEnv?: string[];
|
|
31
|
+
networkDomains?: string[];
|
|
32
|
+
operations?: DeepAgentsOperation[];
|
|
33
|
+
approvalGrants?: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface NormalizedDeepAgentsRuntimeRequest {
|
|
36
|
+
featureRef: string;
|
|
37
|
+
objective: string;
|
|
38
|
+
mode: DeepAgentsExecutionMode;
|
|
39
|
+
name: string;
|
|
40
|
+
runId: string;
|
|
41
|
+
systemPrompt: string;
|
|
42
|
+
tools: DeepAgentsAgentConfig['tools'];
|
|
43
|
+
subagents: DeepAgentsAgentConfig['subagents'];
|
|
44
|
+
skills: string[];
|
|
45
|
+
backend?: DeepAgentsAgentConfig['backend'];
|
|
46
|
+
interruptOn: DeepAgentsInterruptConfig;
|
|
47
|
+
expectedEvidence: string[];
|
|
48
|
+
}
|
|
49
|
+
export interface DeepAgentsRuntimeFactoryOptions {
|
|
50
|
+
snapshot?: DeepAgentsPolicySnapshot;
|
|
51
|
+
env?: NodeJS.ProcessEnv;
|
|
52
|
+
importer?: DeepAgentsRuntimeImporter;
|
|
53
|
+
modelProviderImporter?: DeepAgentsOpenAiImporter;
|
|
54
|
+
}
|
|
55
|
+
export interface DeepAgentsRuntimeAdapterEnvelope {
|
|
56
|
+
schema_version: 1;
|
|
57
|
+
contract: 'deepagents-runtime-adapter/v1';
|
|
58
|
+
runtime: DeepAgentsRuntimeMode;
|
|
59
|
+
status: DeepAgentsRuntimeAdapterStatus;
|
|
60
|
+
feature_ref: string;
|
|
61
|
+
mode: DeepAgentsExecutionMode;
|
|
62
|
+
run_id: string;
|
|
63
|
+
fail_closed: true;
|
|
64
|
+
can_instantiate_agent: boolean;
|
|
65
|
+
config_fingerprint: string;
|
|
66
|
+
readiness: DeepAgentsRuntimeReadiness;
|
|
67
|
+
policy: DeepAgentsRuntimePolicyDecision;
|
|
68
|
+
reasons: string[];
|
|
69
|
+
expected_evidence: string[];
|
|
70
|
+
}
|
|
71
|
+
export interface DeepAgentsRuntimeAdapter {
|
|
72
|
+
readonly runtime: DeepAgentsRuntimeMode;
|
|
73
|
+
readonly status: DeepAgentsRuntimeAdapterStatus;
|
|
74
|
+
readonly request: NormalizedDeepAgentsRuntimeRequest;
|
|
75
|
+
readonly snapshot: DeepAgentsPolicySnapshot;
|
|
76
|
+
readonly loadResult: DeepAgentsRuntimeLoadResult;
|
|
77
|
+
readonly policyDecision: DeepAgentsRuntimePolicyDecision;
|
|
78
|
+
readonly reasons: string[];
|
|
79
|
+
readonly canInstantiateAgent: boolean;
|
|
80
|
+
createAgentConfig(): DeepAgentsAgentConfig | null;
|
|
81
|
+
createAgent(): Promise<DeepAgentsAgent>;
|
|
82
|
+
describe(): DeepAgentsRuntimeAdapterEnvelope;
|
|
83
|
+
}
|
|
84
|
+
export declare class DeepAgentsRuntimeAdapterError extends Error {
|
|
85
|
+
readonly envelope: DeepAgentsRuntimeAdapterEnvelope;
|
|
86
|
+
constructor(message: string, envelope: DeepAgentsRuntimeAdapterEnvelope);
|
|
87
|
+
}
|
|
88
|
+
export declare function createDeepAgentsRuntimeAdapter(request: DeepAgentsRuntimeFactoryRequest, options?: DeepAgentsRuntimeFactoryOptions): Promise<DeepAgentsRuntimeAdapter>;
|
|
89
|
+
export declare function buildDeepAgentsAgentConfig(request: NormalizedDeepAgentsRuntimeRequest, snapshot: DeepAgentsPolicySnapshot): DeepAgentsAgentConfig;
|
|
90
|
+
//# sourceMappingURL=runtime-factory.d.ts.map
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { materializeDeepAgentsModel, } from './model-provider.js';
|
|
2
|
+
import { createDeepAgentsPolicySnapshot, evaluateDeepAgentsRuntimeReadiness, } from './policy.js';
|
|
3
|
+
import { evaluateDeepAgentsRuntimePolicyEnforcement, } from './policy-enforcement.js';
|
|
4
|
+
import { loadDeepAgentsRuntimeModule, } from './runtime-loader.js';
|
|
5
|
+
export class DeepAgentsRuntimeAdapterError extends Error {
|
|
6
|
+
envelope;
|
|
7
|
+
constructor(message, envelope) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = 'DeepAgentsRuntimeAdapterError';
|
|
10
|
+
this.envelope = envelope;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const DEFAULT_EXPECTED_EVIDENCE = [
|
|
14
|
+
'deepagent-run-plan/v1',
|
|
15
|
+
'deepagent-run-evidence/v1',
|
|
16
|
+
'deepagent-quality-evidence/v1',
|
|
17
|
+
];
|
|
18
|
+
const DEFAULT_SYSTEM_PROMPT = [
|
|
19
|
+
'You are the DeepAgents execution plane for CodeSDD.',
|
|
20
|
+
'CodeSDD remains the sovereign control plane for lifecycle, canonical state, ADRs, quality gates, evidence, and finalize decisions.',
|
|
21
|
+
'Never mutate .sdd/state/*.yaml directly. Durable state changes must pass through CodeSDD services or CLI commands.',
|
|
22
|
+
'Treat plugins as deterministic construction envelopes and use broker-mediated flows for apply operations.',
|
|
23
|
+
].join('\n');
|
|
24
|
+
const DEFAULT_HITL_INTERRUPT_ON = {
|
|
25
|
+
edit_file: { allowedDecisions: ['approve', 'edit', 'reject'] },
|
|
26
|
+
write_file: { allowedDecisions: ['approve', 'edit', 'reject'] },
|
|
27
|
+
execute: { allowedDecisions: ['approve', 'edit', 'reject'] },
|
|
28
|
+
};
|
|
29
|
+
export async function createDeepAgentsRuntimeAdapter(request, options = {}) {
|
|
30
|
+
const snapshot = options.snapshot ?? createDeepAgentsPolicySnapshot(options.env);
|
|
31
|
+
const normalizedRequest = normalizeRuntimeRequest(request, snapshot);
|
|
32
|
+
const policyDecision = evaluateDeepAgentsRuntimePolicyEnforcement(snapshot, {
|
|
33
|
+
projectRoot: request.projectRoot,
|
|
34
|
+
mode: normalizedRequest.mode,
|
|
35
|
+
trustTier: request.trustTier,
|
|
36
|
+
writeScope: request.writeScope,
|
|
37
|
+
plannedWrites: request.plannedWrites,
|
|
38
|
+
requestedEnv: request.requestedEnv,
|
|
39
|
+
networkDomains: request.networkDomains,
|
|
40
|
+
operations: request.operations,
|
|
41
|
+
approvalGrants: request.approvalGrants,
|
|
42
|
+
env: options.env,
|
|
43
|
+
});
|
|
44
|
+
if (policyDecision.status === 'blocked' && snapshot.runtime !== 'disabled' && snapshot.enabled) {
|
|
45
|
+
const blockedLoadResult = buildPolicyBlockedLoadResult(snapshot, options.env, policyDecision);
|
|
46
|
+
return new PolicyOnlyDeepAgentsRuntimeAdapter(normalizedRequest, snapshot, blockedLoadResult, policyDecision);
|
|
47
|
+
}
|
|
48
|
+
const loadResult = await loadDeepAgentsRuntimeModule(snapshot, options.env, options.importer);
|
|
49
|
+
if (loadResult.status === 'loaded') {
|
|
50
|
+
return new DeepAgentsJsRuntimeAdapter(normalizedRequest, snapshot, loadResult, policyDecision, options.env, options.modelProviderImporter);
|
|
51
|
+
}
|
|
52
|
+
if (loadResult.status === 'fake') {
|
|
53
|
+
return new FakeDeepAgentsRuntimeAdapter(normalizedRequest, snapshot, loadResult, policyDecision, options.env);
|
|
54
|
+
}
|
|
55
|
+
return new PolicyOnlyDeepAgentsRuntimeAdapter(normalizedRequest, snapshot, loadResult, policyDecision, options.env);
|
|
56
|
+
}
|
|
57
|
+
export function buildDeepAgentsAgentConfig(request, snapshot) {
|
|
58
|
+
const config = {
|
|
59
|
+
name: request.name,
|
|
60
|
+
model: snapshot.model,
|
|
61
|
+
systemPrompt: request.systemPrompt,
|
|
62
|
+
interruptOn: request.interruptOn,
|
|
63
|
+
};
|
|
64
|
+
if (request.tools && request.tools.length > 0) {
|
|
65
|
+
config.tools = request.tools;
|
|
66
|
+
}
|
|
67
|
+
if (request.subagents && request.subagents.length > 0) {
|
|
68
|
+
config.subagents = request.subagents;
|
|
69
|
+
}
|
|
70
|
+
if (request.skills.length > 0) {
|
|
71
|
+
config.skills = request.skills;
|
|
72
|
+
}
|
|
73
|
+
if (request.backend) {
|
|
74
|
+
config.backend = request.backend;
|
|
75
|
+
}
|
|
76
|
+
return config;
|
|
77
|
+
}
|
|
78
|
+
function normalizeRuntimeRequest(request, snapshot) {
|
|
79
|
+
const featureRef = request.featureRef.trim().toUpperCase();
|
|
80
|
+
const mode = request.mode ?? snapshot.defaultMode;
|
|
81
|
+
const name = (request.name || `codesdd-${featureRef.toLowerCase()}-deepagent`).trim();
|
|
82
|
+
const runId = (request.runId || `deepagents-${featureRef}-${mode}-${snapshot.configFingerprint.slice(0, 12)}`).trim();
|
|
83
|
+
const promptParts = [
|
|
84
|
+
DEFAULT_SYSTEM_PROMPT,
|
|
85
|
+
`Feature: ${featureRef}`,
|
|
86
|
+
`Execution mode: ${mode}`,
|
|
87
|
+
`Objective: ${request.objective.trim()}`,
|
|
88
|
+
];
|
|
89
|
+
if (request.systemPrompt?.trim()) {
|
|
90
|
+
promptParts.push(request.systemPrompt.trim());
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
featureRef,
|
|
94
|
+
objective: request.objective.trim(),
|
|
95
|
+
mode,
|
|
96
|
+
name,
|
|
97
|
+
runId,
|
|
98
|
+
systemPrompt: promptParts.join('\n\n'),
|
|
99
|
+
tools: request.tools ?? [],
|
|
100
|
+
subagents: request.subagents ?? [],
|
|
101
|
+
skills: request.skills ?? [],
|
|
102
|
+
backend: request.backend,
|
|
103
|
+
interruptOn: request.interruptOn ?? DEFAULT_HITL_INTERRUPT_ON,
|
|
104
|
+
expectedEvidence: request.expectedEvidence ?? DEFAULT_EXPECTED_EVIDENCE,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
class BaseDeepAgentsRuntimeAdapter {
|
|
108
|
+
request;
|
|
109
|
+
snapshot;
|
|
110
|
+
loadResult;
|
|
111
|
+
policyDecision;
|
|
112
|
+
env;
|
|
113
|
+
reasons;
|
|
114
|
+
constructor(request, snapshot, loadResult, policyDecision, env = process.env) {
|
|
115
|
+
this.request = request;
|
|
116
|
+
this.snapshot = snapshot;
|
|
117
|
+
this.loadResult = loadResult;
|
|
118
|
+
this.policyDecision = policyDecision;
|
|
119
|
+
this.env = env;
|
|
120
|
+
this.reasons = loadResult.reasons;
|
|
121
|
+
}
|
|
122
|
+
get runtime() {
|
|
123
|
+
return this.loadResult.runtime;
|
|
124
|
+
}
|
|
125
|
+
describe() {
|
|
126
|
+
return {
|
|
127
|
+
schema_version: 1,
|
|
128
|
+
contract: 'deepagents-runtime-adapter/v1',
|
|
129
|
+
runtime: this.runtime,
|
|
130
|
+
status: this.status,
|
|
131
|
+
feature_ref: this.request.featureRef,
|
|
132
|
+
mode: this.request.mode,
|
|
133
|
+
run_id: this.request.runId,
|
|
134
|
+
fail_closed: true,
|
|
135
|
+
can_instantiate_agent: this.canInstantiateAgent,
|
|
136
|
+
config_fingerprint: this.snapshot.configFingerprint,
|
|
137
|
+
readiness: this.loadResult.readiness,
|
|
138
|
+
policy: this.policyDecision,
|
|
139
|
+
reasons: this.reasons,
|
|
140
|
+
expected_evidence: this.request.expectedEvidence,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
blockedAgent(message) {
|
|
144
|
+
throw new DeepAgentsRuntimeAdapterError(message, this.describe());
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function buildPolicyBlockedLoadResult(snapshot, env, policyDecision) {
|
|
148
|
+
const readiness = evaluateDeepAgentsRuntimeReadiness(snapshot, env);
|
|
149
|
+
return {
|
|
150
|
+
status: 'blocked',
|
|
151
|
+
runtime: snapshot.runtime,
|
|
152
|
+
readiness,
|
|
153
|
+
moduleAvailable: false,
|
|
154
|
+
reasons: [...readiness.reasons, ...policyDecision.reasons],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
class PolicyOnlyDeepAgentsRuntimeAdapter extends BaseDeepAgentsRuntimeAdapter {
|
|
158
|
+
get status() {
|
|
159
|
+
return this.loadResult.status === 'disabled' ? 'disabled' : 'blocked';
|
|
160
|
+
}
|
|
161
|
+
get canInstantiateAgent() {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
createAgentConfig() {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
async createAgent() {
|
|
168
|
+
return this.blockedAgent('DeepAgents runtime is not available under the current policy snapshot.');
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
class FakeDeepAgentsRuntimeAdapter extends BaseDeepAgentsRuntimeAdapter {
|
|
172
|
+
get status() {
|
|
173
|
+
return 'ready';
|
|
174
|
+
}
|
|
175
|
+
get canInstantiateAgent() {
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
createAgentConfig() {
|
|
179
|
+
return buildDeepAgentsAgentConfig(this.request, this.snapshot);
|
|
180
|
+
}
|
|
181
|
+
async createAgent() {
|
|
182
|
+
const envelope = this.describe();
|
|
183
|
+
const request = this.request;
|
|
184
|
+
return {
|
|
185
|
+
async invoke(input) {
|
|
186
|
+
return {
|
|
187
|
+
schema_version: 1,
|
|
188
|
+
contract: 'deepagents-fake-agent-result/v1',
|
|
189
|
+
runtime: 'fake',
|
|
190
|
+
status: 'completed',
|
|
191
|
+
feature_ref: request.featureRef,
|
|
192
|
+
mode: request.mode,
|
|
193
|
+
run_id: request.runId,
|
|
194
|
+
objective: request.objective,
|
|
195
|
+
input,
|
|
196
|
+
adapter: envelope,
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
class DeepAgentsJsRuntimeAdapter extends BaseDeepAgentsRuntimeAdapter {
|
|
203
|
+
modelProviderImporter;
|
|
204
|
+
constructor(request, snapshot, loadResult, policyDecision, env = process.env, modelProviderImporter) {
|
|
205
|
+
super(request, snapshot, loadResult, policyDecision, env);
|
|
206
|
+
this.modelProviderImporter = modelProviderImporter;
|
|
207
|
+
}
|
|
208
|
+
get status() {
|
|
209
|
+
return 'ready';
|
|
210
|
+
}
|
|
211
|
+
get canInstantiateAgent() {
|
|
212
|
+
return true;
|
|
213
|
+
}
|
|
214
|
+
createAgentConfig() {
|
|
215
|
+
return buildDeepAgentsAgentConfig(this.request, this.snapshot);
|
|
216
|
+
}
|
|
217
|
+
async createAgent() {
|
|
218
|
+
const module = this.loadResult.module;
|
|
219
|
+
const createDeepAgent = module?.createDeepAgent;
|
|
220
|
+
if (typeof createDeepAgent !== 'function') {
|
|
221
|
+
return this.blockedAgent('deepagents-js runtime module is loaded but createDeepAgent is not callable.');
|
|
222
|
+
}
|
|
223
|
+
const config = this.createAgentConfig();
|
|
224
|
+
const model = await materializeDeepAgentsModel(this.snapshot.model, this.env, this.modelProviderImporter);
|
|
225
|
+
return createDeepAgent({
|
|
226
|
+
...config,
|
|
227
|
+
...(model ? { model } : {}),
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=runtime-factory.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type DeepAgentsPolicySnapshot, type DeepAgentsRuntimeMode, type DeepAgentsRuntimeReadiness } from './policy.js';
|
|
2
|
+
export interface DeepAgentsRuntimeModule {
|
|
3
|
+
createDeepAgent: unknown;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
export interface DeepAgentsRuntimeLoadResult {
|
|
7
|
+
status: 'disabled' | 'fake' | 'loaded' | 'blocked';
|
|
8
|
+
runtime: DeepAgentsRuntimeMode;
|
|
9
|
+
readiness: DeepAgentsRuntimeReadiness;
|
|
10
|
+
moduleAvailable: boolean;
|
|
11
|
+
module?: DeepAgentsRuntimeModule;
|
|
12
|
+
reasons: string[];
|
|
13
|
+
}
|
|
14
|
+
export type DeepAgentsRuntimeImporter = () => Promise<Record<string, unknown>>;
|
|
15
|
+
export declare function loadDeepAgentsRuntimeModule(snapshot?: DeepAgentsPolicySnapshot, env?: NodeJS.ProcessEnv, importer?: DeepAgentsRuntimeImporter): Promise<DeepAgentsRuntimeLoadResult>;
|
|
16
|
+
//# sourceMappingURL=runtime-loader.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { createDeepAgentsPolicySnapshot, evaluateDeepAgentsRuntimeReadiness, } from './policy.js';
|
|
2
|
+
export async function loadDeepAgentsRuntimeModule(snapshot = createDeepAgentsPolicySnapshot(), env = process.env, importer = importDeepAgentsPackage) {
|
|
3
|
+
const readiness = evaluateDeepAgentsRuntimeReadiness(snapshot, env);
|
|
4
|
+
if (readiness.status === 'disabled') {
|
|
5
|
+
return {
|
|
6
|
+
status: 'disabled',
|
|
7
|
+
runtime: snapshot.runtime,
|
|
8
|
+
readiness,
|
|
9
|
+
moduleAvailable: false,
|
|
10
|
+
reasons: readiness.reasons,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
if (snapshot.runtime === 'fake' && readiness.status === 'ready') {
|
|
14
|
+
return {
|
|
15
|
+
status: 'fake',
|
|
16
|
+
runtime: snapshot.runtime,
|
|
17
|
+
readiness,
|
|
18
|
+
moduleAvailable: false,
|
|
19
|
+
reasons: [],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (readiness.status === 'blocked') {
|
|
23
|
+
return {
|
|
24
|
+
status: 'blocked',
|
|
25
|
+
runtime: snapshot.runtime,
|
|
26
|
+
readiness,
|
|
27
|
+
moduleAvailable: false,
|
|
28
|
+
reasons: readiness.reasons,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
const module = await importer();
|
|
33
|
+
if (typeof module.createDeepAgent !== 'function') {
|
|
34
|
+
return {
|
|
35
|
+
status: 'blocked',
|
|
36
|
+
runtime: snapshot.runtime,
|
|
37
|
+
readiness,
|
|
38
|
+
moduleAvailable: true,
|
|
39
|
+
reasons: ['deepagents package is installed but does not expose createDeepAgent.'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
status: 'loaded',
|
|
44
|
+
runtime: snapshot.runtime,
|
|
45
|
+
readiness,
|
|
46
|
+
moduleAvailable: true,
|
|
47
|
+
module: module,
|
|
48
|
+
reasons: [],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
53
|
+
return {
|
|
54
|
+
status: 'blocked',
|
|
55
|
+
runtime: snapshot.runtime,
|
|
56
|
+
readiness,
|
|
57
|
+
moduleAvailable: false,
|
|
58
|
+
reasons: [`deepagents package could not be loaded lazily: ${message}`],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async function importDeepAgentsPackage() {
|
|
63
|
+
return import('deepagents');
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=runtime-loader.js.map
|
|
@@ -10,14 +10,14 @@ export interface SddReadmeFolders {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function buildSddInternalReadme(memoryDir?: string, folders?: SddReadmeFolders): string;
|
|
12
12
|
export declare const PROMPTS_README_MD = "# Recommended SDD Prompts\n\nUse these prompts to speed up agent workflows without losing the SDD standard.\n\n## Recommended Order For Raw Material\n1. `00-start-here.md`\n2. `01-source-intake.md`\n3. `02-normalize-planning.md`\n4. `03-feature-execution.md`\n5. `04-finalize-consolidation.md`\n\nRule: prompts guide the agent, but the canonical state remains in `.sdd/state/*.yaml`.\nDo not persist project memory, workflow state, backlog, or handoff in external context stores.\n";
|
|
13
|
-
export declare const PROMPT_00_COMECE_POR_AQUI_MD = "# Start Here (First Use)\n\nIf you have never used CodeSDD, follow this order.\n\n## 1) Install And Initialize The Project\n\nIn the terminal, from your project directory:\n\n```bash\ncodesdd install --tools none --lang en-US --layout en-US\ncodesdd sdd init --frontend --lang en-US --layout en-US\ncodesdd sdd init-context\ncodesdd sdd check --render\ncodesdd sdd rebuild --from-disk --dry-run\ncodesdd sdd dedup --apply --dry-run\ncodesdd sdd onboard system\n```\n\n## 2) Understand The Main Folders\n\n- `.sdd/sources/`: raw material such as PRDs, wireframes, stories, and references.\n- `.sdd/state/`: canonical YAML source of truth.\n- `.sdd/core/`: generated human-readable system overview.\n- `.sdd/planning/`: backlog, progress, and finalize queue.\n- `.sdd/active/`: active FEAT workspaces.\n- `.sdd/archived/`: finalized workspaces.\n\nCodeSDD is the only operational memory for the project. Do not use external context, memory, workflow, backlog, scratchpad, or handoff stores as active project state.\n\n## 3) I Have PRDs, Wireframes, Or Stories. What Now?\n\n1. Place the files under `.sdd/sources/` in the appropriate subfolders.\n2. Run:\n\n```bash\ncodesdd sdd ingest-deposito --source-dir .sdd/sources --title \"Initial system planning\"\n```\n\n3. Review:\n\n```bash\ncodesdd sdd check --render\ncodesdd sdd next\n```\n\nExpected result:\n- sources indexed in `.sdd/state/source-index.yaml`\n- EPIC created or reused\n- FEATs generated in the backlog\n- first ready FEAT started automatically when possible\n\n## 4) Execute A Feature\n\n```bash\ncodesdd sdd start FEAT-0001 --flow-mode standard\ncodesdd sdd context FEAT-0001\ncodesdd sdd frontend-impact FEAT-0001 --status required --reason \"New route and UI components\"\n```\n\nImplement and update the FEAT package:\n- `1-spec.yaml`\n- `2-plan.yaml`\n- `5-quality.yaml`\n- `3-tasks.yaml`\n- `4-changelog.yaml`\n\n## 5) Finalize Without Losing Context\n\n```bash\ncodesdd sdd finalize --ref FEAT-0001\ncodesdd sdd check --render\ncodesdd sdd onboard system\n```\n\nGolden rule:\n- A FEAT is only truly complete after documentation consolidation.\n\n## 6) Short Usage Story\n\nThe team placed a PRD and a wireframe in `.sdd/sources/`.\nThey ran `codesdd sdd ingest-deposito --source-dir .sdd/sources` and got an EPIC plus ready FEATs.\nThey started the priority FEAT with `codesdd sdd start FEAT-0001`.\nBefore coding, they ran `codesdd sdd context FEAT-0001`.\nAfter implementation, they ran `codesdd sdd finalize --ref FEAT-0001`.\nResult: backlog updated, docs synchronized, and the next FEAT released without guesswork.\n\n## 7) Essential Commands\n\n- `codesdd sdd onboard system`: understand the current state.\n- `codesdd sdd ingest-deposito --source-dir .sdd/sources`: turn raw material into an executable trail.\n- `codesdd sdd rebuild --from-disk --dry-run`: preview state reconciliation from disk artifacts.\n- `codesdd sdd audit --json`: persist an audit snapshot in `.sdd/state/audit-history.yaml`.\n- `codesdd sdd metrics --since 7d`: inspect lead time, aging, and throughput.\n- `codesdd sdd dedup --apply --dry-run`: preview historical warning_links reconciliation.\n- `codesdd sdd lint feature FEAT-0001`: inspect feature scope before execution.\n- `codesdd sdd next`: see what can start now.\n- `codesdd sdd start FEAT-0001`: open feature execution.\n- `codesdd sdd context FEAT-0001`: generate focused context.\n- `codesdd sdd frontend-impact FEAT-0001 --status required|none --reason \"...\"`: declare frontend impact.\n- `codesdd sdd finalize --ref FEAT-0001`: consolidate memory and close.\n";
|
|
13
|
+
export declare const PROMPT_00_COMECE_POR_AQUI_MD = "# Start Here (First Use)\n\nIf you have never used CodeSDD, follow this order.\n\n## 1) Install And Initialize The Project\n\nIn the terminal, from your project directory:\n\n```bash\ncodesdd install --tools none --lang en-US --layout en-US\ncodesdd sdd init --frontend --lang en-US --layout en-US\ncodesdd sdd init-context --frontend --lang en-US --layout en-US\ncodesdd sdd check --render\ncodesdd sdd rebuild --from-disk --dry-run\ncodesdd sdd dedup --apply --dry-run\ncodesdd sdd onboard system\ncodesdd reload --tools none --lang en-US --layout en-US\n```\n\n## 2) Understand The Main Folders\n\n- `.sdd/sources/`: raw material such as PRDs, wireframes, stories, and references.\n- `.sdd/state/`: canonical YAML source of truth.\n- `.sdd/core/`: generated human-readable system overview.\n- `.sdd/planning/`: backlog, progress, and finalize queue.\n- `.sdd/active/`: active FEAT workspaces.\n- `.sdd/archived/`: finalized workspaces.\n\nCodeSDD is the only operational memory for the project. Do not use external context, memory, workflow, backlog, scratchpad, or handoff stores as active project state.\nIn initialized CodeSDD repositories, requests that imply implementation, edits, validation, execution, or finalize implicitly require CodeSDD planning unless explicitly marked read-only or outside CodeSDD.\n\n## 3) I Have PRDs, Wireframes, Or Stories. What Now?\n\n1. Place the files under `.sdd/sources/` in the appropriate subfolders.\n2. Run:\n\n```bash\ncodesdd sdd ingest-deposito --source-dir .sdd/sources --title \"Initial system planning\"\n```\n\n3. Review:\n\n```bash\ncodesdd sdd check --render\ncodesdd sdd next\n```\n\nExpected result:\n- sources indexed in `.sdd/state/source-index.yaml`\n- EPIC created or reused\n- FEATs generated in the backlog\n- first ready FEAT started automatically when possible\n\n## 4) Execute A Feature\n\n```bash\ncodesdd sdd start FEAT-0001 --flow-mode standard\ncodesdd sdd context FEAT-0001\ncodesdd sdd frontend-impact FEAT-0001 --status required --reason \"New route and UI components\"\n```\n\nImplement and update the FEAT package:\n- `1-spec.yaml`\n- `2-plan.yaml`\n- `5-quality.yaml`\n- `3-tasks.yaml`\n- `4-changelog.yaml`\n\n## 5) Finalize Without Losing Context\n\n```bash\ncodesdd sdd finalize --ref FEAT-0001\ncodesdd sdd check --render\ncodesdd sdd onboard system\n```\n\nGolden rule:\n- A FEAT is only truly complete after documentation consolidation.\n\n## 6) Short Usage Story\n\nThe team placed a PRD and a wireframe in `.sdd/sources/`.\nThey ran `codesdd sdd ingest-deposito --source-dir .sdd/sources` and got an EPIC plus ready FEATs.\nThey started the priority FEAT with `codesdd sdd start FEAT-0001`.\nBefore coding, they ran `codesdd sdd context FEAT-0001`.\nAfter implementation, they ran `codesdd sdd finalize --ref FEAT-0001`.\nResult: backlog updated, docs synchronized, and the next FEAT released without guesswork.\n\n## 7) Essential Commands\n\n- `codesdd sdd onboard system`: understand the current state.\n- `codesdd sdd ingest-deposito --source-dir .sdd/sources`: turn raw material into an executable trail.\n- `codesdd sdd rebuild --from-disk --dry-run`: preview state reconciliation from disk artifacts.\n- `codesdd sdd audit --json`: persist an audit snapshot in `.sdd/state/audit-history.yaml`.\n- `codesdd sdd metrics --since 7d`: inspect lead time, aging, and throughput.\n- `codesdd sdd dedup --apply --dry-run`: preview historical warning_links reconciliation.\n- `codesdd sdd lint feature FEAT-0001`: inspect feature scope before execution.\n- `codesdd sdd next`: see what can start now.\n- `codesdd sdd start FEAT-0001`: open feature execution.\n- `codesdd sdd context FEAT-0001`: generate focused context.\n- `codesdd sdd frontend-impact FEAT-0001 --status required|none --reason \"...\"`: declare frontend impact.\n- `codesdd sdd finalize --ref FEAT-0001`: consolidate memory and close.\n";
|
|
14
14
|
export declare const PROMPT_01_INGESTAO_DEPOSITO_MD = "# Prompt: Source Intake\n\nUse the skills:\n- source-intake-sdd\n- business-extractor-sdd\n- frontend-extractor-sdd\n- planning-normalizer-sdd\n\nObjective:\n1. Scan `.sdd/sources/`.\n2. Update `.sdd/state/source-index.yaml`.\n3. Consolidate canonical context (`architecture`, `service-catalog`, `tech-stack`, `integration-contracts`, and frontend when enabled).\n4. Generate an executable trail (EPIC plus FEATs) with source traceability.\n\nRequired output:\n- summary of sources read;\n- IDs created or updated (EPIC/FEAT/FGAP/INS when ambiguity exists);\n- recommended next CLI commands.\n";
|
|
15
15
|
export declare const PROMPT_02_NORMALIZAR_PLANEJAMENTO_MD = "# Prompt: Normalize Planning\n\nObjective:\nTurn consolidated material into an executable plan with clear dependencies.\n\nInstructions:\n1. Start from `.sdd/state/source-index.yaml` and `.sdd/core/*.md`.\n2. Propose EPICs and FEATs with clear English names.\n3. Define dependencies (`blocked_by`) and conflicts (`lock_domains`).\n4. List what can run in parallel.\n5. End with a documentation consolidation checklist per feature.\n";
|
|
16
|
-
export declare const PROMPT_03_EXECUCAO_FEATURE_MD = "# Prompt: Feature Execution\n\nObjective:\nExecute a FEAT without losing traceability.\n\nInstructions:\n1. Run `codesdd sdd context FEAT-0001`.\
|
|
16
|
+
export declare const PROMPT_03_EXECUCAO_FEATURE_MD = "# Prompt: Feature Execution\n\nObjective:\nExecute a FEAT without losing traceability.\n\nInstructions:\n1. Treat implementation, edit, validation, execution, and finalize requests as requiring CodeSDD planning unless the user explicitly marks the request as read-only or outside CodeSDD.\n2. Run `codesdd sdd next` and bind the work to the active or ready FEAT returned by CodeSDD.\n3. Run `codesdd sdd context FEAT-0001`.\n4. Update `.sdd/active/FEAT-0001/` (spec, plan, tasks, changelog).\n5. Implement.\n6. Update `.sdd/active/FEAT-0001/5-quality.yaml` with evidence or a formal exception; quality contracts are blocking by default.\n7. Update affected canonical docs.\n8. Declare frontend impact with `codesdd sdd frontend-impact FEAT-0001 ...`.\n9. Ensure architectural-impact FEATs have an ADR before finalize.\n10. Finish with `codesdd sdd finalize --ref FEAT-0001`.\n";
|
|
17
17
|
export declare const PROMPT_04_CONSOLIDACAO_FINALIZE_MD = "# Prompt: Consolidation And Finalize\n\nObjective:\nClose a feature with complete operational memory.\n\nChecklist:\n1. Review the FEAT technical diff.\n2. Update central documentation (`README.md`, `.sdd/AGENT.md`, `.sdd/core/*.md`, `AGENTS.md`, `AGENT.md`).\n3. Ensure frontend gaps or decisions are recorded when applicable.\n4. Declare frontend impact with `codesdd sdd frontend-impact FEAT-0001 --status required|none --reason \"...\"`.\n5. Run `codesdd sdd check --render`.\n6. Run `codesdd sdd finalize --ref FEAT-0001` and report updated docs.\n";
|
|
18
18
|
export declare const TEMPLATE_1_SPEC_MD = "schema_version: 1\nfeature_id: FEAT-0001\ntitle: Example workspace specification\norigin:\n type: direct\n ref: FEAT-0001\nobjective: This YAML specification records the feature objective with enough detail for agents to understand the expected implementation scope, user or system value, dependencies, and validation intent before source changes begin.\nexpected_outcome: The feature reaches a verifiable done state with its implementation, documentation, and quality evidence synchronized in CodeSDD.\nsystem_impact: The workspace keeps canonical state, generated views, and operational handoff aligned with the implementation.\nacceptance_refs:\n - FEAT-0001\ngates:\n proposta:\n status: rascunho\n planejamento:\n status: rascunho\n tarefas:\n status: rascunho\ncompliance_context:\n jurisdictions:\n - BR-LGPD\n data_classes:\n - personal_data\n source_refs:\n - SRC-0001\n legal_review_required: false\n legal_review_notes: \"\"\ncreated_at: 2026-01-01T00:00:00.000Z\nupdated_at: 2026-01-01T00:00:00.000Z\n";
|
|
19
19
|
export declare const TEMPLATE_2_PLAN_MD: string;
|
|
20
|
-
export declare const TEMPLATE_QUALITY_MD = "schema_version: 1\nfeature_id: FEAT-0001\ncoverage_targets:\n unit: 95\n integration: 95\nvalidation_strategies:\n - name: Targeted tests\n command: pnpm test\n expected: Tests pass for the touched scope.\nevidence_log: []\nskill_evidence:\n required_skill_ids: []\n evidence: []\n verification_rule: No skill evidence required for this feature.\nacceptance_matrix:\n - criterion: requirements\n status: not_met\n evidence: Add validation evidence before finalize.\nexceptions: []\nremediation_policy:\n on_coverage_miss: block\n max_rounds: 3\ntraceability:\n spec_anchor:\n spec_updated_at: \"\"\n changelog_refs: []\n requirements: []\nsecurity_integrity:\n endpoint_auth_review: pending\n sensitive_data_exposure_review: pending\n incident_response_review: pending\n notes: Record endpoint/data exposure evidence before finalize when privacy impact exists.\n";
|
|
20
|
+
export declare const TEMPLATE_QUALITY_MD = "schema_version: 1\nfeature_id: FEAT-0001\ncoverage_targets:\n unit: 95\n integration: 95\nvalidation_strategies:\n - name: Targeted tests\n command: pnpm test\n expected: Tests pass for the touched scope.\nevidence_log: []\nskill_evidence:\n required_skill_ids: []\n evidence: []\n verification_rule: No skill evidence required for this feature.\nacceptance_matrix:\n - criterion: requirements\n status: not_met\n evidence: Add validation evidence before finalize.\nexceptions: []\nremediation_policy:\n on_coverage_miss: block\n max_rounds: 3\ntraceability:\n spec_anchor:\n spec_updated_at: \"\"\n changelog_refs: []\n requirements: []\nq95_ledger:\n threshold: 95\n score: 0\n status: pending\n computed_at: \"\"\n weights:\n coverage: 30\n traceability: 20\n integrity: 20\n naming: 10\n token: 20\n axes:\n coverage:\n raw_score: 0\n weighted_score: 0\n rationale: Computed during finalize.\n traceability:\n raw_score: 0\n weighted_score: 0\n rationale: Computed during finalize.\n integrity:\n raw_score: 0\n weighted_score: 0\n rationale: Computed during finalize.\n naming:\n raw_score: 0\n weighted_score: 0\n rationale: Computed during finalize.\n token:\n raw_score: 0\n weighted_score: 0\n rationale: Computed during finalize.\n next_best_action: Record missing evidence to raise the lowest weighted axis.\nsecurity_integrity:\n endpoint_auth_review: pending\n sensitive_data_exposure_review: pending\n incident_response_review: pending\n notes: Record endpoint/data exposure evidence before finalize when privacy impact exists.\n";
|
|
21
21
|
export declare const TEMPLATE_3_TASKS_MD: string;
|
|
22
22
|
export declare const TEMPLATE_4_CHANGELOG_MD = "schema_version: 1\nfeature_id: FEAT-0001\nentries:\n - timestamp: 2026-01-01T00:00:00.000Z\n action: created\n details: Workspace changelog initialized.\n";
|
|
23
23
|
//# sourceMappingURL=default-bootstrap-files.d.ts.map
|