create-ai-project 1.11.2 → 1.12.1

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.
Files changed (126) hide show
  1. package/.claude/agents-en/acceptance-test-generator.md +13 -13
  2. package/.claude/agents-en/code-reviewer.md +8 -10
  3. package/.claude/agents-en/design-sync.md +6 -5
  4. package/.claude/agents-en/document-reviewer.md +8 -7
  5. package/.claude/agents-en/integration-test-reviewer.md +5 -4
  6. package/.claude/agents-en/prd-creator.md +7 -6
  7. package/.claude/agents-en/quality-fixer-frontend.md +3 -14
  8. package/.claude/agents-en/quality-fixer.md +9 -20
  9. package/.claude/agents-en/requirement-analyzer.md +8 -7
  10. package/.claude/agents-en/rule-advisor.md +57 -128
  11. package/.claude/agents-en/task-decomposer.md +4 -10
  12. package/.claude/agents-en/task-executor-frontend.md +4 -16
  13. package/.claude/agents-en/task-executor.md +5 -16
  14. package/.claude/agents-en/technical-designer-frontend.md +17 -15
  15. package/.claude/agents-en/technical-designer.md +13 -15
  16. package/.claude/agents-en/work-planner.md +9 -14
  17. package/.claude/agents-ja/acceptance-test-generator.md +9 -15
  18. package/.claude/agents-ja/code-reviewer.md +3 -11
  19. package/.claude/agents-ja/design-sync.md +2 -6
  20. package/.claude/agents-ja/document-reviewer.md +4 -9
  21. package/.claude/agents-ja/integration-test-reviewer.md +2 -5
  22. package/.claude/agents-ja/prd-creator.md +3 -7
  23. package/.claude/agents-ja/quality-fixer-frontend.md +2 -13
  24. package/.claude/agents-ja/quality-fixer.md +7 -18
  25. package/.claude/agents-ja/requirement-analyzer.md +5 -8
  26. package/.claude/agents-ja/rule-advisor.md +57 -128
  27. package/.claude/agents-ja/task-decomposer.md +4 -10
  28. package/.claude/agents-ja/task-executor-frontend.md +3 -15
  29. package/.claude/agents-ja/task-executor.md +3 -17
  30. package/.claude/agents-ja/technical-designer-frontend.md +17 -15
  31. package/.claude/agents-ja/technical-designer.md +13 -15
  32. package/.claude/agents-ja/work-planner.md +9 -14
  33. package/.claude/commands-en/build.md +2 -2
  34. package/.claude/commands-en/design.md +1 -1
  35. package/.claude/commands-en/implement.md +8 -8
  36. package/.claude/commands-en/plan.md +3 -3
  37. package/.claude/commands-en/project-inject.md +4 -4
  38. package/.claude/commands-en/{refine-rule.md → refine-skill.md} +47 -48
  39. package/.claude/commands-en/{sync-rules.md → sync-skills.md} +29 -29
  40. package/.claude/commands-ja/build.md +2 -2
  41. package/.claude/commands-ja/design.md +1 -1
  42. package/.claude/commands-ja/implement.md +8 -8
  43. package/.claude/commands-ja/plan.md +3 -3
  44. package/.claude/commands-ja/project-inject.md +4 -4
  45. package/.claude/{commands/refine-rule.md → commands-ja/refine-skill.md} +25 -25
  46. package/.claude/{commands/sync-rules.md → commands-ja/sync-skills.md} +28 -28
  47. package/{docs/rules-en/coding-standards.md → .claude/skills-en/coding-standards/SKILL.md} +21 -108
  48. package/{docs/rules-en/documentation-criteria.md → .claude/skills-en/documentation-criteria/SKILL.md} +40 -42
  49. package/{docs/adr/template-en.md → .claude/skills-en/documentation-criteria/references/adr-template.md} +1 -1
  50. package/{docs/design/template-en.md → .claude/skills-en/documentation-criteria/references/design-template.md} +11 -31
  51. package/{docs/plans/template-en.md → .claude/skills-en/documentation-criteria/references/plan-template.md} +4 -4
  52. package/{docs/prd/template-en.md → .claude/skills-en/documentation-criteria/references/prd-template.md} +1 -1
  53. package/{docs/rules-en/frontend/technical-spec.md → .claude/skills-en/frontend/technical-spec/SKILL.md} +17 -13
  54. package/{docs/rules-en/frontend/typescript.md → .claude/skills-en/frontend/typescript-rules/SKILL.md} +17 -12
  55. package/{docs/rules-en/frontend/typescript-testing.md → .claude/skills-en/frontend/typescript-testing/SKILL.md} +11 -6
  56. package/{docs/rules-en/architecture/implementation-approach.md → .claude/skills-en/implementation-approach/SKILL.md} +7 -2
  57. package/{docs/rules-en/integration-e2e-testing.md → .claude/skills-en/integration-e2e-testing/SKILL.md} +15 -18
  58. package/{docs/rules-en/project-context.md → .claude/skills-en/project-context/SKILL.md} +7 -3
  59. package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +224 -0
  60. package/.claude/skills-en/task-analyzer/SKILL.md +131 -0
  61. package/{docs/rules-en/rules-index.yaml → .claude/skills-en/task-analyzer/references/skills-index.yaml} +34 -20
  62. package/{docs/rules-en/technical-spec.md → .claude/skills-en/technical-spec/SKILL.md} +6 -6
  63. package/{docs/rules-en/typescript.md → .claude/skills-en/typescript-rules/SKILL.md} +15 -10
  64. package/{docs/rules-en/typescript-testing.md → .claude/skills-en/typescript-testing/SKILL.md} +10 -4
  65. package/{docs/rules-ja/coding-standards.md → .claude/skills-ja/coding-standards/SKILL.md} +12 -99
  66. package/{docs/rules-ja/documentation-criteria.md → .claude/skills-ja/documentation-criteria/SKILL.md} +18 -5
  67. package/.claude/skills-ja/documentation-criteria/references/adr-template.md +64 -0
  68. package/.claude/skills-ja/documentation-criteria/references/design-template.md +261 -0
  69. package/{docs/plans/template-ja.md → .claude/skills-ja/documentation-criteria/references/plan-template.md} +38 -38
  70. package/{docs/prd/template-ja.md → .claude/skills-ja/documentation-criteria/references/prd-template.md} +33 -33
  71. package/{docs/rules-ja/frontend/technical-spec.md → .claude/skills-ja/frontend/technical-spec/SKILL.md} +13 -9
  72. package/.claude/skills-ja/frontend/typescript-rules/SKILL.md +315 -0
  73. package/{docs/rules-ja/frontend/typescript-testing.md → .claude/skills-ja/frontend/typescript-testing/SKILL.md} +93 -5
  74. package/{docs/rules/architecture/implementation-approach.md → .claude/skills-ja/implementation-approach/SKILL.md} +10 -5
  75. package/{docs/rules-ja/integration-e2e-testing.md → .claude/skills-ja/integration-e2e-testing/SKILL.md} +5 -8
  76. package/{docs/rules-ja/project-context.md → .claude/skills-ja/project-context/SKILL.md} +7 -3
  77. package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +212 -0
  78. package/.claude/skills-ja/task-analyzer/SKILL.md +131 -0
  79. package/{docs/rules-ja/rules-index.yaml → .claude/skills-ja/task-analyzer/references/skills-index.yaml} +34 -19
  80. package/{docs/rules-ja/technical-spec.md → .claude/skills-ja/technical-spec/SKILL.md} +6 -6
  81. package/{docs/rules-ja/typescript.md → .claude/skills-ja/typescript-rules/SKILL.md} +16 -11
  82. package/{docs/rules-ja/typescript-testing.md → .claude/skills-ja/typescript-testing/SKILL.md} +11 -5
  83. package/CLAUDE.en.md +6 -6
  84. package/CLAUDE.ja.md +6 -6
  85. package/CLAUDE.md +19 -28
  86. package/README.ja.md +39 -10
  87. package/README.md +39 -10
  88. package/package.json +1 -1
  89. package/scripts/set-language.js +35 -53
  90. package/scripts/setup-project.js +4 -1
  91. package/.claude/agents/acceptance-test-generator.md +0 -316
  92. package/.claude/agents/code-reviewer.md +0 -193
  93. package/.claude/agents/document-reviewer.md +0 -182
  94. package/.claude/agents/prd-creator.md +0 -186
  95. package/.claude/agents/quality-fixer.md +0 -295
  96. package/.claude/agents/requirement-analyzer.md +0 -161
  97. package/.claude/agents/rule-advisor.md +0 -194
  98. package/.claude/agents/task-decomposer.md +0 -291
  99. package/.claude/agents/task-executor.md +0 -270
  100. package/.claude/agents/technical-designer.md +0 -343
  101. package/.claude/agents/work-planner.md +0 -181
  102. package/.claude/commands/build.md +0 -78
  103. package/.claude/commands/design.md +0 -27
  104. package/.claude/commands/implement.md +0 -79
  105. package/.claude/commands/plan.md +0 -43
  106. package/.claude/commands/project-inject.md +0 -76
  107. package/.claude/commands/review.md +0 -78
  108. package/.claude/commands/task.md +0 -13
  109. package/.claude/commands-ja/refine-rule.md +0 -206
  110. package/.claude/commands-ja/sync-rules.md +0 -116
  111. package/.claude/settings.local.json +0 -74
  112. package/docs/adr/template-ja.md +0 -64
  113. package/docs/design/template-ja.md +0 -285
  114. package/docs/guides/en/sub-agents.md +0 -343
  115. package/docs/guides/ja/sub-agents.md +0 -343
  116. package/docs/guides/sub-agents.md +0 -306
  117. package/docs/plans/20250123-integration-test-improvement.md +0 -993
  118. package/docs/rules/ai-development-guide.md +0 -260
  119. package/docs/rules/documentation-criteria.md +0 -180
  120. package/docs/rules/project-context.md +0 -38
  121. package/docs/rules/rules-index.yaml +0 -137
  122. package/docs/rules/technical-spec.md +0 -47
  123. package/docs/rules/typescript-testing.md +0 -188
  124. package/docs/rules/typescript.md +0 -166
  125. package/docs/rules-ja/architecture/implementation-approach.md +0 -136
  126. package/docs/rules-ja/frontend/typescript.md +0 -131
@@ -1,28 +1,28 @@
1
1
  ---
2
- description: ルール修正後のメタデータ同期とrule-advisor精度最適化
2
+ description: スキル修正後のメタデータ同期とrule-advisor精度最適化
3
3
  ---
4
4
 
5
- **コマンドコンテキスト**: ルールファイル編集後のメンテナンス作業
5
+ **コマンドコンテキスト**: スキルファイル編集後のメンテナンス作業
6
6
 
7
7
  **Think deeply** rule-advisorの実行精度を最大化するための同期作業:
8
8
 
9
9
  ## 実行フロー
10
10
 
11
- ### 1. ルールファイルのスキャン
11
+ ### 1. スキルファイルのスキャン
12
12
  ```bash
13
- # 実行時のルールディレクトリ
14
- RULES_DIR="docs/rules"
15
- INDEX_FILE="${RULES_DIR}/rules-index.yaml"
13
+ # 実行時のスキルディレクトリ
14
+ SKILLS_DIR=".claude/skills"
15
+ INDEX_FILE=".claude/skills/task-analyzer/references/skills-index.yaml"
16
16
 
17
- # 全ルールファイルを解析
18
- find "${RULES_DIR}" -name "*.md" -type f | sort
17
+ # 全スキルファイルを解析
18
+ find "${SKILLS_DIR}" -name "SKILL.md" -type f | sort
19
19
  ```
20
20
 
21
21
  ### 2. メタデータ同期と最適化
22
22
 
23
23
  #### セクション自動同期
24
- - 各ファイルの`## `セクションを抽出
25
- - rules-index.yamlのsectionsを自動更新
24
+ - 各SKILL.mdの`## `セクションを抽出
25
+ - skills-index.yamlのsectionsを自動更新
26
26
 
27
27
  #### タグの最適化
28
28
  - ファイル内容からキーワードを分析
@@ -39,23 +39,23 @@ find "${RULES_DIR}" -name "*.md" -type f | sort
39
39
 
40
40
  ### 3. rule-advisor向け最適化
41
41
 
42
- メタデータの質を向上させ、rule-advisorが正確にルールを選択できるよう調整:
42
+ メタデータの質を向上させ、rule-advisorが正確にスキルを選択できるよう調整:
43
43
 
44
44
  ```
45
- === ルールメタデータ同期 ===
46
- 対象: docs/rules
45
+ === スキルメタデータ同期 ===
46
+ 対象: .claude/skills
47
47
 
48
48
  実行した更新:
49
49
  ✅ sections同期
50
- - typescript-testing.md: 2セクション追加
51
- - ai-development-guide.md: 1セクション更新
50
+ - typescript-testing: 2セクション追加
51
+ - coding-standards: 1セクション更新
52
52
 
53
53
  ✅ tags最適化
54
- - typescript.md: [functional-programming]タグ追加を提案
55
- - technical-spec.md: [deprecated]タグ削除を提案
54
+ - typescript-rules: [functional-programming]タグ追加を提案
55
+ - technical-spec: [deprecated]タグ削除を提案
56
56
 
57
57
  ✅ typical-use改善
58
- - 3ファイルの説明をより具体的に更新
58
+ - 3スキルの説明をより具体的に更新
59
59
 
60
60
  最終結果: rule-advisor精度向上のための最適化完了
61
61
  ```
@@ -64,7 +64,7 @@ find "${RULES_DIR}" -name "*.md" -type f | sort
64
64
 
65
65
  **本質的な目的**:
66
66
  - 単なる整合性維持ではなく、rule-advisorの選択精度向上
67
- - ルール編集作業の仕上げとしてのメタデータ最適化
67
+ - スキル編集作業の仕上げとしてのメタデータ最適化
68
68
 
69
69
  **品質基準**:
70
70
  - sectionsは100%同期必須
@@ -83,23 +83,23 @@ find "${RULES_DIR}" -name "*.md" -type f | sort
83
83
 
84
84
  ## 実行タイミング
85
85
 
86
- - ルールファイル編集後(必須)
87
- - 新しいルールファイル追加時
88
- - 大規模なルール改訂後
86
+ - スキルファイル編集後(必須)
87
+ - 新しいスキルファイル追加時
88
+ - 大規模なスキル改訂後
89
89
  - rule-advisorの選択精度が低下したと感じた時
90
90
 
91
91
  ## 出力例
92
92
 
93
93
  ```
94
- === ルールメタデータ同期開始 ===
95
- 対象: docs/rules (9ファイル)
94
+ === スキルメタデータ同期開始 ===
95
+ 対象: .claude/skills (13スキル)
96
96
 
97
- [1/9] typescript.md
97
+ [1/13] typescript-rules
98
98
  ✅ sections: 7件同期完了
99
99
  💡 tags提案: +[functional-programming, dependency-injection]
100
100
  💡 typical-use: "TypeScript実装全般" → "型安全性重視の実装とモダンTypeScript機能活用"
101
101
 
102
- [2/9] typescript-testing.md
102
+ [2/13] typescript-testing
103
103
  ✅ sections: 2件追加(テストの粒度、モックの型安全性)
104
104
  ✅ tags: 変更なし
105
105
  ✅ typical-use: 現状維持
@@ -107,10 +107,10 @@ find "${RULES_DIR}" -name "*.md" -type f | sort
107
107
  ...
108
108
 
109
109
  === 同期完了 ===
110
- 更新: 3ファイル
110
+ 更新: 3スキル
111
111
  提案: 5件(承認してください)
112
112
 
113
113
  rule-advisor精度向上: 推定15%改善
114
114
  ```
115
115
 
116
- **スコープ**: ルール修正作業後のメタデータ同期とrule-advisor精度最適化。
116
+ **スコープ**: スキル修正作業後のメタデータ同期とrule-advisor精度最適化。
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: coding-standards
3
+ description: Language-agnostic coding principles for maintainability, readability, and quality. Use when implementing features, refactoring code, or reviewing code quality.
4
+ ---
5
+
1
6
  # Universal Coding Standards
2
7
 
3
8
  ## Technical Anti-patterns (Red Flag Patterns)
@@ -22,8 +27,8 @@ Immediately stop and reconsider design when detecting the following patterns:
22
27
 
23
28
  ## Basic Principles
24
29
 
25
- **Aggressive Refactoring** - Prevent technical debt and maintain health
26
- **Unused "Just in Case" Code** - Violates YAGNI principle (Kent Beck)
30
+ - **Aggressive Refactoring** - Prevent technical debt and maintain health
31
+ - **No Unused "Just in Case" Code** - Violates YAGNI principle (Kent Beck)
27
32
 
28
33
  ## Comment Writing Rules
29
34
 
@@ -63,16 +68,6 @@ How to handle duplicate code based on Martin Fowler's "Refactoring":
63
68
  - Significant readability decrease from commonalization
64
69
  - Simple helpers in test code
65
70
 
66
- ### Implementation Example
67
- ```typescript
68
- // ❌ Immediate commonalization on 1st duplication
69
- function validateUserEmail(email: string) { /* ... */ }
70
- function validateContactEmail(email: string) { /* ... */ }
71
-
72
- // ✅ Commonalize on 3rd occurrence
73
- function validateEmail(email: string, context: 'user' | 'contact' | 'admin') { /* ... */ }
74
- ```
75
-
76
71
  ## Common Failure Patterns and Avoidance Methods
77
72
 
78
73
  ### Pattern 1: Error Fix Chain
@@ -95,11 +90,6 @@ function validateEmail(email: string, context: 'user' | 'contact' | 'admin') { /
95
90
  **Cause**: Assuming "it should work according to official documentation" without prior investigation
96
91
  **Avoidance**:
97
92
  - Record certainty evaluation at the beginning of task files
98
- ```
99
- Certainty: low (Reason: no examples of MCP connection found)
100
- Exploratory implementation: true
101
- Fallback: use conventional API
102
- ```
103
93
  - For low certainty cases, create minimal verification code first
104
94
 
105
95
  ### Pattern 5: Insufficient Existing Code Investigation
@@ -107,9 +97,9 @@ function validateEmail(email: string, context: 'user' | 'contact' | 'admin') { /
107
97
  **Cause**: Insufficient understanding of existing code before implementation
108
98
  **Avoidance Methods**:
109
99
  - Before implementation, always search for similar functionality (using domain, responsibility, configuration patterns as keywords)
110
- - Similar functionality found Use that implementation (do not create new implementation)
111
- - Similar functionality is technical debt Create ADR improvement proposal before implementation
112
- - No similar functionality exists Implement new functionality following existing design philosophy
100
+ - Similar functionality found -> Use that implementation (do not create new implementation)
101
+ - Similar functionality is technical debt -> Create ADR improvement proposal before implementation
102
+ - No similar functionality exists -> Implement new functionality following existing design philosophy
113
103
  - Record all decisions and rationale in "Existing Codebase Analysis" section of Design Doc
114
104
 
115
105
  ## Debugging Techniques
@@ -122,8 +112,8 @@ function validateEmail(email: string, context: 'user' | 'contact' | 'admin') { /
122
112
  ### 2. 5 Whys - Root Cause Analysis
123
113
  ```
124
114
  Symptom: Build error
125
- Why1: Type definitions don't match Why2: Interface was updated
126
- Why3: Dependency change Why4: Package update impact
115
+ Why1: Type definitions don't match -> Why2: Interface was updated
116
+ Why3: Dependency change -> Why4: Package update impact
127
117
  Why5: Major version upgrade with breaking changes
128
118
  Root cause: Inappropriate version specification
129
119
  ```
@@ -134,16 +124,6 @@ To isolate problems, attempt reproduction with minimal code:
134
124
  - Replace external dependencies with mocks
135
125
  - Create minimal configuration that reproduces problem
136
126
 
137
- ### 4. Debug Log Output
138
- ```typescript
139
- console.log('DEBUG:', {
140
- context: 'operation-name',
141
- input: { /* relevant data */ },
142
- state: currentState,
143
- timestamp: new Date().toISOString()
144
- })
145
- ```
146
-
147
127
  ## Type Safety Fundamentals
148
128
 
149
129
  **Type Safety Principle**: Use `unknown` type with type guards. `any` type disables type checking and causes runtime errors.
@@ -151,7 +131,7 @@ console.log('DEBUG:', {
151
131
  **any Type Alternatives (Priority Order)**
152
132
  1. **unknown Type + Type Guards**: Use for validating external input
153
133
  2. **Generics**: When type flexibility is needed
154
- 3. **Union TypesIntersection Types**: Combinations of multiple types
134
+ 3. **Union Types/Intersection Types**: Combinations of multiple types
155
135
  4. **Type Assertions (Last Resort)**: Only when type is certain
156
136
 
157
137
  **Type Guard Implementation Pattern**
@@ -161,12 +141,6 @@ function isUser(value: unknown): value is User {
161
141
  }
162
142
  ```
163
143
 
164
- **Modern Type Features**
165
- - **satisfies Operator**: `const config = { port: 3000 } satisfies Config` - Preserves inference
166
- - **const Assertion**: `const ROUTES = { HOME: '/' } as const satisfies Routes` - Immutable and type-safe
167
- - **Branded Types**: `type UserId = string & { __brand: 'UserId' }` - Distinguish meaning
168
- - **Template Literal Types**: `type Endpoint = \`\${HttpMethod} \${Route}\`` - Express string patterns with types
169
-
170
144
  **Type Complexity Management**
171
145
  - Field Count: Up to 20 (split by responsibility if exceeded, external API types are exceptions)
172
146
  - Optional Ratio: Up to 30% (separate required/optional if exceeded)
@@ -181,33 +155,10 @@ function isUser(value: unknown): value is User {
181
155
  - Safe Changes: Minimize the scope of changes at once
182
156
  - Behavior Guarantee: Ensure existing behavior remains unchanged while proceeding
183
157
 
184
- **Implementation Procedure**: Understand Current State Gradual Changes Behavior Verification Final Validation
158
+ **Implementation Procedure**: Understand Current State -> Gradual Changes -> Behavior Verification -> Final Validation
185
159
 
186
160
  **Priority**: Duplicate Code Removal > Large Function Division > Complex Conditional Branch Simplification > Type Safety Improvement
187
161
 
188
- ## Situations Requiring Technical Decisions
189
-
190
- ### Timing of Abstraction
191
- - Extract patterns after writing concrete implementation 3 times
192
- - Be conscious of YAGNI, implement only currently needed features
193
- - Prioritize current simplicity over future extensibility
194
-
195
- ### Performance vs Readability
196
- - Prioritize readability unless clear bottleneck exists
197
- - Measure before optimizing (don't guess, measure)
198
- - Document reason with comments when optimizing
199
-
200
- ### Granularity of Type Definitions
201
- - Overly detailed types reduce maintainability
202
- - Design types that appropriately express domain
203
- - Use utility types to reduce duplication
204
-
205
- ## Continuous Improvement Mindset
206
-
207
- - **Humility**: Perfect code doesn't exist, welcome feedback
208
- - **Courage**: Execute necessary refactoring boldly
209
- - **Transparency**: Clearly document technical decision reasoning
210
-
211
162
  ## Implementation Completeness Assurance
212
163
 
213
164
  ### Required Procedure for Impact Analysis
@@ -225,7 +176,7 @@ Grep -n "targetData\|SetData\|UpdateData" -o content
225
176
  **Mandatory**: Read all discovered files and include necessary parts in context:
226
177
  - Caller's purpose and context
227
178
  - Dependency direction
228
- - Data flow: generation modification reference
179
+ - Data flow: generation -> modification -> reference
229
180
 
230
181
  #### 3. Identification
231
182
  Structured impact report (mandatory):
@@ -233,36 +184,23 @@ Structured impact report (mandatory):
233
184
  ## Impact Analysis
234
185
  ### Direct Impact: ClassA, ClassB (with reasons)
235
186
  ### Indirect Impact: SystemX, ComponentY (with integration paths)
236
- ### Processing Flow: Input Process1 Process2 Output
187
+ ### Processing Flow: Input -> Process1 -> Process2 -> Output
237
188
  ```
238
189
 
239
190
  **Important**: Do not stop at search; execute all 3 stages
240
191
 
241
192
  ### Unused Code Deletion Rule
242
193
 
243
- When unused code is detected Will it be used?
244
- - Yes Implement immediately (no deferral allowed)
245
- - No Delete immediately (remains in Git history)
194
+ When unused code is detected -> Will it be used?
195
+ - Yes -> Implement immediately (no deferral allowed)
196
+ - No -> Delete immediately (remains in Git history)
246
197
 
247
198
  Target: Code, documentation, configuration files
248
199
 
249
- ### Existing Code Deletion Decision Flow
250
-
251
- ```
252
- In use? No → Delete immediately (remains in Git history)
253
- Yes → Working? No → Delete + Reimplement
254
- Yes → Fix
255
- ```
256
-
257
200
  ## Red-Green-Refactor Process (Test-First Development)
258
201
 
259
202
  **Recommended Principle**: Always start code changes with tests
260
203
 
261
- **Background**:
262
- - Ensure behavior before changes, prevent regression
263
- - Clarify expected behavior before implementation
264
- - Ensure safety during refactoring
265
-
266
204
  **Development Steps**:
267
205
  1. **Red**: Write test for expected behavior (it fails)
268
206
  2. **Green**: Pass test with minimal implementation
@@ -288,11 +226,11 @@ In use? No → Delete immediately (remains in Git history)
288
226
 
289
227
  ### Mock and Stub Usage Policy
290
228
 
291
- **Recommended: Mock external dependencies in unit tests**
229
+ **Recommended: Mock external dependencies in unit tests**
292
230
  - Merit: Ensures test independence and reproducibility
293
231
  - Practice: Mock DB, API, file system, and other external dependencies
294
232
 
295
- **Avoid: Actual external connections in unit tests**
233
+ **Avoid: Actual external connections in unit tests**
296
234
  - Reason: Slows test speed and causes environment-dependent problems
297
235
 
298
236
  ### Test Failure Response Decision Criteria
@@ -301,33 +239,8 @@ In use? No → Delete immediately (remains in Git history)
301
239
  **Fix implementation**: Valid specifications, business logic, important edge cases
302
240
  **When in doubt**: Confirm with user
303
241
 
304
- ## Test Helper Utilization Rules
305
-
306
- ### Basic Principles
307
- Use test helpers to reduce duplication and improve maintainability.
308
-
309
- ### Decision Criteria
310
- | Mock Characteristics | Response Policy |
311
- |---------------------|-----------------|
312
- | **Simple and stable** | Consolidate in common helpers |
313
- | **Complex or frequently changing** | Individual implementation |
314
- | **Duplicated in 3+ places** | Consider consolidation |
315
- | **Test-specific logic** | Individual implementation |
316
-
317
242
  ## Test Granularity Principles
318
243
 
319
244
  ### Core Principle: Observable Behavior Only
320
245
  **MUST Test**: Public APIs, return values, exceptions, external calls, persisted state
321
246
  **MUST NOT Test**: Private methods, internal state, algorithm implementation details
322
-
323
- ```typescript
324
- // ✅ Test observable behavior
325
- expect(calculateTotal(100, 0.1)).toBe(110)
326
-
327
- // ❌ Test implementation details
328
- expect((calculator as any).internalState).toBe(someValue)
329
- ```
330
-
331
- ## Continuity Test Scope
332
-
333
- Limited to verifying existing feature impact when adding new features. Long-term operations and load testing are infrastructure responsibilities, not test scope.
@@ -1,13 +1,18 @@
1
+ ---
2
+ name: documentation-criteria
3
+ description: Documentation creation criteria including PRD, ADR, Design Doc, and Work Plan requirements with templates. Use when creating or reviewing technical documents.
4
+ ---
5
+
1
6
  # Documentation Creation Criteria
2
7
 
3
8
  ## Creation Decision Matrix
4
9
 
5
10
  | Condition | Required Documents | Creation Order |
6
11
  |-----------|-------------------|----------------|
7
- | New Feature Addition | PRD [ADR] Design Doc Work Plan | After PRD approval |
8
- | ADR Conditions Met (see below) | ADR Design Doc Work Plan | Start immediately |
9
- | 6+ Files | ADR Design Doc Work Plan (Required) | Start immediately |
10
- | 3-5 Files | Design Doc Work Plan (Recommended) | Start immediately |
12
+ | New Feature Addition | PRD -> [ADR] -> Design Doc -> Work Plan | After PRD approval |
13
+ | ADR Conditions Met (see below) | ADR -> Design Doc -> Work Plan | Start immediately |
14
+ | 6+ Files | ADR -> Design Doc -> Work Plan (Required) | Start immediately |
15
+ | 3-5 Files | Design Doc -> Work Plan (Recommended) | Start immediately |
11
16
  | 1-2 Files | None | Direct implementation |
12
17
 
13
18
  ## ADR Creation Conditions (Required if Any Apply)
@@ -17,14 +22,14 @@
17
22
  - Rationale: Deep nesting has high complexity and wide impact scope
18
23
  - **Changing/deleting types used in 3+ locations**
19
24
  - Rationale: Multiple location impacts require careful consideration
20
- - **Type responsibility changes** (e.g., DTOEntity)
25
+ - **Type responsibility changes** (e.g., DTO->Entity)
21
26
  - Rationale: Conceptual model changes affect design philosophy
22
27
 
23
28
  ### 2. Data Flow Changes
24
- - **Storage location changes** (DBFile, MemoryCache)
29
+ - **Storage location changes** (DB->File, Memory->Cache)
25
30
  - **Processing order changes with 3+ steps**
26
- - Example: "InputValidationSave" to "InputSaveAsync Validation"
27
- - **Data passing method changes** (propsContext, direct referenceevents)
31
+ - Example: "Input->Validation->Save" to "Input->Save->Async Validation"
32
+ - **Data passing method changes** (props->Context, direct reference->events)
28
33
 
29
34
  ### 3. Architecture Changes
30
35
  - Layer addition, responsibility changes, component relocation
@@ -52,10 +57,10 @@
52
57
  - Scope boundary diagram (required)
53
58
 
54
59
  **Excludes**:
55
- - Technical implementation details (Design Doc)
56
- - Technical selection rationale (ADR)
57
- - **Implementation phases** (Work Plan)
58
- - **Task breakdown** (Work Plan)
60
+ - Technical implementation details (->Design Doc)
61
+ - Technical selection rationale (->ADR)
62
+ - **Implementation phases** (->Work Plan)
63
+ - **Task breakdown** (->Work Plan)
59
64
 
60
65
  ### ADR (Architecture Decision Record)
61
66
 
@@ -69,10 +74,10 @@
69
74
  - Principled implementation guidelines (e.g., "Use dependency injection")
70
75
 
71
76
  **Excludes**:
72
- - Implementation schedule, duration (Work Plan)
73
- - Detailed implementation procedures (Design Doc)
74
- - Specific code examples (Design Doc)
75
- - Resource assignments (Work Plan)
77
+ - Implementation schedule, duration (->Work Plan)
78
+ - Detailed implementation procedures (->Design Doc)
79
+ - Specific code examples (->Design Doc)
80
+ - Resource assignments (->Work Plan)
76
81
 
77
82
  ### Design Document
78
83
 
@@ -94,25 +99,10 @@
94
99
  - **Agreement checklist** (agreements with stakeholders)
95
100
  - **Prerequisite ADRs** (including common ADRs)
96
101
 
97
- **Required Structural Elements**:
98
- ```yaml
99
- Change Impact Map:
100
- Change Target: [Component/Feature]
101
- Direct Impact: [Files/Functions]
102
- Indirect Impact: [Data format/Processing time]
103
- No Ripple Effect: [Unaffected features]
104
-
105
- Interface Change Matrix:
106
- Existing: [Method name]
107
- New: [Method name]
108
- Conversion Required: [Yes/No]
109
- Compatibility Method: [Approach]
110
- ```
111
-
112
102
  **Excludes**:
113
- - Why that technology was chosen (Reference ADR)
114
- - When to implement, duration (Work Plan)
115
- - Who will implement (Work Plan)
103
+ - Why that technology was chosen (->Reference ADR)
104
+ - When to implement, duration (->Work Plan)
105
+ - Who will implement (->Work Plan)
116
106
 
117
107
  ### Work Plan
118
108
 
@@ -126,8 +116,8 @@ Interface Change Matrix:
126
116
  - Progress records (checkbox format)
127
117
 
128
118
  **Excludes**:
129
- - Technical rationale (ADR)
130
- - Design details (Design Doc)
119
+ - Technical rationale (->ADR)
120
+ - Design details (->Design Doc)
131
121
 
132
122
  **Phase Division Criteria**:
133
123
  1. **Phase 1: Foundation Implementation** - Type definitions, interfaces, test preparation
@@ -151,15 +141,15 @@ Interface Change Matrix:
151
141
 
152
142
  | Document | Path | Naming Convention | Template |
153
143
  |----------|------|------------------|----------|
154
- | PRD | `docs/prd/` | `[feature-name]-prd.md` | `template-en.md` |
155
- | ADR | `docs/adr/` | `ADR-[4-digits]-[title].md` | `template-en.md` |
156
- | Design Doc | `docs/design/` | `[feature-name]-design.md` | `template-en.md` |
157
- | Work Plan | `docs/plans/` | `YYYYMMDD-{type}-{description}.md` | `template-en.md` |
144
+ | PRD | `docs/prd/` | `[feature-name]-prd.md` | See prd-template.md |
145
+ | ADR | `docs/adr/` | `ADR-[4-digits]-[title].md` | See adr-template.md |
146
+ | Design Doc | `docs/design/` | `[feature-name]-design.md` | See design-template.md |
147
+ | Work Plan | `docs/plans/` | `YYYYMMDD-{type}-{description}.md` | See plan-template.md |
158
148
 
159
149
  *Note: Work plans are excluded by `.gitignore`
160
150
 
161
151
  ## ADR Status
162
- `Proposed` `Accepted` `Deprecated`/`Superseded`/`Rejected`
152
+ `Proposed` -> `Accepted` -> `Deprecated`/`Superseded`/`Rejected`
163
153
 
164
154
  ## AI Automation Rules
165
155
  - 5+ files: Suggest ADR creation
@@ -181,4 +171,12 @@ Required diagrams for each document (using mermaid notation):
181
171
  1. **At creation**: Identify common technical areas (logging, error handling, async processing, etc.), reference existing common ADRs
182
172
  2. **When missing**: Consider creating necessary common ADRs
183
173
  3. **Design Doc**: Specify common ADRs in "Prerequisite ADRs" section
184
- 4. **Compliance check**: Verify design aligns with common ADR decisions
174
+ 4. **Compliance check**: Verify design aligns with common ADR decisions
175
+
176
+ ## Templates
177
+
178
+ Templates are available in the `references/` directory:
179
+ - [Design Document template](references/design-template.md)
180
+ - [Product Requirements Document template](references/prd-template.md)
181
+ - [Work Plan template](references/plan-template.md)
182
+ - [Architecture Decision Record template](references/adr-template.md)
@@ -61,4 +61,4 @@ Example: "Use dependency injection" ✓, "Implement in Phase 1" ✗
61
61
 
62
62
  ## Related Information
63
63
 
64
- - [Links to related ADRs, documents, issues, PRs, etc.]
64
+ - [Links to related ADRs, documents, issues, PRs, etc.]
@@ -163,20 +163,19 @@ Invariants:
163
163
  - [Conditions that remain unchanged before and after processing]
164
164
  ```
165
165
 
166
- ### State Transitions and Invariants (When Applicable)
166
+ ### State Transitions and Invariants
167
167
 
168
- ```yaml
169
- State Definition:
170
- - Initial State: [Initial values and conditions]
171
- - Possible States: [List of states]
172
-
173
- State Transitions:
174
- Current State → Event → Next State
168
+ [If the feature involves state management, describe state transitions and invariants here]
175
169
 
176
- System Invariants:
177
- - [Conditions that hold in any state]
170
+ ```
171
+ [State A] ---(event 1)---> [State B]
172
+ [State B] ---(event 2)---> [State C]
178
173
  ```
179
174
 
175
+ **Invariants**:
176
+ - [Condition that must always hold true]
177
+ - [Constraints on valid state transitions]
178
+
180
179
  ### Error Handling
181
180
 
182
181
  [Types of errors and how to handle them]
@@ -207,11 +206,7 @@ System Invariants:
207
206
  Each integration point requires E2E verification:
208
207
 
209
208
  **Integration Point 1: [Name]**
210
- - Components: [Component A] [Component B]
211
- - Verification: [How to verify integration works]
212
-
213
- **Integration Point 2: [Name]**
214
- - Components: [Component B] → [Component C]
209
+ - Components: [Component A] -> [Component B]
215
210
  - Verification: [How to verify integration works]
216
211
 
217
212
  ### Migration Strategy
@@ -220,12 +215,6 @@ Each integration point requires E2E verification:
220
215
 
221
216
  ## Test Strategy
222
217
 
223
- ### Basic Test Design Policy
224
-
225
- Automatically derive test cases from acceptance criteria:
226
- - Create at least one test case for each acceptance criterion
227
- - Implement measurable standards from acceptance criteria as assertions
228
-
229
218
  ### Unit Tests
230
219
 
231
220
  [Unit testing policy and coverage goals]
@@ -242,19 +231,10 @@ Automatically derive test cases from acceptance criteria:
242
231
  - Verify entire scenarios of acceptance criteria
243
232
  - Confirm functional operation from user perspective
244
233
 
245
- ### Performance Tests
246
-
247
- [Performance testing methods and standards]
248
- - Verify performance standards of non-functional acceptance criteria
249
-
250
234
  ## Security Considerations
251
235
 
252
236
  [Security concerns and countermeasures]
253
237
 
254
- ## Future Extensibility
255
-
256
- [Considerations for future feature additions or changes]
257
-
258
238
  ## Alternative Solutions
259
239
 
260
240
  ### Alternative 1
@@ -278,4 +258,4 @@ Automatically derive test cases from acceptance criteria:
278
258
 
279
259
  | Date | Version | Changes | Author |
280
260
  |------|---------|---------|--------|
281
- | YYYY-MM-DD | 1.0 | Initial version | [Name] |
261
+ | YYYY-MM-DD | 1.0 | Initial version | [Name] |
@@ -39,7 +39,7 @@ Related Issue/PR: #XXX (if any)
39
39
  #### Tasks
40
40
  - [ ] Task 1: Specific work content
41
41
  - [ ] Task 2: Specific work content
42
- - [ ] Quality check: Implement staged quality checks (refer to @docs/rules/technical-spec.md "Build and Testing")
42
+ - [ ] Quality check: Implement staged quality checks (refer to technical-spec skill)
43
43
  - [ ] Unit tests: All related tests pass
44
44
 
45
45
  #### Phase Completion Criteria
@@ -57,7 +57,7 @@ Related Issue/PR: #XXX (if any)
57
57
  #### Tasks
58
58
  - [ ] Task 1: Specific work content
59
59
  - [ ] Task 2: Specific work content
60
- - [ ] Quality check: Implement staged quality checks (refer to @docs/rules/technical-spec.md "Build and Testing")
60
+ - [ ] Quality check: Implement staged quality checks (refer to technical-spec skill)
61
61
  - [ ] Integration tests: Verify overall feature functionality
62
62
 
63
63
  #### Phase Completion Criteria
@@ -75,7 +75,7 @@ Related Issue/PR: #XXX (if any)
75
75
  #### Tasks
76
76
  - [ ] Task 1: Specific work content
77
77
  - [ ] Task 2: Specific work content
78
- - [ ] Quality check: Implement staged quality checks (refer to @docs/rules/technical-spec.md "Build and Testing")
78
+ - [ ] Quality check: Implement staged quality checks (refer to technical-spec skill)
79
79
  - [ ] Integration tests: Verify component coordination
80
80
 
81
81
  #### Phase Completion Criteria
@@ -99,7 +99,7 @@ Related Issue/PR: #XXX (if any)
99
99
  [Copy E2E verification procedures from Design Doc]
100
100
 
101
101
  ### Quality Assurance
102
- - [ ] Implement staged quality checks (details: refer to @docs/rules/technical-spec.md "Build and Testing")
102
+ - [ ] Implement staged quality checks (details: refer to technical-spec skill)
103
103
 
104
104
  ## Risks and Countermeasures
105
105
  | Risk | Countermeasure |
@@ -106,4 +106,4 @@ So that [expected value/benefit]
106
106
 
107
107
  ### Glossary
108
108
  - **Term 1**: [Definition]
109
- - **Term 2**: [Definition]
109
+ - **Term 2**: [Definition]