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
package/src/commands/init.js
CHANGED
|
@@ -1,112 +1,25 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import ora from 'ora';
|
|
3
|
+
import { execSync } from 'child_process';
|
|
4
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
3
5
|
import { basename, join } from 'path';
|
|
4
6
|
import {
|
|
5
|
-
|
|
6
|
-
getRepositoryInfo,
|
|
7
|
-
getSkillFiles,
|
|
8
|
-
getStandardSource,
|
|
9
|
-
getOptionSource,
|
|
10
|
-
findOption
|
|
11
|
-
} from '../utils/registry.js';
|
|
12
|
-
import { detectAll } from '../utils/detector.js';
|
|
13
|
-
import {
|
|
14
|
-
copyStandard,
|
|
15
|
-
copyIntegration
|
|
16
|
-
} from '../utils/copier.js';
|
|
17
|
-
import {
|
|
18
|
-
writeManifest,
|
|
19
|
-
manifestExists as isInitialized
|
|
7
|
+
manifestExists as isInitialized
|
|
20
8
|
} from '../core/manifest.js';
|
|
21
|
-
import { t } from '../i18n/messages.js';
|
|
9
|
+
import { t, detectLanguage } from '../i18n/messages.js';
|
|
10
|
+
import { detectAll } from '../utils/detector.js';
|
|
11
|
+
import { promptConfirm } from '../prompts/init.js';
|
|
12
|
+
import { runInitFlow } from '../flows/init-flow.js';
|
|
13
|
+
import { installStandards } from '../installers/standards-installer.js';
|
|
14
|
+
import { installIntegrations } from '../installers/integration-installer.js';
|
|
15
|
+
import { installSkills, installCommands } from '../installers/skills-installer.js';
|
|
16
|
+
import { writeFinalManifest } from '../installers/manifest-installer.js';
|
|
22
17
|
import {
|
|
23
|
-
downloadSkillToLocation,
|
|
24
18
|
getInstalledSkillsInfo,
|
|
25
19
|
getProjectInstalledSkillsInfo,
|
|
26
|
-
writeSkillsManifest,
|
|
27
|
-
getSkillsDir,
|
|
28
|
-
getProjectSkillsDir
|
|
29
|
-
} from '../utils/github.js';
|
|
30
|
-
import {
|
|
31
|
-
installSkillsToMultipleAgents,
|
|
32
|
-
installCommandsToMultipleAgents,
|
|
33
|
-
getInstalledSkillsInfoForAgent
|
|
34
|
-
} from '../utils/skills-installer.js';
|
|
35
|
-
import {
|
|
36
20
|
getAgentConfig,
|
|
37
|
-
getAgentDisplayName
|
|
38
|
-
|
|
39
|
-
getCommandsDirForAgent
|
|
40
|
-
} from '../config/ai-agent-paths.js';
|
|
41
|
-
import {
|
|
42
|
-
promptAITools,
|
|
43
|
-
promptSkillsInstallLocation,
|
|
44
|
-
promptStandardsScope,
|
|
45
|
-
promptLevel,
|
|
46
|
-
promptLanguage,
|
|
47
|
-
promptFramework,
|
|
48
|
-
promptLocale,
|
|
49
|
-
promptConfirm,
|
|
50
|
-
promptFormat,
|
|
51
|
-
promptStandardOptions,
|
|
52
|
-
promptContentMode,
|
|
53
|
-
promptMethodology,
|
|
54
|
-
promptCommandsInstallation,
|
|
55
|
-
handleAgentsMdSharing
|
|
56
|
-
} from '../prompts/init.js';
|
|
57
|
-
import {
|
|
58
|
-
promptIntegrationConfig
|
|
59
|
-
} from '../prompts/integrations.js';
|
|
60
|
-
import {
|
|
61
|
-
writeIntegrationFile,
|
|
62
|
-
integrationFileExists,
|
|
63
|
-
getToolFilePath
|
|
64
|
-
} from '../utils/integration-generator.js';
|
|
65
|
-
import { computeFileHash } from '../utils/hasher.js';
|
|
66
|
-
|
|
67
|
-
// Integration file mappings (legacy - for fallback)
|
|
68
|
-
const INTEGRATION_MAPPINGS = {
|
|
69
|
-
cursor: {
|
|
70
|
-
source: 'integrations/cursor/.cursorrules',
|
|
71
|
-
target: '.cursorrules'
|
|
72
|
-
},
|
|
73
|
-
windsurf: {
|
|
74
|
-
source: 'integrations/windsurf/.windsurfrules',
|
|
75
|
-
target: '.windsurfrules'
|
|
76
|
-
},
|
|
77
|
-
cline: {
|
|
78
|
-
source: 'integrations/cline/.clinerules',
|
|
79
|
-
target: '.clinerules'
|
|
80
|
-
},
|
|
81
|
-
copilot: {
|
|
82
|
-
source: 'integrations/github-copilot/copilot-instructions.md',
|
|
83
|
-
target: '.github/copilot-instructions.md'
|
|
84
|
-
},
|
|
85
|
-
antigravity: {
|
|
86
|
-
source: 'integrations/google-antigravity/INSTRUCTIONS.md',
|
|
87
|
-
target: 'INSTRUCTIONS.md'
|
|
88
|
-
},
|
|
89
|
-
codex: {
|
|
90
|
-
source: 'integrations/openai-codex/AGENTS.md',
|
|
91
|
-
target: 'AGENTS.md'
|
|
92
|
-
},
|
|
93
|
-
'gemini-cli': {
|
|
94
|
-
source: 'integrations/gemini-cli/GEMINI.md',
|
|
95
|
-
target: 'GEMINI.md'
|
|
96
|
-
},
|
|
97
|
-
opencode: {
|
|
98
|
-
source: 'integrations/opencode/AGENTS.md',
|
|
99
|
-
target: 'AGENTS.md'
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
// Extension file mappings
|
|
104
|
-
const EXTENSION_MAPPINGS = {
|
|
105
|
-
csharp: 'extensions/languages/csharp-style.md',
|
|
106
|
-
php: 'extensions/languages/php-style.md',
|
|
107
|
-
'fat-free': 'extensions/frameworks/fat-free-patterns.md',
|
|
108
|
-
'zh-tw': 'extensions/locales/zh-tw.md'
|
|
109
|
-
};
|
|
21
|
+
getAgentDisplayName
|
|
22
|
+
} from '../utils/github.js';
|
|
110
23
|
|
|
111
24
|
/**
|
|
112
25
|
* Init command - initialize standards in current project
|
|
@@ -114,10 +27,8 @@ const EXTENSION_MAPPINGS = {
|
|
|
114
27
|
*/
|
|
115
28
|
export async function initCommand(options) {
|
|
116
29
|
const projectPath = process.cwd();
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
// Note: UI language is now set globally in uds.js preAction hook
|
|
30
|
+
let msg = t().commands.init;
|
|
31
|
+
let common = t().commands.common;
|
|
121
32
|
|
|
122
33
|
console.log();
|
|
123
34
|
console.log(chalk.bold(msg.title));
|
|
@@ -136,395 +47,34 @@ export async function initCommand(options) {
|
|
|
136
47
|
spinner.succeed(msg.analysisComplete);
|
|
137
48
|
|
|
138
49
|
// Show detected info
|
|
139
|
-
const detectedLangs = Object.entries(detected.languages)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const detectedFrameworks = Object.entries(detected.frameworks)
|
|
143
|
-
.filter(([, v]) => v)
|
|
144
|
-
.map(([k]) => k);
|
|
145
|
-
const detectedTools = Object.entries(detected.aiTools)
|
|
146
|
-
.filter(([, v]) => v)
|
|
147
|
-
.map(([k]) => k);
|
|
50
|
+
const detectedLangs = Object.entries(detected.languages).filter(([, v]) => v).map(([k]) => k);
|
|
51
|
+
const detectedFrameworks = Object.entries(detected.frameworks).filter(([, v]) => v).map(([k]) => k);
|
|
52
|
+
const detectedTools = Object.entries(detected.aiTools).filter(([, v]) => v).map(([k]) => k);
|
|
148
53
|
|
|
149
|
-
if (detectedLangs.length > 0) {
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
if (detectedFrameworks.length > 0) {
|
|
153
|
-
console.log(chalk.gray(` ${msg.frameworks}: ${detectedFrameworks.join(', ')}`));
|
|
154
|
-
}
|
|
155
|
-
if (detectedTools.length > 0) {
|
|
156
|
-
console.log(chalk.gray(` ${msg.aiTools}: ${detectedTools.join(', ')}`));
|
|
157
|
-
}
|
|
54
|
+
if (detectedLangs.length > 0) console.log(chalk.gray(` ${msg.languages}: ${detectedLangs.join(', ')}`));
|
|
55
|
+
if (detectedFrameworks.length > 0) console.log(chalk.gray(` ${msg.frameworks}: ${detectedFrameworks.join(', ')}`));
|
|
56
|
+
if (detectedTools.length > 0) console.log(chalk.gray(` ${msg.aiTools}: ${detectedTools.join(', ')}`));
|
|
158
57
|
console.log();
|
|
159
58
|
|
|
160
|
-
//
|
|
161
|
-
let
|
|
162
|
-
let languages = options.lang ? [options.lang] : null;
|
|
163
|
-
let frameworks = options.framework ? [options.framework] : null;
|
|
164
|
-
let locale = options.locale || null;
|
|
165
|
-
let format = options.format || null;
|
|
166
|
-
let standardOptions = {};
|
|
167
|
-
|
|
168
|
-
// Skills configuration (unified for all AI agents)
|
|
169
|
-
let skillsConfig = {
|
|
170
|
-
installed: false,
|
|
171
|
-
location: null, // Legacy: single location for backward compatibility
|
|
172
|
-
needsInstall: false,
|
|
173
|
-
updateTargets: [], // Legacy: array of 'user' or 'project'
|
|
174
|
-
// New: multi-agent installations
|
|
175
|
-
skillsInstallations: [], // Array of {agent, level}
|
|
176
|
-
commandsInstallations: [] // Array of {agent, level}
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
// AI tools configuration
|
|
180
|
-
let aiTools = [];
|
|
181
|
-
let integrations = [];
|
|
59
|
+
// Configuration object
|
|
60
|
+
let config = {};
|
|
182
61
|
|
|
183
62
|
if (!options.yes) {
|
|
184
|
-
//
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
windsurf: detected.aiTools.windsurf || false,
|
|
191
|
-
cline: detected.aiTools.cline || false,
|
|
192
|
-
copilot: detected.aiTools.copilot || false,
|
|
193
|
-
antigravity: detected.aiTools.antigravity || false,
|
|
194
|
-
codex: detected.aiTools.codex || false,
|
|
195
|
-
opencode: detected.aiTools.opencode || false,
|
|
196
|
-
geminiCli: detected.aiTools.geminiCli || false
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
// Handle AGENTS.md sharing notification (Codex + OpenCode)
|
|
200
|
-
aiTools = handleAgentsMdSharing(aiTools);
|
|
201
|
-
|
|
202
|
-
// Check which tools support skills
|
|
203
|
-
const skillsSupportedTools = aiTools.filter(tool => {
|
|
204
|
-
const config = getAgentConfig(tool);
|
|
205
|
-
return config?.supportsSkills && config?.skills;
|
|
206
|
-
});
|
|
207
|
-
const hasSkillsTools = skillsSupportedTools.length > 0;
|
|
208
|
-
|
|
209
|
-
// STEP 4: Skills handling (unified for all AI agents)
|
|
210
|
-
// Now supports multiple agents with individual user/project level choices
|
|
211
|
-
if (hasSkillsTools) {
|
|
212
|
-
// Check existing installations for each skills-supported agent
|
|
213
|
-
console.log();
|
|
214
|
-
console.log(chalk.cyan(msg.skillsStatus));
|
|
215
|
-
|
|
216
|
-
let hasAnyExisting = false;
|
|
217
|
-
for (const tool of skillsSupportedTools) {
|
|
218
|
-
const displayName = getAgentDisplayName(tool);
|
|
219
|
-
const projectInfo = getInstalledSkillsInfoForAgent(tool, 'project', projectPath);
|
|
220
|
-
const userInfo = getInstalledSkillsInfoForAgent(tool, 'user');
|
|
221
|
-
|
|
222
|
-
if (projectInfo || userInfo) {
|
|
223
|
-
hasAnyExisting = true;
|
|
224
|
-
if (projectInfo) {
|
|
225
|
-
console.log(chalk.gray(` ${displayName} ${msg.projectLevel}: v${projectInfo.version || 'unknown'}`));
|
|
226
|
-
}
|
|
227
|
-
if (userInfo) {
|
|
228
|
-
console.log(chalk.gray(` ${displayName} ${msg.userLevel}: v${userInfo.version || 'unknown'}`));
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (!hasAnyExisting) {
|
|
234
|
-
console.log(chalk.gray(` ${msg.noSkillsDetected}`));
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// Prompt for installation locations (multi-agent, multi-select)
|
|
238
|
-
const installations = await promptSkillsInstallLocation(aiTools);
|
|
239
|
-
|
|
240
|
-
if (installations.length > 0) {
|
|
241
|
-
// Check if marketplace was selected
|
|
242
|
-
const isMarketplace = installations.some(i => i.level === 'marketplace');
|
|
243
|
-
|
|
244
|
-
if (isMarketplace) {
|
|
245
|
-
skillsConfig = {
|
|
246
|
-
...skillsConfig,
|
|
247
|
-
installed: true,
|
|
248
|
-
location: 'marketplace',
|
|
249
|
-
needsInstall: false,
|
|
250
|
-
updateTargets: [],
|
|
251
|
-
skillsInstallations: installations
|
|
252
|
-
};
|
|
253
|
-
} else {
|
|
254
|
-
// File-based installations
|
|
255
|
-
skillsConfig = {
|
|
256
|
-
...skillsConfig,
|
|
257
|
-
installed: true,
|
|
258
|
-
location: installations.length === 1 ? installations[0].level : 'multiple',
|
|
259
|
-
needsInstall: true,
|
|
260
|
-
updateTargets: installations.map(i => i.level),
|
|
261
|
-
skillsInstallations: installations
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
// STEP 4.5: Slash commands installation (for supported agents)
|
|
267
|
-
const commandsAgents = await promptCommandsInstallation(aiTools);
|
|
268
|
-
if (commandsAgents.length > 0) {
|
|
269
|
-
skillsConfig.commandsInstallations = commandsAgents;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// STEP 5: Standards scope (if Skills are installed)
|
|
274
|
-
const standardsScope = await promptStandardsScope(skillsConfig.installed);
|
|
275
|
-
|
|
276
|
-
// STEP 6: Adoption level
|
|
277
|
-
if (!level) {
|
|
278
|
-
level = await promptLevel();
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
// STEP 7: Standards format
|
|
282
|
-
if (!format) {
|
|
283
|
-
format = await promptFormat();
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
// STEP 8: Standard options
|
|
287
|
-
standardOptions = await promptStandardOptions(level);
|
|
288
|
-
|
|
289
|
-
// STEP 9: Language extensions
|
|
290
|
-
if (!languages) {
|
|
291
|
-
languages = await promptLanguage(detected.languages) || [];
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// STEP 10: Framework extensions
|
|
295
|
-
if (!frameworks) {
|
|
296
|
-
frameworks = await promptFramework(detected.frameworks) || [];
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// STEP 11: Locale
|
|
300
|
-
if (!locale) {
|
|
301
|
-
locale = await promptLocale();
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
// Determine integrations from AI tools (excluding claude-code)
|
|
305
|
-
integrations = aiTools.filter(t => t !== 'claude-code');
|
|
306
|
-
|
|
307
|
-
// STEP 12: Integration configuration for non-Claude tools
|
|
308
|
-
// All tools share the same configuration since they have identical functionality
|
|
309
|
-
const integrationConfigs = {};
|
|
310
|
-
if (integrations.length > 0) {
|
|
311
|
-
console.log();
|
|
312
|
-
console.log(chalk.cyan(msg.integrationConfig));
|
|
313
|
-
|
|
314
|
-
if (integrations.length > 1) {
|
|
315
|
-
console.log(chalk.gray(` ${msg.sharedRuleConfig}`));
|
|
316
|
-
console.log();
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
// Check if any existing files
|
|
320
|
-
const existingFiles = {};
|
|
321
|
-
for (const tool of integrations) {
|
|
322
|
-
existingFiles[tool] = integrationFileExists(tool, projectPath);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
const hasAnyExisting = Object.values(existingFiles).some(v => v);
|
|
326
|
-
|
|
327
|
-
// Prompt configuration once for all tools
|
|
328
|
-
// Use first tool as representative, but mention all tools
|
|
329
|
-
const toolNames = integrations.length === 1
|
|
330
|
-
? integrations[0]
|
|
331
|
-
: `${integrations.slice(0, -1).join(', ')} & ${integrations[integrations.length - 1]}`;
|
|
332
|
-
|
|
333
|
-
const sharedConfig = await promptIntegrationConfig(toolNames, detected, hasAnyExisting);
|
|
334
|
-
|
|
335
|
-
// Apply shared config to all tools (unless user chose to keep existing)
|
|
336
|
-
if (sharedConfig.mergeStrategy !== 'keep') {
|
|
337
|
-
for (const tool of integrations) {
|
|
338
|
-
// Each tool gets the same config but with its specific tool name
|
|
339
|
-
integrationConfigs[tool] = { ...sharedConfig, tool };
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
// Store integration configs for later use
|
|
345
|
-
skillsConfig.integrationConfigs = integrationConfigs;
|
|
346
|
-
|
|
347
|
-
// Store standards scope for later use
|
|
348
|
-
skillsConfig.standardsScope = standardsScope;
|
|
349
|
-
|
|
350
|
-
// STEP 13: Content mode for integration files (if any AI tools selected)
|
|
351
|
-
let contentMode = 'minimal'; // default for backward compatibility
|
|
352
|
-
if (aiTools.length > 0) {
|
|
353
|
-
contentMode = await promptContentMode();
|
|
354
|
-
}
|
|
355
|
-
skillsConfig.contentMode = contentMode;
|
|
356
|
-
|
|
357
|
-
// STEP 14: Development methodology (experimental - requires -E flag)
|
|
358
|
-
let methodology = null;
|
|
359
|
-
if (options.experimental) {
|
|
360
|
-
methodology = await promptMethodology();
|
|
361
|
-
}
|
|
362
|
-
skillsConfig.methodology = methodology;
|
|
363
|
-
|
|
63
|
+
// Interactive Mode
|
|
64
|
+
config = await runInitFlow(options, detected, projectPath);
|
|
65
|
+
if (!config) return; // Flow cancelled or exited
|
|
66
|
+
// Re-fetch translations after language selection in flow
|
|
67
|
+
msg = t().commands.init;
|
|
68
|
+
common = t().commands.common;
|
|
364
69
|
} else {
|
|
365
|
-
//
|
|
366
|
-
|
|
367
|
-
format = format || 'ai';
|
|
368
|
-
languages = languages || Object.keys(detected.languages).filter(k => detected.languages[k]);
|
|
369
|
-
frameworks = frameworks || Object.keys(detected.frameworks).filter(k => detected.frameworks[k]);
|
|
370
|
-
integrations = Object.keys(detected.aiTools).filter(k => detected.aiTools[k] && k !== 'claudeCode');
|
|
371
|
-
|
|
372
|
-
// Default standard options
|
|
373
|
-
standardOptions = {
|
|
374
|
-
workflow: options.workflow || 'github-flow',
|
|
375
|
-
merge_strategy: options.mergeStrategy || 'squash',
|
|
376
|
-
commit_language: options.commitLang || 'english',
|
|
377
|
-
test_levels: options.testLevels ? options.testLevels.split(',') : ['unit-testing', 'integration-testing']
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
// Determine AI tools from detection for skills compatibility check
|
|
381
|
-
const detectedAiTools = Object.keys(detected.aiTools).filter(k => detected.aiTools[k]);
|
|
382
|
-
// Map detected keys to standard tool names
|
|
383
|
-
const aiToolsNormalized = detectedAiTools.map(k => {
|
|
384
|
-
if (k === 'claudeCode') return 'claude-code';
|
|
385
|
-
if (k === 'geminiCli') return 'gemini-cli';
|
|
386
|
-
return k;
|
|
387
|
-
});
|
|
388
|
-
|
|
389
|
-
// Assign normalized AI tools to manifest variable
|
|
390
|
-
aiTools = aiToolsNormalized;
|
|
391
|
-
|
|
392
|
-
// Check if only skills-compatible tools are detected
|
|
393
|
-
const hasSkillsCompatibleTool = aiToolsNormalized.some(t => t === 'claude-code' || t === 'opencode');
|
|
394
|
-
const onlySkillsCompatibleTools = aiToolsNormalized.every(t => t === 'claude-code' || t === 'opencode');
|
|
395
|
-
|
|
396
|
-
// Handle Skills configuration based on CLI flag
|
|
397
|
-
// Default: marketplace only if all detected tools support skills
|
|
398
|
-
// If non-skills tools are detected, default to 'none' (full standards)
|
|
399
|
-
let skillsLocationFlag = options.skillsLocation;
|
|
400
|
-
if (!skillsLocationFlag) {
|
|
401
|
-
skillsLocationFlag = (hasSkillsCompatibleTool && onlySkillsCompatibleTools) ? 'marketplace' : 'none';
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
// Content mode from CLI flag (default: index for best balance)
|
|
405
|
-
const contentModeFlag = options.contentMode || 'index';
|
|
406
|
-
|
|
407
|
-
if (skillsLocationFlag === 'marketplace') {
|
|
408
|
-
skillsConfig = {
|
|
409
|
-
installed: true,
|
|
410
|
-
location: 'marketplace',
|
|
411
|
-
needsInstall: false,
|
|
412
|
-
updateTargets: [],
|
|
413
|
-
standardsScope: 'minimal',
|
|
414
|
-
contentMode: contentModeFlag
|
|
415
|
-
};
|
|
416
|
-
} else if (skillsLocationFlag === 'none') {
|
|
417
|
-
skillsConfig = {
|
|
418
|
-
installed: false,
|
|
419
|
-
location: null,
|
|
420
|
-
needsInstall: false,
|
|
421
|
-
updateTargets: [],
|
|
422
|
-
standardsScope: 'full',
|
|
423
|
-
contentMode: contentModeFlag
|
|
424
|
-
};
|
|
425
|
-
} else if (skillsLocationFlag === 'project') {
|
|
426
|
-
skillsConfig = {
|
|
427
|
-
installed: true,
|
|
428
|
-
location: 'project',
|
|
429
|
-
needsInstall: true,
|
|
430
|
-
updateTargets: ['project'],
|
|
431
|
-
standardsScope: 'minimal',
|
|
432
|
-
contentMode: contentModeFlag
|
|
433
|
-
};
|
|
434
|
-
} else if (skillsLocationFlag === 'user') {
|
|
435
|
-
skillsConfig = {
|
|
436
|
-
installed: true,
|
|
437
|
-
location: 'user',
|
|
438
|
-
needsInstall: true,
|
|
439
|
-
updateTargets: ['user'],
|
|
440
|
-
standardsScope: 'minimal',
|
|
441
|
-
contentMode: contentModeFlag
|
|
442
|
-
};
|
|
443
|
-
} else {
|
|
444
|
-
// Fallback: auto-detect user/project installation
|
|
445
|
-
const userSkillsInfo = getInstalledSkillsInfo();
|
|
446
|
-
const projectSkillsInfo = getProjectInstalledSkillsInfo(projectPath);
|
|
447
|
-
|
|
448
|
-
if (userSkillsInfo?.installed || projectSkillsInfo?.installed) {
|
|
449
|
-
const location = projectSkillsInfo?.installed ? 'project' : 'user';
|
|
450
|
-
skillsConfig = {
|
|
451
|
-
installed: true,
|
|
452
|
-
location,
|
|
453
|
-
needsInstall: false,
|
|
454
|
-
updateTargets: [],
|
|
455
|
-
standardsScope: 'minimal',
|
|
456
|
-
contentMode: contentModeFlag
|
|
457
|
-
};
|
|
458
|
-
} else {
|
|
459
|
-
// Fallback to marketplace if nothing detected
|
|
460
|
-
skillsConfig = {
|
|
461
|
-
installed: true,
|
|
462
|
-
location: 'marketplace',
|
|
463
|
-
needsInstall: false,
|
|
464
|
-
updateTargets: [],
|
|
465
|
-
standardsScope: 'minimal',
|
|
466
|
-
contentMode: contentModeFlag
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
// Auto-install commands for detected agents that support commands
|
|
472
|
-
// This matches the interactive mode behavior where commands are checked by default (project level)
|
|
473
|
-
const commandsSupportedAgents = aiToolsNormalized.filter(tool => {
|
|
474
|
-
const config = getAgentConfig(tool);
|
|
475
|
-
return config?.commands !== null;
|
|
476
|
-
});
|
|
477
|
-
|
|
478
|
-
if (commandsSupportedAgents.length > 0) {
|
|
479
|
-
// Convert to {agent, level} format for consistency with interactive mode
|
|
480
|
-
skillsConfig.commandsInstallations = commandsSupportedAgents.map(agent => ({
|
|
481
|
-
agent,
|
|
482
|
-
level: 'project' // Default to project level in non-interactive mode
|
|
483
|
-
}));
|
|
484
|
-
}
|
|
70
|
+
// Non-interactive Mode (Defaults/Flags)
|
|
71
|
+
config = buildNonInteractiveConfig(options, detected, projectPath);
|
|
485
72
|
}
|
|
486
73
|
|
|
487
|
-
// Configuration
|
|
488
|
-
|
|
489
|
-
console.log(chalk.cyan(msg.configSummary));
|
|
490
|
-
console.log(chalk.gray(` ${common.level}: ${level}`));
|
|
491
|
-
console.log(chalk.gray(` ${common.format}: ${format === 'ai' ? 'Compact' : format === 'human' ? 'Detailed' : 'Both'}`));
|
|
492
|
-
console.log(chalk.gray(` ${msg.standardsScope}: ${skillsConfig.standardsScope === 'minimal' ? msg.standardsScopeLean : msg.standardsScopeComplete}`));
|
|
493
|
-
console.log(chalk.gray(` ${msg.contentModeLabel}: ${skillsConfig.contentMode === 'full' ? msg.contentModeFull : skillsConfig.contentMode === 'index' ? msg.contentModeIndex : msg.contentModeMinimal}`));
|
|
494
|
-
console.log(chalk.gray(` ${msg.languages}: ${languages.length > 0 ? languages.join(', ') : common.none}`));
|
|
495
|
-
console.log(chalk.gray(` ${msg.frameworks}: ${frameworks.length > 0 ? frameworks.join(', ') : common.none}`));
|
|
496
|
-
console.log(chalk.gray(` ${msg.locale}: ${locale || msg.localeDefault}`));
|
|
497
|
-
console.log(chalk.gray(` ${common.aiTools}: ${aiTools.length > 0 ? aiTools.join(', ') : common.none}`));
|
|
498
|
-
console.log(chalk.gray(` ${msg.integrations}: ${integrations.length > 0 ? integrations.join(', ') : common.none}`));
|
|
499
|
-
console.log(chalk.gray(` ${common.methodology}: ${skillsConfig.methodology || common.none}${skillsConfig.methodology ? chalk.yellow(' [Experimental]') : ''}`));
|
|
500
|
-
|
|
501
|
-
if (skillsConfig.installed) {
|
|
502
|
-
let skillsStatusText;
|
|
503
|
-
if (skillsConfig.location === 'marketplace') {
|
|
504
|
-
skillsStatusText = msg.skillsMarketplace;
|
|
505
|
-
} else {
|
|
506
|
-
skillsStatusText = skillsConfig.needsInstall
|
|
507
|
-
? msg.skillsInstallTo.replace('{location}', skillsConfig.location)
|
|
508
|
-
: msg.skillsUsingExisting.replace('{location}', skillsConfig.location);
|
|
509
|
-
}
|
|
510
|
-
console.log(chalk.gray(` ${msg.skillsLabel}: ${skillsStatusText}`));
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
// Show selected standard options
|
|
514
|
-
if (standardOptions.workflow) {
|
|
515
|
-
console.log(chalk.gray(` ${msg.gitWorkflow}: ${standardOptions.workflow}`));
|
|
516
|
-
}
|
|
517
|
-
if (standardOptions.merge_strategy) {
|
|
518
|
-
console.log(chalk.gray(` ${msg.mergeStrategy}: ${standardOptions.merge_strategy}`));
|
|
519
|
-
}
|
|
520
|
-
if (standardOptions.commit_language) {
|
|
521
|
-
console.log(chalk.gray(` ${msg.commitLanguage}: ${standardOptions.commit_language}`));
|
|
522
|
-
}
|
|
523
|
-
if (standardOptions.test_levels && standardOptions.test_levels.length > 0) {
|
|
524
|
-
console.log(chalk.gray(` ${msg.testLevels}: ${standardOptions.test_levels.join(', ')}`));
|
|
525
|
-
}
|
|
526
|
-
console.log();
|
|
74
|
+
// Show Configuration Summary
|
|
75
|
+
displaySummary(config, msg, common);
|
|
527
76
|
|
|
77
|
+
// Confirm Installation
|
|
528
78
|
if (!options.yes) {
|
|
529
79
|
const confirmed = await promptConfirm(msg.proceedInstall);
|
|
530
80
|
if (!confirmed) {
|
|
@@ -533,611 +83,351 @@ export async function initCommand(options) {
|
|
|
533
83
|
}
|
|
534
84
|
}
|
|
535
85
|
|
|
536
|
-
// =====
|
|
86
|
+
// ===== Execute Installation =====
|
|
537
87
|
console.log();
|
|
538
|
-
|
|
88
|
+
|
|
89
|
+
// 1. Install Standards
|
|
90
|
+
const standardsResults = await installStandards(config, projectPath);
|
|
91
|
+
config.installedStandards = standardsResults.standards.map(s => basename(s));
|
|
92
|
+
|
|
93
|
+
// 2. Install Integrations
|
|
94
|
+
const integrationResults = await installIntegrations(config, projectPath);
|
|
539
95
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
extensions: [],
|
|
543
|
-
integrations: [],
|
|
96
|
+
// 3. Install Skills & Commands
|
|
97
|
+
const skillsResults = {
|
|
544
98
|
skills: [],
|
|
545
99
|
commands: [],
|
|
546
100
|
errors: [],
|
|
547
|
-
// New: hash tracking for enhanced file integrity
|
|
548
101
|
skillHashes: {},
|
|
549
|
-
commandHashes: {}
|
|
550
|
-
integrationBlockHashes: {}
|
|
102
|
+
commandHashes: {}
|
|
551
103
|
};
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
:
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
104
|
+
await installSkills(config.skillsConfig, projectPath, msg, skillsResults);
|
|
105
|
+
await installCommands(config.skillsConfig, projectPath, msg, skillsResults);
|
|
106
|
+
|
|
107
|
+
// Combine results
|
|
108
|
+
const combinedResults = {
|
|
109
|
+
standards: standardsResults.standards,
|
|
110
|
+
extensions: standardsResults.extensions,
|
|
111
|
+
integrations: integrationResults.integrations,
|
|
112
|
+
skills: skillsResults.skills,
|
|
113
|
+
commands: skillsResults.commands,
|
|
114
|
+
errors: [
|
|
115
|
+
...standardsResults.errors,
|
|
116
|
+
...integrationResults.errors,
|
|
117
|
+
...skillsResults.errors
|
|
118
|
+
],
|
|
119
|
+
fileHashes: standardsResults.fileHashes,
|
|
120
|
+
skillHashes: skillsResults.skillHashes,
|
|
121
|
+
commandHashes: skillsResults.commandHashes,
|
|
122
|
+
integrationBlockHashes: integrationResults.integrationBlockHashes,
|
|
123
|
+
manifestIntegrationConfigs: integrationResults.manifestIntegrationConfigs
|
|
567
124
|
};
|
|
568
125
|
|
|
569
|
-
//
|
|
570
|
-
|
|
571
|
-
const copiedOptions = [];
|
|
572
|
-
if (!std.options || !std.options[optionCategory]) return copiedOptions;
|
|
573
|
-
|
|
574
|
-
const optionIds = Array.isArray(selectedOptionIds) ? selectedOptionIds : [selectedOptionIds];
|
|
575
|
-
for (const optionId of optionIds) {
|
|
576
|
-
const option = findOption(std, optionCategory, optionId);
|
|
577
|
-
if (option) {
|
|
578
|
-
const sourcePath = getOptionSource(option, targetFormat);
|
|
579
|
-
const result = await copyStandard(sourcePath, '.standards/options', projectPath);
|
|
580
|
-
if (result.success) {
|
|
581
|
-
copiedOptions.push(sourcePath);
|
|
582
|
-
} else {
|
|
583
|
-
results.errors.push(`${sourcePath}: ${result.error}`);
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
return copiedOptions;
|
|
588
|
-
};
|
|
126
|
+
// 4. Write Manifest & Display Summary
|
|
127
|
+
writeFinalManifest(config, combinedResults, projectPath);
|
|
589
128
|
|
|
590
|
-
//
|
|
591
|
-
|
|
129
|
+
// 5. Setup Pre-commit Hook
|
|
130
|
+
await setupHuskyHook(projectPath);
|
|
592
131
|
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
const { success, sourcePath, error } = await copyStandardWithFormat(std, targetFormat);
|
|
596
|
-
if (success) {
|
|
597
|
-
results.standards.push(sourcePath);
|
|
598
|
-
} else {
|
|
599
|
-
results.errors.push(`${sourcePath}: ${error}`);
|
|
600
|
-
}
|
|
601
|
-
}
|
|
132
|
+
process.exit(0);
|
|
133
|
+
}
|
|
602
134
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}
|
|
622
|
-
// Testing options
|
|
623
|
-
if (std.id === 'testing' && standardOptions.test_levels) {
|
|
624
|
-
const copied = await copyOptionFiles(std, 'test_level', standardOptions.test_levels, targetFormat);
|
|
625
|
-
results.standards.push(...copied);
|
|
626
|
-
}
|
|
135
|
+
/**
|
|
136
|
+
* Configure Husky pre-commit hook
|
|
137
|
+
*/
|
|
138
|
+
async function setupHuskyHook(projectPath) {
|
|
139
|
+
const hasGit = existsSync(join(projectPath, '.git'));
|
|
140
|
+
if (!hasGit) return;
|
|
141
|
+
|
|
142
|
+
console.log(chalk.cyan('Configuring Pre-commit Hook (Husky)...'));
|
|
143
|
+
|
|
144
|
+
// 1. Install husky if needed
|
|
145
|
+
try {
|
|
146
|
+
const pkgPath = join(projectPath, 'package.json');
|
|
147
|
+
if (existsSync(pkgPath)) {
|
|
148
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
149
|
+
const hasHusky = pkg.devDependencies?.husky || pkg.dependencies?.husky;
|
|
150
|
+
|
|
151
|
+
if (!hasHusky) {
|
|
152
|
+
console.log(chalk.gray(' Installing husky...'));
|
|
153
|
+
execSync('npm install --save-dev husky', { stdio: 'ignore', cwd: projectPath });
|
|
627
154
|
}
|
|
628
155
|
}
|
|
156
|
+
} catch (e) {
|
|
157
|
+
console.log(chalk.yellow(` ⚠ Failed to check/install husky: ${e.message}`));
|
|
158
|
+
return;
|
|
629
159
|
}
|
|
630
160
|
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
for (const lang of languages) {
|
|
638
|
-
if (EXTENSION_MAPPINGS[lang]) {
|
|
639
|
-
const result = await copyStandard(EXTENSION_MAPPINGS[lang], '.standards', projectPath);
|
|
640
|
-
if (result.success) {
|
|
641
|
-
results.extensions.push(EXTENSION_MAPPINGS[lang]);
|
|
642
|
-
} else {
|
|
643
|
-
results.errors.push(`${EXTENSION_MAPPINGS[lang]}: ${result.error}`);
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
for (const fw of frameworks) {
|
|
649
|
-
if (EXTENSION_MAPPINGS[fw]) {
|
|
650
|
-
const result = await copyStandard(EXTENSION_MAPPINGS[fw], '.standards', projectPath);
|
|
651
|
-
if (result.success) {
|
|
652
|
-
results.extensions.push(EXTENSION_MAPPINGS[fw]);
|
|
653
|
-
} else {
|
|
654
|
-
results.errors.push(`${EXTENSION_MAPPINGS[fw]}: ${result.error}`);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
161
|
+
// 2. Initialize husky
|
|
162
|
+
const huskyDir = join(projectPath, '.husky');
|
|
163
|
+
try {
|
|
164
|
+
if (!existsSync(huskyDir)) {
|
|
165
|
+
console.log(chalk.gray(' Initializing husky...'));
|
|
166
|
+
execSync('npx husky init', { stdio: 'ignore', cwd: projectPath });
|
|
657
167
|
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
const result = await copyStandard(EXTENSION_MAPPINGS[locale], '.standards', projectPath);
|
|
661
|
-
if (result.success) {
|
|
662
|
-
results.extensions.push(EXTENSION_MAPPINGS[locale]);
|
|
663
|
-
} else {
|
|
664
|
-
results.errors.push(`${EXTENSION_MAPPINGS[locale]}: ${result.error}`);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
extSpinner.succeed(msg.copiedExtensions.replace('{count}', results.extensions.length));
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
// Build installed standards list for compliance instructions (used by all AI tools)
|
|
672
|
-
const installedStandardsList = results.standards.map(s => basename(s));
|
|
673
|
-
|
|
674
|
-
// Determine common language setting
|
|
675
|
-
let commonLanguage = 'en';
|
|
676
|
-
if (locale === 'zh-tw') {
|
|
677
|
-
commonLanguage = 'zh-tw';
|
|
678
|
-
} else if (standardOptions?.commit_language === 'bilingual') {
|
|
679
|
-
commonLanguage = 'bilingual';
|
|
680
|
-
} else if (standardOptions?.commit_language === 'traditional-chinese') {
|
|
681
|
-
commonLanguage = 'zh-tw';
|
|
168
|
+
} catch (e) {
|
|
169
|
+
// Ignore, might already be init
|
|
682
170
|
}
|
|
683
171
|
|
|
684
|
-
//
|
|
685
|
-
if (
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
for (const tool of integrations) {
|
|
693
|
-
// Check if this file was already generated (for AGENTS.md sharing)
|
|
694
|
-
const targetFile = getToolFilePath(tool);
|
|
695
|
-
if (generatedFiles.has(targetFile)) {
|
|
696
|
-
// Skip - file already generated by another tool (e.g., codex generated AGENTS.md, skip opencode)
|
|
697
|
-
continue;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
// Build enhanced config with installed standards
|
|
701
|
-
const enhancedConfig = {
|
|
702
|
-
...integrationConfigs[tool],
|
|
703
|
-
tool,
|
|
704
|
-
categories: integrationConfigs[tool]?.categories || ['anti-hallucination', 'commit-standards', 'code-review'],
|
|
705
|
-
language: integrationConfigs[tool]?.language || commonLanguage,
|
|
706
|
-
installedStandards: installedStandardsList,
|
|
707
|
-
contentMode: skillsConfig.contentMode || 'minimal',
|
|
708
|
-
level: level,
|
|
709
|
-
// Pass commit_language for dynamic commit standards generation
|
|
710
|
-
commitLanguage: standardOptions?.commit_language || 'english'
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
// Use dynamic generator
|
|
714
|
-
const result = writeIntegrationFile(tool, enhancedConfig, projectPath);
|
|
715
|
-
if (result.success) {
|
|
716
|
-
results.integrations.push(result.path);
|
|
717
|
-
generatedFiles.add(targetFile);
|
|
718
|
-
|
|
719
|
-
// Capture integration block hash for tracking UDS content
|
|
720
|
-
if (result.blockHashInfo) {
|
|
721
|
-
results.integrationBlockHashes[result.path] = {
|
|
722
|
-
...result.blockHashInfo,
|
|
723
|
-
installedAt: new Date().toISOString()
|
|
724
|
-
};
|
|
725
|
-
}
|
|
726
|
-
} else {
|
|
727
|
-
// Fall back to legacy static file copy
|
|
728
|
-
const mapping = INTEGRATION_MAPPINGS[tool];
|
|
729
|
-
if (mapping) {
|
|
730
|
-
const copyResult = await copyIntegration(mapping.source, mapping.target, projectPath);
|
|
731
|
-
if (copyResult.success) {
|
|
732
|
-
results.integrations.push(mapping.target);
|
|
733
|
-
generatedFiles.add(targetFile);
|
|
734
|
-
} else {
|
|
735
|
-
results.errors.push(`${tool}: ${result.error || copyResult.error}`);
|
|
736
|
-
}
|
|
737
|
-
} else {
|
|
738
|
-
results.errors.push(`${tool}: ${result.error}`);
|
|
739
|
-
}
|
|
740
|
-
}
|
|
172
|
+
// 3. Ensure .husky directory exists (fallback if husky init failed)
|
|
173
|
+
if (!existsSync(huskyDir)) {
|
|
174
|
+
try {
|
|
175
|
+
mkdirSync(huskyDir, { recursive: true });
|
|
176
|
+
} catch (e) {
|
|
177
|
+
console.log(chalk.red(` ✗ Failed to create .husky directory: ${e.message}`));
|
|
178
|
+
return;
|
|
741
179
|
}
|
|
742
|
-
|
|
743
|
-
intSpinner.succeed(msg.generatedIntegrations.replace('{count}', results.integrations.length));
|
|
744
180
|
}
|
|
745
181
|
|
|
746
|
-
//
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
const claudeSpinner = ora(msg.generatingClaudeMd).start();
|
|
750
|
-
|
|
751
|
-
const claudeConfig = {
|
|
752
|
-
tool: 'claude-code',
|
|
753
|
-
categories: ['anti-hallucination', 'commit-standards', 'code-review'],
|
|
754
|
-
languages: [],
|
|
755
|
-
exclusions: [],
|
|
756
|
-
customRules: [],
|
|
757
|
-
detailLevel: 'standard',
|
|
758
|
-
language: commonLanguage,
|
|
759
|
-
// Enhanced standards compliance fields
|
|
760
|
-
installedStandards: installedStandardsList,
|
|
761
|
-
contentMode: skillsConfig.contentMode || 'minimal',
|
|
762
|
-
level: level,
|
|
763
|
-
// Pass commit_language for dynamic commit standards generation
|
|
764
|
-
commitLanguage: standardOptions?.commit_language || 'english'
|
|
765
|
-
};
|
|
182
|
+
// 4. Add pre-commit hook
|
|
183
|
+
const preCommitPath = join(huskyDir, 'pre-commit');
|
|
184
|
+
const udsCmd = 'npx uds check --standard checkin-standards';
|
|
766
185
|
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
186
|
+
try {
|
|
187
|
+
let content = '';
|
|
188
|
+
if (existsSync(preCommitPath)) {
|
|
189
|
+
content = readFileSync(preCommitPath, 'utf-8');
|
|
771
190
|
} else {
|
|
772
|
-
|
|
773
|
-
|
|
191
|
+
// Create if not exists (husky init usually creates it, but just in case)
|
|
192
|
+
content = '#!/usr/bin/env sh\n. "$(dirname -- "$0")/_/husky.sh"\n';
|
|
774
193
|
}
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
// Install Skills if needed (unified multi-agent installation)
|
|
778
|
-
if (skillsConfig.needsInstall && skillsConfig.skillsInstallations?.length > 0) {
|
|
779
|
-
const skillSpinner = ora(msg.installingSkills).start();
|
|
780
|
-
|
|
781
|
-
// Use new unified installer for multi-agent support
|
|
782
|
-
const installResult = await installSkillsToMultipleAgents(
|
|
783
|
-
skillsConfig.skillsInstallations,
|
|
784
|
-
null, // Install all skills
|
|
785
|
-
projectPath
|
|
786
|
-
);
|
|
787
194
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
}
|
|
795
|
-
}
|
|
195
|
+
if (!content.includes('checkin-standards')) {
|
|
196
|
+
writeFileSync(preCommitPath, content + `\n# UDS Standard Check\n${udsCmd}\n`, 'utf-8');
|
|
197
|
+
try {
|
|
198
|
+
execSync(`chmod +x ${preCommitPath}`);
|
|
199
|
+
} catch (e) {
|
|
200
|
+
// Ignore chmod failures on systems that don't support it
|
|
796
201
|
}
|
|
797
|
-
|
|
798
|
-
results.errors.push(`${agentResult.agent} - ${err.skill}: ${err.error}`);
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
// Collect skill file hashes for integrity tracking
|
|
803
|
-
if (installResult.allFileHashes) {
|
|
804
|
-
Object.assign(results.skillHashes, installResult.allFileHashes);
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
// Build location summary for display
|
|
808
|
-
const targetLocations = skillsConfig.skillsInstallations.map(inst => {
|
|
809
|
-
const displayName = getAgentDisplayName(inst.agent);
|
|
810
|
-
const dir = getSkillsDirForAgent(inst.agent, inst.level, projectPath);
|
|
811
|
-
return `${displayName} (${dir})`;
|
|
812
|
-
}).join(', ');
|
|
813
|
-
|
|
814
|
-
if (installResult.totalErrors === 0) {
|
|
815
|
-
skillSpinner.succeed(msg.installedSkills
|
|
816
|
-
.replace('{count}', installResult.totalInstalled)
|
|
817
|
-
.replace('{locations}', targetLocations));
|
|
202
|
+
console.log(chalk.green(' ✓ Adding uds check to pre-commit hook'));
|
|
818
203
|
} else {
|
|
819
|
-
|
|
820
|
-
.replace('{count}', installResult.totalInstalled)
|
|
821
|
-
.replace('{errors}', installResult.totalErrors));
|
|
822
|
-
}
|
|
823
|
-
} else if (skillsConfig.needsInstall && skillsConfig.updateTargets.length > 0) {
|
|
824
|
-
// Legacy fallback for backward compatibility
|
|
825
|
-
const skillSpinner = ora(msg.installingSkills).start();
|
|
826
|
-
|
|
827
|
-
const skillFiles = getSkillFiles();
|
|
828
|
-
const repoInfo = getRepositoryInfo();
|
|
829
|
-
let successCount = 0;
|
|
830
|
-
let errorCount = 0;
|
|
831
|
-
|
|
832
|
-
for (const target of skillsConfig.updateTargets) {
|
|
833
|
-
for (const [skillName, files] of Object.entries(skillFiles)) {
|
|
834
|
-
const result = await downloadSkillToLocation(
|
|
835
|
-
skillName,
|
|
836
|
-
files,
|
|
837
|
-
target,
|
|
838
|
-
target === 'project' ? projectPath : null
|
|
839
|
-
);
|
|
840
|
-
|
|
841
|
-
if (result.success) {
|
|
842
|
-
successCount++;
|
|
843
|
-
if (!results.skills.includes(skillName)) {
|
|
844
|
-
results.skills.push(skillName);
|
|
845
|
-
}
|
|
846
|
-
} else {
|
|
847
|
-
errorCount++;
|
|
848
|
-
const failedFiles = result.files.filter(f => !f.success).map(f => f.file).join(', ');
|
|
849
|
-
results.errors.push(`Skill ${skillName} (${target}): failed to install ${failedFiles}`);
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
// Write manifest for each target location
|
|
854
|
-
const targetDir = target === 'project'
|
|
855
|
-
? getProjectSkillsDir(projectPath)
|
|
856
|
-
: getSkillsDir();
|
|
857
|
-
writeSkillsManifest(repoInfo.skills.version, targetDir);
|
|
204
|
+
console.log(chalk.gray(' ✓ Pre-commit hook already configured'));
|
|
858
205
|
}
|
|
206
|
+
} catch (e) {
|
|
207
|
+
console.log(chalk.red(` ✗ Failed to configure pre-commit hook: ${e.message}`));
|
|
208
|
+
}
|
|
209
|
+
console.log();
|
|
210
|
+
}
|
|
859
211
|
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
212
|
+
/**
|
|
213
|
+
* Build configuration for non-interactive mode
|
|
214
|
+
*/
|
|
215
|
+
function buildNonInteractiveConfig(options, detected, projectPath) {
|
|
216
|
+
const displayLanguage = options.locale || detectLanguage(null);
|
|
217
|
+
|
|
218
|
+
// Determine AI tools
|
|
219
|
+
const detectedAiTools = Object.keys(detected.aiTools).filter(k => detected.aiTools[k]);
|
|
220
|
+
const aiToolsNormalized = detectedAiTools.map(k => {
|
|
221
|
+
if (k === 'claudeCode') return 'claude-code';
|
|
222
|
+
if (k === 'geminiCli') return 'gemini-cli';
|
|
223
|
+
return k;
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
// Skills Configuration Logic
|
|
227
|
+
const hasSkillsCompatibleTool = aiToolsNormalized.some(t => t === 'claude-code' || t === 'opencode');
|
|
228
|
+
const onlySkillsCompatibleTools = aiToolsNormalized.every(t => t === 'claude-code' || t === 'opencode');
|
|
229
|
+
|
|
230
|
+
let skillsLocationFlag = options.skillsLocation;
|
|
231
|
+
if (!skillsLocationFlag) {
|
|
232
|
+
skillsLocationFlag = (hasSkillsCompatibleTool && onlySkillsCompatibleTools) ? 'marketplace' : 'none';
|
|
233
|
+
}
|
|
863
234
|
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
235
|
+
const contentModeFlag = options.contentMode || 'index';
|
|
236
|
+
let skillsConfig = {};
|
|
237
|
+
|
|
238
|
+
if (skillsLocationFlag === 'marketplace') {
|
|
239
|
+
skillsConfig = {
|
|
240
|
+
installed: true,
|
|
241
|
+
location: 'marketplace',
|
|
242
|
+
needsInstall: false,
|
|
243
|
+
updateTargets: [],
|
|
244
|
+
standardsScope: 'minimal',
|
|
245
|
+
contentMode: contentModeFlag
|
|
246
|
+
};
|
|
247
|
+
} else if (skillsLocationFlag === 'none') {
|
|
248
|
+
skillsConfig = {
|
|
249
|
+
installed: false,
|
|
250
|
+
location: null,
|
|
251
|
+
needsInstall: false,
|
|
252
|
+
updateTargets: [],
|
|
253
|
+
standardsScope: 'full',
|
|
254
|
+
contentMode: contentModeFlag
|
|
255
|
+
};
|
|
256
|
+
} else {
|
|
257
|
+
// Determine location (project vs user)
|
|
258
|
+
const userSkillsInfo = getInstalledSkillsInfo();
|
|
259
|
+
const projectSkillsInfo = getProjectInstalledSkillsInfo(projectPath);
|
|
260
|
+
let location = 'user';
|
|
261
|
+
|
|
262
|
+
if (skillsLocationFlag === 'project' || projectSkillsInfo?.installed) {
|
|
263
|
+
location = 'project';
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
skillsConfig = {
|
|
267
|
+
installed: true,
|
|
268
|
+
location,
|
|
269
|
+
needsInstall: skillsLocationFlag === 'project' || skillsLocationFlag === 'user' || (!userSkillsInfo?.installed && !projectSkillsInfo?.installed),
|
|
270
|
+
updateTargets: [location],
|
|
271
|
+
standardsScope: 'minimal',
|
|
272
|
+
contentMode: contentModeFlag
|
|
273
|
+
};
|
|
869
274
|
}
|
|
870
275
|
|
|
871
|
-
//
|
|
872
|
-
|
|
873
|
-
const
|
|
276
|
+
// Auto-install commands
|
|
277
|
+
const commandsSupportedAgents = aiToolsNormalized.filter(tool => {
|
|
278
|
+
const config = getAgentConfig(tool);
|
|
279
|
+
return config?.commands !== null;
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
if (commandsSupportedAgents.length > 0) {
|
|
283
|
+
skillsConfig.commandsInstallations = commandsSupportedAgents.map(agent => ({
|
|
284
|
+
agent,
|
|
285
|
+
level: 'project'
|
|
286
|
+
}));
|
|
287
|
+
}
|
|
874
288
|
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
289
|
+
return {
|
|
290
|
+
level: options.level ? parseInt(options.level, 10) : 2,
|
|
291
|
+
languages: options.lang ? [options.lang] : Object.keys(detected.languages).filter(k => detected.languages[k]),
|
|
292
|
+
frameworks: options.framework ? [options.framework] : Object.keys(detected.frameworks).filter(k => detected.frameworks[k]),
|
|
293
|
+
displayLanguage,
|
|
294
|
+
format: options.format || 'ai',
|
|
295
|
+
standardOptions: {
|
|
296
|
+
workflow: options.workflow || 'github-flow',
|
|
297
|
+
merge_strategy: options.mergeStrategy || 'squash',
|
|
298
|
+
commit_language: options.commitLang || 'english',
|
|
299
|
+
test_levels: options.testLevels ? options.testLevels.split(',') : ['unit-testing', 'integration-testing']
|
|
300
|
+
},
|
|
301
|
+
skillsConfig,
|
|
302
|
+
aiTools: aiToolsNormalized,
|
|
303
|
+
integrations: [...aiToolsNormalized],
|
|
304
|
+
contentMode: skillsConfig.contentMode || 'minimal',
|
|
305
|
+
standardsScope: skillsConfig.standardsScope || 'full',
|
|
306
|
+
methodology: null
|
|
307
|
+
};
|
|
308
|
+
}
|
|
880
309
|
|
|
881
|
-
|
|
882
|
-
|
|
310
|
+
/**
|
|
311
|
+
* Get label for a value from translation labels object
|
|
312
|
+
* Tries to find in messages.js labels, falls back to original value
|
|
313
|
+
* @param {string} key - The translation key (e.g., 'gitWorkflow', 'mergeStrategy', 'level')
|
|
314
|
+
* @param {string|number} value - The value to look up
|
|
315
|
+
* @returns {string} The label or the original value if not found
|
|
316
|
+
*/
|
|
317
|
+
function getValueLabel(key, value) {
|
|
318
|
+
const translations = t();
|
|
319
|
+
// Try direct key lookup (e.g., t().gitWorkflow.labels)
|
|
320
|
+
const labels = translations[key]?.labels;
|
|
321
|
+
if (labels?.[value]) {
|
|
322
|
+
return labels[value];
|
|
323
|
+
}
|
|
324
|
+
// Try commands.init labels for nested structures
|
|
325
|
+
const initLabels = translations.commands?.init?.[key + 'Labels'];
|
|
326
|
+
if (initLabels?.[value]) {
|
|
327
|
+
return initLabels[value];
|
|
328
|
+
}
|
|
329
|
+
return String(value);
|
|
330
|
+
}
|
|
883
331
|
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
for (const err of agentResult.errors) {
|
|
894
|
-
results.errors.push(`${agentResult.agent} command - ${err.command}: ${err.error}`);
|
|
895
|
-
}
|
|
896
|
-
}
|
|
332
|
+
/**
|
|
333
|
+
* Display configuration summary
|
|
334
|
+
* Order follows init-flow.js question sequence for consistency
|
|
335
|
+
*/
|
|
336
|
+
function displaySummary(config, msg, common) {
|
|
337
|
+
console.log(chalk.cyan(msg.configSummary));
|
|
897
338
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
}
|
|
339
|
+
// 1. Display Language (STEP 1)
|
|
340
|
+
const displayLangLabel = config.displayLanguage === 'zh-tw' ? '繁體中文' : config.displayLanguage === 'zh-cn' ? '简体中文' : 'English';
|
|
341
|
+
console.log(chalk.gray(` ${msg.displayLanguageLabel || 'Display Language'}: ${displayLangLabel}`));
|
|
902
342
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
const agent = typeof item === 'string' ? item : item.agent;
|
|
907
|
-
const level = typeof item === 'string' ? 'project' : (item.level || 'project');
|
|
908
|
-
const displayName = getAgentDisplayName(agent);
|
|
909
|
-
const dir = getCommandsDirForAgent(agent, level, projectPath);
|
|
910
|
-
return `${displayName} (${dir})`;
|
|
911
|
-
}).join(', ');
|
|
343
|
+
// 2. AI Tools (STEP 2) - Use getAgentDisplayName for readable names
|
|
344
|
+
const aiToolNames = config.aiTools.map(id => getAgentDisplayName(id) || id);
|
|
345
|
+
console.log(chalk.gray(` ${common.aiTools}: ${aiToolNames.length > 0 ? aiToolNames.join(', ') : common.none}`));
|
|
912
346
|
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
347
|
+
// 3. Skills Installation (STEP 4)
|
|
348
|
+
if (config.skillsConfig.installed) {
|
|
349
|
+
let skillsStatusText;
|
|
350
|
+
if (config.skillsConfig.location === 'marketplace') {
|
|
351
|
+
skillsStatusText = msg.skillsMarketplace;
|
|
352
|
+
} else if (config.skillsConfig.location === 'multiple') {
|
|
353
|
+
// Handle multiple installation locations
|
|
354
|
+
const count = config.skillsConfig.skillsInstallations?.length || 0;
|
|
355
|
+
skillsStatusText = (msg.skillsInstalledToCount || '{count} locations').replace('{count}', count);
|
|
917
356
|
} else {
|
|
918
|
-
|
|
919
|
-
.replace('{
|
|
920
|
-
.replace('{
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
// Compute file hashes for integrity checking
|
|
925
|
-
const fileHashes = {};
|
|
926
|
-
const now = new Date().toISOString();
|
|
927
|
-
|
|
928
|
-
// Helper to compute and store hash
|
|
929
|
-
const addFileHash = (relativePath) => {
|
|
930
|
-
const fullPath = join(projectPath, relativePath);
|
|
931
|
-
const hashInfo = computeFileHash(fullPath);
|
|
932
|
-
if (hashInfo) {
|
|
933
|
-
fileHashes[relativePath] = {
|
|
934
|
-
...hashInfo,
|
|
935
|
-
installedAt: now
|
|
936
|
-
};
|
|
357
|
+
skillsStatusText = config.skillsConfig.needsInstall
|
|
358
|
+
? msg.skillsInstallTo.replace('{location}', config.skillsConfig.location)
|
|
359
|
+
: msg.skillsUsingExisting.replace('{location}', config.skillsConfig.location);
|
|
937
360
|
}
|
|
938
|
-
};
|
|
939
|
-
|
|
940
|
-
// Hash standards (stored as source paths, need to convert to target paths)
|
|
941
|
-
for (const sourcePath of results.standards) {
|
|
942
|
-
const fileName = basename(sourcePath);
|
|
943
|
-
// Check if it's an option file (path contains 'options/')
|
|
944
|
-
const relativePath = sourcePath.includes('options/')
|
|
945
|
-
? join('.standards', 'options', fileName)
|
|
946
|
-
: join('.standards', fileName);
|
|
947
|
-
addFileHash(relativePath);
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
// Hash extensions
|
|
951
|
-
for (const sourcePath of results.extensions) {
|
|
952
|
-
const fileName = basename(sourcePath);
|
|
953
|
-
const relativePath = join('.standards', fileName);
|
|
954
|
-
addFileHash(relativePath);
|
|
361
|
+
console.log(chalk.gray(` ${msg.skillsLabel}: ${skillsStatusText}`));
|
|
955
362
|
}
|
|
956
363
|
|
|
957
|
-
//
|
|
958
|
-
|
|
959
|
-
|
|
364
|
+
// 3b. Commands Installation (STEP 5)
|
|
365
|
+
if (config.skillsConfig.commandsInstallations?.length > 0) {
|
|
366
|
+
const count = config.skillsConfig.commandsInstallations.length;
|
|
367
|
+
const commandsStatusText = (msg.commandsInstalledToCount || '{count} locations').replace('{count}', count);
|
|
368
|
+
console.log(chalk.gray(` ${msg.commandsLabel || 'Slash Commands'}: ${commandsStatusText}`));
|
|
960
369
|
}
|
|
961
370
|
|
|
962
|
-
//
|
|
963
|
-
|
|
371
|
+
// 4. Standards Scope (STEP 6)
|
|
372
|
+
console.log(chalk.gray(` ${msg.standardsScope}: ${config.skillsConfig.standardsScope === 'minimal' ? msg.standardsScopeLean : msg.standardsScopeComplete}`));
|
|
964
373
|
|
|
965
|
-
//
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
workflow: standardOptions.workflow || null,
|
|
969
|
-
merge_strategy: standardOptions.merge_strategy || null,
|
|
970
|
-
commit_language: standardOptions.commit_language || null,
|
|
971
|
-
test_levels: standardOptions.test_levels || []
|
|
972
|
-
};
|
|
374
|
+
// 5. Adoption Level (STEP 7) - Use level.labels for translated display
|
|
375
|
+
const levelLabels = t().level?.labels || { 1: 'Level 1', 2: 'Level 2', 3: 'Level 3' };
|
|
376
|
+
console.log(chalk.gray(` ${common.level}: ${levelLabels[config.level] || `Level ${config.level}`}`));
|
|
973
377
|
|
|
974
|
-
//
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
const integrationConfigs = skillsConfig.integrationConfigs || {};
|
|
378
|
+
// 6. Standards Format (STEP 8)
|
|
379
|
+
const formatLabels = t().format?.labels || { ai: 'Compact', human: 'Detailed', both: 'Both' };
|
|
380
|
+
console.log(chalk.gray(` ${common.format}: ${formatLabels[config.format]}`));
|
|
978
381
|
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
// Check if this is CLAUDE.md
|
|
995
|
-
if (targetPath === 'CLAUDE.md' || targetPath === '.standards/CLAUDE.md') {
|
|
996
|
-
toolName = 'claude-code';
|
|
997
|
-
config = {
|
|
998
|
-
tool: 'claude-code',
|
|
999
|
-
categories: ['anti-hallucination', 'commit-standards', 'code-review'],
|
|
1000
|
-
languages: [],
|
|
1001
|
-
exclusions: [],
|
|
1002
|
-
customRules: [],
|
|
1003
|
-
detailLevel: 'standard',
|
|
1004
|
-
language: commonLanguage
|
|
1005
|
-
};
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
if (toolName && config) {
|
|
1009
|
-
manifestIntegrationConfigs[targetPath] = {
|
|
1010
|
-
tool: toolName,
|
|
1011
|
-
categories: config.categories || [],
|
|
1012
|
-
detailLevel: config.detailLevel || 'standard',
|
|
1013
|
-
language: config.language || commonLanguage,
|
|
1014
|
-
contentMode: skillsConfig.contentMode || 'minimal',
|
|
1015
|
-
installedStandards: installedStandardsList,
|
|
1016
|
-
generatedAt: now
|
|
1017
|
-
};
|
|
1018
|
-
}
|
|
382
|
+
// 7. Standard Options (STEP 9) - use labels for human-readable values
|
|
383
|
+
if (config.standardOptions.workflow) {
|
|
384
|
+
console.log(chalk.gray(` ${msg.gitWorkflow}: ${getValueLabel('gitWorkflow', config.standardOptions.workflow)}`));
|
|
385
|
+
}
|
|
386
|
+
if (config.standardOptions.merge_strategy) {
|
|
387
|
+
console.log(chalk.gray(` ${msg.mergeStrategy}: ${getValueLabel('mergeStrategy', config.standardOptions.merge_strategy)}`));
|
|
388
|
+
}
|
|
389
|
+
if (config.standardOptions.commit_language) {
|
|
390
|
+
console.log(chalk.gray(` ${msg.commitLanguage}: ${getValueLabel('commitLanguage', config.standardOptions.commit_language)}`));
|
|
391
|
+
}
|
|
392
|
+
if (config.standardOptions.test_levels?.length > 0) {
|
|
393
|
+
const testLabels = config.standardOptions.test_levels.map(level => getValueLabel('testLevels', level));
|
|
394
|
+
console.log(chalk.gray(` ${msg.testLevels}: ${testLabels.join(', ')}`));
|
|
1019
395
|
}
|
|
1020
396
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
upstream: {
|
|
1024
|
-
repo: 'AsiaOstrich/universal-dev-standards',
|
|
1025
|
-
version: repoInfo.standards.version,
|
|
1026
|
-
installed: new Date().toISOString().split('T')[0]
|
|
1027
|
-
},
|
|
1028
|
-
level,
|
|
1029
|
-
format,
|
|
1030
|
-
standardsScope: skillsConfig.standardsScope || 'full',
|
|
1031
|
-
contentMode: skillsConfig.contentMode || 'minimal',
|
|
1032
|
-
standards: results.standards,
|
|
1033
|
-
extensions: results.extensions,
|
|
1034
|
-
integrations: results.integrations,
|
|
1035
|
-
integrationConfigs: manifestIntegrationConfigs,
|
|
1036
|
-
options: manifestOptions,
|
|
1037
|
-
aiTools,
|
|
1038
|
-
skills: {
|
|
1039
|
-
installed: skillsConfig.installed,
|
|
1040
|
-
location: skillsConfig.location,
|
|
1041
|
-
names: skillsConfig.location === 'marketplace' ? ['all-via-plugin'] : results.skills,
|
|
1042
|
-
version: skillsConfig.installed ? repoInfo.skills.version : null,
|
|
1043
|
-
// New: multi-agent installations tracking
|
|
1044
|
-
installations: skillsConfig.skillsInstallations || []
|
|
1045
|
-
},
|
|
1046
|
-
commands: {
|
|
1047
|
-
installed: skillsConfig.commandsInstallations?.length > 0,
|
|
1048
|
-
names: results.commands || [],
|
|
1049
|
-
installations: skillsConfig.commandsInstallations || []
|
|
1050
|
-
},
|
|
1051
|
-
methodology: skillsConfig.methodology ? {
|
|
1052
|
-
active: skillsConfig.methodology,
|
|
1053
|
-
available: ['tdd', 'bdd', 'sdd', 'atdd'],
|
|
1054
|
-
config: {
|
|
1055
|
-
checkpointsEnabled: true,
|
|
1056
|
-
reminderIntensity: 'suggest',
|
|
1057
|
-
skipLimit: 3
|
|
1058
|
-
}
|
|
1059
|
-
} : null,
|
|
1060
|
-
fileHashes,
|
|
1061
|
-
// New: enhanced file tracking for Skills, Commands, and Integration blocks
|
|
1062
|
-
skillHashes: results.skillHashes || {},
|
|
1063
|
-
commandHashes: results.commandHashes || {},
|
|
1064
|
-
integrationBlockHashes: results.integrationBlockHashes || {}
|
|
1065
|
-
};
|
|
397
|
+
// 8. Language Extensions (STEP 10)
|
|
398
|
+
console.log(chalk.gray(` ${msg.languages}: ${config.languages.length > 0 ? config.languages.join(', ') : common.none}`));
|
|
1066
399
|
|
|
1067
|
-
|
|
400
|
+
// 9. Framework Extensions (STEP 11)
|
|
401
|
+
console.log(chalk.gray(` ${msg.frameworks}: ${config.frameworks.length > 0 ? config.frameworks.join(', ') : common.none}`));
|
|
1068
402
|
|
|
1069
|
-
//
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
403
|
+
// 10. Integration Config (STEP 12)
|
|
404
|
+
if (config.skillsConfig.integrationConfigs && Object.keys(config.skillsConfig.integrationConfigs).length > 0) {
|
|
405
|
+
// Get the first config (shared config)
|
|
406
|
+
const firstConfigKey = Object.keys(config.skillsConfig.integrationConfigs)[0];
|
|
407
|
+
const integrationConfig = config.skillsConfig.integrationConfigs[firstConfigKey];
|
|
1073
408
|
|
|
1074
|
-
|
|
1075
|
-
|
|
409
|
+
if (integrationConfig && integrationConfig.mode) {
|
|
410
|
+
const modeLabels = t().integration?.mode?.labels || { default: 'Default', custom: 'Custom', merge: 'Merge' };
|
|
411
|
+
const modeLabel = modeLabels[integrationConfig.mode] || integrationConfig.mode;
|
|
412
|
+
console.log(chalk.gray(` ${msg.integrationConfigLabel || 'Integration Config'}: ${modeLabel}`));
|
|
1076
413
|
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
const skillLocations = [];
|
|
1083
|
-
if (skillsConfig.skillsInstallations?.length > 0) {
|
|
1084
|
-
for (const inst of skillsConfig.skillsInstallations) {
|
|
1085
|
-
const displayName = getAgentDisplayName(inst.agent);
|
|
1086
|
-
const dir = getSkillsDirForAgent(inst.agent, inst.level, projectPath);
|
|
1087
|
-
skillLocations.push(`${displayName}: ${dir}`);
|
|
1088
|
-
}
|
|
1089
|
-
} else {
|
|
1090
|
-
// Legacy fallback
|
|
1091
|
-
if (skillsConfig.updateTargets.includes('user')) {
|
|
1092
|
-
skillLocations.push('~/.claude/skills/');
|
|
1093
|
-
}
|
|
1094
|
-
if (skillsConfig.updateTargets.includes('project')) {
|
|
1095
|
-
skillLocations.push('.claude/skills/');
|
|
1096
|
-
}
|
|
414
|
+
// If custom mode, show selected categories
|
|
415
|
+
if (integrationConfig.mode === 'custom' && integrationConfig.categories?.length > 0) {
|
|
416
|
+
const categoryLabels = t().integration?.categoryLabels || {};
|
|
417
|
+
const categoryNames = integrationConfig.categories.map(cat => categoryLabels[cat] || cat);
|
|
418
|
+
console.log(chalk.gray(` ${msg.ruleCategoriesLabel || 'Rule Categories'}: ${categoryNames.join(', ')}`));
|
|
1097
419
|
}
|
|
1098
|
-
console.log(chalk.gray(` ${msg.skillsInstalledTo.replace('{count}', results.skills.length).replace('{locations}', skillLocations.join(' and '))}`));
|
|
1099
420
|
}
|
|
1100
421
|
}
|
|
1101
422
|
|
|
1102
|
-
//
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
// Support both {agent, level} objects and simple agent strings (backward compatibility)
|
|
1106
|
-
const agent = typeof item === 'string' ? item : item.agent;
|
|
1107
|
-
const level = typeof item === 'string' ? 'project' : (item.level || 'project');
|
|
1108
|
-
const displayName = getAgentDisplayName(agent);
|
|
1109
|
-
const dir = getCommandsDirForAgent(agent, level, projectPath);
|
|
1110
|
-
return `${displayName}: ${dir}`;
|
|
1111
|
-
}).join(' and ') || '';
|
|
1112
|
-
|
|
1113
|
-
console.log(chalk.gray(` ${(msg.commandsInstalledTo || 'Commands ({count}): {locations}').replace('{count}', results.commands.length).replace('{locations}', cmdLocations)}`));
|
|
1114
|
-
}
|
|
1115
|
-
console.log(chalk.gray(` ${msg.manifestCreated}`));
|
|
423
|
+
// 11. Content Mode (STEP 13)
|
|
424
|
+
const contentModeLabels = t().contentMode?.labels || { index: 'Standard', full: 'Full', minimal: 'Minimal' };
|
|
425
|
+
console.log(chalk.gray(` ${msg.contentModeLabel}: ${contentModeLabels[config.contentMode] || config.contentMode}`));
|
|
1116
426
|
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
console.log(chalk.
|
|
1120
|
-
for (const err of results.errors) {
|
|
1121
|
-
console.log(chalk.gray(` ${err}`));
|
|
1122
|
-
}
|
|
427
|
+
// 12. Methodology (STEP 14, experimental)
|
|
428
|
+
if (config.skillsConfig.methodology) {
|
|
429
|
+
console.log(chalk.gray(` ${common.methodology}: ${config.skillsConfig.methodology} ${chalk.yellow('[Experimental]')}`));
|
|
1123
430
|
}
|
|
1124
431
|
|
|
1125
432
|
console.log();
|
|
1126
|
-
|
|
1127
|
-
console.log(chalk.gray(` ${msg.reviewDirectory}`));
|
|
1128
|
-
console.log(chalk.gray(` ${msg.addToVcs}`));
|
|
1129
|
-
if (skillsConfig.installed) {
|
|
1130
|
-
// Build unique tool names from installations
|
|
1131
|
-
const toolNames = skillsConfig.skillsInstallations?.length > 0
|
|
1132
|
-
? [...new Set(skillsConfig.skillsInstallations.map(inst => getAgentDisplayName(inst.agent)))].join(' / ')
|
|
1133
|
-
: 'Claude Code';
|
|
1134
|
-
console.log(chalk.gray(` ${msg.restartAgent.replace('{tools}', toolNames)}`));
|
|
1135
|
-
console.log(chalk.gray(` 4. ${msg.runCheck}`));
|
|
1136
|
-
} else {
|
|
1137
|
-
console.log(chalk.gray(` 3. ${msg.runCheck}`));
|
|
1138
|
-
}
|
|
1139
|
-
console.log();
|
|
1140
|
-
|
|
1141
|
-
// Exit explicitly to prevent hanging due to inquirer's readline interface
|
|
1142
|
-
process.exit(0);
|
|
1143
|
-
}
|
|
433
|
+
}
|