universal-dev-standards 6.8.0 → 6.9.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 +12 -2
- package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +14 -2
- package/bundled/ai/standards/adr-standards.ai.yaml +14 -2
- package/bundled/ai/standards/code-review.ai.yaml +13 -3
- package/bundled/ai/standards/commit-message.ai.yaml +8 -4
- package/bundled/ai/standards/deferred-item-exit.ai.yaml +225 -0
- package/bundled/ai/standards/feature-discovery-standards.ai.yaml +14 -2
- package/bundled/ai/standards/governance-layer.ai.yaml +128 -2
- package/bundled/ai/standards/logging.ai.yaml +2 -2
- package/bundled/ai/standards/retrospective-standards.ai.yaml +14 -2
- package/bundled/ai/standards/reverse-engineering-standards.ai.yaml +73 -2
- package/bundled/ai/standards/security-standards.ai.yaml +2 -2
- package/bundled/ai/standards/spec-driven-development.ai.yaml +14 -2
- package/bundled/ai/standards/tech-debt-standards.ai.yaml +87 -3
- package/bundled/ai/standards/turn-completion-integrity.ai.yaml +131 -0
- package/bundled/core/acceptance-criteria-traceability.md +5 -2
- package/bundled/core/adr-standards.md +26 -2
- package/bundled/core/code-review-checklist.md +5 -2
- package/bundled/core/context-aware-loading.md +1 -1
- package/bundled/core/deferred-item-exit.md +254 -0
- package/bundled/core/feature-discovery-standards.md +5 -1
- package/bundled/core/governance-layer.md +114 -2
- package/bundled/core/retrospective-standards.md +4 -2
- package/bundled/core/reverse-engineering-standards.md +81 -2
- package/bundled/core/spec-driven-development.md +8 -2
- package/bundled/core/tech-debt-standards.md +67 -8
- package/bundled/core/turn-completion-integrity.md +196 -0
- package/bundled/hooks/check-dangerous-cmd.mjs +60 -0
- package/bundled/hooks/check-logging-standard.mjs +59 -0
- package/bundled/hooks/check-turn-completion.mjs +233 -0
- package/bundled/hooks/inject-standards.mjs +183 -0
- package/bundled/hooks/telemetry-wrapper.mjs +77 -0
- package/bundled/hooks/turn-completion/detect.mjs +99 -0
- package/bundled/hooks/turn-completion/locales/en.mjs +159 -0
- package/bundled/hooks/turn-completion/locales/zh-TW.mjs +166 -0
- package/bundled/hooks/validate-commit-msg.mjs +104 -0
- package/bundled/locales/zh-CN/CHANGELOG.md +47 -3
- package/bundled/locales/zh-CN/CLAUDE.md +1 -1
- package/bundled/locales/zh-CN/README.md +2 -2
- package/bundled/locales/zh-CN/SECURITY.md +1 -1
- package/bundled/locales/zh-CN/core/adr-standards.md +1 -1
- package/bundled/locales/zh-CN/core/governance-layer.md +118 -6
- package/bundled/locales/zh-CN/core/retrospective-standards.md +1 -1
- package/bundled/locales/zh-CN/core/tech-debt-standards.md +71 -4
- package/bundled/locales/zh-CN/core/turn-completion-integrity.md +190 -0
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +8 -1
- package/bundled/locales/zh-CN/docs/CLI-INIT-OPTIONS.md +29 -68
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +25 -15
- package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +1 -2
- package/bundled/locales/zh-CN/integrations/google-antigravity/{INSTRUCTIONS.md → AGENTS.md} +1 -1
- package/bundled/locales/zh-CN/integrations/google-antigravity/README.md +3 -3
- package/bundled/locales/zh-CN/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +22 -12
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +12 -9
- package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/commands/brainstorm.md +17 -13
- package/bundled/locales/zh-CN/skills/commands/config.md +0 -1
- package/bundled/locales/zh-CN/skills/commands/init.md +1 -2
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/observability-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/release-standards/SKILL.md +3 -0
- package/bundled/locales/zh-CN/skills/requirement-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +3 -0
- package/bundled/locales/zh-CN/skills/runbook-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/slo-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/CHANGELOG.md +47 -3
- package/bundled/locales/zh-TW/CLAUDE.md +1 -1
- package/bundled/locales/zh-TW/README.md +2 -2
- package/bundled/locales/zh-TW/SECURITY.md +1 -1
- package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +2 -0
- package/bundled/locales/zh-TW/core/adr-standards.md +26 -5
- package/bundled/locales/zh-TW/core/code-review-checklist.md +2 -0
- package/bundled/locales/zh-TW/core/container-image-standards.md +2 -2
- package/bundled/locales/zh-TW/core/contract-testing-standards.md +2 -2
- package/bundled/locales/zh-TW/core/cross-flow-regression.md +8 -7
- package/bundled/locales/zh-TW/core/data-contract.md +2 -2
- package/bundled/locales/zh-TW/core/data-migration-testing.md +2 -2
- package/bundled/locales/zh-TW/core/data-pipeline.md +2 -2
- package/bundled/locales/zh-TW/core/deferred-item-exit.md +251 -0
- package/bundled/locales/zh-TW/core/documentation-writing-standards.md +228 -3
- package/bundled/locales/zh-TW/core/full-coverage-testing.md +15 -2
- package/bundled/locales/zh-TW/core/governance-layer.md +118 -5
- package/bundled/locales/zh-TW/core/iac-design-principles.md +2 -2
- package/bundled/locales/zh-TW/core/incident-response.md +2 -2
- package/bundled/locales/zh-TW/core/model-provenance.md +4 -2
- package/bundled/locales/zh-TW/core/pii-classification.md +42 -6
- package/bundled/locales/zh-TW/core/prd-standards.md +4 -2
- package/bundled/locales/zh-TW/core/product-metrics-standards.md +4 -2
- package/bundled/locales/zh-TW/core/release-readiness-gate.md +2 -2
- package/bundled/locales/zh-TW/core/resource-cost-boundary.md +2 -2
- package/bundled/locales/zh-TW/core/retrospective-standards.md +5 -3
- package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +83 -5
- package/bundled/locales/zh-TW/core/runbook.md +2 -2
- package/bundled/locales/zh-TW/core/schema-evolution.md +2 -2
- package/bundled/locales/zh-TW/core/secret-management-standards.md +2 -2
- package/bundled/locales/zh-TW/core/slo-sli.md +2 -2
- package/bundled/locales/zh-TW/core/spec-driven-development.md +2 -0
- package/bundled/locales/zh-TW/core/tech-debt-standards.md +71 -4
- package/bundled/locales/zh-TW/core/turn-completion-integrity.md +190 -0
- package/bundled/locales/zh-TW/core/user-journey-testing.md +2 -2
- package/bundled/locales/zh-TW/core/user-story-mapping.md +2 -2
- package/bundled/locales/zh-TW/core/verification-oracle.md +2 -2
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +8 -1
- package/bundled/locales/zh-TW/docs/CLI-INIT-OPTIONS.md +29 -68
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +25 -15
- package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +1 -2
- package/bundled/locales/zh-TW/integrations/google-antigravity/{INSTRUCTIONS.md → AGENTS.md} +1 -1
- package/bundled/locales/zh-TW/integrations/google-antigravity/README.md +3 -3
- package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +22 -12
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +12 -9
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/commands/brainstorm.md +17 -13
- package/bundled/locales/zh-TW/skills/commands/config.md +0 -1
- package/bundled/locales/zh-TW/skills/commands/init.md +1 -2
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +2 -1
- package/bundled/locales/zh-TW/skills/dev-methodology/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/knowledge-graph/guide.md +2 -2
- package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/observability-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +3 -0
- package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +3 -0
- package/bundled/locales/zh-TW/skills/runbook-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/slo-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +2 -0
- package/bundled/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/skills/brainstorm-assistant/SKILL.md +31 -13
- package/bundled/skills/brainstorm-assistant/guide.md +9 -6
- package/bundled/skills/code-review-assistant/SKILL.md +1 -0
- package/bundled/skills/commands/brainstorm.md +12 -9
- package/bundled/skills/commands/config.md +0 -1
- package/bundled/skills/commands/init.md +2 -3
- package/bundled/skills/commit-standards/SKILL.md +2 -0
- package/bundled/skills/contract-test-assistant/SKILL.md +1 -0
- package/bundled/skills/dev-methodology/SKILL.md +4 -0
- package/bundled/skills/observability-assistant/SKILL.md +1 -0
- package/bundled/skills/project-discovery/SKILL.md +1 -0
- package/bundled/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/skills/release-standards/SKILL.md +3 -0
- package/bundled/skills/requirement-assistant/SKILL.md +2 -0
- package/bundled/skills/reverse-engineer/SKILL.md +3 -0
- package/bundled/skills/runbook-assistant/SKILL.md +1 -0
- package/bundled/skills/slo-assistant/SKILL.md +1 -0
- package/bundled/skills/tdd-assistant/SKILL.md +2 -0
- package/bundled/templates/.ai-context.yaml.template +194 -0
- package/bundled/templates/CLAUDE.md.template +145 -0
- package/bundled/templates/DESIGN.md +237 -0
- package/bundled/templates/SKILL-BRIEF-TEMPLATE.md +57 -0
- package/bundled/templates/SKILL-CANDIDATES.md +39 -0
- package/bundled/templates/gates/check-error-exit.mjs +309 -0
- package/bundled/templates/mcp-config.json +10 -0
- package/bundled/templates/methodology-template.yaml +209 -0
- package/bundled/templates/migration-template.md +408 -0
- package/bundled/templates/requirement-checklist.md +410 -0
- package/bundled/templates/requirement-document-template.md +591 -0
- package/bundled/templates/requirement-template.md +881 -0
- package/bundled/templates/reverse-spec-template.md +409 -0
- package/bundled/templates/test-case-template.md +74 -0
- package/bundled/templates/test-plan-template.md +74 -0
- package/package.json +7 -5
- package/src/commands/audit.js +82 -0
- package/src/commands/check.js +66 -10
- package/src/commands/init.js +161 -16
- package/src/commands/update.js +286 -14
- package/src/compilers/claude-code-compiler.js +4 -1
- package/src/config/ai-agent-paths.js +62 -17
- package/src/core/constants.js +42 -11
- package/src/core/manifest.js +201 -3
- package/src/core/paths.js +2 -2
- package/src/i18n/messages.js +6 -29
- package/src/installers/hooks-installer.js +167 -75
- package/src/installers/integration-installer.js +9 -5
- package/src/prompts/init.js +14 -14
- package/src/utils/detector.js +21 -1
- package/src/utils/effect-boundary.js +1093 -0
- package/src/utils/hasher.js +166 -1
- package/src/utils/hook-stats.js +1 -1
- package/src/utils/integration-generator.js +79 -1
- package/src/utils/reference-sync.js +4 -1
- package/src/utils/yaml-generator.js +51 -9
- package/standards-registry.json +31 -8
|
@@ -41,7 +41,7 @@ Use AskUserQuestion with multiSelect to ask which AI tools to configure:
|
|
|
41
41
|
| **OpenCode** | `AGENTS.md` | ✅ | ✅ |
|
|
42
42
|
| **Gemini CLI** | `GEMINI.md` | ✅ | ✅ |
|
|
43
43
|
| **Codex** | `AGENTS.md` | ✅ | ❌ |
|
|
44
|
-
| **Antigravity** |
|
|
44
|
+
| **Antigravity** | `.agents/AGENTS.md` | ✅ | ❌ |
|
|
45
45
|
|
|
46
46
|
Pre-select tools detected in the environment. Note: Codex and OpenCode share `AGENTS.md`.
|
|
47
47
|
|
|
@@ -226,7 +226,6 @@ Use AskUserQuestion for integration file content:
|
|
|
226
226
|
| Option | Description |
|
|
227
227
|
|--------|-------------|
|
|
228
228
|
| **Standard (Recommended)** | Summary + task mapping, AI knows when to read which standard |
|
|
229
|
-
| **Full Embed** | Embed all rules, AI can use immediately but larger file |
|
|
230
229
|
| **Minimal** | File references only, best with Skills |
|
|
231
230
|
|
|
232
231
|
### Step 13: Confirm and Execute | 步驟 13:確認並執行
|
|
@@ -312,7 +311,7 @@ See `uds init --help` for all options.
|
|
|
312
311
|
9. **語言擴展** — 偵測到語言時詢問
|
|
313
312
|
10. **框架擴展** — 偵測到框架時詢問
|
|
314
313
|
11. **地區設定** — English / Traditional Chinese
|
|
315
|
-
12. **內容模式** — Standard /
|
|
314
|
+
12. **內容模式** — Standard / Minimal
|
|
316
315
|
13. **確認並執行** — 展示摘要,確認後一次執行所有安裝
|
|
317
316
|
|
|
318
317
|
**IMPORTANT**: AskUserQuestion 最多 4 個選項。3+ 工具時必須使用 Smart Grouping 兩階段策略。
|
|
@@ -147,6 +147,8 @@ After `/commit` completes, the AI assistant should suggest:
|
|
|
147
147
|
|
|
148
148
|
## Reference | 參考
|
|
149
149
|
|
|
150
|
+
- [Conventional Commits Guide](./conventional-commits.md) — Read it when you need the exact type, scope and format rules.
|
|
151
|
+
- [Output Language Options](./language-options.md) — Read it when deciding which language a commit message is written in.
|
|
150
152
|
- Detailed guide: [guide.md](./guide.md)
|
|
151
153
|
- Core standard: [commit-message-guide.md](../../core/commit-message-guide.md)
|
|
152
154
|
|
|
@@ -111,6 +111,7 @@ After `/contract-test` completes:
|
|
|
111
111
|
|
|
112
112
|
## Reference | 參考
|
|
113
113
|
|
|
114
|
+
- Detailed guide: [guide.md](./guide.md) — contract testing strategy and setup. Read it when configuring Pact/OpenAPI or wiring contract tests into CI.
|
|
114
115
|
- Detailed guide: [contract-testing.md](../../options/testing/contract-testing.md)
|
|
115
116
|
- Related: [api-design-assistant](../api-design-assistant/SKILL.md)
|
|
116
117
|
|
|
@@ -101,6 +101,10 @@ After `/methodology` completes, the AI assistant should suggest based on the sel
|
|
|
101
101
|
|
|
102
102
|
## Reference | 參考
|
|
103
103
|
|
|
104
|
+
- [Create Custom Methodology Guide](./create-methodology.md) — Read it when building a custom methodology rather than using a shipped one.
|
|
105
|
+
- [Integrated Development Flow Guide](./integrated-flow.md) — Read it when combining several methodologies into one flow.
|
|
106
|
+
- [Workflow Prerequisite Checking / 工作流前置步驟檢查](./prerequisite-check.md) — Read it when a workflow step needs its prerequisites checked first.
|
|
107
|
+
- [Methodology Runtime Guide](./runtime.md) — Read it when you need to know how a methodology behaves while it runs.
|
|
104
108
|
- Detailed guide: [guide.md](./guide.md)
|
|
105
109
|
|
|
106
110
|
|
|
@@ -121,6 +121,7 @@ Before deploying a service to production:
|
|
|
121
121
|
|
|
122
122
|
## Reference | 參考
|
|
123
123
|
|
|
124
|
+
- Detailed guide: [guide.md](./guide.md) — the three pillars (logs, metrics, traces) in depth. Read it when setting up monitoring, choosing metric types, implementing tracing, or assessing maturity.
|
|
124
125
|
- Core standard: [observability-standards.md](../../core/observability-standards.md)
|
|
125
126
|
- Core standard: [alerting-standards.md](../../core/alerting-standards.md)
|
|
126
127
|
- Core standard: [slo-standards.md](../../core/slo-standards.md)
|
|
@@ -147,6 +147,7 @@ After `/discover` completes, the AI assistant should suggest based on the assess
|
|
|
147
147
|
|
|
148
148
|
## Reference | 參考
|
|
149
149
|
|
|
150
|
+
- Step-by-step workflow: [workflow.md](./workflow.md) — the discovery steps in order (code health, architecture, documentation inventory, review snapshot, dependency and security). Read it when actually running a discovery rather than deciding whether to.
|
|
150
151
|
- Detailed guide: [guide.md](./guide.md)
|
|
151
152
|
|
|
152
153
|
|
|
@@ -168,6 +168,7 @@ After `/project-structure` completes, the AI assistant should suggest:
|
|
|
168
168
|
|
|
169
169
|
## Related Standards
|
|
170
170
|
|
|
171
|
+
- [Language-specific patterns](./language-patterns.md) — concrete directory layouts per language (Node.js/TypeScript, Python, Go, and others). Read it when laying out a project in a specific language.
|
|
171
172
|
- [Core: Project Structure](../../core/project-structure.md)
|
|
172
173
|
- [Core: Documentation Structure](../../core/documentation-structure.md)
|
|
173
174
|
- [Guide: File Placement Decision Guide](../../core/guides/file-placement-guide.md)
|
|
@@ -132,6 +132,9 @@ After `/release` completes, the AI assistant should suggest:
|
|
|
132
132
|
|
|
133
133
|
## Reference | 參考
|
|
134
134
|
|
|
135
|
+
- [Changelog Format Guide](./changelog-format.md) — Read it when writing or reviewing a changelog entry.
|
|
136
|
+
- [Release Workflow Guide](./release-workflow.md) — Read it when actually cutting a release, step by step.
|
|
137
|
+
- [Semantic Versioning Guide](./semantic-versioning.md) — Read it when deciding whether a change is major, minor or patch.
|
|
135
138
|
- Detailed guide: [guide.md](./guide.md)
|
|
136
139
|
- Core standard: [versioning.md](../../core/versioning.md)
|
|
137
140
|
|
|
@@ -75,6 +75,8 @@ After `/requirement` completes, the AI assistant should suggest:
|
|
|
75
75
|
|
|
76
76
|
## Reference | 參考
|
|
77
77
|
|
|
78
|
+
- [Requirement Completeness Checklist](./requirement-checklist.md) — Read it when checking a requirement is complete before it is accepted.
|
|
79
|
+
- [Requirement Writing Guide](./requirement-writing.md) — Read it when writing a requirement from scratch.
|
|
78
80
|
- Detailed guide: [guide.md](./guide.md)
|
|
79
81
|
- Core standard: [requirement-engineering.md](../../core/requirement-engineering.md)
|
|
80
82
|
|
|
@@ -147,6 +147,9 @@ After `/reverse` (full or `spec`) completes, the AI assistant should suggest:
|
|
|
147
147
|
|
|
148
148
|
## Reference | 參考
|
|
149
149
|
|
|
150
|
+
- [BDD Extraction Workflow Guide](./bdd-extraction.md) — Read it when extracting BDD scenarios out of an existing spec.
|
|
151
|
+
- [TDD Analysis Workflow Guide](./tdd-analysis.md) — Read it when analysing test coverage against scenarios and finding the gaps.
|
|
152
|
+
- Step-by-step workflow: [workflow.md](./workflow.md) — the reverse-engineering phases in order (code scanning, data models, configuration, test analysis, coverage). Read it when actually running the process rather than deciding whether to.
|
|
150
153
|
- Detailed guide: [guide.md](./guide.md)
|
|
151
154
|
- Core standard: [reverse-engineering-standards.md](../../core/reverse-engineering-standards.md)
|
|
152
155
|
|
|
@@ -52,6 +52,7 @@ Any deploy runbook that includes a destructive-update pattern (stop → swap →
|
|
|
52
52
|
|
|
53
53
|
## Reference | 參考
|
|
54
54
|
|
|
55
|
+
- Detailed guide: [guide.md](./guide.md) — runbook creation, organization and validation. Read it when writing runbooks, reviewing operational procedures, planning drills, or assessing coverage.
|
|
55
56
|
- Core standard: [runbook-standards.md](../../core/runbook-standards.md)
|
|
56
57
|
- Related: [alerting-standards.md](../../core/alerting-standards.md)
|
|
57
58
|
- Related: [postmortem-standards.md](../../core/postmortem-standards.md)
|
|
@@ -46,6 +46,7 @@ Guide SLI selection, SLO setting methodology, and Error Budget management.
|
|
|
46
46
|
|
|
47
47
|
## Reference | 參考
|
|
48
48
|
|
|
49
|
+
- Detailed guide: [guide.md](./guide.md) — SLI/SLO/error-budget definition and management. Read it when defining SLOs, selecting SLIs, calculating error budgets, or setting reliability targets.
|
|
49
50
|
- Core standard: [slo-standards.md](../../core/slo-standards.md)
|
|
50
51
|
- Related: [observability-standards.md](../../core/observability-standards.md)
|
|
51
52
|
- Related: [alerting-standards.md](../../core/alerting-standards.md)
|
|
@@ -87,6 +87,8 @@ After `/tdd` completes, the AI assistant should suggest:
|
|
|
87
87
|
|
|
88
88
|
## Reference | 參考
|
|
89
89
|
|
|
90
|
+
- [TDD Language Examples](./language-examples.md) — Read it when you need a concrete example in a specific language.
|
|
91
|
+
- [TDD Workflow Guide](./tdd-workflow.md) — Read it when running the red-green-refactor cycle end to end.
|
|
90
92
|
- Detailed guide: [guide.md](./guide.md)
|
|
91
93
|
- Core standard: [test-driven-development.md](../../core/test-driven-development.md)
|
|
92
94
|
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .ai-context.yaml - AI Context Configuration Template
|
|
3
|
+
# ============================================================
|
|
4
|
+
#
|
|
5
|
+
# This file helps AI assistants understand your project structure
|
|
6
|
+
# and optimize their analysis and code generation.
|
|
7
|
+
#
|
|
8
|
+
# Usage:
|
|
9
|
+
# 1. Copy this file to your project root as `.ai-context.yaml`
|
|
10
|
+
# 2. Customize the values for your project
|
|
11
|
+
# 3. AI tools will use this for better context management
|
|
12
|
+
#
|
|
13
|
+
# Reference: core/ai-friendly-architecture.md
|
|
14
|
+
# ============================================================
|
|
15
|
+
|
|
16
|
+
version: 1.0.0
|
|
17
|
+
|
|
18
|
+
# ============================================================
|
|
19
|
+
# PROJECT INFORMATION
|
|
20
|
+
# ============================================================
|
|
21
|
+
project:
|
|
22
|
+
# Project name (should match package.json or pyproject.toml)
|
|
23
|
+
name: my-project
|
|
24
|
+
|
|
25
|
+
# Project type affects analysis strategy
|
|
26
|
+
# Options: web-app | library | cli | api | monorepo | mobile
|
|
27
|
+
type: web-app
|
|
28
|
+
|
|
29
|
+
# Primary programming language
|
|
30
|
+
# Options: typescript | javascript | python | go | rust | java | other
|
|
31
|
+
primary-language: typescript
|
|
32
|
+
|
|
33
|
+
# Brief description for AI context
|
|
34
|
+
description: |
|
|
35
|
+
A brief description of what this project does.
|
|
36
|
+
Include key features and architectural decisions.
|
|
37
|
+
|
|
38
|
+
# ============================================================
|
|
39
|
+
# MODULE DEFINITIONS
|
|
40
|
+
# ============================================================
|
|
41
|
+
# Define logical modules in your codebase for structured analysis.
|
|
42
|
+
# AI will use these boundaries to chunk large codebases efficiently.
|
|
43
|
+
|
|
44
|
+
modules:
|
|
45
|
+
# Example: Authentication module
|
|
46
|
+
- name: auth
|
|
47
|
+
path: src/auth/
|
|
48
|
+
entry: index.ts
|
|
49
|
+
description: User authentication and session management
|
|
50
|
+
dependencies:
|
|
51
|
+
- database
|
|
52
|
+
- crypto
|
|
53
|
+
# Priority affects analysis order (high | medium | low)
|
|
54
|
+
priority: high
|
|
55
|
+
|
|
56
|
+
# Example: API module
|
|
57
|
+
- name: api
|
|
58
|
+
path: src/api/
|
|
59
|
+
entry: routes.ts
|
|
60
|
+
description: REST API endpoints and handlers
|
|
61
|
+
dependencies:
|
|
62
|
+
- auth
|
|
63
|
+
- database
|
|
64
|
+
priority: high
|
|
65
|
+
|
|
66
|
+
# Example: Database module
|
|
67
|
+
- name: database
|
|
68
|
+
path: src/db/
|
|
69
|
+
entry: index.ts
|
|
70
|
+
description: Database connection and models
|
|
71
|
+
dependencies: []
|
|
72
|
+
priority: high
|
|
73
|
+
|
|
74
|
+
# Example: Utilities module
|
|
75
|
+
- name: utils
|
|
76
|
+
path: src/utils/
|
|
77
|
+
entry: index.ts
|
|
78
|
+
description: Shared utility functions
|
|
79
|
+
dependencies: []
|
|
80
|
+
priority: low
|
|
81
|
+
|
|
82
|
+
# ============================================================
|
|
83
|
+
# ANALYSIS HINTS
|
|
84
|
+
# ============================================================
|
|
85
|
+
# Guide AI tools on how to analyze this project
|
|
86
|
+
|
|
87
|
+
analysis-hints:
|
|
88
|
+
# Main entry points - AI starts analysis here
|
|
89
|
+
entry-points:
|
|
90
|
+
- src/main.ts
|
|
91
|
+
- src/index.ts
|
|
92
|
+
|
|
93
|
+
# Patterns to ignore during analysis
|
|
94
|
+
ignore-patterns:
|
|
95
|
+
- node_modules
|
|
96
|
+
- dist
|
|
97
|
+
- build
|
|
98
|
+
- coverage
|
|
99
|
+
- "*.test.ts"
|
|
100
|
+
- "*.spec.ts"
|
|
101
|
+
- __pycache__
|
|
102
|
+
- .venv
|
|
103
|
+
|
|
104
|
+
# Architecture type affects analysis approach
|
|
105
|
+
# Options: layered | microservices | modular | monolith | event-driven
|
|
106
|
+
architecture-type: layered
|
|
107
|
+
|
|
108
|
+
# Key configuration files to understand project setup
|
|
109
|
+
config-files:
|
|
110
|
+
- package.json
|
|
111
|
+
- tsconfig.json
|
|
112
|
+
- .env.example
|
|
113
|
+
|
|
114
|
+
# ============================================================
|
|
115
|
+
# DOCUMENTATION REFERENCES
|
|
116
|
+
# ============================================================
|
|
117
|
+
# Point AI to different documentation layers
|
|
118
|
+
|
|
119
|
+
documentation:
|
|
120
|
+
# Level 1: Quick reference (< 500 tokens)
|
|
121
|
+
quick-ref: docs/QUICK-REF.md
|
|
122
|
+
|
|
123
|
+
# Level 2: Detailed architecture (< 5000 tokens)
|
|
124
|
+
detailed: docs/ARCHITECTURE.md
|
|
125
|
+
|
|
126
|
+
# Level 3: Full examples
|
|
127
|
+
examples: docs/examples/
|
|
128
|
+
|
|
129
|
+
# API documentation
|
|
130
|
+
api-docs: docs/api/
|
|
131
|
+
|
|
132
|
+
# Changelog for understanding recent changes
|
|
133
|
+
changelog: CHANGELOG.md
|
|
134
|
+
|
|
135
|
+
# ============================================================
|
|
136
|
+
# RLM CONTEXT STRATEGY
|
|
137
|
+
# ============================================================
|
|
138
|
+
# Configuration for handling large codebases with AI
|
|
139
|
+
|
|
140
|
+
context-strategy:
|
|
141
|
+
# Maximum tokens per analysis chunk
|
|
142
|
+
max-chunk-size: 50000
|
|
143
|
+
|
|
144
|
+
# Token overlap between chunks for context continuity
|
|
145
|
+
overlap: 500
|
|
146
|
+
|
|
147
|
+
# Analysis pattern
|
|
148
|
+
# Options: hierarchical | parallel | sequential
|
|
149
|
+
analysis-pattern: hierarchical
|
|
150
|
+
|
|
151
|
+
# Enable RLM-aware processing
|
|
152
|
+
enable-rlm: true
|
|
153
|
+
|
|
154
|
+
# ============================================================
|
|
155
|
+
# CUSTOM ANNOTATIONS
|
|
156
|
+
# ============================================================
|
|
157
|
+
# Define project-specific code annotation patterns
|
|
158
|
+
|
|
159
|
+
annotations:
|
|
160
|
+
# Security-related code markers
|
|
161
|
+
security:
|
|
162
|
+
- "@ai-security"
|
|
163
|
+
- "@security-critical"
|
|
164
|
+
|
|
165
|
+
# Performance-critical code markers
|
|
166
|
+
performance:
|
|
167
|
+
- "@ai-performance"
|
|
168
|
+
- "@perf-critical"
|
|
169
|
+
|
|
170
|
+
# Complexity hints
|
|
171
|
+
complexity:
|
|
172
|
+
- "@ai-complexity"
|
|
173
|
+
|
|
174
|
+
# ============================================================
|
|
175
|
+
# TEAM CONVENTIONS
|
|
176
|
+
# ============================================================
|
|
177
|
+
# Help AI understand your team's conventions
|
|
178
|
+
|
|
179
|
+
conventions:
|
|
180
|
+
# Naming conventions
|
|
181
|
+
naming:
|
|
182
|
+
files: kebab-case # kebab-case | camelCase | snake_case | PascalCase
|
|
183
|
+
functions: camelCase
|
|
184
|
+
classes: PascalCase
|
|
185
|
+
constants: UPPER_SNAKE
|
|
186
|
+
|
|
187
|
+
# Code style
|
|
188
|
+
style:
|
|
189
|
+
indent: 2
|
|
190
|
+
quotes: single
|
|
191
|
+
semicolons: true
|
|
192
|
+
|
|
193
|
+
# Commit message format
|
|
194
|
+
commits: conventional # conventional | angular | custom
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# CLAUDE.md Template
|
|
2
|
+
# CLAUDE.md 範本
|
|
3
|
+
|
|
4
|
+
> Copy this file to your project root as `CLAUDE.md` or `.cursorrules`.
|
|
5
|
+
>
|
|
6
|
+
> 將此檔案複製到專案根目錄,命名為 `CLAUDE.md` 或 `.cursorrules`。
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Project AI Collaboration Guidelines
|
|
11
|
+
# 專案 AI 協作規範
|
|
12
|
+
|
|
13
|
+
## 1. Certainty Labels | 確定性標籤
|
|
14
|
+
|
|
15
|
+
When analyzing code or making statements, use these tags:
|
|
16
|
+
|
|
17
|
+
分析程式碼或陳述事實時,使用以下標籤:
|
|
18
|
+
|
|
19
|
+
| Tag | Use When | 使用時機 |
|
|
20
|
+
|-----|----------|---------|
|
|
21
|
+
| `[Confirmed]` / `[已確認]` | Direct evidence from code/docs | 直接來自程式碼/文件的證據 |
|
|
22
|
+
| `[Inferred]` / `[推測]` | Logical deduction from evidence | 基於證據的邏輯推論 |
|
|
23
|
+
| `[Assumption]` / `[假設]` | Based on common patterns | 基於常見模式(需驗證) |
|
|
24
|
+
| `[Unknown]` / `[未知]` | Information not available | 資訊不可得 |
|
|
25
|
+
|
|
26
|
+
**Rules | 規則**:
|
|
27
|
+
- Always cite sources: `[Source: Code] file.ts:42`
|
|
28
|
+
- Never fabricate APIs, configs, or requirements
|
|
29
|
+
- Ask for clarification when unsure
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 2. Recommendations | 建議原則
|
|
34
|
+
|
|
35
|
+
When presenting multiple options, **always include a recommendation**:
|
|
36
|
+
|
|
37
|
+
提供多個選項時,**必須包含推薦選項**:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Options:
|
|
41
|
+
1. Option A - description
|
|
42
|
+
2. Option B - description
|
|
43
|
+
3. Option C - description
|
|
44
|
+
|
|
45
|
+
**Recommended: Option A** because [reasoning]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 3. Quality Gates | 質量關卡
|
|
51
|
+
|
|
52
|
+
Before suggesting a commit, verify:
|
|
53
|
+
|
|
54
|
+
建議 commit 前,驗證:
|
|
55
|
+
|
|
56
|
+
- [ ] Build passes (zero errors, zero warnings)
|
|
57
|
+
- [ ] All tests pass
|
|
58
|
+
- [ ] Code follows project standards
|
|
59
|
+
- [ ] New code has tests
|
|
60
|
+
|
|
61
|
+
**Never auto-execute git commands.** Show commands and wait for user confirmation.
|
|
62
|
+
|
|
63
|
+
**不要自動執行 git 指令。** 顯示指令並等待使用者確認。
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 4. Project Structure | 專案結構
|
|
68
|
+
|
|
69
|
+
<!-- Customize this section for your project -->
|
|
70
|
+
<!-- 依專案需求自訂此區塊 -->
|
|
71
|
+
|
|
72
|
+
### Directories | 目錄
|
|
73
|
+
|
|
74
|
+
| Directory | Purpose | gitignore? |
|
|
75
|
+
|-----------|---------|------------|
|
|
76
|
+
| `src/` | Source code | No |
|
|
77
|
+
| `tests/` | Test files | No |
|
|
78
|
+
| `dist/` | Build output | **Yes** |
|
|
79
|
+
|
|
80
|
+
<!-- Common build artifacts — uncomment relevant lines in your .gitignore: -->
|
|
81
|
+
<!-- node_modules/ # Node.js -->
|
|
82
|
+
<!-- __pycache__/ # Python -->
|
|
83
|
+
<!-- .venv/ # Python virtualenv -->
|
|
84
|
+
<!-- target/ # Java Maven / Rust -->
|
|
85
|
+
<!-- dist/ # General -->
|
|
86
|
+
<!-- build/ # General -->
|
|
87
|
+
|
|
88
|
+
### Conventions | 慣例
|
|
89
|
+
|
|
90
|
+
- Source files: `src/`
|
|
91
|
+
- Test files: `tests/` or colocated with source
|
|
92
|
+
- Build output: `dist/` (gitignored)
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 5. Project-Specific Rules | 專案特定規則
|
|
97
|
+
|
|
98
|
+
<!-- Add your project-specific rules here -->
|
|
99
|
+
<!-- 在此新增專案特定規則 -->
|
|
100
|
+
|
|
101
|
+
### Build Commands | 建置指令
|
|
102
|
+
|
|
103
|
+
<!-- Commands vary by ecosystem. Uncomment and adjust for your project: -->
|
|
104
|
+
<!-- Node.js: npm run build && npm test -->
|
|
105
|
+
<!-- Python: python -m build && python -m pytest -->
|
|
106
|
+
<!-- Go: go build ./... && go test ./... -->
|
|
107
|
+
<!-- Java (Maven): mvn package && mvn test -->
|
|
108
|
+
<!-- Rust: cargo build && cargo test -->
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Development build
|
|
112
|
+
{{BUILD_COMMAND}}
|
|
113
|
+
|
|
114
|
+
# Run tests
|
|
115
|
+
{{TEST_COMMAND}}
|
|
116
|
+
|
|
117
|
+
# Lint check
|
|
118
|
+
{{LINT_COMMAND}}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Output Language | 產出語言
|
|
122
|
+
|
|
123
|
+
This project uses **English** commit messages.
|
|
124
|
+
<!-- Options: English | Traditional Chinese | Bilingual -->
|
|
125
|
+
|
|
126
|
+
### Conversation Language | 對話語言
|
|
127
|
+
|
|
128
|
+
AI should respond in **Traditional Chinese**.
|
|
129
|
+
<!-- Options: English | Traditional Chinese -->
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Reference | 參考
|
|
134
|
+
|
|
135
|
+
This template is based on [universal-dev-standards](https://github.com/AsiaOstrich/universal-dev-standards):
|
|
136
|
+
|
|
137
|
+
- [Anti-Hallucination Standards](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/core/anti-hallucination.md)
|
|
138
|
+
- [Check-in Standards](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/core/checkin-standards.md)
|
|
139
|
+
- [Project Structure](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/core/project-structure.md)
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## License | 授權
|
|
144
|
+
|
|
145
|
+
This template is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
|