@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,21 @@
|
|
|
1
|
+
import type { SddPaths, SddRuntimeConfig } from './state.js';
|
|
2
|
+
export declare const README_SDD_BLOCK_START = "<!-- SDD:ONBOARDING:START -->";
|
|
3
|
+
export declare const README_SDD_BLOCK_END = "<!-- SDD:ONBOARDING:END -->";
|
|
4
|
+
export declare const AGENT_SDD_BLOCK_START = "<!-- SDD:GUIA:START -->";
|
|
5
|
+
export declare const AGENT_SDD_BLOCK_END = "<!-- SDD:GUIA:END -->";
|
|
6
|
+
export declare const ROOT_AGENTS_SDD_BLOCK_START = "<!-- SDD:ROOT-AGENTS:START -->";
|
|
7
|
+
export declare const ROOT_AGENTS_SDD_BLOCK_END = "<!-- SDD:ROOT-AGENTS:END -->";
|
|
8
|
+
export declare function syncSddGuideDocs(projectRoot: string, paths: SddPaths, config?: SddRuntimeConfig): Promise<{
|
|
9
|
+
updatedInternalReadme: boolean;
|
|
10
|
+
updatedReadme: boolean;
|
|
11
|
+
updatedAgentGuide: boolean;
|
|
12
|
+
updatedRootAgents: boolean;
|
|
13
|
+
readmeHadMarkers: boolean;
|
|
14
|
+
agentHadMarkers: boolean;
|
|
15
|
+
rootAgentsHadMarkers: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function validateSddGuideDocs(projectRoot: string, paths: SddPaths, config?: SddRuntimeConfig): Promise<{
|
|
18
|
+
documentationSync: boolean;
|
|
19
|
+
missingBlocks: string[];
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=docs-sync.d.ts.map
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { promises as fs } from 'node:fs';
|
|
3
|
+
import { buildSddInternalReadme } from './default-bootstrap-files.js';
|
|
4
|
+
import { CLI_NAME } from '../branding.js';
|
|
5
|
+
export const README_SDD_BLOCK_START = '<!-- SDD:ONBOARDING:START -->';
|
|
6
|
+
export const README_SDD_BLOCK_END = '<!-- SDD:ONBOARDING:END -->';
|
|
7
|
+
export const AGENT_SDD_BLOCK_START = '<!-- SDD:GUIA:START -->';
|
|
8
|
+
export const AGENT_SDD_BLOCK_END = '<!-- SDD:GUIA:END -->';
|
|
9
|
+
export const ROOT_AGENTS_SDD_BLOCK_START = '<!-- SDD:ROOT-AGENTS:START -->';
|
|
10
|
+
export const ROOT_AGENTS_SDD_BLOCK_END = '<!-- SDD:ROOT-AGENTS:END -->';
|
|
11
|
+
async function fileExists(filePath) {
|
|
12
|
+
try {
|
|
13
|
+
await fs.access(filePath);
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function upsertMarkedBlock(source, startMarker, endMarker, blockContent) {
|
|
21
|
+
const replacement = `${startMarker}\n${blockContent.trim()}\n${endMarker}`;
|
|
22
|
+
const startIndex = source.indexOf(startMarker);
|
|
23
|
+
const endIndex = source.indexOf(endMarker);
|
|
24
|
+
if (startIndex >= 0 && endIndex > startIndex) {
|
|
25
|
+
const before = source.slice(0, startIndex);
|
|
26
|
+
const after = source.slice(endIndex + endMarker.length);
|
|
27
|
+
const next = `${before}${replacement}${after}`;
|
|
28
|
+
return { content: next, changed: next !== source, hasMarkers: true };
|
|
29
|
+
}
|
|
30
|
+
const prefix = source.length > 0 && !source.endsWith('\n') ? `${source}\n\n` : `${source}\n`;
|
|
31
|
+
const next = `${prefix}${replacement}\n`;
|
|
32
|
+
return { content: next, changed: true, hasMarkers: false };
|
|
33
|
+
}
|
|
34
|
+
function buildReadmeBlock(memoryDir, config) {
|
|
35
|
+
return `## Onboarding SDD
|
|
36
|
+
|
|
37
|
+
Operational authority:
|
|
38
|
+
- Canonical operational state, planning, dependencies, blockers, and handoff live only in \`${memoryDir}/state/*.yaml\`.
|
|
39
|
+
- Human-readable operational views are derived from \`${memoryDir}/core/*.md\` and \`${memoryDir}/${config?.folders.planning || 'planning'}/*.md\`.
|
|
40
|
+
- Do not use external context, memory, workflow, or backlog tools as a project source of truth.
|
|
41
|
+
|
|
42
|
+
Read order for any new agent:
|
|
43
|
+
1. \`README.md\` (this block)
|
|
44
|
+
2. \`${memoryDir}/AGENT.md\`
|
|
45
|
+
3. \`${memoryDir}/core/index.md\`
|
|
46
|
+
4. \`${memoryDir}/core/arquitetura.md\`
|
|
47
|
+
5. \`${memoryDir}/core/servicos.md\`
|
|
48
|
+
6. \`${memoryDir}/core/spec-tecnologica.md\`
|
|
49
|
+
7. \`${memoryDir}/core/repo-map.md\`
|
|
50
|
+
8. \`${memoryDir}/core/fontes.md\`
|
|
51
|
+
9. \`${memoryDir}/core/frontend-sitemap.md\` (when frontend is enabled)
|
|
52
|
+
10. \`${memoryDir}/core/frontend-decisions.md\` (when frontend is enabled)
|
|
53
|
+
|
|
54
|
+
Essential commands:
|
|
55
|
+
- \`${CLI_NAME} sdd onboard system\`
|
|
56
|
+
- \`${CLI_NAME} sdd next\`
|
|
57
|
+
- \`${CLI_NAME} sdd context <FEAT-ID>\`
|
|
58
|
+
- update \`${memoryDir}/${config?.folders.active || 'active'}/<FEAT-ID>/5-quality.yaml\`
|
|
59
|
+
- \`${CLI_NAME} sdd frontend-impact <FEAT-ID> --status required|none --reason "..."\`
|
|
60
|
+
- \`${CLI_NAME} sdd finalize --ref <FEAT-ID>\``;
|
|
61
|
+
}
|
|
62
|
+
function buildAgentGuideBlock(memoryDir, config) {
|
|
63
|
+
const planningDir = config?.folders.planning || 'planning';
|
|
64
|
+
const activeDir = config?.folders.active || 'active';
|
|
65
|
+
const depositoDir = config?.folders.deposito || 'sources';
|
|
66
|
+
const promptsDir = 'prompts';
|
|
67
|
+
return `# SDD Operational Guide
|
|
68
|
+
|
|
69
|
+
Official workflow:
|
|
70
|
+
1. Run \`${CLI_NAME} sdd onboard system\`.
|
|
71
|
+
2. Use \`${CLI_NAME} sdd next\` to choose ready work.
|
|
72
|
+
3. Use \`${CLI_NAME} sdd start <FEAT-ID>\` only when the selected item is not already active.
|
|
73
|
+
4. Use \`${CLI_NAME} sdd context <FEAT-ID>\` before coding.
|
|
74
|
+
5. Update \`${memoryDir}/${activeDir}/<FEAT-ID>/5-quality.yaml\` with validation evidence or a formal exception.
|
|
75
|
+
6. Declare frontend impact with \`${CLI_NAME} sdd frontend-impact <FEAT-ID> ...\`.
|
|
76
|
+
7. After archiving the technical change, run \`${CLI_NAME} sdd finalize --ref <FEAT-ID>\`.
|
|
77
|
+
|
|
78
|
+
- Canonical state: \`${memoryDir}/state/*.yaml\`
|
|
79
|
+
- Views: \`${memoryDir}/core/*.md\` and \`${memoryDir}/${planningDir}/*.md\`
|
|
80
|
+
- Active workspace per feature: \`${memoryDir}/${activeDir}/<FEAT-ID>/\`
|
|
81
|
+
- Quality contract per active feature: \`${memoryDir}/${activeDir}/<FEAT-ID>/5-quality.yaml\`
|
|
82
|
+
- Raw sources: \`${memoryDir}/${depositoDir}/\` (PRDs, RFCs, wireframes, references)
|
|
83
|
+
- Recommended prompts: \`${memoryDir}/${promptsDir}/\`
|
|
84
|
+
|
|
85
|
+
Operational exclusivity:
|
|
86
|
+
- Do not consult or persist planning, backlog, workflow status, handoff, or project memory in external context stores.
|
|
87
|
+
- If legacy notes conflict with OpenSDD, migrate useful decisions into \`${memoryDir}/state/*.yaml\`, \`${memoryDir}/active/<FEAT-ID>/\`, or the relevant OpenSDD guide, then ignore the legacy note.
|
|
88
|
+
- Current repository files remain the implementation fact source; OpenSDD remains the operational state source.`;
|
|
89
|
+
}
|
|
90
|
+
function buildRootAgentsBlock(memoryDir) {
|
|
91
|
+
return `## SDD Operational Contract
|
|
92
|
+
|
|
93
|
+
Agents working in this repository must treat documentation sync as part of feature completion.
|
|
94
|
+
OpenSDD is the only canonical operational state system for this repository.
|
|
95
|
+
|
|
96
|
+
Required execution order:
|
|
97
|
+
1. Run \`${CLI_NAME} sdd onboard system\` before broad work.
|
|
98
|
+
2. Run \`${CLI_NAME} sdd next\` and use the active or ready feature returned by SDD.
|
|
99
|
+
3. Use \`${CLI_NAME} sdd context <FEAT-ID>\` before coding.
|
|
100
|
+
4. Before archive/finalize, update \`${memoryDir}/active/<FEAT-ID>/5-quality.yaml\` with validation evidence or a formal exception.
|
|
101
|
+
5. Before archive/finalize, declare frontend impact with \`${CLI_NAME} sdd frontend-impact <FEAT-ID> ...\`.
|
|
102
|
+
6. Before archive/finalize, update the documentation affected by the feature:
|
|
103
|
+
- \`README.md\`
|
|
104
|
+
- \`${memoryDir}/AGENT.md\`
|
|
105
|
+
- \`${memoryDir}/core/*.md\`
|
|
106
|
+
- \`AGENTS.md\`
|
|
107
|
+
- \`AGENT.md\`
|
|
108
|
+
7. Run \`${CLI_NAME} sdd finalize --ref <FEAT-ID>\` to consolidate memory.
|
|
109
|
+
|
|
110
|
+
Canonical state lives in \`${memoryDir}/state/*.yaml\`. Markdown files are operational views or guides derived from that state.
|
|
111
|
+
Do not use external context, memory, workflow, backlog, scratchpad, or handoff tools as a project source of truth. If legacy material is useful, repatriate it into OpenSDD and remove or deprecate the legacy artifact.`;
|
|
112
|
+
}
|
|
113
|
+
export async function syncSddGuideDocs(projectRoot, paths, config) {
|
|
114
|
+
const readmePath = path.join(projectRoot, 'README.md');
|
|
115
|
+
const internalReadmePath = path.join(paths.memoryRoot, 'README.md');
|
|
116
|
+
const agentPath = path.join(paths.memoryRoot, 'AGENT.md');
|
|
117
|
+
const legacyAgentPath = path.join(paths.memoryRoot, 'agente.md');
|
|
118
|
+
const agentsPath = path.join(projectRoot, 'AGENTS.md');
|
|
119
|
+
const agentCompatPath = path.join(projectRoot, 'AGENT.md');
|
|
120
|
+
const memoryDirName = path.relative(projectRoot, paths.memoryRoot) || '.sdd';
|
|
121
|
+
const readmeExists = await fileExists(readmePath);
|
|
122
|
+
const agentExists = await fileExists(agentPath);
|
|
123
|
+
const legacyAgentExists = await fileExists(legacyAgentPath);
|
|
124
|
+
const agentsExists = await fileExists(agentsPath);
|
|
125
|
+
const agentCompatExists = await fileExists(agentCompatPath);
|
|
126
|
+
const readmeRaw = readmeExists ? await fs.readFile(readmePath, 'utf-8') : '# Projeto\n';
|
|
127
|
+
const agentRaw = agentExists
|
|
128
|
+
? await fs.readFile(agentPath, 'utf-8')
|
|
129
|
+
: legacyAgentExists
|
|
130
|
+
? await fs.readFile(legacyAgentPath, 'utf-8')
|
|
131
|
+
: '';
|
|
132
|
+
const agentsRaw = agentsExists ? await fs.readFile(agentsPath, 'utf-8') : '# AGENTS\n';
|
|
133
|
+
const agentCompatRaw = agentCompatExists
|
|
134
|
+
? await fs.readFile(agentCompatPath, 'utf-8')
|
|
135
|
+
: '# AGENT\n';
|
|
136
|
+
const readmeUpdate = upsertMarkedBlock(readmeRaw, README_SDD_BLOCK_START, README_SDD_BLOCK_END, buildReadmeBlock(memoryDirName, config));
|
|
137
|
+
const agentUpdate = upsertMarkedBlock(agentRaw, AGENT_SDD_BLOCK_START, AGENT_SDD_BLOCK_END, buildAgentGuideBlock(memoryDirName, config));
|
|
138
|
+
const agentsUpdate = upsertMarkedBlock(agentsRaw, ROOT_AGENTS_SDD_BLOCK_START, ROOT_AGENTS_SDD_BLOCK_END, buildRootAgentsBlock(memoryDirName));
|
|
139
|
+
const agentCompatUpdate = upsertMarkedBlock(agentCompatRaw, ROOT_AGENTS_SDD_BLOCK_START, ROOT_AGENTS_SDD_BLOCK_END, buildRootAgentsBlock(memoryDirName));
|
|
140
|
+
const internalReadmeContent = buildSddInternalReadme(memoryDirName, {
|
|
141
|
+
discovery: config?.folders.discovery,
|
|
142
|
+
planning: config?.folders.planning,
|
|
143
|
+
skills: config?.folders.skills,
|
|
144
|
+
templates: config?.folders.templates,
|
|
145
|
+
active: config?.folders.active,
|
|
146
|
+
deposito: config?.folders.deposito,
|
|
147
|
+
prompts: 'prompts',
|
|
148
|
+
});
|
|
149
|
+
const currentInternalReadme = (await fileExists(internalReadmePath))
|
|
150
|
+
? await fs.readFile(internalReadmePath, 'utf-8')
|
|
151
|
+
: '';
|
|
152
|
+
const internalReadmeChanged = currentInternalReadme !== internalReadmeContent;
|
|
153
|
+
if (internalReadmeChanged) {
|
|
154
|
+
await fs.writeFile(internalReadmePath, internalReadmeContent, 'utf-8');
|
|
155
|
+
}
|
|
156
|
+
if (readmeUpdate.changed) {
|
|
157
|
+
await fs.writeFile(readmePath, readmeUpdate.content, 'utf-8');
|
|
158
|
+
}
|
|
159
|
+
if (agentUpdate.changed) {
|
|
160
|
+
await fs.writeFile(agentPath, agentUpdate.content, 'utf-8');
|
|
161
|
+
}
|
|
162
|
+
if (agentsUpdate.changed) {
|
|
163
|
+
await fs.writeFile(agentsPath, agentsUpdate.content, 'utf-8');
|
|
164
|
+
}
|
|
165
|
+
if (agentCompatUpdate.changed) {
|
|
166
|
+
await fs.writeFile(agentCompatPath, agentCompatUpdate.content, 'utf-8');
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
updatedInternalReadme: internalReadmeChanged,
|
|
170
|
+
updatedReadme: readmeUpdate.changed,
|
|
171
|
+
updatedAgentGuide: agentUpdate.changed,
|
|
172
|
+
updatedRootAgents: agentsUpdate.changed || agentCompatUpdate.changed,
|
|
173
|
+
readmeHadMarkers: readmeUpdate.hasMarkers,
|
|
174
|
+
agentHadMarkers: agentUpdate.hasMarkers,
|
|
175
|
+
rootAgentsHadMarkers: agentsUpdate.hasMarkers && agentCompatUpdate.hasMarkers,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
export async function validateSddGuideDocs(projectRoot, paths, config) {
|
|
179
|
+
const readmePath = path.join(projectRoot, 'README.md');
|
|
180
|
+
const internalReadmePath = path.join(paths.memoryRoot, 'README.md');
|
|
181
|
+
const memoryDirName = path.relative(projectRoot, paths.memoryRoot) || '.sdd';
|
|
182
|
+
const agentPath = path.join(paths.memoryRoot, 'AGENT.md');
|
|
183
|
+
const legacyAgentPath = path.join(paths.memoryRoot, 'agente.md');
|
|
184
|
+
const agentsPath = path.join(projectRoot, 'AGENTS.md');
|
|
185
|
+
const agentCompatPath = path.join(projectRoot, 'AGENT.md');
|
|
186
|
+
const missingBlocks = [];
|
|
187
|
+
const readmeRaw = (await fileExists(readmePath)) ? await fs.readFile(readmePath, 'utf-8') : '';
|
|
188
|
+
const internalReadmeRaw = (await fileExists(internalReadmePath))
|
|
189
|
+
? await fs.readFile(internalReadmePath, 'utf-8')
|
|
190
|
+
: '';
|
|
191
|
+
const agentRaw = (await fileExists(agentPath))
|
|
192
|
+
? await fs.readFile(agentPath, 'utf-8')
|
|
193
|
+
: (await fileExists(legacyAgentPath))
|
|
194
|
+
? await fs.readFile(legacyAgentPath, 'utf-8')
|
|
195
|
+
: '';
|
|
196
|
+
const agentsRaw = (await fileExists(agentsPath)) ? await fs.readFile(agentsPath, 'utf-8') : '';
|
|
197
|
+
const agentCompatRaw = (await fileExists(agentCompatPath))
|
|
198
|
+
? await fs.readFile(agentCompatPath, 'utf-8')
|
|
199
|
+
: '';
|
|
200
|
+
if (!readmeRaw.includes(README_SDD_BLOCK_START) || !readmeRaw.includes(README_SDD_BLOCK_END)) {
|
|
201
|
+
missingBlocks.push('README.md::SDD:ONBOARDING');
|
|
202
|
+
}
|
|
203
|
+
if (internalReadmeRaw !==
|
|
204
|
+
buildSddInternalReadme(path.relative(projectRoot, paths.memoryRoot) || '.sdd', {
|
|
205
|
+
discovery: config?.folders.discovery,
|
|
206
|
+
planning: config?.folders.planning,
|
|
207
|
+
skills: config?.folders.skills,
|
|
208
|
+
templates: config?.folders.templates,
|
|
209
|
+
active: config?.folders.active,
|
|
210
|
+
deposito: config?.folders.deposito,
|
|
211
|
+
prompts: 'prompts',
|
|
212
|
+
})) {
|
|
213
|
+
missingBlocks.push(`${memoryDirName}/README.md::SDD:INTERNAL`);
|
|
214
|
+
}
|
|
215
|
+
if (!agentRaw.includes(AGENT_SDD_BLOCK_START) || !agentRaw.includes(AGENT_SDD_BLOCK_END)) {
|
|
216
|
+
missingBlocks.push(`${memoryDirName}/AGENT.md::SDD:GUIA`);
|
|
217
|
+
}
|
|
218
|
+
if (!agentsRaw.includes(ROOT_AGENTS_SDD_BLOCK_START) ||
|
|
219
|
+
!agentsRaw.includes(ROOT_AGENTS_SDD_BLOCK_END)) {
|
|
220
|
+
missingBlocks.push('AGENTS.md::SDD:ROOT-AGENTS');
|
|
221
|
+
}
|
|
222
|
+
if (!agentCompatRaw.includes(ROOT_AGENTS_SDD_BLOCK_START) ||
|
|
223
|
+
!agentCompatRaw.includes(ROOT_AGENTS_SDD_BLOCK_END)) {
|
|
224
|
+
missingBlocks.push('AGENT.md::SDD:ROOT-AGENTS');
|
|
225
|
+
}
|
|
226
|
+
return {
|
|
227
|
+
documentationSync: missingBlocks.length === 0,
|
|
228
|
+
missingBlocks,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=docs-sync.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function slugify(value: string): string;
|
|
2
|
+
export declare function stripFunctionalTitlePrefixes(value: string): string;
|
|
3
|
+
export declare function computeCanonicalTitle(value: string): string;
|
|
4
|
+
export declare function buildFeatureTitle(featureId: string, title: string): string;
|
|
5
|
+
export declare function markdownInsightTemplate(id: string, title: string, content: string): string;
|
|
6
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export function slugify(value) {
|
|
2
|
+
return value
|
|
3
|
+
.toLowerCase()
|
|
4
|
+
.normalize('NFD')
|
|
5
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
6
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
7
|
+
.replace(/^-+|-+$/g, '')
|
|
8
|
+
.replace(/-{2,}/g, '-');
|
|
9
|
+
}
|
|
10
|
+
export function stripFunctionalTitlePrefixes(value) {
|
|
11
|
+
return value
|
|
12
|
+
.replace(/^\s*debate:\s*/i, '')
|
|
13
|
+
.replace(/^\s*insight:\s*/i, '')
|
|
14
|
+
.trim();
|
|
15
|
+
}
|
|
16
|
+
export function computeCanonicalTitle(value) {
|
|
17
|
+
const normalized = stripFunctionalTitlePrefixes(value)
|
|
18
|
+
.replace(/\s+/g, ' ')
|
|
19
|
+
.trim();
|
|
20
|
+
const fallback = normalized || 'Untitled canonical item';
|
|
21
|
+
return fallback.slice(0, 60).trim();
|
|
22
|
+
}
|
|
23
|
+
export function buildFeatureTitle(featureId, title) {
|
|
24
|
+
return `${featureId}: ${title}`;
|
|
25
|
+
}
|
|
26
|
+
export function markdownInsightTemplate(id, title, content) {
|
|
27
|
+
const now = new Date().toISOString();
|
|
28
|
+
return `# Insight: ${title}
|
|
29
|
+
|
|
30
|
+
> ID: ${id}
|
|
31
|
+
> Status: NEW
|
|
32
|
+
> Date: ${now}
|
|
33
|
+
|
|
34
|
+
${content}
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BacklogItem } from '../types.js';
|
|
2
|
+
export interface LifecycleDependencyCheck {
|
|
3
|
+
ok: boolean;
|
|
4
|
+
unresolved: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface LifecycleLockCheck {
|
|
7
|
+
ok: boolean;
|
|
8
|
+
conflicts: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface FeatureStartGuardrails {
|
|
11
|
+
blocked_check: LifecycleDependencyCheck;
|
|
12
|
+
lock_check: LifecycleLockCheck;
|
|
13
|
+
forced: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface FeatureFinalizeGuardrails {
|
|
16
|
+
dependency_check: LifecycleDependencyCheck;
|
|
17
|
+
forced: boolean;
|
|
18
|
+
reasons: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function evaluateFeatureStartGuardrails(feature: BacklogItem, backlogItems: BacklogItem[], forced?: boolean): FeatureStartGuardrails;
|
|
21
|
+
export declare function evaluateFeatureFinalizeGuardrails(feature: BacklogItem, backlogItems: BacklogItem[], forced?: boolean): FeatureFinalizeGuardrails;
|
|
22
|
+
//# sourceMappingURL=lifecycle-guardrails.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { lockConflictWithActive, unresolvedDependencies } from '../legacy-operations.js';
|
|
2
|
+
export function evaluateFeatureStartGuardrails(feature, backlogItems, forced = false) {
|
|
3
|
+
const unresolved = unresolvedDependencies(feature, backlogItems);
|
|
4
|
+
const conflicts = lockConflictWithActive(feature, backlogItems);
|
|
5
|
+
return {
|
|
6
|
+
blocked_check: {
|
|
7
|
+
ok: unresolved.length === 0,
|
|
8
|
+
unresolved,
|
|
9
|
+
},
|
|
10
|
+
lock_check: {
|
|
11
|
+
ok: conflicts.length === 0,
|
|
12
|
+
conflicts,
|
|
13
|
+
},
|
|
14
|
+
forced,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export function evaluateFeatureFinalizeGuardrails(feature, backlogItems, forced = false) {
|
|
18
|
+
const unresolved = unresolvedDependencies(feature, backlogItems);
|
|
19
|
+
const reasons = unresolved.length > 0
|
|
20
|
+
? [`blocked_by pendente no finalize (${unresolved.join(', ')}). Resolva dependencias ou use --force-transition.`]
|
|
21
|
+
: [];
|
|
22
|
+
return {
|
|
23
|
+
dependency_check: {
|
|
24
|
+
ok: unresolved.length === 0,
|
|
25
|
+
unresolved,
|
|
26
|
+
},
|
|
27
|
+
forced,
|
|
28
|
+
reasons,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=lifecycle-guardrails.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type LifecycleHookEvent = 'before-approve' | 'after-approve' | 'before-start' | 'after-start' | 'before-finalize' | 'after-finalize' | 'before-migrate' | 'after-migrate';
|
|
2
|
+
export interface LifecycleHookContext {
|
|
3
|
+
event: LifecycleHookEvent;
|
|
4
|
+
projectRoot: string;
|
|
5
|
+
featureId?: string;
|
|
6
|
+
entityId?: string;
|
|
7
|
+
stage?: string;
|
|
8
|
+
options?: Record<string, unknown>;
|
|
9
|
+
metadata?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
export type LifecycleHook = (context: LifecycleHookContext) => void | Promise<void>;
|
|
12
|
+
export declare function registerLifecycleHook(event: LifecycleHookEvent, hook: LifecycleHook): () => void;
|
|
13
|
+
export declare function unregisterLifecycleHook(event: LifecycleHookEvent, hook: LifecycleHook): void;
|
|
14
|
+
export declare function clearLifecycleHooks(): void;
|
|
15
|
+
export declare function runLifecycleHooks(event: LifecycleHookEvent, context: Omit<LifecycleHookContext, 'event'>): Promise<void>;
|
|
16
|
+
//# sourceMappingURL=lifecycle-hooks.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const lifecycleHooks = new Map();
|
|
2
|
+
export function registerLifecycleHook(event, hook) {
|
|
3
|
+
const hooks = lifecycleHooks.get(event) ?? [];
|
|
4
|
+
hooks.push(hook);
|
|
5
|
+
lifecycleHooks.set(event, hooks);
|
|
6
|
+
return () => unregisterLifecycleHook(event, hook);
|
|
7
|
+
}
|
|
8
|
+
export function unregisterLifecycleHook(event, hook) {
|
|
9
|
+
const hooks = lifecycleHooks.get(event);
|
|
10
|
+
if (!hooks) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
lifecycleHooks.set(event, hooks.filter((entry) => entry !== hook));
|
|
14
|
+
}
|
|
15
|
+
export function clearLifecycleHooks() {
|
|
16
|
+
lifecycleHooks.clear();
|
|
17
|
+
}
|
|
18
|
+
export async function runLifecycleHooks(event, context) {
|
|
19
|
+
const hooks = lifecycleHooks.get(event) ?? [];
|
|
20
|
+
for (const hook of hooks) {
|
|
21
|
+
await hook({
|
|
22
|
+
event,
|
|
23
|
+
...context,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=lifecycle-hooks.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SddPaths } from '../state.js';
|
|
2
|
+
export interface ArchiveArchivedLifecycleCollision {
|
|
3
|
+
feature_id: string;
|
|
4
|
+
legacy_archive_path: string;
|
|
5
|
+
canonical_archived_path: string;
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PostActiveValidationResult {
|
|
9
|
+
ok: boolean;
|
|
10
|
+
reasons: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare function detectArchiveArchivedLifecycleCollisions(paths: SddPaths, featureId?: string): Promise<ArchiveArchivedLifecycleCollision[]>;
|
|
13
|
+
export declare function validatePreFinalizeArchiveCanonicalization(paths: SddPaths, featureId: string): Promise<PostActiveValidationResult>;
|
|
14
|
+
export declare function validatePostActiveFeaturePlacement(paths: SddPaths, featureId: string): Promise<PostActiveValidationResult>;
|
|
15
|
+
//# sourceMappingURL=post-active-validation.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { promises as fs } from 'node:fs';
|
|
3
|
+
const LEGACY_ARCHIVE_DIR = 'archive';
|
|
4
|
+
const FEATURE_DIR_PATTERN = /^FEAT-\d{3,}$/;
|
|
5
|
+
async function exists(targetPath) {
|
|
6
|
+
try {
|
|
7
|
+
await fs.access(targetPath);
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function relativePath(paths, targetPath) {
|
|
15
|
+
return path.relative(paths.projectRoot, targetPath) || '.';
|
|
16
|
+
}
|
|
17
|
+
function legacyArchiveRoot(paths) {
|
|
18
|
+
return path.join(paths.memoryRoot, LEGACY_ARCHIVE_DIR);
|
|
19
|
+
}
|
|
20
|
+
export async function detectArchiveArchivedLifecycleCollisions(paths, featureId) {
|
|
21
|
+
const legacyRoot = legacyArchiveRoot(paths);
|
|
22
|
+
if (path.resolve(legacyRoot) === path.resolve(paths.archivedDir)) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
if (!(await exists(legacyRoot))) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
const entries = await fs.readdir(legacyRoot, { withFileTypes: true }).catch(() => []);
|
|
29
|
+
const featureIds = featureId
|
|
30
|
+
? (await exists(path.join(legacyRoot, featureId)) ? [featureId] : [])
|
|
31
|
+
: entries
|
|
32
|
+
.filter((entry) => entry.isDirectory() && FEATURE_DIR_PATTERN.test(entry.name))
|
|
33
|
+
.map((entry) => entry.name);
|
|
34
|
+
return featureIds.map((id) => {
|
|
35
|
+
const legacyPath = path.join(legacyRoot, id);
|
|
36
|
+
const canonicalPath = path.join(paths.archivedDir, id);
|
|
37
|
+
return {
|
|
38
|
+
feature_id: id,
|
|
39
|
+
legacy_archive_path: relativePath(paths, legacyPath),
|
|
40
|
+
canonical_archived_path: relativePath(paths, canonicalPath),
|
|
41
|
+
message: `${id} has a non-canonical lifecycle archive workspace at ` +
|
|
42
|
+
`${relativePath(paths, legacyPath)}; completed FEAT workspaces must live only under ` +
|
|
43
|
+
`${relativePath(paths, paths.archivedDir)}.`,
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export async function validatePreFinalizeArchiveCanonicalization(paths, featureId) {
|
|
48
|
+
const collisions = await detectArchiveArchivedLifecycleCollisions(paths, featureId);
|
|
49
|
+
return {
|
|
50
|
+
ok: collisions.length === 0,
|
|
51
|
+
reasons: collisions.map((collision) => collision.message),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export async function validatePostActiveFeaturePlacement(paths, featureId) {
|
|
55
|
+
const activePath = path.join(paths.activeDir, featureId);
|
|
56
|
+
const archivedPath = path.join(paths.archivedDir, featureId);
|
|
57
|
+
const reasons = [];
|
|
58
|
+
if (await exists(activePath)) {
|
|
59
|
+
reasons.push(`${featureId} still exists in ${relativePath(paths, activePath)} after finalize.`);
|
|
60
|
+
}
|
|
61
|
+
if (!(await exists(archivedPath))) {
|
|
62
|
+
reasons.push(`${featureId} was not found in canonical ${relativePath(paths, archivedPath)} after finalize.`);
|
|
63
|
+
}
|
|
64
|
+
const collisions = await detectArchiveArchivedLifecycleCollisions(paths, featureId);
|
|
65
|
+
reasons.push(...collisions.map((collision) => collision.message));
|
|
66
|
+
return {
|
|
67
|
+
ok: reasons.length === 0,
|
|
68
|
+
reasons,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=post-active-validation.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WorkspaceChangelogDocument, WorkspaceQualityDocument, WorkspaceSpecDocument } from '../workspace-schemas.js';
|
|
2
|
+
type TraceabilityResult = {
|
|
3
|
+
ok: boolean;
|
|
4
|
+
reasons: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare function evaluateWorkspaceTraceability(projectRoot: string, spec: WorkspaceSpecDocument, changelog: WorkspaceChangelogDocument, quality: WorkspaceQualityDocument): TraceabilityResult;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=traceability.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
function normalizedCorpus(parts) {
|
|
4
|
+
return parts
|
|
5
|
+
.map((part) => (part || '').trim().toLowerCase())
|
|
6
|
+
.filter(Boolean)
|
|
7
|
+
.join('\n');
|
|
8
|
+
}
|
|
9
|
+
function refPresent(corpus, ref) {
|
|
10
|
+
return corpus.includes(ref.trim().toLowerCase());
|
|
11
|
+
}
|
|
12
|
+
function fileExists(projectRoot, filePath) {
|
|
13
|
+
if (!filePath.trim())
|
|
14
|
+
return false;
|
|
15
|
+
const target = path.isAbsolute(filePath) ? filePath : path.join(projectRoot, filePath);
|
|
16
|
+
const relative = path.relative(projectRoot, target);
|
|
17
|
+
if (relative.startsWith('..') || path.isAbsolute(relative)) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
return existsSync(target);
|
|
21
|
+
}
|
|
22
|
+
export function evaluateWorkspaceTraceability(projectRoot, spec, changelog, quality) {
|
|
23
|
+
const traceability = quality.traceability;
|
|
24
|
+
const reasons = [];
|
|
25
|
+
if (!traceability || traceability.requirements.length === 0) {
|
|
26
|
+
reasons.push('traceability.requirements must contain at least one requirement mapping before finalize');
|
|
27
|
+
return { ok: false, reasons };
|
|
28
|
+
}
|
|
29
|
+
const specAnchor = traceability.spec_anchor;
|
|
30
|
+
if (!specAnchor.spec_updated_at.trim()) {
|
|
31
|
+
reasons.push('traceability.spec_anchor.spec_updated_at must be recorded');
|
|
32
|
+
}
|
|
33
|
+
else if (specAnchor.spec_updated_at !== spec.updated_at) {
|
|
34
|
+
reasons.push(`traceability.spec_anchor.spec_updated_at (${specAnchor.spec_updated_at}) does not match 1-spec.yaml updated_at (${spec.updated_at})`);
|
|
35
|
+
}
|
|
36
|
+
if (specAnchor.changelog_refs.length === 0) {
|
|
37
|
+
reasons.push('traceability.spec_anchor.changelog_refs must reference the changelog entry that synced the current spec');
|
|
38
|
+
}
|
|
39
|
+
const changelogCorpus = normalizedCorpus(changelog.entries.flatMap((entry) => [entry.action, entry.details, ...(entry.refs || [])]));
|
|
40
|
+
const evidenceCorpus = normalizedCorpus([
|
|
41
|
+
...quality.evidence_log.flatMap((entry) => [entry.kind, entry.result, entry.artifact]),
|
|
42
|
+
...quality.acceptance_matrix.flatMap((entry) => [entry.criterion, entry.evidence]),
|
|
43
|
+
]);
|
|
44
|
+
for (const ref of specAnchor.changelog_refs) {
|
|
45
|
+
if (!refPresent(changelogCorpus, ref)) {
|
|
46
|
+
reasons.push(`traceability spec anchor changelog ref "${ref}" was not found in 4-changelog.yaml`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const requirementRefs = new Set();
|
|
50
|
+
for (const requirement of traceability.requirements) {
|
|
51
|
+
if (requirementRefs.has(requirement.requirement_ref)) {
|
|
52
|
+
reasons.push(`traceability requirement_ref "${requirement.requirement_ref}" is duplicated`);
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
requirementRefs.add(requirement.requirement_ref);
|
|
56
|
+
if (requirement.semantic_coverage !== 'covered' &&
|
|
57
|
+
requirement.semantic_coverage !== 'not_applicable') {
|
|
58
|
+
reasons.push(`traceability requirement "${requirement.requirement_ref}" must be semantically covered before finalize`);
|
|
59
|
+
}
|
|
60
|
+
for (const codeRef of requirement.code_refs) {
|
|
61
|
+
if (!fileExists(projectRoot, codeRef.path)) {
|
|
62
|
+
reasons.push(`traceability code ref "${codeRef.path}" for requirement "${requirement.requirement_ref}" does not exist`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
for (const testRef of requirement.test_refs) {
|
|
66
|
+
if (testRef.path && !fileExists(projectRoot, testRef.path)) {
|
|
67
|
+
reasons.push(`traceability test ref path "${testRef.path}" for requirement "${requirement.requirement_ref}" does not exist`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
for (const ref of requirement.changelog_refs) {
|
|
71
|
+
if (!refPresent(changelogCorpus, ref)) {
|
|
72
|
+
reasons.push(`traceability changelog ref "${ref}" for requirement "${requirement.requirement_ref}" was not found in 4-changelog.yaml`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
for (const ref of requirement.evidence_refs) {
|
|
76
|
+
if (!refPresent(evidenceCorpus, ref)) {
|
|
77
|
+
reasons.push(`traceability evidence ref "${ref}" for requirement "${requirement.requirement_ref}" was not found in 5-quality.yaml evidence`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return { ok: reasons.length === 0, reasons };
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=traceability.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { BacklogItem, TransitionLogEvent, TransitionLogState } from '../types.js';
|
|
2
|
+
import type { StateStore } from '../store/state-store.js';
|
|
3
|
+
export type EntityStatus = string;
|
|
4
|
+
export declare class TransitionEngine {
|
|
5
|
+
private readonly transitionLogStore;
|
|
6
|
+
private static allowedTransitions;
|
|
7
|
+
constructor(transitionLogStore: StateStore<TransitionLogState>);
|
|
8
|
+
/**
|
|
9
|
+
* Valida se a transição de estado desejada é logicamente permitida pelo grafo de transições,
|
|
10
|
+
* e bloqueia transições caso haja violações arquiteturais ou de lente documental.
|
|
11
|
+
*/
|
|
12
|
+
static assertValid(entityType: string, fromStatus: EntityStatus, toStatus: EntityStatus, options?: {
|
|
13
|
+
forceTransition?: boolean;
|
|
14
|
+
lensViolations?: string[];
|
|
15
|
+
}): void;
|
|
16
|
+
/**
|
|
17
|
+
* LEGACY: Synchronous transition for operations.ts monolithic snapshot logic.
|
|
18
|
+
* Do not use in new Domain Services.
|
|
19
|
+
*/
|
|
20
|
+
static legacyApplyTransition<T extends {
|
|
21
|
+
id: string;
|
|
22
|
+
status: EntityStatus;
|
|
23
|
+
}>(entityType: string, entity: T, toStatus: EntityStatus, transitionLog: TransitionLogEvent[], options?: {
|
|
24
|
+
actor?: string;
|
|
25
|
+
reason?: string;
|
|
26
|
+
timestamp?: string;
|
|
27
|
+
sourceCommand?: string;
|
|
28
|
+
forceTransition?: boolean;
|
|
29
|
+
lensViolations?: string[];
|
|
30
|
+
afterTransition?: (entity: T) => void;
|
|
31
|
+
}): TransitionLogEvent;
|
|
32
|
+
applyTransition<T extends {
|
|
33
|
+
id: string;
|
|
34
|
+
status: EntityStatus;
|
|
35
|
+
}>(entityType: string, entity: T, toStatus: EntityStatus, options?: {
|
|
36
|
+
actor?: string;
|
|
37
|
+
reason?: string;
|
|
38
|
+
timestamp?: string;
|
|
39
|
+
sourceCommand?: string;
|
|
40
|
+
forceTransition?: boolean;
|
|
41
|
+
lensViolations?: string[];
|
|
42
|
+
afterTransition?: (entity: T) => void;
|
|
43
|
+
}): Promise<TransitionLogEvent>;
|
|
44
|
+
/**
|
|
45
|
+
* Validações de negócio granulares antes de finalizações ou progressos de FEAT.
|
|
46
|
+
*/
|
|
47
|
+
validateFeatureStartGuardrails(feature: BacklogItem): Record<string, any>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=transition-engine.d.ts.map
|