@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,42 @@
|
|
|
1
|
+
import type { SddStores } from '../store/sdd-stores.js';
|
|
2
|
+
export type McpProviderId = 'codex' | 'claude-code' | 'kimmy-code' | 'kilo-code' | 'open-code' | 'generic';
|
|
3
|
+
export type McpToolName = 'opensdd.next' | 'opensdd.context' | 'opensdd.finalize';
|
|
4
|
+
type JsonSchema = Record<string, unknown>;
|
|
5
|
+
export interface McpRuntimeManifest {
|
|
6
|
+
protocol: 'opensdd-mcp-bridge/v1';
|
|
7
|
+
server: {
|
|
8
|
+
name: 'opensdd';
|
|
9
|
+
version: 1;
|
|
10
|
+
};
|
|
11
|
+
provider: {
|
|
12
|
+
id: McpProviderId;
|
|
13
|
+
label: string;
|
|
14
|
+
transport: 'stdio';
|
|
15
|
+
session_contract: string;
|
|
16
|
+
};
|
|
17
|
+
tools: Array<{
|
|
18
|
+
name: McpToolName;
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
input_schema: JsonSchema;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
export interface McpRuntimeInvocation {
|
|
25
|
+
protocol: 'opensdd-mcp-bridge/v1';
|
|
26
|
+
provider: McpProviderId;
|
|
27
|
+
tool: McpToolName;
|
|
28
|
+
invoked_at: string;
|
|
29
|
+
result: unknown;
|
|
30
|
+
}
|
|
31
|
+
export declare class McpRuntimeService {
|
|
32
|
+
private readonly stores;
|
|
33
|
+
constructor(stores: SddStores);
|
|
34
|
+
manifest(provider?: string): McpRuntimeManifest;
|
|
35
|
+
invoke(projectRoot: string, input: {
|
|
36
|
+
provider?: string;
|
|
37
|
+
tool: McpToolName;
|
|
38
|
+
args?: Record<string, unknown>;
|
|
39
|
+
}): Promise<McpRuntimeInvocation>;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=mcp-runtime.service.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { nowIso } from '../state.js';
|
|
2
|
+
import { ContextService } from './context.service.js';
|
|
3
|
+
import { FinalizeService } from './finalize.service.js';
|
|
4
|
+
import { NextService } from './next.service.js';
|
|
5
|
+
const PROVIDER_PROFILES = {
|
|
6
|
+
codex: {
|
|
7
|
+
label: 'Codex',
|
|
8
|
+
session_contract: 'Use JSON tool payloads and preserve FEAT state transitions through next/context/finalize without hidden side channels.',
|
|
9
|
+
},
|
|
10
|
+
'claude-code': {
|
|
11
|
+
label: 'Claude Code',
|
|
12
|
+
session_contract: 'Use JSON tool payloads and treat OpenSDD as the canonical execution ledger for plan, context, and closure.',
|
|
13
|
+
},
|
|
14
|
+
'kimmy-code': {
|
|
15
|
+
label: 'Kimmy Code',
|
|
16
|
+
session_contract: 'Use the same stateless JSON envelopes and feed all execution evidence back into OpenSDD workspaces.',
|
|
17
|
+
},
|
|
18
|
+
'kilo-code': {
|
|
19
|
+
label: 'Kilo Code',
|
|
20
|
+
session_contract: 'Use OpenSDD tool envelopes as the source of truth for ready work, scoped context, and feature finalization.',
|
|
21
|
+
},
|
|
22
|
+
'open-code': {
|
|
23
|
+
label: 'Open Code',
|
|
24
|
+
session_contract: 'Use stateless OpenSDD tool calls and return evidence through workspace artifacts before finalize.',
|
|
25
|
+
},
|
|
26
|
+
generic: {
|
|
27
|
+
label: 'Generic MCP Client',
|
|
28
|
+
session_contract: 'Use the provider-agnostic JSON envelope and treat OpenSDD workspace/state files as the only canonical state system.',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const TOOL_DEFINITIONS = [
|
|
32
|
+
{
|
|
33
|
+
name: 'opensdd.next',
|
|
34
|
+
title: 'OpenSDD Next',
|
|
35
|
+
description: 'Return the next ready FEATs, blocked work, conflicts, and execution waves.',
|
|
36
|
+
input_schema: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
additionalProperties: false,
|
|
39
|
+
properties: {
|
|
40
|
+
rank: { type: 'string', enum: ['impact', 'criticality', 'fifo'] },
|
|
41
|
+
limit: { type: 'integer', minimum: 1 },
|
|
42
|
+
maxAgents: { type: 'integer', minimum: 1 },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'opensdd.context',
|
|
48
|
+
title: 'OpenSDD Context',
|
|
49
|
+
description: 'Return the scoped execution context for a FEAT, EPIC, FGAP, or TD reference.',
|
|
50
|
+
input_schema: {
|
|
51
|
+
type: 'object',
|
|
52
|
+
additionalProperties: false,
|
|
53
|
+
required: ['ref'],
|
|
54
|
+
properties: {
|
|
55
|
+
ref: { type: 'string' },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'opensdd.finalize',
|
|
61
|
+
title: 'OpenSDD Finalize',
|
|
62
|
+
description: 'Finalize a FEAT or all ready queue entries after quality and workflow guardrails pass.',
|
|
63
|
+
input_schema: {
|
|
64
|
+
type: 'object',
|
|
65
|
+
additionalProperties: false,
|
|
66
|
+
properties: {
|
|
67
|
+
ref: { type: 'string' },
|
|
68
|
+
allReady: { type: 'boolean' },
|
|
69
|
+
forceFrontend: { type: 'boolean' },
|
|
70
|
+
forceTransition: { type: 'boolean' },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
function resolveProvider(provider) {
|
|
76
|
+
if (!provider)
|
|
77
|
+
return 'generic';
|
|
78
|
+
if (provider in PROVIDER_PROFILES)
|
|
79
|
+
return provider;
|
|
80
|
+
throw new Error(`Unknown MCP provider "${provider}". Use one of: ${Object.keys(PROVIDER_PROFILES).join(', ')}`);
|
|
81
|
+
}
|
|
82
|
+
export class McpRuntimeService {
|
|
83
|
+
stores;
|
|
84
|
+
constructor(stores) {
|
|
85
|
+
this.stores = stores;
|
|
86
|
+
}
|
|
87
|
+
manifest(provider) {
|
|
88
|
+
const providerId = resolveProvider(provider);
|
|
89
|
+
return {
|
|
90
|
+
protocol: 'opensdd-mcp-bridge/v1',
|
|
91
|
+
server: {
|
|
92
|
+
name: 'opensdd',
|
|
93
|
+
version: 1,
|
|
94
|
+
},
|
|
95
|
+
provider: {
|
|
96
|
+
id: providerId,
|
|
97
|
+
label: PROVIDER_PROFILES[providerId].label,
|
|
98
|
+
transport: 'stdio',
|
|
99
|
+
session_contract: PROVIDER_PROFILES[providerId].session_contract,
|
|
100
|
+
},
|
|
101
|
+
tools: TOOL_DEFINITIONS,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
async invoke(projectRoot, input) {
|
|
105
|
+
const providerId = resolveProvider(input.provider);
|
|
106
|
+
const args = input.args || {};
|
|
107
|
+
let result;
|
|
108
|
+
switch (input.tool) {
|
|
109
|
+
case 'opensdd.next':
|
|
110
|
+
result = await new NextService(this.stores).execute(projectRoot, {
|
|
111
|
+
rank: typeof args.rank === 'string' ? args.rank : undefined,
|
|
112
|
+
limit: typeof args.limit === 'number' ? args.limit : undefined,
|
|
113
|
+
maxAgents: typeof args.maxAgents === 'number' ? args.maxAgents : undefined,
|
|
114
|
+
});
|
|
115
|
+
break;
|
|
116
|
+
case 'opensdd.context':
|
|
117
|
+
if (typeof args.ref !== 'string' || !args.ref.trim()) {
|
|
118
|
+
throw new Error('opensdd.context requires args.ref');
|
|
119
|
+
}
|
|
120
|
+
result = await new ContextService(this.stores).execute(projectRoot, args.ref);
|
|
121
|
+
break;
|
|
122
|
+
case 'opensdd.finalize':
|
|
123
|
+
result = await new FinalizeService(this.stores).execute(projectRoot, {
|
|
124
|
+
ref: typeof args.ref === 'string' ? args.ref : undefined,
|
|
125
|
+
allReady: args.allReady === true,
|
|
126
|
+
forceFrontend: args.forceFrontend === true,
|
|
127
|
+
forceTransition: args.forceTransition === true,
|
|
128
|
+
cwd: typeof args.cwd === 'string' ? args.cwd : undefined,
|
|
129
|
+
render: false,
|
|
130
|
+
});
|
|
131
|
+
break;
|
|
132
|
+
default:
|
|
133
|
+
throw new Error(`Unsupported MCP tool "${input.tool}"`);
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
protocol: 'opensdd-mcp-bridge/v1',
|
|
137
|
+
provider: providerId,
|
|
138
|
+
tool: input.tool,
|
|
139
|
+
invoked_at: nowIso(),
|
|
140
|
+
result,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=mcp-runtime.service.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface SddMetricsOptions {
|
|
2
|
+
since?: string;
|
|
3
|
+
now?: Date;
|
|
4
|
+
}
|
|
5
|
+
export interface SddDurationMetrics {
|
|
6
|
+
count: number;
|
|
7
|
+
average_hours: number;
|
|
8
|
+
median_hours: number;
|
|
9
|
+
p90_hours: number;
|
|
10
|
+
min_hours: number;
|
|
11
|
+
max_hours: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SddAgingItem {
|
|
14
|
+
feature_id: string;
|
|
15
|
+
started_at: string;
|
|
16
|
+
age_hours: number;
|
|
17
|
+
}
|
|
18
|
+
export interface SddMetricsReport {
|
|
19
|
+
generated_at: string;
|
|
20
|
+
since: string;
|
|
21
|
+
until: string;
|
|
22
|
+
window_days: number;
|
|
23
|
+
transition_log_events: number;
|
|
24
|
+
features: {
|
|
25
|
+
completed: number;
|
|
26
|
+
completed_feature_ids: string[];
|
|
27
|
+
active: number;
|
|
28
|
+
active_feature_ids: string[];
|
|
29
|
+
};
|
|
30
|
+
lead_time: SddDurationMetrics;
|
|
31
|
+
aging: {
|
|
32
|
+
count: number;
|
|
33
|
+
average_hours: number;
|
|
34
|
+
max_hours: number;
|
|
35
|
+
items: SddAgingItem[];
|
|
36
|
+
};
|
|
37
|
+
throughput: {
|
|
38
|
+
done_count: number;
|
|
39
|
+
per_day: number;
|
|
40
|
+
by_day: Record<string, number>;
|
|
41
|
+
};
|
|
42
|
+
warnings: string[];
|
|
43
|
+
}
|
|
44
|
+
export declare function parseMetricsSince(value: string | undefined, now: Date): Date;
|
|
45
|
+
export declare class SddMetricsService {
|
|
46
|
+
execute(projectRoot?: string, options?: SddMetricsOptions): Promise<SddMetricsReport>;
|
|
47
|
+
}
|
|
48
|
+
export declare function formatSddMetricsReport(report: SddMetricsReport): string;
|
|
49
|
+
//# sourceMappingURL=metrics.service.d.ts.map
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { loadProjectSddConfig, loadStateSnapshot, resolveSddPaths, } from '../state.js';
|
|
2
|
+
import { ensureMemoryInitialized } from '../legacy-operations.js';
|
|
3
|
+
const HOUR_MS = 60 * 60 * 1000;
|
|
4
|
+
const DAY_MS = 24 * HOUR_MS;
|
|
5
|
+
function round(value) {
|
|
6
|
+
return Math.round(value * 100) / 100;
|
|
7
|
+
}
|
|
8
|
+
function parseTimestamp(value) {
|
|
9
|
+
const date = new Date(value);
|
|
10
|
+
if (Number.isNaN(date.getTime()))
|
|
11
|
+
return undefined;
|
|
12
|
+
return date;
|
|
13
|
+
}
|
|
14
|
+
export function parseMetricsSince(value, now) {
|
|
15
|
+
const raw = (value || '7d').trim();
|
|
16
|
+
const relative = /^(\d+)([hdw])$/i.exec(raw);
|
|
17
|
+
if (relative) {
|
|
18
|
+
const amount = Number(relative[1]);
|
|
19
|
+
const unit = relative[2].toLowerCase();
|
|
20
|
+
const multiplier = unit === 'h' ? HOUR_MS : unit === 'w' ? 7 * DAY_MS : DAY_MS;
|
|
21
|
+
return new Date(now.getTime() - amount * multiplier);
|
|
22
|
+
}
|
|
23
|
+
const parsed = parseTimestamp(raw);
|
|
24
|
+
if (!parsed) {
|
|
25
|
+
throw new Error('Invalid --since value. Use a relative window like 7d, 24h, 2w, or an ISO timestamp.');
|
|
26
|
+
}
|
|
27
|
+
return parsed;
|
|
28
|
+
}
|
|
29
|
+
function hoursBetween(start, end) {
|
|
30
|
+
return round((end.getTime() - start.getTime()) / HOUR_MS);
|
|
31
|
+
}
|
|
32
|
+
function durationMetrics(hours) {
|
|
33
|
+
if (hours.length === 0) {
|
|
34
|
+
return {
|
|
35
|
+
count: 0,
|
|
36
|
+
average_hours: 0,
|
|
37
|
+
median_hours: 0,
|
|
38
|
+
p90_hours: 0,
|
|
39
|
+
min_hours: 0,
|
|
40
|
+
max_hours: 0,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
const sorted = [...hours].sort((left, right) => left - right);
|
|
44
|
+
const sum = sorted.reduce((total, value) => total + value, 0);
|
|
45
|
+
const midpoint = Math.floor(sorted.length / 2);
|
|
46
|
+
const median = sorted.length % 2 === 0
|
|
47
|
+
? (sorted[midpoint - 1] + sorted[midpoint]) / 2
|
|
48
|
+
: sorted[midpoint];
|
|
49
|
+
const p90Index = Math.min(sorted.length - 1, Math.ceil(sorted.length * 0.9) - 1);
|
|
50
|
+
return {
|
|
51
|
+
count: sorted.length,
|
|
52
|
+
average_hours: round(sum / sorted.length),
|
|
53
|
+
median_hours: round(median),
|
|
54
|
+
p90_hours: round(sorted[p90Index]),
|
|
55
|
+
min_hours: round(sorted[0]),
|
|
56
|
+
max_hours: round(sorted[sorted.length - 1]),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function groupFeatureTransitions(events, warnings) {
|
|
60
|
+
const grouped = new Map();
|
|
61
|
+
const featureEvents = events
|
|
62
|
+
.filter((event) => event.entity_type === 'FEAT')
|
|
63
|
+
.map((event) => ({ event, timestamp: parseTimestamp(event.timestamp) }))
|
|
64
|
+
.filter((entry) => {
|
|
65
|
+
if (!entry.timestamp) {
|
|
66
|
+
warnings.push(`Ignoring FEAT transition with invalid timestamp: ${entry.event.entity_id}`);
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
return true;
|
|
70
|
+
})
|
|
71
|
+
.sort((left, right) => left.timestamp.getTime() - right.timestamp.getTime());
|
|
72
|
+
for (const entry of featureEvents) {
|
|
73
|
+
const event = entry.event;
|
|
74
|
+
const timestamp = entry.timestamp;
|
|
75
|
+
const summary = grouped.get(event.entity_id) ?? {
|
|
76
|
+
featureId: event.entity_id,
|
|
77
|
+
};
|
|
78
|
+
if (event.to === 'IN_PROGRESS') {
|
|
79
|
+
summary.startAt = timestamp;
|
|
80
|
+
summary.doneAt = undefined;
|
|
81
|
+
}
|
|
82
|
+
if (event.to === 'DONE' && summary.startAt && !summary.doneAt) {
|
|
83
|
+
summary.doneAt = timestamp;
|
|
84
|
+
}
|
|
85
|
+
summary.latestTo = event.to;
|
|
86
|
+
grouped.set(event.entity_id, summary);
|
|
87
|
+
}
|
|
88
|
+
return grouped;
|
|
89
|
+
}
|
|
90
|
+
function dayKey(date) {
|
|
91
|
+
return date.toISOString().slice(0, 10);
|
|
92
|
+
}
|
|
93
|
+
export class SddMetricsService {
|
|
94
|
+
async execute(projectRoot = '.', options = {}) {
|
|
95
|
+
const now = options.now ?? new Date();
|
|
96
|
+
const since = parseMetricsSince(options.since, now);
|
|
97
|
+
if (since.getTime() > now.getTime()) {
|
|
98
|
+
throw new Error('--since cannot be in the future.');
|
|
99
|
+
}
|
|
100
|
+
const config = await loadProjectSddConfig(projectRoot);
|
|
101
|
+
const paths = resolveSddPaths(projectRoot, config);
|
|
102
|
+
await ensureMemoryInitialized(paths);
|
|
103
|
+
const snapshot = await loadStateSnapshot(paths, config);
|
|
104
|
+
const warnings = [];
|
|
105
|
+
const grouped = groupFeatureTransitions(snapshot.transitionLog.events, warnings);
|
|
106
|
+
const completedIds = [];
|
|
107
|
+
const activeItems = [];
|
|
108
|
+
const leadTimes = [];
|
|
109
|
+
const byDay = {};
|
|
110
|
+
for (const summary of grouped.values()) {
|
|
111
|
+
if (summary.startAt && summary.doneAt && summary.doneAt >= since && summary.doneAt <= now) {
|
|
112
|
+
completedIds.push(summary.featureId);
|
|
113
|
+
leadTimes.push(hoursBetween(summary.startAt, summary.doneAt));
|
|
114
|
+
const key = dayKey(summary.doneAt);
|
|
115
|
+
byDay[key] = (byDay[key] ?? 0) + 1;
|
|
116
|
+
}
|
|
117
|
+
if (summary.startAt && !summary.doneAt && summary.latestTo === 'IN_PROGRESS') {
|
|
118
|
+
activeItems.push({
|
|
119
|
+
feature_id: summary.featureId,
|
|
120
|
+
started_at: summary.startAt.toISOString(),
|
|
121
|
+
age_hours: hoursBetween(summary.startAt, now),
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
activeItems.sort((left, right) => right.age_hours - left.age_hours || left.feature_id.localeCompare(right.feature_id));
|
|
126
|
+
completedIds.sort((left, right) => left.localeCompare(right));
|
|
127
|
+
const agingHours = activeItems.map((item) => item.age_hours);
|
|
128
|
+
const windowDays = Math.max(1 / 24, (now.getTime() - since.getTime()) / DAY_MS);
|
|
129
|
+
return {
|
|
130
|
+
generated_at: now.toISOString(),
|
|
131
|
+
since: since.toISOString(),
|
|
132
|
+
until: now.toISOString(),
|
|
133
|
+
window_days: round(windowDays),
|
|
134
|
+
transition_log_events: snapshot.transitionLog.events.length,
|
|
135
|
+
features: {
|
|
136
|
+
completed: completedIds.length,
|
|
137
|
+
completed_feature_ids: completedIds,
|
|
138
|
+
active: activeItems.length,
|
|
139
|
+
active_feature_ids: activeItems.map((item) => item.feature_id),
|
|
140
|
+
},
|
|
141
|
+
lead_time: durationMetrics(leadTimes),
|
|
142
|
+
aging: {
|
|
143
|
+
count: activeItems.length,
|
|
144
|
+
average_hours: agingHours.length > 0 ? round(agingHours.reduce((sum, value) => sum + value, 0) / agingHours.length) : 0,
|
|
145
|
+
max_hours: agingHours.length > 0 ? Math.max(...agingHours) : 0,
|
|
146
|
+
items: activeItems,
|
|
147
|
+
},
|
|
148
|
+
throughput: {
|
|
149
|
+
done_count: completedIds.length,
|
|
150
|
+
per_day: round(completedIds.length / windowDays),
|
|
151
|
+
by_day: Object.fromEntries(Object.entries(byDay).sort(([left], [right]) => left.localeCompare(right))),
|
|
152
|
+
},
|
|
153
|
+
warnings,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
export function formatSddMetricsReport(report) {
|
|
158
|
+
const lines = [
|
|
159
|
+
`Metrics window: ${report.since} -> ${report.until} (${report.window_days} days)`,
|
|
160
|
+
`Transition events: ${report.transition_log_events}`,
|
|
161
|
+
`Completed features: ${report.features.completed} (${report.features.completed_feature_ids.join(', ') || '-'})`,
|
|
162
|
+
`Active features: ${report.features.active} (${report.features.active_feature_ids.join(', ') || '-'})`,
|
|
163
|
+
`Lead time: avg=${report.lead_time.average_hours}h median=${report.lead_time.median_hours}h p90=${report.lead_time.p90_hours}h count=${report.lead_time.count}`,
|
|
164
|
+
`Aging: avg=${report.aging.average_hours}h max=${report.aging.max_hours}h count=${report.aging.count}`,
|
|
165
|
+
`Throughput: done=${report.throughput.done_count}, per_day=${report.throughput.per_day}`,
|
|
166
|
+
];
|
|
167
|
+
if (Object.keys(report.throughput.by_day).length > 0) {
|
|
168
|
+
lines.push('Throughput by day:');
|
|
169
|
+
for (const [day, count] of Object.entries(report.throughput.by_day)) {
|
|
170
|
+
lines.push(`- ${day}: ${count}`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (report.warnings.length > 0) {
|
|
174
|
+
lines.push('Warnings:');
|
|
175
|
+
for (const warning of report.warnings) {
|
|
176
|
+
lines.push(`- ${warning}`);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return lines.join('\n');
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=metrics.service.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SddStores } from "../store/sdd-stores.js";
|
|
2
|
+
export declare class NextService {
|
|
3
|
+
private readonly stores;
|
|
4
|
+
constructor(stores: SddStores);
|
|
5
|
+
execute(projectRoot: string, options?: {
|
|
6
|
+
rank?: any;
|
|
7
|
+
limit?: number;
|
|
8
|
+
maxAgents?: number;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
rank: any;
|
|
11
|
+
ready: {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
recommended_skills: string[];
|
|
15
|
+
score: number;
|
|
16
|
+
reasons: string[];
|
|
17
|
+
}[];
|
|
18
|
+
blocked: {
|
|
19
|
+
id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
blocked_by: string[];
|
|
22
|
+
}[];
|
|
23
|
+
conflicts: {
|
|
24
|
+
id: string;
|
|
25
|
+
title: string;
|
|
26
|
+
lock_domains: string[];
|
|
27
|
+
}[];
|
|
28
|
+
waves: string[][];
|
|
29
|
+
deferred: {
|
|
30
|
+
id: string;
|
|
31
|
+
reasons: string[];
|
|
32
|
+
}[];
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=next.service.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { loadStateSnapshot } from "../state.js";
|
|
2
|
+
import { getRuntime, computeReadyFeatures, extractFeatureNumber, buildDependentsMap, scoreReadyItem } from "../legacy-operations.js";
|
|
3
|
+
export class NextService {
|
|
4
|
+
stores;
|
|
5
|
+
constructor(stores) {
|
|
6
|
+
this.stores = stores;
|
|
7
|
+
}
|
|
8
|
+
async execute(projectRoot, options) {
|
|
9
|
+
const { config, paths } = await getRuntime(projectRoot);
|
|
10
|
+
const snapshot = await loadStateSnapshot(paths, config);
|
|
11
|
+
const rank = options?.rank || 'impact';
|
|
12
|
+
const limit = options?.limit && options.limit > 0 ? Math.floor(options.limit) : 10;
|
|
13
|
+
const computed = computeReadyFeatures(snapshot.backlog.items, {
|
|
14
|
+
rank,
|
|
15
|
+
maxAgents: options?.maxAgents,
|
|
16
|
+
});
|
|
17
|
+
const { ready, blocked, conflicts, waves, deferred } = computed;
|
|
18
|
+
const dependentsMap = buildDependentsMap(snapshot.backlog.items);
|
|
19
|
+
const rankedReady = ready
|
|
20
|
+
.map((item) => {
|
|
21
|
+
const scored = scoreReadyItem(item, snapshot.backlog.items, dependentsMap, rank);
|
|
22
|
+
return {
|
|
23
|
+
id: item.id,
|
|
24
|
+
title: item.title,
|
|
25
|
+
recommended_skills: item.recommended_skills.slice(0, 3),
|
|
26
|
+
score: scored.score,
|
|
27
|
+
reasons: scored.reasons,
|
|
28
|
+
};
|
|
29
|
+
})
|
|
30
|
+
.sort((a, b) => {
|
|
31
|
+
if (b.score !== a.score)
|
|
32
|
+
return b.score - a.score;
|
|
33
|
+
return extractFeatureNumber(a.id) - extractFeatureNumber(b.id);
|
|
34
|
+
})
|
|
35
|
+
.slice(0, limit);
|
|
36
|
+
return {
|
|
37
|
+
rank,
|
|
38
|
+
ready: rankedReady,
|
|
39
|
+
blocked: blocked.map((item) => ({
|
|
40
|
+
id: item.id,
|
|
41
|
+
title: item.title,
|
|
42
|
+
blocked_by: item.blocked_by,
|
|
43
|
+
})),
|
|
44
|
+
conflicts: conflicts.map((item) => ({
|
|
45
|
+
id: item.id,
|
|
46
|
+
title: item.title,
|
|
47
|
+
lock_domains: item.lock_domains,
|
|
48
|
+
})),
|
|
49
|
+
waves,
|
|
50
|
+
deferred,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=next.service.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SddStores } from "../store/sdd-stores.js";
|
|
2
|
+
export declare class OnboardService {
|
|
3
|
+
private readonly stores;
|
|
4
|
+
constructor(stores: SddStores);
|
|
5
|
+
execute(projectRoot: string, target?: string, options?: {
|
|
6
|
+
compact?: boolean;
|
|
7
|
+
}): Promise<Record<string, unknown>>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=onboard.service.d.ts.map
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { CLI_NAME } from "../../branding.js";
|
|
3
|
+
import { loadStateSnapshot } from "../state.js";
|
|
4
|
+
import { bundlesForSkills, getRuntime, relProjectPath, coreDocRef, planningDocRef, resolveActiveDocRefs } from "../legacy-operations.js";
|
|
5
|
+
import { ContextService } from "./context.service.js";
|
|
6
|
+
import { NextService } from "./next.service.js";
|
|
7
|
+
export class OnboardService {
|
|
8
|
+
stores;
|
|
9
|
+
constructor(stores) {
|
|
10
|
+
this.stores = stores;
|
|
11
|
+
}
|
|
12
|
+
async execute(projectRoot, target = 'system', options) {
|
|
13
|
+
const { config, paths } = await getRuntime(projectRoot);
|
|
14
|
+
const snapshot = await loadStateSnapshot(paths, config);
|
|
15
|
+
const normalized = (target || 'system').trim();
|
|
16
|
+
const contextCmd = new ContextService(this.stores);
|
|
17
|
+
const baseReadOrder = [
|
|
18
|
+
'README.md',
|
|
19
|
+
relProjectPath(paths, path.join(paths.memoryRoot, 'AGENT.md')),
|
|
20
|
+
coreDocRef(paths, 'index.md'),
|
|
21
|
+
coreDocRef(paths, 'arquitetura.md'),
|
|
22
|
+
coreDocRef(paths, 'servicos.md'),
|
|
23
|
+
coreDocRef(paths, 'spec-tecnologica.md'),
|
|
24
|
+
coreDocRef(paths, 'repo-map.md'),
|
|
25
|
+
];
|
|
26
|
+
if (config.frontend.enabled) {
|
|
27
|
+
baseReadOrder.push(coreDocRef(paths, 'frontend-map.md'), coreDocRef(paths, 'frontend-decisions.md'));
|
|
28
|
+
}
|
|
29
|
+
const computeGuidedSystemSteps = (nextResult) => {
|
|
30
|
+
if (nextResult.ready.length > 0) {
|
|
31
|
+
return nextResult.ready.map((item) => item.id);
|
|
32
|
+
}
|
|
33
|
+
const inProgress = snapshot.backlog.items.find((item) => item.status === 'IN_PROGRESS');
|
|
34
|
+
if (inProgress) {
|
|
35
|
+
return [
|
|
36
|
+
`${CLI_NAME} sdd context ${inProgress.id}`,
|
|
37
|
+
`${CLI_NAME} archive ${inProgress.change_name || '<change-name>'}`,
|
|
38
|
+
`${CLI_NAME} sdd finalize --ref ${inProgress.id}`,
|
|
39
|
+
`${CLI_NAME} sdd next`,
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
const openDebate = snapshot.discoveryIndex.records.find((record) => record.type === 'DEB' && record.status === 'OPEN');
|
|
43
|
+
if (openDebate) {
|
|
44
|
+
return [
|
|
45
|
+
`${CLI_NAME} sdd decide ${openDebate.id} --outcome epic`,
|
|
46
|
+
`${CLI_NAME} sdd breakdown EPIC-#### --mode graph --incremental`,
|
|
47
|
+
`${CLI_NAME} sdd next`,
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
const activeRadars = snapshot.discoveryIndex.records.filter((record) => (record.type === 'RAD' || record.type === 'EPIC') &&
|
|
51
|
+
['READY', 'PLANNED', 'SPLIT', 'IN_PROGRESS'].includes(record.status));
|
|
52
|
+
const firstUnplannedRadar = activeRadars.find((radar) => !snapshot.backlog.items.some((item) => (item.origin_type === 'radar' || item.origin_type === 'epic') && item.origin_ref === radar.id));
|
|
53
|
+
if (firstUnplannedRadar) {
|
|
54
|
+
return [
|
|
55
|
+
`${CLI_NAME} sdd breakdown ${firstUnplannedRadar.id} --mode graph --incremental`,
|
|
56
|
+
`${CLI_NAME} sdd next`,
|
|
57
|
+
`${CLI_NAME} sdd start FEAT-####`,
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
const firstNewInsight = snapshot.discoveryIndex.records.find((record) => record.type === 'INS' && record.status === 'NEW');
|
|
61
|
+
if (firstNewInsight) {
|
|
62
|
+
return [
|
|
63
|
+
`${CLI_NAME} sdd debate ${firstNewInsight.id}`,
|
|
64
|
+
`${CLI_NAME} sdd decide DEB-#### --outcome epic`,
|
|
65
|
+
`${CLI_NAME} sdd breakdown EPIC-#### --mode graph --incremental`,
|
|
66
|
+
`${CLI_NAME} sdd next`,
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
if (snapshot.discoveryIndex.records.length === 0) {
|
|
70
|
+
return [
|
|
71
|
+
`${CLI_NAME} sdd insight "Descreva o primeiro objetivo do sistema"`,
|
|
72
|
+
`${CLI_NAME} sdd debate INS-####`,
|
|
73
|
+
`${CLI_NAME} sdd decide DEB-#### --outcome epic`,
|
|
74
|
+
`${CLI_NAME} sdd breakdown EPIC-#### --mode graph --incremental`,
|
|
75
|
+
`${CLI_NAME} sdd next`,
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
return [
|
|
79
|
+
`${CLI_NAME} sdd insight "Novo ciclo de melhoria: descreva o objetivo"`,
|
|
80
|
+
`${CLI_NAME} sdd debate INS-####`,
|
|
81
|
+
`${CLI_NAME} sdd decide DEB-#### --outcome epic`,
|
|
82
|
+
`${CLI_NAME} sdd breakdown EPIC-#### --mode graph --incremental`,
|
|
83
|
+
`${CLI_NAME} sdd next`,
|
|
84
|
+
];
|
|
85
|
+
};
|
|
86
|
+
if (normalized === 'system') {
|
|
87
|
+
const next = await new NextService(this.stores).execute(projectRoot, { rank: 'impact', limit: 5 });
|
|
88
|
+
const systemSkills = Array.from(new Set(next.ready.flatMap((item) => item.recommended_skills))).slice(0, 10);
|
|
89
|
+
const guidedSteps = computeGuidedSystemSteps(next);
|
|
90
|
+
const payload = {
|
|
91
|
+
target: 'system',
|
|
92
|
+
summary: 'Onboarding global do sistema',
|
|
93
|
+
read_order: baseReadOrder,
|
|
94
|
+
arquitetura_relevante: snapshot.architecture.nodes,
|
|
95
|
+
stack_relevante: snapshot.techStack.items,
|
|
96
|
+
servicos_afetados: snapshot.serviceCatalog.services,
|
|
97
|
+
contratos_afetados: snapshot.integrationContracts.contracts,
|
|
98
|
+
decisoes_frontend: snapshot.frontendDecisions?.items ?? [],
|
|
99
|
+
skills_bundles_recomendados: {
|
|
100
|
+
skills: systemSkills,
|
|
101
|
+
bundles: bundlesForSkills(snapshot.skillCatalog, systemSkills),
|
|
102
|
+
},
|
|
103
|
+
proximos_passos: guidedSteps,
|
|
104
|
+
};
|
|
105
|
+
if (options?.compact) {
|
|
106
|
+
return {
|
|
107
|
+
target: payload.target,
|
|
108
|
+
summary: payload.summary,
|
|
109
|
+
read_order: payload.read_order,
|
|
110
|
+
proximos_passos: payload.proximos_passos,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
return payload;
|
|
114
|
+
}
|
|
115
|
+
if (/^RAD-\d{3,}$/.test(normalized)) {
|
|
116
|
+
const context = await contextCmd.execute(projectRoot, normalized);
|
|
117
|
+
const relatedFeatures = snapshot.backlog.items.filter((item) => item.origin_type === 'radar' && item.origin_ref === normalized);
|
|
118
|
+
const radarSkills = Array.from(new Set(relatedFeatures.flatMap((item) => item.recommended_skills))).slice(0, 10);
|
|
119
|
+
return {
|
|
120
|
+
target: normalized,
|
|
121
|
+
summary: `Onboarding da iniciativa ${normalized}`,
|
|
122
|
+
read_order: [
|
|
123
|
+
...baseReadOrder,
|
|
124
|
+
planningDocRef(paths, 'backlog-graph.md'),
|
|
125
|
+
...(await Promise.all(relatedFeatures.map((item) => resolveActiveDocRefs(paths, item.id, config)))).flat(),
|
|
126
|
+
],
|
|
127
|
+
sddo: context,
|
|
128
|
+
features_relacionadas: relatedFeatures.map((item) => ({
|
|
129
|
+
id: item.id,
|
|
130
|
+
status: item.status,
|
|
131
|
+
title: item.title,
|
|
132
|
+
})),
|
|
133
|
+
skills_bundles_recomendados: {
|
|
134
|
+
skills: radarSkills,
|
|
135
|
+
bundles: bundlesForSkills(snapshot.skillCatalog, radarSkills),
|
|
136
|
+
},
|
|
137
|
+
proximos_passos: relatedFeatures
|
|
138
|
+
.filter((item) => item.status === 'READY' || item.status === 'IN_PROGRESS')
|
|
139
|
+
.map((item) => item.id),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
if (/^FEAT-\d{3,}$/.test(normalized)) {
|
|
143
|
+
const context = await contextCmd.execute(projectRoot, normalized);
|
|
144
|
+
const contextSkills = context.recommended_skills;
|
|
145
|
+
const featSkills = contextSkills || [];
|
|
146
|
+
return {
|
|
147
|
+
target: normalized,
|
|
148
|
+
summary: `Onboarding de execucao ${normalized}`,
|
|
149
|
+
read_order: context.read_order || baseReadOrder,
|
|
150
|
+
sddo: context,
|
|
151
|
+
skills_bundles_recomendados: {
|
|
152
|
+
skills: featSkills,
|
|
153
|
+
bundles: bundlesForSkills(snapshot.skillCatalog, featSkills),
|
|
154
|
+
},
|
|
155
|
+
proximos_passos: [
|
|
156
|
+
`${CLI_NAME} sdd start ${normalized}`,
|
|
157
|
+
`${CLI_NAME} sdd context ${normalized}`,
|
|
158
|
+
`${CLI_NAME} sdd finalize --ref ${normalized}`,
|
|
159
|
+
],
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
throw new Error('Referencia invalida para onboard. Use system, RAD-### ou FEAT-###.');
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=onboard.service.js.map
|