@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,20 @@
|
|
|
1
|
+
import { SddStores } from "../store/sdd-stores.js";
|
|
2
|
+
export declare class ApproveService {
|
|
3
|
+
private readonly stores;
|
|
4
|
+
constructor(stores: SddStores);
|
|
5
|
+
execute(projectRoot: string, featureId: string, stage: any, options?: {
|
|
6
|
+
by?: string;
|
|
7
|
+
note?: string;
|
|
8
|
+
render?: boolean;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
feature_id: string;
|
|
11
|
+
stage: any;
|
|
12
|
+
status: any;
|
|
13
|
+
approved_at: any;
|
|
14
|
+
approved_by: any;
|
|
15
|
+
current_stage: "proposta" | "planejamento" | "tarefas" | "execucao" | "consolidacao";
|
|
16
|
+
planned_workspace_path: string;
|
|
17
|
+
generated_docs: string[];
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=approve.service.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { runLifecycleHooks } from "../domain/lifecycle-hooks.js";
|
|
3
|
+
import { loadStateSnapshot, loadSkillCatalogState, nowIso, saveBacklogState } from "../state.js";
|
|
4
|
+
import { bundlesForSkills, getRuntime, persistAndRender, ensureFeaturePlannedWorkspace, resolveFeat, resolveRoutedSkills } from "../legacy-operations.js";
|
|
5
|
+
import { withStateLock } from "../state-lock.js";
|
|
6
|
+
export class ApproveService {
|
|
7
|
+
stores;
|
|
8
|
+
constructor(stores) {
|
|
9
|
+
this.stores = stores;
|
|
10
|
+
}
|
|
11
|
+
async execute(projectRoot, featureId, stage, options) {
|
|
12
|
+
const { config, paths } = await getRuntime(projectRoot);
|
|
13
|
+
return withStateLock(paths.stateDir, async () => {
|
|
14
|
+
const snapshot = await loadStateSnapshot(paths, config);
|
|
15
|
+
const catalog = await loadSkillCatalogState(paths);
|
|
16
|
+
const feature = resolveFeat(snapshot.backlog.items, featureId);
|
|
17
|
+
const now = nowIso();
|
|
18
|
+
await runLifecycleHooks('before-approve', {
|
|
19
|
+
projectRoot,
|
|
20
|
+
featureId: feature.id,
|
|
21
|
+
entityId: feature.id,
|
|
22
|
+
stage,
|
|
23
|
+
options: options,
|
|
24
|
+
metadata: {
|
|
25
|
+
current_stage: feature.current_stage,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
if (feature.flow_mode === 'direto' && (stage === 'proposta' || stage === 'planejamento')) {
|
|
29
|
+
feature.gates[stage].status = 'nao_exigida';
|
|
30
|
+
feature.gates[stage].approved_at = now;
|
|
31
|
+
feature.gates[stage].approved_by = options?.by || '';
|
|
32
|
+
feature.gates[stage].note = options?.note || 'Etapa nao exigida no fluxo direto.';
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
feature.gates[stage].status = 'aprovada';
|
|
36
|
+
feature.gates[stage].approved_at = now;
|
|
37
|
+
feature.gates[stage].approved_by = options?.by || '';
|
|
38
|
+
feature.gates[stage].note = options?.note || '';
|
|
39
|
+
}
|
|
40
|
+
if (stage === 'proposta')
|
|
41
|
+
feature.current_stage = 'planejamento';
|
|
42
|
+
if (stage === 'planejamento')
|
|
43
|
+
feature.current_stage = 'tarefas';
|
|
44
|
+
if (stage === 'tarefas')
|
|
45
|
+
feature.current_stage = 'execucao';
|
|
46
|
+
feature.last_sync_at = now;
|
|
47
|
+
let plannedWorkspacePath = '';
|
|
48
|
+
let generatedDocs = [];
|
|
49
|
+
if (stage === 'planejamento') {
|
|
50
|
+
feature.recommended_skills = resolveRoutedSkills(snapshot, feature.touches);
|
|
51
|
+
const recommendedBundles = bundlesForSkills(catalog, feature.recommended_skills);
|
|
52
|
+
const workspace = await ensureFeaturePlannedWorkspace(paths, config, feature, recommendedBundles);
|
|
53
|
+
plannedWorkspacePath = path.relative(paths.projectRoot, workspace.plannedPath);
|
|
54
|
+
generatedDocs = workspace.generatedDocs;
|
|
55
|
+
}
|
|
56
|
+
await saveBacklogState(paths, snapshot.backlog);
|
|
57
|
+
await persistAndRender(paths, config, options?.render);
|
|
58
|
+
await runLifecycleHooks('after-approve', {
|
|
59
|
+
projectRoot,
|
|
60
|
+
featureId: feature.id,
|
|
61
|
+
entityId: feature.id,
|
|
62
|
+
stage,
|
|
63
|
+
options: options,
|
|
64
|
+
metadata: {
|
|
65
|
+
current_stage: feature.current_stage,
|
|
66
|
+
planned_workspace_path: plannedWorkspacePath,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
return {
|
|
70
|
+
feature_id: feature.id,
|
|
71
|
+
stage,
|
|
72
|
+
status: feature.gates[stage].status,
|
|
73
|
+
approved_at: feature.gates[stage].approved_at || '',
|
|
74
|
+
approved_by: feature.gates[stage].approved_by || '',
|
|
75
|
+
current_stage: feature.current_stage,
|
|
76
|
+
planned_workspace_path: plannedWorkspacePath,
|
|
77
|
+
generated_docs: generatedDocs,
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=approve.service.js.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { MetaEvolutionConfig } from "../legacy-operations.js";
|
|
2
|
+
import { SddStores } from "../store/sdd-stores.js";
|
|
3
|
+
export interface AuditHistoryAppendResult {
|
|
4
|
+
path: string;
|
|
5
|
+
appended: boolean;
|
|
6
|
+
total_runs: number;
|
|
7
|
+
run_id: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class AuditService {
|
|
10
|
+
private readonly stores;
|
|
11
|
+
constructor(stores: SddStores);
|
|
12
|
+
execute(projectRoot: string): Promise<{
|
|
13
|
+
audit_history: {
|
|
14
|
+
path: string;
|
|
15
|
+
appended: true;
|
|
16
|
+
total_runs: number;
|
|
17
|
+
run_id: string;
|
|
18
|
+
};
|
|
19
|
+
generated_at: string;
|
|
20
|
+
meta_evolution: MetaEvolutionConfig;
|
|
21
|
+
metrics: {
|
|
22
|
+
artifacts_without_placeholder: {
|
|
23
|
+
ok: number;
|
|
24
|
+
total: number;
|
|
25
|
+
percent: number;
|
|
26
|
+
};
|
|
27
|
+
debates_with_real_deliberation: {
|
|
28
|
+
ok: number;
|
|
29
|
+
total: number;
|
|
30
|
+
percent: number;
|
|
31
|
+
};
|
|
32
|
+
adrs_generated_vs_expected: {
|
|
33
|
+
ok: number;
|
|
34
|
+
total: number;
|
|
35
|
+
percent: number;
|
|
36
|
+
};
|
|
37
|
+
quality_contracts_ready: {
|
|
38
|
+
ok: number;
|
|
39
|
+
total: number;
|
|
40
|
+
percent: number;
|
|
41
|
+
};
|
|
42
|
+
forced_transitions: {
|
|
43
|
+
total: number;
|
|
44
|
+
feature_refs: string[];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
score: number;
|
|
48
|
+
healthy: boolean;
|
|
49
|
+
should_open_insight: boolean;
|
|
50
|
+
recommendation: string;
|
|
51
|
+
}>;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=audit.service.d.ts.map
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { existsSync, promises as fs } from "node:fs";
|
|
3
|
+
import { CLI_NAME } from "../../branding.js";
|
|
4
|
+
import { adrFileName } from "../adr.js";
|
|
5
|
+
import { loadStateSnapshot, nowIso, saveStateTransaction } from "../state.js";
|
|
6
|
+
import { normalizePercent, readMetaEvolutionConfig, hasPlaceholder, collectAuditArtifacts, debateHasRealDeliberation, collectForcedTransitions, getRuntime, relProjectPath, evaluateFeatureQuality } from "../legacy-operations.js";
|
|
7
|
+
function auditRunId(timestamp) {
|
|
8
|
+
const compact = timestamp.replace(/\D/g, '');
|
|
9
|
+
return `AUD-${compact || Date.now()}`;
|
|
10
|
+
}
|
|
11
|
+
function toAuditHistoryEntry(result) {
|
|
12
|
+
return {
|
|
13
|
+
run_id: auditRunId(result.generated_at),
|
|
14
|
+
generated_at: result.generated_at,
|
|
15
|
+
score: result.score,
|
|
16
|
+
healthy: result.healthy,
|
|
17
|
+
should_open_insight: result.should_open_insight,
|
|
18
|
+
metrics: result.metrics,
|
|
19
|
+
recommendation: result.recommendation,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export class AuditService {
|
|
23
|
+
stores;
|
|
24
|
+
constructor(stores) {
|
|
25
|
+
this.stores = stores;
|
|
26
|
+
}
|
|
27
|
+
async execute(projectRoot) {
|
|
28
|
+
const { config, paths } = await getRuntime(projectRoot);
|
|
29
|
+
const snapshot = await loadStateSnapshot(paths, config);
|
|
30
|
+
const metaEvolution = await readMetaEvolutionConfig(paths);
|
|
31
|
+
const artifacts = await collectAuditArtifacts(paths);
|
|
32
|
+
let placeholderFreeCount = 0;
|
|
33
|
+
for (const artifact of artifacts) {
|
|
34
|
+
const content = await fs.readFile(artifact, 'utf-8').catch(() => '');
|
|
35
|
+
if (!hasPlaceholder(content, metaEvolution.placeholder_markers)) {
|
|
36
|
+
placeholderFreeCount += 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const debateFiles = await fs.readdir(paths.discoveryDebatesDir).catch(() => []);
|
|
40
|
+
let debatesWithRealDeliberation = 0;
|
|
41
|
+
for (const fileName of debateFiles) {
|
|
42
|
+
if (!fileName.endsWith('.md'))
|
|
43
|
+
continue;
|
|
44
|
+
const debateContent = await fs
|
|
45
|
+
.readFile(path.join(paths.discoveryDebatesDir, fileName), 'utf-8')
|
|
46
|
+
.catch(() => '');
|
|
47
|
+
if (debateHasRealDeliberation(debateContent)) {
|
|
48
|
+
debatesWithRealDeliberation += 1;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const expectedAdrFeatures = snapshot.backlog.items.filter((item) => item.requires_adr);
|
|
52
|
+
let generatedAdrCount = 0;
|
|
53
|
+
for (const feature of expectedAdrFeatures) {
|
|
54
|
+
const adrPath = path.join(paths.coreDir, 'adrs', adrFileName(feature.id));
|
|
55
|
+
if (existsSync(adrPath)) {
|
|
56
|
+
generatedAdrCount += 1;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const forcedTransitions = await collectForcedTransitions(paths);
|
|
60
|
+
const qualityTargets = snapshot.backlog.items.filter((item) => item.quality_contract || item.status === 'IN_PROGRESS');
|
|
61
|
+
let qualityReadyCount = 0;
|
|
62
|
+
for (const feature of qualityTargets) {
|
|
63
|
+
const quality = await evaluateFeatureQuality(paths, config, feature);
|
|
64
|
+
if (quality.ok || (feature.status !== 'IN_PROGRESS' && !!feature.quality_contract)) {
|
|
65
|
+
qualityReadyCount += 1;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const placeholdersMetric = {
|
|
69
|
+
ok: placeholderFreeCount,
|
|
70
|
+
total: artifacts.length,
|
|
71
|
+
percent: normalizePercent(placeholderFreeCount, artifacts.length),
|
|
72
|
+
};
|
|
73
|
+
const debateMetric = {
|
|
74
|
+
ok: debatesWithRealDeliberation,
|
|
75
|
+
total: debateFiles.filter((name) => name.endsWith('.md')).length,
|
|
76
|
+
percent: normalizePercent(debatesWithRealDeliberation, debateFiles.filter((name) => name.endsWith('.md')).length),
|
|
77
|
+
};
|
|
78
|
+
const adrMetric = {
|
|
79
|
+
ok: generatedAdrCount,
|
|
80
|
+
total: expectedAdrFeatures.length,
|
|
81
|
+
percent: normalizePercent(generatedAdrCount, expectedAdrFeatures.length),
|
|
82
|
+
};
|
|
83
|
+
const qualityMetric = {
|
|
84
|
+
ok: qualityReadyCount,
|
|
85
|
+
total: qualityTargets.length,
|
|
86
|
+
percent: normalizePercent(qualityReadyCount, qualityTargets.length),
|
|
87
|
+
};
|
|
88
|
+
const scoreBase = placeholdersMetric.percent * 0.32 +
|
|
89
|
+
debateMetric.percent * 0.28 +
|
|
90
|
+
adrMetric.percent * 0.2 +
|
|
91
|
+
qualityMetric.percent * 0.2;
|
|
92
|
+
const forcedPenalty = Math.min(forcedTransitions.total * 2, 20);
|
|
93
|
+
const score = Math.max(0, Math.round((scoreBase - forcedPenalty) * 100) / 100);
|
|
94
|
+
const healthy = score >= metaEvolution.health_alert_threshold;
|
|
95
|
+
const shouldOpenInsight = !healthy && metaEvolution.enabled;
|
|
96
|
+
const recommendation = shouldOpenInsight
|
|
97
|
+
? `Cycle health is below threshold (${metaEvolution.health_alert_threshold}%). Suggestion: open an INS with "${CLI_NAME} sdd insight \\"SDD meta-evolution: reduce placeholders and strengthen deliberation\\"".`
|
|
98
|
+
: 'Cycle is within the configured threshold. Keep semiannual monitoring.';
|
|
99
|
+
const result = {
|
|
100
|
+
generated_at: nowIso(),
|
|
101
|
+
meta_evolution: metaEvolution,
|
|
102
|
+
metrics: {
|
|
103
|
+
artifacts_without_placeholder: placeholdersMetric,
|
|
104
|
+
debates_with_real_deliberation: debateMetric,
|
|
105
|
+
adrs_generated_vs_expected: adrMetric,
|
|
106
|
+
quality_contracts_ready: qualityMetric,
|
|
107
|
+
forced_transitions: {
|
|
108
|
+
total: forcedTransitions.total,
|
|
109
|
+
feature_refs: forcedTransitions.featureRefs,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
score,
|
|
113
|
+
healthy,
|
|
114
|
+
should_open_insight: shouldOpenInsight,
|
|
115
|
+
recommendation,
|
|
116
|
+
};
|
|
117
|
+
const entry = toAuditHistoryEntry(result);
|
|
118
|
+
const auditHistory = {
|
|
119
|
+
...snapshot.auditHistory,
|
|
120
|
+
runs: [...snapshot.auditHistory.runs, entry],
|
|
121
|
+
};
|
|
122
|
+
await saveStateTransaction(paths, {
|
|
123
|
+
auditHistory,
|
|
124
|
+
});
|
|
125
|
+
return {
|
|
126
|
+
...result,
|
|
127
|
+
audit_history: {
|
|
128
|
+
path: relProjectPath(paths, paths.stateFiles.auditHistory),
|
|
129
|
+
appended: true,
|
|
130
|
+
total_runs: auditHistory.runs.length,
|
|
131
|
+
run_id: entry.run_id,
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=audit.service.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Scale } from "../types.js";
|
|
2
|
+
import { SddStores } from "../store/sdd-stores.js";
|
|
3
|
+
export declare class BreakdownService {
|
|
4
|
+
private readonly stores;
|
|
5
|
+
constructor(stores: SddStores);
|
|
6
|
+
execute(projectRoot: string, radarId: string, options?: {
|
|
7
|
+
titles?: string[];
|
|
8
|
+
scale?: Scale;
|
|
9
|
+
mode?: 'graph' | 'flat';
|
|
10
|
+
incremental?: boolean;
|
|
11
|
+
dedupe?: 'strict' | 'normal' | 'off';
|
|
12
|
+
render?: boolean;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
radarId: string;
|
|
15
|
+
created: string[];
|
|
16
|
+
linked_existing: string[];
|
|
17
|
+
rewired_dependencies: {
|
|
18
|
+
feature_id: string;
|
|
19
|
+
added_blocked_by: string[];
|
|
20
|
+
}[];
|
|
21
|
+
skipped_duplicates: {
|
|
22
|
+
title: string;
|
|
23
|
+
existing_feature_id: string;
|
|
24
|
+
}[];
|
|
25
|
+
warnings: {
|
|
26
|
+
title: string;
|
|
27
|
+
severity: "warning";
|
|
28
|
+
candidates: Array<{
|
|
29
|
+
id: string;
|
|
30
|
+
score: number;
|
|
31
|
+
}>;
|
|
32
|
+
}[];
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=breakdown.service.d.ts.map
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { allocateEntityId, loadStateSnapshot, loadSkillCatalogState, nowIso, saveStateTransaction } from "../state.js";
|
|
2
|
+
import { warnAndLink } from "../dedup.js";
|
|
3
|
+
import { findDiscoveryRecord, syncCounterFromId, getRuntime, persistAndRender, resolveRadar, buildBacklogItem, classifyFeatureShape, stackContextTokens, normalizeTitle, intersects, updateDependencyMetadata, resolveRoutedSkills, applyLoggedTransition } from "../legacy-operations.js";
|
|
4
|
+
import { withStateLock } from "../state-lock.js";
|
|
5
|
+
export class BreakdownService {
|
|
6
|
+
stores;
|
|
7
|
+
constructor(stores) {
|
|
8
|
+
this.stores = stores;
|
|
9
|
+
}
|
|
10
|
+
async execute(projectRoot, radarId, options) {
|
|
11
|
+
const { config, paths } = await getRuntime(projectRoot);
|
|
12
|
+
return withStateLock(paths.stateDir, async () => {
|
|
13
|
+
const snapshot = await loadStateSnapshot(paths, config);
|
|
14
|
+
const radar = findDiscoveryRecord(snapshot.discoveryIndex.records, radarId);
|
|
15
|
+
resolveRadar(radar);
|
|
16
|
+
const catalog = await loadSkillCatalogState(paths);
|
|
17
|
+
const mode = options?.mode || 'graph';
|
|
18
|
+
const dedupe = options?.dedupe || 'normal';
|
|
19
|
+
const incremental = options?.incremental ?? false;
|
|
20
|
+
const titles = options?.titles && options.titles.length > 0 ? options.titles : [radar.title || `Feature de ${radar.id}`];
|
|
21
|
+
const created = [];
|
|
22
|
+
const linkedExisting = [];
|
|
23
|
+
const rewiredMap = new Map();
|
|
24
|
+
const skippedDuplicates = [];
|
|
25
|
+
const semanticWarnings = [];
|
|
26
|
+
const parallelGroup = `${radar.type.toLowerCase()}-${radar.id.toLowerCase()}`;
|
|
27
|
+
const existingItems = snapshot.backlog.items.slice();
|
|
28
|
+
for (const rawTitle of titles) {
|
|
29
|
+
const title = rawTitle.trim();
|
|
30
|
+
if (!title)
|
|
31
|
+
continue;
|
|
32
|
+
const shape = classifyFeatureShape(title, stackContextTokens(snapshot));
|
|
33
|
+
const normalizedTitle = normalizeTitle(title);
|
|
34
|
+
const duplicate = existingItems.find((item) => {
|
|
35
|
+
if (dedupe !== 'strict')
|
|
36
|
+
return false;
|
|
37
|
+
const sameOrigin = item.origin_ref === radar.id;
|
|
38
|
+
const itemNorm = normalizeTitle(item.title);
|
|
39
|
+
return sameOrigin && itemNorm === normalizedTitle;
|
|
40
|
+
});
|
|
41
|
+
if (duplicate) {
|
|
42
|
+
linkedExisting.push(duplicate.id);
|
|
43
|
+
skippedDuplicates.push({ title, existing_feature_id: duplicate.id });
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const semanticMatch = dedupe === 'off'
|
|
47
|
+
? { severity: 'none', warningLinks: [], candidates: [] }
|
|
48
|
+
: warnAndLink('FEAT', title, existingItems
|
|
49
|
+
.filter((item) => item.origin_ref === radar.id || intersects(item.touches, shape.touches))
|
|
50
|
+
.map((item) => ({
|
|
51
|
+
id: item.id,
|
|
52
|
+
title: item.title,
|
|
53
|
+
})));
|
|
54
|
+
const id = await allocateEntityId(paths, 'FEAT');
|
|
55
|
+
syncCounterFromId(snapshot.discoveryIndex, id);
|
|
56
|
+
const recommended = resolveRoutedSkills(snapshot, shape.touches);
|
|
57
|
+
const item = buildBacklogItem(id, title, 'radar', radar.id, options?.scale || 'STANDARD', recommended, {
|
|
58
|
+
parallelGroup,
|
|
59
|
+
executionKind: shape.executionKind,
|
|
60
|
+
planningMode: shape.planningMode,
|
|
61
|
+
acceptanceRefs: [radar.id],
|
|
62
|
+
touches: shape.touches,
|
|
63
|
+
lockDomains: shape.lockDomains,
|
|
64
|
+
produces: shape.produces,
|
|
65
|
+
consumes: shape.consumes,
|
|
66
|
+
});
|
|
67
|
+
if (semanticMatch.severity === 'warning') {
|
|
68
|
+
item.warning_links = semanticMatch.warningLinks;
|
|
69
|
+
semanticWarnings.push({
|
|
70
|
+
title,
|
|
71
|
+
severity: 'warning',
|
|
72
|
+
candidates: semanticMatch.candidates.map((candidate) => ({
|
|
73
|
+
id: candidate.id,
|
|
74
|
+
score: candidate.score,
|
|
75
|
+
})),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
snapshot.backlog.items.push(item);
|
|
79
|
+
existingItems.push(item);
|
|
80
|
+
created.push(item);
|
|
81
|
+
}
|
|
82
|
+
if (created.length === 0 && linkedExisting.length === 0) {
|
|
83
|
+
throw new Error('Nenhuma feature criada no breakdown. Informe pelo menos um titulo valido.');
|
|
84
|
+
}
|
|
85
|
+
if (mode === 'graph') {
|
|
86
|
+
const domainOrMigration = created
|
|
87
|
+
.filter((item) => item.execution_kind === 'migration' || item.title.toLowerCase().includes('modelo'))
|
|
88
|
+
.map((item) => item.id);
|
|
89
|
+
const apiOrBackend = created
|
|
90
|
+
.filter((item) => item.execution_kind === 'feature' || item.title.toLowerCase().includes('api'))
|
|
91
|
+
.map((item) => item.id);
|
|
92
|
+
for (const item of created) {
|
|
93
|
+
if (item.execution_kind === 'feature') {
|
|
94
|
+
item.blocked_by = Array.from(new Set([...item.blocked_by, ...domainOrMigration.filter((dep) => dep !== item.id)]));
|
|
95
|
+
}
|
|
96
|
+
if (item.execution_kind === 'frontend_coverage') {
|
|
97
|
+
item.blocked_by = Array.from(new Set([...item.blocked_by, ...apiOrBackend.filter((dep) => dep !== item.id)]));
|
|
98
|
+
}
|
|
99
|
+
if (item.execution_kind === 'documentation') {
|
|
100
|
+
item.blocked_by = created
|
|
101
|
+
.filter((other) => other.id !== item.id && other.execution_kind !== 'documentation')
|
|
102
|
+
.map((other) => other.id);
|
|
103
|
+
}
|
|
104
|
+
if (item.blocked_by.length > 0) {
|
|
105
|
+
item.consumes = Array.from(new Set([...item.consumes, ...item.blocked_by]));
|
|
106
|
+
applyLoggedTransition(snapshot.transitionLog.events, 'FEAT', item, 'BLOCKED', {
|
|
107
|
+
sourceCommand: 'sdd breakdown',
|
|
108
|
+
reason: `Dependencias definidas no breakdown ${radar.id}`,
|
|
109
|
+
timestamp: nowIso(),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (incremental && created.length > 0) {
|
|
115
|
+
for (const createdItem of created) {
|
|
116
|
+
const addedDeps = new Set();
|
|
117
|
+
for (const existing of snapshot.backlog.items) {
|
|
118
|
+
if (existing.id === createdItem.id)
|
|
119
|
+
continue;
|
|
120
|
+
if (intersects(createdItem.consumes, existing.produces) && existing.status !== 'DONE') {
|
|
121
|
+
createdItem.blocked_by = Array.from(new Set([...createdItem.blocked_by, existing.id]));
|
|
122
|
+
addedDeps.add(existing.id);
|
|
123
|
+
}
|
|
124
|
+
if (intersects(existing.consumes, createdItem.produces) && createdItem.status !== 'DONE') {
|
|
125
|
+
existing.blocked_by = Array.from(new Set([...existing.blocked_by, createdItem.id]));
|
|
126
|
+
if (existing.status === 'READY')
|
|
127
|
+
existing.status = 'BLOCKED';
|
|
128
|
+
const deps = rewiredMap.get(existing.id) || new Set();
|
|
129
|
+
deps.add(createdItem.id);
|
|
130
|
+
rewiredMap.set(existing.id, deps);
|
|
131
|
+
}
|
|
132
|
+
if (existing.status === 'IN_PROGRESS' &&
|
|
133
|
+
intersects(createdItem.lock_domains, existing.lock_domains)) {
|
|
134
|
+
createdItem.status = 'BLOCKED';
|
|
135
|
+
createdItem.summary = `${createdItem.summary || ''}\nLOCK_CONFLICT com ${existing.id}`.trim();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (addedDeps.size > 0) {
|
|
139
|
+
applyLoggedTransition(snapshot.transitionLog.events, 'FEAT', createdItem, 'BLOCKED', {
|
|
140
|
+
sourceCommand: 'sdd breakdown',
|
|
141
|
+
reason: `Dependencias incrementais detectadas para ${createdItem.id}`,
|
|
142
|
+
timestamp: nowIso(),
|
|
143
|
+
});
|
|
144
|
+
const deps = rewiredMap.get(createdItem.id) || new Set();
|
|
145
|
+
for (const dep of addedDeps)
|
|
146
|
+
deps.add(dep);
|
|
147
|
+
rewiredMap.set(createdItem.id, deps);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
updateDependencyMetadata(snapshot.backlog.items);
|
|
152
|
+
if (radar.status !== 'SPLIT') {
|
|
153
|
+
applyLoggedTransition(snapshot.transitionLog.events, radar.type, radar, 'SPLIT', {
|
|
154
|
+
sourceCommand: 'sdd breakdown',
|
|
155
|
+
reason: `EPIC/RAD ${radar.id} quebrado em features`,
|
|
156
|
+
timestamp: nowIso(),
|
|
157
|
+
afterTransition: (currentRadar) => {
|
|
158
|
+
currentRadar.updated_at = nowIso();
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
radar.related_ids = Array.from(new Set([...radar.related_ids, ...created.map((item) => item.id)]));
|
|
163
|
+
await saveStateTransaction(paths, {
|
|
164
|
+
backlog: snapshot.backlog,
|
|
165
|
+
discoveryIndex: snapshot.discoveryIndex,
|
|
166
|
+
transitionLog: snapshot.transitionLog,
|
|
167
|
+
});
|
|
168
|
+
await persistAndRender(paths, config, options?.render);
|
|
169
|
+
return {
|
|
170
|
+
radarId: radar.id,
|
|
171
|
+
created: created.map((item) => item.id),
|
|
172
|
+
linked_existing: linkedExisting,
|
|
173
|
+
rewired_dependencies: Array.from(rewiredMap.entries())
|
|
174
|
+
.sort((a, b) => a[0].localeCompare(b[0]))
|
|
175
|
+
.map(([feature_id, deps]) => ({
|
|
176
|
+
feature_id,
|
|
177
|
+
added_blocked_by: Array.from(deps).sort(),
|
|
178
|
+
})),
|
|
179
|
+
skipped_duplicates: skippedDuplicates,
|
|
180
|
+
warnings: semanticWarnings,
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=breakdown.service.js.map
|