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
|
@@ -0,0 +1,1262 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import inquirer from 'inquirer';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import { unlinkSync, existsSync } from 'fs';
|
|
5
|
+
import { join, basename } from 'path';
|
|
6
|
+
import { config } from '../utils/config-manager.js';
|
|
7
|
+
import { msg, t as getMessages, setLanguage, isLanguageExplicitlySet } from '../i18n/messages.js';
|
|
8
|
+
import {
|
|
9
|
+
getOptionSource,
|
|
10
|
+
findOption,
|
|
11
|
+
getAllStandards,
|
|
12
|
+
getStandardsByLevel,
|
|
13
|
+
getStandardSource
|
|
14
|
+
} from '../utils/registry.js';
|
|
15
|
+
import {
|
|
16
|
+
copyStandard,
|
|
17
|
+
readManifest,
|
|
18
|
+
writeManifest,
|
|
19
|
+
isInitialized
|
|
20
|
+
} from '../utils/copier.js';
|
|
21
|
+
import {
|
|
22
|
+
promptFormat,
|
|
23
|
+
promptGitWorkflow,
|
|
24
|
+
promptMergeStrategy,
|
|
25
|
+
promptCommitLanguage,
|
|
26
|
+
promptTestLevels,
|
|
27
|
+
promptConfirm,
|
|
28
|
+
promptManageAITools,
|
|
29
|
+
promptAdoptionLevel,
|
|
30
|
+
promptContentModeChange,
|
|
31
|
+
handleAgentsMdSharing,
|
|
32
|
+
promptMethodology,
|
|
33
|
+
promptSkillsInstallLocation,
|
|
34
|
+
promptCommandsInstallation
|
|
35
|
+
} from '../prompts/init.js';
|
|
36
|
+
import {
|
|
37
|
+
installSkillsToMultipleAgents,
|
|
38
|
+
installCommandsToMultipleAgents,
|
|
39
|
+
getInstalledSkillsInfoForAgent,
|
|
40
|
+
getInstalledCommandsForAgent
|
|
41
|
+
} from '../utils/skills-installer.js';
|
|
42
|
+
import {
|
|
43
|
+
getAgentConfig,
|
|
44
|
+
getAgentDisplayName
|
|
45
|
+
} from '../config/ai-agent-paths.js';
|
|
46
|
+
import {
|
|
47
|
+
writeIntegrationFile,
|
|
48
|
+
getToolFilePath
|
|
49
|
+
} from '../utils/integration-generator.js';
|
|
50
|
+
import { getMarketplaceSkillsInfo } from '../utils/github.js';
|
|
51
|
+
import { regenerateIntegrations } from './update.js';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Get localized message with fallback (for config-specific keys)
|
|
55
|
+
*/
|
|
56
|
+
function t(key, fallback) {
|
|
57
|
+
return msg(key) || fallback;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Vibe mode presets for different development styles
|
|
62
|
+
*/
|
|
63
|
+
const VIBE_PRESETS = {
|
|
64
|
+
relaxed: {
|
|
65
|
+
name: 'Relaxed (Prototype/Hackathon)',
|
|
66
|
+
description: 'Maximum speed, minimal interrupts. Good for rapid prototyping.',
|
|
67
|
+
settings: {
|
|
68
|
+
'hitl.threshold': 4,
|
|
69
|
+
'vibe-coding.enabled': true,
|
|
70
|
+
'vibe-coding.micro-specs.require-confirmation': false,
|
|
71
|
+
'vibe-coding.auto-sweep.enabled': true,
|
|
72
|
+
'vibe-coding.auto-sweep.trigger': 'session-end',
|
|
73
|
+
'vibe-coding.standards-injection.mode': 'soft'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
balanced: {
|
|
77
|
+
name: 'Balanced (Recommended)',
|
|
78
|
+
description: 'Good balance between speed and safety. Confirms critical actions.',
|
|
79
|
+
settings: {
|
|
80
|
+
'hitl.threshold': 2,
|
|
81
|
+
'vibe-coding.enabled': true,
|
|
82
|
+
'vibe-coding.micro-specs.require-confirmation': true,
|
|
83
|
+
'vibe-coding.auto-sweep.enabled': true,
|
|
84
|
+
'vibe-coding.auto-sweep.trigger': 'session-end',
|
|
85
|
+
'vibe-coding.standards-injection.mode': 'soft'
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
strict: {
|
|
89
|
+
name: 'Strict (Production)',
|
|
90
|
+
description: 'Maximum safety. Confirms most actions. Good for production code.',
|
|
91
|
+
settings: {
|
|
92
|
+
'hitl.threshold': 1,
|
|
93
|
+
'vibe-coding.enabled': true,
|
|
94
|
+
'vibe-coding.micro-specs.require-confirmation': true,
|
|
95
|
+
'vibe-coding.auto-sweep.enabled': true,
|
|
96
|
+
'vibe-coding.auto-sweep.trigger': 'commit-hook',
|
|
97
|
+
'vibe-coding.standards-injection.mode': 'strict'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Handle config command — unified entry point
|
|
104
|
+
* @param {string} action - list, get, set, init
|
|
105
|
+
* @param {string} key - Config key
|
|
106
|
+
* @param {string} value - Config value
|
|
107
|
+
* @param {Object} options - Command options
|
|
108
|
+
*/
|
|
109
|
+
export async function configCommand(action, key, value, options) {
|
|
110
|
+
// Initialize config manager
|
|
111
|
+
const currentConfig = config.init();
|
|
112
|
+
|
|
113
|
+
// Handle 'list' action explicitly
|
|
114
|
+
if (action === 'list') {
|
|
115
|
+
console.log(chalk.bold('Current Configuration:'));
|
|
116
|
+
console.log(JSON.stringify(currentConfig, null, 2));
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Handle 'get' action
|
|
121
|
+
if (action === 'get') {
|
|
122
|
+
if (!key) {
|
|
123
|
+
console.error(chalk.red('Error: Key is required for get command'));
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const val = config.get(key);
|
|
127
|
+
console.log(val !== undefined ? val : chalk.gray('undefined'));
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Handle 'set' action
|
|
132
|
+
if (action === 'set') {
|
|
133
|
+
if (!key || value === undefined) {
|
|
134
|
+
console.error(chalk.red('Error: Key and value are required for set command'));
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Type inference
|
|
139
|
+
let typedValue = value;
|
|
140
|
+
if (value === 'true') typedValue = true;
|
|
141
|
+
if (value === 'false') typedValue = false;
|
|
142
|
+
if (!isNaN(Number(value))) typedValue = Number(value);
|
|
143
|
+
|
|
144
|
+
const scope = options.global ? 'global' : 'project';
|
|
145
|
+
config.set(key, typedValue, scope);
|
|
146
|
+
|
|
147
|
+
console.log(chalk.green(`Configuration updated (${scope}): ${key} = ${typedValue}`));
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Handle 'init' action
|
|
152
|
+
if (action === 'init') {
|
|
153
|
+
await handleConfigInit(options);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// No action: check for --type (direct project configuration) or show interactive menu
|
|
158
|
+
if (!action) {
|
|
159
|
+
// --type provided: go directly to project configuration
|
|
160
|
+
if (options.type) {
|
|
161
|
+
return runProjectConfiguration(options);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// --yes flag with no action: non-interactive mode, show JSON config
|
|
165
|
+
if (options.yes) {
|
|
166
|
+
console.log(chalk.bold('Current Configuration:'));
|
|
167
|
+
console.log(JSON.stringify(currentConfig, null, 2));
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// No arguments at all: show unified interactive menu
|
|
172
|
+
const projectPath = process.cwd();
|
|
173
|
+
const initialized = isInitialized(projectPath);
|
|
174
|
+
|
|
175
|
+
// Set language from manifest (same pattern as runProjectConfiguration)
|
|
176
|
+
if (initialized && !isLanguageExplicitlySet()) {
|
|
177
|
+
const manifest = readManifest(projectPath);
|
|
178
|
+
if (manifest) {
|
|
179
|
+
const langMap = {
|
|
180
|
+
'traditional-chinese': 'zh-tw',
|
|
181
|
+
'simplified-chinese': 'zh-cn',
|
|
182
|
+
english: 'en',
|
|
183
|
+
bilingual: 'en'
|
|
184
|
+
};
|
|
185
|
+
const uiLang = langMap[manifest.options?.commit_language] || 'en';
|
|
186
|
+
setLanguage(uiLang);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const menuChoices = [];
|
|
191
|
+
|
|
192
|
+
if (initialized) {
|
|
193
|
+
menuChoices.push({
|
|
194
|
+
name: t('config.menuProjectSettings', 'Project settings (level, AI tools, Skills, format, workflow...)'),
|
|
195
|
+
value: 'project'
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
menuChoices.push({
|
|
200
|
+
name: t('config.menuPreferences', 'Preferences (UI language, HITL threshold, Vibe Coding)'),
|
|
201
|
+
value: 'preferences'
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
menuChoices.push({
|
|
205
|
+
name: t('config.menuShowConfig', 'Show current configuration (JSON)'),
|
|
206
|
+
value: 'show'
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
const { menuChoice } = await inquirer.prompt([
|
|
210
|
+
{
|
|
211
|
+
type: 'list',
|
|
212
|
+
name: 'menuChoice',
|
|
213
|
+
message: t('config.menuQuestion', 'What would you like to configure?'),
|
|
214
|
+
choices: menuChoices
|
|
215
|
+
}
|
|
216
|
+
]);
|
|
217
|
+
|
|
218
|
+
if (menuChoice === 'project') {
|
|
219
|
+
return runProjectConfiguration(options);
|
|
220
|
+
} else if (menuChoice === 'preferences') {
|
|
221
|
+
await handleConfigInit(options);
|
|
222
|
+
return;
|
|
223
|
+
} else if (menuChoice === 'show') {
|
|
224
|
+
console.log(chalk.bold('Current Configuration:'));
|
|
225
|
+
console.log(JSON.stringify(currentConfig, null, 2));
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
console.error(chalk.red(`Unknown action: ${action}`));
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Handle config init with optional --vibe-mode
|
|
237
|
+
* @param {Object} options - Command options
|
|
238
|
+
*/
|
|
239
|
+
async function handleConfigInit(options) {
|
|
240
|
+
console.log('');
|
|
241
|
+
console.log(chalk.bold(t('config.initTitle', 'UDS Configuration Setup')));
|
|
242
|
+
console.log('');
|
|
243
|
+
|
|
244
|
+
// Check for --vibe-mode flag
|
|
245
|
+
if (options.vibeMode) {
|
|
246
|
+
await initVibeMode(options);
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Default init: show menu
|
|
251
|
+
const { initType } = await inquirer.prompt([
|
|
252
|
+
{
|
|
253
|
+
type: 'list',
|
|
254
|
+
name: 'initType',
|
|
255
|
+
message: t('config.initQuestion', 'What would you like to configure?'),
|
|
256
|
+
choices: [
|
|
257
|
+
{
|
|
258
|
+
name: t('config.vibeMode', 'Vibe Coding Mode - For AI-assisted development'),
|
|
259
|
+
value: 'vibe'
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: t('config.missionMode', 'Mission Mode - For goal-oriented development'),
|
|
263
|
+
value: 'mission'
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: t('config.customMode', 'Custom - Set individual options'),
|
|
267
|
+
value: 'custom'
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
]);
|
|
272
|
+
|
|
273
|
+
if (initType === 'vibe') {
|
|
274
|
+
await initVibeMode(options);
|
|
275
|
+
} else if (initType === 'mission') {
|
|
276
|
+
console.log(chalk.yellow(t('config.missionComingSoon', 'Mission mode setup coming soon!')));
|
|
277
|
+
console.log(chalk.gray(t('config.useStartCommand', 'For now, use: uds start <mission-type> <intent>')));
|
|
278
|
+
} else {
|
|
279
|
+
console.log(chalk.gray(t('config.customHint', 'Use: uds config set <key> <value>')));
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Initialize Vibe Coding mode
|
|
285
|
+
* @param {Object} options - Command options
|
|
286
|
+
*/
|
|
287
|
+
async function initVibeMode(options) {
|
|
288
|
+
console.log(chalk.bold(t('config.vibeModeTitle', 'Vibe Coding Configuration')));
|
|
289
|
+
console.log(chalk.gray(t('config.vibeModeDesc', 'Configure UDS for natural language-driven development')));
|
|
290
|
+
console.log('');
|
|
291
|
+
|
|
292
|
+
// Select preset
|
|
293
|
+
let preset;
|
|
294
|
+
if (options.yes) {
|
|
295
|
+
preset = 'balanced';
|
|
296
|
+
} else {
|
|
297
|
+
const { selectedPreset } = await inquirer.prompt([
|
|
298
|
+
{
|
|
299
|
+
type: 'list',
|
|
300
|
+
name: 'selectedPreset',
|
|
301
|
+
message: t('config.selectPreset', 'Select a preset:'),
|
|
302
|
+
choices: Object.entries(VIBE_PRESETS).map(([key, value]) => ({
|
|
303
|
+
name: `${t(`config.presets.${key}.name`, value.name)}\n ${chalk.gray(t(`config.presets.${key}.description`, value.description))}`,
|
|
304
|
+
value: key,
|
|
305
|
+
short: t(`config.presets.${key}.name`, value.name)
|
|
306
|
+
}))
|
|
307
|
+
}
|
|
308
|
+
]);
|
|
309
|
+
preset = selectedPreset;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
const presetConfig = VIBE_PRESETS[preset];
|
|
313
|
+
const scope = options.global ? 'global' : 'project';
|
|
314
|
+
|
|
315
|
+
// Show what will be set
|
|
316
|
+
console.log('');
|
|
317
|
+
const presetName = t(`config.presets.${preset}.name`, presetConfig.name);
|
|
318
|
+
console.log(chalk.cyan(`${t('config.applyingPreset', 'Applying preset:')} ${presetName}`));
|
|
319
|
+
console.log(chalk.gray('─'.repeat(50)));
|
|
320
|
+
|
|
321
|
+
for (const [key, value] of Object.entries(presetConfig.settings)) {
|
|
322
|
+
console.log(` ${key}: ${chalk.yellow(value)}`);
|
|
323
|
+
}
|
|
324
|
+
console.log(chalk.gray('─'.repeat(50)));
|
|
325
|
+
|
|
326
|
+
// Confirm unless --yes
|
|
327
|
+
if (!options.yes) {
|
|
328
|
+
const { confirm } = await inquirer.prompt([
|
|
329
|
+
{
|
|
330
|
+
type: 'confirm',
|
|
331
|
+
name: 'confirm',
|
|
332
|
+
message: t('config.confirmApply', 'Apply these settings?'),
|
|
333
|
+
default: true
|
|
334
|
+
}
|
|
335
|
+
]);
|
|
336
|
+
|
|
337
|
+
if (!confirm) {
|
|
338
|
+
console.log(chalk.gray(t('config.cancelled', 'Configuration cancelled.')));
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// Apply settings
|
|
344
|
+
for (const [key, value] of Object.entries(presetConfig.settings)) {
|
|
345
|
+
config.set(key, value, scope);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
console.log('');
|
|
349
|
+
console.log(chalk.green(t('config.vibeEnabled', 'Vibe Coding mode enabled!')));
|
|
350
|
+
console.log('');
|
|
351
|
+
console.log(chalk.gray(t('config.nextSteps', 'Next steps:')));
|
|
352
|
+
console.log(chalk.gray(` • ${t('config.useSpec', 'Generate specs:')} uds spec create "your idea"`));
|
|
353
|
+
console.log(chalk.gray(` • ${t('config.useSweep', 'Clean up code:')} uds sweep`));
|
|
354
|
+
console.log(chalk.gray(` • ${t('config.useStart', 'Start a mission:')} uds start greenfield "MyApp"`));
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Run project configuration (formerly configureCommand)
|
|
359
|
+
* @param {Object} options - Command options
|
|
360
|
+
*/
|
|
361
|
+
export async function runProjectConfiguration(options) {
|
|
362
|
+
const projectPath = process.cwd();
|
|
363
|
+
|
|
364
|
+
// Check if initialized first
|
|
365
|
+
if (!isInitialized(projectPath)) {
|
|
366
|
+
const common = getMessages().commands.common;
|
|
367
|
+
console.log(chalk.red(common.notInitialized));
|
|
368
|
+
console.log(chalk.gray(` ${common.runInit}`));
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// Read manifest and set language before using getMessages()
|
|
373
|
+
const manifest = readManifest(projectPath);
|
|
374
|
+
if (!manifest) {
|
|
375
|
+
const common = getMessages().commands.common;
|
|
376
|
+
console.log(chalk.red(common.couldNotReadManifest));
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// Set UI language based on commit_language setting
|
|
381
|
+
// Only override if user didn't explicitly set --ui-lang flag
|
|
382
|
+
if (!isLanguageExplicitlySet()) {
|
|
383
|
+
const langMap = {
|
|
384
|
+
'traditional-chinese': 'zh-tw',
|
|
385
|
+
'simplified-chinese': 'zh-cn',
|
|
386
|
+
english: 'en',
|
|
387
|
+
bilingual: 'en'
|
|
388
|
+
};
|
|
389
|
+
const uiLang = langMap[manifest.options?.commit_language] || 'en';
|
|
390
|
+
setLanguage(uiLang);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// Now get localized messages
|
|
394
|
+
const msgObj = getMessages().commands.configure;
|
|
395
|
+
const common = getMessages().commands.common;
|
|
396
|
+
|
|
397
|
+
console.log();
|
|
398
|
+
console.log(chalk.bold(msgObj.title));
|
|
399
|
+
console.log(chalk.gray('─'.repeat(50)));
|
|
400
|
+
|
|
401
|
+
console.log();
|
|
402
|
+
console.log(chalk.cyan(msgObj.currentConfig));
|
|
403
|
+
console.log(chalk.gray(` ${common.level}: ${manifest.level || 2}`));
|
|
404
|
+
console.log(chalk.gray(` ${common.format}: ${manifest.format || 'human'}`));
|
|
405
|
+
console.log(chalk.gray(` ${common.contentMode}: ${manifest.contentMode || 'minimal'}`));
|
|
406
|
+
console.log(chalk.gray(` ${common.aiTools}: ${manifest.aiTools?.length > 0 ? manifest.aiTools.join(', ') : common.none}`));
|
|
407
|
+
// Only show methodology with -E flag (completely hidden otherwise)
|
|
408
|
+
if (options.experimental && manifest.methodology?.active) {
|
|
409
|
+
console.log(chalk.gray(` ${common.methodology}: ${manifest.methodology.active.toUpperCase()}`) + chalk.yellow(` ${msgObj.experimental}`));
|
|
410
|
+
}
|
|
411
|
+
if (manifest.options) {
|
|
412
|
+
if (manifest.options.workflow) {
|
|
413
|
+
console.log(chalk.gray(` ${msgObj.gitWorkflow}: ${manifest.options.workflow}`));
|
|
414
|
+
}
|
|
415
|
+
if (manifest.options.merge_strategy) {
|
|
416
|
+
console.log(chalk.gray(` ${msgObj.mergeStrategy}: ${manifest.options.merge_strategy}`));
|
|
417
|
+
}
|
|
418
|
+
if (manifest.options.commit_language) {
|
|
419
|
+
console.log(chalk.gray(` ${msgObj.commitLanguage}: ${manifest.options.commit_language}`));
|
|
420
|
+
}
|
|
421
|
+
if (manifest.options.test_levels && manifest.options.test_levels.length > 0) {
|
|
422
|
+
console.log(chalk.gray(` ${msgObj.testLevels}: ${manifest.options.test_levels.join(', ')}`));
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
console.log();
|
|
426
|
+
|
|
427
|
+
// Determine what to configure based on options or interactive mode
|
|
428
|
+
let configType = options.type || null;
|
|
429
|
+
|
|
430
|
+
if (!configType) {
|
|
431
|
+
const inq = await import('inquirer');
|
|
432
|
+
|
|
433
|
+
// Build choices array - methodology only shown with -E flag
|
|
434
|
+
const baseChoices = [
|
|
435
|
+
{ name: msgObj.optionFormat, value: 'format' },
|
|
436
|
+
{ name: msgObj.optionWorkflow, value: 'workflow' },
|
|
437
|
+
{ name: msgObj.optionMergeStrategy, value: 'merge_strategy' },
|
|
438
|
+
{ name: msgObj.optionCommitLanguage, value: 'commit_language' },
|
|
439
|
+
{ name: msgObj.optionTestLevels, value: 'test_levels' },
|
|
440
|
+
new inq.default.Separator(),
|
|
441
|
+
{ name: chalk.cyan(msgObj.optionAITools), value: 'ai_tools' },
|
|
442
|
+
{ name: chalk.cyan(msgObj.optionSkills || 'Manage Skills installations'), value: 'skills' },
|
|
443
|
+
{ name: chalk.cyan(msgObj.optionCommands || 'Manage Commands installations'), value: 'commands' },
|
|
444
|
+
new inq.default.Separator(),
|
|
445
|
+
{ name: chalk.cyan(msgObj.optionLevel), value: 'level' },
|
|
446
|
+
{ name: chalk.cyan(msgObj.optionContentMode), value: 'content_mode' }
|
|
447
|
+
];
|
|
448
|
+
|
|
449
|
+
// Only add methodology option when -E flag is used
|
|
450
|
+
if (options.experimental) {
|
|
451
|
+
baseChoices.push(
|
|
452
|
+
{ name: `${chalk.cyan(msgObj.optionMethodology)} ${chalk.yellow(msgObj.experimental)}`, value: 'methodology' }
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
baseChoices.push(
|
|
457
|
+
new inq.default.Separator(),
|
|
458
|
+
{ name: msgObj.optionAll, value: 'all' }
|
|
459
|
+
);
|
|
460
|
+
|
|
461
|
+
const { type } = await inq.default.prompt([
|
|
462
|
+
{
|
|
463
|
+
type: 'list',
|
|
464
|
+
name: 'type',
|
|
465
|
+
message: msgObj.selectOption,
|
|
466
|
+
choices: baseChoices
|
|
467
|
+
}
|
|
468
|
+
]);
|
|
469
|
+
configType = type;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// Collect new options
|
|
473
|
+
const newOptions = { ...manifest.options };
|
|
474
|
+
let newFormat = manifest.format;
|
|
475
|
+
let newLevel = manifest.level || 2;
|
|
476
|
+
let newContentMode = manifest.contentMode || 'minimal';
|
|
477
|
+
let newAITools = [...(manifest.aiTools || [])];
|
|
478
|
+
let needsIntegrationRegeneration = false;
|
|
479
|
+
|
|
480
|
+
// Handle AI Tools configuration
|
|
481
|
+
if (configType === 'ai_tools') {
|
|
482
|
+
const result = await promptManageAITools(manifest.aiTools || []);
|
|
483
|
+
|
|
484
|
+
if (result.action === 'add' && result.tools.length > 0) {
|
|
485
|
+
// Handle AGENTS.md sharing
|
|
486
|
+
const toolsWithSharing = handleAgentsMdSharing(result.tools);
|
|
487
|
+
newAITools = [...new Set([...newAITools, ...toolsWithSharing])];
|
|
488
|
+
needsIntegrationRegeneration = true;
|
|
489
|
+
} else if (result.action === 'remove' && result.tools.length > 0) {
|
|
490
|
+
newAITools = newAITools.filter(tool => !result.tools.includes(tool));
|
|
491
|
+
|
|
492
|
+
// Remove integration files for removed tools
|
|
493
|
+
const spinner = ora(msgObj.removingIntegrations).start();
|
|
494
|
+
for (const tool of result.tools) {
|
|
495
|
+
const filePath = join(projectPath, getToolFilePath(tool));
|
|
496
|
+
if (existsSync(filePath)) {
|
|
497
|
+
try {
|
|
498
|
+
unlinkSync(filePath);
|
|
499
|
+
console.log(chalk.gray(` ${msgObj.removed}: ${getToolFilePath(tool)}`));
|
|
500
|
+
} catch (err) {
|
|
501
|
+
console.log(chalk.yellow(` ${msgObj.couldNotRemove}: ${getToolFilePath(tool)}`));
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
spinner.succeed(msgObj.integrationsRemoved);
|
|
506
|
+
} else if (result.action === 'view' || result.action === 'cancel') {
|
|
507
|
+
console.log(chalk.gray(msgObj.noChanges));
|
|
508
|
+
process.exit(0);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// Handle Skills configuration
|
|
513
|
+
if (configType === 'skills') {
|
|
514
|
+
await handleSkillsConfiguration(manifest, projectPath, msgObj, common, options.aiTool, options.skillsLocation);
|
|
515
|
+
process.exit(0);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// Handle Commands configuration
|
|
519
|
+
if (configType === 'commands') {
|
|
520
|
+
await handleCommandsConfiguration(manifest, projectPath, msgObj, common, options.aiTool);
|
|
521
|
+
process.exit(0);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
// Handle Level configuration
|
|
525
|
+
if (configType === 'level') {
|
|
526
|
+
newLevel = await promptAdoptionLevel(manifest.level || 2);
|
|
527
|
+
if (newLevel !== manifest.level) {
|
|
528
|
+
needsIntegrationRegeneration = true;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// Handle Content Mode configuration
|
|
533
|
+
if (configType === 'content_mode') {
|
|
534
|
+
newContentMode = await promptContentModeChange(manifest.contentMode || 'minimal');
|
|
535
|
+
if (newContentMode !== manifest.contentMode) {
|
|
536
|
+
needsIntegrationRegeneration = true;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// Handle Methodology configuration
|
|
541
|
+
let newMethodology = manifest.methodology?.active || null;
|
|
542
|
+
if (configType === 'methodology') {
|
|
543
|
+
newMethodology = await promptMethodology();
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// Handle traditional options
|
|
547
|
+
if (configType === 'all' || configType === 'format') {
|
|
548
|
+
newFormat = await promptFormat();
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
if (configType === 'all' || configType === 'workflow') {
|
|
552
|
+
newOptions.workflow = await promptGitWorkflow();
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
if (configType === 'all' || configType === 'merge_strategy') {
|
|
556
|
+
newOptions.merge_strategy = await promptMergeStrategy();
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
if (configType === 'all' || configType === 'commit_language') {
|
|
560
|
+
newOptions.commit_language = await promptCommitLanguage();
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
if (configType === 'all' || configType === 'test_levels') {
|
|
564
|
+
newOptions.test_levels = await promptTestLevels();
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
// Show changes
|
|
568
|
+
console.log();
|
|
569
|
+
console.log(chalk.cyan(msgObj.newConfig));
|
|
570
|
+
console.log(chalk.gray(` ${common.level}: ${newLevel}`));
|
|
571
|
+
console.log(chalk.gray(` ${common.format}: ${newFormat}`));
|
|
572
|
+
console.log(chalk.gray(` ${common.contentMode}: ${newContentMode}`));
|
|
573
|
+
console.log(chalk.gray(` ${common.aiTools}: ${newAITools.length > 0 ? newAITools.join(', ') : common.none}`));
|
|
574
|
+
if (newMethodology) {
|
|
575
|
+
console.log(chalk.gray(` ${common.methodology}: ${newMethodology.toUpperCase()}`));
|
|
576
|
+
}
|
|
577
|
+
if (newOptions.workflow) {
|
|
578
|
+
console.log(chalk.gray(` ${msgObj.gitWorkflow}: ${newOptions.workflow}`));
|
|
579
|
+
}
|
|
580
|
+
if (newOptions.merge_strategy) {
|
|
581
|
+
console.log(chalk.gray(` ${msgObj.mergeStrategy}: ${newOptions.merge_strategy}`));
|
|
582
|
+
}
|
|
583
|
+
if (newOptions.commit_language) {
|
|
584
|
+
console.log(chalk.gray(` ${msgObj.commitLanguage}: ${newOptions.commit_language}`));
|
|
585
|
+
}
|
|
586
|
+
if (newOptions.test_levels && newOptions.test_levels.length > 0) {
|
|
587
|
+
console.log(chalk.gray(` ${msgObj.testLevels}: ${newOptions.test_levels.join(', ')}`));
|
|
588
|
+
}
|
|
589
|
+
console.log();
|
|
590
|
+
|
|
591
|
+
// Confirm (skip if --yes flag is provided)
|
|
592
|
+
if (!options.yes) {
|
|
593
|
+
const confirmed = await promptConfirm(msgObj.applyChanges);
|
|
594
|
+
if (!confirmed) {
|
|
595
|
+
console.log(chalk.yellow(msgObj.configCancelled));
|
|
596
|
+
process.exit(0);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
// Apply changes
|
|
601
|
+
const spinner = ora(msgObj.updatingConfig).start();
|
|
602
|
+
|
|
603
|
+
const results = {
|
|
604
|
+
copied: [],
|
|
605
|
+
generated: [],
|
|
606
|
+
errors: []
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
const standards = getAllStandards();
|
|
610
|
+
const formatsToUse = newFormat === 'both' ? ['ai', 'human'] : [newFormat];
|
|
611
|
+
|
|
612
|
+
// Helper to copy option files
|
|
613
|
+
const copyOptionFile = async (std, optionCategory, optionId, targetFormat) => {
|
|
614
|
+
const option = findOption(std, optionCategory, optionId);
|
|
615
|
+
if (option) {
|
|
616
|
+
const sourcePath = getOptionSource(option, targetFormat);
|
|
617
|
+
const result = await copyStandard(sourcePath, '.standards/options', projectPath);
|
|
618
|
+
if (result.success) {
|
|
619
|
+
results.copied.push(sourcePath);
|
|
620
|
+
} else {
|
|
621
|
+
results.errors.push(`${sourcePath}: ${result.error}`);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
// Copy new option files
|
|
627
|
+
for (const std of standards) {
|
|
628
|
+
if (!std.options) continue;
|
|
629
|
+
|
|
630
|
+
for (const targetFormat of formatsToUse) {
|
|
631
|
+
// Git workflow
|
|
632
|
+
if (std.id === 'git-workflow') {
|
|
633
|
+
if (newOptions.workflow && newOptions.workflow !== manifest.options?.workflow) {
|
|
634
|
+
await copyOptionFile(std, 'workflow', newOptions.workflow, targetFormat);
|
|
635
|
+
}
|
|
636
|
+
if (newOptions.merge_strategy && newOptions.merge_strategy !== manifest.options?.merge_strategy) {
|
|
637
|
+
await copyOptionFile(std, 'merge_strategy', newOptions.merge_strategy, targetFormat);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
// Commit message
|
|
642
|
+
if (std.id === 'commit-message') {
|
|
643
|
+
if (newOptions.commit_language && newOptions.commit_language !== manifest.options?.commit_language) {
|
|
644
|
+
await copyOptionFile(std, 'commit_language', newOptions.commit_language, targetFormat);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// Testing
|
|
649
|
+
if (std.id === 'testing' && newOptions.test_levels) {
|
|
650
|
+
for (const level of newOptions.test_levels) {
|
|
651
|
+
if (!manifest.options?.test_levels?.includes(level)) {
|
|
652
|
+
await copyOptionFile(std, 'test_level', level, targetFormat);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
// Handle level change - copy new standards if upgrading
|
|
660
|
+
if (newLevel > (manifest.level || 2)) {
|
|
661
|
+
const levelSpinner = ora(msgObj.addingStandards).start();
|
|
662
|
+
const newStandards = getStandardsByLevel(newLevel);
|
|
663
|
+
const existingStandards = new Set(manifest.standards?.map(s => basename(s)) || []);
|
|
664
|
+
|
|
665
|
+
for (const std of newStandards) {
|
|
666
|
+
for (const targetFormat of formatsToUse) {
|
|
667
|
+
const sourcePath = getStandardSource(std, targetFormat);
|
|
668
|
+
const fileName = basename(sourcePath);
|
|
669
|
+
if (!existingStandards.has(fileName)) {
|
|
670
|
+
const result = await copyStandard(sourcePath, '.standards', projectPath);
|
|
671
|
+
if (result.success) {
|
|
672
|
+
results.copied.push(sourcePath);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
levelSpinner.succeed(msgObj.standardsAdded);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// Regenerate integration files if needed
|
|
681
|
+
if (needsIntegrationRegeneration && newAITools.length > 0) {
|
|
682
|
+
const intSpinner = ora(msgObj.regeneratingIntegrations).start();
|
|
683
|
+
|
|
684
|
+
// Build installed standards list
|
|
685
|
+
const installedStandardsList = manifest.standards?.map(s => basename(s)) || [];
|
|
686
|
+
|
|
687
|
+
// Determine language setting
|
|
688
|
+
let commonLanguage = 'en';
|
|
689
|
+
if (newOptions.commit_language === 'bilingual') {
|
|
690
|
+
commonLanguage = 'bilingual';
|
|
691
|
+
} else if (newOptions.commit_language === 'traditional-chinese') {
|
|
692
|
+
commonLanguage = 'zh-tw';
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
// Track generated files to handle AGENTS.md sharing
|
|
696
|
+
const generatedFiles = new Set();
|
|
697
|
+
|
|
698
|
+
for (const tool of newAITools) {
|
|
699
|
+
const targetFile = getToolFilePath(tool);
|
|
700
|
+
if (generatedFiles.has(targetFile)) {
|
|
701
|
+
continue; // Skip if already generated (AGENTS.md sharing)
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
const toolConfig = {
|
|
705
|
+
tool,
|
|
706
|
+
categories: ['anti-hallucination', 'commit-standards', 'code-review'],
|
|
707
|
+
language: commonLanguage,
|
|
708
|
+
installedStandards: installedStandardsList,
|
|
709
|
+
contentMode: newContentMode,
|
|
710
|
+
level: newLevel,
|
|
711
|
+
// Pass commit_language for dynamic commit standards generation
|
|
712
|
+
commitLanguage: newOptions.commit_language || 'english'
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
const result = writeIntegrationFile(tool, toolConfig, projectPath);
|
|
716
|
+
if (result.success) {
|
|
717
|
+
results.generated.push(result.path);
|
|
718
|
+
generatedFiles.add(targetFile);
|
|
719
|
+
} else {
|
|
720
|
+
results.errors.push(`${tool}: ${result.error}`);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
intSpinner.succeed(msgObj.regeneratedIntegrations.replace('{count}', results.generated.length));
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
// Update manifest
|
|
727
|
+
manifest.format = newFormat;
|
|
728
|
+
manifest.options = newOptions;
|
|
729
|
+
manifest.level = newLevel;
|
|
730
|
+
manifest.contentMode = newContentMode;
|
|
731
|
+
manifest.aiTools = newAITools;
|
|
732
|
+
manifest.version = '3.2.0';
|
|
733
|
+
|
|
734
|
+
// Update methodology
|
|
735
|
+
if (newMethodology) {
|
|
736
|
+
manifest.methodology = {
|
|
737
|
+
active: newMethodology,
|
|
738
|
+
available: ['tdd', 'bdd', 'sdd', 'atdd'],
|
|
739
|
+
config: {
|
|
740
|
+
checkpointsEnabled: true,
|
|
741
|
+
reminderIntensity: 'suggest',
|
|
742
|
+
skipLimit: 3
|
|
743
|
+
}
|
|
744
|
+
};
|
|
745
|
+
} else if (configType === 'methodology' && !newMethodology) {
|
|
746
|
+
// User explicitly chose "None"
|
|
747
|
+
manifest.methodology = null;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
writeManifest(manifest, projectPath);
|
|
751
|
+
|
|
752
|
+
spinner.succeed(msgObj.configUpdated);
|
|
753
|
+
|
|
754
|
+
// Summary
|
|
755
|
+
console.log();
|
|
756
|
+
console.log(chalk.green(msgObj.configSuccess));
|
|
757
|
+
if (results.copied.length > 0) {
|
|
758
|
+
console.log(chalk.gray(` ${msgObj.newOptionsCopied.replace('{count}', results.copied.length)}`));
|
|
759
|
+
}
|
|
760
|
+
if (results.generated.length > 0) {
|
|
761
|
+
console.log(chalk.gray(` ${msgObj.integrationsRegenerated.replace('{count}', results.generated.length)}`));
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
if (results.errors.length > 0) {
|
|
765
|
+
console.log();
|
|
766
|
+
console.log(chalk.yellow(msgObj.errorsOccurred.replace('{count}', results.errors.length)));
|
|
767
|
+
for (const err of results.errors) {
|
|
768
|
+
console.log(chalk.gray(` ${err}`));
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
// Smart apply: offer to regenerate integrations if config changed but not already regenerated
|
|
773
|
+
// Skip for types that have their own flow or don't affect integrations
|
|
774
|
+
const skipApplyTypes = ['skills', 'commands', 'methodology'];
|
|
775
|
+
const alreadyRegenerated = results.generated.length > 0;
|
|
776
|
+
const shouldOfferApply = !skipApplyTypes.includes(configType) &&
|
|
777
|
+
newAITools.length > 0 &&
|
|
778
|
+
!alreadyRegenerated;
|
|
779
|
+
|
|
780
|
+
if (shouldOfferApply) {
|
|
781
|
+
console.log();
|
|
782
|
+
|
|
783
|
+
if (options.yes) {
|
|
784
|
+
// --yes flag: auto-apply without prompting
|
|
785
|
+
const applySpinner = ora(msgObj.applyingChanges).start();
|
|
786
|
+
const applyResults = regenerateIntegrations(projectPath, manifest);
|
|
787
|
+
applySpinner.succeed(msgObj.changesApplied || msgObj.regeneratedIntegrations.replace('{count}', applyResults.updated.length));
|
|
788
|
+
|
|
789
|
+
// Update manifest with new file hashes
|
|
790
|
+
writeManifest(manifest, projectPath);
|
|
791
|
+
|
|
792
|
+
if (applyResults.errors.length > 0) {
|
|
793
|
+
console.log(chalk.yellow(msgObj.errorsOccurred.replace('{count}', applyResults.errors.length)));
|
|
794
|
+
for (const err of applyResults.errors) {
|
|
795
|
+
console.log(chalk.gray(` ${err}`));
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
} else {
|
|
799
|
+
// Interactive mode: prompt user
|
|
800
|
+
const inq = await import('inquirer');
|
|
801
|
+
const { apply } = await inq.default.prompt([{
|
|
802
|
+
type: 'confirm',
|
|
803
|
+
name: 'apply',
|
|
804
|
+
message: msgObj.applyChangesNow,
|
|
805
|
+
default: true
|
|
806
|
+
}]);
|
|
807
|
+
|
|
808
|
+
if (apply) {
|
|
809
|
+
const applySpinner = ora(msgObj.applyingChanges).start();
|
|
810
|
+
const applyResults = regenerateIntegrations(projectPath, manifest);
|
|
811
|
+
applySpinner.succeed(msgObj.changesApplied || msgObj.regeneratedIntegrations.replace('{count}', applyResults.updated.length));
|
|
812
|
+
|
|
813
|
+
// Update manifest with new file hashes
|
|
814
|
+
writeManifest(manifest, projectPath);
|
|
815
|
+
|
|
816
|
+
if (applyResults.errors.length > 0) {
|
|
817
|
+
console.log(chalk.yellow(msgObj.errorsOccurred.replace('{count}', applyResults.errors.length)));
|
|
818
|
+
for (const err of applyResults.errors) {
|
|
819
|
+
console.log(chalk.gray(` ${err}`));
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
} else {
|
|
823
|
+
console.log(chalk.gray(msgObj.runUpdateLater));
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
console.log();
|
|
829
|
+
|
|
830
|
+
// Exit explicitly to prevent hanging due to inquirer's readline interface
|
|
831
|
+
process.exit(0);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Handle Skills configuration
|
|
836
|
+
* @param {Object} manifest - Project manifest
|
|
837
|
+
* @param {string} projectPath - Project path
|
|
838
|
+
* @param {Object} msgObj - i18n messages
|
|
839
|
+
* @param {Object} common - Common i18n messages
|
|
840
|
+
* @param {string} [specificTool] - Specific AI tool to install (non-interactive mode)
|
|
841
|
+
* @param {string} [skillsLocation] - Skills installation location (project, user) for non-interactive mode
|
|
842
|
+
*/
|
|
843
|
+
async function handleSkillsConfiguration(manifest, projectPath, msgObj, common, specificTool, skillsLocation) {
|
|
844
|
+
const inq = await import('inquirer');
|
|
845
|
+
const aiTools = manifest.aiTools || [];
|
|
846
|
+
|
|
847
|
+
// Non-interactive mode: install for specific tool
|
|
848
|
+
if (specificTool) {
|
|
849
|
+
const agentCfg = getAgentConfig(specificTool);
|
|
850
|
+
if (!agentCfg) {
|
|
851
|
+
console.log(chalk.red(`Unknown AI tool: ${specificTool}`));
|
|
852
|
+
console.log(chalk.gray(' Available tools: claude-code, opencode, copilot, gemini-cli, roo-code, cursor, windsurf, cline, codex'));
|
|
853
|
+
return;
|
|
854
|
+
}
|
|
855
|
+
if (!agentCfg.supportsSkills) {
|
|
856
|
+
console.log(chalk.yellow(`${getAgentDisplayName(specificTool)} does not support Skills`));
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
// Validate skillsLocation if provided
|
|
861
|
+
const validLocations = ['project', 'user'];
|
|
862
|
+
const level = skillsLocation && validLocations.includes(skillsLocation) ? skillsLocation : 'project';
|
|
863
|
+
|
|
864
|
+
// Install to specified level (defaults to project)
|
|
865
|
+
const installations = [{ agent: specificTool, level }];
|
|
866
|
+
const spinner = ora(`Installing Skills for ${getAgentDisplayName(specificTool)} (${level} level)...`).start();
|
|
867
|
+
const result = await installSkillsToMultipleAgents(installations, null, projectPath);
|
|
868
|
+
spinner.stop();
|
|
869
|
+
|
|
870
|
+
if (result.success) {
|
|
871
|
+
console.log(chalk.green(`Skills installed for ${getAgentDisplayName(specificTool)}`));
|
|
872
|
+
} else {
|
|
873
|
+
console.log(chalk.yellow('Skills installation completed with issues'));
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
// Update manifest
|
|
877
|
+
manifest.skills = manifest.skills || {};
|
|
878
|
+
manifest.skills.installations = manifest.skills.installations || [];
|
|
879
|
+
const existing = manifest.skills.installations.findIndex(i => i.agent === specificTool);
|
|
880
|
+
if (existing >= 0) {
|
|
881
|
+
manifest.skills.installations[existing] = installations[0];
|
|
882
|
+
} else {
|
|
883
|
+
manifest.skills.installations.push(installations[0]);
|
|
884
|
+
}
|
|
885
|
+
writeManifest(manifest, projectPath);
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
// Interactive mode
|
|
890
|
+
if (aiTools.length === 0) {
|
|
891
|
+
console.log(chalk.yellow(msgObj.noAiToolsConfigured || 'No AI tools configured'));
|
|
892
|
+
console.log(chalk.gray(` ${msgObj.addAiToolsFirst || 'Add AI tools first with: uds config --type ai_tools'}`));
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
// Get declined skills from manifest
|
|
897
|
+
const declinedSkills = manifest.declinedFeatures?.skills || [];
|
|
898
|
+
|
|
899
|
+
// Check if Skills are installed via marketplace (Claude Code only)
|
|
900
|
+
const marketplaceInfo = getMarketplaceSkillsInfo();
|
|
901
|
+
const hasMarketplaceSkills = marketplaceInfo?.installed;
|
|
902
|
+
|
|
903
|
+
// Show current Skills status
|
|
904
|
+
console.log(chalk.cyan(msgObj.currentSkillsStatus || 'Current Skills status:'));
|
|
905
|
+
|
|
906
|
+
// Show marketplace status if applicable
|
|
907
|
+
if (hasMarketplaceSkills && aiTools.includes('claude-code')) {
|
|
908
|
+
console.log(chalk.green(` ✓ ${msgObj.viaMarketplace || 'Via Marketplace'}: ${marketplaceInfo.version || 'installed'}`));
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
for (const tool of aiTools) {
|
|
912
|
+
const agentCfg = getAgentConfig(tool);
|
|
913
|
+
if (!agentCfg?.supportsSkills) continue;
|
|
914
|
+
|
|
915
|
+
const displayName = getAgentDisplayName(tool);
|
|
916
|
+
const projectInfo = getInstalledSkillsInfoForAgent(tool, 'project', projectPath);
|
|
917
|
+
const userInfo = getInstalledSkillsInfoForAgent(tool, 'user', projectPath);
|
|
918
|
+
|
|
919
|
+
if (projectInfo?.installed || userInfo?.installed) {
|
|
920
|
+
console.log(chalk.green(` ✓ ${displayName}:`));
|
|
921
|
+
if (userInfo?.installed) {
|
|
922
|
+
console.log(chalk.gray(` - User: ${userInfo.version || 'installed'}`));
|
|
923
|
+
}
|
|
924
|
+
if (projectInfo?.installed) {
|
|
925
|
+
console.log(chalk.gray(` - Project: ${projectInfo.version || 'installed'}`));
|
|
926
|
+
}
|
|
927
|
+
} else if (declinedSkills.includes(tool)) {
|
|
928
|
+
console.log(chalk.yellow(` ⊘ ${displayName}: ${msgObj.previouslyDeclined || 'Previously declined'}`));
|
|
929
|
+
} else if (hasMarketplaceSkills && tool === 'claude-code') {
|
|
930
|
+
// Claude Code has marketplace skills but no file-based installation
|
|
931
|
+
console.log(chalk.cyan(` ◎ ${displayName}: ${msgObj.marketplaceOnly || 'Marketplace only (no local files)'}`));
|
|
932
|
+
} else {
|
|
933
|
+
console.log(chalk.gray(` ○ ${displayName}: ${msgObj.notInstalled || 'Not installed'}`));
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
// Show marketplace coexistence note if user might want to install local files
|
|
938
|
+
if (hasMarketplaceSkills && aiTools.includes('claude-code')) {
|
|
939
|
+
console.log();
|
|
940
|
+
console.log(chalk.cyan(` ℹ ${msgObj.marketplaceCoexistNote || 'Note: File-based installation will coexist with Marketplace version'}`));
|
|
941
|
+
}
|
|
942
|
+
console.log();
|
|
943
|
+
|
|
944
|
+
// Build menu choices
|
|
945
|
+
const menuChoices = [
|
|
946
|
+
{ name: msgObj.installSkills || 'Install/Update Skills', value: 'install' }
|
|
947
|
+
];
|
|
948
|
+
|
|
949
|
+
// Add reinstall declined option if there are declined skills
|
|
950
|
+
if (declinedSkills.length > 0) {
|
|
951
|
+
menuChoices.push({
|
|
952
|
+
name: msgObj.reinstallDeclinedSkills || 'Reinstall declined Skills',
|
|
953
|
+
value: 'reinstall_declined'
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
menuChoices.push(
|
|
958
|
+
{ name: msgObj.viewStatus || 'View status only', value: 'view' },
|
|
959
|
+
{ name: common.cancelled || 'Cancel', value: 'cancel' }
|
|
960
|
+
);
|
|
961
|
+
|
|
962
|
+
// Ask what action to take
|
|
963
|
+
const { action } = await inq.default.prompt([
|
|
964
|
+
{
|
|
965
|
+
type: 'list',
|
|
966
|
+
name: 'action',
|
|
967
|
+
message: msgObj.skillsAction || 'What would you like to do?',
|
|
968
|
+
choices: menuChoices
|
|
969
|
+
}
|
|
970
|
+
]);
|
|
971
|
+
|
|
972
|
+
if (action === 'cancel' || action === 'view') {
|
|
973
|
+
console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
// Handle reinstall declined action
|
|
978
|
+
if (action === 'reinstall_declined') {
|
|
979
|
+
// Get only the declined tools that support skills
|
|
980
|
+
const declinedToolsWithSupport = declinedSkills.filter(tool => {
|
|
981
|
+
const agentCfg = getAgentConfig(tool);
|
|
982
|
+
return agentCfg?.supportsSkills;
|
|
983
|
+
});
|
|
984
|
+
|
|
985
|
+
if (declinedToolsWithSupport.length === 0) {
|
|
986
|
+
console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
// Prompt for installation level
|
|
991
|
+
const { skillsLevel } = await inq.default.prompt([{
|
|
992
|
+
type: 'list',
|
|
993
|
+
name: 'skillsLevel',
|
|
994
|
+
message: msgObj.skillsLevelQuestion || 'Where should Skills be installed?',
|
|
995
|
+
choices: [
|
|
996
|
+
{ name: `${msgObj.projectLevel || 'Project level'} (.claude/skills/, etc.)`, value: 'project' },
|
|
997
|
+
{ name: `${msgObj.userLevel || 'User level'} (~/.claude/skills/, etc.)`, value: 'user' }
|
|
998
|
+
],
|
|
999
|
+
default: 'project'
|
|
1000
|
+
}]);
|
|
1001
|
+
|
|
1002
|
+
const installations = declinedToolsWithSupport.map(agent => ({
|
|
1003
|
+
agent,
|
|
1004
|
+
location: skillsLevel
|
|
1005
|
+
}));
|
|
1006
|
+
|
|
1007
|
+
// Install Skills
|
|
1008
|
+
const spinner = ora(msgObj.installingSkills || 'Installing Skills...').start();
|
|
1009
|
+
const result = await installSkillsToMultipleAgents(installations, null, projectPath);
|
|
1010
|
+
spinner.stop();
|
|
1011
|
+
|
|
1012
|
+
if (result.success) {
|
|
1013
|
+
console.log(chalk.green(msgObj.skillsInstallSuccess || 'Skills installed successfully'));
|
|
1014
|
+
console.log(chalk.gray(` ${msgObj.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
|
|
1015
|
+
} else {
|
|
1016
|
+
console.log(chalk.yellow(msgObj.skillsInstallPartial || 'Skills installed with some issues'));
|
|
1017
|
+
if (result.totalErrors > 0) {
|
|
1018
|
+
console.log(chalk.red(` ${msgObj.errors || 'Errors'}: ${result.totalErrors}`));
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
// Update manifest - clear declined status for installed tools
|
|
1023
|
+
manifest.skills = manifest.skills || {};
|
|
1024
|
+
manifest.skills.installations = installations;
|
|
1025
|
+
if (manifest.declinedFeatures?.skills) {
|
|
1026
|
+
manifest.declinedFeatures.skills = manifest.declinedFeatures.skills.filter(
|
|
1027
|
+
tool => !declinedToolsWithSupport.includes(tool)
|
|
1028
|
+
);
|
|
1029
|
+
}
|
|
1030
|
+
writeManifest(manifest, projectPath);
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
// Use unified installation prompt
|
|
1035
|
+
const installations = await promptSkillsInstallLocation(aiTools);
|
|
1036
|
+
if (installations.length === 0) {
|
|
1037
|
+
console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
// Install Skills
|
|
1042
|
+
const spinner = ora(msgObj.installingSkills || 'Installing Skills...').start();
|
|
1043
|
+
const result = await installSkillsToMultipleAgents(installations, null, projectPath);
|
|
1044
|
+
spinner.stop();
|
|
1045
|
+
|
|
1046
|
+
if (result.success) {
|
|
1047
|
+
console.log(chalk.green(msgObj.skillsInstallSuccess || 'Skills installed successfully'));
|
|
1048
|
+
console.log(chalk.gray(` ${msgObj.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
|
|
1049
|
+
} else {
|
|
1050
|
+
console.log(chalk.yellow(msgObj.skillsInstallPartial || 'Skills installed with some issues'));
|
|
1051
|
+
if (result.totalErrors > 0) {
|
|
1052
|
+
console.log(chalk.red(` ${msgObj.errors || 'Errors'}: ${result.totalErrors}`));
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
// Update manifest
|
|
1057
|
+
manifest.skills = manifest.skills || {};
|
|
1058
|
+
manifest.skills.installations = installations;
|
|
1059
|
+
writeManifest(manifest, projectPath);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Handle Commands configuration
|
|
1064
|
+
* @param {Object} manifest - Project manifest
|
|
1065
|
+
* @param {string} projectPath - Project path
|
|
1066
|
+
* @param {Object} msgObj - i18n messages
|
|
1067
|
+
* @param {Object} common - Common i18n messages
|
|
1068
|
+
* @param {string} [specificTool] - Specific AI tool to install (triggers interactive prompt for level)
|
|
1069
|
+
*/
|
|
1070
|
+
async function handleCommandsConfiguration(manifest, projectPath, msgObj, common, specificTool) {
|
|
1071
|
+
const inq = await import('inquirer');
|
|
1072
|
+
const aiTools = manifest.aiTools || [];
|
|
1073
|
+
|
|
1074
|
+
// Semi-interactive mode: install for specific tool (prompt for level)
|
|
1075
|
+
if (specificTool) {
|
|
1076
|
+
const agentCfg = getAgentConfig(specificTool);
|
|
1077
|
+
if (!agentCfg) {
|
|
1078
|
+
console.log(chalk.red(`Unknown AI tool: ${specificTool}`));
|
|
1079
|
+
console.log(chalk.gray(' Available tools: claude-code, opencode, copilot, gemini-cli, roo-code'));
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1082
|
+
if (agentCfg.commands === null) {
|
|
1083
|
+
console.log(chalk.yellow(`${getAgentDisplayName(specificTool)} does not support Commands`));
|
|
1084
|
+
console.log(chalk.gray(' Tools that support commands: OpenCode, Copilot, Roo Code, Gemini CLI'));
|
|
1085
|
+
return;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
// Prompt for installation level
|
|
1089
|
+
const { commandsLevel } = await inq.default.prompt([{
|
|
1090
|
+
type: 'list',
|
|
1091
|
+
name: 'commandsLevel',
|
|
1092
|
+
message: msgObj.commandsLevelQuestion || 'Where should Commands be installed?',
|
|
1093
|
+
choices: [
|
|
1094
|
+
{ name: `${msgObj.projectLevel || 'Project level'} (${agentCfg.commands.project}) (${msgObj.recommended || 'Recommended'})`, value: 'project' },
|
|
1095
|
+
{ name: `${msgObj.userLevel || 'User level'} (${agentCfg.commands.user})`, value: 'user' }
|
|
1096
|
+
],
|
|
1097
|
+
default: 'project'
|
|
1098
|
+
}]);
|
|
1099
|
+
|
|
1100
|
+
// Install to selected level
|
|
1101
|
+
const installations = [{ agent: specificTool, level: commandsLevel }];
|
|
1102
|
+
const spinner = ora(`Installing Commands for ${getAgentDisplayName(specificTool)} (${commandsLevel} level)...`).start();
|
|
1103
|
+
const result = await installCommandsToMultipleAgents(installations, null, projectPath);
|
|
1104
|
+
spinner.stop();
|
|
1105
|
+
|
|
1106
|
+
if (result.success) {
|
|
1107
|
+
console.log(chalk.green(`Commands installed for ${getAgentDisplayName(specificTool)}`));
|
|
1108
|
+
} else {
|
|
1109
|
+
console.log(chalk.yellow('Commands installation completed with issues'));
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
// Update manifest
|
|
1113
|
+
manifest.commands = manifest.commands || {};
|
|
1114
|
+
manifest.commands.installations = manifest.commands.installations || [];
|
|
1115
|
+
const existing = manifest.commands.installations.findIndex(i =>
|
|
1116
|
+
typeof i === 'string' ? i === specificTool : i.agent === specificTool
|
|
1117
|
+
);
|
|
1118
|
+
if (existing >= 0) {
|
|
1119
|
+
manifest.commands.installations[existing] = installations[0];
|
|
1120
|
+
} else {
|
|
1121
|
+
manifest.commands.installations.push(installations[0]);
|
|
1122
|
+
}
|
|
1123
|
+
writeManifest(manifest, projectPath);
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
// Interactive mode
|
|
1128
|
+
// Filter tools that support commands (commands !== null means support)
|
|
1129
|
+
const commandSupportedTools = aiTools.filter(tool => {
|
|
1130
|
+
const agentCfg = getAgentConfig(tool);
|
|
1131
|
+
return agentCfg?.commands !== null;
|
|
1132
|
+
});
|
|
1133
|
+
|
|
1134
|
+
if (commandSupportedTools.length === 0) {
|
|
1135
|
+
console.log(chalk.yellow(msgObj.noCommandSupportedTools || 'No AI tools with command support configured'));
|
|
1136
|
+
console.log(chalk.gray(` ${msgObj.commandSupportedList || 'Tools that support commands: OpenCode, Copilot, Roo Code, Gemini CLI'}`));
|
|
1137
|
+
return;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
// Get declined commands from manifest
|
|
1141
|
+
const declinedCommands = manifest.declinedFeatures?.commands || [];
|
|
1142
|
+
|
|
1143
|
+
// Show current Commands status (check both project and user levels)
|
|
1144
|
+
console.log(chalk.cyan(msgObj.currentCommandsStatus || 'Current Commands status:'));
|
|
1145
|
+
for (const tool of commandSupportedTools) {
|
|
1146
|
+
const displayName = getAgentDisplayName(tool);
|
|
1147
|
+
const projectCmdInfo = getInstalledCommandsForAgent(tool, 'project', projectPath);
|
|
1148
|
+
const userCmdInfo = getInstalledCommandsForAgent(tool, 'user');
|
|
1149
|
+
|
|
1150
|
+
if (projectCmdInfo?.installed || userCmdInfo?.installed) {
|
|
1151
|
+
console.log(chalk.green(` ✓ ${displayName}:`));
|
|
1152
|
+
if (userCmdInfo?.installed) {
|
|
1153
|
+
console.log(chalk.gray(` - User: ${userCmdInfo.count} commands`));
|
|
1154
|
+
}
|
|
1155
|
+
if (projectCmdInfo?.installed) {
|
|
1156
|
+
console.log(chalk.gray(` - Project: ${projectCmdInfo.count} commands`));
|
|
1157
|
+
}
|
|
1158
|
+
} else if (declinedCommands.includes(tool)) {
|
|
1159
|
+
console.log(chalk.yellow(` ⊘ ${displayName}: ${msgObj.previouslyDeclined || 'Previously declined'}`));
|
|
1160
|
+
} else {
|
|
1161
|
+
console.log(chalk.gray(` ○ ${displayName}: ${msgObj.notInstalled || 'Not installed'}`));
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
console.log();
|
|
1165
|
+
|
|
1166
|
+
// Build menu choices
|
|
1167
|
+
const menuChoices = [
|
|
1168
|
+
{ name: msgObj.installCommands || 'Install/Update Commands', value: 'install' }
|
|
1169
|
+
];
|
|
1170
|
+
|
|
1171
|
+
// Add reinstall declined option if there are declined commands
|
|
1172
|
+
const declinedCommandsWithSupport = declinedCommands.filter(tool =>
|
|
1173
|
+
commandSupportedTools.includes(tool)
|
|
1174
|
+
);
|
|
1175
|
+
if (declinedCommandsWithSupport.length > 0) {
|
|
1176
|
+
menuChoices.push({
|
|
1177
|
+
name: msgObj.reinstallDeclinedCommands || 'Reinstall declined Commands',
|
|
1178
|
+
value: 'reinstall_declined'
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
menuChoices.push(
|
|
1183
|
+
{ name: msgObj.viewStatus || 'View status only', value: 'view' },
|
|
1184
|
+
{ name: common.cancelled || 'Cancel', value: 'cancel' }
|
|
1185
|
+
);
|
|
1186
|
+
|
|
1187
|
+
// Ask what action to take
|
|
1188
|
+
const { action } = await inq.default.prompt([
|
|
1189
|
+
{
|
|
1190
|
+
type: 'list',
|
|
1191
|
+
name: 'action',
|
|
1192
|
+
message: msgObj.commandsAction || 'What would you like to do?',
|
|
1193
|
+
choices: menuChoices
|
|
1194
|
+
}
|
|
1195
|
+
]);
|
|
1196
|
+
|
|
1197
|
+
if (action === 'cancel' || action === 'view') {
|
|
1198
|
+
console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
|
|
1199
|
+
return;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
// Handle reinstall declined action
|
|
1203
|
+
if (action === 'reinstall_declined') {
|
|
1204
|
+
if (declinedCommandsWithSupport.length === 0) {
|
|
1205
|
+
console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
|
|
1206
|
+
return;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
// Install Commands
|
|
1210
|
+
const spinner = ora(msgObj.installingCommands || 'Installing Commands...').start();
|
|
1211
|
+
const result = await installCommandsToMultipleAgents(declinedCommandsWithSupport, null, projectPath);
|
|
1212
|
+
spinner.stop();
|
|
1213
|
+
|
|
1214
|
+
if (result.success) {
|
|
1215
|
+
console.log(chalk.green(msgObj.commandsInstallSuccess || 'Commands installed successfully'));
|
|
1216
|
+
console.log(chalk.gray(` ${msgObj.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
|
|
1217
|
+
} else {
|
|
1218
|
+
console.log(chalk.yellow(msgObj.commandsInstallPartial || 'Commands installed with some issues'));
|
|
1219
|
+
if (result.totalErrors > 0) {
|
|
1220
|
+
console.log(chalk.red(` ${msgObj.errors || 'Errors'}: ${result.totalErrors}`));
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
// Update manifest - clear declined status for installed tools
|
|
1225
|
+
manifest.commands = manifest.commands || {};
|
|
1226
|
+
manifest.commands.installations = declinedCommandsWithSupport;
|
|
1227
|
+
if (manifest.declinedFeatures?.commands) {
|
|
1228
|
+
manifest.declinedFeatures.commands = manifest.declinedFeatures.commands.filter(
|
|
1229
|
+
tool => !declinedCommandsWithSupport.includes(tool)
|
|
1230
|
+
);
|
|
1231
|
+
}
|
|
1232
|
+
writeManifest(manifest, projectPath);
|
|
1233
|
+
return;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
// Use unified installation prompt
|
|
1237
|
+
const selectedAgents = await promptCommandsInstallation(commandSupportedTools);
|
|
1238
|
+
if (selectedAgents.length === 0) {
|
|
1239
|
+
console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
|
|
1240
|
+
return;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
// Install Commands
|
|
1244
|
+
const spinner = ora(msgObj.installingCommands || 'Installing Commands...').start();
|
|
1245
|
+
const result = await installCommandsToMultipleAgents(selectedAgents, null, projectPath);
|
|
1246
|
+
spinner.stop();
|
|
1247
|
+
|
|
1248
|
+
if (result.success) {
|
|
1249
|
+
console.log(chalk.green(msgObj.commandsInstallSuccess || 'Commands installed successfully'));
|
|
1250
|
+
console.log(chalk.gray(` ${msgObj.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
|
|
1251
|
+
} else {
|
|
1252
|
+
console.log(chalk.yellow(msgObj.commandsInstallPartial || 'Commands installed with some issues'));
|
|
1253
|
+
if (result.totalErrors > 0) {
|
|
1254
|
+
console.log(chalk.red(` ${msgObj.errors || 'Errors'}: ${result.totalErrors}`));
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
// Update manifest
|
|
1259
|
+
manifest.commands = manifest.commands || {};
|
|
1260
|
+
manifest.commands.installations = selectedAgents;
|
|
1261
|
+
writeManifest(manifest, projectPath);
|
|
1262
|
+
}
|