universal-dev-standards 5.0.0-rc.8 → 5.0.0
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/bin/uds.js +5 -3
- package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +178 -0
- package/bundled/ai/standards/agent-dispatch.ai.yaml +69 -0
- package/bundled/ai/standards/ai-command-behavior.ai.yaml +45 -0
- package/bundled/ai/standards/api-design-standards.ai.yaml +192 -0
- package/bundled/ai/standards/branch-completion.ai.yaml +82 -0
- package/bundled/ai/standards/change-batching-standards.ai.yaml +195 -0
- package/bundled/ai/standards/database-standards.ai.yaml +220 -0
- package/bundled/ai/standards/error-codes.ai.yaml +37 -2
- package/bundled/ai/standards/git-worktree.ai.yaml +77 -0
- package/bundled/ai/standards/logging.ai.yaml +21 -2
- package/bundled/ai/standards/model-selection.ai.yaml +81 -0
- package/bundled/ai/standards/pipeline-integration-standards.ai.yaml +184 -0
- package/bundled/ai/standards/systematic-debugging.ai.yaml +73 -0
- package/bundled/ai/standards/verification-evidence.ai.yaml +84 -0
- package/bundled/ai/standards/workflow-enforcement.ai.yaml +253 -0
- package/bundled/core/acceptance-criteria-traceability.md +293 -0
- package/bundled/core/agent-dispatch.md +149 -0
- package/bundled/core/ai-command-behavior.md +239 -0
- package/bundled/core/api-design-standards.md +938 -0
- package/bundled/core/branch-completion.md +158 -0
- package/bundled/core/change-batching-standards.md +257 -0
- package/bundled/core/checkin-standards.md +43 -6
- package/bundled/core/database-standards.md +828 -0
- package/bundled/core/error-code-standards.md +228 -2
- package/bundled/core/forward-derivation-standards.md +54 -2
- package/bundled/core/git-worktree.md +131 -0
- package/bundled/core/model-selection.md +153 -0
- package/bundled/core/pipeline-integration-standards.md +230 -0
- package/bundled/core/systematic-debugging.md +156 -0
- package/bundled/core/testing-standards.md +49 -39
- package/bundled/core/verification-evidence.md +172 -0
- package/bundled/core/workflow-enforcement.md +132 -0
- package/bundled/locales/zh-CN/CLAUDE.md +2 -2
- package/bundled/locales/zh-CN/README.md +4 -4
- package/bundled/locales/zh-CN/SECURITY.md +92 -0
- package/bundled/locales/zh-CN/core/acceptance-criteria-traceability.md +301 -0
- package/bundled/locales/zh-CN/core/acceptance-test-driven-development.md +47 -0
- package/bundled/locales/zh-CN/core/accessibility-standards.md +124 -0
- package/bundled/locales/zh-CN/core/agent-dispatch.md +113 -0
- package/bundled/locales/zh-CN/core/ai-agreement-standards.md +103 -0
- package/bundled/locales/zh-CN/core/ai-command-behavior.md +247 -0
- package/bundled/locales/zh-CN/core/api-design-standards.md +946 -0
- package/bundled/locales/zh-CN/core/behavior-driven-development.md +48 -0
- package/bundled/locales/zh-CN/core/branch-completion.md +112 -0
- package/bundled/locales/zh-CN/core/change-batching-standards.md +265 -0
- package/bundled/locales/zh-CN/core/checkin-standards.md +43 -5
- package/bundled/locales/zh-CN/core/context-aware-loading.md +106 -0
- package/bundled/locales/zh-CN/core/database-standards.md +836 -0
- package/bundled/locales/zh-CN/core/deployment-standards.md +80 -0
- package/bundled/locales/zh-CN/core/error-code-standards.md +2 -2
- package/bundled/locales/zh-CN/core/forward-derivation-standards.md +493 -0
- package/bundled/locales/zh-CN/core/git-worktree.md +101 -0
- package/bundled/locales/zh-CN/core/model-selection.md +112 -0
- package/bundled/locales/zh-CN/core/performance-standards.md +104 -0
- package/bundled/locales/zh-CN/core/pipeline-integration-standards.md +238 -0
- package/bundled/locales/zh-CN/core/project-context-memory.md +124 -0
- package/bundled/locales/zh-CN/core/requirement-engineering.md +49 -0
- package/bundled/locales/zh-CN/core/security-standards.md +100 -0
- package/bundled/locales/zh-CN/core/systematic-debugging.md +106 -0
- package/bundled/locales/zh-CN/core/test-governance.md +116 -0
- package/bundled/locales/zh-CN/core/testing-standards.md +392 -156
- package/bundled/locales/zh-CN/core/verification-evidence.md +118 -0
- package/bundled/locales/zh-CN/core/virtual-organization-standards.md +104 -0
- package/bundled/locales/zh-CN/core/workflow-enforcement.md +132 -0
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +27 -1
- package/bundled/locales/zh-CN/docs/CLI-INIT-OPTIONS.md +9 -1
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +37 -9
- package/bundled/locales/zh-CN/docs/USER-MANUAL.md +652 -0
- package/bundled/locales/zh-CN/integrations/github-copilot/copilot-instructions.md +1 -1
- package/bundled/locales/zh-CN/integrations/openspec/AGENTS.md +29 -4
- package/bundled/locales/zh-CN/integrations/spec-kit/AGENTS.md +143 -72
- package/bundled/locales/zh-CN/skills/ac-coverage-assistant/SKILL.md +126 -0
- package/bundled/locales/zh-CN/skills/api-design-assistant/SKILL.md +100 -0
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +119 -0
- package/bundled/locales/zh-CN/skills/ci-cd-assistant/SKILL.md +82 -0
- package/bundled/locales/zh-CN/skills/commands/ac-coverage.md +97 -0
- package/bundled/locales/zh-CN/skills/commands/api-design.md +94 -0
- package/bundled/locales/zh-CN/skills/commands/atdd.md +163 -0
- package/bundled/locales/zh-CN/skills/commands/audit.md +77 -0
- package/bundled/locales/zh-CN/skills/commands/bdd.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/brainstorm.md +87 -0
- package/bundled/locales/zh-CN/skills/commands/changelog.md +63 -0
- package/bundled/locales/zh-CN/skills/commands/check.md +219 -0
- package/bundled/locales/zh-CN/skills/commands/checkin.md +61 -0
- package/bundled/locales/zh-CN/skills/commands/ci-cd.md +77 -0
- package/bundled/locales/zh-CN/skills/commands/commit.md +81 -0
- package/bundled/locales/zh-CN/skills/commands/config.md +207 -0
- package/bundled/locales/zh-CN/skills/commands/coverage.md +74 -0
- package/bundled/locales/zh-CN/skills/commands/database.md +78 -0
- package/bundled/locales/zh-CN/skills/commands/derive-all.md +58 -0
- package/bundled/locales/zh-CN/skills/commands/derive-atdd.md +54 -0
- package/bundled/locales/zh-CN/skills/commands/derive-bdd.md +53 -0
- package/bundled/locales/zh-CN/skills/commands/derive-tdd.md +54 -0
- package/bundled/locales/zh-CN/skills/commands/derive.md +78 -0
- package/bundled/locales/zh-CN/skills/commands/dev-workflow.md +119 -0
- package/bundled/locales/zh-CN/skills/commands/discover.md +86 -0
- package/bundled/locales/zh-CN/skills/commands/docgen.md +67 -0
- package/bundled/locales/zh-CN/skills/commands/docs.md +65 -0
- package/bundled/locales/zh-CN/skills/commands/durable.md +87 -0
- package/bundled/locales/zh-CN/skills/commands/guide.md +52 -0
- package/bundled/locales/zh-CN/skills/commands/incident.md +92 -0
- package/bundled/locales/zh-CN/skills/commands/init.md +272 -0
- package/bundled/locales/zh-CN/skills/commands/methodology.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/metrics.md +73 -0
- package/bundled/locales/zh-CN/skills/commands/migrate.md +92 -0
- package/bundled/locales/zh-CN/skills/commands/pr.md +80 -0
- package/bundled/locales/zh-CN/skills/commands/refactor.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/release.md +62 -0
- package/bundled/locales/zh-CN/skills/commands/requirement.md +54 -0
- package/bundled/locales/zh-CN/skills/commands/reverse-bdd.md +47 -0
- package/bundled/locales/zh-CN/skills/commands/reverse-sdd.md +51 -0
- package/bundled/locales/zh-CN/skills/commands/reverse-tdd.md +51 -0
- package/bundled/locales/zh-CN/skills/commands/reverse.md +63 -0
- package/bundled/locales/zh-CN/skills/commands/review.md +50 -0
- package/bundled/locales/zh-CN/skills/commands/scan.md +76 -0
- package/bundled/locales/zh-CN/skills/commands/sdd-retro.md +40 -0
- package/bundled/locales/zh-CN/skills/commands/sdd.md +379 -0
- package/bundled/locales/zh-CN/skills/commands/security.md +75 -0
- package/bundled/locales/zh-CN/skills/commands/tdd.md +111 -0
- package/bundled/locales/zh-CN/skills/commands/update.md +337 -0
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +1 -2
- package/bundled/locales/zh-CN/skills/database-assistant/SKILL.md +97 -0
- package/bundled/locales/zh-CN/skills/dev-workflow-guide/SKILL.md +145 -0
- package/bundled/locales/zh-CN/skills/durable-execution-assistant/SKILL.md +84 -0
- package/bundled/locales/zh-CN/skills/incident-response-assistant/SKILL.md +107 -0
- package/bundled/locales/zh-CN/skills/metrics-dashboard-assistant/SKILL.md +67 -0
- package/bundled/locales/zh-CN/skills/migration-assistant/SKILL.md +77 -0
- package/bundled/locales/zh-CN/skills/pr-automation-assistant/SKILL.md +90 -0
- package/bundled/locales/zh-CN/skills/security-assistant/SKILL.md +79 -0
- package/bundled/locales/zh-CN/skills/security-scan-assistant/SKILL.md +72 -0
- package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +73 -10
- package/bundled/locales/zh-CN/skills/spec-driven-dev/guide.md +267 -122
- package/bundled/locales/zh-TW/CLAUDE.md +2 -2
- package/bundled/locales/zh-TW/README.md +4 -4
- package/bundled/locales/zh-TW/SECURITY.md +92 -0
- package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +301 -0
- package/bundled/locales/zh-TW/core/acceptance-test-driven-development.md +47 -0
- package/bundled/locales/zh-TW/core/accessibility-standards.md +84 -0
- package/bundled/locales/zh-TW/core/agent-dispatch.md +89 -0
- package/bundled/locales/zh-TW/core/ai-agreement-standards.md +87 -0
- package/bundled/locales/zh-TW/core/ai-command-behavior.md +247 -0
- package/bundled/locales/zh-TW/core/api-design-standards.md +946 -0
- package/bundled/locales/zh-TW/core/behavior-driven-development.md +63 -0
- package/bundled/locales/zh-TW/core/branch-completion.md +76 -0
- package/bundled/locales/zh-TW/core/change-batching-standards.md +265 -0
- package/bundled/locales/zh-TW/core/checkin-standards.md +39 -5
- package/bundled/locales/zh-TW/core/context-aware-loading.md +86 -0
- package/bundled/locales/zh-TW/core/database-standards.md +836 -0
- package/bundled/locales/zh-TW/core/deployment-standards.md +66 -0
- package/bundled/locales/zh-TW/core/error-code-standards.md +230 -4
- package/bundled/locales/zh-TW/core/forward-derivation-standards.md +62 -2
- package/bundled/locales/zh-TW/core/git-worktree.md +104 -0
- package/bundled/locales/zh-TW/core/model-selection.md +83 -0
- package/bundled/locales/zh-TW/core/performance-standards.md +84 -0
- package/bundled/locales/zh-TW/core/pipeline-integration-standards.md +238 -0
- package/bundled/locales/zh-TW/core/project-context-memory.md +79 -0
- package/bundled/locales/zh-TW/core/requirement-engineering.md +79 -0
- package/bundled/locales/zh-TW/core/security-standards.md +74 -0
- package/bundled/locales/zh-TW/core/systematic-debugging.md +95 -0
- package/bundled/locales/zh-TW/core/test-governance.md +88 -0
- package/bundled/locales/zh-TW/core/testing-standards.md +309 -86
- package/bundled/locales/zh-TW/core/verification-evidence.md +94 -0
- package/bundled/locales/zh-TW/core/virtual-organization-standards.md +88 -0
- package/bundled/locales/zh-TW/core/workflow-enforcement.md +132 -0
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +27 -1
- package/bundled/locales/zh-TW/docs/CLI-INIT-OPTIONS.md +9 -1
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +37 -9
- package/bundled/locales/zh-TW/docs/USER-MANUAL.md +652 -0
- package/bundled/locales/zh-TW/integrations/github-copilot/copilot-instructions.md +1 -1
- package/bundled/locales/zh-TW/integrations/openspec/AGENTS.md +29 -4
- package/bundled/locales/zh-TW/integrations/spec-kit/AGENTS.md +142 -71
- package/bundled/locales/zh-TW/skills/ac-coverage-assistant/SKILL.md +127 -0
- package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/api-design-assistant/SKILL.md +97 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/audit-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/changelog-guide/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/ci-cd-assistant/SKILL.md +79 -0
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/commands/ac-coverage.md +95 -0
- package/bundled/locales/zh-TW/skills/commands/api-design.md +92 -0
- package/bundled/locales/zh-TW/skills/commands/atdd.md +167 -0
- package/bundled/locales/zh-TW/skills/commands/audit.md +75 -0
- package/bundled/locales/zh-TW/skills/commands/bdd.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/brainstorm.md +91 -0
- package/bundled/locales/zh-TW/skills/commands/changelog.md +67 -0
- package/bundled/locales/zh-TW/skills/commands/check.md +223 -0
- package/bundled/locales/zh-TW/skills/commands/checkin.md +65 -0
- package/bundled/locales/zh-TW/skills/commands/ci-cd.md +75 -0
- package/bundled/locales/zh-TW/skills/commands/commit.md +85 -0
- package/bundled/locales/zh-TW/skills/commands/config.md +211 -0
- package/bundled/locales/zh-TW/skills/commands/coverage.md +78 -0
- package/bundled/locales/zh-TW/skills/commands/database.md +76 -0
- package/bundled/locales/zh-TW/skills/commands/derive-all.md +62 -0
- package/bundled/locales/zh-TW/skills/commands/derive-atdd.md +58 -0
- package/bundled/locales/zh-TW/skills/commands/derive-bdd.md +54 -0
- package/bundled/locales/zh-TW/skills/commands/derive-tdd.md +55 -0
- package/bundled/locales/zh-TW/skills/commands/derive.md +79 -0
- package/bundled/locales/zh-TW/skills/commands/dev-workflow.md +120 -0
- package/bundled/locales/zh-TW/skills/commands/discover.md +87 -0
- package/bundled/locales/zh-TW/skills/commands/docgen.md +68 -0
- package/bundled/locales/zh-TW/skills/commands/docs.md +66 -0
- package/bundled/locales/zh-TW/skills/commands/durable.md +85 -0
- package/bundled/locales/zh-TW/skills/commands/guide.md +51 -0
- package/bundled/locales/zh-TW/skills/commands/incident.md +90 -0
- package/bundled/locales/zh-TW/skills/commands/init.md +273 -0
- package/bundled/locales/zh-TW/skills/commands/methodology.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/metrics.md +71 -0
- package/bundled/locales/zh-TW/skills/commands/migrate.md +90 -0
- package/bundled/locales/zh-TW/skills/commands/pr.md +78 -0
- package/bundled/locales/zh-TW/skills/commands/refactor.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/release.md +63 -0
- package/bundled/locales/zh-TW/skills/commands/requirement.md +61 -0
- package/bundled/locales/zh-TW/skills/commands/reverse-bdd.md +54 -0
- package/bundled/locales/zh-TW/skills/commands/reverse-sdd.md +58 -0
- package/bundled/locales/zh-TW/skills/commands/reverse-tdd.md +58 -0
- package/bundled/locales/zh-TW/skills/commands/reverse.md +70 -0
- package/bundled/locales/zh-TW/skills/commands/review.md +57 -0
- package/bundled/locales/zh-TW/skills/commands/scan.md +74 -0
- package/bundled/locales/zh-TW/skills/commands/sdd-retro.md +47 -0
- package/bundled/locales/zh-TW/skills/commands/sdd.md +362 -0
- package/bundled/locales/zh-TW/skills/commands/security.md +73 -0
- package/bundled/locales/zh-TW/skills/commands/tdd.md +115 -0
- package/bundled/locales/zh-TW/skills/commands/update.md +326 -0
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +2 -6
- package/bundled/locales/zh-TW/skills/database-assistant/SKILL.md +94 -0
- package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +140 -0
- package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/documentation-guide/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/durable-execution-assistant/SKILL.md +81 -0
- package/bundled/locales/zh-TW/skills/error-code-guide/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/git-workflow-guide/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/incident-response-assistant/SKILL.md +104 -0
- package/bundled/locales/zh-TW/skills/logging-guide/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/metrics-dashboard-assistant/SKILL.md +64 -0
- package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +74 -0
- package/bundled/locales/zh-TW/skills/pr-automation-assistant/SKILL.md +87 -0
- package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/refactoring-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/security-assistant/SKILL.md +76 -0
- package/bundled/locales/zh-TW/skills/security-scan-assistant/SKILL.md +69 -0
- package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +74 -14
- package/bundled/locales/zh-TW/skills/spec-driven-dev/guide.md +243 -98
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/test-coverage-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/testing-guide/SKILL.md +1 -5
- package/bundled/skills/README.md +11 -0
- package/bundled/skills/ac-coverage-assistant/SKILL.md +127 -0
- package/bundled/skills/ai-collaboration-standards/SKILL.md +10 -0
- package/bundled/skills/ai-friendly-architecture/SKILL.md +10 -0
- package/bundled/skills/ai-instruction-standards/SKILL.md +10 -0
- package/bundled/skills/api-design-assistant/SKILL.md +119 -0
- package/bundled/skills/atdd-assistant/SKILL.md +7 -0
- package/bundled/skills/bdd-assistant/SKILL.md +7 -0
- package/bundled/skills/brainstorm-assistant/SKILL.md +7 -0
- package/bundled/skills/checkin-assistant/SKILL.md +7 -0
- package/bundled/skills/ci-cd-assistant/SKILL.md +97 -0
- package/bundled/skills/code-review-assistant/SKILL.md +7 -0
- package/bundled/skills/commands/README.md +70 -0
- package/bundled/skills/commands/ac-coverage.md +135 -0
- package/bundled/skills/commands/api-design.md +86 -0
- package/bundled/skills/commands/atdd.md +69 -0
- package/bundled/skills/commands/audit.md +69 -0
- package/bundled/skills/commands/bdd.md +101 -0
- package/bundled/skills/commands/brainstorm.md +45 -0
- package/bundled/skills/commands/changelog.md +34 -0
- package/bundled/skills/commands/check.md +52 -1
- package/bundled/skills/commands/checkin.md +46 -0
- package/bundled/skills/commands/ci-cd.md +69 -0
- package/bundled/skills/commands/commit.md +79 -0
- package/bundled/skills/commands/config.md +48 -0
- package/bundled/skills/commands/coverage.md +53 -0
- package/bundled/skills/commands/database.md +70 -0
- package/bundled/skills/commands/derive-all.md +40 -0
- package/bundled/skills/commands/derive-atdd.md +33 -0
- package/bundled/skills/commands/derive-bdd.md +39 -0
- package/bundled/skills/commands/derive-tdd.md +40 -0
- package/bundled/skills/commands/derive.md +47 -0
- package/bundled/skills/commands/dev-workflow.md +104 -7
- package/bundled/skills/commands/discover.md +39 -0
- package/bundled/skills/commands/docgen.md +35 -0
- package/bundled/skills/commands/docs.md +40 -0
- package/bundled/skills/commands/durable.md +79 -0
- package/bundled/skills/commands/incident.md +84 -0
- package/bundled/skills/commands/init.md +55 -0
- package/bundled/skills/commands/methodology.md +72 -0
- package/bundled/skills/commands/metrics.md +65 -0
- package/bundled/skills/commands/migrate.md +84 -0
- package/bundled/skills/commands/pr.md +72 -0
- package/bundled/skills/commands/refactor.md +51 -0
- package/bundled/skills/commands/release.md +60 -0
- package/bundled/skills/commands/requirement.md +38 -0
- package/bundled/skills/commands/reverse-bdd.md +34 -0
- package/bundled/skills/commands/reverse-sdd.md +42 -0
- package/bundled/skills/commands/reverse-tdd.md +40 -0
- package/bundled/skills/commands/reverse.md +41 -0
- package/bundled/skills/commands/review.md +39 -0
- package/bundled/skills/commands/scan.md +68 -0
- package/bundled/skills/commands/sdd-retro.md +48 -0
- package/bundled/skills/commands/sdd.md +220 -0
- package/bundled/skills/commands/security.md +67 -0
- package/bundled/skills/commands/tdd.md +101 -0
- package/bundled/skills/commands/update.md +61 -0
- package/bundled/skills/commit-standards/SKILL.md +8 -2
- package/bundled/skills/database-assistant/SKILL.md +118 -0
- package/bundled/skills/dev-workflow-guide/SKILL.md +53 -7
- package/bundled/skills/dev-workflow-guide/workflow-phases.md +24 -0
- package/bundled/skills/durable-execution-assistant/SKILL.md +116 -0
- package/bundled/skills/forward-derivation/SKILL.md +7 -0
- package/bundled/skills/incident-response-assistant/SKILL.md +132 -0
- package/bundled/skills/methodology-system/SKILL.md +24 -2
- package/bundled/skills/metrics-dashboard-assistant/SKILL.md +109 -0
- package/bundled/skills/migration-assistant/SKILL.md +119 -0
- package/bundled/skills/pr-automation-assistant/SKILL.md +114 -0
- package/bundled/skills/project-discovery/SKILL.md +7 -0
- package/bundled/skills/refactoring-assistant/SKILL.md +7 -0
- package/bundled/skills/release-standards/SKILL.md +7 -0
- package/bundled/skills/requirement-assistant/SKILL.md +7 -0
- package/bundled/skills/reverse-engineer/SKILL.md +7 -0
- package/bundled/skills/security-assistant/SKILL.md +105 -0
- package/bundled/skills/security-scan-assistant/SKILL.md +96 -0
- package/bundled/skills/spec-driven-dev/SKILL.md +84 -4
- package/bundled/skills/spec-driven-dev/guide.md +156 -22
- package/bundled/skills/tdd-assistant/SKILL.md +7 -0
- package/bundled/skills/test-coverage-assistant/SKILL.md +11 -0
- package/bundled/skills/testing-guide/SKILL.md +23 -0
- package/package.json +1 -1
- package/src/commands/check.js +154 -8
- package/src/commands/config.js +231 -104
- package/src/commands/init.js +23 -3
- package/src/commands/update.js +250 -25
- package/src/config/ai-agent-paths.js +16 -0
- package/src/config/workflow-definitions.js +184 -0
- package/src/core/constants.js +6 -0
- package/src/flows/init-flow.js +23 -6
- package/src/i18n/messages.js +51 -3
- package/src/installers/integration-installer.js +67 -2
- package/src/installers/manifest-installer.js +1 -0
- package/src/installers/standards-installer.js +3 -2
- package/src/prompts/init.js +50 -3
- package/src/reconciler/manifest-migrator.js +2 -2
- package/src/reconciler/plan-executor.js +11 -0
- package/src/utils/integration-generator.js +327 -14
- package/src/utils/workflow-gate.js +292 -0
- package/standards-registry.json +160 -5
|
@@ -47,7 +47,8 @@ const STANDARD_TASK_MAPPING = {
|
|
|
47
47
|
'test-completeness-dimensions.md': { task: 'Test coverage', when: 'When evaluating tests', priority: 'SHOULD' },
|
|
48
48
|
'git-workflow.ai.yaml': { task: 'Git workflow', when: 'Branch/merge decisions', priority: 'SHOULD' },
|
|
49
49
|
'developer-memory.ai.yaml': { task: 'Developer memory', when: 'Always (protocol)', priority: 'SHOULD' },
|
|
50
|
-
'project-context-memory.ai.yaml': { task: 'Project context', when: 'Planning & Coding', priority: 'MUST' }
|
|
50
|
+
'project-context-memory.ai.yaml': { task: 'Project context', when: 'Planning & Coding', priority: 'MUST' },
|
|
51
|
+
'workflow-enforcement.ai.yaml': { task: 'Workflow gates', when: 'Before any workflow phase', priority: 'MUST' }
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
/**
|
|
@@ -68,7 +69,8 @@ const STANDARD_DESCRIPTIONS = {
|
|
|
68
69
|
'git-workflow.ai.yaml': 'Git 工作流程',
|
|
69
70
|
'developer-memory.ai.yaml': '開發者持久記憶',
|
|
70
71
|
'project-context-memory.ai.yaml': '專案情境記憶',
|
|
71
|
-
'zh-tw.md': '繁體中文本地化'
|
|
72
|
+
'zh-tw.md': '繁體中文本地化',
|
|
73
|
+
'workflow-enforcement.ai.yaml': '工作流程強制執行'
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
/**
|
|
@@ -236,7 +238,7 @@ function generateCommitStandardsContent(commitLanguage, detailLevel = 'standard'
|
|
|
236
238
|
|
|
237
239
|
if (commitLanguage === 'traditional-chinese') {
|
|
238
240
|
return `## 提交訊息標準
|
|
239
|
-
參考: .standards/commit-message
|
|
241
|
+
參考: .standards/commit-message.ai.yaml, .standards/options/traditional-chinese.ai.yaml
|
|
240
242
|
|
|
241
243
|
### 格式
|
|
242
244
|
\`\`\`
|
|
@@ -256,7 +258,7 @@ ${typesTable}
|
|
|
256
258
|
- 本文: 說明做了什麼及為什麼,而非如何做`;
|
|
257
259
|
} else if (commitLanguage === 'bilingual') {
|
|
258
260
|
return `## Commit Message Standards | 提交訊息標準
|
|
259
|
-
Reference: .standards/commit-message
|
|
261
|
+
Reference: .standards/commit-message.ai.yaml, .standards/options/bilingual.ai.yaml
|
|
260
262
|
|
|
261
263
|
### Format | 格式
|
|
262
264
|
\`\`\`
|
|
@@ -279,7 +281,7 @@ ${typesTable}
|
|
|
279
281
|
- NEVER mix languages in one paragraph | 禁止同段落混合語言`;
|
|
280
282
|
} else if (commitLanguage === 'bilingual-zhcn') {
|
|
281
283
|
return `## Commit Message Standards | 提交消息标准
|
|
282
|
-
Reference: .standards/commit-message
|
|
284
|
+
Reference: .standards/commit-message.ai.yaml, .standards/options/bilingual.ai.yaml
|
|
283
285
|
|
|
284
286
|
### Format | 格式
|
|
285
287
|
\`\`\`
|
|
@@ -302,7 +304,7 @@ ${typesTable}
|
|
|
302
304
|
- NEVER mix languages in one paragraph | 禁止同段落混合语言`;
|
|
303
305
|
} else {
|
|
304
306
|
return `## Commit Message Standards
|
|
305
|
-
Reference: .standards/commit-message
|
|
307
|
+
Reference: .standards/commit-message.ai.yaml
|
|
306
308
|
|
|
307
309
|
### Format
|
|
308
310
|
\`\`\`
|
|
@@ -328,7 +330,7 @@ ${typesTable}
|
|
|
328
330
|
|
|
329
331
|
if (commitLanguage === 'traditional-chinese') {
|
|
330
332
|
return `## 提交訊息標準
|
|
331
|
-
參考: .standards/commit-message
|
|
333
|
+
參考: .standards/commit-message.ai.yaml, .standards/options/traditional-chinese.ai.yaml
|
|
332
334
|
|
|
333
335
|
### 格式結構
|
|
334
336
|
\`\`\`
|
|
@@ -361,7 +363,7 @@ ${typesTable}
|
|
|
361
363
|
- 共同作者: \`Co-authored-by: Name <email>\``;
|
|
362
364
|
} else if (commitLanguage === 'bilingual') {
|
|
363
365
|
return `## Commit Message Standards | 提交訊息標準
|
|
364
|
-
Reference: .standards/commit-message
|
|
366
|
+
Reference: .standards/commit-message.ai.yaml, .standards/options/bilingual.ai.yaml
|
|
365
367
|
|
|
366
368
|
### Format Structure | 格式結構
|
|
367
369
|
\`\`\`
|
|
@@ -415,7 +417,7 @@ Closes #123
|
|
|
415
417
|
- Co-authors: \`Co-authored-by: Name <email>\``;
|
|
416
418
|
} else if (commitLanguage === 'bilingual-zhcn') {
|
|
417
419
|
return `## Commit Message Standards | 提交消息标准
|
|
418
|
-
Reference: .standards/commit-message
|
|
420
|
+
Reference: .standards/commit-message.ai.yaml, .standards/options/bilingual.ai.yaml
|
|
419
421
|
|
|
420
422
|
### Format Structure | 格式结构
|
|
421
423
|
\`\`\`
|
|
@@ -469,7 +471,7 @@ Closes #123
|
|
|
469
471
|
- Co-authors: \`Co-authored-by: Name <email>\``;
|
|
470
472
|
} else {
|
|
471
473
|
return `## Commit Message Standards
|
|
472
|
-
Reference: .standards/commit-message
|
|
474
|
+
Reference: .standards/commit-message.ai.yaml
|
|
473
475
|
|
|
474
476
|
### Format Structure
|
|
475
477
|
\`\`\`
|
|
@@ -772,7 +774,7 @@ If you realize you made an incorrect statement:
|
|
|
772
774
|
},
|
|
773
775
|
standard: {
|
|
774
776
|
en: `## Commit Message Standards
|
|
775
|
-
Reference: .standards/commit-message
|
|
777
|
+
Reference: .standards/commit-message.ai.yaml
|
|
776
778
|
|
|
777
779
|
### Format
|
|
778
780
|
\`\`\`
|
|
@@ -797,7 +799,7 @@ Reference: .standards/commit-message-guide.md
|
|
|
797
799
|
- Use imperative mood: "add" not "added"
|
|
798
800
|
- Body: explain what and why, not how`,
|
|
799
801
|
'zh-tw': `## 提交訊息標準
|
|
800
|
-
參考: .standards/commit-message
|
|
802
|
+
參考: .standards/commit-message.ai.yaml
|
|
801
803
|
|
|
802
804
|
### 格式
|
|
803
805
|
\`\`\`
|
|
@@ -824,7 +826,7 @@ Reference: .standards/commit-message-guide.md
|
|
|
824
826
|
},
|
|
825
827
|
comprehensive: {
|
|
826
828
|
en: `## Commit Message Standards
|
|
827
|
-
Reference: .standards/commit-message
|
|
829
|
+
Reference: .standards/commit-message.ai.yaml
|
|
828
830
|
|
|
829
831
|
### Format Structure
|
|
830
832
|
\`\`\`
|
|
@@ -864,7 +866,7 @@ Reference: .standards/commit-message-guide.md
|
|
|
864
866
|
- Issue references: \`Fixes #123\`, \`Closes #456\`
|
|
865
867
|
- Co-authors: \`Co-authored-by: Name <email>\``,
|
|
866
868
|
'zh-tw': `## 提交訊息標準
|
|
867
|
-
參考: .standards/commit-message
|
|
869
|
+
參考: .standards/commit-message.ai.yaml
|
|
868
870
|
|
|
869
871
|
### 格式結構
|
|
870
872
|
\`\`\`
|
|
@@ -2486,6 +2488,89 @@ function generateCommitLanguageDirective(commitLanguage, language) {
|
|
|
2486
2488
|
return null;
|
|
2487
2489
|
}
|
|
2488
2490
|
|
|
2491
|
+
/**
|
|
2492
|
+
* Generate workflow enforcement gate content for integration files
|
|
2493
|
+
* @param {string} language - Language: 'en', 'zh-tw', 'zh-cn', or 'bilingual'
|
|
2494
|
+
* @returns {string} Generated workflow gate instructions
|
|
2495
|
+
*/
|
|
2496
|
+
function generateWorkflowGateContent(language) {
|
|
2497
|
+
const sections = [];
|
|
2498
|
+
|
|
2499
|
+
if (language === 'zh-tw' || language === 'bilingual') {
|
|
2500
|
+
sections.push('## Workflow Enforcement Gates / 工作流程強制閘門');
|
|
2501
|
+
sections.push('');
|
|
2502
|
+
sections.push('**CRITICAL**: Before executing any workflow phase command, you MUST check prerequisites.');
|
|
2503
|
+
sections.push('**關鍵規則**:在執行任何工作流程階段命令前,你必須檢查前置條件。');
|
|
2504
|
+
sections.push('');
|
|
2505
|
+
sections.push('### Session Start Protocol / Session 啟動協議');
|
|
2506
|
+
sections.push('At session start, check for active workflows:');
|
|
2507
|
+
sections.push('```bash');
|
|
2508
|
+
sections.push('ls .workflow-state/*.yaml 2>/dev/null');
|
|
2509
|
+
sections.push('```');
|
|
2510
|
+
sections.push('If active workflows found → inform user and offer to resume.');
|
|
2511
|
+
sections.push('');
|
|
2512
|
+
sections.push('### Phase Gates / 階段閘門');
|
|
2513
|
+
sections.push('| Workflow | Phase | Prerequisite | On Failure |');
|
|
2514
|
+
sections.push('|---------|-------|-------------|------------|');
|
|
2515
|
+
sections.push('| SDD | implement | Spec status = Approved | → `/sdd approve` |');
|
|
2516
|
+
sections.push('| SDD | verify | All ACs have code + tests | → `/sdd implement` |');
|
|
2517
|
+
sections.push('| TDD | GREEN | Failing test exists | → Stay in RED |');
|
|
2518
|
+
sections.push('| TDD | REFACTOR | All tests passing | → Stay in GREEN |');
|
|
2519
|
+
sections.push('| BDD | AUTOMATION | `.feature` file exists | → FORMULATION |');
|
|
2520
|
+
sections.push('| Commit | feat/fix | Check active specs | → Suggest `Refs: SPEC-XXX` |');
|
|
2521
|
+
sections.push('');
|
|
2522
|
+
sections.push('Reference: `.standards/workflow-enforcement.ai.yaml`');
|
|
2523
|
+
} else if (language === 'zh-cn') {
|
|
2524
|
+
sections.push('## 工作流程强制闸门');
|
|
2525
|
+
sections.push('');
|
|
2526
|
+
sections.push('**关键规则**:在执行任何工作流程阶段命令前,你必须检查前置条件。');
|
|
2527
|
+
sections.push('');
|
|
2528
|
+
sections.push('### Session 启动协议');
|
|
2529
|
+
sections.push('每次 Session 开始时,检查活跃的工作流:');
|
|
2530
|
+
sections.push('```bash');
|
|
2531
|
+
sections.push('ls .workflow-state/*.yaml 2>/dev/null');
|
|
2532
|
+
sections.push('```');
|
|
2533
|
+
sections.push('如发现活跃工作流 → 通知用户并建议恢复。');
|
|
2534
|
+
sections.push('');
|
|
2535
|
+
sections.push('### 阶段闸门');
|
|
2536
|
+
sections.push('| 工作流 | 阶段 | 前置条件 | 失败时 |');
|
|
2537
|
+
sections.push('|--------|------|---------|--------|');
|
|
2538
|
+
sections.push('| SDD | implement | Spec 状态 = Approved | → `/sdd approve` |');
|
|
2539
|
+
sections.push('| SDD | verify | 所有 AC 有代码和测试 | → `/sdd implement` |');
|
|
2540
|
+
sections.push('| TDD | GREEN | 存在失败的测试 | → 留在 RED |');
|
|
2541
|
+
sections.push('| TDD | REFACTOR | 所有测试通过 | → 留在 GREEN |');
|
|
2542
|
+
sections.push('| BDD | AUTOMATION | `.feature` 文件存在 | → FORMULATION |');
|
|
2543
|
+
sections.push('| Commit | feat/fix | 检查活跃 spec | → 建议 `Refs: SPEC-XXX` |');
|
|
2544
|
+
sections.push('');
|
|
2545
|
+
sections.push('参考: `.standards/workflow-enforcement.ai.yaml`');
|
|
2546
|
+
} else {
|
|
2547
|
+
sections.push('## Workflow Enforcement Gates');
|
|
2548
|
+
sections.push('');
|
|
2549
|
+
sections.push('**CRITICAL**: Before executing any workflow phase command, you MUST check prerequisites.');
|
|
2550
|
+
sections.push('');
|
|
2551
|
+
sections.push('### Session Start Protocol');
|
|
2552
|
+
sections.push('At session start, check for active workflows:');
|
|
2553
|
+
sections.push('```bash');
|
|
2554
|
+
sections.push('ls .workflow-state/*.yaml 2>/dev/null');
|
|
2555
|
+
sections.push('```');
|
|
2556
|
+
sections.push('If active workflows found → inform user and offer to resume.');
|
|
2557
|
+
sections.push('');
|
|
2558
|
+
sections.push('### Phase Gates');
|
|
2559
|
+
sections.push('| Workflow | Phase | Prerequisite | On Failure |');
|
|
2560
|
+
sections.push('|---------|-------|-------------|------------|');
|
|
2561
|
+
sections.push('| SDD | implement | Spec status = Approved | → `/sdd approve` |');
|
|
2562
|
+
sections.push('| SDD | verify | All ACs have code + tests | → `/sdd implement` |');
|
|
2563
|
+
sections.push('| TDD | GREEN | Failing test exists | → Stay in RED |');
|
|
2564
|
+
sections.push('| TDD | REFACTOR | All tests passing | → Stay in GREEN |');
|
|
2565
|
+
sections.push('| BDD | AUTOMATION | `.feature` file exists | → FORMULATION |');
|
|
2566
|
+
sections.push('| Commit | feat/fix | Check active specs | → Suggest `Refs: SPEC-XXX` |');
|
|
2567
|
+
sections.push('');
|
|
2568
|
+
sections.push('Reference: `.standards/workflow-enforcement.ai.yaml`');
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
return sections.join('\n');
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2489
2574
|
/**
|
|
2490
2575
|
* Generate integration file content
|
|
2491
2576
|
* @param {Object} config - Integration configuration
|
|
@@ -2590,6 +2675,13 @@ export function generateIntegrationContent(config) {
|
|
|
2590
2675
|
sections.push('\n---\n');
|
|
2591
2676
|
}
|
|
2592
2677
|
|
|
2678
|
+
// Add workflow enforcement gates if workflow-enforcement standard is installed
|
|
2679
|
+
if (installedStandards.some(s => basename(s) === 'workflow-enforcement.ai.yaml')) {
|
|
2680
|
+
const workflowGateContent = generateWorkflowGateContent(language);
|
|
2681
|
+
sections.push(workflowGateContent);
|
|
2682
|
+
sections.push('\n---\n');
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2593
2685
|
// Add language-specific rules
|
|
2594
2686
|
const langRules = getLanguageRules();
|
|
2595
2687
|
for (const lang of languages) {
|
|
@@ -2968,6 +3060,227 @@ export function getToolFilePath(tool) {
|
|
|
2968
3060
|
|
|
2969
3061
|
|
|
2970
3062
|
|
|
3063
|
+
/**
|
|
3064
|
+
* Detect build/test commands based on project files
|
|
3065
|
+
* @param {string} [projectPath] - Project root path
|
|
3066
|
+
* @returns {string[]} Array of command lines
|
|
3067
|
+
*/
|
|
3068
|
+
function detectBuildCommands(projectPath) {
|
|
3069
|
+
if (!projectPath) {
|
|
3070
|
+
return [
|
|
3071
|
+
'# Check project configuration for build commands',
|
|
3072
|
+
'npm install # Install dependencies (Node.js)',
|
|
3073
|
+
'npm test # Run tests',
|
|
3074
|
+
'npm run lint # Check code style'
|
|
3075
|
+
];
|
|
3076
|
+
}
|
|
3077
|
+
|
|
3078
|
+
const commands = [];
|
|
3079
|
+
|
|
3080
|
+
const hasFile = (name) => existsSync(join(projectPath, name));
|
|
3081
|
+
|
|
3082
|
+
if (hasFile('package.json')) {
|
|
3083
|
+
// Read package.json scripts for accurate commands
|
|
3084
|
+
try {
|
|
3085
|
+
const pkg = JSON.parse(readFileSync(join(projectPath, 'package.json'), 'utf-8'));
|
|
3086
|
+
const scripts = pkg.scripts || {};
|
|
3087
|
+
commands.push('npm install # Install dependencies');
|
|
3088
|
+
if (scripts.build) {
|
|
3089
|
+
commands.push('npm run build # Build project');
|
|
3090
|
+
}
|
|
3091
|
+
if (scripts.test) {
|
|
3092
|
+
commands.push('npm test # Run tests');
|
|
3093
|
+
}
|
|
3094
|
+
if (scripts.lint) {
|
|
3095
|
+
commands.push('npm run lint # Check code style');
|
|
3096
|
+
}
|
|
3097
|
+
// Fallback if no test/lint scripts found
|
|
3098
|
+
if (!scripts.test && !scripts.lint && !scripts.build) {
|
|
3099
|
+
commands.push('# See package.json "scripts" for available commands');
|
|
3100
|
+
}
|
|
3101
|
+
} catch {
|
|
3102
|
+
commands.push('npm install # Install dependencies');
|
|
3103
|
+
commands.push('npm test # Run tests');
|
|
3104
|
+
commands.push('npm run lint # Check code style');
|
|
3105
|
+
}
|
|
3106
|
+
} else if (hasFile('pyproject.toml') || hasFile('setup.py')) {
|
|
3107
|
+
commands.push('pip install -e . # Install in development mode');
|
|
3108
|
+
commands.push('pytest # Run tests');
|
|
3109
|
+
commands.push('ruff check . # Check code style');
|
|
3110
|
+
} else if (hasFile('Cargo.toml')) {
|
|
3111
|
+
commands.push('cargo build # Build project');
|
|
3112
|
+
commands.push('cargo test # Run tests');
|
|
3113
|
+
commands.push('cargo clippy # Check code style');
|
|
3114
|
+
} else if (hasFile('go.mod')) {
|
|
3115
|
+
commands.push('go build ./... # Build project');
|
|
3116
|
+
commands.push('go test ./... # Run tests');
|
|
3117
|
+
commands.push('go vet ./... # Check code');
|
|
3118
|
+
} else if (hasFile('Makefile')) {
|
|
3119
|
+
commands.push('make # Build project');
|
|
3120
|
+
commands.push('make test # Run tests');
|
|
3121
|
+
commands.push('make lint # Check code style');
|
|
3122
|
+
} else {
|
|
3123
|
+
commands.push('# Check project configuration for build commands');
|
|
3124
|
+
}
|
|
3125
|
+
|
|
3126
|
+
return commands;
|
|
3127
|
+
}
|
|
3128
|
+
|
|
3129
|
+
/**
|
|
3130
|
+
* Generate a concise AGENTS.md summary file (≤ 150 lines)
|
|
3131
|
+
* Follows AAIF best practices: commands, testing, structure, style, git, boundaries
|
|
3132
|
+
*
|
|
3133
|
+
* @param {Object} config - Generation configuration
|
|
3134
|
+
* @param {string[]} config.installedStandards - List of installed standard file names
|
|
3135
|
+
* @param {string} [config.language='en'] - Display language
|
|
3136
|
+
* @param {string} [config.commitLanguage='english'] - Commit message language
|
|
3137
|
+
* @param {Object} [config.standardOptions={}] - Standard options (workflow, merge_strategy, etc.)
|
|
3138
|
+
* @param {string} [config.projectPath] - Project root path for detecting build tools
|
|
3139
|
+
* @returns {string} AGENTS.md content (≤ 150 lines)
|
|
3140
|
+
*/
|
|
3141
|
+
export function generateAgentsMdSummary(config = {}) {
|
|
3142
|
+
const {
|
|
3143
|
+
installedStandards = [],
|
|
3144
|
+
language = 'en',
|
|
3145
|
+
commitLanguage = 'english',
|
|
3146
|
+
standardOptions = {},
|
|
3147
|
+
projectPath
|
|
3148
|
+
} = config;
|
|
3149
|
+
|
|
3150
|
+
const lines = [];
|
|
3151
|
+
|
|
3152
|
+
// Header
|
|
3153
|
+
lines.push('# AGENTS.md');
|
|
3154
|
+
lines.push('');
|
|
3155
|
+
lines.push('> Auto-generated by [Universal Dev Standards (UDS)](https://github.com/AsiaOstrich/universal-dev-standards).');
|
|
3156
|
+
lines.push('> Full standards available in the `.standards/` directory.');
|
|
3157
|
+
lines.push('');
|
|
3158
|
+
|
|
3159
|
+
// Build & Test Commands (auto-detect project type)
|
|
3160
|
+
lines.push('## Build & Test');
|
|
3161
|
+
lines.push('');
|
|
3162
|
+
lines.push('```bash');
|
|
3163
|
+
const buildCommands = detectBuildCommands(projectPath);
|
|
3164
|
+
for (const cmd of buildCommands) {
|
|
3165
|
+
lines.push(cmd);
|
|
3166
|
+
}
|
|
3167
|
+
lines.push('```');
|
|
3168
|
+
lines.push('');
|
|
3169
|
+
|
|
3170
|
+
// Code Style
|
|
3171
|
+
lines.push('## Code Style');
|
|
3172
|
+
lines.push('');
|
|
3173
|
+
lines.push('Follow the project\'s linter and formatter configuration.');
|
|
3174
|
+
lines.push('See `.standards/` for detailed coding standards.');
|
|
3175
|
+
lines.push('');
|
|
3176
|
+
|
|
3177
|
+
// Git Workflow
|
|
3178
|
+
lines.push('## Git Workflow');
|
|
3179
|
+
lines.push('');
|
|
3180
|
+
const workflow = standardOptions.workflow || 'github-flow';
|
|
3181
|
+
const mergeStrategy = standardOptions.merge_strategy || 'squash';
|
|
3182
|
+
lines.push(`- **Workflow**: ${workflow}`);
|
|
3183
|
+
lines.push(`- **Merge Strategy**: ${mergeStrategy}`);
|
|
3184
|
+
|
|
3185
|
+
// Commit language
|
|
3186
|
+
if (commitLanguage === 'english') {
|
|
3187
|
+
lines.push('- **Commit Language**: English');
|
|
3188
|
+
lines.push('- **Format**: `<type>(<scope>): <subject>`');
|
|
3189
|
+
} else if (commitLanguage === 'traditional-chinese') {
|
|
3190
|
+
lines.push('- **Commit Language**: Traditional Chinese (繁體中文)');
|
|
3191
|
+
lines.push('- **Format**: `<type>(<scope>): <主旨>`');
|
|
3192
|
+
} else if (commitLanguage === 'bilingual') {
|
|
3193
|
+
lines.push('- **Commit Language**: Bilingual (English + Chinese)');
|
|
3194
|
+
lines.push('- **Format**: `<type>(<scope>): <subject>. <主旨>`');
|
|
3195
|
+
}
|
|
3196
|
+
lines.push('');
|
|
3197
|
+
|
|
3198
|
+
// Testing
|
|
3199
|
+
lines.push('## Testing');
|
|
3200
|
+
lines.push('');
|
|
3201
|
+
lines.push('- Write tests for all new features');
|
|
3202
|
+
lines.push('- Run tests before committing');
|
|
3203
|
+
lines.push('- Follow the testing pyramid: Unit (70%) > Integration (20%) > E2E (10%)');
|
|
3204
|
+
lines.push('');
|
|
3205
|
+
|
|
3206
|
+
// Installed Standards Index
|
|
3207
|
+
lines.push('<!-- UDS:STANDARDS:START -->');
|
|
3208
|
+
lines.push('## Installed Standards');
|
|
3209
|
+
lines.push('');
|
|
3210
|
+
|
|
3211
|
+
if (installedStandards.length > 0) {
|
|
3212
|
+
lines.push('All standards are in `.standards/`. Key standards:');
|
|
3213
|
+
lines.push('');
|
|
3214
|
+
|
|
3215
|
+
// Group and show key standards (limited to keep within 150 lines)
|
|
3216
|
+
const keyStandards = installedStandards
|
|
3217
|
+
.filter(s => {
|
|
3218
|
+
const name = basename(s);
|
|
3219
|
+
return name.endsWith('.ai.yaml');
|
|
3220
|
+
})
|
|
3221
|
+
.slice(0, 30); // Limit to avoid exceeding 150 lines
|
|
3222
|
+
|
|
3223
|
+
for (const std of keyStandards) {
|
|
3224
|
+
const name = basename(std).replace('.ai.yaml', '');
|
|
3225
|
+
lines.push(`- \`.standards/${basename(std)}\` — ${name}`);
|
|
3226
|
+
}
|
|
3227
|
+
} else {
|
|
3228
|
+
lines.push('No standards installed yet. Run `npx uds init` to install.');
|
|
3229
|
+
}
|
|
3230
|
+
|
|
3231
|
+
lines.push('');
|
|
3232
|
+
lines.push('<!-- UDS:STANDARDS:END -->');
|
|
3233
|
+
lines.push('');
|
|
3234
|
+
|
|
3235
|
+
// Boundaries
|
|
3236
|
+
lines.push('## Important Notes');
|
|
3237
|
+
lines.push('');
|
|
3238
|
+
lines.push('- Read `.standards/` files for complete rules before making changes');
|
|
3239
|
+
lines.push('- Do not fabricate APIs, configs, or requirements without verification');
|
|
3240
|
+
lines.push('- Follow the anti-hallucination standard: evidence-based responses only');
|
|
3241
|
+
lines.push('');
|
|
3242
|
+
|
|
3243
|
+
return lines.join('\n');
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3246
|
+
/**
|
|
3247
|
+
* Write universal AGENTS.md summary file
|
|
3248
|
+
* Handles marker-based updates if file already exists
|
|
3249
|
+
*
|
|
3250
|
+
* @param {Object} config - Generation configuration
|
|
3251
|
+
* @param {string} projectPath - Project root path
|
|
3252
|
+
* @returns {Object} Result with success status
|
|
3253
|
+
*/
|
|
3254
|
+
export function writeAgentsMdSummary(config, projectPath) {
|
|
3255
|
+
const filePath = join(projectPath, 'AGENTS.md');
|
|
3256
|
+
|
|
3257
|
+
try {
|
|
3258
|
+
let content = generateAgentsMdSummary({ ...config, projectPath });
|
|
3259
|
+
|
|
3260
|
+
// Handle merge if file exists (preserve user content outside markers)
|
|
3261
|
+
if (existsSync(filePath)) {
|
|
3262
|
+
const existingContent = readFileSync(filePath, 'utf-8');
|
|
3263
|
+
const newParts = extractMarkedContent(content, 'markdown');
|
|
3264
|
+
if (newParts.content) {
|
|
3265
|
+
content = updateMarkedSection(existingContent, newParts.content, 'markdown');
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
writeFileSync(filePath, content);
|
|
3270
|
+
|
|
3271
|
+
const blockHashInfo = computeIntegrationBlockHash(filePath);
|
|
3272
|
+
|
|
3273
|
+
return {
|
|
3274
|
+
success: true,
|
|
3275
|
+
path: 'AGENTS.md',
|
|
3276
|
+
absolutePath: filePath,
|
|
3277
|
+
blockHashInfo
|
|
3278
|
+
};
|
|
3279
|
+
} catch (error) {
|
|
3280
|
+
return { success: false, error: error.message };
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
|
|
2971
3284
|
/**
|
|
2972
3285
|
* Get all supported tools
|
|
2973
3286
|
* @returns {string[]} Array of tool names
|