@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
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
const OWNER = 'CodeSDD maintainers';
|
|
2
|
+
const REVIEW_DEADLINE = '2026-11-09';
|
|
3
|
+
export const UNIVERSAL_SPAWNED_HELP_SMOKE_REF = 'test/cli-e2e/all-commands-smoke.test.ts';
|
|
4
|
+
function withUniversalSpawnedHelpSmoke(validationRefs) {
|
|
5
|
+
return Array.from(new Set([UNIVERSAL_SPAWNED_HELP_SMOKE_REF, ...validationRefs]));
|
|
6
|
+
}
|
|
7
|
+
function entry(path, evidenceMode, rationale, validationRefs, options = {}) {
|
|
8
|
+
return {
|
|
9
|
+
path,
|
|
10
|
+
evidence_mode: evidenceMode,
|
|
11
|
+
owner: OWNER,
|
|
12
|
+
rationale,
|
|
13
|
+
validation_refs: withUniversalSpawnedHelpSmoke(validationRefs),
|
|
14
|
+
interactive: options.interactive ?? false,
|
|
15
|
+
exception: options.exception,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function entries(paths, evidenceMode, rationale, validationRefs) {
|
|
19
|
+
return paths.map((path) => entry(path, evidenceMode, rationale, validationRefs));
|
|
20
|
+
}
|
|
21
|
+
function exceptionEntry(path, reason, acceptedRisk, compensatingControl, validationRefs) {
|
|
22
|
+
return entry(path, 'exception', 'Interactive, deprecated, or local-environment-sensitive command that needs compensating contract evidence.', validationRefs, {
|
|
23
|
+
interactive: true,
|
|
24
|
+
exception: {
|
|
25
|
+
reason,
|
|
26
|
+
accepted_risk: acceptedRisk,
|
|
27
|
+
compensating_control: compensatingControl,
|
|
28
|
+
review_deadline: REVIEW_DEADLINE,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export const CLI_COMMAND_QUALITY_MATRIX = [
|
|
33
|
+
...entries([
|
|
34
|
+
'init',
|
|
35
|
+
'reload',
|
|
36
|
+
'install',
|
|
37
|
+
'validate',
|
|
38
|
+
'sdd init',
|
|
39
|
+
'sdd insight',
|
|
40
|
+
'sdd debate',
|
|
41
|
+
'sdd decide',
|
|
42
|
+
'sdd breakdown',
|
|
43
|
+
'sdd aprovar',
|
|
44
|
+
'sdd start',
|
|
45
|
+
'sdd context',
|
|
46
|
+
'sdd frontend-impact',
|
|
47
|
+
'sdd finalize',
|
|
48
|
+
'sdd init-context',
|
|
49
|
+
'sdd rebuild',
|
|
50
|
+
'sdd metrics',
|
|
51
|
+
'sdd dedup',
|
|
52
|
+
'sdd lint feature',
|
|
53
|
+
], 'spawned_e2e', 'Critical user-facing lifecycle or package-entrypoint command with spawned CLI coverage.', [
|
|
54
|
+
'test/helpers/run-cli.test.ts',
|
|
55
|
+
'test/cli-e2e/basic.test.ts',
|
|
56
|
+
'test/cli-e2e/critical-smoke.test.ts',
|
|
57
|
+
'test/e2e/full-lifecycle.test.ts',
|
|
58
|
+
]),
|
|
59
|
+
...entries([
|
|
60
|
+
'archive',
|
|
61
|
+
'change list',
|
|
62
|
+
'change show',
|
|
63
|
+
'change validate',
|
|
64
|
+
'completion generate',
|
|
65
|
+
'completion install',
|
|
66
|
+
'completion uninstall',
|
|
67
|
+
'config doctor',
|
|
68
|
+
'config get',
|
|
69
|
+
'config init',
|
|
70
|
+
'config list',
|
|
71
|
+
'config path',
|
|
72
|
+
'config reset',
|
|
73
|
+
'config set',
|
|
74
|
+
'config unset',
|
|
75
|
+
'feedback',
|
|
76
|
+
'list',
|
|
77
|
+
'new change',
|
|
78
|
+
'schema fork',
|
|
79
|
+
'schema init',
|
|
80
|
+
'schema validate',
|
|
81
|
+
'schema which',
|
|
82
|
+
'schemas',
|
|
83
|
+
'show',
|
|
84
|
+
'spec list',
|
|
85
|
+
'spec show',
|
|
86
|
+
'spec validate',
|
|
87
|
+
'status',
|
|
88
|
+
'templates',
|
|
89
|
+
'update',
|
|
90
|
+
], 'in_process', 'Command behavior is covered by focused command or core tests, with universal spawned help smoke covering the bin entrypoint.', ['test/commands', 'test/core']),
|
|
91
|
+
...entries([
|
|
92
|
+
'__complete',
|
|
93
|
+
'config profile',
|
|
94
|
+
'instructions',
|
|
95
|
+
'sdd audit',
|
|
96
|
+
'sdd check',
|
|
97
|
+
'sdd diagnose',
|
|
98
|
+
'sdd agent run',
|
|
99
|
+
'sdd fgap add',
|
|
100
|
+
'sdd fgap done',
|
|
101
|
+
'sdd fingerprint',
|
|
102
|
+
'sdd import-legacy-spec',
|
|
103
|
+
'sdd ingest-deposito',
|
|
104
|
+
'sdd mcp-call',
|
|
105
|
+
'sdd mcp-manifest',
|
|
106
|
+
'sdd migrate',
|
|
107
|
+
'sdd migrate-workspace',
|
|
108
|
+
'sdd next',
|
|
109
|
+
'sdd onboard',
|
|
110
|
+
'sdd backlog project',
|
|
111
|
+
'sdd plugin devtrack-api scaffold-dry-run',
|
|
112
|
+
'sdd plugin inspect',
|
|
113
|
+
'sdd plugin plan',
|
|
114
|
+
'sdd sanitize rollback',
|
|
115
|
+
'sdd scan-naming',
|
|
116
|
+
'sdd skills bundles',
|
|
117
|
+
'sdd skills suggest',
|
|
118
|
+
'sdd skills sync',
|
|
119
|
+
'sdd skills usar',
|
|
120
|
+
'sdd upgrade-to-codesdd',
|
|
121
|
+
], 'contract', 'Command has registration, service, or workflow contract coverage, with universal spawned help smoke covering the bin entrypoint.', ['test/commands/sdd-command.test.ts', 'test/core/sdd-operations.test.ts']),
|
|
122
|
+
exceptionEntry('experimental', 'Hidden deprecated alias retained only for backwards compatibility.', 'A packaging regression in the hidden alias may not be caught by critical-path spawned smoke tests.', 'Registration inventory keeps the alias visible, and init command coverage protects the underlying implementation.', ['src/cli/index.ts', 'test/cli-e2e/basic.test.ts']),
|
|
123
|
+
exceptionEntry('view', 'Interactive dashboard command depends on terminal UI behavior and is unsuitable for deterministic spawned CI coverage.', 'Terminal rendering regressions may require manual or future TUI-specific verification.', 'Keep command registration visible and cover the underlying view module with focused tests.', ['src/core/view.ts', 'test/core/view.test.ts']),
|
|
124
|
+
exceptionEntry('config edit', 'Launches the user editor and depends on local EDITOR behavior.', 'Editor launch behavior can vary by machine and shell configuration.', 'Config schema read/write operations are covered by non-editor config command tests.', ['test/commands/config.test.ts', 'test/core/config-schema.test.ts']),
|
|
125
|
+
];
|
|
126
|
+
export function commandQualityMatrixByPath(matrix = CLI_COMMAND_QUALITY_MATRIX) {
|
|
127
|
+
return new Map(matrix.map((item) => [item.path, item]));
|
|
128
|
+
}
|
|
129
|
+
export function validateCliCommandQualityMatrix(registeredLeafCommandPaths, matrix = CLI_COMMAND_QUALITY_MATRIX) {
|
|
130
|
+
const registered = new Set(registeredLeafCommandPaths);
|
|
131
|
+
const matrixPaths = matrix.map((item) => item.path);
|
|
132
|
+
const matrixPathSet = new Set(matrixPaths);
|
|
133
|
+
const duplicatePaths = matrixPaths
|
|
134
|
+
.filter((path, index) => matrixPaths.indexOf(path) !== index)
|
|
135
|
+
.sort();
|
|
136
|
+
const invalidEntries = matrix.flatMap((item) => {
|
|
137
|
+
const errors = [];
|
|
138
|
+
if (!item.path.trim())
|
|
139
|
+
errors.push('path is required');
|
|
140
|
+
if (!item.owner.trim())
|
|
141
|
+
errors.push('owner is required');
|
|
142
|
+
if (!item.rationale.trim())
|
|
143
|
+
errors.push('rationale is required');
|
|
144
|
+
if (item.validation_refs.length === 0)
|
|
145
|
+
errors.push('validation_refs must not be empty');
|
|
146
|
+
if (item.evidence_mode === 'exception') {
|
|
147
|
+
if (!item.exception) {
|
|
148
|
+
errors.push('exception details are required');
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
if (!item.exception.reason.trim())
|
|
152
|
+
errors.push('exception.reason is required');
|
|
153
|
+
if (!item.exception.accepted_risk.trim())
|
|
154
|
+
errors.push('exception.accepted_risk is required');
|
|
155
|
+
if (!item.exception.compensating_control.trim()) {
|
|
156
|
+
errors.push('exception.compensating_control is required');
|
|
157
|
+
}
|
|
158
|
+
if (!item.exception.review_deadline.trim())
|
|
159
|
+
errors.push('exception.review_deadline is required');
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return errors.map((error) => `${item.path}: ${error}`);
|
|
163
|
+
});
|
|
164
|
+
return {
|
|
165
|
+
missing: registeredLeafCommandPaths.filter((path) => !matrixPathSet.has(path)).sort(),
|
|
166
|
+
extra: matrixPaths.filter((path) => !registered.has(path)).sort(),
|
|
167
|
+
duplicate_paths: Array.from(new Set(duplicatePaths)),
|
|
168
|
+
invalid_entries: invalidEntries.sort(),
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=cli-command-quality.js.map
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { ToolCommandAdapter } from '../types.js';
|
|
7
7
|
/**
|
|
8
8
|
* CoStrict adapter for command generation.
|
|
9
|
-
* File path: .cospec/
|
|
9
|
+
* File path: .cospec/legacy-spec/commands/opsx-<id>.md
|
|
10
10
|
* Frontmatter: description, argument-hint
|
|
11
11
|
*/
|
|
12
12
|
export declare const costrictAdapter: ToolCommandAdapter;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
import path from 'path';
|
|
7
7
|
/**
|
|
8
8
|
* CoStrict adapter for command generation.
|
|
9
|
-
* File path: .cospec/
|
|
9
|
+
* File path: .cospec/legacy-spec/commands/opsx-<id>.md
|
|
10
10
|
* Frontmatter: description, argument-hint
|
|
11
11
|
*/
|
|
12
12
|
export const costrictAdapter = {
|
|
13
13
|
toolId: 'costrict',
|
|
14
14
|
getFilePath(commandId) {
|
|
15
|
-
return path.join('.cospec', '
|
|
15
|
+
return path.join('.cospec', 'codesdd', 'commands', `opsx-${commandId}.md`);
|
|
16
16
|
},
|
|
17
17
|
formatFile(content) {
|
|
18
18
|
return `---
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
export interface CommandContent {
|
|
12
12
|
/** Command identifier (e.g., 'explore', 'apply', 'new') */
|
|
13
13
|
id: string;
|
|
14
|
-
/** Human-readable name (e.g., '
|
|
14
|
+
/** Human-readable name (e.g., 'CodeSDD Explore') */
|
|
15
15
|
name: string;
|
|
16
16
|
/** Brief description of command purpose */
|
|
17
17
|
description: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommandDefinition } from './types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Registry of all
|
|
3
|
+
* Registry of all visible CodeSDD CLI commands with their flags and metadata.
|
|
4
4
|
* This registry is used to generate shell completion scripts.
|
|
5
5
|
*/
|
|
6
6
|
export declare const COMMAND_REGISTRY: CommandDefinition[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CLI_COMMAND_MATRIX } from '../cli/command-matrix.js';
|
|
1
2
|
/**
|
|
2
3
|
* Common flags used across multiple commands
|
|
3
4
|
*/
|
|
@@ -26,13 +27,13 @@ const COMMON_FLAGS = {
|
|
|
26
27
|
},
|
|
27
28
|
};
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
30
|
+
* Curated command metadata overrides for commands that need richer flag or
|
|
31
|
+
* positional completion than the command matrix can provide by itself.
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
|
+
const COMMAND_METADATA_OVERRIDES = [
|
|
33
34
|
{
|
|
34
35
|
name: 'init',
|
|
35
|
-
description: 'Initialize
|
|
36
|
+
description: 'Initialize CodeSDD in your project',
|
|
36
37
|
acceptsPositional: true,
|
|
37
38
|
positionalType: 'path',
|
|
38
39
|
flags: [
|
|
@@ -43,12 +44,60 @@ export const COMMAND_REGISTRY = [
|
|
|
43
44
|
},
|
|
44
45
|
],
|
|
45
46
|
},
|
|
47
|
+
{
|
|
48
|
+
name: 'reload',
|
|
49
|
+
description: 'Reload CodeSDD project files using the installed CLI version',
|
|
50
|
+
acceptsPositional: true,
|
|
51
|
+
positionalType: 'path',
|
|
52
|
+
flags: [
|
|
53
|
+
{
|
|
54
|
+
name: 'tools',
|
|
55
|
+
description: 'Configure AI tools non-interactively (e.g., "all", "none", or comma-separated tool IDs)',
|
|
56
|
+
takesValue: true,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'force',
|
|
60
|
+
description: 'Auto-cleanup legacy files without prompting',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'profile',
|
|
64
|
+
description: 'Override global config profile (core or custom)',
|
|
65
|
+
takesValue: true,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'lang',
|
|
69
|
+
description: 'SDD language: pt-BR|en-US',
|
|
70
|
+
takesValue: true,
|
|
71
|
+
values: ['pt-BR', 'en-US'],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'layout',
|
|
75
|
+
description: 'SDD folder layout: en-US|legacy|pt-BR',
|
|
76
|
+
takesValue: true,
|
|
77
|
+
values: ['en-US', 'legacy', 'pt-BR'],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'no-frontend',
|
|
81
|
+
description: 'Disable frontend module in the SDD bootstrap',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'no-render',
|
|
85
|
+
description: 'Do not render Markdown views after reload',
|
|
86
|
+
},
|
|
87
|
+
COMMON_FLAGS.json,
|
|
88
|
+
],
|
|
89
|
+
},
|
|
46
90
|
{
|
|
47
91
|
name: 'update',
|
|
48
|
-
description: 'Update
|
|
92
|
+
description: 'Update CodeSDD instruction files',
|
|
49
93
|
acceptsPositional: true,
|
|
50
94
|
positionalType: 'path',
|
|
51
|
-
flags: [
|
|
95
|
+
flags: [
|
|
96
|
+
{
|
|
97
|
+
name: 'force',
|
|
98
|
+
description: 'Force update even when tools are up to date',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
52
101
|
},
|
|
53
102
|
{
|
|
54
103
|
name: 'list',
|
|
@@ -62,6 +111,13 @@ export const COMMAND_REGISTRY = [
|
|
|
62
111
|
name: 'changes',
|
|
63
112
|
description: 'List changes explicitly (default)',
|
|
64
113
|
},
|
|
114
|
+
{
|
|
115
|
+
name: 'sort',
|
|
116
|
+
description: 'Sort order: recent (default) or name',
|
|
117
|
+
takesValue: true,
|
|
118
|
+
values: ['recent', 'name'],
|
|
119
|
+
},
|
|
120
|
+
COMMON_FLAGS.json,
|
|
65
121
|
],
|
|
66
122
|
},
|
|
67
123
|
{
|
|
@@ -92,7 +148,7 @@ export const COMMAND_REGISTRY = [
|
|
|
92
148
|
COMMON_FLAGS.jsonValidation,
|
|
93
149
|
{
|
|
94
150
|
name: 'concurrency',
|
|
95
|
-
description: 'Max concurrent validations (defaults to env
|
|
151
|
+
description: 'Max concurrent validations (defaults to env CODESDD_CONCURRENCY or 6)',
|
|
96
152
|
takesValue: true,
|
|
97
153
|
},
|
|
98
154
|
COMMON_FLAGS.noInteractive,
|
|
@@ -154,7 +210,7 @@ export const COMMAND_REGISTRY = [
|
|
|
154
210
|
},
|
|
155
211
|
{
|
|
156
212
|
name: 'feedback',
|
|
157
|
-
description: 'Submit feedback about
|
|
213
|
+
description: 'Submit feedback about CodeSDD',
|
|
158
214
|
acceptsPositional: true,
|
|
159
215
|
flags: [
|
|
160
216
|
{
|
|
@@ -166,7 +222,7 @@ export const COMMAND_REGISTRY = [
|
|
|
166
222
|
},
|
|
167
223
|
{
|
|
168
224
|
name: 'change',
|
|
169
|
-
description: 'Manage
|
|
225
|
+
description: 'Manage legacy change proposals (deprecated)',
|
|
170
226
|
flags: [],
|
|
171
227
|
subcommands: [
|
|
172
228
|
{
|
|
@@ -213,7 +269,7 @@ export const COMMAND_REGISTRY = [
|
|
|
213
269
|
},
|
|
214
270
|
{
|
|
215
271
|
name: 'spec',
|
|
216
|
-
description: 'Manage
|
|
272
|
+
description: 'Manage specifications',
|
|
217
273
|
flags: [],
|
|
218
274
|
subcommands: [
|
|
219
275
|
{
|
|
@@ -266,7 +322,7 @@ export const COMMAND_REGISTRY = [
|
|
|
266
322
|
},
|
|
267
323
|
{
|
|
268
324
|
name: 'completion',
|
|
269
|
-
description: 'Manage shell completions for
|
|
325
|
+
description: 'Manage shell completions for CodeSDD CLI',
|
|
270
326
|
flags: [],
|
|
271
327
|
subcommands: [
|
|
272
328
|
{
|
|
@@ -305,7 +361,7 @@ export const COMMAND_REGISTRY = [
|
|
|
305
361
|
},
|
|
306
362
|
{
|
|
307
363
|
name: 'config',
|
|
308
|
-
description: 'View and modify global
|
|
364
|
+
description: 'View and modify global CodeSDD configuration',
|
|
309
365
|
flags: [
|
|
310
366
|
{
|
|
311
367
|
name: 'scope',
|
|
@@ -320,6 +376,20 @@ export const COMMAND_REGISTRY = [
|
|
|
320
376
|
description: 'Show config file location',
|
|
321
377
|
flags: [],
|
|
322
378
|
},
|
|
379
|
+
{
|
|
380
|
+
name: 'init',
|
|
381
|
+
description: 'Initialize ~/.codesdd runtime files and idempotent shell integration',
|
|
382
|
+
flags: [
|
|
383
|
+
COMMON_FLAGS.json,
|
|
384
|
+
],
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: 'doctor',
|
|
388
|
+
description: 'Run operational readiness checks for DeepAgents/Azure, cache, and Redis boundary',
|
|
389
|
+
flags: [
|
|
390
|
+
COMMON_FLAGS.json,
|
|
391
|
+
],
|
|
392
|
+
},
|
|
323
393
|
{
|
|
324
394
|
name: 'list',
|
|
325
395
|
description: 'Show all current settings',
|
|
@@ -458,4 +528,77 @@ export const COMMAND_REGISTRY = [
|
|
|
458
528
|
],
|
|
459
529
|
},
|
|
460
530
|
];
|
|
531
|
+
const HIDDEN_OR_INTERNAL_COMMAND_PATHS = new Set([
|
|
532
|
+
'experimental',
|
|
533
|
+
'__complete',
|
|
534
|
+
]);
|
|
535
|
+
function cloneCommandDefinition(command) {
|
|
536
|
+
return {
|
|
537
|
+
...command,
|
|
538
|
+
flags: command.flags.map((flag) => ({ ...flag, values: flag.values ? [...flag.values] : undefined })),
|
|
539
|
+
subcommands: command.subcommands?.map(cloneCommandDefinition),
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
function collectLeafCommandPaths(commands, prefix = []) {
|
|
543
|
+
const paths = new Set();
|
|
544
|
+
for (const command of commands) {
|
|
545
|
+
const nextPrefix = [...prefix, command.name];
|
|
546
|
+
if (command.subcommands && command.subcommands.length > 0) {
|
|
547
|
+
for (const childPath of collectLeafCommandPaths(command.subcommands, nextPrefix)) {
|
|
548
|
+
paths.add(childPath);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
else {
|
|
552
|
+
paths.add(nextPrefix.join(':'));
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
return paths;
|
|
556
|
+
}
|
|
557
|
+
function findOrCreateCommand(commands, name, description) {
|
|
558
|
+
const existing = commands.find((command) => command.name === name);
|
|
559
|
+
if (existing) {
|
|
560
|
+
return existing;
|
|
561
|
+
}
|
|
562
|
+
const created = {
|
|
563
|
+
name,
|
|
564
|
+
description,
|
|
565
|
+
flags: [],
|
|
566
|
+
};
|
|
567
|
+
commands.push(created);
|
|
568
|
+
return created;
|
|
569
|
+
}
|
|
570
|
+
function humanizeCommandPath(commandPath) {
|
|
571
|
+
return `Run ${commandPath.split(':').join(' ')} command`;
|
|
572
|
+
}
|
|
573
|
+
function addCommandPath(commands, commandPath) {
|
|
574
|
+
const segments = commandPath.split(':');
|
|
575
|
+
let currentCommands = commands;
|
|
576
|
+
segments.forEach((segment, index) => {
|
|
577
|
+
const isLeaf = index === segments.length - 1;
|
|
578
|
+
const definition = findOrCreateCommand(currentCommands, segment, isLeaf ? humanizeCommandPath(commandPath) : `Manage ${segments.slice(0, index + 1).join(' ')} commands`);
|
|
579
|
+
if (!isLeaf) {
|
|
580
|
+
definition.subcommands ??= [];
|
|
581
|
+
currentCommands = definition.subcommands;
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
function buildCompleteCommandRegistry(baseRegistry) {
|
|
586
|
+
const registry = baseRegistry.map(cloneCommandDefinition);
|
|
587
|
+
const existingLeafPaths = collectLeafCommandPaths(registry);
|
|
588
|
+
for (const entry of CLI_COMMAND_MATRIX) {
|
|
589
|
+
if (HIDDEN_OR_INTERNAL_COMMAND_PATHS.has(entry.commandPath)) {
|
|
590
|
+
continue;
|
|
591
|
+
}
|
|
592
|
+
if (!existingLeafPaths.has(entry.commandPath)) {
|
|
593
|
+
addCommandPath(registry, entry.commandPath);
|
|
594
|
+
existingLeafPaths.add(entry.commandPath);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return registry;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Registry of all visible CodeSDD CLI commands with their flags and metadata.
|
|
601
|
+
* This registry is used to generate shell completion scripts.
|
|
602
|
+
*/
|
|
603
|
+
export const COMMAND_REGISTRY = buildCompleteCommandRegistry(COMMAND_METADATA_OVERRIDES);
|
|
461
604
|
//# sourceMappingURL=command-registry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provides dynamic completion suggestions for
|
|
2
|
+
* Provides dynamic completion suggestions for CodeSDD items (changes and specs).
|
|
3
3
|
* Implements a 2-second cache to avoid excessive file system operations during
|
|
4
4
|
* tab completion.
|
|
5
5
|
*/
|
|
@@ -7,8 +7,10 @@ export declare class CompletionProvider {
|
|
|
7
7
|
private readonly cacheTTLMs;
|
|
8
8
|
private readonly projectRoot;
|
|
9
9
|
private readonly cacheTTL;
|
|
10
|
+
private readonly projectFingerprint;
|
|
10
11
|
private changeCache;
|
|
11
12
|
private specCache;
|
|
13
|
+
private schemaCache;
|
|
12
14
|
/**
|
|
13
15
|
* Creates a new completion provider
|
|
14
16
|
*
|
|
@@ -37,6 +39,12 @@ export declare class CompletionProvider {
|
|
|
37
39
|
changeIds: string[];
|
|
38
40
|
specIds: string[];
|
|
39
41
|
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Get all workflow schema names for completion
|
|
44
|
+
*
|
|
45
|
+
* @returns Array of schema names
|
|
46
|
+
*/
|
|
47
|
+
getSchemaNames(): Promise<string[]>;
|
|
40
48
|
/**
|
|
41
49
|
* Clear all cached data
|
|
42
50
|
*/
|
|
@@ -47,6 +55,7 @@ export declare class CompletionProvider {
|
|
|
47
55
|
* @returns Cache status information
|
|
48
56
|
*/
|
|
49
57
|
getCacheStats(): {
|
|
58
|
+
projectFingerprint: string;
|
|
50
59
|
changeCache: {
|
|
51
60
|
valid: boolean;
|
|
52
61
|
age?: number;
|
|
@@ -55,6 +64,10 @@ export declare class CompletionProvider {
|
|
|
55
64
|
valid: boolean;
|
|
56
65
|
age?: number;
|
|
57
66
|
};
|
|
67
|
+
schemaCache: {
|
|
68
|
+
valid: boolean;
|
|
69
|
+
age?: number;
|
|
70
|
+
};
|
|
58
71
|
};
|
|
59
72
|
}
|
|
60
73
|
//# sourceMappingURL=completion-provider.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getActiveChangeIds, getSpecIds } from '../../utils/item-discovery.js';
|
|
2
|
+
import { listSchemas } from '../artifact-graph/index.js';
|
|
3
|
+
import { createProjectFingerprint } from '../global-config.js';
|
|
2
4
|
/**
|
|
3
|
-
* Provides dynamic completion suggestions for
|
|
5
|
+
* Provides dynamic completion suggestions for CodeSDD items (changes and specs).
|
|
4
6
|
* Implements a 2-second cache to avoid excessive file system operations during
|
|
5
7
|
* tab completion.
|
|
6
8
|
*/
|
|
@@ -8,8 +10,10 @@ export class CompletionProvider {
|
|
|
8
10
|
cacheTTLMs;
|
|
9
11
|
projectRoot;
|
|
10
12
|
cacheTTL;
|
|
13
|
+
projectFingerprint;
|
|
11
14
|
changeCache = null;
|
|
12
15
|
specCache = null;
|
|
16
|
+
schemaCache = null;
|
|
13
17
|
/**
|
|
14
18
|
* Creates a new completion provider
|
|
15
19
|
*
|
|
@@ -20,6 +24,7 @@ export class CompletionProvider {
|
|
|
20
24
|
this.cacheTTLMs = cacheTTLMs;
|
|
21
25
|
this.projectRoot = projectRoot;
|
|
22
26
|
this.cacheTTL = cacheTTLMs;
|
|
27
|
+
this.projectFingerprint = createProjectFingerprint(projectRoot);
|
|
23
28
|
}
|
|
24
29
|
/**
|
|
25
30
|
* Get all active change IDs for completion
|
|
@@ -73,12 +78,30 @@ export class CompletionProvider {
|
|
|
73
78
|
]);
|
|
74
79
|
return { changeIds, specIds };
|
|
75
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Get all workflow schema names for completion
|
|
83
|
+
*
|
|
84
|
+
* @returns Array of schema names
|
|
85
|
+
*/
|
|
86
|
+
async getSchemaNames() {
|
|
87
|
+
const now = Date.now();
|
|
88
|
+
if (this.schemaCache && now - this.schemaCache.timestamp < this.cacheTTL) {
|
|
89
|
+
return this.schemaCache.data;
|
|
90
|
+
}
|
|
91
|
+
const schemaNames = listSchemas(this.projectRoot);
|
|
92
|
+
this.schemaCache = {
|
|
93
|
+
data: schemaNames,
|
|
94
|
+
timestamp: now,
|
|
95
|
+
};
|
|
96
|
+
return schemaNames;
|
|
97
|
+
}
|
|
76
98
|
/**
|
|
77
99
|
* Clear all cached data
|
|
78
100
|
*/
|
|
79
101
|
clearCache() {
|
|
80
102
|
this.changeCache = null;
|
|
81
103
|
this.specCache = null;
|
|
104
|
+
this.schemaCache = null;
|
|
82
105
|
}
|
|
83
106
|
/**
|
|
84
107
|
* Get cache statistics for debugging
|
|
@@ -88,6 +111,7 @@ export class CompletionProvider {
|
|
|
88
111
|
getCacheStats() {
|
|
89
112
|
const now = Date.now();
|
|
90
113
|
return {
|
|
114
|
+
projectFingerprint: this.projectFingerprint,
|
|
91
115
|
changeCache: {
|
|
92
116
|
valid: this.changeCache !== null && now - this.changeCache.timestamp < this.cacheTTL,
|
|
93
117
|
age: this.changeCache ? now - this.changeCache.timestamp : undefined,
|
|
@@ -96,6 +120,10 @@ export class CompletionProvider {
|
|
|
96
120
|
valid: this.specCache !== null && now - this.specCache.timestamp < this.cacheTTL,
|
|
97
121
|
age: this.specCache ? now - this.specCache.timestamp : undefined,
|
|
98
122
|
},
|
|
123
|
+
schemaCache: {
|
|
124
|
+
valid: this.schemaCache !== null && now - this.schemaCache.timestamp < this.cacheTTL,
|
|
125
|
+
age: this.schemaCache ? now - this.schemaCache.timestamp : undefined,
|
|
126
|
+
},
|
|
99
127
|
};
|
|
100
128
|
}
|
|
101
129
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CompletionGenerator, CommandDefinition } from '../types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Generates Bash completion scripts for the
|
|
3
|
+
* Generates Bash completion scripts for the CodeSDD CLI.
|
|
4
4
|
* Follows Bash completion conventions using complete builtin and COMPREPLY array.
|
|
5
5
|
*/
|
|
6
6
|
export declare class BashGenerator implements CompletionGenerator {
|