universal-dev-standards 4.2.0 → 5.0.0-beta.10
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/README.md +3 -3
- package/bin/uds.js +165 -5
- package/bundled/core/acceptance-test-driven-development.md +19 -721
- package/bundled/core/accessibility-standards.md +862 -0
- package/bundled/core/ai-agreement-standards.md +95 -0
- package/bundled/core/ai-friendly-architecture.md +2 -0
- package/bundled/core/ai-instruction-standards.md +2 -0
- package/bundled/core/anti-hallucination.md +90 -637
- package/bundled/core/behavior-driven-development.md +20 -735
- package/bundled/core/changelog-standards.md +4 -0
- package/bundled/core/checkin-standards.md +21 -4
- package/bundled/core/code-review-checklist.md +3 -0
- package/bundled/core/commit-message-guide.md +14 -3
- package/bundled/core/deployment-standards.md +296 -0
- package/bundled/core/developer-memory.md +568 -0
- package/bundled/core/documentation-structure.md +114 -18
- package/bundled/core/documentation-writing-standards.md +272 -2
- package/bundled/core/error-code-standards.md +3 -0
- package/bundled/core/forward-derivation-standards.md +134 -8
- package/bundled/core/git-workflow.md +72 -686
- package/bundled/core/guides/anti-hallucination-guide.md +517 -0
- package/bundled/core/guides/git-workflow-guide.md +954 -0
- package/bundled/core/guides/performance-guide.md +508 -0
- package/bundled/core/guides/refactoring-guide.md +608 -0
- package/bundled/core/guides/security-guide.md +485 -0
- package/bundled/core/logging-standards.md +337 -2
- package/bundled/core/performance-standards.md +231 -0
- package/bundled/core/project-context-memory.md +180 -0
- package/bundled/core/project-structure.md +315 -2
- package/bundled/core/refactoring-standards.md +81 -761
- package/bundled/core/requirement-engineering.md +39 -0
- package/bundled/core/reverse-engineering-standards.md +6 -4
- package/bundled/core/security-standards.md +244 -0
- package/bundled/core/spec-driven-development.md +20 -319
- package/bundled/core/test-completeness-dimensions.md +213 -11
- package/bundled/core/test-driven-development.md +22 -978
- package/bundled/core/testing-standards.md +222 -2903
- package/bundled/core/versioning.md +16 -55
- package/bundled/core/virtual-organization-standards.md +85 -0
- package/bundled/locales/README.md +4 -4
- package/bundled/locales/zh-CN/CHANGELOG.md +18 -18
- package/bundled/locales/zh-CN/CLAUDE.md +3 -3
- package/bundled/locales/zh-CN/MAINTENANCE.md +7 -7
- package/bundled/locales/zh-CN/README.md +2 -2
- package/bundled/locales/zh-CN/STANDARDS-MAPPING.md +1 -1
- package/bundled/locales/zh-CN/adoption/ADOPTION-GUIDE.md +3 -3
- package/bundled/locales/zh-CN/adoption/DAILY-WORKFLOW-GUIDE.md +66 -7
- package/bundled/locales/zh-CN/adoption/STATIC-DYNAMIC-GUIDE.md +22 -22
- package/bundled/locales/zh-CN/adoption/checklists/enterprise.md +5 -5
- package/bundled/locales/zh-CN/adoption/checklists/minimal.md +4 -4
- package/bundled/locales/zh-CN/adoption/checklists/recommended.md +5 -5
- package/bundled/locales/zh-CN/ai/MAINTENANCE.md +13 -13
- package/bundled/locales/zh-CN/core/ai-instruction-standards.md +1 -1
- package/bundled/locales/zh-CN/core/anti-hallucination.md +39 -3
- package/bundled/locales/zh-CN/core/checkin-standards.md +18 -5
- package/bundled/locales/zh-CN/core/commit-message-guide.md +1 -1
- package/bundled/locales/zh-CN/core/developer-memory.md +576 -0
- package/bundled/locales/zh-CN/core/documentation-structure.md +43 -5
- package/bundled/locales/zh-CN/core/documentation-writing-standards.md +146 -5
- package/bundled/locales/zh-CN/core/git-workflow.md +179 -4
- package/bundled/locales/zh-CN/core/logging-standards.md +177 -4
- package/bundled/locales/zh-CN/core/project-structure.md +117 -5
- package/bundled/locales/zh-CN/core/refactoring-standards.md +3 -3
- package/bundled/locales/zh-CN/core/reverse-engineering-standards.md +6 -6
- package/bundled/locales/zh-CN/core/spec-driven-development.md +516 -14
- package/bundled/locales/zh-CN/core/test-completeness-dimensions.md +155 -24
- package/bundled/locales/zh-CN/core/test-driven-development.md +71 -20
- package/bundled/locales/zh-CN/core/testing-standards.md +4 -4
- package/bundled/locales/zh-CN/core/versioning.md +1 -1
- package/bundled/locales/zh-CN/docs/AI-AGENT-ROADMAP.md +90 -51
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +184 -0
- package/bundled/locales/zh-CN/docs/CLI-FLOW.md +239 -0
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +320 -0
- package/bundled/locales/zh-CN/docs/OPERATION-WORKFLOW.md +43 -43
- package/bundled/locales/zh-CN/docs/STANDARDS-REFERENCE.md +440 -0
- package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +1 -1
- package/bundled/locales/zh-CN/docs/WINDOWS-GUIDE.md +1 -1
- package/bundled/locales/zh-CN/integrations/codex/README.md +3 -3
- package/bundled/locales/zh-CN/integrations/gemini-cli/README.md +3 -3
- package/bundled/locales/zh-CN/integrations/github-copilot/README.md +5 -5
- package/bundled/locales/zh-CN/integrations/github-copilot/copilot-instructions.md +9 -9
- package/bundled/locales/zh-CN/integrations/github-copilot/skills-mapping.md +18 -6
- package/bundled/locales/zh-CN/integrations/google-antigravity/README.md +2 -2
- package/bundled/locales/zh-CN/integrations/opencode/README.md +3 -3
- package/bundled/locales/zh-CN/integrations/opencode/skills-mapping.md +22 -10
- package/bundled/locales/zh-CN/integrations/openspec/README.md +1 -1
- package/bundled/locales/zh-CN/integrations/spec-kit/AGENTS.md +3 -3
- package/bundled/locales/zh-CN/integrations/spec-kit/README.md +1 -1
- package/bundled/locales/zh-CN/options/commit-message/bilingual.md +1 -1
- package/bundled/locales/zh-CN/options/commit-message/english.md +1 -1
- package/bundled/locales/zh-CN/options/commit-message/traditional-chinese.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/gitflow.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/github-flow.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/merge-commit.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/rebase-ff.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/squash-merge.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/trunk-based.md +1 -1
- package/bundled/locales/zh-CN/options/project-structure/dotnet.md +1 -1
- package/bundled/locales/zh-CN/options/project-structure/go.md +1 -1
- package/bundled/locales/zh-CN/options/project-structure/java.md +1 -1
- package/bundled/locales/zh-CN/options/project-structure/nodejs.md +1 -1
- package/bundled/locales/zh-CN/options/project-structure/python.md +1 -1
- package/bundled/locales/zh-CN/options/testing/e2e-testing.md +1 -1
- package/bundled/locales/zh-CN/options/testing/integration-testing.md +1 -1
- package/bundled/locales/zh-CN/options/testing/system-testing.md +1 -1
- package/bundled/locales/zh-CN/options/testing/unit-testing.md +1 -1
- package/bundled/locales/zh-CN/skills/{claude-code/CONTRIBUTING.template.md → CONTRIBUTING.template.md} +2 -2
- package/bundled/locales/zh-CN/skills/README.md +131 -81
- package/bundled/locales/zh-CN/skills/agents/README.md +281 -0
- package/bundled/locales/zh-CN/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/SKILL.md +10 -10
- package/bundled/locales/zh-CN/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/anti-hallucination.md +8 -8
- package/bundled/locales/zh-CN/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/certainty-labels.md +8 -8
- package/bundled/locales/zh-CN/skills/ai-friendly-architecture/SKILL.md +221 -0
- package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +214 -0
- package/bundled/locales/zh-CN/skills/atdd-assistant/SKILL.md +71 -0
- package/bundled/locales/zh-CN/skills/atdd-assistant/acceptance-criteria-guide.md +428 -0
- package/bundled/locales/zh-CN/skills/atdd-assistant/atdd-workflow.md +484 -0
- package/bundled/locales/zh-CN/skills/atdd-assistant/guide.md +368 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/SKILL.md +68 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/bdd-workflow.md +406 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/gherkin-guide.md +454 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/guide.md +324 -0
- package/bundled/locales/zh-CN/skills/changelog-guide/SKILL.md +64 -0
- package/bundled/locales/zh-CN/skills/{claude-code/changelog-guide/SKILL.md → changelog-guide/guide.md} +6 -7
- package/bundled/locales/zh-CN/skills/checkin-assistant/SKILL.md +56 -0
- package/bundled/locales/zh-CN/skills/{claude-code/checkin-assistant/SKILL.md → checkin-assistant/guide.md} +6 -7
- package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +56 -0
- package/bundled/locales/zh-CN/skills/{claude-code/code-review-assistant → code-review-assistant}/checkin-checklist.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/code-review-assistant/SKILL.md → code-review-assistant/guide.md} +5 -6
- package/bundled/locales/zh-CN/skills/{claude-code/code-review-assistant → code-review-assistant}/review-checklist.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/commands → commands}/bdd.md +2 -2
- package/bundled/locales/zh-CN/skills/{claude-code/commands → commands}/methodology.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/commands → commands}/refactor.md +3 -3
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +61 -0
- package/bundled/locales/zh-CN/skills/{claude-code/commit-standards → commit-standards}/conventional-commits.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/commit-standards/SKILL.md → commit-standards/guide.md} +5 -6
- package/bundled/locales/zh-CN/skills/{claude-code/commit-standards → commit-standards}/language-options.md +3 -3
- package/bundled/locales/zh-CN/skills/docs-generator/SKILL.md +59 -0
- package/bundled/locales/zh-CN/skills/docs-generator/guide.md +262 -0
- package/bundled/locales/zh-CN/skills/{claude-code/documentation-guide → documentation-guide}/SKILL.md +7 -8
- package/bundled/locales/zh-CN/skills/{claude-code/documentation-guide → documentation-guide}/documentation-structure.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/documentation-guide → documentation-guide}/readme-template.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/error-code-guide → error-code-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-CN/skills/forward-derivation/SKILL.md +62 -0
- package/bundled/locales/zh-CN/skills/forward-derivation/guide.md +130 -0
- package/bundled/locales/zh-CN/skills/{claude-code/git-workflow-guide → git-workflow-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-CN/skills/{claude-code/git-workflow-guide → git-workflow-guide}/branch-naming.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/git-workflow-guide → git-workflow-guide}/git-workflow.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/logging-guide → logging-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-CN/skills/methodology-system/SKILL.md +78 -0
- package/bundled/locales/zh-CN/skills/{claude-code/methodology-system → methodology-system}/create-methodology.md +2 -2
- package/bundled/locales/zh-CN/skills/{claude-code/methodology-system/SKILL.md → methodology-system/guide.md} +2 -2
- package/bundled/locales/zh-CN/skills/{claude-code/methodology-system → methodology-system}/runtime.md +3 -3
- package/bundled/locales/zh-CN/skills/project-discovery/SKILL.md +66 -0
- package/bundled/locales/zh-CN/skills/project-discovery/guide.md +371 -0
- package/bundled/locales/zh-CN/skills/{claude-code/project-structure-guide → project-structure-guide}/SKILL.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/project-structure-guide → project-structure-guide}/language-patterns.md +1 -1
- package/bundled/locales/zh-CN/skills/refactoring-assistant/SKILL.md +67 -0
- package/bundled/locales/zh-CN/skills/{claude-code/refactoring-assistant/SKILL.md → refactoring-assistant/guide.md} +7 -8
- package/bundled/locales/zh-CN/skills/release-standards/SKILL.md +64 -0
- package/bundled/locales/zh-CN/skills/{claude-code/release-standards → release-standards}/changelog-format.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/release-standards/SKILL.md → release-standards/guide.md} +5 -6
- package/bundled/locales/zh-CN/skills/{claude-code/release-standards → release-standards}/release-workflow.md +7 -7
- package/bundled/locales/zh-CN/skills/{claude-code/release-standards → release-standards}/semantic-versioning.md +3 -3
- package/bundled/locales/zh-CN/skills/requirement-assistant/SKILL.md +67 -0
- package/bundled/locales/zh-CN/skills/{claude-code/requirement-assistant/SKILL.md → requirement-assistant/guide.md} +4 -5
- package/bundled/locales/zh-CN/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-checklist.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-writing.md +3 -3
- package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +67 -0
- package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer → reverse-engineer}/bdd-extraction.md +2 -2
- package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer/SKILL.md → reverse-engineer/guide.md} +17 -18
- package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer → reverse-engineer}/tdd-analysis.md +2 -2
- package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer → reverse-engineer}/workflow.md +3 -3
- package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +75 -0
- package/bundled/locales/zh-CN/skills/{claude-code/spec-driven-dev/SKILL.md → spec-driven-dev/guide.md} +10 -11
- package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +66 -0
- package/bundled/locales/zh-CN/skills/{claude-code/tdd-assistant/SKILL.md → tdd-assistant/guide.md} +12 -16
- package/bundled/locales/zh-CN/skills/{claude-code/tdd-assistant → tdd-assistant}/language-examples.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/tdd-assistant → tdd-assistant}/tdd-workflow.md +3 -3
- package/bundled/locales/zh-CN/skills/test-coverage-assistant/SKILL.md +65 -0
- package/bundled/locales/zh-CN/skills/test-coverage-assistant/guide.md +284 -0
- package/bundled/locales/zh-CN/skills/{claude-code/testing-guide → testing-guide}/SKILL.md +8 -8
- package/bundled/locales/zh-CN/skills/{claude-code/testing-guide → testing-guide}/testing-pyramid.md +4 -4
- package/bundled/locales/zh-CN/skills/{cline → tools/cline}/README.md +1 -1
- package/bundled/locales/zh-CN/skills/{copilot → tools/copilot}/README.md +1 -1
- package/bundled/locales/zh-CN/skills/{copilot → tools/copilot}/copilot-instructions.md +1 -1
- package/bundled/locales/zh-CN/skills/{cursor → tools/cursor}/README.md +1 -1
- package/bundled/locales/zh-CN/skills/{windsurf → tools/windsurf}/README.md +1 -1
- package/bundled/locales/zh-TW/CHANGELOG.md +16 -16
- package/bundled/locales/zh-TW/CLAUDE.md +3 -3
- package/bundled/locales/zh-TW/MAINTENANCE.md +7 -7
- package/bundled/locales/zh-TW/README.md +13 -7
- package/bundled/locales/zh-TW/STANDARDS-MAPPING.md +1 -1
- package/bundled/locales/zh-TW/adoption/ADOPTION-GUIDE.md +4 -4
- package/bundled/locales/zh-TW/adoption/DAILY-WORKFLOW-GUIDE.md +66 -7
- package/bundled/locales/zh-TW/adoption/STATIC-DYNAMIC-GUIDE.md +22 -22
- package/bundled/locales/zh-TW/adoption/checklists/enterprise.md +5 -5
- package/bundled/locales/zh-TW/adoption/checklists/minimal.md +4 -4
- package/bundled/locales/zh-TW/adoption/checklists/recommended.md +5 -5
- package/bundled/locales/zh-TW/ai/MAINTENANCE.md +13 -13
- package/bundled/locales/zh-TW/ai/standards/anti-hallucination.ai.yaml +3 -2
- package/bundled/locales/zh-TW/ai/standards/git-workflow.ai.yaml +4 -3
- package/bundled/locales/zh-TW/ai/standards/spec-driven-development.ai.yaml +3 -3
- package/bundled/locales/zh-TW/ai/standards/testing.ai.yaml +1 -0
- package/bundled/locales/zh-TW/core/ai-instruction-standards.md +1 -1
- package/bundled/locales/zh-TW/core/anti-hallucination.md +38 -701
- package/bundled/locales/zh-TW/core/changelog-standards.md +1 -1
- package/bundled/locales/zh-TW/core/checkin-standards.md +18 -5
- package/bundled/locales/zh-TW/core/code-review-checklist.md +1 -1
- package/bundled/locales/zh-TW/core/commit-message-guide.md +1 -1
- package/bundled/locales/zh-TW/core/developer-memory.md +576 -0
- package/bundled/locales/zh-TW/core/documentation-structure.md +115 -22
- package/bundled/locales/zh-TW/core/documentation-writing-standards.md +126 -5
- package/bundled/locales/zh-TW/core/forward-derivation-standards.md +2 -2
- package/bundled/locales/zh-TW/core/git-workflow.md +38 -812
- package/bundled/locales/zh-TW/core/guides/anti-hallucination-guide.md +779 -0
- package/bundled/locales/zh-TW/core/guides/git-workflow-guide.md +1016 -0
- package/bundled/locales/zh-TW/core/guides/refactoring-guide.md +864 -0
- package/bundled/locales/zh-TW/core/guides/testing-guide.md +2280 -0
- package/bundled/locales/zh-TW/core/logging-standards.md +159 -4
- package/bundled/locales/zh-TW/core/project-structure.md +102 -9
- package/bundled/locales/zh-TW/core/refactoring-standards.md +37 -823
- package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +6 -6
- package/bundled/locales/zh-TW/core/spec-driven-development.md +17 -268
- package/bundled/locales/zh-TW/core/test-completeness-dimensions.md +128 -14
- package/bundled/locales/zh-TW/core/test-driven-development.md +20 -983
- package/bundled/locales/zh-TW/core/testing-standards.md +120 -2105
- package/bundled/locales/zh-TW/core/versioning.md +13 -55
- package/bundled/locales/zh-TW/docs/AI-AGENT-ROADMAP.md +90 -51
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +184 -0
- package/bundled/locales/zh-TW/docs/CLI-FLOW.md +239 -0
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +320 -0
- package/bundled/locales/zh-TW/docs/MIGRATION-V5.md +71 -0
- package/bundled/locales/zh-TW/docs/OPERATION-WORKFLOW.md +42 -42
- package/bundled/locales/zh-TW/docs/STANDARDS-REFERENCE.md +440 -0
- package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +1 -1
- package/bundled/locales/zh-TW/docs/WINDOWS-GUIDE.md +1 -1
- package/bundled/locales/zh-TW/integrations/claude-code/README.md +44 -0
- package/bundled/locales/zh-TW/integrations/github-copilot/copilot-instructions.md +3 -3
- package/bundled/locales/zh-TW/integrations/github-copilot/skills-mapping.md +18 -6
- package/bundled/locales/zh-TW/integrations/opencode/skills-mapping.md +22 -10
- package/bundled/locales/zh-TW/methodologies/guides/sdd-guide.md +338 -0
- package/bundled/locales/zh-TW/methodologies/guides/tdd-guide.md +1055 -0
- package/bundled/locales/zh-TW/options/commit-message/bilingual.md +1 -1
- package/bundled/locales/zh-TW/options/commit-message/english.md +1 -1
- package/bundled/locales/zh-TW/options/commit-message/traditional-chinese.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/gitflow.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/github-flow.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/merge-commit.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/rebase-ff.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/squash-merge.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/trunk-based.md +1 -1
- package/bundled/locales/zh-TW/options/project-structure/dotnet.md +1 -1
- package/bundled/locales/zh-TW/options/project-structure/go.md +1 -1
- package/bundled/locales/zh-TW/options/project-structure/java.md +1 -1
- package/bundled/locales/zh-TW/options/project-structure/nodejs.md +1 -1
- package/bundled/locales/zh-TW/options/project-structure/python.md +1 -1
- package/bundled/locales/zh-TW/options/testing/e2e-testing.md +1 -1
- package/bundled/locales/zh-TW/options/testing/integration-testing.md +1 -1
- package/bundled/locales/zh-TW/options/testing/system-testing.md +1 -1
- package/bundled/locales/zh-TW/options/testing/unit-testing.md +1 -1
- package/bundled/locales/zh-TW/skills/{claude-code/CONTRIBUTING.template.md → CONTRIBUTING.template.md} +2 -2
- package/bundled/locales/zh-TW/skills/README.md +131 -79
- package/bundled/locales/zh-TW/skills/agents/README.md +281 -0
- package/bundled/locales/zh-TW/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/SKILL.md +7 -7
- package/bundled/locales/zh-TW/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/anti-hallucination.md +8 -8
- package/bundled/locales/zh-TW/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/certainty-labels.md +8 -8
- package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +221 -0
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +214 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +71 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/acceptance-criteria-guide.md +428 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/atdd-workflow.md +484 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/guide.md +368 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +68 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/bdd-workflow.md +406 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/gherkin-guide.md +454 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/guide.md +324 -0
- package/bundled/locales/zh-TW/skills/changelog-guide/SKILL.md +64 -0
- package/bundled/locales/zh-TW/skills/{claude-code/changelog-guide/SKILL.md → changelog-guide/guide.md} +6 -7
- package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +56 -0
- package/bundled/locales/zh-TW/skills/{claude-code/checkin-assistant/SKILL.md → checkin-assistant/guide.md} +6 -7
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +56 -0
- package/bundled/locales/zh-TW/skills/{claude-code/code-review-assistant → code-review-assistant}/checkin-checklist.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/code-review-assistant/SKILL.md → code-review-assistant/guide.md} +2 -3
- package/bundled/locales/zh-TW/skills/{claude-code/code-review-assistant → code-review-assistant}/review-checklist.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/commands → commands}/bdd.md +2 -2
- package/bundled/locales/zh-TW/skills/{claude-code/commands → commands}/methodology.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/commands → commands}/refactor.md +3 -3
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +61 -0
- package/bundled/locales/zh-TW/skills/{claude-code/commit-standards → commit-standards}/conventional-commits.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/commit-standards/SKILL.md → commit-standards/guide.md} +5 -6
- package/bundled/locales/zh-TW/skills/{claude-code/commit-standards → commit-standards}/language-options.md +3 -3
- package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +59 -0
- package/bundled/locales/zh-TW/skills/docs-generator/guide.md +262 -0
- package/bundled/locales/zh-TW/skills/{claude-code/documentation-guide → documentation-guide}/SKILL.md +7 -8
- package/bundled/locales/zh-TW/skills/{claude-code/documentation-guide → documentation-guide}/documentation-structure.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/documentation-guide → documentation-guide}/readme-template.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/error-code-guide → error-code-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +62 -0
- package/bundled/locales/zh-TW/skills/{claude-code/forward-derivation/SKILL.md → forward-derivation/guide.md} +24 -19
- package/bundled/locales/zh-TW/skills/{claude-code/git-workflow-guide → git-workflow-guide}/SKILL.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/git-workflow-guide → git-workflow-guide}/branch-naming.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/git-workflow-guide → git-workflow-guide}/git-workflow.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/logging-guide → logging-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +78 -0
- package/bundled/locales/zh-TW/skills/{claude-code/methodology-system → methodology-system}/create-methodology.md +2 -2
- package/bundled/locales/zh-TW/skills/{claude-code/methodology-system/SKILL.md → methodology-system/guide.md} +2 -2
- package/bundled/locales/zh-TW/skills/{claude-code/methodology-system → methodology-system}/runtime.md +3 -3
- package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +66 -0
- package/bundled/locales/zh-TW/skills/project-discovery/guide.md +371 -0
- package/bundled/locales/zh-TW/skills/project-discovery/workflow.md +574 -0
- package/bundled/locales/zh-TW/skills/{claude-code/project-structure-guide → project-structure-guide}/SKILL.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/project-structure-guide → project-structure-guide}/language-patterns.md +1 -1
- package/bundled/locales/zh-TW/skills/refactoring-assistant/SKILL.md +67 -0
- package/bundled/locales/zh-TW/skills/{claude-code/refactoring-assistant/SKILL.md → refactoring-assistant/guide.md} +7 -8
- package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +64 -0
- package/bundled/locales/zh-TW/skills/{claude-code/release-standards → release-standards}/changelog-format.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/release-standards/SKILL.md → release-standards/guide.md} +2 -3
- package/bundled/locales/zh-TW/skills/{claude-code/release-standards → release-standards}/release-workflow.md +60 -28
- package/bundled/locales/zh-TW/skills/{claude-code/release-standards → release-standards}/semantic-versioning.md +3 -3
- package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +67 -0
- package/bundled/locales/zh-TW/skills/{claude-code/requirement-assistant/SKILL.md → requirement-assistant/guide.md} +2 -3
- package/bundled/locales/zh-TW/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-checklist.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-writing.md +3 -3
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +67 -0
- package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer → reverse-engineer}/bdd-extraction.md +2 -2
- package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer/SKILL.md → reverse-engineer/guide.md} +17 -18
- package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer → reverse-engineer}/tdd-analysis.md +2 -2
- package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer → reverse-engineer}/workflow.md +3 -3
- package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +75 -0
- package/bundled/locales/zh-TW/skills/{claude-code/spec-driven-dev/SKILL.md → spec-driven-dev/guide.md} +9 -10
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +66 -0
- package/bundled/locales/zh-TW/skills/{claude-code/tdd-assistant/SKILL.md → tdd-assistant/guide.md} +9 -10
- package/bundled/locales/zh-TW/skills/{claude-code/tdd-assistant → tdd-assistant}/language-examples.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/tdd-assistant → tdd-assistant}/tdd-workflow.md +3 -3
- package/bundled/locales/zh-TW/skills/test-coverage-assistant/SKILL.md +65 -0
- package/bundled/locales/zh-TW/skills/{claude-code/test-coverage-assistant/SKILL.md → test-coverage-assistant/guide.md} +27 -24
- package/bundled/locales/zh-TW/skills/{claude-code/testing-guide → testing-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-TW/skills/{claude-code/testing-guide → testing-guide}/testing-pyramid.md +4 -4
- package/bundled/locales/zh-TW/skills/{cline → tools/cline}/README.md +1 -1
- package/bundled/locales/zh-TW/skills/{copilot → tools/copilot}/README.md +1 -1
- package/bundled/locales/zh-TW/skills/{copilot → tools/copilot}/copilot-instructions.md +1 -1
- package/bundled/locales/zh-TW/skills/{cursor → tools/cursor}/README.md +1 -1
- package/bundled/locales/zh-TW/skills/{windsurf → tools/windsurf}/README.md +1 -1
- package/bundled/skills/INTEGRATION-GUIDE.md +210 -0
- package/bundled/skills/README.md +95 -0
- package/bundled/skills/_shared/README.md +60 -0
- package/bundled/skills/{claude-code/agents → agents}/README.md +2 -2
- package/bundled/skills/{claude-code/agents → agents}/code-architect.md +1 -1
- package/bundled/skills/{claude-code/agents → agents}/doc-writer.md +1 -1
- package/bundled/skills/{claude-code/agents → agents}/reviewer.md +1 -1
- package/bundled/skills/{claude-code/agents → agents}/spec-analyst.md +1 -1
- package/bundled/skills/{claude-code/agents → agents}/test-specialist.md +1 -1
- package/bundled/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/SKILL.md +28 -5
- package/bundled/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/anti-hallucination.md +24 -5
- package/bundled/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/certainty-labels.md +31 -6
- package/bundled/skills/ai-friendly-architecture/SKILL.md +216 -0
- package/bundled/skills/ai-instruction-standards/SKILL.md +209 -0
- package/bundled/skills/atdd-assistant/SKILL.md +74 -0
- package/bundled/skills/{claude-code/atdd-assistant → atdd-assistant}/acceptance-criteria-guide.md +1 -1
- package/bundled/skills/{claude-code/atdd-assistant → atdd-assistant}/atdd-workflow.md +1 -1
- package/bundled/skills/{claude-code/atdd-assistant/SKILL.md → atdd-assistant/guide.md} +11 -11
- package/bundled/skills/bdd-assistant/SKILL.md +70 -0
- package/bundled/skills/{claude-code/bdd-assistant → bdd-assistant}/bdd-workflow.md +1 -1
- package/bundled/skills/{claude-code/bdd-assistant → bdd-assistant}/gherkin-guide.md +1 -1
- package/bundled/skills/{claude-code/bdd-assistant/SKILL.md → bdd-assistant/guide.md} +11 -11
- package/bundled/skills/changelog-guide/SKILL.md +66 -0
- package/bundled/skills/{claude-code/changelog-guide/SKILL.md → changelog-guide/guide.md} +8 -6
- package/bundled/skills/checkin-assistant/SKILL.md +52 -0
- package/bundled/skills/{claude-code/checkin-assistant/SKILL.md → checkin-assistant/guide.md} +6 -6
- package/bundled/skills/code-review-assistant/SKILL.md +53 -0
- package/bundled/skills/{claude-code/code-review-assistant → code-review-assistant}/checkin-checklist.md +3 -3
- package/bundled/skills/{claude-code/code-review-assistant/SKILL.md → code-review-assistant/guide.md} +7 -5
- package/bundled/skills/{claude-code/code-review-assistant → code-review-assistant}/review-checklist.md +3 -3
- package/bundled/skills/commands/COMMAND-FAMILY-OVERVIEW.md +290 -0
- package/bundled/skills/{claude-code/commands → commands}/README.md +13 -3
- package/bundled/skills/{claude-code/commands → commands}/atdd.md +3 -3
- package/bundled/skills/{claude-code/commands → commands}/bdd.md +2 -2
- package/bundled/skills/commands/changelog.md +58 -0
- package/bundled/skills/{claude-code/commands → commands}/check.md +1 -1
- package/bundled/skills/commands/checkin.md +53 -0
- package/bundled/skills/{claude-code/commands → commands}/commit.md +3 -3
- package/bundled/skills/{claude-code/commands → commands}/config.md +1 -1
- package/bundled/skills/{claude-code/commands → commands}/coverage.md +5 -4
- package/bundled/skills/commands/derive-all.md +53 -0
- package/bundled/skills/commands/derive-atdd.md +49 -0
- package/bundled/skills/commands/derive-bdd.md +47 -0
- package/bundled/skills/commands/derive-tdd.md +48 -0
- package/bundled/skills/commands/derive.md +72 -0
- package/bundled/skills/commands/discover.md +80 -0
- package/bundled/skills/commands/docgen.md +61 -0
- package/bundled/skills/commands/docs.md +59 -0
- package/bundled/skills/commands/guide.md +44 -0
- package/bundled/skills/{claude-code/commands → commands}/init.md +2 -2
- package/bundled/skills/{claude-code/commands → commands}/methodology.md +32 -16
- package/bundled/skills/{claude-code/commands → commands}/refactor.md +2 -2
- package/bundled/skills/commands/release.md +56 -0
- package/bundled/skills/{claude-code/commands → commands}/requirement.md +3 -3
- package/bundled/skills/commands/reverse-bdd.md +47 -0
- package/bundled/skills/commands/reverse-sdd.md +51 -0
- package/bundled/skills/commands/reverse-tdd.md +51 -0
- package/bundled/skills/commands/reverse.md +63 -0
- package/bundled/skills/{claude-code/commands → commands}/review.md +3 -3
- package/bundled/skills/commands/sdd.md +135 -0
- package/bundled/skills/{claude-code/commands → commands}/tdd.md +3 -3
- package/bundled/skills/{claude-code/commands → commands}/update.md +2 -2
- package/bundled/skills/commit-standards/SKILL.md +60 -0
- package/bundled/skills/{claude-code/commit-standards → commit-standards}/conventional-commits.md +3 -3
- package/bundled/skills/{claude-code/commit-standards/SKILL.md → commit-standards/guide.md} +17 -5
- package/bundled/skills/{claude-code/commit-standards → commit-standards}/language-options.md +2 -2
- package/bundled/skills/docs-generator/SKILL.md +69 -0
- package/bundled/skills/docs-generator/guide.md +258 -0
- package/bundled/skills/{claude-code/documentation-guide → documentation-guide}/SKILL.md +7 -7
- package/bundled/skills/{claude-code/documentation-guide → documentation-guide}/documentation-structure.md +3 -3
- package/bundled/skills/{claude-code/documentation-guide → documentation-guide}/readme-template.md +2 -2
- package/bundled/skills/{claude-code/error-code-guide → error-code-guide}/SKILL.md +7 -5
- package/bundled/skills/forward-derivation/SKILL.md +61 -0
- package/bundled/skills/{claude-code/forward-derivation/SKILL.md → forward-derivation/guide.md} +44 -29
- package/bundled/skills/{claude-code/git-workflow-guide → git-workflow-guide}/SKILL.md +7 -5
- package/bundled/skills/{claude-code/git-workflow-guide → git-workflow-guide}/branch-naming.md +2 -2
- package/bundled/skills/{claude-code/git-workflow-guide → git-workflow-guide}/git-workflow.md +3 -3
- package/bundled/skills/{claude-code/logging-guide → logging-guide}/SKILL.md +7 -5
- package/bundled/skills/methodology-system/SKILL.md +75 -0
- package/bundled/skills/{claude-code/methodology-system → methodology-system}/create-methodology.md +1 -1
- package/bundled/skills/{claude-code/methodology-system/SKILL.md → methodology-system/guide.md} +51 -16
- package/bundled/skills/methodology-system/integrated-flow.md +454 -0
- package/bundled/skills/{claude-code/methodology-system → methodology-system}/runtime.md +2 -2
- package/bundled/skills/project-discovery/SKILL.md +63 -0
- package/bundled/skills/project-discovery/guide.md +367 -0
- package/bundled/skills/project-discovery/workflow.md +566 -0
- package/bundled/skills/{claude-code/project-structure-guide → project-structure-guide}/SKILL.md +14 -4
- package/bundled/skills/refactoring-assistant/SKILL.md +78 -0
- package/bundled/skills/{claude-code/refactoring-assistant/SKILL.md → refactoring-assistant/guide.md} +7 -7
- package/bundled/skills/release-standards/SKILL.md +61 -0
- package/bundled/skills/{claude-code/release-standards → release-standards}/changelog-format.md +2 -2
- package/bundled/skills/{claude-code/release-standards/SKILL.md → release-standards/guide.md} +7 -5
- package/bundled/skills/{claude-code/release-standards → release-standards}/release-workflow.md +59 -24
- package/bundled/skills/{claude-code/release-standards → release-standards}/semantic-versioning.md +2 -2
- package/bundled/skills/requirement-assistant/SKILL.md +66 -0
- package/bundled/skills/{claude-code/requirement-assistant/SKILL.md → requirement-assistant/guide.md} +14 -6
- package/bundled/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-checklist.md +2 -2
- package/bundled/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-writing.md +2 -2
- package/bundled/skills/reverse-engineer/SKILL.md +64 -0
- package/bundled/skills/{claude-code/reverse-engineer → reverse-engineer}/bdd-extraction.md +1 -1
- package/bundled/skills/{claude-code/reverse-engineer/SKILL.md → reverse-engineer/guide.md} +21 -18
- package/bundled/skills/{claude-code/reverse-engineer → reverse-engineer}/tdd-analysis.md +1 -1
- package/bundled/skills/{claude-code/reverse-engineer → reverse-engineer}/workflow.md +2 -2
- package/bundled/skills/spec-driven-dev/SKILL.md +80 -0
- package/bundled/skills/{claude-code/spec-driven-dev/SKILL.md → spec-driven-dev/guide.md} +50 -8
- package/bundled/skills/tdd-assistant/SKILL.md +65 -0
- package/bundled/skills/{claude-code/tdd-assistant/SKILL.md → tdd-assistant/guide.md} +10 -10
- package/bundled/skills/{claude-code/tdd-assistant → tdd-assistant}/language-examples.md +3 -3
- package/bundled/skills/{claude-code/tdd-assistant → tdd-assistant}/tdd-workflow.md +2 -2
- package/bundled/skills/test-coverage-assistant/SKILL.md +63 -0
- package/bundled/skills/{claude-code/test-coverage-assistant/SKILL.md → test-coverage-assistant/guide.md} +39 -24
- package/bundled/skills/{claude-code/testing-guide → testing-guide}/SKILL.md +12 -7
- package/bundled/skills/{claude-code/testing-guide → testing-guide}/testing-pyramid.md +3 -3
- package/bundled/skills/testing-guide/testing-theory.md +2291 -0
- package/bundled/skills/tools/cline/.clinerules +79 -0
- package/bundled/skills/tools/cline/README.md +50 -0
- package/bundled/skills/tools/copilot/README.md +99 -0
- package/bundled/skills/tools/copilot/copilot-instructions.md +71 -0
- package/bundled/skills/tools/cursor/.cursorrules +101 -0
- package/bundled/skills/tools/cursor/README.md +50 -0
- package/bundled/skills/tools/windsurf/.windsurfrules +76 -0
- package/bundled/skills/tools/windsurf/README.md +51 -0
- package/bundled/skills/{claude-code/workflows → workflows}/README.md +1 -1
- package/bundled/skills/workflows/release.workflow.yaml +893 -0
- package/package.json +4 -1
- package/src/commands/check.js +195 -130
- package/src/commands/config.js +1262 -0
- package/src/commands/configure.js +3 -950
- package/src/commands/fix.js +53 -0
- package/src/commands/hitl.js +19 -0
- package/src/commands/init.js +320 -1030
- package/src/commands/list.js +1 -1
- package/src/commands/simulate.js +61 -0
- package/src/commands/spec.js +288 -0
- package/src/commands/start.js +373 -0
- package/src/commands/sweep.js +142 -0
- package/src/commands/update.js +136 -19
- package/src/commands/workflow.js +265 -1
- package/src/config/ai-agent-paths.js +89 -29
- package/src/core/constants.js +7 -1
- package/src/core/manifest.js +1 -0
- package/src/flows/init-flow.js +243 -0
- package/src/hitl/checkpoint.js +80 -0
- package/src/hitl/classifier.js +54 -0
- package/src/hitl/manager.js +88 -0
- package/src/i18n/messages.js +907 -99
- package/src/index.js +1 -0
- package/src/installers/integration-installer.js +237 -0
- package/src/installers/manifest-installer.js +131 -0
- package/src/installers/skills-installer.js +286 -0
- package/src/installers/standards-installer.js +193 -0
- package/src/missions/MissionManager.js +501 -0
- package/src/prompts/init.js +228 -130
- package/src/prompts/integrations.js +13 -1
- package/src/schemas/standard.schema.json +117 -0
- package/src/utils/agents-installer.js +2 -2
- package/src/utils/config-loader.js +47 -0
- package/src/utils/config-manager.js +108 -0
- package/src/utils/config-merger.js +47 -0
- package/src/utils/github.js +22 -18
- package/src/utils/inquirer-patch.js +98 -0
- package/src/utils/integration-generator.js +392 -58
- package/src/utils/reference-sync.js +69 -19
- package/src/utils/skills-installer.js +6 -3
- package/src/utils/standard-fixer.js +141 -0
- package/src/utils/standard-validator.js +329 -0
- package/src/utils/workflow-executor.js +886 -0
- package/src/utils/workflow-state.js +404 -0
- package/src/utils/workflows-installer.js +2 -2
- package/src/vibe/auto-sweep.js +349 -0
- package/src/vibe/micro-spec.js +428 -0
- package/standards-registry.json +278 -102
- package/bundled/locales/zh-CN/skills/claude-code/README.md +0 -174
- package/bundled/locales/zh-CN/skills/claude-code/test-coverage-assistant/SKILL.md +0 -282
- package/bundled/locales/zh-TW/skills/claude-code/README.md +0 -174
- package/bundled/skills/claude-code/README.md +0 -215
- package/bundled/skills/claude-code/commands/changelog.md +0 -57
- package/bundled/skills/claude-code/commands/derive-all.md +0 -214
- package/bundled/skills/claude-code/commands/derive-atdd.md +0 -177
- package/bundled/skills/claude-code/commands/derive-bdd.md +0 -158
- package/bundled/skills/claude-code/commands/derive-tdd.md +0 -259
- package/bundled/skills/claude-code/commands/docs.md +0 -75
- package/bundled/skills/claude-code/commands/release.md +0 -50
- package/bundled/skills/claude-code/commands/reverse-bdd.md +0 -264
- package/bundled/skills/claude-code/commands/reverse-spec.md +0 -185
- package/bundled/skills/claude-code/commands/reverse-tdd.md +0 -351
- package/bundled/skills/claude-code/commands/spec.md +0 -69
- package/bundled/skills/claude-code/methodology-system/integrated-flow.md +0 -322
- /package/bundled/skills/{claude-code/CONTRIBUTING.template.md → CONTRIBUTING.template.md} +0 -0
- /package/bundled/skills/{claude-code/ai → ai}/standards/checkin.ai.yaml +0 -0
- /package/bundled/skills/{claude-code/ai → ai}/standards/commit.ai.yaml +0 -0
- /package/bundled/skills/{claude-code/ai → ai}/standards/refactoring.ai.yaml +0 -0
- /package/bundled/skills/{claude-code/ai → ai}/standards/testing.ai.yaml +0 -0
- /package/bundled/skills/{claude-code/project-structure-guide → project-structure-guide}/language-patterns.md +0 -0
- /package/bundled/skills/{claude-code/workflows → workflows}/code-review.workflow.yaml +0 -0
- /package/bundled/skills/{claude-code/workflows → workflows}/feature-dev.workflow.yaml +0 -0
- /package/bundled/skills/{claude-code/workflows → workflows}/integrated-flow.workflow.yaml +0 -0
- /package/bundled/skills/{claude-code/workflows → workflows}/large-codebase-analysis.workflow.yaml +0 -0
|
@@ -1,956 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import ora from 'ora';
|
|
3
|
-
import { unlinkSync, existsSync } from 'fs';
|
|
4
|
-
import { join, basename } from 'path';
|
|
5
|
-
import {
|
|
6
|
-
getOptionSource,
|
|
7
|
-
findOption,
|
|
8
|
-
getAllStandards,
|
|
9
|
-
getStandardsByLevel,
|
|
10
|
-
getStandardSource
|
|
11
|
-
} from '../utils/registry.js';
|
|
12
|
-
import {
|
|
13
|
-
copyStandard,
|
|
14
|
-
readManifest,
|
|
15
|
-
writeManifest,
|
|
16
|
-
isInitialized
|
|
17
|
-
} from '../utils/copier.js';
|
|
18
|
-
import {
|
|
19
|
-
promptFormat,
|
|
20
|
-
promptGitWorkflow,
|
|
21
|
-
promptMergeStrategy,
|
|
22
|
-
promptCommitLanguage,
|
|
23
|
-
promptTestLevels,
|
|
24
|
-
promptConfirm,
|
|
25
|
-
promptManageAITools,
|
|
26
|
-
promptAdoptionLevel,
|
|
27
|
-
promptContentModeChange,
|
|
28
|
-
handleAgentsMdSharing,
|
|
29
|
-
promptMethodology,
|
|
30
|
-
promptSkillsInstallLocation,
|
|
31
|
-
promptCommandsInstallation
|
|
32
|
-
} from '../prompts/init.js';
|
|
33
|
-
import {
|
|
34
|
-
installSkillsToMultipleAgents,
|
|
35
|
-
installCommandsToMultipleAgents,
|
|
36
|
-
getInstalledSkillsInfoForAgent,
|
|
37
|
-
getInstalledCommandsForAgent
|
|
38
|
-
} from '../utils/skills-installer.js';
|
|
39
|
-
import {
|
|
40
|
-
getAgentConfig,
|
|
41
|
-
getAgentDisplayName
|
|
42
|
-
} from '../config/ai-agent-paths.js';
|
|
43
|
-
import {
|
|
44
|
-
writeIntegrationFile,
|
|
45
|
-
getToolFilePath
|
|
46
|
-
} from '../utils/integration-generator.js';
|
|
47
|
-
import { getMarketplaceSkillsInfo } from '../utils/github.js';
|
|
48
|
-
import { t, setLanguage, isLanguageExplicitlySet } from '../i18n/messages.js';
|
|
49
|
-
import { regenerateIntegrations } from './update.js';
|
|
1
|
+
import { runProjectConfiguration } from './config.js';
|
|
50
2
|
|
|
51
3
|
/**
|
|
52
|
-
* Configure command -
|
|
4
|
+
* Configure command - alias for `uds config` project settings
|
|
53
5
|
* @param {Object} options - Command options
|
|
54
6
|
*/
|
|
55
7
|
export async function configureCommand(options) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
// Check if initialized first
|
|
59
|
-
if (!isInitialized(projectPath)) {
|
|
60
|
-
const common = t().commands.common;
|
|
61
|
-
console.log(chalk.red(common.notInitialized));
|
|
62
|
-
console.log(chalk.gray(` ${common.runInit}`));
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Read manifest and set language before using t()
|
|
67
|
-
const manifest = readManifest(projectPath);
|
|
68
|
-
if (!manifest) {
|
|
69
|
-
const common = t().commands.common;
|
|
70
|
-
console.log(chalk.red(common.couldNotReadManifest));
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Set UI language based on commit_language setting
|
|
75
|
-
// Only override if user didn't explicitly set --ui-lang flag
|
|
76
|
-
if (!isLanguageExplicitlySet()) {
|
|
77
|
-
const langMap = {
|
|
78
|
-
'traditional-chinese': 'zh-tw',
|
|
79
|
-
'simplified-chinese': 'zh-cn',
|
|
80
|
-
english: 'en',
|
|
81
|
-
bilingual: 'en'
|
|
82
|
-
};
|
|
83
|
-
const uiLang = langMap[manifest.options?.commit_language] || 'en';
|
|
84
|
-
setLanguage(uiLang);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// Now get localized messages
|
|
88
|
-
const msg = t().commands.configure;
|
|
89
|
-
const common = t().commands.common;
|
|
90
|
-
|
|
91
|
-
console.log();
|
|
92
|
-
console.log(chalk.bold(msg.title));
|
|
93
|
-
console.log(chalk.gray('─'.repeat(50)));
|
|
94
|
-
|
|
95
|
-
console.log();
|
|
96
|
-
console.log(chalk.cyan(msg.currentConfig));
|
|
97
|
-
console.log(chalk.gray(` ${common.level}: ${manifest.level || 2}`));
|
|
98
|
-
console.log(chalk.gray(` ${common.format}: ${manifest.format || 'human'}`));
|
|
99
|
-
console.log(chalk.gray(` ${common.contentMode}: ${manifest.contentMode || 'minimal'}`));
|
|
100
|
-
console.log(chalk.gray(` ${common.aiTools}: ${manifest.aiTools?.length > 0 ? manifest.aiTools.join(', ') : common.none}`));
|
|
101
|
-
// Only show methodology with -E flag (completely hidden otherwise)
|
|
102
|
-
if (options.experimental && manifest.methodology?.active) {
|
|
103
|
-
console.log(chalk.gray(` ${common.methodology}: ${manifest.methodology.active.toUpperCase()}`) + chalk.yellow(` ${msg.experimental}`));
|
|
104
|
-
}
|
|
105
|
-
if (manifest.options) {
|
|
106
|
-
if (manifest.options.workflow) {
|
|
107
|
-
console.log(chalk.gray(` ${msg.gitWorkflow}: ${manifest.options.workflow}`));
|
|
108
|
-
}
|
|
109
|
-
if (manifest.options.merge_strategy) {
|
|
110
|
-
console.log(chalk.gray(` ${msg.mergeStrategy}: ${manifest.options.merge_strategy}`));
|
|
111
|
-
}
|
|
112
|
-
if (manifest.options.commit_language) {
|
|
113
|
-
console.log(chalk.gray(` ${msg.commitLanguage}: ${manifest.options.commit_language}`));
|
|
114
|
-
}
|
|
115
|
-
if (manifest.options.test_levels && manifest.options.test_levels.length > 0) {
|
|
116
|
-
console.log(chalk.gray(` ${msg.testLevels}: ${manifest.options.test_levels.join(', ')}`));
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
console.log();
|
|
120
|
-
|
|
121
|
-
// Determine what to configure based on options or interactive mode
|
|
122
|
-
let configType = options.type || null;
|
|
123
|
-
|
|
124
|
-
if (!configType) {
|
|
125
|
-
const inquirer = await import('inquirer');
|
|
126
|
-
|
|
127
|
-
// Build choices array - methodology only shown with -E flag
|
|
128
|
-
const baseChoices = [
|
|
129
|
-
{ name: msg.optionFormat, value: 'format' },
|
|
130
|
-
{ name: msg.optionWorkflow, value: 'workflow' },
|
|
131
|
-
{ name: msg.optionMergeStrategy, value: 'merge_strategy' },
|
|
132
|
-
{ name: msg.optionCommitLanguage, value: 'commit_language' },
|
|
133
|
-
{ name: msg.optionTestLevels, value: 'test_levels' },
|
|
134
|
-
new inquirer.default.Separator(),
|
|
135
|
-
{ name: chalk.cyan(msg.optionAITools), value: 'ai_tools' },
|
|
136
|
-
{ name: chalk.cyan(msg.optionSkills || 'Manage Skills installations'), value: 'skills' },
|
|
137
|
-
{ name: chalk.cyan(msg.optionCommands || 'Manage Commands installations'), value: 'commands' },
|
|
138
|
-
new inquirer.default.Separator(),
|
|
139
|
-
{ name: chalk.cyan(msg.optionLevel), value: 'level' },
|
|
140
|
-
{ name: chalk.cyan(msg.optionContentMode), value: 'content_mode' }
|
|
141
|
-
];
|
|
142
|
-
|
|
143
|
-
// Only add methodology option when -E flag is used
|
|
144
|
-
if (options.experimental) {
|
|
145
|
-
baseChoices.push(
|
|
146
|
-
{ name: `${chalk.cyan(msg.optionMethodology)} ${chalk.yellow(msg.experimental)}`, value: 'methodology' }
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
baseChoices.push(
|
|
151
|
-
new inquirer.default.Separator(),
|
|
152
|
-
{ name: msg.optionAll, value: 'all' }
|
|
153
|
-
);
|
|
154
|
-
|
|
155
|
-
const { type } = await inquirer.default.prompt([
|
|
156
|
-
{
|
|
157
|
-
type: 'list',
|
|
158
|
-
name: 'type',
|
|
159
|
-
message: msg.selectOption,
|
|
160
|
-
choices: baseChoices
|
|
161
|
-
}
|
|
162
|
-
]);
|
|
163
|
-
configType = type;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// Collect new options
|
|
167
|
-
const newOptions = { ...manifest.options };
|
|
168
|
-
let newFormat = manifest.format;
|
|
169
|
-
let newLevel = manifest.level || 2;
|
|
170
|
-
let newContentMode = manifest.contentMode || 'minimal';
|
|
171
|
-
let newAITools = [...(manifest.aiTools || [])];
|
|
172
|
-
let needsIntegrationRegeneration = false;
|
|
173
|
-
|
|
174
|
-
// Handle AI Tools configuration
|
|
175
|
-
if (configType === 'ai_tools') {
|
|
176
|
-
const result = await promptManageAITools(manifest.aiTools || []);
|
|
177
|
-
|
|
178
|
-
if (result.action === 'add' && result.tools.length > 0) {
|
|
179
|
-
// Handle AGENTS.md sharing
|
|
180
|
-
const toolsWithSharing = handleAgentsMdSharing(result.tools);
|
|
181
|
-
newAITools = [...new Set([...newAITools, ...toolsWithSharing])];
|
|
182
|
-
needsIntegrationRegeneration = true;
|
|
183
|
-
} else if (result.action === 'remove' && result.tools.length > 0) {
|
|
184
|
-
newAITools = newAITools.filter(tool => !result.tools.includes(tool));
|
|
185
|
-
|
|
186
|
-
// Remove integration files for removed tools
|
|
187
|
-
const spinner = ora(msg.removingIntegrations).start();
|
|
188
|
-
for (const tool of result.tools) {
|
|
189
|
-
const filePath = join(projectPath, getToolFilePath(tool));
|
|
190
|
-
if (existsSync(filePath)) {
|
|
191
|
-
try {
|
|
192
|
-
unlinkSync(filePath);
|
|
193
|
-
console.log(chalk.gray(` ${msg.removed}: ${getToolFilePath(tool)}`));
|
|
194
|
-
} catch (err) {
|
|
195
|
-
console.log(chalk.yellow(` ${msg.couldNotRemove}: ${getToolFilePath(tool)}`));
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
spinner.succeed(msg.integrationsRemoved);
|
|
200
|
-
} else if (result.action === 'view' || result.action === 'cancel') {
|
|
201
|
-
console.log(chalk.gray(msg.noChanges));
|
|
202
|
-
process.exit(0);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// Handle Skills configuration
|
|
207
|
-
if (configType === 'skills') {
|
|
208
|
-
await handleSkillsConfiguration(manifest, projectPath, msg, common, options.aiTool, options.skillsLocation);
|
|
209
|
-
process.exit(0);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// Handle Commands configuration
|
|
213
|
-
if (configType === 'commands') {
|
|
214
|
-
await handleCommandsConfiguration(manifest, projectPath, msg, common, options.aiTool);
|
|
215
|
-
process.exit(0);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// Handle Level configuration
|
|
219
|
-
if (configType === 'level') {
|
|
220
|
-
newLevel = await promptAdoptionLevel(manifest.level || 2);
|
|
221
|
-
if (newLevel !== manifest.level) {
|
|
222
|
-
needsIntegrationRegeneration = true;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
// Handle Content Mode configuration
|
|
227
|
-
if (configType === 'content_mode') {
|
|
228
|
-
newContentMode = await promptContentModeChange(manifest.contentMode || 'minimal');
|
|
229
|
-
if (newContentMode !== manifest.contentMode) {
|
|
230
|
-
needsIntegrationRegeneration = true;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
// Handle Methodology configuration
|
|
235
|
-
let newMethodology = manifest.methodology?.active || null;
|
|
236
|
-
if (configType === 'methodology') {
|
|
237
|
-
newMethodology = await promptMethodology();
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// Handle traditional options
|
|
241
|
-
if (configType === 'all' || configType === 'format') {
|
|
242
|
-
newFormat = await promptFormat();
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
if (configType === 'all' || configType === 'workflow') {
|
|
246
|
-
newOptions.workflow = await promptGitWorkflow();
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (configType === 'all' || configType === 'merge_strategy') {
|
|
250
|
-
newOptions.merge_strategy = await promptMergeStrategy();
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
if (configType === 'all' || configType === 'commit_language') {
|
|
254
|
-
newOptions.commit_language = await promptCommitLanguage();
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
if (configType === 'all' || configType === 'test_levels') {
|
|
258
|
-
newOptions.test_levels = await promptTestLevels();
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// Show changes
|
|
262
|
-
console.log();
|
|
263
|
-
console.log(chalk.cyan(msg.newConfig));
|
|
264
|
-
console.log(chalk.gray(` ${common.level}: ${newLevel}`));
|
|
265
|
-
console.log(chalk.gray(` ${common.format}: ${newFormat}`));
|
|
266
|
-
console.log(chalk.gray(` ${common.contentMode}: ${newContentMode}`));
|
|
267
|
-
console.log(chalk.gray(` ${common.aiTools}: ${newAITools.length > 0 ? newAITools.join(', ') : common.none}`));
|
|
268
|
-
if (newMethodology) {
|
|
269
|
-
console.log(chalk.gray(` ${common.methodology}: ${newMethodology.toUpperCase()}`));
|
|
270
|
-
}
|
|
271
|
-
if (newOptions.workflow) {
|
|
272
|
-
console.log(chalk.gray(` ${msg.gitWorkflow}: ${newOptions.workflow}`));
|
|
273
|
-
}
|
|
274
|
-
if (newOptions.merge_strategy) {
|
|
275
|
-
console.log(chalk.gray(` ${msg.mergeStrategy}: ${newOptions.merge_strategy}`));
|
|
276
|
-
}
|
|
277
|
-
if (newOptions.commit_language) {
|
|
278
|
-
console.log(chalk.gray(` ${msg.commitLanguage}: ${newOptions.commit_language}`));
|
|
279
|
-
}
|
|
280
|
-
if (newOptions.test_levels && newOptions.test_levels.length > 0) {
|
|
281
|
-
console.log(chalk.gray(` ${msg.testLevels}: ${newOptions.test_levels.join(', ')}`));
|
|
282
|
-
}
|
|
283
|
-
console.log();
|
|
284
|
-
|
|
285
|
-
// Confirm (skip if --yes flag is provided)
|
|
286
|
-
if (!options.yes) {
|
|
287
|
-
const confirmed = await promptConfirm(msg.applyChanges);
|
|
288
|
-
if (!confirmed) {
|
|
289
|
-
console.log(chalk.yellow(msg.configCancelled));
|
|
290
|
-
process.exit(0);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// Apply changes
|
|
295
|
-
const spinner = ora(msg.updatingConfig).start();
|
|
296
|
-
|
|
297
|
-
const results = {
|
|
298
|
-
copied: [],
|
|
299
|
-
generated: [],
|
|
300
|
-
errors: []
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
const standards = getAllStandards();
|
|
304
|
-
const formatsToUse = newFormat === 'both' ? ['ai', 'human'] : [newFormat];
|
|
305
|
-
|
|
306
|
-
// Helper to copy option files
|
|
307
|
-
const copyOptionFile = async (std, optionCategory, optionId, targetFormat) => {
|
|
308
|
-
const option = findOption(std, optionCategory, optionId);
|
|
309
|
-
if (option) {
|
|
310
|
-
const sourcePath = getOptionSource(option, targetFormat);
|
|
311
|
-
const result = await copyStandard(sourcePath, '.standards/options', projectPath);
|
|
312
|
-
if (result.success) {
|
|
313
|
-
results.copied.push(sourcePath);
|
|
314
|
-
} else {
|
|
315
|
-
results.errors.push(`${sourcePath}: ${result.error}`);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
// Copy new option files
|
|
321
|
-
for (const std of standards) {
|
|
322
|
-
if (!std.options) continue;
|
|
323
|
-
|
|
324
|
-
for (const targetFormat of formatsToUse) {
|
|
325
|
-
// Git workflow
|
|
326
|
-
if (std.id === 'git-workflow') {
|
|
327
|
-
if (newOptions.workflow && newOptions.workflow !== manifest.options?.workflow) {
|
|
328
|
-
await copyOptionFile(std, 'workflow', newOptions.workflow, targetFormat);
|
|
329
|
-
}
|
|
330
|
-
if (newOptions.merge_strategy && newOptions.merge_strategy !== manifest.options?.merge_strategy) {
|
|
331
|
-
await copyOptionFile(std, 'merge_strategy', newOptions.merge_strategy, targetFormat);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
// Commit message
|
|
336
|
-
if (std.id === 'commit-message') {
|
|
337
|
-
if (newOptions.commit_language && newOptions.commit_language !== manifest.options?.commit_language) {
|
|
338
|
-
await copyOptionFile(std, 'commit_language', newOptions.commit_language, targetFormat);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// Testing
|
|
343
|
-
if (std.id === 'testing' && newOptions.test_levels) {
|
|
344
|
-
for (const level of newOptions.test_levels) {
|
|
345
|
-
if (!manifest.options?.test_levels?.includes(level)) {
|
|
346
|
-
await copyOptionFile(std, 'test_level', level, targetFormat);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
// Handle level change - copy new standards if upgrading
|
|
354
|
-
if (newLevel > (manifest.level || 2)) {
|
|
355
|
-
const levelSpinner = ora(msg.addingStandards).start();
|
|
356
|
-
const newStandards = getStandardsByLevel(newLevel);
|
|
357
|
-
const existingStandards = new Set(manifest.standards?.map(s => basename(s)) || []);
|
|
358
|
-
|
|
359
|
-
for (const std of newStandards) {
|
|
360
|
-
for (const targetFormat of formatsToUse) {
|
|
361
|
-
const sourcePath = getStandardSource(std, targetFormat);
|
|
362
|
-
const fileName = basename(sourcePath);
|
|
363
|
-
if (!existingStandards.has(fileName)) {
|
|
364
|
-
const result = await copyStandard(sourcePath, '.standards', projectPath);
|
|
365
|
-
if (result.success) {
|
|
366
|
-
results.copied.push(sourcePath);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
levelSpinner.succeed(msg.standardsAdded);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// Regenerate integration files if needed
|
|
375
|
-
if (needsIntegrationRegeneration && newAITools.length > 0) {
|
|
376
|
-
const intSpinner = ora(msg.regeneratingIntegrations).start();
|
|
377
|
-
|
|
378
|
-
// Build installed standards list
|
|
379
|
-
const installedStandardsList = manifest.standards?.map(s => basename(s)) || [];
|
|
380
|
-
|
|
381
|
-
// Determine language setting
|
|
382
|
-
let commonLanguage = 'en';
|
|
383
|
-
if (newOptions.commit_language === 'bilingual') {
|
|
384
|
-
commonLanguage = 'bilingual';
|
|
385
|
-
} else if (newOptions.commit_language === 'traditional-chinese') {
|
|
386
|
-
commonLanguage = 'zh-tw';
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
// Track generated files to handle AGENTS.md sharing
|
|
390
|
-
const generatedFiles = new Set();
|
|
391
|
-
|
|
392
|
-
for (const tool of newAITools) {
|
|
393
|
-
const targetFile = getToolFilePath(tool);
|
|
394
|
-
if (generatedFiles.has(targetFile)) {
|
|
395
|
-
continue; // Skip if already generated (AGENTS.md sharing)
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
const toolConfig = {
|
|
399
|
-
tool,
|
|
400
|
-
categories: ['anti-hallucination', 'commit-standards', 'code-review'],
|
|
401
|
-
language: commonLanguage,
|
|
402
|
-
installedStandards: installedStandardsList,
|
|
403
|
-
contentMode: newContentMode,
|
|
404
|
-
level: newLevel,
|
|
405
|
-
// Pass commit_language for dynamic commit standards generation
|
|
406
|
-
commitLanguage: newOptions.commit_language || 'english'
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
const result = writeIntegrationFile(tool, toolConfig, projectPath);
|
|
410
|
-
if (result.success) {
|
|
411
|
-
results.generated.push(result.path);
|
|
412
|
-
generatedFiles.add(targetFile);
|
|
413
|
-
} else {
|
|
414
|
-
results.errors.push(`${tool}: ${result.error}`);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
intSpinner.succeed(msg.regeneratedIntegrations.replace('{count}', results.generated.length));
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
// Update manifest
|
|
421
|
-
manifest.format = newFormat;
|
|
422
|
-
manifest.options = newOptions;
|
|
423
|
-
manifest.level = newLevel;
|
|
424
|
-
manifest.contentMode = newContentMode;
|
|
425
|
-
manifest.aiTools = newAITools;
|
|
426
|
-
manifest.version = '3.2.0';
|
|
427
|
-
|
|
428
|
-
// Update methodology
|
|
429
|
-
if (newMethodology) {
|
|
430
|
-
manifest.methodology = {
|
|
431
|
-
active: newMethodology,
|
|
432
|
-
available: ['tdd', 'bdd', 'sdd', 'atdd'],
|
|
433
|
-
config: {
|
|
434
|
-
checkpointsEnabled: true,
|
|
435
|
-
reminderIntensity: 'suggest',
|
|
436
|
-
skipLimit: 3
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
} else if (configType === 'methodology' && !newMethodology) {
|
|
440
|
-
// User explicitly chose "None"
|
|
441
|
-
manifest.methodology = null;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
writeManifest(manifest, projectPath);
|
|
445
|
-
|
|
446
|
-
spinner.succeed(msg.configUpdated);
|
|
447
|
-
|
|
448
|
-
// Summary
|
|
449
|
-
console.log();
|
|
450
|
-
console.log(chalk.green(msg.configSuccess));
|
|
451
|
-
if (results.copied.length > 0) {
|
|
452
|
-
console.log(chalk.gray(` ${msg.newOptionsCopied.replace('{count}', results.copied.length)}`));
|
|
453
|
-
}
|
|
454
|
-
if (results.generated.length > 0) {
|
|
455
|
-
console.log(chalk.gray(` ${msg.integrationsRegenerated.replace('{count}', results.generated.length)}`));
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
if (results.errors.length > 0) {
|
|
459
|
-
console.log();
|
|
460
|
-
console.log(chalk.yellow(msg.errorsOccurred.replace('{count}', results.errors.length)));
|
|
461
|
-
for (const err of results.errors) {
|
|
462
|
-
console.log(chalk.gray(` ${err}`));
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
// Smart apply: offer to regenerate integrations if config changed but not already regenerated
|
|
467
|
-
// Skip for types that have their own flow or don't affect integrations
|
|
468
|
-
const skipApplyTypes = ['skills', 'commands', 'methodology'];
|
|
469
|
-
const alreadyRegenerated = results.generated.length > 0;
|
|
470
|
-
const shouldOfferApply = !skipApplyTypes.includes(configType) &&
|
|
471
|
-
newAITools.length > 0 &&
|
|
472
|
-
!alreadyRegenerated;
|
|
473
|
-
|
|
474
|
-
if (shouldOfferApply) {
|
|
475
|
-
console.log();
|
|
476
|
-
|
|
477
|
-
if (options.yes) {
|
|
478
|
-
// --yes flag: auto-apply without prompting
|
|
479
|
-
const applySpinner = ora(msg.applyingChanges).start();
|
|
480
|
-
const applyResults = regenerateIntegrations(projectPath, manifest);
|
|
481
|
-
applySpinner.succeed(msg.changesApplied || msg.regeneratedIntegrations.replace('{count}', applyResults.updated.length));
|
|
482
|
-
|
|
483
|
-
// Update manifest with new file hashes
|
|
484
|
-
writeManifest(manifest, projectPath);
|
|
485
|
-
|
|
486
|
-
if (applyResults.errors.length > 0) {
|
|
487
|
-
console.log(chalk.yellow(msg.errorsOccurred.replace('{count}', applyResults.errors.length)));
|
|
488
|
-
for (const err of applyResults.errors) {
|
|
489
|
-
console.log(chalk.gray(` ${err}`));
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
} else {
|
|
493
|
-
// Interactive mode: prompt user
|
|
494
|
-
const inquirer = await import('inquirer');
|
|
495
|
-
const { apply } = await inquirer.default.prompt([{
|
|
496
|
-
type: 'confirm',
|
|
497
|
-
name: 'apply',
|
|
498
|
-
message: msg.applyChangesNow,
|
|
499
|
-
default: true
|
|
500
|
-
}]);
|
|
501
|
-
|
|
502
|
-
if (apply) {
|
|
503
|
-
const applySpinner = ora(msg.applyingChanges).start();
|
|
504
|
-
const applyResults = regenerateIntegrations(projectPath, manifest);
|
|
505
|
-
applySpinner.succeed(msg.changesApplied || msg.regeneratedIntegrations.replace('{count}', applyResults.updated.length));
|
|
506
|
-
|
|
507
|
-
// Update manifest with new file hashes
|
|
508
|
-
writeManifest(manifest, projectPath);
|
|
509
|
-
|
|
510
|
-
if (applyResults.errors.length > 0) {
|
|
511
|
-
console.log(chalk.yellow(msg.errorsOccurred.replace('{count}', applyResults.errors.length)));
|
|
512
|
-
for (const err of applyResults.errors) {
|
|
513
|
-
console.log(chalk.gray(` ${err}`));
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
} else {
|
|
517
|
-
console.log(chalk.gray(msg.runUpdateLater));
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
console.log();
|
|
523
|
-
|
|
524
|
-
// Exit explicitly to prevent hanging due to inquirer's readline interface
|
|
525
|
-
process.exit(0);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* Handle Skills configuration
|
|
530
|
-
* @param {Object} manifest - Project manifest
|
|
531
|
-
* @param {string} projectPath - Project path
|
|
532
|
-
* @param {Object} msg - i18n messages
|
|
533
|
-
* @param {Object} common - Common i18n messages
|
|
534
|
-
* @param {string} [specificTool] - Specific AI tool to install (non-interactive mode)
|
|
535
|
-
* @param {string} [skillsLocation] - Skills installation location (project, user) for non-interactive mode
|
|
536
|
-
*/
|
|
537
|
-
async function handleSkillsConfiguration(manifest, projectPath, msg, common, specificTool, skillsLocation) {
|
|
538
|
-
const inquirer = await import('inquirer');
|
|
539
|
-
const aiTools = manifest.aiTools || [];
|
|
540
|
-
|
|
541
|
-
// Non-interactive mode: install for specific tool
|
|
542
|
-
if (specificTool) {
|
|
543
|
-
const config = getAgentConfig(specificTool);
|
|
544
|
-
if (!config) {
|
|
545
|
-
console.log(chalk.red(`Unknown AI tool: ${specificTool}`));
|
|
546
|
-
console.log(chalk.gray(' Available tools: claude-code, opencode, copilot, gemini-cli, roo-code, cursor, windsurf, cline, codex'));
|
|
547
|
-
return;
|
|
548
|
-
}
|
|
549
|
-
if (!config.supportsSkills) {
|
|
550
|
-
console.log(chalk.yellow(`${getAgentDisplayName(specificTool)} does not support Skills`));
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
// Validate skillsLocation if provided
|
|
555
|
-
const validLocations = ['project', 'user'];
|
|
556
|
-
const level = skillsLocation && validLocations.includes(skillsLocation) ? skillsLocation : 'project';
|
|
557
|
-
|
|
558
|
-
// Install to specified level (defaults to project)
|
|
559
|
-
const installations = [{ agent: specificTool, level }];
|
|
560
|
-
const spinner = ora(`Installing Skills for ${getAgentDisplayName(specificTool)} (${level} level)...`).start();
|
|
561
|
-
const result = await installSkillsToMultipleAgents(installations, null, projectPath);
|
|
562
|
-
spinner.stop();
|
|
563
|
-
|
|
564
|
-
if (result.success) {
|
|
565
|
-
console.log(chalk.green(`Skills installed for ${getAgentDisplayName(specificTool)}`));
|
|
566
|
-
} else {
|
|
567
|
-
console.log(chalk.yellow('Skills installation completed with issues'));
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
// Update manifest
|
|
571
|
-
manifest.skills = manifest.skills || {};
|
|
572
|
-
manifest.skills.installations = manifest.skills.installations || [];
|
|
573
|
-
const existing = manifest.skills.installations.findIndex(i => i.agent === specificTool);
|
|
574
|
-
if (existing >= 0) {
|
|
575
|
-
manifest.skills.installations[existing] = installations[0];
|
|
576
|
-
} else {
|
|
577
|
-
manifest.skills.installations.push(installations[0]);
|
|
578
|
-
}
|
|
579
|
-
writeManifest(manifest, projectPath);
|
|
580
|
-
return;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
// Interactive mode
|
|
584
|
-
if (aiTools.length === 0) {
|
|
585
|
-
console.log(chalk.yellow(msg.noAiToolsConfigured || 'No AI tools configured'));
|
|
586
|
-
console.log(chalk.gray(` ${msg.addAiToolsFirst || 'Add AI tools first with: uds configure --type ai_tools'}`));
|
|
587
|
-
return;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
// Get declined skills from manifest
|
|
591
|
-
const declinedSkills = manifest.declinedFeatures?.skills || [];
|
|
592
|
-
|
|
593
|
-
// Check if Skills are installed via marketplace (Claude Code only)
|
|
594
|
-
const marketplaceInfo = getMarketplaceSkillsInfo();
|
|
595
|
-
const hasMarketplaceSkills = marketplaceInfo?.installed;
|
|
596
|
-
|
|
597
|
-
// Show current Skills status
|
|
598
|
-
console.log(chalk.cyan(msg.currentSkillsStatus || 'Current Skills status:'));
|
|
599
|
-
|
|
600
|
-
// Show marketplace status if applicable
|
|
601
|
-
if (hasMarketplaceSkills && aiTools.includes('claude-code')) {
|
|
602
|
-
console.log(chalk.green(` ✓ ${msg.viaMarketplace || 'Via Marketplace'}: ${marketplaceInfo.version || 'installed'}`));
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
for (const tool of aiTools) {
|
|
606
|
-
const config = getAgentConfig(tool);
|
|
607
|
-
if (!config?.supportsSkills) continue;
|
|
608
|
-
|
|
609
|
-
const displayName = getAgentDisplayName(tool);
|
|
610
|
-
const projectInfo = getInstalledSkillsInfoForAgent(tool, 'project', projectPath);
|
|
611
|
-
const userInfo = getInstalledSkillsInfoForAgent(tool, 'user', projectPath);
|
|
612
|
-
|
|
613
|
-
if (projectInfo?.installed || userInfo?.installed) {
|
|
614
|
-
console.log(chalk.green(` ✓ ${displayName}:`));
|
|
615
|
-
if (userInfo?.installed) {
|
|
616
|
-
console.log(chalk.gray(` - User: ${userInfo.version || 'installed'}`));
|
|
617
|
-
}
|
|
618
|
-
if (projectInfo?.installed) {
|
|
619
|
-
console.log(chalk.gray(` - Project: ${projectInfo.version || 'installed'}`));
|
|
620
|
-
}
|
|
621
|
-
} else if (declinedSkills.includes(tool)) {
|
|
622
|
-
console.log(chalk.yellow(` ⊘ ${displayName}: ${msg.previouslyDeclined || 'Previously declined'}`));
|
|
623
|
-
} else if (hasMarketplaceSkills && tool === 'claude-code') {
|
|
624
|
-
// Claude Code has marketplace skills but no file-based installation
|
|
625
|
-
console.log(chalk.cyan(` ◎ ${displayName}: ${msg.marketplaceOnly || 'Marketplace only (no local files)'}`));
|
|
626
|
-
} else {
|
|
627
|
-
console.log(chalk.gray(` ○ ${displayName}: ${msg.notInstalled || 'Not installed'}`));
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
// Show marketplace coexistence note if user might want to install local files
|
|
632
|
-
if (hasMarketplaceSkills && aiTools.includes('claude-code')) {
|
|
633
|
-
console.log();
|
|
634
|
-
console.log(chalk.cyan(` ℹ ${msg.marketplaceCoexistNote || 'Note: File-based installation will coexist with Marketplace version'}`));
|
|
635
|
-
}
|
|
636
|
-
console.log();
|
|
637
|
-
|
|
638
|
-
// Build menu choices
|
|
639
|
-
const menuChoices = [
|
|
640
|
-
{ name: msg.installSkills || 'Install/Update Skills', value: 'install' }
|
|
641
|
-
];
|
|
642
|
-
|
|
643
|
-
// Add reinstall declined option if there are declined skills
|
|
644
|
-
if (declinedSkills.length > 0) {
|
|
645
|
-
menuChoices.push({
|
|
646
|
-
name: msg.reinstallDeclinedSkills || 'Reinstall declined Skills',
|
|
647
|
-
value: 'reinstall_declined'
|
|
648
|
-
});
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
menuChoices.push(
|
|
652
|
-
{ name: msg.viewStatus || 'View status only', value: 'view' },
|
|
653
|
-
{ name: common.cancel || 'Cancel', value: 'cancel' }
|
|
654
|
-
);
|
|
655
|
-
|
|
656
|
-
// Ask what action to take
|
|
657
|
-
const { action } = await inquirer.default.prompt([
|
|
658
|
-
{
|
|
659
|
-
type: 'list',
|
|
660
|
-
name: 'action',
|
|
661
|
-
message: msg.skillsAction || 'What would you like to do?',
|
|
662
|
-
choices: menuChoices
|
|
663
|
-
}
|
|
664
|
-
]);
|
|
665
|
-
|
|
666
|
-
if (action === 'cancel' || action === 'view') {
|
|
667
|
-
console.log(chalk.gray(msg.noChanges || 'No changes made'));
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
// Handle reinstall declined action
|
|
672
|
-
if (action === 'reinstall_declined') {
|
|
673
|
-
// Get only the declined tools that support skills
|
|
674
|
-
const declinedToolsWithSupport = declinedSkills.filter(tool => {
|
|
675
|
-
const config = getAgentConfig(tool);
|
|
676
|
-
return config?.supportsSkills;
|
|
677
|
-
});
|
|
678
|
-
|
|
679
|
-
if (declinedToolsWithSupport.length === 0) {
|
|
680
|
-
console.log(chalk.gray(msg.noChanges || 'No changes made'));
|
|
681
|
-
return;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
// Prompt for installation level
|
|
685
|
-
const { skillsLevel } = await inquirer.default.prompt([{
|
|
686
|
-
type: 'list',
|
|
687
|
-
name: 'skillsLevel',
|
|
688
|
-
message: msg.skillsLevelQuestion || 'Where should Skills be installed?',
|
|
689
|
-
choices: [
|
|
690
|
-
{ name: `${msg.projectLevel || 'Project level'} (.claude/skills/, etc.)`, value: 'project' },
|
|
691
|
-
{ name: `${msg.userLevel || 'User level'} (~/.claude/skills/, etc.)`, value: 'user' }
|
|
692
|
-
],
|
|
693
|
-
default: 'project'
|
|
694
|
-
}]);
|
|
695
|
-
|
|
696
|
-
const installations = declinedToolsWithSupport.map(agent => ({
|
|
697
|
-
agent,
|
|
698
|
-
location: skillsLevel
|
|
699
|
-
}));
|
|
700
|
-
|
|
701
|
-
// Install Skills
|
|
702
|
-
const spinner = ora(msg.installingSkills || 'Installing Skills...').start();
|
|
703
|
-
const result = await installSkillsToMultipleAgents(installations, null, projectPath);
|
|
704
|
-
spinner.stop();
|
|
705
|
-
|
|
706
|
-
if (result.success) {
|
|
707
|
-
console.log(chalk.green(msg.skillsInstallSuccess || 'Skills installed successfully'));
|
|
708
|
-
console.log(chalk.gray(` ${msg.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
|
|
709
|
-
} else {
|
|
710
|
-
console.log(chalk.yellow(msg.skillsInstallPartial || 'Skills installed with some issues'));
|
|
711
|
-
if (result.totalErrors > 0) {
|
|
712
|
-
console.log(chalk.red(` ${msg.errors || 'Errors'}: ${result.totalErrors}`));
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
// Update manifest - clear declined status for installed tools
|
|
717
|
-
manifest.skills = manifest.skills || {};
|
|
718
|
-
manifest.skills.installations = installations;
|
|
719
|
-
if (manifest.declinedFeatures?.skills) {
|
|
720
|
-
manifest.declinedFeatures.skills = manifest.declinedFeatures.skills.filter(
|
|
721
|
-
tool => !declinedToolsWithSupport.includes(tool)
|
|
722
|
-
);
|
|
723
|
-
}
|
|
724
|
-
writeManifest(manifest, projectPath);
|
|
725
|
-
return;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
// Use unified installation prompt
|
|
729
|
-
const installations = await promptSkillsInstallLocation(aiTools);
|
|
730
|
-
if (installations.length === 0) {
|
|
731
|
-
console.log(chalk.gray(msg.noChanges || 'No changes made'));
|
|
732
|
-
return;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
// Install Skills
|
|
736
|
-
const spinner = ora(msg.installingSkills || 'Installing Skills...').start();
|
|
737
|
-
const result = await installSkillsToMultipleAgents(installations, null, projectPath);
|
|
738
|
-
spinner.stop();
|
|
739
|
-
|
|
740
|
-
if (result.success) {
|
|
741
|
-
console.log(chalk.green(msg.skillsInstallSuccess || 'Skills installed successfully'));
|
|
742
|
-
console.log(chalk.gray(` ${msg.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
|
|
743
|
-
} else {
|
|
744
|
-
console.log(chalk.yellow(msg.skillsInstallPartial || 'Skills installed with some issues'));
|
|
745
|
-
if (result.totalErrors > 0) {
|
|
746
|
-
console.log(chalk.red(` ${msg.errors || 'Errors'}: ${result.totalErrors}`));
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
// Update manifest
|
|
751
|
-
manifest.skills = manifest.skills || {};
|
|
752
|
-
manifest.skills.installations = installations;
|
|
753
|
-
writeManifest(manifest, projectPath);
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* Handle Commands configuration
|
|
758
|
-
* @param {Object} manifest - Project manifest
|
|
759
|
-
* @param {string} projectPath - Project path
|
|
760
|
-
* @param {Object} msg - i18n messages
|
|
761
|
-
* @param {Object} common - Common i18n messages
|
|
762
|
-
* @param {string} [specificTool] - Specific AI tool to install (triggers interactive prompt for level)
|
|
763
|
-
*/
|
|
764
|
-
async function handleCommandsConfiguration(manifest, projectPath, msg, common, specificTool) {
|
|
765
|
-
const inquirer = await import('inquirer');
|
|
766
|
-
const aiTools = manifest.aiTools || [];
|
|
767
|
-
|
|
768
|
-
// Semi-interactive mode: install for specific tool (prompt for level)
|
|
769
|
-
if (specificTool) {
|
|
770
|
-
const config = getAgentConfig(specificTool);
|
|
771
|
-
if (!config) {
|
|
772
|
-
console.log(chalk.red(`Unknown AI tool: ${specificTool}`));
|
|
773
|
-
console.log(chalk.gray(' Available tools: claude-code, opencode, copilot, gemini-cli, roo-code'));
|
|
774
|
-
return;
|
|
775
|
-
}
|
|
776
|
-
if (config.commands === null) {
|
|
777
|
-
console.log(chalk.yellow(`${getAgentDisplayName(specificTool)} does not support Commands`));
|
|
778
|
-
console.log(chalk.gray(' Tools that support commands: OpenCode, Copilot, Roo Code, Gemini CLI'));
|
|
779
|
-
return;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
// Prompt for installation level
|
|
783
|
-
const { commandsLevel } = await inquirer.default.prompt([{
|
|
784
|
-
type: 'list',
|
|
785
|
-
name: 'commandsLevel',
|
|
786
|
-
message: msg.commandsLevelQuestion || 'Where should Commands be installed?',
|
|
787
|
-
choices: [
|
|
788
|
-
{ name: `${msg.projectLevel || 'Project level'} (${config.commands.project}) (${msg.recommended || 'Recommended'})`, value: 'project' },
|
|
789
|
-
{ name: `${msg.userLevel || 'User level'} (${config.commands.user})`, value: 'user' }
|
|
790
|
-
],
|
|
791
|
-
default: 'project'
|
|
792
|
-
}]);
|
|
793
|
-
|
|
794
|
-
// Install to selected level
|
|
795
|
-
const installations = [{ agent: specificTool, level: commandsLevel }];
|
|
796
|
-
const spinner = ora(`Installing Commands for ${getAgentDisplayName(specificTool)} (${commandsLevel} level)...`).start();
|
|
797
|
-
const result = await installCommandsToMultipleAgents(installations, null, projectPath);
|
|
798
|
-
spinner.stop();
|
|
799
|
-
|
|
800
|
-
if (result.success) {
|
|
801
|
-
console.log(chalk.green(`Commands installed for ${getAgentDisplayName(specificTool)}`));
|
|
802
|
-
} else {
|
|
803
|
-
console.log(chalk.yellow('Commands installation completed with issues'));
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
// Update manifest
|
|
807
|
-
manifest.commands = manifest.commands || {};
|
|
808
|
-
manifest.commands.installations = manifest.commands.installations || [];
|
|
809
|
-
const existing = manifest.commands.installations.findIndex(i =>
|
|
810
|
-
typeof i === 'string' ? i === specificTool : i.agent === specificTool
|
|
811
|
-
);
|
|
812
|
-
if (existing >= 0) {
|
|
813
|
-
manifest.commands.installations[existing] = installations[0];
|
|
814
|
-
} else {
|
|
815
|
-
manifest.commands.installations.push(installations[0]);
|
|
816
|
-
}
|
|
817
|
-
writeManifest(manifest, projectPath);
|
|
818
|
-
return;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
// Interactive mode
|
|
822
|
-
// Filter tools that support commands (commands !== null means support)
|
|
823
|
-
const commandSupportedTools = aiTools.filter(tool => {
|
|
824
|
-
const config = getAgentConfig(tool);
|
|
825
|
-
return config?.commands !== null;
|
|
826
|
-
});
|
|
827
|
-
|
|
828
|
-
if (commandSupportedTools.length === 0) {
|
|
829
|
-
console.log(chalk.yellow(msg.noCommandSupportedTools || 'No AI tools with command support configured'));
|
|
830
|
-
console.log(chalk.gray(` ${msg.commandSupportedList || 'Tools that support commands: OpenCode, Copilot, Roo Code, Gemini CLI'}`));
|
|
831
|
-
return;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
// Get declined commands from manifest
|
|
835
|
-
const declinedCommands = manifest.declinedFeatures?.commands || [];
|
|
836
|
-
|
|
837
|
-
// Show current Commands status (check both project and user levels)
|
|
838
|
-
console.log(chalk.cyan(msg.currentCommandsStatus || 'Current Commands status:'));
|
|
839
|
-
for (const tool of commandSupportedTools) {
|
|
840
|
-
const displayName = getAgentDisplayName(tool);
|
|
841
|
-
const projectCmdInfo = getInstalledCommandsForAgent(tool, 'project', projectPath);
|
|
842
|
-
const userCmdInfo = getInstalledCommandsForAgent(tool, 'user');
|
|
843
|
-
|
|
844
|
-
if (projectCmdInfo?.installed || userCmdInfo?.installed) {
|
|
845
|
-
console.log(chalk.green(` ✓ ${displayName}:`));
|
|
846
|
-
if (userCmdInfo?.installed) {
|
|
847
|
-
console.log(chalk.gray(` - User: ${userCmdInfo.count} commands`));
|
|
848
|
-
}
|
|
849
|
-
if (projectCmdInfo?.installed) {
|
|
850
|
-
console.log(chalk.gray(` - Project: ${projectCmdInfo.count} commands`));
|
|
851
|
-
}
|
|
852
|
-
} else if (declinedCommands.includes(tool)) {
|
|
853
|
-
console.log(chalk.yellow(` ⊘ ${displayName}: ${msg.previouslyDeclined || 'Previously declined'}`));
|
|
854
|
-
} else {
|
|
855
|
-
console.log(chalk.gray(` ○ ${displayName}: ${msg.notInstalled || 'Not installed'}`));
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
console.log();
|
|
859
|
-
|
|
860
|
-
// Build menu choices
|
|
861
|
-
const menuChoices = [
|
|
862
|
-
{ name: msg.installCommands || 'Install/Update Commands', value: 'install' }
|
|
863
|
-
];
|
|
864
|
-
|
|
865
|
-
// Add reinstall declined option if there are declined commands
|
|
866
|
-
const declinedCommandsWithSupport = declinedCommands.filter(tool =>
|
|
867
|
-
commandSupportedTools.includes(tool)
|
|
868
|
-
);
|
|
869
|
-
if (declinedCommandsWithSupport.length > 0) {
|
|
870
|
-
menuChoices.push({
|
|
871
|
-
name: msg.reinstallDeclinedCommands || 'Reinstall declined Commands',
|
|
872
|
-
value: 'reinstall_declined'
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
menuChoices.push(
|
|
877
|
-
{ name: msg.viewStatus || 'View status only', value: 'view' },
|
|
878
|
-
{ name: common.cancel || 'Cancel', value: 'cancel' }
|
|
879
|
-
);
|
|
880
|
-
|
|
881
|
-
// Ask what action to take
|
|
882
|
-
const { action } = await inquirer.default.prompt([
|
|
883
|
-
{
|
|
884
|
-
type: 'list',
|
|
885
|
-
name: 'action',
|
|
886
|
-
message: msg.commandsAction || 'What would you like to do?',
|
|
887
|
-
choices: menuChoices
|
|
888
|
-
}
|
|
889
|
-
]);
|
|
890
|
-
|
|
891
|
-
if (action === 'cancel' || action === 'view') {
|
|
892
|
-
console.log(chalk.gray(msg.noChanges || 'No changes made'));
|
|
893
|
-
return;
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
// Handle reinstall declined action
|
|
897
|
-
if (action === 'reinstall_declined') {
|
|
898
|
-
if (declinedCommandsWithSupport.length === 0) {
|
|
899
|
-
console.log(chalk.gray(msg.noChanges || 'No changes made'));
|
|
900
|
-
return;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
// Install Commands
|
|
904
|
-
const spinner = ora(msg.installingCommands || 'Installing Commands...').start();
|
|
905
|
-
const result = await installCommandsToMultipleAgents(declinedCommandsWithSupport, null, projectPath);
|
|
906
|
-
spinner.stop();
|
|
907
|
-
|
|
908
|
-
if (result.success) {
|
|
909
|
-
console.log(chalk.green(msg.commandsInstallSuccess || 'Commands installed successfully'));
|
|
910
|
-
console.log(chalk.gray(` ${msg.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
|
|
911
|
-
} else {
|
|
912
|
-
console.log(chalk.yellow(msg.commandsInstallPartial || 'Commands installed with some issues'));
|
|
913
|
-
if (result.totalErrors > 0) {
|
|
914
|
-
console.log(chalk.red(` ${msg.errors || 'Errors'}: ${result.totalErrors}`));
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
// Update manifest - clear declined status for installed tools
|
|
919
|
-
manifest.commands = manifest.commands || {};
|
|
920
|
-
manifest.commands.installations = declinedCommandsWithSupport;
|
|
921
|
-
if (manifest.declinedFeatures?.commands) {
|
|
922
|
-
manifest.declinedFeatures.commands = manifest.declinedFeatures.commands.filter(
|
|
923
|
-
tool => !declinedCommandsWithSupport.includes(tool)
|
|
924
|
-
);
|
|
925
|
-
}
|
|
926
|
-
writeManifest(manifest, projectPath);
|
|
927
|
-
return;
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
// Use unified installation prompt
|
|
931
|
-
const selectedAgents = await promptCommandsInstallation(commandSupportedTools);
|
|
932
|
-
if (selectedAgents.length === 0) {
|
|
933
|
-
console.log(chalk.gray(msg.noChanges || 'No changes made'));
|
|
934
|
-
return;
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
// Install Commands
|
|
938
|
-
const spinner = ora(msg.installingCommands || 'Installing Commands...').start();
|
|
939
|
-
const result = await installCommandsToMultipleAgents(selectedAgents, null, projectPath);
|
|
940
|
-
spinner.stop();
|
|
941
|
-
|
|
942
|
-
if (result.success) {
|
|
943
|
-
console.log(chalk.green(msg.commandsInstallSuccess || 'Commands installed successfully'));
|
|
944
|
-
console.log(chalk.gray(` ${msg.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
|
|
945
|
-
} else {
|
|
946
|
-
console.log(chalk.yellow(msg.commandsInstallPartial || 'Commands installed with some issues'));
|
|
947
|
-
if (result.totalErrors > 0) {
|
|
948
|
-
console.log(chalk.red(` ${msg.errors || 'Errors'}: ${result.totalErrors}`));
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
// Update manifest
|
|
953
|
-
manifest.commands = manifest.commands || {};
|
|
954
|
-
manifest.commands.installations = selectedAgents;
|
|
955
|
-
writeManifest(manifest, projectPath);
|
|
8
|
+
return runProjectConfiguration(options);
|
|
956
9
|
}
|