create-claude-webapp 1.0.0 → 1.0.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.
- package/.claude/agents/acceptance-test-generator.md +256 -0
- package/.claude/agents/auth-flow-designer.md +93 -0
- package/.claude/agents/code-reviewer.md +193 -0
- package/.claude/agents/code-verifier.md +194 -0
- package/.claude/agents/deployment-executor.md +90 -0
- package/.claude/agents/design-sync.md +226 -0
- package/.claude/agents/document-reviewer.md +304 -0
- package/.claude/agents/environment-validator.md +100 -0
- package/.claude/agents/integration-test-reviewer.md +196 -0
- package/.claude/agents/investigator.md +162 -0
- package/.claude/agents/prd-creator.md +220 -0
- package/.claude/agents/quality-fixer-frontend.md +323 -0
- package/.claude/agents/quality-fixer.md +280 -0
- package/.claude/agents/requirement-analyzer.md +149 -0
- package/.claude/agents/rls-policy-designer.md +86 -0
- package/.claude/agents/rule-advisor.md +123 -0
- package/.claude/agents/scope-discoverer.md +231 -0
- package/.claude/agents/solver.md +173 -0
- package/.claude/agents/supabase-migration-generator.md +85 -0
- package/.claude/agents/task-decomposer.md +246 -0
- package/.claude/agents/task-executor-frontend.md +264 -0
- package/.claude/agents/task-executor.md +261 -0
- package/.claude/agents/technical-designer-frontend.md +444 -0
- package/.claude/agents/technical-designer.md +370 -0
- package/.claude/agents/verifier.md +193 -0
- package/.claude/agents/work-planner.md +211 -0
- package/.claude/commands/add-integration-tests.md +116 -0
- package/.claude/commands/build.md +77 -0
- package/.claude/commands/db-migrate.md +96 -0
- package/.claude/commands/deploy.md +95 -0
- package/.claude/commands/design.md +75 -0
- package/.claude/commands/diagnose.md +202 -0
- package/.claude/commands/front-build.md +116 -0
- package/.claude/commands/front-design.md +61 -0
- package/.claude/commands/front-plan.md +53 -0
- package/.claude/commands/front-reverse-design.md +183 -0
- package/.claude/commands/front-review.md +89 -0
- package/.claude/commands/implement.md +80 -0
- package/.claude/commands/local-dev.md +94 -0
- package/.claude/commands/plan.md +61 -0
- package/.claude/commands/project-inject.md +76 -0
- package/.claude/commands/refine-skill.md +207 -0
- package/.claude/commands/reverse-engineer.md +301 -0
- package/.claude/commands/review.md +88 -0
- package/.claude/commands/setup-auth.md +68 -0
- package/.claude/commands/setup-supabase.md +66 -0
- package/.claude/commands/setup-vercel.md +71 -0
- package/.claude/commands/sync-skills.md +116 -0
- package/.claude/commands/task.md +13 -0
- package/.claude/skills/coding-standards/SKILL.md +246 -0
- package/.claude/skills/documentation-criteria/SKILL.md +184 -0
- package/.claude/skills/documentation-criteria/references/adr-template.md +64 -0
- package/.claude/skills/documentation-criteria/references/design-template.md +263 -0
- package/.claude/skills/documentation-criteria/references/plan-template.md +130 -0
- package/.claude/skills/documentation-criteria/references/prd-template.md +109 -0
- package/.claude/skills/documentation-criteria/references/task-template.md +38 -0
- package/.claude/skills/frontend/technical-spec/SKILL.md +147 -0
- package/.claude/skills/frontend/typescript-rules/SKILL.md +136 -0
- package/.claude/skills/frontend/typescript-testing/SKILL.md +129 -0
- package/.claude/skills/fullstack-integration/SKILL.md +466 -0
- package/.claude/skills/implementation-approach/SKILL.md +141 -0
- package/.claude/skills/integration-e2e-testing/SKILL.md +146 -0
- package/.claude/skills/interview/SKILL.md +345 -0
- package/.claude/skills/project-context/SKILL.md +53 -0
- package/.claude/skills/stack-auth/SKILL.md +519 -0
- package/.claude/skills/subagents-orchestration-guide/SKILL.md +218 -0
- package/.claude/skills/supabase/SKILL.md +289 -0
- package/.claude/skills/supabase-edge-functions/SKILL.md +386 -0
- package/.claude/skills/supabase-local/SKILL.md +328 -0
- package/.claude/skills/supabase-testing/SKILL.md +513 -0
- package/.claude/skills/task-analyzer/SKILL.md +131 -0
- package/.claude/skills/task-analyzer/references/skills-index.yaml +375 -0
- package/.claude/skills/technical-spec/SKILL.md +86 -0
- package/.claude/skills/typescript-rules/SKILL.md +121 -0
- package/.claude/skills/typescript-testing/SKILL.md +155 -0
- package/.claude/skills/vercel-deployment/SKILL.md +355 -0
- package/.claude/skills/vercel-edge/SKILL.md +407 -0
- package/README.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute tasks following appropriate rules
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Task: $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
**Pre-execution Checklist** (MUST clarify BEFORE starting):
|
|
8
|
+
|
|
9
|
+
1. **Applicable Rules**: Which development rules apply to this task?
|
|
10
|
+
2. **Initial Action**: Based on the rules, what is the FIRST step?
|
|
11
|
+
3. **Scope Boundary**: What are the completion criteria and scope of responsibility?
|
|
12
|
+
|
|
13
|
+
Proceed with the task ONLY AFTER making the above explicit.
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: coding-standards
|
|
3
|
+
description: Detects code smells, anti-patterns, and readability issues. Use when implementing features, reviewing code, or refactoring.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Universal Coding Standards
|
|
7
|
+
|
|
8
|
+
## Technical Anti-patterns (Red Flag Patterns)
|
|
9
|
+
|
|
10
|
+
Immediately stop and reconsider design when detecting the following patterns:
|
|
11
|
+
|
|
12
|
+
### Code Quality Anti-patterns
|
|
13
|
+
1. **Writing similar code 3 or more times** - Violates Rule of Three
|
|
14
|
+
2. **Multiple responsibilities mixed in a single file** - Violates Single Responsibility Principle (SRP)
|
|
15
|
+
3. **Defining same content in multiple files** - Violates DRY principle
|
|
16
|
+
4. **Making changes without checking dependencies** - Potential for unexpected impacts
|
|
17
|
+
5. **Disabling code with comments** - Should use version control
|
|
18
|
+
6. **Error suppression** - Hiding problems creates technical debt
|
|
19
|
+
7. **Excessive use of type assertions (as)** - Abandoning type safety
|
|
20
|
+
|
|
21
|
+
### Design Anti-patterns
|
|
22
|
+
- **"Make it work for now" thinking** - Accumulation of technical debt
|
|
23
|
+
- **Patchwork implementation** - Unplanned additions to existing code
|
|
24
|
+
- **Optimistic implementation of uncertain technology** - Designing unknown elements assuming "it'll probably work"
|
|
25
|
+
- **Symptomatic fixes** - Surface-level fixes that don't solve root causes
|
|
26
|
+
- **Unplanned large-scale changes** - Lack of incremental approach
|
|
27
|
+
|
|
28
|
+
## Basic Principles
|
|
29
|
+
|
|
30
|
+
- **Aggressive Refactoring** - Prevent technical debt and maintain health
|
|
31
|
+
- **No Unused "Just in Case" Code** - Violates YAGNI principle (Kent Beck)
|
|
32
|
+
|
|
33
|
+
## Comment Writing Rules
|
|
34
|
+
|
|
35
|
+
- **Function Description Focus**: Describe what the code "does"
|
|
36
|
+
- **No Historical Information**: Do not record development history
|
|
37
|
+
- **Timeless**: Write only content that remains valid whenever read
|
|
38
|
+
- **Conciseness**: Keep explanations to necessary minimum
|
|
39
|
+
|
|
40
|
+
## Error Handling Fundamentals
|
|
41
|
+
|
|
42
|
+
### Fail-Fast Principle
|
|
43
|
+
Fail quickly on errors to prevent processing continuation in invalid states. Error suppression is prohibited.
|
|
44
|
+
|
|
45
|
+
For detailed implementation methods (Result type, custom error classes, layered error handling, etc.), refer to language and framework-specific rules.
|
|
46
|
+
|
|
47
|
+
## Rule of Three - Criteria for Code Duplication
|
|
48
|
+
|
|
49
|
+
How to handle duplicate code based on Martin Fowler's "Refactoring":
|
|
50
|
+
|
|
51
|
+
| Duplication Count | Action | Reason |
|
|
52
|
+
|-------------------|--------|--------|
|
|
53
|
+
| 1st time | Inline implementation | Cannot predict future changes |
|
|
54
|
+
| 2nd time | Consider future consolidation | Pattern beginning to emerge |
|
|
55
|
+
| 3rd time | Implement commonalization | Pattern established |
|
|
56
|
+
|
|
57
|
+
### Criteria for Commonalization
|
|
58
|
+
|
|
59
|
+
**Cases for Commonalization**
|
|
60
|
+
- Business logic duplication
|
|
61
|
+
- Complex processing algorithms
|
|
62
|
+
- Areas likely requiring bulk changes
|
|
63
|
+
- Validation rules
|
|
64
|
+
|
|
65
|
+
**Cases to Avoid Commonalization**
|
|
66
|
+
- Accidental matches (coincidentally same code)
|
|
67
|
+
- Possibility of evolving in different directions
|
|
68
|
+
- Significant readability decrease from commonalization
|
|
69
|
+
- Simple helpers in test code
|
|
70
|
+
|
|
71
|
+
## Common Failure Patterns and Avoidance Methods
|
|
72
|
+
|
|
73
|
+
### Pattern 1: Error Fix Chain
|
|
74
|
+
**Symptom**: Fixing one error causes new errors
|
|
75
|
+
**Cause**: Surface-level fixes without understanding root cause
|
|
76
|
+
**Avoidance**: Identify root cause with 5 Whys before fixing
|
|
77
|
+
|
|
78
|
+
### Pattern 2: Abandoning Type Safety
|
|
79
|
+
**Symptom**: Excessive use of any type or as
|
|
80
|
+
**Cause**: Impulse to avoid type errors
|
|
81
|
+
**Avoidance**: Handle safely with unknown type and type guards
|
|
82
|
+
|
|
83
|
+
### Pattern 3: Implementation Without Sufficient Testing
|
|
84
|
+
**Symptom**: Many bugs after implementation
|
|
85
|
+
**Cause**: Ignoring Red-Green-Refactor process
|
|
86
|
+
**Avoidance**: Always start with failing tests
|
|
87
|
+
|
|
88
|
+
### Pattern 4: Ignoring Technical Uncertainty
|
|
89
|
+
**Symptom**: Frequent unexpected errors when introducing new technology
|
|
90
|
+
**Cause**: Assuming "it should work according to official documentation" without prior investigation
|
|
91
|
+
**Avoidance**:
|
|
92
|
+
- Record certainty evaluation at the beginning of task files
|
|
93
|
+
- For low certainty cases, create minimal verification code first
|
|
94
|
+
|
|
95
|
+
### Pattern 5: Insufficient Existing Code Investigation
|
|
96
|
+
**Symptom**: Duplicate implementations, architecture inconsistency, integration failures
|
|
97
|
+
**Cause**: Insufficient understanding of existing code before implementation
|
|
98
|
+
**Avoidance Methods**:
|
|
99
|
+
- Before implementation, always search for similar functionality (using domain, responsibility, configuration patterns as keywords)
|
|
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
|
|
103
|
+
- Record all decisions and rationale in "Existing Codebase Analysis" section of Design Doc
|
|
104
|
+
|
|
105
|
+
## Debugging Techniques
|
|
106
|
+
|
|
107
|
+
### 1. Error Analysis Procedure
|
|
108
|
+
1. Read error message (first line) accurately
|
|
109
|
+
2. Focus on first and last of stack trace
|
|
110
|
+
3. Identify first line where your code appears
|
|
111
|
+
|
|
112
|
+
### 2. 5 Whys - Root Cause Analysis
|
|
113
|
+
```
|
|
114
|
+
Symptom: Build error
|
|
115
|
+
Why1: Type definitions don't match -> Why2: Interface was updated
|
|
116
|
+
Why3: Dependency change -> Why4: Package update impact
|
|
117
|
+
Why5: Major version upgrade with breaking changes
|
|
118
|
+
Root cause: Inappropriate version specification
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 3. Minimal Reproduction Code
|
|
122
|
+
To isolate problems, attempt reproduction with minimal code:
|
|
123
|
+
- Remove unrelated parts
|
|
124
|
+
- Replace external dependencies with mocks
|
|
125
|
+
- Create minimal configuration that reproduces problem
|
|
126
|
+
|
|
127
|
+
## Type Safety Fundamentals
|
|
128
|
+
|
|
129
|
+
**Type Safety Principle**: Use `unknown` type with type guards. `any` type disables type checking and causes runtime errors.
|
|
130
|
+
|
|
131
|
+
**any Type Alternatives (Priority Order)**
|
|
132
|
+
1. **unknown Type + Type Guards**: Use for validating external input
|
|
133
|
+
2. **Generics**: When type flexibility is needed
|
|
134
|
+
3. **Union Types/Intersection Types**: Combinations of multiple types
|
|
135
|
+
4. **Type Assertions (Last Resort)**: Only when type is certain
|
|
136
|
+
|
|
137
|
+
**Type Guard Implementation Pattern**
|
|
138
|
+
```typescript
|
|
139
|
+
function isUser(value: unknown): value is User {
|
|
140
|
+
return typeof value === 'object' && value !== null && 'id' in value && 'name' in value
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Type Complexity Management**
|
|
145
|
+
- Field Count: Up to 20 (split by responsibility if exceeded, external API types are exceptions)
|
|
146
|
+
- Optional Ratio: Up to 30% (separate required/optional if exceeded)
|
|
147
|
+
- Nesting Depth: Up to 3 levels (flatten if exceeded)
|
|
148
|
+
- Type Assertions: Review design if used 3+ times
|
|
149
|
+
- **External API Types**: Relax constraints and define according to reality (convert appropriately internally)
|
|
150
|
+
|
|
151
|
+
## Refactoring Techniques
|
|
152
|
+
|
|
153
|
+
**Basic Policy**
|
|
154
|
+
- Small Steps: Maintain always-working state through gradual improvements
|
|
155
|
+
- Safe Changes: Minimize the scope of changes at once
|
|
156
|
+
- Behavior Guarantee: Ensure existing behavior remains unchanged while proceeding
|
|
157
|
+
|
|
158
|
+
**Implementation Procedure**: Understand Current State -> Gradual Changes -> Behavior Verification -> Final Validation
|
|
159
|
+
|
|
160
|
+
**Priority**: Duplicate Code Removal > Large Function Division > Complex Conditional Branch Simplification > Type Safety Improvement
|
|
161
|
+
|
|
162
|
+
## Implementation Completeness Assurance
|
|
163
|
+
|
|
164
|
+
### Required Procedure for Impact Analysis
|
|
165
|
+
|
|
166
|
+
**Completion Criteria**: Complete all 3 stages
|
|
167
|
+
|
|
168
|
+
#### 1. Discovery
|
|
169
|
+
```bash
|
|
170
|
+
Grep -n "TargetClass\|TargetMethod" -o content
|
|
171
|
+
Grep -n "DependencyClass" -o content
|
|
172
|
+
Grep -n "targetData\|SetData\|UpdateData" -o content
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
#### 2. Understanding
|
|
176
|
+
**Mandatory**: Read all discovered files and include necessary parts in context:
|
|
177
|
+
- Caller's purpose and context
|
|
178
|
+
- Dependency direction
|
|
179
|
+
- Data flow: generation -> modification -> reference
|
|
180
|
+
|
|
181
|
+
#### 3. Identification
|
|
182
|
+
Structured impact report (mandatory):
|
|
183
|
+
```
|
|
184
|
+
## Impact Analysis
|
|
185
|
+
### Direct Impact: ClassA, ClassB (with reasons)
|
|
186
|
+
### Indirect Impact: SystemX, ComponentY (with integration paths)
|
|
187
|
+
### Processing Flow: Input -> Process1 -> Process2 -> Output
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Important**: Do not stop at search; execute all 3 stages
|
|
191
|
+
|
|
192
|
+
### Unused Code Deletion Rule
|
|
193
|
+
|
|
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)
|
|
197
|
+
|
|
198
|
+
Target: Code, documentation, configuration files
|
|
199
|
+
|
|
200
|
+
## Red-Green-Refactor Process (Test-First Development)
|
|
201
|
+
|
|
202
|
+
**Recommended Principle**: Always start code changes with tests
|
|
203
|
+
|
|
204
|
+
**Development Steps**:
|
|
205
|
+
1. **Red**: Write test for expected behavior (it fails)
|
|
206
|
+
2. **Green**: Pass test with minimal implementation
|
|
207
|
+
3. **Refactor**: Improve code while maintaining passing tests
|
|
208
|
+
|
|
209
|
+
**NG Cases (Test-first not required)**:
|
|
210
|
+
- Pure configuration file changes (.env, config, etc.)
|
|
211
|
+
- Documentation-only updates (README, comments, etc.)
|
|
212
|
+
- Emergency production incident response (post-incident tests mandatory)
|
|
213
|
+
|
|
214
|
+
## Test Design Principles
|
|
215
|
+
|
|
216
|
+
### Test Case Structure
|
|
217
|
+
- Tests consist of three stages: "Arrange," "Act," "Assert"
|
|
218
|
+
- Clear naming that shows purpose of each test
|
|
219
|
+
- One test case verifies only one behavior
|
|
220
|
+
|
|
221
|
+
### Test Data Management
|
|
222
|
+
- Manage test data in dedicated directories
|
|
223
|
+
- Define test-specific environment variable values
|
|
224
|
+
- Always mock sensitive information
|
|
225
|
+
- Keep test data minimal, using only data directly related to test case verification purposes
|
|
226
|
+
|
|
227
|
+
### Mock and Stub Usage Policy
|
|
228
|
+
|
|
229
|
+
**Recommended: Mock external dependencies in unit tests**
|
|
230
|
+
- Merit: Ensures test independence and reproducibility
|
|
231
|
+
- Practice: Mock DB, API, file system, and other external dependencies
|
|
232
|
+
|
|
233
|
+
**Avoid: Actual external connections in unit tests**
|
|
234
|
+
- Reason: Slows test speed and causes environment-dependent problems
|
|
235
|
+
|
|
236
|
+
### Test Failure Response Decision Criteria
|
|
237
|
+
|
|
238
|
+
**Fix tests**: Wrong expected values, references to non-existent features, dependence on implementation details, implementation only for tests
|
|
239
|
+
**Fix implementation**: Valid specifications, business logic, important edge cases
|
|
240
|
+
**When in doubt**: Confirm with user
|
|
241
|
+
|
|
242
|
+
## Test Granularity Principles
|
|
243
|
+
|
|
244
|
+
### Core Principle: Observable Behavior Only
|
|
245
|
+
**MUST Test**: Public APIs, return values, exceptions, external calls, persisted state
|
|
246
|
+
**MUST NOT Test**: Private methods, internal state, algorithm implementation details
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: documentation-criteria
|
|
3
|
+
description: Guides PRD, ADR, Design Doc, and Work Plan creation with templates and decision matrix.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Documentation Creation Criteria
|
|
7
|
+
|
|
8
|
+
## Creation Decision Matrix
|
|
9
|
+
|
|
10
|
+
| Condition | Required Documents | Creation Order |
|
|
11
|
+
|-----------|-------------------|----------------|
|
|
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 |
|
|
16
|
+
| 1-2 Files | None | Direct implementation |
|
|
17
|
+
|
|
18
|
+
## ADR Creation Conditions (Required if Any Apply)
|
|
19
|
+
|
|
20
|
+
### 1. Type System Changes
|
|
21
|
+
- **Adding nested types with 3+ levels**: `type A = { b: { c: { d: T } } }`
|
|
22
|
+
- Rationale: Deep nesting has high complexity and wide impact scope
|
|
23
|
+
- **Changing/deleting types used in 3+ locations**
|
|
24
|
+
- Rationale: Multiple location impacts require careful consideration
|
|
25
|
+
- **Type responsibility changes** (e.g., DTO->Entity)
|
|
26
|
+
- Rationale: Conceptual model changes affect design philosophy
|
|
27
|
+
|
|
28
|
+
### 2. Data Flow Changes
|
|
29
|
+
- **Storage location changes** (DB->File, Memory->Cache)
|
|
30
|
+
- **Processing order changes with 3+ steps**
|
|
31
|
+
- Example: "Input->Validation->Save" to "Input->Save->Async Validation"
|
|
32
|
+
- **Data passing method changes** (props->Context, direct reference->events)
|
|
33
|
+
|
|
34
|
+
### 3. Architecture Changes
|
|
35
|
+
- Layer addition, responsibility changes, component relocation
|
|
36
|
+
|
|
37
|
+
### 4. External Dependency Changes
|
|
38
|
+
- Library/framework/external API introduction or replacement
|
|
39
|
+
|
|
40
|
+
### 5. Complex Implementation Logic (Regardless of Scale)
|
|
41
|
+
- Managing 3+ states
|
|
42
|
+
- Coordinating 5+ asynchronous processes
|
|
43
|
+
|
|
44
|
+
## Detailed Document Definitions
|
|
45
|
+
|
|
46
|
+
### PRD (Product Requirements Document)
|
|
47
|
+
|
|
48
|
+
**Purpose**: Define business requirements and user value
|
|
49
|
+
|
|
50
|
+
**Includes**:
|
|
51
|
+
- Business requirements and user value
|
|
52
|
+
- Success metrics and KPIs (measurable format)
|
|
53
|
+
- User stories and use cases
|
|
54
|
+
- MoSCoW prioritization (Must/Should/Could/Won't)
|
|
55
|
+
- MVP and Future phase separation
|
|
56
|
+
- User journey diagram (required)
|
|
57
|
+
- Scope boundary diagram (required)
|
|
58
|
+
|
|
59
|
+
**Excludes**:
|
|
60
|
+
- Technical implementation details (->Design Doc)
|
|
61
|
+
- Technical selection rationale (->ADR)
|
|
62
|
+
- **Implementation phases** (->Work Plan)
|
|
63
|
+
- **Task breakdown** (->Work Plan)
|
|
64
|
+
|
|
65
|
+
### ADR (Architecture Decision Record)
|
|
66
|
+
|
|
67
|
+
**Purpose**: Record technical decision rationale and background
|
|
68
|
+
|
|
69
|
+
**Includes**:
|
|
70
|
+
- Decision (what was selected)
|
|
71
|
+
- Rationale (why that selection was made)
|
|
72
|
+
- Option comparison (minimum 3 options) and trade-offs
|
|
73
|
+
- Architecture impact
|
|
74
|
+
- Principled implementation guidelines (e.g., "Use dependency injection")
|
|
75
|
+
|
|
76
|
+
**Excludes**:
|
|
77
|
+
- Implementation schedule, duration (->Work Plan)
|
|
78
|
+
- Detailed implementation procedures (->Design Doc)
|
|
79
|
+
- Specific code examples (->Design Doc)
|
|
80
|
+
- Resource assignments (->Work Plan)
|
|
81
|
+
|
|
82
|
+
### Design Document
|
|
83
|
+
|
|
84
|
+
**Purpose**: Define technical implementation methods in detail
|
|
85
|
+
|
|
86
|
+
**Includes**:
|
|
87
|
+
- **Existing codebase analysis** (required)
|
|
88
|
+
- Implementation path mapping (both existing and new)
|
|
89
|
+
- Integration point clarification (connection points with existing code even for new implementations)
|
|
90
|
+
- Technical implementation approach (vertical/horizontal/hybrid)
|
|
91
|
+
- **Technical dependencies and implementation constraints** (required implementation order)
|
|
92
|
+
- Interface and type definitions
|
|
93
|
+
- Data flow and component design
|
|
94
|
+
- **E2E verification procedures at integration points**
|
|
95
|
+
- **Acceptance criteria (EARS format: When/While/If-then/none)**
|
|
96
|
+
- Change impact map (clearly specify direct impact/indirect impact/no ripple effect)
|
|
97
|
+
- Complete enumeration of integration points
|
|
98
|
+
- Data contract clarification
|
|
99
|
+
- **Agreement checklist** (agreements with stakeholders)
|
|
100
|
+
- **Prerequisite ADRs** (including common ADRs)
|
|
101
|
+
|
|
102
|
+
**Excludes**:
|
|
103
|
+
- Why that technology was chosen (->Reference ADR)
|
|
104
|
+
- When to implement, duration (->Work Plan)
|
|
105
|
+
- Who will implement (->Work Plan)
|
|
106
|
+
|
|
107
|
+
### Work Plan
|
|
108
|
+
|
|
109
|
+
**Purpose**: Implementation task management and progress tracking
|
|
110
|
+
|
|
111
|
+
**Includes**:
|
|
112
|
+
- Task breakdown and dependencies (maximum 2 levels)
|
|
113
|
+
- Schedule and duration estimates
|
|
114
|
+
- **Copy E2E verification procedures from Design Doc** (cannot delete, can add)
|
|
115
|
+
- **Phase 4 Quality Assurance Phase (required)**
|
|
116
|
+
- Progress records (checkbox format)
|
|
117
|
+
|
|
118
|
+
**Excludes**:
|
|
119
|
+
- Technical rationale (->ADR)
|
|
120
|
+
- Design details (->Design Doc)
|
|
121
|
+
|
|
122
|
+
**Phase Division Criteria**:
|
|
123
|
+
1. **Phase 1: Foundation Implementation** - Type definitions, interfaces, test preparation
|
|
124
|
+
2. **Phase 2: Core Feature Implementation** - Business logic, unit tests
|
|
125
|
+
3. **Phase 3: Integration Implementation** - External connections, presentation layer
|
|
126
|
+
4. **Phase 4: Quality Assurance (Required)** - Acceptance criteria achievement, all tests passing, quality checks
|
|
127
|
+
|
|
128
|
+
**Three Elements of Task Completion Definition**:
|
|
129
|
+
1. **Implementation Complete**: Code is functional
|
|
130
|
+
2. **Quality Complete**: Tests, type checks, linting pass
|
|
131
|
+
3. **Integration Complete**: Verified connection with other components
|
|
132
|
+
|
|
133
|
+
## Creation Process
|
|
134
|
+
|
|
135
|
+
1. **Problem Analysis**: Change scale assessment, ADR condition check
|
|
136
|
+
2. **ADR Option Consideration** (ADR only): Compare 3+ options, specify trade-offs
|
|
137
|
+
3. **Creation**: Use templates, include measurable conditions
|
|
138
|
+
4. **Approval**: "Accepted" after review enables implementation
|
|
139
|
+
|
|
140
|
+
## Storage Locations
|
|
141
|
+
|
|
142
|
+
| Document | Path | Naming Convention | Template |
|
|
143
|
+
|----------|------|------------------|----------|
|
|
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 |
|
|
148
|
+
| Task File | `docs/plans/tasks/` | `{plan-name}-task-{number}.md` | See task-template.md |
|
|
149
|
+
|
|
150
|
+
*Note: Work plans are excluded by `.gitignore`
|
|
151
|
+
|
|
152
|
+
## ADR Status
|
|
153
|
+
`Proposed` -> `Accepted` -> `Deprecated`/`Superseded`/`Rejected`
|
|
154
|
+
|
|
155
|
+
## AI Automation Rules
|
|
156
|
+
- 5+ files: Suggest ADR creation
|
|
157
|
+
- Type/data flow change detected: ADR mandatory
|
|
158
|
+
- Check existing ADRs before implementation
|
|
159
|
+
|
|
160
|
+
## Diagram Requirements
|
|
161
|
+
|
|
162
|
+
Required diagrams for each document (using mermaid notation):
|
|
163
|
+
|
|
164
|
+
| Document | Required Diagrams | Purpose |
|
|
165
|
+
|----------|------------------|---------|
|
|
166
|
+
| PRD | User journey diagram, Scope boundary diagram | Clarify user experience and scope |
|
|
167
|
+
| ADR | Option comparison diagram (when needed) | Visualize trade-offs |
|
|
168
|
+
| Design Doc | Architecture diagram, Data flow diagram | Understand technical structure |
|
|
169
|
+
| Work Plan | Phase structure diagram, Task dependency diagram | Clarify implementation order |
|
|
170
|
+
|
|
171
|
+
## Common ADR Relationships
|
|
172
|
+
1. **At creation**: Identify common technical areas (logging, error handling, async processing, etc.), reference existing common ADRs
|
|
173
|
+
2. **When missing**: Consider creating necessary common ADRs
|
|
174
|
+
3. **Design Doc**: Specify common ADRs in "Prerequisite ADRs" section
|
|
175
|
+
4. **Compliance check**: Verify design aligns with common ADR decisions
|
|
176
|
+
|
|
177
|
+
## Templates
|
|
178
|
+
|
|
179
|
+
Templates are available in the `references/` directory:
|
|
180
|
+
- [Design Document template](references/design-template.md)
|
|
181
|
+
- [Product Requirements Document template](references/prd-template.md)
|
|
182
|
+
- [Work Plan template](references/plan-template.md)
|
|
183
|
+
- [Architecture Decision Record template](references/adr-template.md)
|
|
184
|
+
- [Task File template](references/task-template.md)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# [ADR Number] [Title]
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
[Proposed | Accepted | Deprecated | Superseded]
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
[Describe the background and reasons why this decision is needed. Include the essence of the problem, current challenges, and constraints]
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
|
|
13
|
+
[Describe the actual decision made. Aim for specific and clear descriptions]
|
|
14
|
+
|
|
15
|
+
### Decision Details
|
|
16
|
+
|
|
17
|
+
| Item | Content |
|
|
18
|
+
|------|---------|
|
|
19
|
+
| **Decision** | [The decision in one sentence] |
|
|
20
|
+
| **Why now** | [Why this needs to happen now (timing rationale)] |
|
|
21
|
+
| **Why this** | [Why this option over alternatives (1-3 lines)] |
|
|
22
|
+
| **Known unknowns** | [At least one uncertainty at this point] |
|
|
23
|
+
| **Kill criteria** | [One signal that should trigger reversal of this decision] |
|
|
24
|
+
|
|
25
|
+
## Rationale
|
|
26
|
+
|
|
27
|
+
[Explain why this decision was made and why it is the best option compared to alternatives]
|
|
28
|
+
|
|
29
|
+
### Options Considered
|
|
30
|
+
|
|
31
|
+
1. **Option 1**: [Description]
|
|
32
|
+
- Pros: [List advantages]
|
|
33
|
+
- Cons: [List disadvantages]
|
|
34
|
+
|
|
35
|
+
2. **Option 2**: [Description]
|
|
36
|
+
- Pros: [List advantages]
|
|
37
|
+
- Cons: [List disadvantages]
|
|
38
|
+
|
|
39
|
+
3. **Option 3 (Selected)**: [Description]
|
|
40
|
+
- Pros: [List advantages]
|
|
41
|
+
- Cons: [List disadvantages]
|
|
42
|
+
|
|
43
|
+
## Consequences
|
|
44
|
+
|
|
45
|
+
### Positive Consequences
|
|
46
|
+
|
|
47
|
+
- [List positive impacts on the project or system]
|
|
48
|
+
|
|
49
|
+
### Negative Consequences
|
|
50
|
+
|
|
51
|
+
- [List negative impacts or trade-offs that need to be accepted]
|
|
52
|
+
|
|
53
|
+
### Neutral Consequences
|
|
54
|
+
|
|
55
|
+
- [List changes that are neither good nor bad]
|
|
56
|
+
|
|
57
|
+
## Implementation Guidance
|
|
58
|
+
|
|
59
|
+
[Principled direction only. Implementation procedures go to Design Doc]
|
|
60
|
+
Example: "Use dependency injection" ✓, "Implement in Phase 1" ✗
|
|
61
|
+
|
|
62
|
+
## Related Information
|
|
63
|
+
|
|
64
|
+
- [Links to related ADRs, documents, issues, PRs, etc.]
|