@devtrack-solution/codesdd 1.2.2 → 1.2.4-rc3
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 +170 -31
- package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +8 -0
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +4 -2
- package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +10 -0
- package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +2 -2
- 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 +372 -0
- package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +13 -13
- package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +95 -0
- package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +294 -0
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +5 -5
- package/.sdd/skills/curated/devtrack-api/references/imports-lint.md +4 -0
- package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +41 -0
- package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +2 -2
- package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +7 -9
- package/LICENSE +1 -1
- package/README.md +399 -53
- package/bin/codesdd.js +3 -2
- package/dist/applications/sdd/index.d.ts +16 -0
- package/dist/applications/sdd/index.js +16 -0
- 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 +320 -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 +489 -28
- package/dist/commands/sdd/plugin.d.ts +3 -0
- package/dist/commands/sdd/plugin.js +158 -0
- package/dist/commands/sdd/shared.d.ts +1 -0
- package/dist/commands/sdd/shared.js +11 -22
- package/dist/commands/sdd/skills.js +7 -0
- package/dist/commands/sdd.js +107 -15
- 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 +19 -1
- package/dist/core/cli-command-quality.d.ts +27 -0
- package/dist/core/cli-command-quality.js +180 -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 +200 -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 +20 -1
- package/dist/core/config-schema.js +70 -2
- package/dist/core/config.d.ts +3 -3
- package/dist/core/config.js +4 -4
- package/dist/core/global-config.d.ts +57 -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/agent-runtime-contract.d.ts +204 -0
- package/dist/core/sdd/agent-runtime-contract.js +200 -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 +44 -0
- package/dist/core/sdd/check.js +62 -24
- 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 +53 -8
- package/dist/core/sdd/coordination/coordination-adapters.js +182 -16
- package/dist/core/sdd/coordination/index.d.ts +1 -0
- package/dist/core/sdd/coordination/index.js +1 -0
- package/dist/core/sdd/coordination/redis-runtime.d.ts +131 -0
- package/dist/core/sdd/coordination/redis-runtime.js +698 -0
- package/dist/core/sdd/deepagent-contracts.d.ts +370 -0
- package/dist/core/sdd/deepagent-contracts.js +235 -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 +3 -3
- package/dist/core/sdd/default-bootstrap-files.js +50 -10
- package/dist/core/sdd/default-skills.d.ts +30 -0
- package/dist/core/sdd/default-skills.js +288 -8
- package/dist/core/sdd/devtrack-api-appliance.d.ts +91 -0
- package/dist/core/sdd/devtrack-api-appliance.js +280 -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 +54 -20
- package/dist/core/sdd/domain/capability-diff.d.ts +63 -0
- package/dist/core/sdd/domain/capability-diff.js +200 -0
- package/dist/core/sdd/domain/change-safety-guardrails.d.ts +74 -0
- package/dist/core/sdd/domain/change-safety-guardrails.js +333 -0
- 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/semantic-intent-classifier.d.ts +29 -0
- package/dist/core/sdd/domain/semantic-intent-classifier.js +117 -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/foundation-artifact-map-validator.d.ts +16 -0
- package/dist/core/sdd/foundation-artifact-map-validator.js +71 -0
- package/dist/core/sdd/foundation-layer-manifest.d.ts +24 -0
- package/dist/core/sdd/foundation-layer-manifest.js +117 -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/intent-guard.d.ts +22 -0
- package/dist/core/sdd/intent-guard.js +67 -0
- package/dist/core/sdd/json-schema.js +108 -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 +507 -44
- package/dist/core/sdd/lenses.d.ts +1 -0
- package/dist/core/sdd/lenses.js +29 -1
- package/dist/core/sdd/migrate-workspace.js +95 -2
- package/dist/core/sdd/migrate.d.ts +1 -1
- package/dist/core/sdd/migrate.js +36 -2
- package/dist/core/sdd/package-security-gates.d.ts +21 -0
- package/dist/core/sdd/package-security-gates.js +119 -0
- package/dist/core/sdd/package-structure-gate.d.ts +83 -0
- package/dist/core/sdd/package-structure-gate.js +357 -0
- package/dist/core/sdd/parallel-feat-automation.d.ts +330 -0
- package/dist/core/sdd/parallel-feat-automation.js +424 -0
- package/dist/core/sdd/plugin-broker.d.ts +777 -0
- package/dist/core/sdd/plugin-broker.js +492 -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 +139 -0
- package/dist/core/sdd/plugin-cli.js +265 -0
- package/dist/core/sdd/plugin-evidence.d.ts +348 -0
- package/dist/core/sdd/plugin-evidence.js +307 -0
- package/dist/core/sdd/plugin-manifest.d.ts +232 -0
- package/dist/core/sdd/plugin-manifest.js +225 -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 +447 -0
- package/dist/core/sdd/plugin-registry.js +138 -0
- package/dist/core/sdd/plugin-sdk-contract.d.ts +363 -0
- package/dist/core/sdd/plugin-sdk-contract.js +268 -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 +620 -0
- package/dist/core/sdd/quality-validation.js +239 -0
- package/dist/core/sdd/release-readiness.d.ts +19 -0
- package/dist/core/sdd/release-readiness.js +472 -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/runtime-boundary-contract.d.ts +45 -0
- package/dist/core/sdd/runtime-boundary-contract.js +90 -0
- package/dist/core/sdd/sanitize.d.ts +30 -1
- package/dist/core/sdd/sanitize.js +23 -23
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +150 -0
- package/dist/core/sdd/sdk-agent-plugin-quality-gates.js +258 -0
- package/dist/core/sdd/services/agent-run.service.d.ts +97 -0
- package/dist/core/sdd/services/agent-run.service.js +261 -0
- package/dist/core/sdd/services/breakdown.service.js +2 -1
- package/dist/core/sdd/services/capability-diff.service.d.ts +18 -0
- package/dist/core/sdd/services/capability-diff.service.js +26 -0
- package/dist/core/sdd/services/change-safety-preflight.service.d.ts +17 -0
- package/dist/core/sdd/services/change-safety-preflight.service.js +17 -0
- package/dist/core/sdd/services/context.service.d.ts +43 -340
- package/dist/core/sdd/services/context.service.js +341 -25
- 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 +105 -0
- package/dist/core/sdd/services/finalize.service.js +499 -38
- package/dist/core/sdd/services/frontend-gap.service.js +22 -7
- package/dist/core/sdd/services/frontend-impact.service.d.ts +1 -1
- 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/semantic-intent-classifier.service.d.ts +6 -0
- package/dist/core/sdd/services/semantic-intent-classifier.service.js +7 -0
- 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 +23 -0
- package/dist/core/sdd/state.js +313 -66
- package/dist/core/sdd/store/sdd-stores.js +2 -2
- package/dist/core/sdd/structural-health.d.ts +55 -55
- package/dist/core/sdd/types.d.ts +60 -19
- package/dist/core/sdd/types.js +21 -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/views.js +17 -0
- package/dist/core/sdd/workspace-schemas.d.ts +670 -19
- package/dist/core/sdd/workspace-schemas.js +285 -5
- 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/domains/sdd/index.d.ts +6 -0
- package/dist/domains/sdd/index.js +6 -0
- package/dist/infrastructures/sdd/index.d.ts +7 -0
- package/dist/infrastructures/sdd/index.js +6 -0
- package/dist/presentations/cli/sdd/index.d.ts +3 -0
- package/dist/presentations/cli/sdd/index.js +3 -0
- package/dist/shared/sdd/index.d.ts +3 -0
- package/dist/shared/sdd/index.js +2 -0
- 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 +34 -21
- package/schemas/sdd/1-spec.schema.json +1 -1
- package/schemas/sdd/2-plan.schema.json +280 -3
- 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 +701 -5
- 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/agent-runtime-command-plan.schema.json +212 -0
- package/schemas/sdd/agent-runtime-opencode-run-evidence.schema.json +270 -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 +645 -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 +637 -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 +304 -0
- package/schemas/sdd/parallel-feat-automation-request.schema.json +109 -0
- package/schemas/sdd/parallel-feat-scheduler-request.schema.json +116 -0
- package/schemas/sdd/parallel-feat-scheduler-result.schema.json +404 -0
- package/schemas/sdd/plugin-artifact-manifest.schema.json +259 -0
- package/schemas/sdd/plugin-artifact-map.schema.json +223 -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 +678 -0
- package/schemas/sdd/plugin-language-runtime.schema.json +103 -0
- package/schemas/sdd/plugin-package-governance.schema.json +74 -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 +729 -0
- package/schemas/sdd/plugin-rollback-manifest.schema.json +87 -0
- package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +954 -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 +1337 -0
- package/schemas/sdd/quality-run.schema.json +197 -0
- package/schemas/sdd/quality-scenario.schema.json +252 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-input.schema.json +168 -0
- package/schemas/sdd/sdk-agent-plugin-quality-gate-report.schema.json +160 -0
- package/schemas/sdd/workspace-catalog.schema.json +13232 -35
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FISH_STATIC_HELPERS, FISH_DYNAMIC_HELPERS } from '../templates/fish-templates.js';
|
|
2
2
|
/**
|
|
3
|
-
* Generates Fish completion scripts for the
|
|
3
|
+
* Generates Fish completion scripts for the CodeSDD CLI.
|
|
4
4
|
* Follows Fish completion conventions using the complete command.
|
|
5
5
|
*/
|
|
6
6
|
export class FishGenerator {
|
|
@@ -16,7 +16,7 @@ export class FishGenerator {
|
|
|
16
16
|
const topLevelLines = [];
|
|
17
17
|
for (const cmd of commands) {
|
|
18
18
|
topLevelLines.push(`# ${cmd.name} command`);
|
|
19
|
-
topLevelLines.push(`complete -c
|
|
19
|
+
topLevelLines.push(`complete -c codesdd -n '__fish_codesdd_no_subcommand' -a '${cmd.name}' -d '${this.escapeDescription(cmd.description)}'`);
|
|
20
20
|
}
|
|
21
21
|
const topLevelCommands = topLevelLines.join('\n');
|
|
22
22
|
// Build command-specific completions using push() for loop clarity
|
|
@@ -31,7 +31,7 @@ export class FishGenerator {
|
|
|
31
31
|
// Dynamic completion helpers from template
|
|
32
32
|
const dynamicHelpers = FISH_DYNAMIC_HELPERS;
|
|
33
33
|
// Assemble final script with template literal
|
|
34
|
-
return `# Fish completion script for
|
|
34
|
+
return `# Fish completion script for CodeSDD CLI
|
|
35
35
|
# Auto-generated - do not edit manually
|
|
36
36
|
|
|
37
37
|
${helperFunctions}
|
|
@@ -44,43 +44,54 @@ ${commandCompletions}`;
|
|
|
44
44
|
* Generate completions for a specific command
|
|
45
45
|
*/
|
|
46
46
|
generateCommandCompletions(cmd) {
|
|
47
|
+
return this.generateNodeCompletions(cmd, [cmd.name]);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Generate completions for a command path at any depth.
|
|
51
|
+
*/
|
|
52
|
+
generateNodeCompletions(cmd, path) {
|
|
47
53
|
const lines = [];
|
|
54
|
+
const pathCondition = this.generatePathCondition(path);
|
|
48
55
|
// If command has subcommands
|
|
49
56
|
if (cmd.subcommands && cmd.subcommands.length > 0) {
|
|
50
57
|
// Add subcommand completions
|
|
58
|
+
const childExclusion = cmd.subcommands
|
|
59
|
+
.map((subcmd) => `not __fish_codesdd_using_subcommand ${subcmd.name}`)
|
|
60
|
+
.join('; and ');
|
|
61
|
+
const subcommandCondition = `${pathCondition}; and ${childExclusion}`;
|
|
51
62
|
for (const subcmd of cmd.subcommands) {
|
|
52
|
-
lines.push(`complete -c
|
|
63
|
+
lines.push(`complete -c codesdd -n '${subcommandCondition}' -a '${subcmd.name}' -d '${this.escapeDescription(subcmd.description)}'`);
|
|
53
64
|
}
|
|
54
65
|
lines.push('');
|
|
55
66
|
// Add flags for parent command
|
|
56
67
|
for (const flag of cmd.flags) {
|
|
57
|
-
lines.push(...this.generateFlagCompletion(flag,
|
|
68
|
+
lines.push(...this.generateFlagCompletion(flag, pathCondition));
|
|
58
69
|
}
|
|
59
70
|
// Add completions for each subcommand
|
|
60
71
|
for (const subcmd of cmd.subcommands) {
|
|
61
|
-
lines.push(`# ${
|
|
62
|
-
|
|
63
|
-
lines.push(...this.generateFlagCompletion(flag, `__fish_openspec_using_subcommand ${cmd.name}; and __fish_openspec_using_subcommand ${subcmd.name}`));
|
|
64
|
-
}
|
|
65
|
-
// Add positional completions for subcommand
|
|
66
|
-
if (subcmd.acceptsPositional) {
|
|
67
|
-
lines.push(...this.generatePositionalCompletion(subcmd.positionalType, `__fish_openspec_using_subcommand ${cmd.name}; and __fish_openspec_using_subcommand ${subcmd.name}`));
|
|
68
|
-
}
|
|
72
|
+
lines.push(`# ${[...path, subcmd.name].join(' ')} completions`);
|
|
73
|
+
lines.push(...this.generateNodeCompletions(subcmd, [...path, subcmd.name]));
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
76
|
else {
|
|
72
77
|
// Command without subcommands
|
|
73
78
|
lines.push(`# ${cmd.name} flags`);
|
|
74
79
|
for (const flag of cmd.flags) {
|
|
75
|
-
lines.push(...this.generateFlagCompletion(flag,
|
|
80
|
+
lines.push(...this.generateFlagCompletion(flag, pathCondition));
|
|
76
81
|
}
|
|
77
82
|
// Add positional completions
|
|
78
83
|
if (cmd.acceptsPositional) {
|
|
79
|
-
lines.push(...this.generatePositionalCompletion(cmd.positionalType,
|
|
84
|
+
lines.push(...this.generatePositionalCompletion(cmd.positionalType, pathCondition));
|
|
80
85
|
}
|
|
81
86
|
}
|
|
82
87
|
return lines;
|
|
83
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Generate a Fish condition that checks every command segment in a path.
|
|
91
|
+
*/
|
|
92
|
+
generatePathCondition(path) {
|
|
93
|
+
return path.map((segment) => `__fish_codesdd_using_subcommand ${segment}`).join('; and ');
|
|
94
|
+
}
|
|
84
95
|
/**
|
|
85
96
|
* Generate flag completion
|
|
86
97
|
*/
|
|
@@ -92,29 +103,29 @@ ${commandCompletions}`;
|
|
|
92
103
|
// Flag with enum values
|
|
93
104
|
for (const value of flag.values) {
|
|
94
105
|
if (shortFlag) {
|
|
95
|
-
lines.push(`complete -c
|
|
106
|
+
lines.push(`complete -c codesdd -n '${condition}' -s ${flag.short} -l ${flag.name} -a '${value}' -d '${this.escapeDescription(flag.description)}'`);
|
|
96
107
|
}
|
|
97
108
|
else {
|
|
98
|
-
lines.push(`complete -c
|
|
109
|
+
lines.push(`complete -c codesdd -n '${condition}' -l ${flag.name} -a '${value}' -d '${this.escapeDescription(flag.description)}'`);
|
|
99
110
|
}
|
|
100
111
|
}
|
|
101
112
|
}
|
|
102
113
|
else if (flag.takesValue) {
|
|
103
114
|
// Flag that takes a value but no specific values defined
|
|
104
115
|
if (shortFlag) {
|
|
105
|
-
lines.push(`complete -c
|
|
116
|
+
lines.push(`complete -c codesdd -n '${condition}' -s ${flag.short} -l ${flag.name} -r -d '${this.escapeDescription(flag.description)}'`);
|
|
106
117
|
}
|
|
107
118
|
else {
|
|
108
|
-
lines.push(`complete -c
|
|
119
|
+
lines.push(`complete -c codesdd -n '${condition}' -l ${flag.name} -r -d '${this.escapeDescription(flag.description)}'`);
|
|
109
120
|
}
|
|
110
121
|
}
|
|
111
122
|
else {
|
|
112
123
|
// Boolean flag
|
|
113
124
|
if (shortFlag) {
|
|
114
|
-
lines.push(`complete -c
|
|
125
|
+
lines.push(`complete -c codesdd -n '${condition}' -s ${flag.short} -l ${flag.name} -d '${this.escapeDescription(flag.description)}'`);
|
|
115
126
|
}
|
|
116
127
|
else {
|
|
117
|
-
lines.push(`complete -c
|
|
128
|
+
lines.push(`complete -c codesdd -n '${condition}' -l ${flag.name} -d '${this.escapeDescription(flag.description)}'`);
|
|
118
129
|
}
|
|
119
130
|
}
|
|
120
131
|
return lines;
|
|
@@ -126,20 +137,23 @@ ${commandCompletions}`;
|
|
|
126
137
|
const lines = [];
|
|
127
138
|
switch (positionalType) {
|
|
128
139
|
case 'change-id':
|
|
129
|
-
lines.push(`complete -c
|
|
140
|
+
lines.push(`complete -c codesdd -n '${condition}' -a '(__fish_codesdd_changes)' -f`);
|
|
130
141
|
break;
|
|
131
142
|
case 'spec-id':
|
|
132
|
-
lines.push(`complete -c
|
|
143
|
+
lines.push(`complete -c codesdd -n '${condition}' -a '(__fish_codesdd_specs)' -f`);
|
|
133
144
|
break;
|
|
134
145
|
case 'change-or-spec-id':
|
|
135
|
-
lines.push(`complete -c
|
|
146
|
+
lines.push(`complete -c codesdd -n '${condition}' -a '(__fish_codesdd_items)' -f`);
|
|
136
147
|
break;
|
|
137
148
|
case 'shell':
|
|
138
|
-
lines.push(`complete -c
|
|
149
|
+
lines.push(`complete -c codesdd -n '${condition}' -a 'zsh bash fish powershell' -f`);
|
|
139
150
|
break;
|
|
140
151
|
case 'path':
|
|
141
152
|
// Fish automatically completes files, no need to specify
|
|
142
153
|
break;
|
|
154
|
+
case 'schema-name':
|
|
155
|
+
lines.push(`complete -c codesdd -n '${condition}' -a '(__fish_codesdd_schemas)' -f`);
|
|
156
|
+
break;
|
|
143
157
|
}
|
|
144
158
|
return lines;
|
|
145
159
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CompletionGenerator, CommandDefinition } from '../types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Generates PowerShell completion scripts for the
|
|
3
|
+
* Generates PowerShell completion scripts for the CodeSDD CLI.
|
|
4
4
|
* Uses Register-ArgumentCompleter for command completion.
|
|
5
5
|
*/
|
|
6
6
|
export declare class PowerShellGenerator implements CompletionGenerator {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { POWERSHELL_DYNAMIC_HELPERS } from '../templates/powershell-templates.js';
|
|
2
2
|
/**
|
|
3
|
-
* Generates PowerShell completion scripts for the
|
|
3
|
+
* Generates PowerShell completion scripts for the CodeSDD CLI.
|
|
4
4
|
* Uses Register-ArgumentCompleter for command completion.
|
|
5
5
|
*/
|
|
6
6
|
export class PowerShellGenerator {
|
|
@@ -35,11 +35,11 @@ export class PowerShellGenerator {
|
|
|
35
35
|
// Dynamic completion helpers from template
|
|
36
36
|
const helpers = POWERSHELL_DYNAMIC_HELPERS;
|
|
37
37
|
// Assemble final script with template literal
|
|
38
|
-
return `# PowerShell completion script for
|
|
38
|
+
return `# PowerShell completion script for CodeSDD CLI
|
|
39
39
|
# Auto-generated - do not edit manually
|
|
40
40
|
|
|
41
41
|
${helpers}
|
|
42
|
-
$
|
|
42
|
+
$codesddCompleter = {
|
|
43
43
|
param($wordToComplete, $commandAst, $cursorPosition)
|
|
44
44
|
|
|
45
45
|
$tokens = $commandAst.ToString() -split "\\s+"
|
|
@@ -63,13 +63,13 @@ ${commandCases}
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
Register-ArgumentCompleter -CommandName
|
|
66
|
+
Register-ArgumentCompleter -CommandName codesdd -ScriptBlock $codesddCompleter
|
|
67
67
|
`;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Generate completion case for a command
|
|
71
71
|
*/
|
|
72
|
-
generateCommandCase(cmd, indent) {
|
|
72
|
+
generateCommandCase(cmd, indent, depth = 2) {
|
|
73
73
|
const lines = [];
|
|
74
74
|
if (cmd.subcommands && cmd.subcommands.length > 0) {
|
|
75
75
|
// First, check if user is typing a flag for the parent command
|
|
@@ -97,7 +97,7 @@ Register-ArgumentCompleter -CommandName opensdd -ScriptBlock $openspecCompleter
|
|
|
97
97
|
lines.push('');
|
|
98
98
|
}
|
|
99
99
|
// Handle subcommands
|
|
100
|
-
lines.push(`${indent}if ($commandCount -eq
|
|
100
|
+
lines.push(`${indent}if ($commandCount -eq ${depth} -or ($commandCount -eq ${depth + 1} -and $wordToComplete)) {`);
|
|
101
101
|
lines.push(`${indent} $subcommands = @(`);
|
|
102
102
|
for (const subcmd of cmd.subcommands) {
|
|
103
103
|
lines.push(`${indent} @{Name="${subcmd.name}"; Description="${this.escapeDescription(subcmd.description)}"},`);
|
|
@@ -110,11 +110,16 @@ Register-ArgumentCompleter -CommandName opensdd -ScriptBlock $openspecCompleter
|
|
|
110
110
|
lines.push(`${indent} return`);
|
|
111
111
|
lines.push(`${indent}}`);
|
|
112
112
|
lines.push('');
|
|
113
|
-
lines.push(`${indent}$subcommand = if ($commandCount -gt
|
|
113
|
+
lines.push(`${indent}$subcommand = if ($commandCount -gt ${depth}) { $tokens[${depth}] } else { "" }`);
|
|
114
114
|
lines.push(`${indent}switch ($subcommand) {`);
|
|
115
115
|
for (const subcmd of cmd.subcommands) {
|
|
116
116
|
lines.push(`${indent} "${subcmd.name}" {`);
|
|
117
|
-
|
|
117
|
+
if (subcmd.subcommands && subcmd.subcommands.length > 0) {
|
|
118
|
+
lines.push(...this.generateCommandCase(subcmd, indent + ' ', depth + 1));
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
lines.push(...this.generateArgumentCompletion(subcmd, indent + ' '));
|
|
122
|
+
}
|
|
118
123
|
lines.push(`${indent} }`);
|
|
119
124
|
}
|
|
120
125
|
lines.push(`${indent}}`);
|
|
@@ -167,17 +172,17 @@ Register-ArgumentCompleter -CommandName opensdd -ScriptBlock $openspecCompleter
|
|
|
167
172
|
const lines = [];
|
|
168
173
|
switch (positionalType) {
|
|
169
174
|
case 'change-id':
|
|
170
|
-
lines.push(`${indent}Get-
|
|
175
|
+
lines.push(`${indent}Get-CodeSDDChanges | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {`);
|
|
171
176
|
lines.push(`${indent} [System.Management.Automation.CompletionResult]::new($_, $_, "ParameterValue", "Change: $_")`);
|
|
172
177
|
lines.push(`${indent}}`);
|
|
173
178
|
break;
|
|
174
179
|
case 'spec-id':
|
|
175
|
-
lines.push(`${indent}Get-
|
|
180
|
+
lines.push(`${indent}Get-CodeSDDSpecs | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {`);
|
|
176
181
|
lines.push(`${indent} [System.Management.Automation.CompletionResult]::new($_, $_, "ParameterValue", "Spec: $_")`);
|
|
177
182
|
lines.push(`${indent}}`);
|
|
178
183
|
break;
|
|
179
184
|
case 'change-or-spec-id':
|
|
180
|
-
lines.push(`${indent}$items = @(Get-
|
|
185
|
+
lines.push(`${indent}$items = @(Get-CodeSDDChanges) + @(Get-CodeSDDSpecs)`);
|
|
181
186
|
lines.push(`${indent}$items | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {`);
|
|
182
187
|
lines.push(`${indent} [System.Management.Automation.CompletionResult]::new($_, $_, "ParameterValue", $_)`);
|
|
183
188
|
lines.push(`${indent}}`);
|
|
@@ -191,6 +196,11 @@ Register-ArgumentCompleter -CommandName opensdd -ScriptBlock $openspecCompleter
|
|
|
191
196
|
case 'path':
|
|
192
197
|
// PowerShell handles file path completion automatically
|
|
193
198
|
break;
|
|
199
|
+
case 'schema-name':
|
|
200
|
+
lines.push(`${indent}Get-CodeSDDSchemas | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {`);
|
|
201
|
+
lines.push(`${indent} [System.Management.Automation.CompletionResult]::new($_, $_, "ParameterValue", "Schema: $_")`);
|
|
202
|
+
lines.push(`${indent}}`);
|
|
203
|
+
break;
|
|
194
204
|
}
|
|
195
205
|
return lines;
|
|
196
206
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CompletionGenerator, CommandDefinition } from '../types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Generates Zsh completion scripts for the
|
|
4
|
-
* Follows Zsh completion system conventions using the
|
|
3
|
+
* Generates Zsh completion scripts for the CodeSDD CLI.
|
|
4
|
+
* Follows Zsh completion system conventions using the _codesdd function.
|
|
5
5
|
*/
|
|
6
6
|
export declare class ZshGenerator implements CompletionGenerator {
|
|
7
7
|
readonly shell: "zsh";
|
|
@@ -16,10 +16,6 @@ export declare class ZshGenerator implements CompletionGenerator {
|
|
|
16
16
|
* Generate completion function for a specific command
|
|
17
17
|
*/
|
|
18
18
|
private generateCommandFunction;
|
|
19
|
-
/**
|
|
20
|
-
* Generate completion function for a subcommand
|
|
21
|
-
*/
|
|
22
|
-
private generateSubcommandFunction;
|
|
23
19
|
/**
|
|
24
20
|
* Generate flag specification for _arguments
|
|
25
21
|
*/
|
|
@@ -40,5 +36,6 @@ export declare class ZshGenerator implements CompletionGenerator {
|
|
|
40
36
|
* Sanitize command names for use in function names
|
|
41
37
|
*/
|
|
42
38
|
private sanitizeFunctionName;
|
|
39
|
+
private functionNameForPath;
|
|
43
40
|
}
|
|
44
41
|
//# sourceMappingURL=zsh-generator.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ZSH_DYNAMIC_HELPERS } from '../templates/zsh-templates.js';
|
|
2
2
|
/**
|
|
3
|
-
* Generates Zsh completion scripts for the
|
|
4
|
-
* Follows Zsh completion system conventions using the
|
|
3
|
+
* Generates Zsh completion scripts for the CodeSDD CLI.
|
|
4
|
+
* Follows Zsh completion system conventions using the _codesdd function.
|
|
5
5
|
*/
|
|
6
6
|
export class ZshGenerator {
|
|
7
7
|
shell = 'zsh';
|
|
@@ -23,26 +23,26 @@ export class ZshGenerator {
|
|
|
23
23
|
const commandCaseLines = [];
|
|
24
24
|
for (const cmd of commands) {
|
|
25
25
|
commandCaseLines.push(` ${cmd.name})`);
|
|
26
|
-
commandCaseLines.push(`
|
|
26
|
+
commandCaseLines.push(` _codesdd_${this.sanitizeFunctionName(cmd.name)}`);
|
|
27
27
|
commandCaseLines.push(' ;;');
|
|
28
28
|
}
|
|
29
29
|
const commandCases = commandCaseLines.join('\n');
|
|
30
30
|
// Build command functions using push() for loop clarity
|
|
31
31
|
const commandFunctionLines = [];
|
|
32
32
|
for (const cmd of commands) {
|
|
33
|
-
commandFunctionLines.push(...this.generateCommandFunction(cmd));
|
|
33
|
+
commandFunctionLines.push(...this.generateCommandFunction(cmd, [cmd.name]));
|
|
34
34
|
commandFunctionLines.push('');
|
|
35
35
|
}
|
|
36
36
|
const commandFunctions = commandFunctionLines.join('\n');
|
|
37
37
|
// Dynamic completion helpers from template
|
|
38
38
|
const helpers = ZSH_DYNAMIC_HELPERS;
|
|
39
39
|
// Assemble final script with template literal
|
|
40
|
-
return `#compdef
|
|
40
|
+
return `#compdef codesdd
|
|
41
41
|
|
|
42
|
-
# Zsh completion script for
|
|
42
|
+
# Zsh completion script for CodeSDD CLI
|
|
43
43
|
# Auto-generated - do not edit manually
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
_codesdd() {
|
|
46
46
|
local context state line
|
|
47
47
|
typeset -A opt_args
|
|
48
48
|
|
|
@@ -57,7 +57,7 @@ ${commandList}
|
|
|
57
57
|
|
|
58
58
|
case $state in
|
|
59
59
|
command)
|
|
60
|
-
_describe "
|
|
60
|
+
_describe "codesdd command" commands
|
|
61
61
|
;;
|
|
62
62
|
args)
|
|
63
63
|
case $words[1] in
|
|
@@ -69,14 +69,14 @@ ${commandCases}
|
|
|
69
69
|
|
|
70
70
|
${commandFunctions}
|
|
71
71
|
${helpers}
|
|
72
|
-
compdef
|
|
72
|
+
compdef _codesdd codesdd
|
|
73
73
|
`;
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* Generate completion function for a specific command
|
|
77
77
|
*/
|
|
78
|
-
generateCommandFunction(cmd) {
|
|
79
|
-
const funcName =
|
|
78
|
+
generateCommandFunction(cmd, path) {
|
|
79
|
+
const funcName = this.functionNameForPath(path);
|
|
80
80
|
const lines = [];
|
|
81
81
|
lines.push(`${funcName}() {`);
|
|
82
82
|
// If command has subcommands, handle them
|
|
@@ -108,7 +108,7 @@ compdef _openspec opensdd
|
|
|
108
108
|
lines.push(' case $words[1] in');
|
|
109
109
|
for (const subcmd of cmd.subcommands) {
|
|
110
110
|
lines.push(` ${subcmd.name})`);
|
|
111
|
-
lines.push(`
|
|
111
|
+
lines.push(` ${this.functionNameForPath([...path, subcmd.name])}`);
|
|
112
112
|
lines.push(' ;;');
|
|
113
113
|
}
|
|
114
114
|
lines.push(' esac');
|
|
@@ -139,37 +139,11 @@ compdef _openspec opensdd
|
|
|
139
139
|
if (cmd.subcommands) {
|
|
140
140
|
for (const subcmd of cmd.subcommands) {
|
|
141
141
|
lines.push('');
|
|
142
|
-
lines.push(...this.
|
|
142
|
+
lines.push(...this.generateCommandFunction(subcmd, [...path, subcmd.name]));
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
return lines;
|
|
146
146
|
}
|
|
147
|
-
/**
|
|
148
|
-
* Generate completion function for a subcommand
|
|
149
|
-
*/
|
|
150
|
-
generateSubcommandFunction(parentName, subcmd) {
|
|
151
|
-
const funcName = `_openspec_${this.sanitizeFunctionName(parentName)}_${this.sanitizeFunctionName(subcmd.name)}`;
|
|
152
|
-
const lines = [];
|
|
153
|
-
lines.push(`${funcName}() {`);
|
|
154
|
-
lines.push(' _arguments \\');
|
|
155
|
-
// Add flags
|
|
156
|
-
for (const flag of subcmd.flags) {
|
|
157
|
-
lines.push(' ' + this.generateFlagSpec(flag) + ' \\');
|
|
158
|
-
}
|
|
159
|
-
// Add positional argument completion
|
|
160
|
-
if (subcmd.acceptsPositional) {
|
|
161
|
-
const positionalSpec = this.generatePositionalSpec(subcmd.positionalType);
|
|
162
|
-
lines.push(' ' + positionalSpec);
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
// Remove trailing backslash from last flag
|
|
166
|
-
if (lines[lines.length - 1].endsWith(' \\')) {
|
|
167
|
-
lines[lines.length - 1] = lines[lines.length - 1].slice(0, -2);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
lines.push('}');
|
|
171
|
-
return lines;
|
|
172
|
-
}
|
|
173
147
|
/**
|
|
174
148
|
* Generate flag specification for _arguments
|
|
175
149
|
*/
|
|
@@ -207,15 +181,17 @@ compdef _openspec opensdd
|
|
|
207
181
|
generatePositionalSpec(positionalType) {
|
|
208
182
|
switch (positionalType) {
|
|
209
183
|
case 'change-id':
|
|
210
|
-
return "'*: :
|
|
184
|
+
return "'*: :_codesdd_complete_changes'";
|
|
211
185
|
case 'spec-id':
|
|
212
|
-
return "'*: :
|
|
186
|
+
return "'*: :_codesdd_complete_specs'";
|
|
213
187
|
case 'change-or-spec-id':
|
|
214
|
-
return "'*: :
|
|
188
|
+
return "'*: :_codesdd_complete_items'";
|
|
215
189
|
case 'path':
|
|
216
190
|
return "'*:path:_files'";
|
|
217
191
|
case 'shell':
|
|
218
192
|
return "'*:shell:(zsh bash fish powershell)'";
|
|
193
|
+
case 'schema-name':
|
|
194
|
+
return "'*: :_codesdd_complete_schemas'";
|
|
219
195
|
default:
|
|
220
196
|
return "'*: :_default'";
|
|
221
197
|
}
|
|
@@ -246,5 +222,8 @@ compdef _openspec opensdd
|
|
|
246
222
|
sanitizeFunctionName(name) {
|
|
247
223
|
return name.replace(/-/g, '_');
|
|
248
224
|
}
|
|
225
|
+
functionNameForPath(path) {
|
|
226
|
+
return `_codesdd_${path.map((segment) => this.sanitizeFunctionName(segment)).join('_')}`;
|
|
227
|
+
}
|
|
249
228
|
}
|
|
250
229
|
//# sourceMappingURL=zsh-generator.js.map
|
|
@@ -12,8 +12,8 @@ export class BashInstaller {
|
|
|
12
12
|
* Markers for .bashrc configuration management
|
|
13
13
|
*/
|
|
14
14
|
BASHRC_MARKERS = {
|
|
15
|
-
start: '#
|
|
16
|
-
end: '#
|
|
15
|
+
start: '# CODESDD:START',
|
|
16
|
+
end: '# CODESDD:END',
|
|
17
17
|
};
|
|
18
18
|
constructor(homeDir = os.homedir()) {
|
|
19
19
|
this.homeDir = homeDir;
|
|
@@ -53,7 +53,7 @@ export class BashInstaller {
|
|
|
53
53
|
// Try user-local bash-completion directory first
|
|
54
54
|
const localCompletionDir = path.join(this.homeDir, '.local', 'share', 'bash-completion', 'completions');
|
|
55
55
|
// For user installation, use local directory
|
|
56
|
-
return path.join(localCompletionDir, '
|
|
56
|
+
return path.join(localCompletionDir, 'codesdd');
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
59
|
* Backup an existing completion file if it exists
|
|
@@ -91,7 +91,7 @@ export class BashInstaller {
|
|
|
91
91
|
*/
|
|
92
92
|
generateBashrcConfig(completionsDir) {
|
|
93
93
|
return [
|
|
94
|
-
'#
|
|
94
|
+
'# CodeSDD shell completions configuration',
|
|
95
95
|
`if [ -d "${completionsDir}" ]; then`,
|
|
96
96
|
` for f in "${completionsDir}"/*; do`,
|
|
97
97
|
' [ -f "$f" ] && . "$f"',
|
|
@@ -107,7 +107,7 @@ export class BashInstaller {
|
|
|
107
107
|
*/
|
|
108
108
|
async configureBashrc(completionsDir) {
|
|
109
109
|
// Check if auto-configuration is disabled
|
|
110
|
-
if (process.env.
|
|
110
|
+
if (process.env.CODESDD_NO_AUTO_CONFIG === '1') {
|
|
111
111
|
return false;
|
|
112
112
|
}
|
|
113
113
|
try {
|
|
@@ -268,7 +268,7 @@ export class BashInstaller {
|
|
|
268
268
|
'',
|
|
269
269
|
'To enable completions, add the following to your ~/.bashrc file:',
|
|
270
270
|
'',
|
|
271
|
-
` # Source
|
|
271
|
+
` # Source CodeSDD completions`,
|
|
272
272
|
` if [ -d "${completionsDir}" ]; then`,
|
|
273
273
|
` for f in "${completionsDir}"/*; do`,
|
|
274
274
|
' [ -f "$f" ] && . "$f"',
|
|
@@ -16,7 +16,7 @@ export class FishInstaller {
|
|
|
16
16
|
* @returns Installation path
|
|
17
17
|
*/
|
|
18
18
|
getInstallationPath() {
|
|
19
|
-
return path.join(this.homeDir, '.config', 'fish', 'completions', '
|
|
19
|
+
return path.join(this.homeDir, '.config', 'fish', 'completions', 'codesdd.fish');
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Backup an existing completion file if it exists
|
|
@@ -11,8 +11,8 @@ export class PowerShellInstaller {
|
|
|
11
11
|
* Markers for PowerShell profile configuration management
|
|
12
12
|
*/
|
|
13
13
|
PROFILE_MARKERS = {
|
|
14
|
-
start: '#
|
|
15
|
-
end: '#
|
|
14
|
+
start: '# CODESDD:START',
|
|
15
|
+
end: '# CODESDD:END',
|
|
16
16
|
};
|
|
17
17
|
constructor(homeDir = os.homedir()) {
|
|
18
18
|
this.homeDir = homeDir;
|
|
@@ -69,7 +69,7 @@ export class PowerShellInstaller {
|
|
|
69
69
|
getInstallationPath() {
|
|
70
70
|
const profilePath = this.getProfilePath();
|
|
71
71
|
const profileDir = path.dirname(profilePath);
|
|
72
|
-
return path.join(profileDir, '
|
|
72
|
+
return path.join(profileDir, 'CodeSDDCompletion.ps1');
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
75
|
* Backup an existing completion file if it exists
|
|
@@ -99,7 +99,7 @@ export class PowerShellInstaller {
|
|
|
99
99
|
*/
|
|
100
100
|
generateProfileConfig(scriptPath) {
|
|
101
101
|
return [
|
|
102
|
-
'#
|
|
102
|
+
'# CodeSDD shell completions configuration',
|
|
103
103
|
`if (Test-Path "${scriptPath}") {`,
|
|
104
104
|
` . "${scriptPath}"`,
|
|
105
105
|
'}',
|
|
@@ -131,15 +131,15 @@ export class PowerShellInstaller {
|
|
|
131
131
|
if (profileContent.includes(scriptLine)) {
|
|
132
132
|
continue; // Already configured, skip
|
|
133
133
|
}
|
|
134
|
-
// Add
|
|
135
|
-
const
|
|
134
|
+
// Add CodeSDD completion configuration with markers
|
|
135
|
+
const codesddBlock = [
|
|
136
136
|
'',
|
|
137
|
-
'#
|
|
137
|
+
'# CODESDD:START - CodeSDD completion (managed block, do not edit manually)',
|
|
138
138
|
scriptLine,
|
|
139
|
-
'#
|
|
139
|
+
'# CODESDD:END',
|
|
140
140
|
'',
|
|
141
141
|
].join('\n');
|
|
142
|
-
const newContent = profileContent +
|
|
142
|
+
const newContent = profileContent + codesddBlock;
|
|
143
143
|
await fs.writeFile(profilePath, newContent, 'utf-8');
|
|
144
144
|
anyConfigured = true;
|
|
145
145
|
}
|
|
@@ -169,12 +169,12 @@ export class PowerShellInstaller {
|
|
|
169
169
|
catch {
|
|
170
170
|
continue; // Profile doesn't exist, nothing to remove
|
|
171
171
|
}
|
|
172
|
-
// Remove
|
|
173
|
-
const startMarker = '#
|
|
174
|
-
const endMarker = '#
|
|
172
|
+
// Remove CODESDD:START -> CODESDD:END block
|
|
173
|
+
const startMarker = '# CODESDD:START';
|
|
174
|
+
const endMarker = '# CODESDD:END';
|
|
175
175
|
const startIndex = profileContent.indexOf(startMarker);
|
|
176
176
|
if (startIndex === -1) {
|
|
177
|
-
continue; // No
|
|
177
|
+
continue; // No CodeSDD block found
|
|
178
178
|
}
|
|
179
179
|
const endIndex = profileContent.indexOf(endMarker, startIndex);
|
|
180
180
|
if (endIndex === -1) {
|
|
@@ -279,7 +279,7 @@ export class PowerShellInstaller {
|
|
|
279
279
|
'',
|
|
280
280
|
`To enable completions, add the following to your PowerShell profile (${profilePath}):`,
|
|
281
281
|
'',
|
|
282
|
-
' # Source
|
|
282
|
+
' # Source CodeSDD completions',
|
|
283
283
|
` if (Test-Path "${installedPath}") {`,
|
|
284
284
|
` . "${installedPath}"`,
|
|
285
285
|
' }',
|
|
@@ -9,6 +9,7 @@ export declare class ZshInstaller {
|
|
|
9
9
|
* Markers for .zshrc configuration management
|
|
10
10
|
*/
|
|
11
11
|
private readonly ZSHRC_MARKERS;
|
|
12
|
+
private readonly ENV_SOURCE_MARKERS;
|
|
12
13
|
constructor(homeDir?: string);
|
|
13
14
|
/**
|
|
14
15
|
* Check if Oh My Zsh is installed
|
|
@@ -54,7 +55,12 @@ export declare class ZshInstaller {
|
|
|
54
55
|
*/
|
|
55
56
|
configureZshrc(completionsDir: string): Promise<boolean>;
|
|
56
57
|
/**
|
|
57
|
-
*
|
|
58
|
+
* Ensure ~/.zshrc sources ~/.codesdd/env.zsh through an idempotent marker block.
|
|
59
|
+
* This block contains only non-secret shell wiring.
|
|
60
|
+
*/
|
|
61
|
+
ensureCodesddEnvSource(envFilePath?: string): Promise<boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* Check if .zshrc has CodeSDD configuration markers
|
|
58
64
|
*
|
|
59
65
|
* @returns true if .zshrc exists and has markers
|
|
60
66
|
*/
|