@devtrack-solution/codesdd 1.2.2
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 +2751 -0
- package/.sdd/skills/curated/devtrack-api/SKILL.md +137 -0
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +4 -0
- package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +381 -0
- package/.sdd/skills/curated/devtrack-api/references/architecture-governance.md +219 -0
- package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +359 -0
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +127 -0
- package/.sdd/skills/curated/devtrack-api/references/imports-lint.md +207 -0
- package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +167 -0
- package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +334 -0
- package/LICENSE +21 -0
- package/README.md +842 -0
- package/bin/codesdd.js +10 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +560 -0
- package/dist/commands/change.d.ts +35 -0
- package/dist/commands/change.js +296 -0
- package/dist/commands/completion.d.ts +72 -0
- package/dist/commands/completion.js +258 -0
- package/dist/commands/config.d.ts +36 -0
- package/dist/commands/config.js +552 -0
- package/dist/commands/feedback.d.ts +9 -0
- package/dist/commands/feedback.js +184 -0
- package/dist/commands/schema.d.ts +6 -0
- package/dist/commands/schema.js +870 -0
- package/dist/commands/sdd/execution.d.ts +3 -0
- package/dist/commands/sdd/execution.js +409 -0
- package/dist/commands/sdd/shared.d.ts +9 -0
- package/dist/commands/sdd/shared.js +84 -0
- package/dist/commands/sdd/skills.d.ts +3 -0
- package/dist/commands/sdd/skills.js +154 -0
- package/dist/commands/sdd.d.ts +3 -0
- package/dist/commands/sdd.js +769 -0
- package/dist/commands/show.d.ts +14 -0
- package/dist/commands/show.js +133 -0
- package/dist/commands/spec.d.ts +15 -0
- package/dist/commands/spec.js +228 -0
- package/dist/commands/validate.d.ts +24 -0
- package/dist/commands/validate.js +295 -0
- package/dist/commands/workflow/index.d.ts +17 -0
- package/dist/commands/workflow/index.js +12 -0
- package/dist/commands/workflow/instructions.d.ts +29 -0
- package/dist/commands/workflow/instructions.js +383 -0
- package/dist/commands/workflow/new-change.d.ts +11 -0
- package/dist/commands/workflow/new-change.js +45 -0
- package/dist/commands/workflow/schemas.d.ts +10 -0
- package/dist/commands/workflow/schemas.js +34 -0
- package/dist/commands/workflow/shared.d.ts +57 -0
- package/dist/commands/workflow/shared.js +117 -0
- package/dist/commands/workflow/status.d.ts +14 -0
- package/dist/commands/workflow/status.js +76 -0
- package/dist/commands/workflow/templates.d.ts +16 -0
- package/dist/commands/workflow/templates.js +68 -0
- package/dist/core/archive.d.ts +16 -0
- package/dist/core/archive.js +487 -0
- package/dist/core/artifact-graph/graph.d.ts +56 -0
- package/dist/core/artifact-graph/graph.js +141 -0
- package/dist/core/artifact-graph/index.d.ts +7 -0
- package/dist/core/artifact-graph/index.js +13 -0
- package/dist/core/artifact-graph/instruction-loader.d.ts +143 -0
- package/dist/core/artifact-graph/instruction-loader.js +215 -0
- package/dist/core/artifact-graph/resolver.d.ts +81 -0
- package/dist/core/artifact-graph/resolver.js +258 -0
- package/dist/core/artifact-graph/schema.d.ts +13 -0
- package/dist/core/artifact-graph/schema.js +108 -0
- package/dist/core/artifact-graph/state.d.ts +12 -0
- package/dist/core/artifact-graph/state.js +54 -0
- package/dist/core/artifact-graph/types.d.ts +45 -0
- package/dist/core/artifact-graph/types.js +43 -0
- package/dist/core/available-tools.d.ts +16 -0
- package/dist/core/available-tools.js +30 -0
- package/dist/core/branding.d.ts +8 -0
- package/dist/core/branding.js +12 -0
- package/dist/core/cli/command-matrix.d.ts +23 -0
- package/dist/core/cli/command-matrix.js +123 -0
- package/dist/core/command-generation/adapters/amazon-q.d.ts +13 -0
- package/dist/core/command-generation/adapters/amazon-q.js +26 -0
- package/dist/core/command-generation/adapters/antigravity.d.ts +13 -0
- package/dist/core/command-generation/adapters/antigravity.js +26 -0
- package/dist/core/command-generation/adapters/auggie.d.ts +13 -0
- package/dist/core/command-generation/adapters/auggie.js +27 -0
- package/dist/core/command-generation/adapters/claude.d.ts +13 -0
- package/dist/core/command-generation/adapters/claude.js +50 -0
- package/dist/core/command-generation/adapters/cline.d.ts +14 -0
- package/dist/core/command-generation/adapters/cline.js +27 -0
- package/dist/core/command-generation/adapters/codebuddy.d.ts +13 -0
- package/dist/core/command-generation/adapters/codebuddy.js +28 -0
- package/dist/core/command-generation/adapters/codex.d.ts +16 -0
- package/dist/core/command-generation/adapters/codex.js +39 -0
- package/dist/core/command-generation/adapters/continue.d.ts +13 -0
- package/dist/core/command-generation/adapters/continue.js +28 -0
- package/dist/core/command-generation/adapters/costrict.d.ts +13 -0
- package/dist/core/command-generation/adapters/costrict.js +27 -0
- package/dist/core/command-generation/adapters/crush.d.ts +13 -0
- package/dist/core/command-generation/adapters/crush.js +30 -0
- package/dist/core/command-generation/adapters/cursor.d.ts +14 -0
- package/dist/core/command-generation/adapters/cursor.js +44 -0
- package/dist/core/command-generation/adapters/factory.d.ts +13 -0
- package/dist/core/command-generation/adapters/factory.js +27 -0
- package/dist/core/command-generation/adapters/gemini.d.ts +13 -0
- package/dist/core/command-generation/adapters/gemini.js +26 -0
- package/dist/core/command-generation/adapters/github-copilot.d.ts +13 -0
- package/dist/core/command-generation/adapters/github-copilot.js +26 -0
- package/dist/core/command-generation/adapters/iflow.d.ts +13 -0
- package/dist/core/command-generation/adapters/iflow.js +29 -0
- package/dist/core/command-generation/adapters/index.d.ts +29 -0
- package/dist/core/command-generation/adapters/index.js +29 -0
- package/dist/core/command-generation/adapters/kilocode.d.ts +14 -0
- package/dist/core/command-generation/adapters/kilocode.js +23 -0
- package/dist/core/command-generation/adapters/kiro.d.ts +13 -0
- package/dist/core/command-generation/adapters/kiro.js +26 -0
- package/dist/core/command-generation/adapters/opencode.d.ts +13 -0
- package/dist/core/command-generation/adapters/opencode.js +29 -0
- package/dist/core/command-generation/adapters/pi.d.ts +14 -0
- package/dist/core/command-generation/adapters/pi.js +41 -0
- package/dist/core/command-generation/adapters/qoder.d.ts +13 -0
- package/dist/core/command-generation/adapters/qoder.js +30 -0
- package/dist/core/command-generation/adapters/qwen.d.ts +13 -0
- package/dist/core/command-generation/adapters/qwen.js +26 -0
- package/dist/core/command-generation/adapters/roocode.d.ts +14 -0
- package/dist/core/command-generation/adapters/roocode.js +27 -0
- package/dist/core/command-generation/adapters/windsurf.d.ts +14 -0
- package/dist/core/command-generation/adapters/windsurf.js +51 -0
- package/dist/core/command-generation/generator.d.ts +21 -0
- package/dist/core/command-generation/generator.js +27 -0
- package/dist/core/command-generation/index.d.ts +22 -0
- package/dist/core/command-generation/index.js +24 -0
- package/dist/core/command-generation/registry.d.ts +36 -0
- package/dist/core/command-generation/registry.js +92 -0
- package/dist/core/command-generation/types.d.ts +56 -0
- package/dist/core/command-generation/types.js +8 -0
- package/dist/core/completions/command-registry.d.ts +7 -0
- package/dist/core/completions/command-registry.js +461 -0
- package/dist/core/completions/completion-provider.d.ts +60 -0
- package/dist/core/completions/completion-provider.js +102 -0
- package/dist/core/completions/factory.d.ts +64 -0
- package/dist/core/completions/factory.js +75 -0
- package/dist/core/completions/generators/bash-generator.d.ts +32 -0
- package/dist/core/completions/generators/bash-generator.js +174 -0
- package/dist/core/completions/generators/fish-generator.d.ts +32 -0
- package/dist/core/completions/generators/fish-generator.js +157 -0
- package/dist/core/completions/generators/powershell-generator.d.ts +33 -0
- package/dist/core/completions/generators/powershell-generator.js +207 -0
- package/dist/core/completions/generators/zsh-generator.d.ts +44 -0
- package/dist/core/completions/generators/zsh-generator.js +250 -0
- package/dist/core/completions/installers/bash-installer.d.ts +87 -0
- package/dist/core/completions/installers/bash-installer.js +318 -0
- package/dist/core/completions/installers/fish-installer.d.ts +43 -0
- package/dist/core/completions/installers/fish-installer.js +143 -0
- package/dist/core/completions/installers/powershell-installer.d.ts +88 -0
- package/dist/core/completions/installers/powershell-installer.js +327 -0
- package/dist/core/completions/installers/zsh-installer.d.ts +125 -0
- package/dist/core/completions/installers/zsh-installer.js +452 -0
- package/dist/core/completions/templates/bash-templates.d.ts +6 -0
- package/dist/core/completions/templates/bash-templates.js +24 -0
- package/dist/core/completions/templates/fish-templates.d.ts +7 -0
- package/dist/core/completions/templates/fish-templates.js +39 -0
- package/dist/core/completions/templates/powershell-templates.d.ts +6 -0
- package/dist/core/completions/templates/powershell-templates.js +25 -0
- package/dist/core/completions/templates/zsh-templates.d.ts +6 -0
- package/dist/core/completions/templates/zsh-templates.js +36 -0
- package/dist/core/completions/types.d.ts +79 -0
- package/dist/core/completions/types.js +2 -0
- package/dist/core/config-prompts.d.ts +9 -0
- package/dist/core/config-prompts.js +34 -0
- package/dist/core/config-schema.d.ts +86 -0
- package/dist/core/config-schema.js +213 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.js +33 -0
- package/dist/core/converters/json-converter.d.ts +6 -0
- package/dist/core/converters/json-converter.js +51 -0
- package/dist/core/global-config.d.ts +44 -0
- package/dist/core/global-config.js +125 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +3 -0
- package/dist/core/init.d.ts +36 -0
- package/dist/core/init.js +576 -0
- package/dist/core/legacy-cleanup.d.ts +162 -0
- package/dist/core/legacy-cleanup.js +512 -0
- package/dist/core/list.d.ts +9 -0
- package/dist/core/list.js +173 -0
- package/dist/core/migration.d.ts +23 -0
- package/dist/core/migration.js +108 -0
- package/dist/core/parsers/change-parser.d.ts +13 -0
- package/dist/core/parsers/change-parser.js +193 -0
- package/dist/core/parsers/markdown-parser.d.ts +22 -0
- package/dist/core/parsers/markdown-parser.js +187 -0
- package/dist/core/parsers/requirement-blocks.d.ts +37 -0
- package/dist/core/parsers/requirement-blocks.js +201 -0
- package/dist/core/profile-sync-drift.d.ts +38 -0
- package/dist/core/profile-sync-drift.js +201 -0
- package/dist/core/profiles.d.ts +26 -0
- package/dist/core/profiles.js +41 -0
- package/dist/core/project-config.d.ts +64 -0
- package/dist/core/project-config.js +223 -0
- package/dist/core/schemas/base.schema.d.ts +13 -0
- package/dist/core/schemas/base.schema.js +13 -0
- package/dist/core/schemas/change.schema.d.ts +73 -0
- package/dist/core/schemas/change.schema.js +31 -0
- package/dist/core/schemas/index.d.ts +4 -0
- package/dist/core/schemas/index.js +4 -0
- package/dist/core/schemas/spec.schema.d.ts +18 -0
- package/dist/core/schemas/spec.schema.js +15 -0
- package/dist/core/sdd/adr-policy.d.ts +7 -0
- package/dist/core/sdd/adr-policy.js +47 -0
- package/dist/core/sdd/adr.d.ts +4 -0
- package/dist/core/sdd/adr.js +27 -0
- package/dist/core/sdd/bootstrap.d.ts +28 -0
- package/dist/core/sdd/bootstrap.js +353 -0
- package/dist/core/sdd/check.d.ts +51 -0
- package/dist/core/sdd/check.js +831 -0
- package/dist/core/sdd/coordination/coordination-adapters.d.ts +73 -0
- package/dist/core/sdd/coordination/coordination-adapters.js +87 -0
- package/dist/core/sdd/coordination/index.d.ts +2 -0
- package/dist/core/sdd/coordination/index.js +2 -0
- package/dist/core/sdd/dedup.d.ts +23 -0
- package/dist/core/sdd/dedup.js +62 -0
- package/dist/core/sdd/default-bootstrap-files.d.ts +23 -0
- package/dist/core/sdd/default-bootstrap-files.js +385 -0
- package/dist/core/sdd/default-skills.d.ts +16 -0
- package/dist/core/sdd/default-skills.js +427 -0
- package/dist/core/sdd/diagnose.d.ts +25 -0
- package/dist/core/sdd/diagnose.js +1312 -0
- package/dist/core/sdd/docs-sync.d.ts +21 -0
- package/dist/core/sdd/docs-sync.js +231 -0
- package/dist/core/sdd/domain/helpers.d.ts +6 -0
- package/dist/core/sdd/domain/helpers.js +37 -0
- package/dist/core/sdd/domain/lifecycle-guardrails.d.ts +22 -0
- package/dist/core/sdd/domain/lifecycle-guardrails.js +31 -0
- package/dist/core/sdd/domain/lifecycle-hooks.d.ts +16 -0
- package/dist/core/sdd/domain/lifecycle-hooks.js +27 -0
- package/dist/core/sdd/domain/post-active-validation.d.ts +15 -0
- package/dist/core/sdd/domain/post-active-validation.js +71 -0
- package/dist/core/sdd/domain/traceability.d.ts +8 -0
- package/dist/core/sdd/domain/traceability.js +83 -0
- package/dist/core/sdd/domain/transition-engine.d.ts +49 -0
- package/dist/core/sdd/domain/transition-engine.js +120 -0
- package/dist/core/sdd/fingerprint.d.ts +23 -0
- package/dist/core/sdd/fingerprint.js +146 -0
- package/dist/core/sdd/import-openspec.d.ts +31 -0
- package/dist/core/sdd/import-openspec.js +232 -0
- package/dist/core/sdd/init.d.ts +36 -0
- package/dist/core/sdd/init.js +65 -0
- package/dist/core/sdd/json-schema.d.ts +6 -0
- package/dist/core/sdd/json-schema.js +59 -0
- package/dist/core/sdd/legacy-operations.d.ts +286 -0
- package/dist/core/sdd/legacy-operations.js +2175 -0
- package/dist/core/sdd/lenses.d.ts +14 -0
- package/dist/core/sdd/lenses.js +97 -0
- package/dist/core/sdd/merge-catalog.d.ts +9 -0
- package/dist/core/sdd/merge-catalog.js +70 -0
- package/dist/core/sdd/migrate-workspace.d.ts +36 -0
- package/dist/core/sdd/migrate-workspace.js +344 -0
- package/dist/core/sdd/migrate.d.ts +24 -0
- package/dist/core/sdd/migrate.js +385 -0
- package/dist/core/sdd/resolve-project-root.d.ts +15 -0
- package/dist/core/sdd/resolve-project-root.js +46 -0
- package/dist/core/sdd/root-resolver.d.ts +16 -0
- package/dist/core/sdd/root-resolver.js +62 -0
- package/dist/core/sdd/sanitize.d.ts +35 -0
- package/dist/core/sdd/sanitize.js +750 -0
- package/dist/core/sdd/services/approve.service.d.ts +20 -0
- package/dist/core/sdd/services/approve.service.js +82 -0
- package/dist/core/sdd/services/audit.service.d.ts +53 -0
- package/dist/core/sdd/services/audit.service.js +136 -0
- package/dist/core/sdd/services/breakdown.service.d.ts +35 -0
- package/dist/core/sdd/services/breakdown.service.js +185 -0
- package/dist/core/sdd/services/context.service.d.ts +346 -0
- package/dist/core/sdd/services/context.service.js +278 -0
- package/dist/core/sdd/services/debate.service.d.ts +16 -0
- package/dist/core/sdd/services/debate.service.js +73 -0
- package/dist/core/sdd/services/decide.service.d.ts +23 -0
- package/dist/core/sdd/services/decide.service.js +81 -0
- package/dist/core/sdd/services/dedup-apply.service.d.ts +39 -0
- package/dist/core/sdd/services/dedup-apply.service.js +259 -0
- package/dist/core/sdd/services/feature-lint.service.d.ts +29 -0
- package/dist/core/sdd/services/feature-lint.service.js +146 -0
- package/dist/core/sdd/services/finalize.service.d.ts +33 -0
- package/dist/core/sdd/services/finalize.service.js +707 -0
- package/dist/core/sdd/services/frontend-gap.service.d.ts +23 -0
- package/dist/core/sdd/services/frontend-gap.service.js +117 -0
- package/dist/core/sdd/services/frontend-impact.service.d.ts +19 -0
- package/dist/core/sdd/services/frontend-impact.service.js +46 -0
- package/dist/core/sdd/services/ingest-deposito.service.d.ts +32 -0
- package/dist/core/sdd/services/ingest-deposito.service.js +231 -0
- package/dist/core/sdd/services/insight.service.d.ts +21 -0
- package/dist/core/sdd/services/insight.service.js +81 -0
- package/dist/core/sdd/services/legacy-capability.service.d.ts +24 -0
- package/dist/core/sdd/services/legacy-capability.service.js +59 -0
- package/dist/core/sdd/services/mcp-runtime.service.d.ts +42 -0
- package/dist/core/sdd/services/mcp-runtime.service.js +144 -0
- package/dist/core/sdd/services/metrics.service.d.ts +49 -0
- package/dist/core/sdd/services/metrics.service.js +181 -0
- package/dist/core/sdd/services/next.service.d.ts +35 -0
- package/dist/core/sdd/services/next.service.js +54 -0
- package/dist/core/sdd/services/onboard.service.d.ts +9 -0
- package/dist/core/sdd/services/onboard.service.js +165 -0
- package/dist/core/sdd/services/rebuild.service.d.ts +31 -0
- package/dist/core/sdd/services/rebuild.service.js +482 -0
- package/dist/core/sdd/services/scan-naming.service.d.ts +43 -0
- package/dist/core/sdd/services/scan-naming.service.js +246 -0
- package/dist/core/sdd/services/skills-invoke.service.d.ts +24 -0
- package/dist/core/sdd/services/skills-invoke.service.js +63 -0
- package/dist/core/sdd/services/skills-sync.service.d.ts +15 -0
- package/dist/core/sdd/services/skills-sync.service.js +117 -0
- package/dist/core/sdd/services/start.service.d.ts +26 -0
- package/dist/core/sdd/services/start.service.js +237 -0
- package/dist/core/sdd/skills.d.ts +15 -0
- package/dist/core/sdd/skills.js +46 -0
- package/dist/core/sdd/state-lock.d.ts +19 -0
- package/dist/core/sdd/state-lock.js +144 -0
- package/dist/core/sdd/state.d.ts +155 -0
- package/dist/core/sdd/state.js +1000 -0
- package/dist/core/sdd/store/in-memory-adapter.d.ts +12 -0
- package/dist/core/sdd/store/in-memory-adapter.js +27 -0
- package/dist/core/sdd/store/index.d.ts +5 -0
- package/dist/core/sdd/store/index.js +5 -0
- package/dist/core/sdd/store/sdd-stores.d.ts +25 -0
- package/dist/core/sdd/store/sdd-stores.js +59 -0
- package/dist/core/sdd/store/state-store.d.ts +32 -0
- package/dist/core/sdd/store/state-store.js +2 -0
- package/dist/core/sdd/store/yaml-file-adapter.d.ts +12 -0
- package/dist/core/sdd/store/yaml-file-adapter.js +43 -0
- package/dist/core/sdd/structural-health.d.ts +557 -0
- package/dist/core/sdd/structural-health.js +187 -0
- package/dist/core/sdd/transaction.d.ts +14 -0
- package/dist/core/sdd/transaction.js +100 -0
- package/dist/core/sdd/types.d.ts +1570 -0
- package/dist/core/sdd/types.js +617 -0
- package/dist/core/sdd/views.d.ts +3 -0
- package/dist/core/sdd/views.js +560 -0
- package/dist/core/sdd/workspace-schemas.d.ts +620 -0
- package/dist/core/sdd/workspace-schemas.js +254 -0
- package/dist/core/sdd/write-manifest.d.ts +25 -0
- package/dist/core/sdd/write-manifest.js +353 -0
- package/dist/core/shared/index.d.ts +8 -0
- package/dist/core/shared/index.js +8 -0
- package/dist/core/shared/skill-generation.d.ts +49 -0
- package/dist/core/shared/skill-generation.js +106 -0
- package/dist/core/shared/tool-detection.d.ts +71 -0
- package/dist/core/shared/tool-detection.js +158 -0
- package/dist/core/specs-apply.d.ts +73 -0
- package/dist/core/specs-apply.js +385 -0
- package/dist/core/styles/palette.d.ts +7 -0
- package/dist/core/styles/palette.js +8 -0
- package/dist/core/templates/index.d.ts +8 -0
- package/dist/core/templates/index.js +9 -0
- package/dist/core/templates/skill-templates.d.ts +20 -0
- package/dist/core/templates/skill-templates.js +19 -0
- package/dist/core/templates/types.d.ts +19 -0
- package/dist/core/templates/types.js +5 -0
- package/dist/core/templates/workflows/apply-change.d.ts +10 -0
- package/dist/core/templates/workflows/apply-change.js +308 -0
- package/dist/core/templates/workflows/archive-change.d.ts +10 -0
- package/dist/core/templates/workflows/archive-change.js +277 -0
- package/dist/core/templates/workflows/bulk-archive-change.d.ts +10 -0
- package/dist/core/templates/workflows/bulk-archive-change.js +502 -0
- package/dist/core/templates/workflows/continue-change.d.ts +10 -0
- package/dist/core/templates/workflows/continue-change.js +232 -0
- package/dist/core/templates/workflows/explore.d.ts +10 -0
- package/dist/core/templates/workflows/explore.js +475 -0
- package/dist/core/templates/workflows/feedback.d.ts +9 -0
- package/dist/core/templates/workflows/feedback.js +108 -0
- package/dist/core/templates/workflows/ff-change.d.ts +10 -0
- package/dist/core/templates/workflows/ff-change.js +206 -0
- package/dist/core/templates/workflows/new-change.d.ts +10 -0
- package/dist/core/templates/workflows/new-change.js +151 -0
- package/dist/core/templates/workflows/onboard.d.ts +10 -0
- package/dist/core/templates/workflows/onboard.js +573 -0
- package/dist/core/templates/workflows/propose.d.ts +10 -0
- package/dist/core/templates/workflows/propose.js +224 -0
- package/dist/core/templates/workflows/sdd.d.ts +10 -0
- package/dist/core/templates/workflows/sdd.js +107 -0
- package/dist/core/templates/workflows/sync-specs.d.ts +10 -0
- package/dist/core/templates/workflows/sync-specs.js +286 -0
- package/dist/core/templates/workflows/verify-change.d.ts +10 -0
- package/dist/core/templates/workflows/verify-change.js +346 -0
- package/dist/core/update.d.ts +77 -0
- package/dist/core/update.js +538 -0
- package/dist/core/validation/constants.d.ts +34 -0
- package/dist/core/validation/constants.js +40 -0
- package/dist/core/validation/types.d.ts +18 -0
- package/dist/core/validation/types.js +2 -0
- package/dist/core/validation/validator.d.ts +33 -0
- package/dist/core/validation/validator.js +409 -0
- package/dist/core/view.d.ts +8 -0
- package/dist/core/view.js +170 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/prompts/searchable-multi-select.d.ts +28 -0
- package/dist/prompts/searchable-multi-select.js +159 -0
- package/dist/telemetry/config.d.ts +32 -0
- package/dist/telemetry/config.js +68 -0
- package/dist/telemetry/index.d.ts +44 -0
- package/dist/telemetry/index.js +207 -0
- package/dist/ui/ascii-patterns.d.ts +16 -0
- package/dist/ui/ascii-patterns.js +133 -0
- package/dist/ui/welcome-screen.d.ts +10 -0
- package/dist/ui/welcome-screen.js +146 -0
- package/dist/utils/change-metadata.d.ts +51 -0
- package/dist/utils/change-metadata.js +147 -0
- package/dist/utils/change-utils.d.ts +62 -0
- package/dist/utils/change-utils.js +121 -0
- package/dist/utils/command-references.d.ts +18 -0
- package/dist/utils/command-references.js +20 -0
- package/dist/utils/file-system.d.ts +36 -0
- package/dist/utils/file-system.js +281 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/interactive.d.ts +18 -0
- package/dist/utils/interactive.js +21 -0
- package/dist/utils/item-discovery.d.ts +4 -0
- package/dist/utils/item-discovery.js +73 -0
- package/dist/utils/match.d.ts +3 -0
- package/dist/utils/match.js +22 -0
- package/dist/utils/openspec-compat.d.ts +2 -0
- package/dist/utils/openspec-compat.js +2 -0
- package/dist/utils/shell-detection.d.ts +20 -0
- package/dist/utils/shell-detection.js +41 -0
- package/dist/utils/task-progress.d.ts +8 -0
- package/dist/utils/task-progress.js +36 -0
- package/package.json +111 -0
- package/schemas/sdd/1-spec.schema.json +221 -0
- package/schemas/sdd/2-plan.schema.json +199 -0
- package/schemas/sdd/3-tasks.schema.json +102 -0
- package/schemas/sdd/4-changelog.schema.json +55 -0
- package/schemas/sdd/5-quality.schema.json +427 -0
- package/schemas/sdd/workspace-catalog.schema.json +1012 -0
- package/schemas/spec-driven/schema.yaml +153 -0
- package/schemas/spec-driven/templates/design.md +19 -0
- package/schemas/spec-driven/templates/proposal.md +23 -0
- package/schemas/spec-driven/templates/spec.md +8 -0
- package/schemas/spec-driven/templates/tasks.md +9 -0
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Core ID patterns
|
|
3
|
+
export const ID_PATTERNS = {
|
|
4
|
+
insight: /^INS-\d{3,}$/,
|
|
5
|
+
debate: /^DEB-\d{3,}$/,
|
|
6
|
+
radar: /^RAD-\d{3,}$/,
|
|
7
|
+
epic: /^EPIC-\d{3,}$/,
|
|
8
|
+
/** Matches both RAD-### (legacy) and EPIC-#### (canonical) */
|
|
9
|
+
epicOrRadar: /^(?:RAD|EPIC)-\d{3,}$/,
|
|
10
|
+
feature: /^FEAT-\d{3,}$/,
|
|
11
|
+
frontendGap: /^FGAP-\d{3,}$/,
|
|
12
|
+
techDebt: /^TD-\d{3,}$/,
|
|
13
|
+
};
|
|
14
|
+
export const OriginTypeSchema = z.enum([
|
|
15
|
+
'radar',
|
|
16
|
+
'epic',
|
|
17
|
+
'direct',
|
|
18
|
+
'fast_track',
|
|
19
|
+
'frontend_gap',
|
|
20
|
+
'tech_debt',
|
|
21
|
+
]);
|
|
22
|
+
export const ScaleSchema = z.enum(['QUICK', 'STANDARD', 'LARGE']);
|
|
23
|
+
export const ExecutionKindSchema = z.enum([
|
|
24
|
+
'feature',
|
|
25
|
+
'infra',
|
|
26
|
+
'migration',
|
|
27
|
+
'frontend_coverage',
|
|
28
|
+
'documentation',
|
|
29
|
+
]);
|
|
30
|
+
export const PlanningModeSchema = z.enum(['local_plan', 'direct_tasks']);
|
|
31
|
+
export const FlowModeSchema = z.enum(['direto', 'padrao', 'rigoroso']);
|
|
32
|
+
export const FlowStageSchema = z.enum(['proposta', 'planejamento', 'tarefas', 'execucao', 'consolidacao']);
|
|
33
|
+
export const GateStatusSchema = z.enum(['nao_exigida', 'rascunho', 'pronta', 'aprovada']);
|
|
34
|
+
export const SourceDocumentTypeSchema = z.enum([
|
|
35
|
+
'prd',
|
|
36
|
+
'rfc',
|
|
37
|
+
'briefing',
|
|
38
|
+
'historia',
|
|
39
|
+
'wireframe',
|
|
40
|
+
'html_mock',
|
|
41
|
+
'referencia_visual',
|
|
42
|
+
'entrevista',
|
|
43
|
+
'anexo',
|
|
44
|
+
'legado',
|
|
45
|
+
'outro',
|
|
46
|
+
]);
|
|
47
|
+
export const SourceDocumentStatusSchema = z.enum([
|
|
48
|
+
'RAW',
|
|
49
|
+
'INDEXED',
|
|
50
|
+
'NORMALIZED',
|
|
51
|
+
'PLANNED',
|
|
52
|
+
'ARCHIVED',
|
|
53
|
+
]);
|
|
54
|
+
export const SourceAuthoritySchema = z.enum([
|
|
55
|
+
'official',
|
|
56
|
+
'regulator',
|
|
57
|
+
'legislation',
|
|
58
|
+
'standard',
|
|
59
|
+
'vendor',
|
|
60
|
+
'community',
|
|
61
|
+
'internal',
|
|
62
|
+
'unknown',
|
|
63
|
+
]);
|
|
64
|
+
export const SourceClassificationSchema = z.enum([
|
|
65
|
+
'law',
|
|
66
|
+
'regulation',
|
|
67
|
+
'official_guidance',
|
|
68
|
+
'administrative_decision',
|
|
69
|
+
'jurisprudence',
|
|
70
|
+
'technical_best_practice',
|
|
71
|
+
'other',
|
|
72
|
+
]);
|
|
73
|
+
export const SourceVerificationStatusSchema = z.enum(['verified', 'stale', 'unverified', 'needs_review']);
|
|
74
|
+
export const DiscoveryTypeSchema = z.enum(['INS', 'DEB', 'RAD', 'EPIC']);
|
|
75
|
+
export const DiscoveryStatusSchema = z.enum([
|
|
76
|
+
'NEW',
|
|
77
|
+
'DEBATED',
|
|
78
|
+
'PROMOTED',
|
|
79
|
+
'DROPPED',
|
|
80
|
+
'OPEN',
|
|
81
|
+
'APPROVED',
|
|
82
|
+
'DISCARDED',
|
|
83
|
+
'SUPERSEDED',
|
|
84
|
+
'READY',
|
|
85
|
+
'PLANNED',
|
|
86
|
+
'SPLIT',
|
|
87
|
+
'IN_PROGRESS',
|
|
88
|
+
'DONE',
|
|
89
|
+
'CANCELLED',
|
|
90
|
+
]);
|
|
91
|
+
export const BacklogStatusSchema = z.enum([
|
|
92
|
+
'READY',
|
|
93
|
+
'BLOCKED',
|
|
94
|
+
'IN_PROGRESS',
|
|
95
|
+
'SYNC_REQUIRED',
|
|
96
|
+
'VERIFY_FAILED',
|
|
97
|
+
'ARCHIVED',
|
|
98
|
+
'DONE',
|
|
99
|
+
]);
|
|
100
|
+
export const FrontendGapStatusSchema = z.enum([
|
|
101
|
+
'OPEN',
|
|
102
|
+
'PLANNED',
|
|
103
|
+
'IN_PROGRESS',
|
|
104
|
+
'DONE',
|
|
105
|
+
'SUPERSEDED',
|
|
106
|
+
]);
|
|
107
|
+
export const FrontendImpactStatusSchema = z.enum(['unknown', 'none', 'required']);
|
|
108
|
+
export const FrontendGapOriginKindSchema = z.enum(['manual', 'automatic']);
|
|
109
|
+
export const FrontendGapDetectionSourceSchema = z.enum(['metadata', 'diff', 'manual']);
|
|
110
|
+
export const QualityEvidenceStatusSchema = z.enum(['planned', 'provided', 'waived']);
|
|
111
|
+
export const QualityEvidenceModeSchema = z.enum(['coverage', 'equivalence', 'hybrid']);
|
|
112
|
+
export const QualityEnforcementSchema = z.enum(['advisory', 'blocking']);
|
|
113
|
+
export const FrontendUiStatusSchema = z.enum([
|
|
114
|
+
'OK',
|
|
115
|
+
'GAP',
|
|
116
|
+
'PLANNED',
|
|
117
|
+
'PARTIAL',
|
|
118
|
+
'DEPRECATED',
|
|
119
|
+
]);
|
|
120
|
+
export const TechDebtStatusSchema = z.enum(['OPEN', 'IN_PROGRESS', 'DONE']);
|
|
121
|
+
const NullableStringSchema = z.string().optional();
|
|
122
|
+
const StringArraySchema = z.array(z.string()).default([]);
|
|
123
|
+
export const QualityEvidenceSchema = z.object({
|
|
124
|
+
kind: z.string().min(1),
|
|
125
|
+
required: z.boolean().default(true),
|
|
126
|
+
status: QualityEvidenceStatusSchema.default('planned'),
|
|
127
|
+
command: NullableStringSchema,
|
|
128
|
+
artifact: NullableStringSchema,
|
|
129
|
+
notes: NullableStringSchema,
|
|
130
|
+
});
|
|
131
|
+
export const QualityExceptionSchema = z.object({
|
|
132
|
+
id: z.string().min(1),
|
|
133
|
+
scope: z.string().min(1),
|
|
134
|
+
reason: z.string().min(1),
|
|
135
|
+
accepted_risk: z.string().min(1),
|
|
136
|
+
compensating_control: z.string().min(1),
|
|
137
|
+
review_deadline: z.string().min(1),
|
|
138
|
+
approved_by: z.string().min(1),
|
|
139
|
+
approved_at: NullableStringSchema,
|
|
140
|
+
});
|
|
141
|
+
export const QualityContractSchema = z.object({
|
|
142
|
+
version: z.literal(1).default(1),
|
|
143
|
+
enabled: z.boolean().default(true),
|
|
144
|
+
inherited_from: NullableStringSchema,
|
|
145
|
+
scope: z.string().default('touched_scope'),
|
|
146
|
+
unit_target_percent: z.number().min(0).max(100).default(95),
|
|
147
|
+
integration_target_percent: z.number().min(0).max(100).default(95),
|
|
148
|
+
evidence_mode: QualityEvidenceModeSchema.default('hybrid'),
|
|
149
|
+
enforcement: QualityEnforcementSchema.default('blocking'),
|
|
150
|
+
stack_profile: z.string().default('default'),
|
|
151
|
+
required_axes: StringArraySchema,
|
|
152
|
+
required_evidence: z.array(QualityEvidenceSchema).default([]),
|
|
153
|
+
exceptions: z.array(QualityExceptionSchema).default([]),
|
|
154
|
+
updated_at: NullableStringSchema,
|
|
155
|
+
});
|
|
156
|
+
const StageGateSchema = z.object({
|
|
157
|
+
status: GateStatusSchema.default('rascunho'),
|
|
158
|
+
approved_at: NullableStringSchema,
|
|
159
|
+
approved_by: NullableStringSchema,
|
|
160
|
+
note: NullableStringSchema,
|
|
161
|
+
});
|
|
162
|
+
const BacklogGatesSchema = z.object({
|
|
163
|
+
proposta: StageGateSchema.default({ status: 'rascunho' }),
|
|
164
|
+
planejamento: StageGateSchema.default({ status: 'rascunho' }),
|
|
165
|
+
tarefas: StageGateSchema.default({ status: 'rascunho' }),
|
|
166
|
+
});
|
|
167
|
+
export const DiscoveryRecordSchema = z
|
|
168
|
+
.object({
|
|
169
|
+
id: z.string().min(1),
|
|
170
|
+
type: DiscoveryTypeSchema,
|
|
171
|
+
title: z.string().min(1),
|
|
172
|
+
title_canonical: z.string().min(1).max(60).optional(),
|
|
173
|
+
status: DiscoveryStatusSchema,
|
|
174
|
+
origin_prompt: NullableStringSchema,
|
|
175
|
+
related_ids: StringArraySchema,
|
|
176
|
+
warning_links: StringArraySchema,
|
|
177
|
+
created_at: NullableStringSchema,
|
|
178
|
+
updated_at: NullableStringSchema,
|
|
179
|
+
quality_contract: QualityContractSchema.optional(),
|
|
180
|
+
})
|
|
181
|
+
.superRefine((record, ctx) => {
|
|
182
|
+
// EPIC and RAD are interchangeable during transition; both prefixes are valid for type EPIC or RAD
|
|
183
|
+
const validPrefixes = record.type === 'EPIC' || record.type === 'RAD'
|
|
184
|
+
? ['RAD-', 'EPIC-']
|
|
185
|
+
: [`${record.type}-`];
|
|
186
|
+
if (!validPrefixes.some((prefix) => record.id.startsWith(prefix))) {
|
|
187
|
+
ctx.addIssue({
|
|
188
|
+
code: z.ZodIssueCode.custom,
|
|
189
|
+
message: `Discovery record id "${record.id}" must start with one of: ${validPrefixes.join(', ')}`,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
export const BacklogItemSchema = z
|
|
194
|
+
.object({
|
|
195
|
+
id: z.string().regex(ID_PATTERNS.feature, 'Invalid FEAT id format'),
|
|
196
|
+
title: z.string().min(1),
|
|
197
|
+
status: BacklogStatusSchema,
|
|
198
|
+
origin_type: OriginTypeSchema,
|
|
199
|
+
origin_ref: NullableStringSchema,
|
|
200
|
+
scale: ScaleSchema.default('STANDARD'),
|
|
201
|
+
summary: NullableStringSchema,
|
|
202
|
+
blocked_by: StringArraySchema,
|
|
203
|
+
touches: StringArraySchema,
|
|
204
|
+
lock_domains: StringArraySchema,
|
|
205
|
+
parallel_group: NullableStringSchema,
|
|
206
|
+
execution_kind: ExecutionKindSchema.default('feature'),
|
|
207
|
+
planning_mode: PlanningModeSchema.default('local_plan'),
|
|
208
|
+
flow_mode: FlowModeSchema.default('padrao'),
|
|
209
|
+
current_stage: FlowStageSchema.default('proposta'),
|
|
210
|
+
gates: BacklogGatesSchema.default({
|
|
211
|
+
proposta: { status: 'rascunho' },
|
|
212
|
+
planejamento: { status: 'rascunho' },
|
|
213
|
+
tarefas: { status: 'rascunho' },
|
|
214
|
+
}),
|
|
215
|
+
acceptance_refs: StringArraySchema,
|
|
216
|
+
produces: StringArraySchema,
|
|
217
|
+
consumes: StringArraySchema,
|
|
218
|
+
priority_score: z.number().default(0),
|
|
219
|
+
dependency_count: z.number().int().nonnegative().default(0),
|
|
220
|
+
agent_role: NullableStringSchema,
|
|
221
|
+
recommended_skills: StringArraySchema,
|
|
222
|
+
change_name: NullableStringSchema,
|
|
223
|
+
branch_name: NullableStringSchema,
|
|
224
|
+
worktree_path: NullableStringSchema,
|
|
225
|
+
start_commit_sha: NullableStringSchema,
|
|
226
|
+
requires_adr: z.boolean().default(false),
|
|
227
|
+
quality_contract: QualityContractSchema.optional(),
|
|
228
|
+
frontend_impact_status: FrontendImpactStatusSchema.default('unknown'),
|
|
229
|
+
frontend_impact_reason: NullableStringSchema,
|
|
230
|
+
frontend_impact_declared_at: NullableStringSchema,
|
|
231
|
+
frontend_surface_tokens: StringArraySchema,
|
|
232
|
+
frontend_gap_refs: StringArraySchema,
|
|
233
|
+
warning_links: StringArraySchema,
|
|
234
|
+
spec_refs: StringArraySchema,
|
|
235
|
+
last_sync_at: NullableStringSchema,
|
|
236
|
+
archived_at: NullableStringSchema,
|
|
237
|
+
done_at: NullableStringSchema,
|
|
238
|
+
unblocked_at: NullableStringSchema,
|
|
239
|
+
})
|
|
240
|
+
.superRefine((item, ctx) => {
|
|
241
|
+
if (item.origin_type !== 'direct' && item.origin_type !== 'fast_track') {
|
|
242
|
+
if (!item.origin_ref || item.origin_ref.trim() === '') {
|
|
243
|
+
ctx.addIssue({
|
|
244
|
+
code: z.ZodIssueCode.custom,
|
|
245
|
+
message: `BacklogItem origin_ref cannot be empty when origin_type is '${item.origin_type}'`,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
else if (item.origin_type === 'epic' || item.origin_type === 'radar') {
|
|
249
|
+
if (!ID_PATTERNS.epicOrRadar.test(item.origin_ref)) {
|
|
250
|
+
ctx.addIssue({
|
|
251
|
+
code: z.ZodIssueCode.custom,
|
|
252
|
+
message: `BacklogItem origin_ref "${item.origin_ref}" does not match EPIC/RAD prefix required for origins epic/radar`,
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
export const TechDebtRecordSchema = z.object({
|
|
259
|
+
id: z.string().regex(ID_PATTERNS.techDebt, 'Invalid TD id format'),
|
|
260
|
+
title: z.string().min(1),
|
|
261
|
+
status: TechDebtStatusSchema.default('OPEN'),
|
|
262
|
+
description: NullableStringSchema,
|
|
263
|
+
related_refs: StringArraySchema,
|
|
264
|
+
created_at: NullableStringSchema,
|
|
265
|
+
updated_at: NullableStringSchema,
|
|
266
|
+
});
|
|
267
|
+
export const FinalizeQueueItemSchema = z.object({
|
|
268
|
+
feature_id: z.string().regex(ID_PATTERNS.feature, 'Invalid FEAT id format'),
|
|
269
|
+
status: z.enum(['PENDING', 'DONE']).default('PENDING'),
|
|
270
|
+
summary: NullableStringSchema,
|
|
271
|
+
created_at: NullableStringSchema,
|
|
272
|
+
completed_at: NullableStringSchema,
|
|
273
|
+
});
|
|
274
|
+
export const UnblockEventSchema = z.object({
|
|
275
|
+
feature_id: z.string().regex(ID_PATTERNS.feature, 'Invalid FEAT id format'),
|
|
276
|
+
unblocked_by: z.string().regex(ID_PATTERNS.feature, 'Invalid FEAT id format'),
|
|
277
|
+
created_at: NullableStringSchema,
|
|
278
|
+
status: z.enum(['NEW', 'SEEN']).default('NEW'),
|
|
279
|
+
});
|
|
280
|
+
export const TransitionLogEventSchema = z.object({
|
|
281
|
+
entity_type: z.string().min(1),
|
|
282
|
+
entity_id: z.string().min(1),
|
|
283
|
+
from: z.string().min(1),
|
|
284
|
+
to: z.string().min(1),
|
|
285
|
+
actor: z.string().min(1),
|
|
286
|
+
reason: NullableStringSchema,
|
|
287
|
+
timestamp: z.string().min(1),
|
|
288
|
+
source_command: z.string().min(1),
|
|
289
|
+
force_transition: z.boolean().default(false),
|
|
290
|
+
lens_violations: StringArraySchema,
|
|
291
|
+
});
|
|
292
|
+
export const SkillCatalogEntrySchema = z.object({
|
|
293
|
+
id: z.string().min(1),
|
|
294
|
+
source_repo: NullableStringSchema,
|
|
295
|
+
source_path: NullableStringSchema,
|
|
296
|
+
title: z.string().min(1),
|
|
297
|
+
description: NullableStringSchema,
|
|
298
|
+
phases: StringArraySchema,
|
|
299
|
+
domains: StringArraySchema,
|
|
300
|
+
tools: StringArraySchema,
|
|
301
|
+
bundle_ids: StringArraySchema,
|
|
302
|
+
priority: z.number().int().nonnegative().default(0),
|
|
303
|
+
});
|
|
304
|
+
export const SkillBundleSchema = z.object({
|
|
305
|
+
id: z.string().min(1),
|
|
306
|
+
title: z.string().min(1),
|
|
307
|
+
skill_ids: StringArraySchema,
|
|
308
|
+
});
|
|
309
|
+
export const SkillRoutingRuleSchema = z.object({
|
|
310
|
+
domain: z.string().min(1),
|
|
311
|
+
skills: StringArraySchema,
|
|
312
|
+
bundles: StringArraySchema,
|
|
313
|
+
});
|
|
314
|
+
export const SkillRoutingStateSchema = z.object({
|
|
315
|
+
version: z.literal(1),
|
|
316
|
+
default_skills: StringArraySchema,
|
|
317
|
+
routes: z.array(SkillRoutingRuleSchema).default([]),
|
|
318
|
+
});
|
|
319
|
+
export const SourceDocumentRecordSchema = z.object({
|
|
320
|
+
id: z.string().min(1),
|
|
321
|
+
type: SourceDocumentTypeSchema,
|
|
322
|
+
path: z.string().min(1),
|
|
323
|
+
title: z.string().min(1),
|
|
324
|
+
status: SourceDocumentStatusSchema.default('RAW'),
|
|
325
|
+
source_version: z.number().int().positive().default(1),
|
|
326
|
+
source_fingerprint: NullableStringSchema,
|
|
327
|
+
authority: SourceAuthoritySchema.default('unknown'),
|
|
328
|
+
source_url: NullableStringSchema,
|
|
329
|
+
source_classification: SourceClassificationSchema.default('other'),
|
|
330
|
+
jurisdiction_tags: StringArraySchema,
|
|
331
|
+
last_verified_at: NullableStringSchema,
|
|
332
|
+
verification_status: SourceVerificationStatusSchema.default('unverified'),
|
|
333
|
+
verification_notes: NullableStringSchema,
|
|
334
|
+
legal_validation_required: z.boolean().default(false),
|
|
335
|
+
summary: NullableStringSchema,
|
|
336
|
+
imported_at: NullableStringSchema,
|
|
337
|
+
updated_at: NullableStringSchema,
|
|
338
|
+
used_by: StringArraySchema,
|
|
339
|
+
notes: StringArraySchema,
|
|
340
|
+
consolidation_targets: StringArraySchema,
|
|
341
|
+
});
|
|
342
|
+
export const SourceVersionEventSchema = z.object({
|
|
343
|
+
id: z.string().min(1),
|
|
344
|
+
source_id: z.string().min(1),
|
|
345
|
+
version: z.number().int().positive(),
|
|
346
|
+
changed_at: z.string().min(1),
|
|
347
|
+
reason: z.string().min(1),
|
|
348
|
+
actor: z.string().min(1).default('codesdd'),
|
|
349
|
+
summary: NullableStringSchema,
|
|
350
|
+
});
|
|
351
|
+
export const JurisdictionProfileSchema = z.object({
|
|
352
|
+
id: z.string().min(1),
|
|
353
|
+
title: z.string().min(1),
|
|
354
|
+
jurisdiction: z.string().min(1),
|
|
355
|
+
status: z.enum(['active', 'proposed', 'deprecated']).default('active'),
|
|
356
|
+
summary: NullableStringSchema,
|
|
357
|
+
applicability: NullableStringSchema,
|
|
358
|
+
tags: StringArraySchema,
|
|
359
|
+
source_refs: StringArraySchema,
|
|
360
|
+
updated_at: NullableStringSchema,
|
|
361
|
+
});
|
|
362
|
+
export const ControlCatalogItemSchema = z.object({
|
|
363
|
+
id: z.string().min(1),
|
|
364
|
+
title: z.string().min(1),
|
|
365
|
+
category: z.string().min(1),
|
|
366
|
+
severity: z.enum(['low', 'medium', 'high', 'critical']).default('medium'),
|
|
367
|
+
automatable: z.enum(['yes', 'partial', 'no']).default('partial'),
|
|
368
|
+
verification_types: StringArraySchema,
|
|
369
|
+
jurisdiction_profile_ids: StringArraySchema,
|
|
370
|
+
source_refs: StringArraySchema,
|
|
371
|
+
legal_validation_required: z.boolean().default(false),
|
|
372
|
+
updated_at: NullableStringSchema,
|
|
373
|
+
});
|
|
374
|
+
export const ArchitectureNodeSchema = z.object({
|
|
375
|
+
id: z.string().min(1),
|
|
376
|
+
name: z.string().min(1),
|
|
377
|
+
kind: z.string().min(1),
|
|
378
|
+
description: NullableStringSchema,
|
|
379
|
+
repo_paths: StringArraySchema,
|
|
380
|
+
depends_on: StringArraySchema,
|
|
381
|
+
});
|
|
382
|
+
export const ServiceRecordSchema = z.object({
|
|
383
|
+
id: z.string().min(1),
|
|
384
|
+
name: z.string().min(1),
|
|
385
|
+
responsibility: NullableStringSchema,
|
|
386
|
+
owner_refs: StringArraySchema,
|
|
387
|
+
repo_paths: StringArraySchema,
|
|
388
|
+
contracts: StringArraySchema,
|
|
389
|
+
external_dependencies: StringArraySchema,
|
|
390
|
+
});
|
|
391
|
+
export const TechStackRecordSchema = z.object({
|
|
392
|
+
layer: z.string().min(1),
|
|
393
|
+
technology: z.string().min(1),
|
|
394
|
+
version: NullableStringSchema,
|
|
395
|
+
purpose: NullableStringSchema,
|
|
396
|
+
constraints: StringArraySchema,
|
|
397
|
+
});
|
|
398
|
+
export const FrontendDecisionRecordSchema = z.object({
|
|
399
|
+
id: z.string().min(1),
|
|
400
|
+
title: z.string().min(1),
|
|
401
|
+
status: z.enum(['PROPOSED', 'APPROVED', 'DISCARDED', 'SUPERSEDED']).default('PROPOSED'),
|
|
402
|
+
decision: NullableStringSchema,
|
|
403
|
+
rationale: NullableStringSchema,
|
|
404
|
+
related_refs: StringArraySchema,
|
|
405
|
+
route_refs: StringArraySchema,
|
|
406
|
+
adr_refs: StringArraySchema,
|
|
407
|
+
});
|
|
408
|
+
export const RepoMapRecordSchema = z.object({
|
|
409
|
+
path: z.string().min(1),
|
|
410
|
+
kind: z.string().min(1),
|
|
411
|
+
service_ref: NullableStringSchema,
|
|
412
|
+
notes: NullableStringSchema,
|
|
413
|
+
});
|
|
414
|
+
export const FrontendGapRecordSchema = z.object({
|
|
415
|
+
id: z.string().regex(ID_PATTERNS.frontendGap, 'Invalid FGAP id format'),
|
|
416
|
+
title: z.string().min(1),
|
|
417
|
+
status: FrontendGapStatusSchema,
|
|
418
|
+
origin_kind: FrontendGapOriginKindSchema.default('manual'),
|
|
419
|
+
detection_sources: z.array(FrontendGapDetectionSourceSchema).default([]),
|
|
420
|
+
origin_feature: NullableStringSchema,
|
|
421
|
+
backend_refs: StringArraySchema,
|
|
422
|
+
frontend_scope: NullableStringSchema,
|
|
423
|
+
route_targets: StringArraySchema,
|
|
424
|
+
menu_targets: StringArraySchema,
|
|
425
|
+
suggested_files: StringArraySchema,
|
|
426
|
+
implemented_files: StringArraySchema,
|
|
427
|
+
resolved_by_feature: NullableStringSchema,
|
|
428
|
+
related_route_ids: StringArraySchema,
|
|
429
|
+
notes: NullableStringSchema,
|
|
430
|
+
created_at: NullableStringSchema,
|
|
431
|
+
updated_at: NullableStringSchema,
|
|
432
|
+
});
|
|
433
|
+
export const FrontendRouteRecordSchema = z.object({
|
|
434
|
+
id: z.string().min(1),
|
|
435
|
+
path: z.string().min(1),
|
|
436
|
+
parent_id: NullableStringSchema,
|
|
437
|
+
label: NullableStringSchema,
|
|
438
|
+
nav_surface: NullableStringSchema,
|
|
439
|
+
ui_status: FrontendUiStatusSchema,
|
|
440
|
+
source_gap_ids: StringArraySchema,
|
|
441
|
+
implemented_files: StringArraySchema,
|
|
442
|
+
notes: NullableStringSchema,
|
|
443
|
+
});
|
|
444
|
+
export const DiscoveryIndexStateSchema = z.object({
|
|
445
|
+
version: z.literal(1),
|
|
446
|
+
counters: z
|
|
447
|
+
.object({
|
|
448
|
+
INS: z.number().int().nonnegative().default(0),
|
|
449
|
+
DEB: z.number().int().nonnegative().default(0),
|
|
450
|
+
RAD: z.number().int().nonnegative().default(0),
|
|
451
|
+
EPIC: z.number().int().nonnegative().default(0),
|
|
452
|
+
FEAT: z.number().int().nonnegative().default(0),
|
|
453
|
+
FGAP: z.number().int().nonnegative().default(0),
|
|
454
|
+
TD: z.number().int().nonnegative().default(0),
|
|
455
|
+
})
|
|
456
|
+
.default({ INS: 0, DEB: 0, RAD: 0, EPIC: 0, FEAT: 0, FGAP: 0, TD: 0 }),
|
|
457
|
+
records: z.array(DiscoveryRecordSchema).default([]),
|
|
458
|
+
});
|
|
459
|
+
export const BacklogStateSchema = z.object({
|
|
460
|
+
version: z.literal(1),
|
|
461
|
+
items: z.array(BacklogItemSchema).default([]),
|
|
462
|
+
});
|
|
463
|
+
export const TechDebtStateSchema = z.object({
|
|
464
|
+
version: z.literal(1),
|
|
465
|
+
items: z.array(TechDebtRecordSchema).default([]),
|
|
466
|
+
});
|
|
467
|
+
export const FinalizeQueueStateSchema = z.object({
|
|
468
|
+
version: z.literal(1),
|
|
469
|
+
items: z.array(FinalizeQueueItemSchema).default([]),
|
|
470
|
+
});
|
|
471
|
+
export const UnblockEventsStateSchema = z.object({
|
|
472
|
+
version: z.literal(1),
|
|
473
|
+
events: z.array(UnblockEventSchema).default([]),
|
|
474
|
+
});
|
|
475
|
+
export const TransitionLogStateSchema = z.object({
|
|
476
|
+
version: z.literal(1),
|
|
477
|
+
events: z.array(TransitionLogEventSchema).default([]),
|
|
478
|
+
});
|
|
479
|
+
const AuditHistoryMetricSchema = z.object({
|
|
480
|
+
ok: z.number().int().nonnegative(),
|
|
481
|
+
total: z.number().int().nonnegative(),
|
|
482
|
+
percent: z.number(),
|
|
483
|
+
});
|
|
484
|
+
export const AuditHistoryEntrySchema = z.object({
|
|
485
|
+
run_id: z.string().min(1),
|
|
486
|
+
generated_at: z.string().min(1),
|
|
487
|
+
score: z.number(),
|
|
488
|
+
healthy: z.boolean(),
|
|
489
|
+
should_open_insight: z.boolean(),
|
|
490
|
+
metrics: z.object({
|
|
491
|
+
artifacts_without_placeholder: AuditHistoryMetricSchema,
|
|
492
|
+
debates_with_real_deliberation: AuditHistoryMetricSchema,
|
|
493
|
+
adrs_generated_vs_expected: AuditHistoryMetricSchema,
|
|
494
|
+
quality_contracts_ready: AuditHistoryMetricSchema,
|
|
495
|
+
forced_transitions: z.object({
|
|
496
|
+
total: z.number().int().nonnegative(),
|
|
497
|
+
feature_refs: StringArraySchema,
|
|
498
|
+
}),
|
|
499
|
+
}),
|
|
500
|
+
recommendation: z.string(),
|
|
501
|
+
});
|
|
502
|
+
export const AuditHistoryStateSchema = z.object({
|
|
503
|
+
version: z.literal(1),
|
|
504
|
+
runs: z.array(AuditHistoryEntrySchema).default([]),
|
|
505
|
+
});
|
|
506
|
+
export const SkillCatalogStateSchema = z.object({
|
|
507
|
+
version: z.literal(1),
|
|
508
|
+
skills: z.array(SkillCatalogEntrySchema).default([]),
|
|
509
|
+
bundles: z.array(SkillBundleSchema).default([]),
|
|
510
|
+
});
|
|
511
|
+
export const SourceIndexStateSchema = z.object({
|
|
512
|
+
version: z.literal(1),
|
|
513
|
+
sources: z.array(SourceDocumentRecordSchema).default([]),
|
|
514
|
+
version_events: z.array(SourceVersionEventSchema).default([]),
|
|
515
|
+
jurisdiction_profiles: z.array(JurisdictionProfileSchema).default([]),
|
|
516
|
+
control_catalog: z.array(ControlCatalogItemSchema).default([]),
|
|
517
|
+
});
|
|
518
|
+
export const FrontendGapsStateSchema = z.object({
|
|
519
|
+
version: z.literal(1),
|
|
520
|
+
items: z.array(FrontendGapRecordSchema).default([]),
|
|
521
|
+
});
|
|
522
|
+
export const FrontendMapStateSchema = z.object({
|
|
523
|
+
version: z.literal(1),
|
|
524
|
+
routes: z.array(FrontendRouteRecordSchema).default([]),
|
|
525
|
+
});
|
|
526
|
+
export const ArchitectureStateSchema = z.object({
|
|
527
|
+
version: z.literal(1),
|
|
528
|
+
nodes: z.array(ArchitectureNodeSchema).default([]),
|
|
529
|
+
});
|
|
530
|
+
export const ServiceCatalogStateSchema = z.object({
|
|
531
|
+
version: z.literal(1),
|
|
532
|
+
services: z.array(ServiceRecordSchema).default([]),
|
|
533
|
+
});
|
|
534
|
+
export const TechStackStateSchema = z.object({
|
|
535
|
+
version: z.literal(1),
|
|
536
|
+
items: z.array(TechStackRecordSchema).default([]),
|
|
537
|
+
});
|
|
538
|
+
export const IntegrationContractsStateSchema = z.object({
|
|
539
|
+
version: z.literal(1),
|
|
540
|
+
contracts: z.array(z.string()).default([]),
|
|
541
|
+
});
|
|
542
|
+
export const FrontendDecisionsStateSchema = z.object({
|
|
543
|
+
version: z.literal(1),
|
|
544
|
+
items: z.array(FrontendDecisionRecordSchema).default([]),
|
|
545
|
+
});
|
|
546
|
+
export const RepoMapStateSchema = z.object({
|
|
547
|
+
version: z.literal(1),
|
|
548
|
+
items: z.array(RepoMapRecordSchema).default([]),
|
|
549
|
+
});
|
|
550
|
+
export const NamingContractTermScopeSchema = z.enum(['code', 'docs', 'state', 'all']);
|
|
551
|
+
export const NamingContractTermSeveritySchema = z.enum(['error', 'warning']);
|
|
552
|
+
export const NamingContractForbiddenTermSchema = z.object({
|
|
553
|
+
term: z.string().min(1),
|
|
554
|
+
scope: NamingContractTermScopeSchema.default('all'),
|
|
555
|
+
severity: NamingContractTermSeveritySchema.default('warning'),
|
|
556
|
+
allowlist_paths: z.array(z.string()).default([]),
|
|
557
|
+
});
|
|
558
|
+
export const NamingContractAllowlistEntrySchema = z.object({
|
|
559
|
+
path_pattern: z.string().min(1),
|
|
560
|
+
reason: z.string().min(1),
|
|
561
|
+
expires_at: z.string().optional(),
|
|
562
|
+
owner: z.string().min(1),
|
|
563
|
+
});
|
|
564
|
+
export const NamingContractIdentitySchema = z.object({
|
|
565
|
+
product_name: z.string().min(1),
|
|
566
|
+
cli_bin: z.string().min(1),
|
|
567
|
+
package_name: z.string().min(1),
|
|
568
|
+
});
|
|
569
|
+
export const NamingContractRenameRuleStatusSchema = z.enum([
|
|
570
|
+
'planned',
|
|
571
|
+
'in_progress',
|
|
572
|
+
'done',
|
|
573
|
+
]);
|
|
574
|
+
export const NamingContractRenameRuleSchema = z.object({
|
|
575
|
+
from: z.string().min(1),
|
|
576
|
+
to: z.string().min(1),
|
|
577
|
+
scope: NamingContractTermScopeSchema.default('all'),
|
|
578
|
+
phase: z.string().min(1),
|
|
579
|
+
owner: z.string().min(1),
|
|
580
|
+
status: NamingContractRenameRuleStatusSchema.default('planned'),
|
|
581
|
+
path_globs: z.array(z.string().min(1)).default([]),
|
|
582
|
+
});
|
|
583
|
+
export const NamingContractZeroResidueGateSchema = z.object({
|
|
584
|
+
enabled: z.boolean().default(false),
|
|
585
|
+
enforcement: NamingContractTermSeveritySchema.default('warning'),
|
|
586
|
+
terms: z.array(z.string().min(1)).default([]),
|
|
587
|
+
allowlist_paths: z.array(z.string().min(1)).default([]),
|
|
588
|
+
removal_phase: z.string().min(1).default('compatibility-shutdown'),
|
|
589
|
+
});
|
|
590
|
+
export const NamingContractStateSchema = z.object({
|
|
591
|
+
version: z.literal(1).default(1),
|
|
592
|
+
product_name: z.string().min(1).default('CodeSDD'),
|
|
593
|
+
cli_bin: z.string().min(1).default('codesdd'),
|
|
594
|
+
package_name: z.string().min(1).default('@devtrack-solution/codesdd'),
|
|
595
|
+
current_identity: NamingContractIdentitySchema.default({
|
|
596
|
+
product_name: 'CodeSDD',
|
|
597
|
+
cli_bin: 'codesdd',
|
|
598
|
+
package_name: '@devtrack-solution/codesdd',
|
|
599
|
+
}),
|
|
600
|
+
target_identity: NamingContractIdentitySchema.default({
|
|
601
|
+
product_name: 'CodeSDD',
|
|
602
|
+
cli_bin: 'codesdd',
|
|
603
|
+
package_name: '@devtrack-solution/codesdd',
|
|
604
|
+
}),
|
|
605
|
+
forbidden_terms: z.array(NamingContractForbiddenTermSchema).default([]),
|
|
606
|
+
allowlist: z.array(NamingContractAllowlistEntrySchema).default([]),
|
|
607
|
+
rename_rules: z.array(NamingContractRenameRuleSchema).default([]),
|
|
608
|
+
zero_residue_gate: NamingContractZeroResidueGateSchema.default({
|
|
609
|
+
enabled: false,
|
|
610
|
+
enforcement: 'warning',
|
|
611
|
+
terms: [],
|
|
612
|
+
allowlist_paths: [],
|
|
613
|
+
removal_phase: 'compatibility-shutdown',
|
|
614
|
+
}),
|
|
615
|
+
updated_at: NullableStringSchema,
|
|
616
|
+
});
|
|
617
|
+
//# sourceMappingURL=types.js.map
|