@devtrack-solution/codesdd 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.sdd/skills/curated/api-clean-flask-langgraph/SKILL.md +17 -17
- package/.sdd/skills/curated/devtrack-api/SKILL.md +160 -28
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +1 -1
- package/.sdd/skills/curated/devtrack-api/references/architecture-governance.md +8 -7
- package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +93 -0
- package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +317 -0
- package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +95 -0
- package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +295 -0
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +4 -4
- package/.sdd/skills/curated/devtrack-api/references/imports-lint.md +4 -0
- package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +2 -2
- package/LICENSE +1 -1
- package/README.md +243 -51
- package/bin/codesdd.js +3 -2
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +11 -558
- package/dist/cli/program.d.ts +14 -0
- package/dist/cli/program.js +645 -0
- package/dist/commands/change.js +5 -5
- package/dist/commands/completion.d.ts +1 -1
- package/dist/commands/completion.js +9 -2
- package/dist/commands/config.js +159 -20
- package/dist/commands/feedback.js +1 -1
- package/dist/commands/schema.d.ts +63 -0
- package/dist/commands/schema.js +12 -12
- package/dist/commands/sdd/backlog.d.ts +3 -0
- package/dist/commands/sdd/backlog.js +54 -0
- package/dist/commands/sdd/execution.js +147 -16
- package/dist/commands/sdd/plugin.d.ts +3 -0
- package/dist/commands/sdd/plugin.js +153 -0
- package/dist/commands/sdd/shared.js +2 -23
- package/dist/commands/sdd/skills.js +7 -0
- package/dist/commands/sdd.js +69 -12
- package/dist/commands/spec.js +9 -9
- package/dist/commands/validate.js +6 -6
- package/dist/commands/workflow/instructions.js +6 -6
- package/dist/commands/workflow/new-change.js +3 -3
- package/dist/commands/workflow/shared.d.ts +1 -1
- package/dist/commands/workflow/shared.js +4 -4
- package/dist/core/archive.js +15 -5
- package/dist/core/artifact-graph/instruction-loader.d.ts +1 -1
- package/dist/core/artifact-graph/instruction-loader.js +3 -3
- package/dist/core/artifact-graph/resolver.d.ts +4 -4
- package/dist/core/artifact-graph/resolver.js +6 -6
- package/dist/core/branding.js +3 -3
- package/dist/core/cli/command-matrix.js +10 -1
- package/dist/core/cli-command-quality.d.ts +27 -0
- package/dist/core/cli-command-quality.js +171 -0
- package/dist/core/command-generation/adapters/costrict.d.ts +1 -1
- package/dist/core/command-generation/adapters/costrict.js +2 -2
- package/dist/core/command-generation/types.d.ts +1 -1
- package/dist/core/completions/command-registry.d.ts +1 -1
- package/dist/core/completions/command-registry.js +155 -12
- package/dist/core/completions/completion-provider.d.ts +14 -1
- package/dist/core/completions/completion-provider.js +29 -1
- package/dist/core/completions/generators/bash-generator.d.ts +1 -1
- package/dist/core/completions/generators/bash-generator.js +20 -12
- package/dist/core/completions/generators/fish-generator.d.ts +9 -1
- package/dist/core/completions/generators/fish-generator.js +39 -25
- package/dist/core/completions/generators/powershell-generator.d.ts +1 -1
- package/dist/core/completions/generators/powershell-generator.js +21 -11
- package/dist/core/completions/generators/zsh-generator.d.ts +3 -6
- package/dist/core/completions/generators/zsh-generator.js +21 -42
- package/dist/core/completions/installers/bash-installer.js +6 -6
- package/dist/core/completions/installers/fish-installer.js +1 -1
- package/dist/core/completions/installers/powershell-installer.js +14 -14
- package/dist/core/completions/installers/zsh-installer.d.ts +7 -1
- package/dist/core/completions/installers/zsh-installer.js +36 -8
- package/dist/core/completions/templates/bash-templates.d.ts +1 -1
- package/dist/core/completions/templates/bash-templates.js +12 -6
- package/dist/core/completions/templates/fish-templates.d.ts +2 -2
- package/dist/core/completions/templates/fish-templates.js +20 -9
- package/dist/core/completions/templates/powershell-templates.d.ts +1 -1
- package/dist/core/completions/templates/powershell-templates.js +13 -4
- package/dist/core/completions/templates/zsh-templates.d.ts +1 -1
- package/dist/core/completions/templates/zsh-templates.js +18 -9
- package/dist/core/config-schema.d.ts +3 -1
- package/dist/core/config-schema.js +26 -1
- package/dist/core/config.d.ts +3 -3
- package/dist/core/config.js +4 -4
- package/dist/core/global-config.d.ts +41 -12
- package/dist/core/global-config.js +344 -27
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +2 -2
- package/dist/core/init.d.ts +6 -1
- package/dist/core/init.js +99 -77
- package/dist/core/legacy-cleanup.d.ts +17 -17
- package/dist/core/legacy-cleanup.js +96 -79
- package/dist/core/list.js +18 -4
- package/dist/core/migration.d.ts +3 -1
- package/dist/core/migration.js +7 -8
- package/dist/core/parsers/change-parser.js +1 -1
- package/dist/core/parsers/markdown-parser.js +2 -2
- package/dist/core/profile-sync-drift.d.ts +1 -1
- package/dist/core/profile-sync-drift.js +13 -13
- package/dist/core/project-config.d.ts +4 -4
- package/dist/core/project-config.js +11 -11
- package/dist/core/schemas/change.schema.d.ts +1 -1
- package/dist/core/schemas/change.schema.js +1 -1
- package/dist/core/schemas/spec.schema.d.ts +1 -1
- package/dist/core/schemas/spec.schema.js +1 -1
- package/dist/core/sdd/adr.js +23 -1
- package/dist/core/sdd/agent-binding.d.ts +346 -0
- package/dist/core/sdd/agent-binding.js +343 -0
- package/dist/core/sdd/backlog-cli.d.ts +16 -0
- package/dist/core/sdd/backlog-cli.js +146 -0
- package/dist/core/sdd/backlog-conflict-policy.d.ts +58 -0
- package/dist/core/sdd/backlog-conflict-policy.js +230 -0
- package/dist/core/sdd/backlog-projection.d.ts +8 -0
- package/dist/core/sdd/backlog-projection.js +89 -0
- package/dist/core/sdd/backlog-provider-contract.d.ts +252 -0
- package/dist/core/sdd/backlog-provider-contract.js +158 -0
- package/dist/core/sdd/bootstrap.js +2 -2
- package/dist/core/sdd/check.d.ts +42 -0
- package/dist/core/sdd/check.js +22 -22
- package/dist/core/sdd/contract.d.ts +13 -0
- package/dist/core/sdd/contract.js +36 -0
- package/dist/core/sdd/coordination/coordination-adapters.d.ts +38 -0
- package/dist/core/sdd/coordination/coordination-adapters.js +139 -1
- package/dist/core/sdd/deepagent-contracts.d.ts +276 -0
- package/dist/core/sdd/deepagent-contracts.js +173 -0
- package/dist/core/sdd/deepagents/adr-governor.d.ts +2 -0
- package/dist/core/sdd/deepagents/adr-governor.js +30 -0
- package/dist/core/sdd/deepagents/backend.d.ts +63 -0
- package/dist/core/sdd/deepagents/backend.js +174 -0
- package/dist/core/sdd/deepagents/codesdd-tools.d.ts +39 -0
- package/dist/core/sdd/deepagents/codesdd-tools.js +83 -0
- package/dist/core/sdd/deepagents/evidence-mapper.d.ts +86 -0
- package/dist/core/sdd/deepagents/evidence-mapper.js +178 -0
- package/dist/core/sdd/deepagents/model-provider.d.ts +53 -0
- package/dist/core/sdd/deepagents/model-provider.js +379 -0
- package/dist/core/sdd/deepagents/policy-enforcement.d.ts +30 -0
- package/dist/core/sdd/deepagents/policy-enforcement.js +90 -0
- package/dist/core/sdd/deepagents/policy.d.ts +75 -0
- package/dist/core/sdd/deepagents/policy.js +358 -0
- package/dist/core/sdd/deepagents/quality-witness.d.ts +3 -0
- package/dist/core/sdd/deepagents/quality-witness.js +77 -0
- package/dist/core/sdd/deepagents/reversa-subagents.d.ts +75 -0
- package/dist/core/sdd/deepagents/reversa-subagents.js +182 -0
- package/dist/core/sdd/deepagents/runtime-factory.d.ts +90 -0
- package/dist/core/sdd/deepagents/runtime-factory.js +231 -0
- package/dist/core/sdd/deepagents/runtime-loader.d.ts +16 -0
- package/dist/core/sdd/deepagents/runtime-loader.js +65 -0
- package/dist/core/sdd/default-bootstrap-files.d.ts +2 -2
- package/dist/core/sdd/default-bootstrap-files.js +36 -2
- package/dist/core/sdd/default-skills.d.ts +30 -0
- package/dist/core/sdd/default-skills.js +181 -5
- package/dist/core/sdd/devtrack-api-appliance.d.ts +84 -0
- package/dist/core/sdd/devtrack-api-appliance.js +257 -0
- package/dist/core/sdd/devtrack-api-architecture.d.ts +31 -0
- package/dist/core/sdd/devtrack-api-architecture.js +608 -0
- package/dist/core/sdd/devtrack-api-import-boundary.d.ts +19 -0
- package/dist/core/sdd/devtrack-api-import-boundary.js +32 -0
- package/dist/core/sdd/diagnose.d.ts +59 -0
- package/dist/core/sdd/diagnose.js +37 -37
- package/dist/core/sdd/docs-sync.js +33 -5
- package/dist/core/sdd/domain/post-active-validation.d.ts +7 -0
- package/dist/core/sdd/domain/post-active-validation.js +61 -0
- package/dist/core/sdd/domain/transition-engine.js +1 -0
- package/dist/core/sdd/entity-reference.d.ts +5 -0
- package/dist/core/sdd/entity-reference.js +22 -0
- package/dist/core/sdd/governance-backfill.d.ts +31 -0
- package/dist/core/sdd/governance-backfill.js +359 -0
- package/dist/core/sdd/governance-parser.d.ts +21 -0
- package/dist/core/sdd/governance-parser.js +91 -0
- package/dist/core/sdd/governance-schemas.d.ts +245 -0
- package/dist/core/sdd/governance-schemas.js +143 -0
- package/dist/core/sdd/{import-openspec.d.ts → import-legacy-spec.d.ts} +7 -7
- package/dist/core/sdd/{import-openspec.js → import-legacy-spec.js} +21 -29
- package/dist/core/sdd/init.d.ts +3 -0
- package/dist/core/sdd/init.js +6 -3
- package/dist/core/sdd/json-schema.js +100 -6
- package/dist/core/sdd/knowledge-graph.d.ts +45 -0
- package/dist/core/sdd/knowledge-graph.js +288 -0
- package/dist/core/sdd/legacy-operations.js +431 -43
- package/dist/core/sdd/lenses.d.ts +1 -0
- package/dist/core/sdd/lenses.js +29 -1
- package/dist/core/sdd/migrate-workspace.js +56 -2
- package/dist/core/sdd/migrate.d.ts +1 -1
- package/dist/core/sdd/migrate.js +36 -2
- package/dist/core/sdd/package-structure-gate.d.ts +83 -0
- package/dist/core/sdd/package-structure-gate.js +362 -0
- package/dist/core/sdd/parallel-feat-automation.d.ts +152 -0
- package/dist/core/sdd/parallel-feat-automation.js +212 -0
- package/dist/core/sdd/plugin-broker.d.ts +558 -0
- package/dist/core/sdd/plugin-broker.js +482 -0
- package/dist/core/sdd/plugin-certification.d.ts +79 -0
- package/dist/core/sdd/plugin-certification.js +453 -0
- package/dist/core/sdd/plugin-cli.d.ts +109 -0
- package/dist/core/sdd/plugin-cli.js +198 -0
- package/dist/core/sdd/plugin-evidence.d.ts +275 -0
- package/dist/core/sdd/plugin-evidence.js +307 -0
- package/dist/core/sdd/plugin-manifest.d.ts +164 -0
- package/dist/core/sdd/plugin-manifest.js +215 -0
- package/dist/core/sdd/plugin-policy-pack.d.ts +88 -0
- package/dist/core/sdd/plugin-policy-pack.js +236 -0
- package/dist/core/sdd/plugin-policy.d.ts +68 -0
- package/dist/core/sdd/plugin-policy.js +212 -0
- package/dist/core/sdd/plugin-registry.d.ts +311 -0
- package/dist/core/sdd/plugin-registry.js +138 -0
- package/dist/core/sdd/plugin-skill-binding.d.ts +151 -0
- package/dist/core/sdd/plugin-skill-binding.js +339 -0
- package/dist/core/sdd/quality-artifact-manifest-validator.d.ts +28 -0
- package/dist/core/sdd/quality-artifact-manifest-validator.js +167 -0
- package/dist/core/sdd/quality-evidence-renderer.d.ts +65 -0
- package/dist/core/sdd/quality-evidence-renderer.js +218 -0
- package/dist/core/sdd/quality-scenario-runner.d.ts +42 -0
- package/dist/core/sdd/quality-scenario-runner.js +613 -0
- package/dist/core/sdd/quality-validation.d.ts +547 -0
- package/dist/core/sdd/quality-validation.js +239 -0
- package/dist/core/sdd/resolve-project-root.d.ts +2 -2
- package/dist/core/sdd/resolve-project-root.js +11 -5
- package/dist/core/sdd/sanitize.d.ts +30 -1
- package/dist/core/sdd/sanitize.js +23 -23
- package/dist/core/sdd/services/agent-run.service.d.ts +65 -0
- package/dist/core/sdd/services/agent-run.service.js +189 -0
- package/dist/core/sdd/services/breakdown.service.js +2 -1
- package/dist/core/sdd/services/context.service.js +18 -16
- package/dist/core/sdd/services/debate.service.js +15 -2
- package/dist/core/sdd/services/feature-lint.service.d.ts +22 -0
- package/dist/core/sdd/services/feature-lint.service.js +105 -5
- package/dist/core/sdd/services/finalize.service.d.ts +80 -0
- package/dist/core/sdd/services/finalize.service.js +323 -24
- package/dist/core/sdd/services/frontend-gap.service.js +22 -7
- package/dist/core/sdd/services/governance-control-plane-runtime-adapters.d.ts +17 -0
- package/dist/core/sdd/services/governance-control-plane-runtime-adapters.js +38 -0
- package/dist/core/sdd/services/governance-control-plane.service.d.ts +66 -0
- package/dist/core/sdd/services/governance-control-plane.service.js +134 -0
- package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
- package/dist/core/sdd/services/legacy-capability.service.d.ts +10 -7
- package/dist/core/sdd/services/legacy-capability.service.js +38 -21
- package/dist/core/sdd/services/mcp-runtime.service.d.ts +123 -8
- package/dist/core/sdd/services/mcp-runtime.service.js +1085 -33
- package/dist/core/sdd/services/onboard.service.js +2 -1
- package/dist/core/sdd/services/rebuild.service.js +6 -1
- package/dist/core/sdd/services/skills-sync.service.d.ts +17 -5
- package/dist/core/sdd/services/skills-sync.service.js +55 -2
- package/dist/core/sdd/services/start.service.js +6 -4
- package/dist/core/sdd/skill-bundles-curation-schema.d.ts +66 -0
- package/dist/core/sdd/skill-bundles-curation-schema.js +52 -0
- package/dist/core/sdd/skill-evidence.d.ts +19 -0
- package/dist/core/sdd/skill-evidence.js +38 -0
- package/dist/core/sdd/skill-policy-pool.d.ts +46 -0
- package/dist/core/sdd/skill-policy-pool.js +185 -0
- package/dist/core/sdd/state.d.ts +22 -0
- package/dist/core/sdd/state.js +66 -41
- package/dist/core/sdd/structural-health.d.ts +42 -42
- package/dist/core/sdd/types.d.ts +33 -7
- package/dist/core/sdd/types.js +17 -0
- package/dist/core/sdd/upgrade-to-codesdd.d.ts +45 -0
- package/dist/core/sdd/upgrade-to-codesdd.js +179 -0
- package/dist/core/sdd/workspace-schemas.d.ts +285 -14
- package/dist/core/sdd/workspace-schemas.js +148 -0
- package/dist/core/sdd/write-manifest.js +22 -4
- package/dist/core/shared/skill-generation.d.ts +1 -1
- package/dist/core/shared/skill-generation.js +15 -15
- package/dist/core/shared/tool-detection.d.ts +3 -3
- package/dist/core/shared/tool-detection.js +14 -14
- package/dist/core/specs-apply.js +6 -6
- package/dist/core/templates/index.d.ts +1 -1
- package/dist/core/templates/index.js +1 -1
- package/dist/core/templates/workflows/apply-change.js +14 -14
- package/dist/core/templates/workflows/archive-change.js +32 -32
- package/dist/core/templates/workflows/bulk-archive-change.js +25 -25
- package/dist/core/templates/workflows/continue-change.js +12 -12
- package/dist/core/templates/workflows/explore.js +29 -29
- package/dist/core/templates/workflows/feedback.js +6 -6
- package/dist/core/templates/workflows/ff-change.js +24 -24
- package/dist/core/templates/workflows/new-change.js +20 -20
- package/dist/core/templates/workflows/onboard.js +33 -33
- package/dist/core/templates/workflows/propose.js +23 -23
- package/dist/core/templates/workflows/sdd.js +8 -8
- package/dist/core/templates/workflows/sync-specs.js +19 -19
- package/dist/core/templates/workflows/verify-change.js +17 -17
- package/dist/core/update.d.ts +2 -2
- package/dist/core/update.js +16 -15
- package/dist/core/validation/constants.d.ts +1 -1
- package/dist/core/validation/constants.js +1 -1
- package/dist/core/view.js +11 -11
- package/dist/telemetry/config.d.ts +2 -1
- package/dist/telemetry/config.js +17 -8
- package/dist/telemetry/index.d.ts +10 -2
- package/dist/telemetry/index.js +40 -7
- package/dist/ui/ascii-patterns.d.ts +2 -2
- package/dist/ui/ascii-patterns.js +2 -2
- package/dist/ui/welcome-screen.js +2 -2
- package/dist/utils/change-metadata.d.ts +4 -4
- package/dist/utils/change-metadata.js +6 -6
- package/dist/utils/change-utils.d.ts +3 -3
- package/dist/utils/change-utils.js +5 -5
- package/dist/utils/file-system.js +1 -1
- package/dist/utils/interactive.js +1 -1
- package/dist/utils/item-discovery.js +4 -4
- package/dist/utils/legacy-spec-compat.d.ts +2 -0
- package/dist/utils/legacy-spec-compat.js +2 -0
- package/dist/utils/shell-detection.d.ts +1 -0
- package/dist/utils/shell-detection.js +16 -0
- package/package.json +27 -17
- package/schemas/sdd/1-spec.schema.json +1 -1
- package/schemas/sdd/2-plan.schema.json +73 -1
- package/schemas/sdd/3-tasks.schema.json +73 -1
- package/schemas/sdd/4-changelog.schema.json +1 -1
- package/schemas/sdd/5-quality.schema.json +442 -2
- package/schemas/sdd/adr.schema.json +148 -0
- package/schemas/sdd/agent-binding-adapter.schema.json +210 -0
- package/schemas/sdd/agent-binding-resolution.schema.json +338 -0
- package/schemas/sdd/backlog-projection-plan.schema.json +180 -0
- package/schemas/sdd/backlog-provider-contract.schema.json +260 -0
- package/schemas/sdd/codesdd-plugin.schema.json +474 -0
- package/schemas/sdd/debate.schema.json +244 -0
- package/schemas/sdd/deepagent-decision-evidence.schema.json +58 -0
- package/schemas/sdd/deepagent-env-contract.schema.json +143 -0
- package/schemas/sdd/deepagent-quality-evidence.schema.json +108 -0
- package/schemas/sdd/deepagent-run-evidence.schema.json +192 -0
- package/schemas/sdd/deepagent-run-plan.schema.json +197 -0
- package/schemas/sdd/deepagent-run-request.schema.json +321 -0
- package/schemas/sdd/deepagent-subagent-evidence.schema.json +110 -0
- package/schemas/sdd/deepagent-tool-call-evidence.schema.json +78 -0
- package/schemas/sdd/discarded.schema.json +127 -0
- package/schemas/sdd/epic.schema.json +147 -0
- package/schemas/sdd/insight.schema.json +136 -0
- package/schemas/sdd/parallel-feat-automation-plan.schema.json +215 -0
- package/schemas/sdd/parallel-feat-automation-request.schema.json +109 -0
- package/schemas/sdd/plugin-artifact-manifest.schema.json +150 -0
- package/schemas/sdd/plugin-compliance-index.schema.json +136 -0
- package/schemas/sdd/plugin-dry-run-plan.schema.json +260 -0
- package/schemas/sdd/plugin-evidence-manifest.schema.json +569 -0
- package/schemas/sdd/plugin-policy-evaluation.schema.json +92 -0
- package/schemas/sdd/plugin-policy-pack-evaluation.schema.json +94 -0
- package/schemas/sdd/plugin-policy-pack.schema.json +196 -0
- package/schemas/sdd/plugin-registry.schema.json +558 -0
- package/schemas/sdd/plugin-rollback-manifest.schema.json +87 -0
- package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +845 -0
- package/schemas/sdd/plugin-skill-binding-resolution.schema.json +305 -0
- package/schemas/sdd/plugin-skill-binding.schema.json +88 -0
- package/schemas/sdd/plugin-validation-manifest.schema.json +123 -0
- package/schemas/sdd/quality-architecture-schema.schema.json +216 -0
- package/schemas/sdd/quality-evidence-bundle.schema.json +1228 -0
- package/schemas/sdd/quality-run.schema.json +197 -0
- package/schemas/sdd/quality-scenario.schema.json +252 -0
- package/schemas/sdd/workspace-catalog.schema.json +9841 -22
- package/schemas/spec-driven/schema.yaml +4 -4
- package/schemas/spec-driven/templates/proposal.md +1 -1
- package/dist/utils/openspec-compat.d.ts +0 -2
- package/dist/utils/openspec-compat.js +0 -2
|
@@ -327,21 +327,21 @@ class CreateAppointmentUseCase:
|
|
|
327
327
|
|
|
328
328
|
---
|
|
329
329
|
|
|
330
|
-
##
|
|
330
|
+
## CodeSDD decision-support mode (never runtime dependency)
|
|
331
331
|
|
|
332
|
-
Use this mode when the target repository already has a `.sdd/` root and the team is using
|
|
332
|
+
Use this mode when the target repository already has a `.sdd/` root and the team is using CodeSDD planning artifacts.
|
|
333
333
|
|
|
334
|
-
The goal is to improve architecture decisions with explicit traceability, not to add
|
|
334
|
+
The goal is to improve architecture decisions with explicit traceability, not to add CodeSDD runtime dependencies to generated Flask code.
|
|
335
335
|
|
|
336
|
-
### Mandatory
|
|
336
|
+
### Mandatory CodeSDD workflow for architecture decisions
|
|
337
337
|
|
|
338
|
-
1. Run `
|
|
339
|
-
2. Run `
|
|
340
|
-
3. Run `
|
|
338
|
+
1. Run `codesdd sdd onboard system` before broad design work.
|
|
339
|
+
2. Run `codesdd sdd next` and select active or ready work.
|
|
340
|
+
3. Run `codesdd sdd context <FEAT-ID>` before drafting architecture changes.
|
|
341
341
|
4. Keep `.sdd/active/<FEAT-ID>/5-quality.yaml` updated with decision evidence and risks.
|
|
342
|
-
5. Declare interface impact with `
|
|
343
|
-
6. Run `
|
|
344
|
-
7. Consolidate with `
|
|
342
|
+
5. Declare interface impact with `codesdd sdd frontend-impact <FEAT-ID> ...` even when status is `none`.
|
|
343
|
+
6. Run `codesdd sdd check --render` after updates; run `codesdd sdd diagnose` when structure drift is suspected.
|
|
344
|
+
7. Consolidate with `codesdd sdd finalize --ref <FEAT-ID>` only after quality evidence is recorded.
|
|
345
345
|
|
|
346
346
|
### How to use INS/DEB/EPIC/FEAT as decision layers
|
|
347
347
|
|
|
@@ -368,10 +368,10 @@ Use these prompts and record answers in FEAT notes/quality evidence:
|
|
|
368
368
|
|
|
369
369
|
### Runtime-boundary guardrails
|
|
370
370
|
|
|
371
|
-
-
|
|
372
|
-
- Generated Flask code must not import from `.sdd`, parse
|
|
373
|
-
- Domain and application layers must stay independent of
|
|
374
|
-
- If a project does not use
|
|
371
|
+
- CodeSDD files and commands are planning/governance tools only.
|
|
372
|
+
- Generated Flask code must not import from `.sdd`, parse CodeSDD YAML, or shell out to `codesdd`.
|
|
373
|
+
- Domain and application layers must stay independent of CodeSDD metadata and CLI semantics.
|
|
374
|
+
- If a project does not use CodeSDD, keep the same architecture rules and capture decisions in equivalent project docs.
|
|
375
375
|
|
|
376
376
|
### Quality-contract usage in this mode
|
|
377
377
|
|
|
@@ -382,7 +382,7 @@ For each major architecture decision, update the active FEAT quality artifact wi
|
|
|
382
382
|
- accepted risks and compensating controls;
|
|
383
383
|
- command evidence (`check --render`, tests, build) and timestamped results.
|
|
384
384
|
|
|
385
|
-
This keeps decision history auditable without leaking
|
|
385
|
+
This keeps decision history auditable without leaking CodeSDD concerns into runtime code.
|
|
386
386
|
|
|
387
387
|
---
|
|
388
388
|
|
|
@@ -2618,7 +2618,7 @@ These gates keep the skill reviewable and traceable to EPIC-0016 without relying
|
|
|
2618
2618
|
| --- | --- | --- | --- |
|
|
2619
2619
|
| GATE-ARCH-BOUNDARY | Domain/application remain framework-free; adapters stay in interface/infrastructure layers | Clean Architecture boundaries and dependency direction | `## Python/Flask Clean Architecture boundary contract`, `Must not depend on` |
|
|
2620
2620
|
| GATE-SEC-AUTHORITY | Tenant/security authority comes from validated principal (JWT/context), never from payload or LLM output | Tenant isolation and security authority source | `tenant_id obrigatório`, `WebSocket payload is never authority` |
|
|
2621
|
-
| GATE-
|
|
2621
|
+
| GATE-CODESDD-BOUNDARY | CodeSDD is decision-support only; generated runtime code must not import CodeSDD artifacts | CodeSDD support with runtime boundary safety | `## CodeSDD decision-support mode (never runtime dependency)`, `must not import from `.sdd`` |
|
|
2622
2622
|
| GATE-PROD-VERSIONING | Production guidance remains provider/model agnostic and version-sensitive APIs are labeled | Production readiness and version-aware guidance | `## Production-readiness guidance (safe and version-aware)`, `Version-sensitive API policy (validated or conceptual)` |
|
|
2623
2623
|
| GATE-VALIDATION-STRATEGY | Validation uses stable required anchors/rules instead of prose snapshots | Maintainable quality gate evidence | `Avoid whole-document snapshots`, `Prefer required headings and key rules` |
|
|
2624
2624
|
|
|
@@ -2632,7 +2632,7 @@ These gates keep the skill reviewable and traceable to EPIC-0016 without relying
|
|
|
2632
2632
|
Recommended minimum anchors for seeded-skill tests:
|
|
2633
2633
|
|
|
2634
2634
|
- `## Python/Flask Clean Architecture boundary contract`
|
|
2635
|
-
- `##
|
|
2635
|
+
- `## CodeSDD decision-support mode (never runtime dependency)`
|
|
2636
2636
|
- `## Production-readiness guidance (safe and version-aware)`
|
|
2637
2637
|
- `Version-sensitive API policy (validated or conceptual)`
|
|
2638
2638
|
- `Redis Pub/Sub versus Streams and outbox`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: devtrack-api
|
|
3
|
-
description: Model-agnostic engineering skill for the DevTrack Foundation API and derived DevTrack APIs. Use it to implement, review, refactor, test, document, or govern NestJS TypeScript backend work using DDD, Hexagonal Architecture, Clean Architecture, TypeORM,
|
|
3
|
+
description: Model-agnostic engineering skill for the DevTrack Foundation API and derived DevTrack APIs. Use it to implement, review, refactor, test, document, or govern NestJS TypeScript backend work using DDD, Hexagonal Architecture, Clean Architecture, TypeORM, CodeSDD, strict import boundaries, layered modules under domain, application, presentation, infrastructure, and shared, plus safe operational practices, evidence-based validation, and quality handoff.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# DevTrack API
|
|
@@ -19,7 +19,7 @@ These rules apply to any assistant, automation host, IDE agent, command-line cod
|
|
|
19
19
|
- Prefer repository evidence over memory, assumptions, examples, or generated guesses.
|
|
20
20
|
- Do not invent APIs, flags, files, package scripts, class names, module names, environment variables, database objects, or behavior.
|
|
21
21
|
- Verify version-sensitive details from local files such as `package.json`, lockfiles, configs, migrations, source code, or official docs when available.
|
|
22
|
-
- Keep work scoped to the user request and the active
|
|
22
|
+
- Keep work scoped to the user request and the active CodeSDD feature when one exists.
|
|
23
23
|
- Preserve user changes in a dirty worktree. Never overwrite unrelated modifications.
|
|
24
24
|
- Avoid destructive actions unless the user explicitly requested them and the scope is clear.
|
|
25
25
|
- Never expose, copy, log, commit, or summarize real secrets.
|
|
@@ -29,14 +29,16 @@ These rules apply to any assistant, automation host, IDE agent, command-line cod
|
|
|
29
29
|
|
|
30
30
|
## Operating Mode
|
|
31
31
|
|
|
32
|
-
Repository files are the source for implementation facts.
|
|
32
|
+
Repository files are the source for implementation facts. CodeSDD is the source for operational planning, progress, dependencies, blockers, quality, and handoff.
|
|
33
|
+
|
|
34
|
+
When CodeSDD is governing a project and the user asks for API or backend work without explicitly selecting another skill/profile, `devtrack-api` is the default API skill. Explicit Python/Flask/LangGraph API work uses the dedicated Python skill/profile instead.
|
|
33
35
|
|
|
34
36
|
Before edits in the API repository:
|
|
35
37
|
|
|
36
38
|
1. Read the nearest `AGENTS.md` and `AGENT.md`.
|
|
37
|
-
2. Run `
|
|
38
|
-
3. Run `
|
|
39
|
-
4. If SDD returns a ready or active feature id, run `
|
|
39
|
+
2. Run `codesdd sdd onboard system`.
|
|
40
|
+
3. Run `codesdd sdd next`.
|
|
41
|
+
4. If SDD returns a ready or active feature id, run `codesdd sdd context <FEAT-ID>` before coding.
|
|
40
42
|
5. If no feature id is available but the user explicitly requested the work, continue narrowly and state the SDD exception in the final handoff.
|
|
41
43
|
6. Check `git status --short` before editing and before the final handoff.
|
|
42
44
|
7. Inspect nearby implementation files before creating new patterns.
|
|
@@ -56,9 +58,13 @@ Treat the repository as a production-grade system:
|
|
|
56
58
|
|
|
57
59
|
## Reference Map
|
|
58
60
|
|
|
59
|
-
Load only the files needed for the task, but always load governance before code changes:
|
|
61
|
+
Load only the files needed for the task, but always load governance and layout before code changes:
|
|
60
62
|
|
|
63
|
+
- Always read [contract-pack.yaml](references/contract-pack.yaml) before planning, approving, or executing a `devtrack-api` project, debate, EPIC, or FEAT. It is the machine-readable contract pack for derivation profiles, P0/P1/P2 severity, early package preview, human validation, and `codesdd-validate` drift remediation.
|
|
61
64
|
- Always read [architecture-governance.md](references/architecture-governance.md) before code changes.
|
|
65
|
+
- Always read [foundation-layout.md](references/foundation-layout.md) before producing any implementation plan, debate, or code change that proposes new file paths. Foundation layout is canonical, not advisory.
|
|
66
|
+
- Read [consumer-sync-policy.md](references/consumer-sync-policy.md) before copying, updating, validating, or accepting `devtrack-api` in a consumer repository.
|
|
67
|
+
- Read [field-validation-protocol.md](references/field-validation-protocol.md) before declaring `devtrack-api` adoption validated in a consumer project or closing field-evidence expectations.
|
|
62
68
|
- Read [imports-lint.md](references/imports-lint.md) before editing imports or fixing lint.
|
|
63
69
|
- Read [domain-modeling.md](references/domain-modeling.md) for `domain/`, `.type.ts`, `.bo.ts`, `.vo.ts`, validators, events, and repository ports.
|
|
64
70
|
- Read [application-presentation.md](references/application-presentation.md) for use cases, services, handlers, ports, modules, controllers, DTO validators, GraphQL, CLI, WebSocket, agents, and tools.
|
|
@@ -66,6 +72,20 @@ Load only the files needed for the task, but always load governance before code
|
|
|
66
72
|
- Read [testing-validation.md](references/testing-validation.md) before finishing or when choosing tests.
|
|
67
73
|
- Use [implementation-checklist.md](references/implementation-checklist.md) as the final pass checklist.
|
|
68
74
|
|
|
75
|
+
## Contract Pack And Derivation Profiles
|
|
76
|
+
|
|
77
|
+
The structured contract lives in [contract-pack.yaml](references/contract-pack.yaml). Treat it as the executable policy source that future CodeSDD gates can import. The Markdown skill explains the rules; the YAML contract names the profiles, severities, rule ids, drift map, and evidence expectations.
|
|
78
|
+
|
|
79
|
+
Every `devtrack-api` plan must select exactly one profile before implementation:
|
|
80
|
+
|
|
81
|
+
- `prototype`: exploratory only. It cannot be reported as Foundation-compatible unless a later FEAT upgrades and validates it.
|
|
82
|
+
- `foundation-compatible`: default for derived DevTrack APIs. P0 drift blocks finalize; P1 drift requires remediation or formal exception.
|
|
83
|
+
- `enterprise-strict`: audit-grade mode. P0 and P1 drift block finalize; P2 drift requires evidence or ADR-backed exception.
|
|
84
|
+
|
|
85
|
+
For the first two or three DEBs of a new `devtrack-api` project or major API theme, CodeSDD must generate a package-structure preview and ask the human planner to approve or correct it before FEAT execution. Missing profile selection, missing preview, missing human validation, or declarative-only skill evidence are contract defects.
|
|
86
|
+
|
|
87
|
+
The `codesdd-validate` field failure is mapped in the contract pack under `codesdd_validate_drift_map`. Future planning, validator, finalize, provenance, and field-validation FEATs must consume that map instead of reinterpreting the failure from memory.
|
|
88
|
+
|
|
69
89
|
## Layer Order
|
|
70
90
|
|
|
71
91
|
Implement from inside out unless the task is purely presentation or infrastructure:
|
|
@@ -83,29 +103,141 @@ Dependency direction is strict:
|
|
|
83
103
|
- `presentation` must not import concrete infrastructure.
|
|
84
104
|
- `infrastructure` implements ports defined by `domain` or `application`.
|
|
85
105
|
|
|
86
|
-
##
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
106
|
+
## Domain Pattern Decision Rule
|
|
107
|
+
|
|
108
|
+
Before touching domain, decide which of the two coexisting patterns applies. The choice is binary and prescriptive — not stylistic.
|
|
109
|
+
|
|
110
|
+
- **BO-pattern (default for every new context).** Domain artifacts live as `business-objects/<name>.bo.ts`, `value-objects/<name>.vo.ts`, and `types/<name>.type.ts`. **Do not create** `entities/` or `repository-ports/` folders in domain. Repository ports for this pattern live in **application** (`ports/out/`).
|
|
111
|
+
- **Entity-pattern (legacy, extension only).** Applies only when extending a context that **already uses** `entities/` in `devtrack-foundation-api`. The current legacy set is exactly: `pessoas`, `wallets`. Introducing `entities/` to any other domain context requires an ADR; otherwise it is forbidden.
|
|
112
|
+
|
|
113
|
+
When in doubt about a context's pattern, verify the physical layout in `devtrack-foundation-api/src/domain/<context>/` — that is the ground truth. The rule is enforced by [foundation-layout.md](references/foundation-layout.md).
|
|
114
|
+
|
|
115
|
+
## Canonical Paths
|
|
116
|
+
|
|
117
|
+
These paths are non-negotiable. Any file proposed in an implementation plan, debate, or code change must match one of these patterns exactly.
|
|
118
|
+
|
|
119
|
+
**Domain (BO-pattern — default)**
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
src/domain/<context>/business-objects/<name>.bo.ts
|
|
123
|
+
src/domain/<context>/value-objects/<name>.vo.ts (optional)
|
|
124
|
+
src/domain/<context>/types/<name>.type.ts
|
|
125
|
+
src/domain/<context>/constants/<name>.const.ts (optional)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Domain (entity-pattern — legacy `pessoas` and `wallets` only)**
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
src/domain/<context>/entities/<name>.entity.ts
|
|
132
|
+
src/domain/<context>/repository-ports/<name>-repository.port.ts
|
|
133
|
+
src/domain/<context>/validators/<name>.validator.ts
|
|
134
|
+
src/domain/<context>/events/<name>-<event>.event.ts (optional)
|
|
135
|
+
src/domain/<context>/types/<name>.type.ts
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Shared domain primitives (centralized, never per-context)**
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
src/shared/domain/exceptions/<name>.exception.ts
|
|
142
|
+
src/shared/domain/value-objects/<name>.vo.ts
|
|
143
|
+
src/shared/domain/validators/<name>.validator.ts
|
|
144
|
+
src/shared/domain/types/<name>.type.ts
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Application**
|
|
148
|
+
|
|
149
|
+
```text
|
|
150
|
+
src/application/business/<context>/use-cases/<verb-noun>.use-case.ts
|
|
151
|
+
src/application/business/<context>/ports/in/<verb-noun>.use-case.port.ts
|
|
152
|
+
src/application/business/<context>/ports/out/<name>.port.ts
|
|
153
|
+
src/application/business/<context>/ports/out/<name>-repository.port.ts (BO-pattern only)
|
|
154
|
+
src/application/business/<context>/services/<name>.service.ts
|
|
155
|
+
src/application/business/<context>/handlers/<name>.handler.ts
|
|
156
|
+
src/application/business/<context>/<context>.application.module.ts
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Foundation-compatible intelligence modules are canonical application-layer modules. They use the same boundary rules as `business` modules, with provider-neutral orchestration in application and provider-specific integrations in infrastructure.
|
|
160
|
+
|
|
161
|
+
```text
|
|
162
|
+
src/application/intelligence/<context>/use-cases/<verb-noun>.use-case.ts
|
|
163
|
+
src/application/intelligence/<context>/ports/in/<verb-noun>.use-case.port.ts
|
|
164
|
+
src/application/intelligence/<context>/ports/out/<name>.port.ts
|
|
165
|
+
src/application/intelligence/<context>/services/<name>.service.ts
|
|
166
|
+
src/application/intelligence/<context>/handlers/<name>.handler.ts
|
|
167
|
+
src/application/intelligence/<context>/agents/<name>.agent.ts
|
|
168
|
+
src/application/intelligence/<context>/tools/<name>.tool.ts
|
|
169
|
+
src/application/intelligence/common/agent-runtime/<name>.ts
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Current Foundation intelligence contexts: `common`, `conversation`, `course-agents`, `report-chat`.
|
|
173
|
+
|
|
174
|
+
**Infrastructure (centralized by subsystem — never by business context)**
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
src/infrastructure/adapters/<subsystem>/<name>.adapter.ts
|
|
178
|
+
src/infrastructure/adapters/<subsystem>/<subsystem>.module.ts
|
|
179
|
+
src/infrastructure/adapters/orm/entities/<name>.orm-entity.ts
|
|
180
|
+
src/infrastructure/adapters/orm/repositories/<name>.typeorm-repository.ts
|
|
181
|
+
src/infrastructure/adapters/orm/mappers/<name>.mapper.ts
|
|
182
|
+
src/infrastructure/adapters/orm/migrations/<timestamp>-<action>.migration.ts
|
|
183
|
+
src/infrastructure/adapters/orm/<context>-orm.module.ts
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Known subsystems in Foundation: `auth`, `aws`, `cache`, `configuration`, `http`, `llm`, `orm`, `queue`, `redis`, `sync-engine`, `temporal`, `vector-store`. Add a new subsystem folder only when no existing subsystem covers the integration.
|
|
187
|
+
|
|
188
|
+
**Presentation (segmented by transport before context)**
|
|
189
|
+
|
|
190
|
+
```text
|
|
191
|
+
src/presentation/rest/<context>/controllers/<verb-noun>.controller.ts
|
|
192
|
+
src/presentation/rest/<context>/dtos/<verb-noun>.dto.ts
|
|
193
|
+
src/presentation/rest/<context>/presentation-validators/<verb-noun>.presentation-validator.ts
|
|
194
|
+
src/presentation/rest/<context>/guards/<name>.guard.ts
|
|
195
|
+
src/presentation/rest/<context>/decorators/<name>.decorator.ts
|
|
196
|
+
src/presentation/rest/<context>/<context>.module.ts
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
REST DTOs are transport-layer input/output contracts. Keep them thin and delegate validation/mapping into presentation validators and application use cases.
|
|
200
|
+
|
|
201
|
+
Other transports follow the same shape under `graphql/`, `cli/`, `websocket/`, or `agent/`.
|
|
202
|
+
|
|
203
|
+
**Suffix-only rules (orthogonal to path)**
|
|
204
|
+
|
|
205
|
+
- Use cases end with `.use-case.ts`. Services with `.service.ts`. Handlers with `.handler.ts`.
|
|
206
|
+
- REST controllers end with `.controller.ts`, one class per file.
|
|
207
|
+
- REST DTOs end with `.dto.ts`.
|
|
208
|
+
- Presentation validators end with `.presentation-validator.ts`.
|
|
209
|
+
- Nest modules end with `.application.module.ts`, `.module.ts`, or `-orm.module.ts` by layer.
|
|
210
|
+
|
|
211
|
+
## Forbidden Patterns
|
|
212
|
+
|
|
213
|
+
These layouts have been observed in derived debates and plans and **must be rejected**. Each one violates the canonical paths above.
|
|
214
|
+
|
|
215
|
+
- `src/domain/<context>/exceptions/` — use `src/shared/domain/exceptions/`. Exceptions are centralized.
|
|
216
|
+
- `<name>.schema.ts` for TypeORM entities — use `<name>.orm-entity.ts`.
|
|
217
|
+
- `<name>.value-object.ts` — use `<name>.vo.ts`.
|
|
218
|
+
- `<name>.repository.ts` (ambiguous) — use `<name>.typeorm-repository.ts` in infrastructure, `<name>-repository.port.ts` in port.
|
|
219
|
+
- `src/infrastructure/<context>/persistence/typeorm/` — use `src/infrastructure/adapters/orm/`.
|
|
220
|
+
- `src/infrastructure/<context>/adapters/` — use `src/infrastructure/adapters/<subsystem>/`.
|
|
221
|
+
- `src/infrastructure/<context>/repositories/` — use `src/infrastructure/adapters/orm/repositories/`.
|
|
222
|
+
- `src/presentation/<context>/` (transport-less) — use `src/presentation/rest/<context>/` (or another transport).
|
|
223
|
+
- `entities/` in any new domain context — use `business-objects/`. The legacy set is closed: `pessoas`, `wallets`.
|
|
224
|
+
- `repository-ports/` in any new domain context — declare the port in application `ports/out/`.
|
|
225
|
+
|
|
226
|
+
## Plan-Time Conformance Gate
|
|
227
|
+
|
|
228
|
+
When producing an implementation plan (the "Arquivo NestJS | Ação" table inside a DEB-*.md, a `2-plan.yaml` task list, or any file inventory in a discovery artifact), apply this gate **before** publishing the plan:
|
|
229
|
+
|
|
230
|
+
1. For each proposed path, match it against Canonical Paths. If it does not match, replace it with the canonical equivalent or flag it as an explicit architectural divergence requiring ADR.
|
|
231
|
+
2. For each new domain context, declare the chosen pattern (BO or entity) and justify the choice. The default is BO; declaring entity for a new context requires citing the ADR.
|
|
232
|
+
3. Cross-check against [foundation-layout.md](references/foundation-layout.md). Skill compliance is verifiable: every path either exists as a pattern in Foundation or is forbidden.
|
|
233
|
+
|
|
234
|
+
A plan that fails this gate corrupts the downstream FEAT execution and the discovery quality ledger. Fix the plan before merging the debate.
|
|
104
235
|
|
|
105
236
|
## Imports And Lint First Principles
|
|
106
237
|
|
|
107
238
|
- Do not use relative imports in `src` or tests. Even same-folder imports are forbidden.
|
|
108
|
-
- Use aliases: `@domain/*`, `@application/*`, `@presentation/*`, `@infrastructure/*`, `@infrastructure
|
|
239
|
+
- Use aliases: `@application/business/notifications/ports/out/*`, `@domain/*`, `@application/*`, `@presentation/*`, `@infrastructure/adapter/*`, `@infrastructure/*`, `@shared/*`, `@src/presentation.module`, `@src/application.module`, `@src/*`, `@tests/*`.
|
|
240
|
+
- Derived projects must carry the Foundation-compatible `tsconfig` alias map before claiming Foundation compatibility.
|
|
109
241
|
- Use `import type` for type-only imports.
|
|
110
242
|
- Keep domain free of Nest, TypeORM, class-validator, HTTP, queue, AWS, cache, LLM, and framework concepts.
|
|
111
243
|
- Treat lint warnings as design feedback, not cosmetic noise.
|
|
@@ -129,9 +261,9 @@ Before final response on API work:
|
|
|
129
261
|
1. Run the smallest useful tests first, then broaden if the change crosses layers.
|
|
130
262
|
2. Prefer `pnpm lint` and `pnpm build` for structural changes.
|
|
131
263
|
3. Update `.sdd/active/<FEAT-ID>/5-quality.yaml` when an active feature exists and completion evidence is in scope.
|
|
132
|
-
4. Declare frontend impact with `
|
|
264
|
+
4. Declare frontend impact with `codesdd sdd frontend-impact <FEAT-ID> ...` when an active feature exists and the feature is being completed.
|
|
133
265
|
5. Update affected docs required by SDD when the task changes architecture or behavior.
|
|
134
|
-
6. Run `
|
|
266
|
+
6. Run `codesdd sdd finalize --ref <FEAT-ID>` only when feature completion is actually in scope.
|
|
135
267
|
7. Final handoff must include changed areas, validation commands and results, skipped checks with reasons, SDD exception if any, and residual risks.
|
|
136
268
|
|
|
137
269
|
Never claim validation passed unless the command actually ran successfully.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "DevTrack API"
|
|
3
3
|
short_description: "Portable DevTrack API engineering governance, architecture, safety, validation, and quality skill."
|
|
4
|
-
default_prompt: "Use $devtrack-api to implement, review, refactor, test, or document DevTrack API work with
|
|
4
|
+
default_prompt: "Use $devtrack-api to implement, review, refactor, test, or document DevTrack API work with CodeSDD, DDD/Clean Architecture, TypeORM, strict import boundaries, evidence-based validation, and safe operational constraints."
|
|
@@ -13,11 +13,11 @@ Use this precedence when context conflicts:
|
|
|
13
13
|
1. Current repository files for implementation facts.
|
|
14
14
|
2. Nearest `AGENTS.md` / `AGENT.md` for local agent instructions.
|
|
15
15
|
3. `.sdd/state/*.yaml` for operational state, planning, progress, dependencies, blockers, quality, and handoff.
|
|
16
|
-
4. `.sdd/core/*.md`, `.sdd/planning/*.md`, `.sdd/AGENT.md`, and `.sdd/README.md` as
|
|
16
|
+
4. `.sdd/core/*.md`, `.sdd/planning/*.md`, `.sdd/AGENT.md`, and `.sdd/README.md` as CodeSDD operational views and guides.
|
|
17
17
|
5. Skill reference files as architecture and quality policy.
|
|
18
18
|
6. Historical notes, generated summaries, or legacy docs only when confirmed by current repository evidence.
|
|
19
19
|
|
|
20
|
-
Do not let old notes override the codebase or
|
|
20
|
+
Do not let old notes override the codebase or CodeSDD. If useful legacy material exists, repatriate the decision into CodeSDD and remove or ignore the legacy artifact.
|
|
21
21
|
|
|
22
22
|
## Model Neutrality
|
|
23
23
|
|
|
@@ -44,14 +44,14 @@ Agents must be conservative with facts.
|
|
|
44
44
|
Before edits:
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
codesdd sdd onboard system
|
|
48
|
+
codesdd sdd next
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
If `
|
|
51
|
+
If `codesdd sdd next` returns a ready or active feature id:
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
|
|
54
|
+
codesdd sdd context <FEAT-ID>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Also before edits:
|
|
@@ -65,7 +65,7 @@ Rules:
|
|
|
65
65
|
- Read nearest `AGENTS.md` and `AGENT.md` before editing.
|
|
66
66
|
- Inspect nearby files before introducing new patterns.
|
|
67
67
|
- If there is no feature id but the user explicitly asked for work outside SDD, state the exception in the final handoff.
|
|
68
|
-
- Create an
|
|
68
|
+
- Create an CodeSDD insight or feature only when durable follow-up is required.
|
|
69
69
|
- Do not create external context notes, workflow state, backlog, project memory, scratchpads, or handoff stores.
|
|
70
70
|
- Do not use BRV.
|
|
71
71
|
|
|
@@ -137,6 +137,7 @@ Current contexts include:
|
|
|
137
137
|
The canonical intelligence boundary is:
|
|
138
138
|
|
|
139
139
|
- `src/application/intelligence/conversation/`: omnichannel boundary.
|
|
140
|
+
- `src/application/intelligence/course-agents/`: course-oriented agent orchestration.
|
|
140
141
|
- `src/application/intelligence/report-chat/`: specialized capability.
|
|
141
142
|
- `src/application/intelligence/common/agent-runtime/`: generic runtime ownership.
|
|
142
143
|
- `src/domain/intelligence/`: single domain aggregate with `business-objects/`, `value-objects/`, and `types/`.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# devtrack-api Consumer Copy Sync Policy
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
This policy governs every copy of `.sdd/skills/curated/devtrack-api/` that CodeSDD materializes into a consumer repository.
|
|
6
|
+
|
|
7
|
+
It covers:
|
|
8
|
+
|
|
9
|
+
- `SKILL.md`
|
|
10
|
+
- `agents/openai.yaml`
|
|
11
|
+
- all files under `references/`, including `contract-pack.yaml`
|
|
12
|
+
|
|
13
|
+
It does not make CodeSDD the canonical backend implementation source. `devtrack-foundation-api` remains the backend architecture ground truth; CodeSDD owns the skill distribution and consumer materialization contract.
|
|
14
|
+
|
|
15
|
+
## Authority
|
|
16
|
+
|
|
17
|
+
- Canonical CodeSDD source: `.sdd/skills/curated/devtrack-api/` in this repository.
|
|
18
|
+
- Canonical catalog entry: `.sdd/state/skill-catalog.yaml` skill id `devtrack-api`.
|
|
19
|
+
- Canonical backend layout evidence: `devtrack-foundation-api/src/`, validated by `test/specs/devtrack-api-foundation-layout.test.ts`.
|
|
20
|
+
- Canonical machine-readable skill policy: `.sdd/skills/curated/devtrack-api/references/contract-pack.yaml`.
|
|
21
|
+
- Consumer copy: `<consumer-root>/.sdd/skills/curated/devtrack-api/`.
|
|
22
|
+
|
|
23
|
+
Consumer copies are one-way materializations from CodeSDD. They are not a second source of truth and must not be used as an upstream patch queue.
|
|
24
|
+
|
|
25
|
+
## Required Sync Events
|
|
26
|
+
|
|
27
|
+
Synchronize and verify the consumer copy:
|
|
28
|
+
|
|
29
|
+
1. after upgrading the CodeSDD version, commit, or distribution bundle used by the consumer project;
|
|
30
|
+
2. before executing a consumer FEAT that explicitly uses or is routed to `devtrack-api`;
|
|
31
|
+
3. after a Foundation layout change that affects domain, application, infrastructure, presentation, testing, or governance guidance;
|
|
32
|
+
4. after any temporary local hotfix to a consumer copy, once the canonical CodeSDD correction exists.
|
|
33
|
+
|
|
34
|
+
## Sync Procedure
|
|
35
|
+
|
|
36
|
+
1. In the CodeSDD repository, validate the canonical skill before distribution:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm exec vitest run test/specs/devtrack-api-foundation-layout.test.ts test/core/sdd/skill-distribution.test.ts
|
|
40
|
+
pnpm run build
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
2. In the consumer repository, refresh CodeSDD materialization with the configured project update flow:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
codesdd update
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
For a new consumer project, run the bootstrap/init flow used by that project before comparing the generated skill copy.
|
|
50
|
+
|
|
51
|
+
3. Compare the canonical source and the consumer copy:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
diff -ru <codesdd-root>/.sdd/skills/curated/devtrack-api <consumer-root>/.sdd/skills/curated/devtrack-api
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Expected result: no diff when the consumer is on the same CodeSDD commit or release. A pinned older consumer may differ only when the handoff records the pin and the reason.
|
|
58
|
+
|
|
59
|
+
4. Record evidence in the consumer FEAT quality or handoff:
|
|
60
|
+
|
|
61
|
+
- CodeSDD commit or release tag used as the source.
|
|
62
|
+
- Foundation checkout path, commit, or release used for validation when available.
|
|
63
|
+
- update/bootstrap command used in the consumer repository.
|
|
64
|
+
- diff command and result.
|
|
65
|
+
- any intentional pin, exception, or follow-up SDD reference.
|
|
66
|
+
|
|
67
|
+
## Local Edit Rule
|
|
68
|
+
|
|
69
|
+
Do not make durable edits directly in a consumer copy of `devtrack-api`.
|
|
70
|
+
|
|
71
|
+
If a consumer copy needs an urgent local correction:
|
|
72
|
+
|
|
73
|
+
1. mark it as temporary in the consumer handoff;
|
|
74
|
+
2. open or link a CodeSDD INS/DEB/FEAT for the canonical correction;
|
|
75
|
+
3. replace the local edit with a normal CodeSDD materialization after the canonical correction is released;
|
|
76
|
+
4. keep the consumer FEAT blocked or excepted if the local edit changes architecture, security, persistence, or validation rules.
|
|
77
|
+
|
|
78
|
+
## Conflict Handling
|
|
79
|
+
|
|
80
|
+
- If Foundation changed and CodeSDD did not, update the CodeSDD skill and conformance test first.
|
|
81
|
+
- If a consumer copy changed and CodeSDD did not, repatriate the useful change through CodeSDD discovery before accepting it anywhere else.
|
|
82
|
+
- If the diff is not empty and there is no documented version pin, treat the consumer copy as stale.
|
|
83
|
+
- If a generated consumer copy is stale, do not "fix" only the generated copy. Refresh from CodeSDD or create the canonical CodeSDD correction first.
|
|
84
|
+
|
|
85
|
+
## Acceptance Checklist
|
|
86
|
+
|
|
87
|
+
A consumer copy is current only when:
|
|
88
|
+
|
|
89
|
+
- `SKILL.md`, `agents/openai.yaml`, and every `references/*.md` file match the intended CodeSDD source commit or release;
|
|
90
|
+
- `references/contract-pack.yaml` matches the intended CodeSDD source commit or release;
|
|
91
|
+
- the consumer FEAT quality or handoff records source version, update command, and diff result;
|
|
92
|
+
- no durable edits exist only in the consumer copy;
|
|
93
|
+
- any Foundation-driven guidance change passed the CodeSDD Foundation-layout conformance test first.
|