universal-dev-standards 5.14.0 → 5.16.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 +2 -0
- package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +31 -0
- package/bundled/ai/standards/ai-instruction-standards.ai.yaml +190 -3
- package/bundled/ai/standards/forward-derivation-standards.ai.yaml +23 -0
- package/bundled/ai/standards/knowledge-graph-memory.ai.yaml +83 -0
- package/bundled/core/acceptance-criteria-traceability.md +46 -0
- package/bundled/core/ai-instruction-standards.md +136 -11
- package/bundled/core/forward-derivation-standards.md +19 -0
- package/bundled/core/knowledge-graph-memory.md +119 -0
- package/bundled/locales/COVERAGE.md +226 -0
- package/bundled/locales/zh-CN/CHANGELOG.md +42 -3
- package/bundled/locales/zh-CN/README.md +1 -1
- package/bundled/locales/zh-CN/SECURITY.md +1 -1
- package/bundled/locales/zh-CN/core/acceptance-criteria-traceability.md +46 -0
- package/bundled/locales/zh-CN/core/ai-instruction-standards.md +111 -5
- package/bundled/locales/zh-CN/core/forward-derivation-standards.md +19 -0
- package/bundled/locales/zh-CN/skills/ac-coverage/SKILL.md +194 -0
- package/bundled/locales/zh-CN/skills/adr-assistant/SKILL.md +135 -40
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +217 -63
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +599 -0
- package/bundled/locales/zh-CN/skills/commands/brainstorm.md +92 -25
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +78 -16
- package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +85 -26
- package/bundled/locales/zh-CN/skills/deploy-assistant/SKILL.md +189 -0
- package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +110 -0
- package/bundled/locales/zh-CN/skills/dev-methodology/guide.md +255 -0
- package/bundled/locales/zh-CN/skills/dev-workflow-guide/SKILL.md +70 -11
- package/bundled/locales/zh-CN/skills/journey-test-assistant/SKILL.md +209 -0
- package/bundled/locales/zh-CN/skills/knowledge-graph/SKILL.md +58 -0
- package/bundled/locales/zh-CN/skills/knowledge-graph/guide.md +74 -0
- package/bundled/locales/zh-CN/skills/migration-assistant/SKILL.md +125 -8
- package/bundled/locales/zh-CN/skills/observability-assistant/guide.md +188 -0
- package/bundled/locales/zh-CN/skills/orchestrate/SKILL.md +173 -0
- package/bundled/locales/zh-CN/skills/plan/SKILL.md +240 -0
- package/bundled/locales/zh-CN/skills/push/SKILL.md +242 -0
- package/bundled/locales/zh-CN/skills/retrospective-assistant/SKILL.md +104 -36
- package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +88 -32
- package/bundled/locales/zh-CN/skills/runbook-assistant/guide.md +216 -0
- package/bundled/locales/zh-CN/skills/skill-builder/SKILL.md +149 -0
- package/bundled/locales/zh-CN/skills/slo-assistant/guide.md +188 -0
- package/bundled/locales/zh-CN/skills/spec-derivation/SKILL.md +86 -0
- package/bundled/locales/zh-CN/skills/spec-derivation/guide.md +476 -0
- package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +155 -81
- package/bundled/locales/zh-CN/skills/sweep/SKILL.md +151 -0
- package/bundled/locales/zh-CN/skills/testing-guide/SKILL.md +207 -110
- package/bundled/locales/zh-TW/CHANGELOG.md +46 -3
- package/bundled/locales/zh-TW/README.md +1 -1
- package/bundled/locales/zh-TW/SECURITY.md +1 -1
- package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +46 -0
- package/bundled/locales/zh-TW/core/ai-instruction-standards.md +130 -5
- package/bundled/locales/zh-TW/core/browser-compatibility-standards.md +222 -5
- package/bundled/locales/zh-TW/core/contract-testing-standards.md +184 -5
- package/bundled/locales/zh-TW/core/cross-flow-regression.md +192 -5
- package/bundled/locales/zh-TW/core/forward-derivation-standards.md +19 -0
- package/bundled/locales/zh-TW/core/knowledge-graph-memory.md +127 -0
- package/bundled/locales/zh-TW/core/release-readiness-gate.md +186 -5
- package/bundled/locales/zh-TW/core/self-review-protocol.md +9 -1
- package/bundled/locales/zh-TW/skills/ac-coverage/SKILL.md +192 -0
- package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +21 -42
- package/bundled/locales/zh-TW/skills/ai-collaboration-standards/SKILL.md +5 -1
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +212 -59
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +266 -579
- package/bundled/locales/zh-TW/skills/commands/brainstorm.md +91 -26
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +77 -15
- package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +75 -16
- package/bundled/locales/zh-TW/skills/deploy-assistant/SKILL.md +187 -0
- package/bundled/locales/zh-TW/skills/dev-methodology/SKILL.md +108 -0
- package/bundled/locales/zh-TW/skills/dev-methodology/guide.md +255 -0
- package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +125 -64
- package/bundled/locales/zh-TW/skills/journey-test-assistant/SKILL.md +222 -0
- package/bundled/locales/zh-TW/skills/knowledge-graph/SKILL.md +56 -0
- package/bundled/locales/zh-TW/skills/knowledge-graph/guide.md +74 -0
- package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +128 -11
- package/bundled/locales/zh-TW/skills/observability-assistant/guide.md +188 -0
- package/bundled/locales/zh-TW/skills/orchestrate/SKILL.md +173 -0
- package/bundled/locales/zh-TW/skills/plan/SKILL.md +240 -0
- package/bundled/locales/zh-TW/skills/project-structure-guide/SKILL.md +5 -1
- package/bundled/locales/zh-TW/skills/push/SKILL.md +242 -0
- package/bundled/locales/zh-TW/skills/retrospective-assistant/SKILL.md +94 -28
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +84 -28
- package/bundled/locales/zh-TW/skills/runbook-assistant/guide.md +216 -0
- package/bundled/locales/zh-TW/skills/skill-builder/SKILL.md +165 -0
- package/bundled/locales/zh-TW/skills/slo-assistant/guide.md +188 -0
- package/bundled/locales/zh-TW/skills/spec-derivation/SKILL.md +83 -0
- package/bundled/locales/zh-TW/skills/spec-derivation/guide.md +476 -0
- package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +148 -77
- package/bundled/locales/zh-TW/skills/sweep/SKILL.md +149 -0
- package/bundled/locales/zh-TW/skills/testing-guide/SKILL.md +141 -44
- package/bundled/skills/adr-assistant/SKILL.md +1 -1
- package/bundled/skills/ai-collaboration-standards/SKILL.md +1 -1
- package/bundled/skills/ai-friendly-architecture/SKILL.md +1 -1
- package/bundled/skills/ai-instruction-standards/SKILL.md +1 -1
- package/bundled/skills/api-design-assistant/SKILL.md +1 -1
- package/bundled/skills/audit-assistant/SKILL.md +1 -1
- package/bundled/skills/brainstorm-assistant/SKILL.md +142 -106
- package/bundled/skills/brainstorm-assistant/guide.md +256 -661
- package/bundled/skills/ci-cd-assistant/SKILL.md +1 -1
- package/bundled/skills/commands/brainstorm.md +51 -30
- package/bundled/skills/contract-test-assistant/SKILL.md +1 -1
- package/bundled/skills/database-assistant/SKILL.md +1 -1
- package/bundled/skills/deploy-assistant/SKILL.md +1 -1
- package/bundled/skills/documentation-guide/SKILL.md +1 -1
- package/bundled/skills/error-code-guide/SKILL.md +1 -1
- package/bundled/skills/git-workflow-guide/SKILL.md +1 -1
- package/bundled/skills/incident-response-assistant/SKILL.md +1 -1
- package/bundled/skills/journey-test-assistant/SKILL.md +1 -1
- package/bundled/skills/knowledge-graph/SKILL.md +58 -0
- package/bundled/skills/knowledge-graph/guide.md +69 -0
- package/bundled/skills/logging-guide/SKILL.md +1 -1
- package/bundled/skills/observability-assistant/SKILL.md +1 -1
- package/bundled/skills/orchestrate/SKILL.md +1 -1
- package/bundled/skills/plan/SKILL.md +1 -1
- package/bundled/skills/pr-automation-assistant/SKILL.md +1 -1
- package/bundled/skills/project-structure-guide/SKILL.md +1 -1
- package/bundled/skills/push/SKILL.md +1 -1
- package/bundled/skills/retrospective-assistant/SKILL.md +1 -1
- package/bundled/skills/reverse-engineer/SKILL.md +1 -1
- package/bundled/skills/runbook-assistant/SKILL.md +1 -1
- package/bundled/skills/security-assistant/SKILL.md +1 -1
- package/bundled/skills/security-scan-assistant/SKILL.md +1 -1
- package/bundled/skills/slo-assistant/SKILL.md +1 -1
- package/bundled/skills/sweep/SKILL.md +1 -1
- package/bundled/skills/testing-guide/SKILL.md +1 -1
- package/package.json +2 -2
- package/src/commands/check.js +80 -0
- package/src/commands/init.js +8 -1
- package/src/commands/update.js +49 -14
- package/src/i18n/messages.js +32 -5
- package/src/installers/skills-installer.js +49 -0
- package/src/lint/i18n.js +424 -0
- package/src/utils/config-manager.js +39 -0
- package/src/utils/skills-installer.js +39 -7
- package/standards-registry.json +16 -4
- package/bundled/locales/zh-TW/docs/SKILL-FALLBACK-GUIDE.md +0 -407
package/bin/uds.js
CHANGED
|
@@ -175,6 +175,7 @@ program
|
|
|
175
175
|
.option('--migrate', 'Migrate legacy manifest to hash-based tracking')
|
|
176
176
|
.option('--offline', 'Skip npm registry check for CLI updates')
|
|
177
177
|
.option('--force', 'Bypass UDS source-repo self-adoption guard (DEC-044 / XSPEC-071)')
|
|
178
|
+
.option('--i18n', 'Run i18n lint rules (XSPEC-239) across canonical + locale variants')
|
|
178
179
|
.action(checkCommand);
|
|
179
180
|
|
|
180
181
|
program
|
|
@@ -207,6 +208,7 @@ program
|
|
|
207
208
|
.option('--plan', 'Show reconciliation plan without executing (like terraform plan)')
|
|
208
209
|
.option('--force', 'Force update all files, ignoring hash comparison')
|
|
209
210
|
.option('--rollback', 'Rollback to the most recent backup')
|
|
211
|
+
.option('--locale <locale>', 'Override locale for skills install (zh-tw, zh-cn, en); also reads .uds/install.yaml + UDS_LOCALE env')
|
|
210
212
|
.action(updateCommand);
|
|
211
213
|
|
|
212
214
|
program
|
|
@@ -108,6 +108,27 @@ standard:
|
|
|
108
108
|
AC Coverage: <pct>% (<covered>/<implemented_total> implemented ACs)
|
|
109
109
|
Status: BLOCKED by <not_impl_count> not_implemented AC(s)
|
|
110
110
|
|
|
111
|
+
user_doc_coverage:
|
|
112
|
+
description: "Second dimension: are user-facing AC also documented in the user guide? Extends the traceability spine past tests to the user guide (Forward Derivation Standards -> Terminal Projection: User Guide)"
|
|
113
|
+
user_facing_filter:
|
|
114
|
+
rule: "Apply only to user-facing AC — those an end user can directly observe or operate (UI flow, CLI command, user-facing API semantics)"
|
|
115
|
+
excluded: "Internal refactor/module contracts, performance thresholds, security/internal guardrails"
|
|
116
|
+
conservative_default: "When in doubt treat AC as user-facing; excluding requires explicit 'user_facing: false', never silent omission"
|
|
117
|
+
status:
|
|
118
|
+
- status: documented
|
|
119
|
+
symbol: "✅"
|
|
120
|
+
definition: "A user-guide step covers this AC, tagged with the AC's shared T-NNN"
|
|
121
|
+
- status: partial
|
|
122
|
+
symbol: "⚠️"
|
|
123
|
+
definition: "A user-guide step exists but is incomplete or ambiguously tagged"
|
|
124
|
+
- status: undocumented
|
|
125
|
+
symbol: "❌"
|
|
126
|
+
definition: "No user-guide step references this user-facing AC"
|
|
127
|
+
calculation: |
|
|
128
|
+
user_doc_coverage = (documented + partial × 0.5) / (user_facing_ac_count - not_implemented_count) × 100
|
|
129
|
+
non-user-facing AC counted in neither numerator nor denominator; partial = 0.5; not_implemented excluded from denominator
|
|
130
|
+
shared_ruler: "A user-guide step's T-NNN MUST equal a real journey/E2E test id (single spine: test + journey + user guide). A parallel id with no matching test is reported undocumented, never covered"
|
|
131
|
+
|
|
111
132
|
quality_thresholds:
|
|
112
133
|
defaults:
|
|
113
134
|
- name: Minimum AC Coverage
|
|
@@ -222,6 +243,16 @@ standard:
|
|
|
222
243
|
instruction: Validate generated AC against SMART criteria and testability
|
|
223
244
|
priority: required
|
|
224
245
|
|
|
246
|
+
- id: user-doc-user-facing-only
|
|
247
|
+
trigger: computing the user-doc coverage dimension
|
|
248
|
+
instruction: "Apply user-doc coverage only to user-facing AC; when in doubt treat as user-facing, exclude only with an explicit 'user_facing: false' marking"
|
|
249
|
+
priority: recommended
|
|
250
|
+
|
|
251
|
+
- id: user-doc-shared-tnnn
|
|
252
|
+
trigger: linking a user-guide step to an AC
|
|
253
|
+
instruction: "A user-guide step's T-NNN must equal a real journey/E2E test id; a parallel id with no matching test is reported undocumented, never covered"
|
|
254
|
+
priority: required
|
|
255
|
+
|
|
225
256
|
related_standards:
|
|
226
257
|
- forward-derivation-standards.md
|
|
227
258
|
- spec-driven-development.md
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
id: ai-instruction-standards
|
|
5
5
|
meta:
|
|
6
|
-
version: "1.
|
|
7
|
-
updated: "2026-
|
|
6
|
+
version: "1.1.0"
|
|
7
|
+
updated: "2026-05-28"
|
|
8
8
|
source: core/ai-instruction-standards.md
|
|
9
|
-
description: Best practices for creating AI instruction files with universal
|
|
9
|
+
description: Best practices for creating AI instruction files (root and skill level) with universal/project-specific separation and i18n strategy
|
|
10
10
|
|
|
11
11
|
supported_tools:
|
|
12
12
|
- tool: Claude Code
|
|
@@ -117,6 +117,26 @@ rules:
|
|
|
117
117
|
grep -n "npm\|yarn\|pip\|cargo" CLAUDE.md | head -20
|
|
118
118
|
priority: required
|
|
119
119
|
|
|
120
|
+
- id: i18n-canonical-english-only
|
|
121
|
+
trigger: editing canonical AI instruction file
|
|
122
|
+
instruction: Keep description and metadata in English; localize via locales/{lang}/ variants
|
|
123
|
+
priority: required
|
|
124
|
+
|
|
125
|
+
- id: i18n-locale-must-match-language
|
|
126
|
+
trigger: creating or editing locale variant
|
|
127
|
+
instruction: Description must be in the locale's language; include source/source_version/translation_version frontmatter
|
|
128
|
+
priority: required
|
|
129
|
+
|
|
130
|
+
- id: i18n-l3-template-language-controls-output
|
|
131
|
+
trigger: writing output templates / examples
|
|
132
|
+
instruction: L3 templates determine AI output language; localize L3 in locale variants, never in canonical
|
|
133
|
+
priority: required
|
|
134
|
+
|
|
135
|
+
- id: i18n-no-manual-canonical-edits-by-adopters
|
|
136
|
+
trigger: adopter wants to customize an installed instruction file
|
|
137
|
+
instruction: Use uds install --locale or overlays; do not modify canonical files in-place
|
|
138
|
+
priority: required
|
|
139
|
+
|
|
120
140
|
maintenance_checklist:
|
|
121
141
|
- item: Universal sections contain no project-specific paths, commands, or versions
|
|
122
142
|
required: true
|
|
@@ -127,6 +147,173 @@ maintenance_checklist:
|
|
|
127
147
|
- item: Format matches existing sections
|
|
128
148
|
required: true
|
|
129
149
|
|
|
150
|
+
i18n:
|
|
151
|
+
scope:
|
|
152
|
+
description: |
|
|
153
|
+
Defines language-handling policy for AI instruction files at two levels:
|
|
154
|
+
root-level (CLAUDE.md, .cursorrules, etc.) and skill-level
|
|
155
|
+
(Claude Code SKILL.md, OpenCode plugin instructions, etc.)
|
|
156
|
+
levels:
|
|
157
|
+
- level: root
|
|
158
|
+
files:
|
|
159
|
+
- CLAUDE.md
|
|
160
|
+
- .cursorrules
|
|
161
|
+
- .windsurfrules
|
|
162
|
+
- .clinerules
|
|
163
|
+
- .github/copilot-instructions.md
|
|
164
|
+
- .opencode/instructions.md
|
|
165
|
+
i18n_pattern: single_file_with_inline_language_sections
|
|
166
|
+
- level: skill
|
|
167
|
+
files:
|
|
168
|
+
- .claude/skills/{name}/SKILL.md
|
|
169
|
+
- .opencode/plugins/{name}/instructions.md
|
|
170
|
+
i18n_pattern: canonical_plus_locale_variants
|
|
171
|
+
|
|
172
|
+
layered_strategy:
|
|
173
|
+
description: |
|
|
174
|
+
Every AI instruction file has 4 layers. L3 (output templates) is the only
|
|
175
|
+
layer that directly affects AI output language; L1/L2 are processing
|
|
176
|
+
instructions for the AI. Enforce L3 strictly, L1 as a clear convention.
|
|
177
|
+
layers:
|
|
178
|
+
- id: L1
|
|
179
|
+
name: metadata
|
|
180
|
+
content:
|
|
181
|
+
- YAML frontmatter description
|
|
182
|
+
- argument-hint
|
|
183
|
+
- allowed-tools
|
|
184
|
+
canonical_language: english
|
|
185
|
+
locale_language: must_match_locale
|
|
186
|
+
rationale: AI-trigger signal; English has highest training-data density and token efficiency
|
|
187
|
+
impact_on_ai_output: none
|
|
188
|
+
- id: L2
|
|
189
|
+
name: instructions
|
|
190
|
+
content:
|
|
191
|
+
- imperative rules for AI
|
|
192
|
+
- steps
|
|
193
|
+
- behavior rules
|
|
194
|
+
canonical_language: english
|
|
195
|
+
locale_language: locale_optional
|
|
196
|
+
rationale: AI reads English instructions most precisely
|
|
197
|
+
impact_on_ai_output: none
|
|
198
|
+
- id: L3
|
|
199
|
+
name: output_templates
|
|
200
|
+
content:
|
|
201
|
+
- example outputs
|
|
202
|
+
- response format templates
|
|
203
|
+
- scenario examples
|
|
204
|
+
canonical_language: english
|
|
205
|
+
locale_language: must_match_locale_mandatory
|
|
206
|
+
rationale: AI mirrors the language of templates it sees — this is the only layer that controls output language
|
|
207
|
+
impact_on_ai_output: direct
|
|
208
|
+
- id: L4
|
|
209
|
+
name: human_docs
|
|
210
|
+
content:
|
|
211
|
+
- maintainer comments
|
|
212
|
+
- contributor walkthroughs
|
|
213
|
+
canonical_language: english
|
|
214
|
+
locale_language: locale_recommended
|
|
215
|
+
rationale: Read by human maintainers, not by AI
|
|
216
|
+
impact_on_ai_output: none
|
|
217
|
+
|
|
218
|
+
file_structure:
|
|
219
|
+
canonical:
|
|
220
|
+
- core/{name}.md
|
|
221
|
+
- core/{name}.ai.yaml
|
|
222
|
+
- skills/{name}/SKILL.md
|
|
223
|
+
locale:
|
|
224
|
+
- locales/{lang}/core/{name}.md
|
|
225
|
+
- locales/{lang}/ai/standards/{name}.ai.yaml
|
|
226
|
+
- locales/{lang}/skills/{name}/SKILL.md
|
|
227
|
+
locale_naming: BCP_47 # zh-TW, zh-CN, ja, ko, en-US, etc.
|
|
228
|
+
|
|
229
|
+
locale_variant_frontmatter:
|
|
230
|
+
required_fields:
|
|
231
|
+
- field: name
|
|
232
|
+
value: same as canonical
|
|
233
|
+
- field: source
|
|
234
|
+
value: relative path to canonical file
|
|
235
|
+
- field: source_version
|
|
236
|
+
value: version of canonical at time of translation
|
|
237
|
+
- field: translation_version
|
|
238
|
+
value: version of this translation
|
|
239
|
+
drift_alert:
|
|
240
|
+
condition: source_version gap > 2 minor versions behind canonical
|
|
241
|
+
severity: warn
|
|
242
|
+
|
|
243
|
+
responsibility_boundaries:
|
|
244
|
+
- role: canonical_owner
|
|
245
|
+
owns:
|
|
246
|
+
- core/{name}.md
|
|
247
|
+
- core/{name}.ai.yaml
|
|
248
|
+
- skills/{name}/SKILL.md
|
|
249
|
+
duties:
|
|
250
|
+
- Keep L1/L2/L3/L4 in English
|
|
251
|
+
- Bump source_version on every breaking change
|
|
252
|
+
- role: locale_maintainer
|
|
253
|
+
owns:
|
|
254
|
+
- locales/{lang}/...
|
|
255
|
+
duties:
|
|
256
|
+
- Keep translation_version aligned with source_version
|
|
257
|
+
- Translate L1 (required), L2 (optional), L3 (required), L4 (recommended)
|
|
258
|
+
- role: adopter
|
|
259
|
+
owns:
|
|
260
|
+
- their own .claude/skills/, CLAUDE.md
|
|
261
|
+
duties:
|
|
262
|
+
- Install via uds install --locale {lang}
|
|
263
|
+
- Never manually modify canonical files
|
|
264
|
+
- Use overlays or locale variants for customization
|
|
265
|
+
|
|
266
|
+
chimera_prevention:
|
|
267
|
+
rules:
|
|
268
|
+
- id: canonical-description-must-be-ascii
|
|
269
|
+
trigger: canonical file with CJK in description field
|
|
270
|
+
severity: error
|
|
271
|
+
instruction: Canonical files must keep description in English; move localized description to locale variant
|
|
272
|
+
- id: locale-description-must-match-language
|
|
273
|
+
trigger: locale variant with ASCII-only description
|
|
274
|
+
severity: error
|
|
275
|
+
instruction: Locale variant description must use the locale's language
|
|
276
|
+
- id: locale-must-have-source-frontmatter
|
|
277
|
+
trigger: locale variant missing source/source_version/translation_version
|
|
278
|
+
severity: error
|
|
279
|
+
instruction: Add traceability frontmatter pointing to canonical
|
|
280
|
+
- id: canonical-l3-language-consistency
|
|
281
|
+
trigger: canonical L3 output template contains non-English example
|
|
282
|
+
severity: warn
|
|
283
|
+
instruction: Localize L3 templates in locale variants, not canonical
|
|
284
|
+
- id: adopter-must-match-installed-locale
|
|
285
|
+
trigger: adopter file in .claude/skills/ differs from both canonical and any locale variant
|
|
286
|
+
severity: warn
|
|
287
|
+
instruction: Use uds install --locale or overlays instead of manual canonical edits
|
|
288
|
+
- id: translation-drift-warn
|
|
289
|
+
trigger: translation_version lag > 2 minor versions behind source_version
|
|
290
|
+
severity: warn
|
|
291
|
+
instruction: Re-sync translation from current canonical version
|
|
292
|
+
|
|
293
|
+
installation_model:
|
|
294
|
+
cli: uds install --locale {lang}
|
|
295
|
+
locale_resolution_priority:
|
|
296
|
+
- --locale CLI flag
|
|
297
|
+
- .uds/install.yaml locale field
|
|
298
|
+
- environment variable UDS_LOCALE
|
|
299
|
+
- fallback to en
|
|
300
|
+
missing_locale_behavior:
|
|
301
|
+
action: fallback_to_canonical_with_warn
|
|
302
|
+
block_install: false
|
|
303
|
+
coverage_visibility: locales/COVERAGE.md
|
|
304
|
+
|
|
305
|
+
migration:
|
|
306
|
+
name: adopter_chimera_cleanup
|
|
307
|
+
steps:
|
|
308
|
+
- id: identify
|
|
309
|
+
description: Compare adopter files against UDS canonical and locale variants
|
|
310
|
+
- id: install_proper_variants
|
|
311
|
+
description: Run uds install --locale {lang} to replace chimera
|
|
312
|
+
- id: preserve_legitimate_customization
|
|
313
|
+
description: Extract project-specific (non-translation) customization into overlay or UDS-CUSTOMIZATION.md
|
|
314
|
+
- id: discard_pure_translations
|
|
315
|
+
description: Chimera changes that were only translations are superseded by locale variants
|
|
316
|
+
|
|
130
317
|
quick_reference:
|
|
131
318
|
content_types:
|
|
132
319
|
columns: [Type, Contains, Example]
|
|
@@ -99,6 +99,20 @@ ac_level_summary:
|
|
|
99
99
|
description: "Output AC Level Summary at end of /derive all"
|
|
100
100
|
format: "| AC | Suggested Level | Rationale |"
|
|
101
101
|
|
|
102
|
+
# Terminal Projection: User Guide (extends the chain past tests)
|
|
103
|
+
terminal_projection:
|
|
104
|
+
description: "The user guide is the terminal projection of the derivation chain — the human-readable view of the same workflow E2E/journey tests verify by machine"
|
|
105
|
+
single_source_of_truth: "AC spine — BDD, TDD/IT/E2E, ATDD, contracts, and the user guide are all projections of the same AC"
|
|
106
|
+
user_facing_filter:
|
|
107
|
+
rule: "A user-guide step is required only for an AC an end user can directly observe or operate (UI flow, CLI command, user-facing API semantics)"
|
|
108
|
+
excluded: "Purely internal AC (refactor, internal module contracts, performance thresholds, security controls) carry no user-guide obligation"
|
|
109
|
+
default: "When in doubt, treat the AC as user-facing; explicit marking is required to exclude"
|
|
110
|
+
shared_numbering:
|
|
111
|
+
rule: "Each user-guide step is tagged T-NNN, and that T-NNN MUST be the id of a real journey/E2E test"
|
|
112
|
+
ambiguous: "Ambiguous or missing tags are reported as uncovered (prefer redundancy over omission)"
|
|
113
|
+
violation: "Minting a parallel T-NNN-style series detached from the AC spine"
|
|
114
|
+
single_spine_principle: "Test and documentation sources are layered projections of one AC spine (N×1), not independent sources cross-checking one another pairwise (N×N); TDD/IT/E2E are pyramid layers of the same spine, not rival sources"
|
|
115
|
+
|
|
102
116
|
# Certainty Framework
|
|
103
117
|
certainty_framework:
|
|
104
118
|
tags:
|
|
@@ -171,6 +185,15 @@ rules:
|
|
|
171
185
|
- id: ac-level-summary
|
|
172
186
|
instruction: Output AC Level Summary table at end of /derive all
|
|
173
187
|
priority: recommended
|
|
188
|
+
- id: single-spine-no-parallel-numbering
|
|
189
|
+
instruction: Every test/doc artifact must trace back to the AC spine; never mint a parallel T-NNN-style series detached from it
|
|
190
|
+
priority: required
|
|
191
|
+
- id: user-guide-shared-tnnn
|
|
192
|
+
instruction: A user-guide step's T-NNN must equal a real journey/E2E test id; ambiguous or missing tags are reported as uncovered
|
|
193
|
+
priority: required
|
|
194
|
+
- id: user-facing-ac-conservative-default
|
|
195
|
+
instruction: User-guide obligation applies to user-facing AC only; when in doubt treat as user-facing, explicit marking to exclude
|
|
196
|
+
priority: recommended
|
|
174
197
|
|
|
175
198
|
related_standards:
|
|
176
199
|
- reverse-engineering-standards.md
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Knowledge Graph Memory Standards - AI Optimized
|
|
2
|
+
# Source: core/knowledge-graph-memory.md
|
|
3
|
+
|
|
4
|
+
standard:
|
|
5
|
+
id: knowledge-graph-memory
|
|
6
|
+
name: Knowledge Graph Memory Standards
|
|
7
|
+
description: Relationship schema for traversing specs, decisions, and code as a graph; complements vector memory with structural multi-hop queries, engine-optional with Markdown degradation
|
|
8
|
+
guidelines:
|
|
9
|
+
- "Express relationships as optional, additive YAML front-matter (related/impacts/impacted_by/supersedes/implements)"
|
|
10
|
+
- "Derive IMPACTS (Decision->Spec) and SUPERSEDES (Decision->Decision) edges from front-matter or [[ref]] links"
|
|
11
|
+
- "Support two modes: degraded (AI reads linked Markdown) and service (graph engine multi-hop query) with the same answer shape"
|
|
12
|
+
- "Keep the graph engine opt-in; always degrade gracefully to Markdown reading"
|
|
13
|
+
- "Treat vector/semantic memory as complementary (similarity) to graph traversal (structure), not replaced"
|
|
14
|
+
|
|
15
|
+
meta:
|
|
16
|
+
version: "1.0.0"
|
|
17
|
+
updated: "2026-05-30"
|
|
18
|
+
source: core/knowledge-graph-memory.md
|
|
19
|
+
description: Relationship schema for traversing specs, decisions, and code as a graph; complements vector memory with structural multi-hop queries, engine-optional with Markdown degradation
|
|
20
|
+
|
|
21
|
+
schema:
|
|
22
|
+
format: "YAML front-matter on spec/decision Markdown documents"
|
|
23
|
+
optional_fields:
|
|
24
|
+
- field: related
|
|
25
|
+
type: list
|
|
26
|
+
direction: undirected
|
|
27
|
+
description: "Loosely associated artifact ids"
|
|
28
|
+
- field: impacts
|
|
29
|
+
type: list
|
|
30
|
+
direction: "this(Decision) -> Spec"
|
|
31
|
+
description: "Specs this decision changes"
|
|
32
|
+
- field: impacted_by
|
|
33
|
+
type: list
|
|
34
|
+
direction: "Decision -> this(Spec)"
|
|
35
|
+
description: "Decisions that change this spec"
|
|
36
|
+
- field: supersedes
|
|
37
|
+
type: list
|
|
38
|
+
direction: "this(Decision) -> Decision"
|
|
39
|
+
description: "Decisions this one replaces"
|
|
40
|
+
- field: implements
|
|
41
|
+
type: list
|
|
42
|
+
direction: "code/spec -> Spec"
|
|
43
|
+
description: "Specs this artifact realises"
|
|
44
|
+
node_kinds:
|
|
45
|
+
- prefix: "XSPEC-* / SPEC-*"
|
|
46
|
+
kind: Spec
|
|
47
|
+
- prefix: "DEC-* / ADR-*"
|
|
48
|
+
kind: Decision
|
|
49
|
+
- prefix: "function / class / module"
|
|
50
|
+
kind: Code
|
|
51
|
+
|
|
52
|
+
edges:
|
|
53
|
+
- rule: "Decision impacts:[SPEC] => IMPACTS (Decision -> Spec)"
|
|
54
|
+
- rule: "Spec impacted_by:[DEC] => IMPACTS (Decision -> Spec)"
|
|
55
|
+
- rule: "Decision supersedes:[DEC] => SUPERSEDES (Decision -> Decision)"
|
|
56
|
+
- rule: "[[XSPEC-NNN]] link in a Decision body => IMPACTS (Decision -> Spec)"
|
|
57
|
+
idempotent: "Declaring a relationship from both ends yields one edge, not two"
|
|
58
|
+
|
|
59
|
+
modes:
|
|
60
|
+
degraded:
|
|
61
|
+
description: "No engine: AI reads the target doc, follows front-matter/[[ref]] links by reading files, assembles the chain manually"
|
|
62
|
+
always_available: true
|
|
63
|
+
service:
|
|
64
|
+
description: "Graph engine indexed: a single multi-hop query (impact-analysis {nodeId, maxHops}) returns the full cross-domain chain"
|
|
65
|
+
example_engine: "EngramGraph (engramgraph)"
|
|
66
|
+
|
|
67
|
+
confidence:
|
|
68
|
+
optional: true
|
|
69
|
+
range: "0.1 - 1.0"
|
|
70
|
+
floor: 0.1
|
|
71
|
+
note: "Feedback signals (test pass/fail, human correction, status change) evolve confidence; floor prevents erasing important nodes (SAGE)"
|
|
72
|
+
|
|
73
|
+
rules:
|
|
74
|
+
- "Relationship fields are optional and additive; absence never breaks tooling"
|
|
75
|
+
- "Reference ids that do not exist yet become stub nodes, resolved when the target appears"
|
|
76
|
+
- "Declare each relationship from the owning side, but accept either"
|
|
77
|
+
- "Graph engine is opt-in; degrade gracefully to Markdown reading"
|
|
78
|
+
- "Vector/semantic memory is complementary, not replaced"
|
|
79
|
+
|
|
80
|
+
related_standards:
|
|
81
|
+
- project-context-memory
|
|
82
|
+
- developer-memory
|
|
83
|
+
- adr-standards
|
|
@@ -140,6 +140,52 @@ The gate clears only when all `not_implemented` ACs are updated to `uncovered`,
|
|
|
140
140
|
|
|
141
141
|
---
|
|
142
142
|
|
|
143
|
+
## User-Documentation Coverage | 使用者文件覆蓋
|
|
144
|
+
|
|
145
|
+
The AC↔test matrix above verifies that AC are *tested*. A second dimension verifies that **user-facing AC are also documented** for the end user. This extends the traceability spine past tests to the user guide — see Forward Derivation Standards → *Terminal Projection: User Guide*. The user guide and the journey/E2E suite are two projections of one workflow, so they share one ruler: `T-NNN`.
|
|
146
|
+
|
|
147
|
+
### User-Facing AC Filter
|
|
148
|
+
|
|
149
|
+
Apply the user-doc dimension **only to user-facing AC** — those an end user can directly observe or operate. This prevents the dimension from degrading into a blanket documentation obligation on every internal AC.
|
|
150
|
+
|
|
151
|
+
| AC kind | User-facing? |
|
|
152
|
+
|---------|--------------|
|
|
153
|
+
| UI flow, screen, navigation | Yes |
|
|
154
|
+
| CLI command / flag a user runs | Yes |
|
|
155
|
+
| User-facing API semantics (public contract a user calls) | Yes |
|
|
156
|
+
| Internal refactor / module contract | No |
|
|
157
|
+
| Performance threshold, capacity | No |
|
|
158
|
+
| Security control, internal guardrail | No |
|
|
159
|
+
|
|
160
|
+
**Conservative default**: when in doubt, treat the AC as user-facing. Excluding an AC requires **explicit marking** (e.g. `user_facing: false`), never silent omission.
|
|
161
|
+
|
|
162
|
+
### User-Doc Status
|
|
163
|
+
|
|
164
|
+
Reuse the same symbols, now answering "is this user-facing AC covered by a user-guide step?":
|
|
165
|
+
|
|
166
|
+
| Status | Symbol | Definition |
|
|
167
|
+
|--------|--------|------------|
|
|
168
|
+
| **Documented** | ✅ | A user-guide step covers this AC, tagged with the AC's shared `T-NNN` |
|
|
169
|
+
| **Partial** | ⚠️ | A user-guide step exists but is incomplete or ambiguously tagged |
|
|
170
|
+
| **Undocumented** | ❌ | No user-guide step references this user-facing AC |
|
|
171
|
+
|
|
172
|
+
`not_implemented` (🚫) AC are excluded from the user-doc denominator, exactly as in the test-coverage calculation.
|
|
173
|
+
|
|
174
|
+
### User-Doc Coverage Calculation
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
User-Doc Coverage % = (documented + partial × 0.5) / (user_facing_ac_count - not_implemented_count) × 100
|
|
178
|
+
|
|
179
|
+
Where:
|
|
180
|
+
user_facing_ac_count = count of AC classified user-facing (conservative default applies)
|
|
181
|
+
non-user-facing AC are counted in neither numerator nor denominator
|
|
182
|
+
partial counts as 0.5
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
> **Single ruler**: a user-guide step's `T-NNN` MUST equal a real journey/E2E test id (Forward Derivation Standards). This binds three projections of one AC — test, journey, and user guide — to a single spine. A user-guide step that mints a parallel id with no matching test is reported as **undocumented**, never as covered.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
143
189
|
## Quality Thresholds
|
|
144
190
|
|
|
145
191
|
### Default Thresholds
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **Language**: English | [繁體中文](../locales/zh-TW/core/ai-instruction-standards.md) | [简体中文](../locales/zh-CN/core/ai-instruction-standards.md)
|
|
4
4
|
|
|
5
|
-
**Version**: 1.
|
|
6
|
-
**Last Updated**: 2026-
|
|
5
|
+
**Version**: 1.1.0
|
|
6
|
+
**Last Updated**: 2026-05-28
|
|
7
7
|
**Applicability**: All projects using AI coding assistants
|
|
8
8
|
**Scope**: partial
|
|
9
9
|
**Industry Standards**: None (Emerging AI tool practice)
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
|
|
13
13
|
## Purpose
|
|
14
14
|
|
|
15
|
-
This standard defines best practices for creating and maintaining AI instruction files (also known as "system prompt files"). These files guide AI assistants in understanding project-specific conventions, standards, and workflows.
|
|
15
|
+
This standard defines best practices for creating and maintaining AI instruction files (also known as "system prompt files"). These files guide AI assistants in understanding project-specific conventions, standards, and workflows. This v1.1.0 extends scope to skill-level instruction files (SKILL.md) and adds i18n strategy.
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
## Supported AI Tools
|
|
20
20
|
|
|
21
|
-
| AI Tool | Instruction File | Format |
|
|
22
|
-
|
|
23
|
-
| Claude Code | `CLAUDE.md` | Markdown |
|
|
24
|
-
| Cursor | `.cursorrules` | Markdown |
|
|
25
|
-
| Windsurf | `.windsurfrules` | Markdown |
|
|
26
|
-
| Cline | `.clinerules` | Markdown |
|
|
27
|
-
| GitHub Copilot | `.github/copilot-instructions.md` | Markdown |
|
|
28
|
-
| OpenCode | `.opencode/instructions.md` | Markdown |
|
|
21
|
+
| AI Tool | Instruction File | Format | Skill-Level Instruction |
|
|
22
|
+
|---------|-----------------|--------|------------------------|
|
|
23
|
+
| Claude Code | `CLAUDE.md` | Markdown | `.claude/skills/{name}/SKILL.md` |
|
|
24
|
+
| Cursor | `.cursorrules` | Markdown | n/a |
|
|
25
|
+
| Windsurf | `.windsurfrules` | Markdown | n/a |
|
|
26
|
+
| Cline | `.clinerules` | Markdown | n/a |
|
|
27
|
+
| GitHub Copilot | `.github/copilot-instructions.md` | Markdown | n/a |
|
|
28
|
+
| OpenCode | `.opencode/instructions.md` | Markdown | n/a |
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
@@ -145,6 +145,130 @@ Use clear markers to distinguish content types:
|
|
|
145
145
|
|
|
146
146
|
---
|
|
147
147
|
|
|
148
|
+
## Internationalization (i18n)
|
|
149
|
+
|
|
150
|
+
AI instruction files often need to be available in multiple languages — both for international adopters and for projects with non-English-speaking maintainers. This section defines how to organize, validate, and install multi-language instruction files.
|
|
151
|
+
|
|
152
|
+
### Scope of AI Instruction Files
|
|
153
|
+
|
|
154
|
+
This standard covers instruction files at two levels:
|
|
155
|
+
|
|
156
|
+
| Level | Examples | i18n Pattern |
|
|
157
|
+
|-------|----------|--------------|
|
|
158
|
+
| **Root-level** | `CLAUDE.md`, `.cursorrules`, `.windsurfrules`, `.opencode/instructions.md` | Single file with inline language sections (e.g., `## 中文` / `## English`) |
|
|
159
|
+
| **Skill-level** | Claude Code `.claude/skills/{name}/SKILL.md`, OpenCode plugin instructions | Canonical (English) + `locales/{lang}/` variants |
|
|
160
|
+
|
|
161
|
+
> Note: skill-level multi-file structure is most relevant to Claude Code. Other tools use single root files; for them, only the layered language strategy (below) and the chimera-prevention rules apply.
|
|
162
|
+
|
|
163
|
+
### Layered Language Strategy
|
|
164
|
+
|
|
165
|
+
Every AI instruction file conceptually has **four layers**, each with different language responsibilities:
|
|
166
|
+
|
|
167
|
+
| Layer | Content | Canonical (en) | Locale ({lang}) | Why |
|
|
168
|
+
|-------|---------|---------------|----------------|-----|
|
|
169
|
+
| **L1 — Metadata** | YAML frontmatter `description`, `argument-hint`, `allowed-tools` | **Must be English** | **Must match locale** | AI-trigger signal; English has highest training-data density and token efficiency |
|
|
170
|
+
| **L2 — Instructions** | Imperative rules for the AI (steps, behavior, allowed-tools rationale) | **Must be English** | Locale language (optional; may stay English) | AI reads English instructions most precisely; locale only useful if maintainers need to read instructions in their language |
|
|
171
|
+
| **L3 — Output Templates** | Example outputs, response formats, scenario templates | English (locale-pinned to English in canonical) | **Mandatory locale match** | **Only layer that directly controls AI output language** — AI inherits the language of templates it sees |
|
|
172
|
+
| **L4 — Human Docs** | Comments for maintainers, walkthroughs, contributor notes | English | Locale language (strongly recommended) | Read by human maintainers, not by AI |
|
|
173
|
+
|
|
174
|
+
**Critical insight**: L1 (description) is the trigger signal AI uses to decide *whether to invoke* a skill — it does **not** affect what the AI says afterwards. L3 (output templates) is the only layer that controls AI output language, because AI mirrors the language of templates it sees. **i18n enforcement should focus on L3 — strengthening L1 enforcement is a common mistake that solves the wrong problem.**
|
|
175
|
+
|
|
176
|
+
### Canonical / Locale File Structure
|
|
177
|
+
|
|
178
|
+
For UDS standards and skills with locale variants:
|
|
179
|
+
|
|
180
|
+
```text
|
|
181
|
+
core/{name}.md ← canonical (English) — single source of truth
|
|
182
|
+
core/{name}.ai.yaml ← canonical structured (English)
|
|
183
|
+
locales/{lang}/core/{name}.md ← locale variant (matches lang)
|
|
184
|
+
locales/{lang}/ai/standards/{name}.ai.yaml ← locale .ai.yaml (matches lang)
|
|
185
|
+
skills/{name}/SKILL.md ← canonical skill (English)
|
|
186
|
+
locales/{lang}/skills/{name}/SKILL.md ← locale skill variant
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Naming convention**: use BCP 47 language tags — `zh-TW`, `zh-CN`, `ja`, `ko`, `en-US`, etc.
|
|
190
|
+
|
|
191
|
+
### Locale Variant Frontmatter Requirements
|
|
192
|
+
|
|
193
|
+
Every locale variant must include traceability frontmatter so drift can be detected:
|
|
194
|
+
|
|
195
|
+
```yaml
|
|
196
|
+
---
|
|
197
|
+
name: {same name as canonical}
|
|
198
|
+
source: {relative path back to canonical}
|
|
199
|
+
source_version: {version of canonical at time of translation}
|
|
200
|
+
translation_version: {version of this translation}
|
|
201
|
+
---
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
When canonical is updated (bumping `source_version`), locale maintainers should re-sync and bump `translation_version`. A `source_version` gap of more than 2 minor versions triggers a drift warning (see Chimera Prevention).
|
|
205
|
+
|
|
206
|
+
### Responsibility Boundaries
|
|
207
|
+
|
|
208
|
+
| Role | Owns | Must do |
|
|
209
|
+
|------|------|---------|
|
|
210
|
+
| **Canonical owner** | `core/{name}.md`, `core/{name}.ai.yaml`, `skills/{name}/SKILL.md` | Keep L1/L2/L3/L4 in English; bump `source_version` on every breaking change |
|
|
211
|
+
| **Locale maintainer** | `locales/{lang}/...` files | Keep `translation_version` aligned with `source_version`; translate L1 (required) / L2 (optional) / L3 (required) / L4 (recommended) |
|
|
212
|
+
| **Adopter (downstream project)** | Their own `.claude/skills/`, `CLAUDE.md`, etc. | Install via `uds install --locale {lang}`; **never** manually modify canonical files (always edit locale variants or use overlays) |
|
|
213
|
+
|
|
214
|
+
### Chimera Prevention
|
|
215
|
+
|
|
216
|
+
A **chimera** is a file that mixes languages in violation of layer rules. Common chimera patterns:
|
|
217
|
+
|
|
218
|
+
| Pattern | Severity | Detection |
|
|
219
|
+
|---------|----------|-----------|
|
|
220
|
+
| Canonical file with CJK in `description` field | ❌ Error | Lint: `canonical:description-must-be-ascii` |
|
|
221
|
+
| Locale variant with ASCII-only `description` field | ❌ Error | Lint: `locale:description-must-match-language` |
|
|
222
|
+
| Locale variant missing `source:` frontmatter | ❌ Error | Lint: `locale:must-have-source-frontmatter` |
|
|
223
|
+
| Canonical L3 output template containing non-English example response | ⚠️ Warn | Lint: `canonical:l3-language-consistency` |
|
|
224
|
+
| Adopter file in `.claude/skills/` differs from both canonical and any locale variant | ⚠️ Warn | Sync check: `adopter:must-match-installed-locale` |
|
|
225
|
+
| `translation_version` lag > 2 minor versions behind `source_version` | ⚠️ Warn | Drift check |
|
|
226
|
+
|
|
227
|
+
Pre-commit / CI lint should enforce error-level rules; warn-level rules surface in dashboards but don't block.
|
|
228
|
+
|
|
229
|
+
### Adopter Installation Model
|
|
230
|
+
|
|
231
|
+
Adopters install instruction files via the UDS CLI:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
uds install --locale zh-TW # install skills + standards in Traditional Chinese
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Locale resolution order**:
|
|
238
|
+
1. `--locale` CLI flag (highest priority)
|
|
239
|
+
2. `.uds/install.yaml` field `locale:`
|
|
240
|
+
3. Environment variable `UDS_LOCALE`
|
|
241
|
+
4. Fallback: `en`
|
|
242
|
+
|
|
243
|
+
**Missing locale fallback**: when a requested locale variant doesn't exist for a specific skill, the CLI:
|
|
244
|
+
- Installs the canonical (English) file
|
|
245
|
+
- Emits a WARN listing skills that fell back
|
|
246
|
+
- Does **not** block installation
|
|
247
|
+
|
|
248
|
+
This keeps installation usable for adopters even when locale coverage is incomplete. Adopters can consult `locales/COVERAGE.md` for the canonical list of what is and isn't translated.
|
|
249
|
+
|
|
250
|
+
### Migration: Adopters With Existing Chimera
|
|
251
|
+
|
|
252
|
+
If an adopter has already manually modified canonical files in their project (e.g. translated descriptions in `.claude/skills/`):
|
|
253
|
+
|
|
254
|
+
1. **Identify the chimera**: compare adopter files against UDS canonical and canonical's locale variants.
|
|
255
|
+
2. **Install proper variants**: run `uds install --locale {lang}` to replace chimera files with locale variants.
|
|
256
|
+
3. **Preserve project-specific customization**: if the chimera contained legitimate project-specific customization (not just translation), extract it into an overlay or document it in the adopter's customization log (e.g. `UDS-CUSTOMIZATION.md`).
|
|
257
|
+
4. **Discard pure translations**: chimera changes that were only translations should be discarded — the proper locale variant supersedes them.
|
|
258
|
+
|
|
259
|
+
### Quick Reference
|
|
260
|
+
|
|
261
|
+
| Action | When | Tool / File |
|
|
262
|
+
|--------|------|-------------|
|
|
263
|
+
| Add new language | Want to support a new locale | Create `locales/{lang}/...` mirroring canonical structure |
|
|
264
|
+
| Update canonical | Improving English source | Bump `source_version`; notify locale maintainers |
|
|
265
|
+
| Translate / sync locale | Adding or updating locale content | Bump `translation_version`; reference current `source_version` |
|
|
266
|
+
| Check coverage | Periodic review | View auto-generated `locales/COVERAGE.md` |
|
|
267
|
+
| Install with locale | Adopter setup or re-sync | `uds install --locale {lang}` |
|
|
268
|
+
| Lint i18n rules | Before commit / in CI | `uds lint --i18n` |
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
148
272
|
## Maintenance Checklist
|
|
149
273
|
|
|
150
274
|
Before committing changes to AI instruction files:
|
|
@@ -199,6 +323,7 @@ Review each match to ensure it's in a project-specific section.
|
|
|
199
323
|
| Version | Date | Changes |
|
|
200
324
|
|---------|------|---------|
|
|
201
325
|
| 1.0.0 | 2026-01-14 | Initial release |
|
|
326
|
+
| 1.1.0 | 2026-05-28 | Add i18n section; extend scope to skill-level files |
|
|
202
327
|
|
|
203
328
|
---
|
|
204
329
|
|
|
@@ -515,6 +515,25 @@ spec-review → forward-derivation → discovery
|
|
|
515
515
|
|
|
516
516
|
---
|
|
517
517
|
|
|
518
|
+
## Terminal Projection: User Guide | 終端投影:使用者指南
|
|
519
|
+
|
|
520
|
+
The derivation chain does not stop at tests. The **user guide is the terminal projection** of the same chain — the human-readable view of the very workflow that E2E/journey tests verify by machine. "What the user reads as steps" and "what E2E actually verifies as behavior" become one maintained invariant.
|
|
521
|
+
|
|
522
|
+
- **Single source of truth**: the SPEC's acceptance criteria (AC). Every downstream artifact — BDD scenarios, TDD/IT/E2E skeletons, ATDD tables, contracts, **and the user guide** — is a projection of the same AC spine. The user guide is not a separate source to be cross-checked; it is one more projection.
|
|
523
|
+
- **User-facing AC only**: a user-guide step is required only for an AC that an **end user can directly observe or operate** (UI flow, CLI command, user-facing API semantics). Purely internal AC (refactor, internal module contracts, performance thresholds, security controls) carry no user-guide obligation. **When in doubt, treat the AC as user-facing** — conservative default; explicit marking is required to exclude.
|
|
524
|
+
- **Shared numbering (`T-NNN`)**: each user-guide step is tagged `T-NNN`, and that `T-NNN` MUST be the id of a real journey/E2E test. The user guide and the E2E suite are two projections of one workflow sharing one ruler. Ambiguous or missing tags are reported as **uncovered** (prefer redundancy over omission).
|
|
525
|
+
- ✅ user-guide step `T-012 "Create a project"` ↔ E2E test `T-012` in the journey spec.
|
|
526
|
+
- ❌ user guide invents `UG-3` with no corresponding test → drift, reported as uncovered.
|
|
527
|
+
- **Drift example**: user guide says "2-click checkout" while E2E still verifies "3-step payment" — without shared numbering, no one notices. Shared `T-NNN` turns this drift into a reported coverage gap.
|
|
528
|
+
|
|
529
|
+
### Single-Spine Principle (not parallel cross-check)
|
|
530
|
+
|
|
531
|
+
Test and documentation sources are **multiple layered projections of one AC spine**, not independent sources of truth that cross-check one another. TDD/IT/E2E are pyramid *layers* of the same spine (see Test Level Decision Tree), not rival sources. Cross-checking N sources pairwise (N×N) breeds drift; projecting each artifact back to the single AC spine (N×1) eliminates it.
|
|
532
|
+
|
|
533
|
+
> **Rule**: every test or documentation artifact MUST trace back to an AC. Minting a **parallel numbering scheme** — a second `T-NNN`-style series detached from the AC spine — is a VIOLATION. There is one ruler: the AC spine, with `T-NNN` shared between journey/E2E tests and the user guide.
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
518
537
|
## Test Level Decision Tree
|
|
519
538
|
|
|
520
539
|
根據 AC 的性質決定應生成哪種測試層級:
|