codex-workflows 0.1.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/.agents/skills/ai-development-guide/SKILL.md +283 -0
- package/.agents/skills/ai-development-guide/agents/openai.yaml +7 -0
- package/.agents/skills/ai-development-guide/references/frontend.md +135 -0
- package/.agents/skills/coding-rules/SKILL.md +98 -0
- package/.agents/skills/coding-rules/agents/openai.yaml +7 -0
- package/.agents/skills/coding-rules/references/typescript.md +220 -0
- package/.agents/skills/documentation-criteria/SKILL.md +127 -0
- package/.agents/skills/documentation-criteria/agents/openai.yaml +7 -0
- package/.agents/skills/documentation-criteria/references/adr-template.md +64 -0
- package/.agents/skills/documentation-criteria/references/design-template.md +327 -0
- package/.agents/skills/documentation-criteria/references/plan-template.md +131 -0
- package/.agents/skills/documentation-criteria/references/prd-template.md +119 -0
- package/.agents/skills/documentation-criteria/references/task-template.md +38 -0
- package/.agents/skills/documentation-criteria/references/ui-spec-template.md +145 -0
- package/.agents/skills/implementation-approach/SKILL.md +145 -0
- package/.agents/skills/implementation-approach/agents/openai.yaml +7 -0
- package/.agents/skills/integration-e2e-testing/SKILL.md +125 -0
- package/.agents/skills/integration-e2e-testing/agents/openai.yaml +7 -0
- package/.agents/skills/integration-e2e-testing/references/e2e-design.md +86 -0
- package/.agents/skills/recipe-add-integration-tests/SKILL.md +128 -0
- package/.agents/skills/recipe-add-integration-tests/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-build/SKILL.md +119 -0
- package/.agents/skills/recipe-build/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-design/SKILL.md +90 -0
- package/.agents/skills/recipe-design/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-diagnose/SKILL.md +187 -0
- package/.agents/skills/recipe-diagnose/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-front-build/SKILL.md +127 -0
- package/.agents/skills/recipe-front-build/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-front-design/SKILL.md +90 -0
- package/.agents/skills/recipe-front-design/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-front-plan/SKILL.md +68 -0
- package/.agents/skills/recipe-front-plan/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-front-review/SKILL.md +101 -0
- package/.agents/skills/recipe-front-review/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-fullstack-build/SKILL.md +139 -0
- package/.agents/skills/recipe-fullstack-build/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-fullstack-implement/SKILL.md +151 -0
- package/.agents/skills/recipe-fullstack-implement/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-implement/SKILL.md +125 -0
- package/.agents/skills/recipe-implement/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-plan/SKILL.md +73 -0
- package/.agents/skills/recipe-plan/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-reverse-engineer/SKILL.md +212 -0
- package/.agents/skills/recipe-reverse-engineer/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-review/SKILL.md +115 -0
- package/.agents/skills/recipe-review/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-task/SKILL.md +74 -0
- package/.agents/skills/recipe-task/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-update-doc/SKILL.md +156 -0
- package/.agents/skills/recipe-update-doc/agents/openai.yaml +7 -0
- package/.agents/skills/subagents-orchestration-guide/SKILL.md +354 -0
- package/.agents/skills/subagents-orchestration-guide/agents/openai.yaml +7 -0
- package/.agents/skills/subagents-orchestration-guide/references/monorepo-flow.md +124 -0
- package/.agents/skills/task-analyzer/SKILL.md +142 -0
- package/.agents/skills/task-analyzer/agents/openai.yaml +7 -0
- package/.agents/skills/task-analyzer/references/skills-index.yaml +162 -0
- package/.agents/skills/testing/SKILL.md +324 -0
- package/.agents/skills/testing/agents/openai.yaml +7 -0
- package/.agents/skills/testing/references/typescript.md +224 -0
- package/.codex/agents/acceptance-test-generator.toml +310 -0
- package/.codex/agents/code-reviewer.toml +228 -0
- package/.codex/agents/code-verifier.toml +231 -0
- package/.codex/agents/design-sync.toml +265 -0
- package/.codex/agents/document-reviewer.toml +367 -0
- package/.codex/agents/integration-test-reviewer.toml +178 -0
- package/.codex/agents/investigator.toml +197 -0
- package/.codex/agents/prd-creator.toml +250 -0
- package/.codex/agents/quality-fixer-frontend.toml +356 -0
- package/.codex/agents/quality-fixer.toml +249 -0
- package/.codex/agents/requirement-analyzer.toml +172 -0
- package/.codex/agents/rule-advisor.toml +186 -0
- package/.codex/agents/scope-discoverer.toml +248 -0
- package/.codex/agents/solver.toml +212 -0
- package/.codex/agents/task-decomposer.toml +262 -0
- package/.codex/agents/task-executor-frontend.toml +312 -0
- package/.codex/agents/task-executor.toml +314 -0
- package/.codex/agents/technical-designer-frontend.toml +492 -0
- package/.codex/agents/technical-designer.toml +474 -0
- package/.codex/agents/ui-spec-designer.toml +150 -0
- package/.codex/agents/verifier.toml +228 -0
- package/.codex/agents/work-planner.toml +251 -0
- package/README.md +365 -0
- package/bin/cli.js +249 -0
- package/package.json +35 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# TypeScript Development Rules (Frontend)
|
|
2
|
+
|
|
3
|
+
## Basic Principles
|
|
4
|
+
|
|
5
|
+
- **Aggressive Refactoring** - Prevent technical debt and maintain health
|
|
6
|
+
- **No Unused "Just in Case" Code** - Violates YAGNI principle (Kent Beck)
|
|
7
|
+
|
|
8
|
+
## Comment Writing Rules
|
|
9
|
+
- **Function Description Focus**: Describe what the code "does"
|
|
10
|
+
- **No Historical Information**: Do not record development history
|
|
11
|
+
- **Timeless**: Write only content that remains valid whenever read
|
|
12
|
+
- **Conciseness**: Keep explanations to necessary minimum
|
|
13
|
+
|
|
14
|
+
## Type Safety
|
|
15
|
+
|
|
16
|
+
**Absolute Rule**: any type is completely prohibited. It disables type checking and becomes a source of runtime errors.
|
|
17
|
+
|
|
18
|
+
**any Type Alternatives (Priority Order)**
|
|
19
|
+
1. **unknown Type + Type Guards**: Use for validating external input (API responses, localStorage, URL parameters)
|
|
20
|
+
2. **Generics**: When type flexibility is needed
|
|
21
|
+
3. **Union Types / Intersection Types**: Combinations of multiple types
|
|
22
|
+
4. **Type Assertions (Last Resort)**: Only when type is certain
|
|
23
|
+
|
|
24
|
+
**Type Guard Implementation Pattern**
|
|
25
|
+
```typescript
|
|
26
|
+
function isUser(value: unknown): value is User {
|
|
27
|
+
return typeof value === 'object' && value !== null && 'id' in value && 'name' in value
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Modern Type Features**
|
|
32
|
+
- **satisfies Operator**: `const config = { apiUrl: '/api' } satisfies Config` - Preserves inference
|
|
33
|
+
- **const Assertion**: `const ROUTES = { HOME: '/' } as const satisfies Routes` - Immutable and type-safe
|
|
34
|
+
- **Branded Types**: `type UserId = string & { __brand: 'UserId' }` - Distinguish meaning
|
|
35
|
+
- **Template Literal Types**: `type EventName = \`on\${Capitalize<string>}\`` - Express string patterns with types
|
|
36
|
+
|
|
37
|
+
**Type Safety in Frontend Implementation**
|
|
38
|
+
- **React Props/State**: TypeScript manages types, unknown unnecessary
|
|
39
|
+
- **External API Responses**: Always receive as `unknown`, validate with type guards
|
|
40
|
+
- **localStorage/sessionStorage**: Treat as `unknown`, validate
|
|
41
|
+
- **URL Parameters**: Treat as `unknown`, validate
|
|
42
|
+
- **Form Input (Controlled Components)**: Type-safe with React synthetic events
|
|
43
|
+
|
|
44
|
+
**Type Safety in Data Flow**
|
|
45
|
+
- **Frontend to Backend**: Props/State (Type Guaranteed) to API Request (Serialization)
|
|
46
|
+
- **Backend to Frontend**: API Response (`unknown`) to Type Guard to State (Type Guaranteed)
|
|
47
|
+
|
|
48
|
+
**Type Complexity Management**
|
|
49
|
+
- **Props Design**:
|
|
50
|
+
- Props count: 3-7 props ideal (consider component splitting if exceeds 10)
|
|
51
|
+
- Optional Props: 50% or less (consider default values or Context if excessive)
|
|
52
|
+
- Nesting: Up to 2 levels (flatten deeper structures)
|
|
53
|
+
- Type Assertions: Review design if used 3+ times
|
|
54
|
+
- **External API Types**: Relax constraints and define according to reality (convert appropriately internally)
|
|
55
|
+
|
|
56
|
+
## Coding Conventions
|
|
57
|
+
|
|
58
|
+
**Component Design Criteria**
|
|
59
|
+
- **Function Components (Mandatory)**: Official React recommendation, optimizable by modern tooling
|
|
60
|
+
- **Classes Prohibited**: Class components completely deprecated (Exception: Error Boundary)
|
|
61
|
+
- **Custom Hooks**: Standard pattern for logic reuse and dependency injection
|
|
62
|
+
- **Component Hierarchy**: Atoms > Molecules > Organisms > Templates > Pages
|
|
63
|
+
- **Co-location**: Place tests, styles, and related files alongside components
|
|
64
|
+
|
|
65
|
+
**State Management Patterns**
|
|
66
|
+
- **Local State**: `useState` for component-specific state
|
|
67
|
+
- **Context API**: For sharing state across component tree (theme, auth, etc.)
|
|
68
|
+
- **Custom Hooks**: Encapsulate state logic and side effects
|
|
69
|
+
- **Server State**: React Query or SWR for API data caching
|
|
70
|
+
|
|
71
|
+
**Data Flow Principles**
|
|
72
|
+
- **Single Source of Truth**: Each piece of state has one authoritative source
|
|
73
|
+
- **Unidirectional Flow**: Data flows top-down via props
|
|
74
|
+
- **Immutable Updates**: Use immutable patterns for state updates
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
// Good: Immutable state update
|
|
78
|
+
setUsers(prev => [...prev, newUser])
|
|
79
|
+
|
|
80
|
+
// Bad: Mutable state update
|
|
81
|
+
users.push(newUser)
|
|
82
|
+
setUsers(users)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Function Design**
|
|
86
|
+
- **0-2 parameters maximum**: Use object for 3+ parameters
|
|
87
|
+
```typescript
|
|
88
|
+
// Object parameter
|
|
89
|
+
function createUser({ name, email, role }: CreateUserParams) {}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Props Design (Props-driven Approach)**
|
|
93
|
+
- Props are the interface: Define all necessary information as props
|
|
94
|
+
- Avoid implicit dependencies: Do not depend on global state or context without necessity
|
|
95
|
+
- Type-safe: Always define Props type explicitly
|
|
96
|
+
|
|
97
|
+
**Environment Variables**
|
|
98
|
+
- **Use build tool's environment variable system**: `process.env` does not work in browsers
|
|
99
|
+
- Centrally manage environment variables through configuration layer
|
|
100
|
+
- Implement proper type safety and default value handling
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
// Build tool environment variables (public values only)
|
|
104
|
+
const config = {
|
|
105
|
+
apiUrl: import.meta.env.API_URL || 'http://localhost:3000',
|
|
106
|
+
appName: import.meta.env.APP_NAME || 'My App'
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Does not work in frontend
|
|
110
|
+
// const apiUrl = process.env.API_URL
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Security (Client-side Constraints)**
|
|
114
|
+
- **CRITICAL**: All frontend code is public and visible in browser
|
|
115
|
+
- **Never store secrets client-side**: No API keys, tokens, or secrets in environment variables
|
|
116
|
+
- Do not include `.env` files in Git
|
|
117
|
+
- Do not include sensitive information in error messages
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
// Bad: API key exposed in browser
|
|
121
|
+
// const apiKey = import.meta.env.API_KEY
|
|
122
|
+
// const response = await fetch(`https://api.example.com/data?key=${apiKey}`)
|
|
123
|
+
|
|
124
|
+
// Good: Backend manages secrets, frontend accesses via proxy
|
|
125
|
+
const response = await fetch('/api/data') // Backend handles API key authentication
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Dependency Injection**
|
|
129
|
+
- **Custom Hooks for dependency injection**: Ensure testability and modularity
|
|
130
|
+
|
|
131
|
+
**Asynchronous Processing**
|
|
132
|
+
- Promise Handling: Always use `async/await`
|
|
133
|
+
- Error Handling: Always handle with `try-catch` or Error Boundary
|
|
134
|
+
- Type Definition: Explicitly define return value types (e.g., `Promise<Result>`)
|
|
135
|
+
|
|
136
|
+
**Format Rules**
|
|
137
|
+
- Semicolon omission (follow project formatter settings)
|
|
138
|
+
- Types in `PascalCase`, variables/functions in `camelCase`
|
|
139
|
+
- Imports use absolute paths (`src/`)
|
|
140
|
+
|
|
141
|
+
**Clean Code Principles**
|
|
142
|
+
- Delete unused code immediately
|
|
143
|
+
- Delete debug `console.log()`
|
|
144
|
+
- No commented-out code (manage history with version control)
|
|
145
|
+
- Comments explain "why" (not "what")
|
|
146
|
+
|
|
147
|
+
## Error Handling
|
|
148
|
+
|
|
149
|
+
**Absolute Rule**: Error suppression prohibited. All errors must have log output and appropriate handling.
|
|
150
|
+
|
|
151
|
+
**Fail-Fast Principle**: Fail quickly on errors to prevent continued processing in invalid states
|
|
152
|
+
```typescript
|
|
153
|
+
// Bad: Unconditional fallback
|
|
154
|
+
catch (error) {
|
|
155
|
+
return defaultValue // Hides error
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Good: Explicit failure
|
|
159
|
+
catch (error) {
|
|
160
|
+
logger.error('Processing failed', error)
|
|
161
|
+
throw error // Handle with Error Boundary or higher layer
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Result Type Pattern**: Express errors with types for explicit handling
|
|
166
|
+
```typescript
|
|
167
|
+
type Result<T, E> = { ok: true; value: T } | { ok: false; error: E }
|
|
168
|
+
|
|
169
|
+
function parseUser(data: unknown): Result<User, ValidationError> {
|
|
170
|
+
if (!isValid(data)) return { ok: false, error: new ValidationError() }
|
|
171
|
+
return { ok: true, value: data as User }
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Custom Error Classes**
|
|
176
|
+
```typescript
|
|
177
|
+
export class AppError extends Error {
|
|
178
|
+
constructor(message: string, public readonly code: string, public readonly statusCode = 500) {
|
|
179
|
+
super(message)
|
|
180
|
+
this.name = this.constructor.name
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// Purpose-specific: ValidationError(400), ApiError(502), NotFoundError(404)
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Layer-Specific Error Handling (React)**
|
|
187
|
+
- Error Boundary: Catch React component errors, display fallback UI
|
|
188
|
+
- Custom Hook: Detect business rule violations, propagate AppError as-is
|
|
189
|
+
- API Layer: Convert fetch errors to domain errors
|
|
190
|
+
|
|
191
|
+
**Structured Logging and Sensitive Information Protection**
|
|
192
|
+
Never include sensitive information (password, token, apiKey, secret, creditCard) in logs
|
|
193
|
+
|
|
194
|
+
**Asynchronous Error Handling in React**
|
|
195
|
+
- Error Boundary setup mandatory: Catch rendering errors
|
|
196
|
+
- Use try-catch with all async/await in event handlers
|
|
197
|
+
- Always log and re-throw errors or display error state
|
|
198
|
+
|
|
199
|
+
## Refactoring Techniques
|
|
200
|
+
|
|
201
|
+
**Basic Policy**
|
|
202
|
+
- Small Steps: Maintain always-working state through gradual improvements
|
|
203
|
+
- Safe Changes: Minimize the scope of changes at once
|
|
204
|
+
- Behavior Guarantee: Ensure existing behavior remains unchanged while proceeding
|
|
205
|
+
|
|
206
|
+
**Implementation Procedure**: Understand Current State > Gradual Changes > Behavior Verification > Final Validation
|
|
207
|
+
|
|
208
|
+
**Priority**: Duplicate Code Removal > Large Function Division > Complex Conditional Branch Simplification > Type Safety Improvement
|
|
209
|
+
|
|
210
|
+
## Performance Optimization
|
|
211
|
+
|
|
212
|
+
- Component Memoization: Use React.memo for expensive components
|
|
213
|
+
- State Optimization: Minimize re-renders with proper state structure
|
|
214
|
+
- Lazy Loading: Use React.lazy and Suspense for code splitting
|
|
215
|
+
- Bundle Size: Monitor with the `build` script and keep under 500KB
|
|
216
|
+
|
|
217
|
+
## Non-functional Requirements
|
|
218
|
+
|
|
219
|
+
- **Browser Compatibility**: Chrome/Firefox/Safari/Edge (latest 2 versions)
|
|
220
|
+
- **Rendering Time**: Within 5 seconds for major pages
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: documentation-criteria
|
|
3
|
+
description: "Documentation creation criteria for PRD, ADR, Design Doc, UI Spec, and Work Plan with templates. Use when: creating or reviewing technical documents, determining which documents are required, or following document templates."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Documentation Creation Criteria
|
|
7
|
+
|
|
8
|
+
## Templates
|
|
9
|
+
|
|
10
|
+
- **[prd-template.md](references/prd-template.md)** - Product Requirements Document template
|
|
11
|
+
- **[adr-template.md](references/adr-template.md)** - Architecture Decision Record template
|
|
12
|
+
- **[ui-spec-template.md](references/ui-spec-template.md)** - UI Specification template (frontend/fullstack features)
|
|
13
|
+
- **[design-template.md](references/design-template.md)** - Technical Design Document template
|
|
14
|
+
- **[plan-template.md](references/plan-template.md)** - Work Plan template
|
|
15
|
+
- **[task-template.md](references/task-template.md)** - Task file template for implementation tasks
|
|
16
|
+
|
|
17
|
+
## Creation Decision Matrix [MANDATORY]
|
|
18
|
+
|
|
19
|
+
| Condition | Required Documents | Creation Order |
|
|
20
|
+
|-----------|-------------------|----------------|
|
|
21
|
+
| New Feature Addition (backend) | PRD -> [ADR] -> Design Doc -> Work Plan | After PRD approval |
|
|
22
|
+
| New Feature Addition (frontend/fullstack) | PRD -> **UI Spec** -> [ADR] -> Design Doc -> Work Plan | UI Spec before Design Doc |
|
|
23
|
+
| ADR Conditions Met (see below) | ADR -> Design Doc -> Work Plan | Start immediately |
|
|
24
|
+
| 6+ Files | ADR -> Design Doc -> Work Plan (REQUIRED) | Start immediately |
|
|
25
|
+
| 3-5 Files | Design Doc -> Work Plan (REQUIRED) | Start immediately |
|
|
26
|
+
| 1-2 Files | None | Direct implementation |
|
|
27
|
+
|
|
28
|
+
**ENFORCEMENT**: EVALUATE file count and ADR conditions BEFORE starting implementation
|
|
29
|
+
|
|
30
|
+
## ADR Creation Conditions [MANDATORY if Any Apply]
|
|
31
|
+
|
|
32
|
+
### 1. Contract System Changes
|
|
33
|
+
- **Adding nested contracts with 3+ levels**
|
|
34
|
+
- **Changing/deleting contracts used in 3+ locations**
|
|
35
|
+
- **Contract responsibility changes** (e.g., DTO to Entity, Request to Domain)
|
|
36
|
+
|
|
37
|
+
### 2. Data Flow Changes
|
|
38
|
+
- **Storage location changes** (DB to File, Memory to Cache)
|
|
39
|
+
- **Processing order changes with 3+ steps**
|
|
40
|
+
- **Data passing method changes** (parameter passing to shared state, direct reference to event-based)
|
|
41
|
+
|
|
42
|
+
### 3. Architecture Changes
|
|
43
|
+
- Layer addition, responsibility changes, component relocation
|
|
44
|
+
|
|
45
|
+
### 4. External Dependency Changes
|
|
46
|
+
- Library/framework/external API introduction or replacement
|
|
47
|
+
|
|
48
|
+
### 5. Complex Implementation Logic (Regardless of Scale)
|
|
49
|
+
- Managing 3+ states
|
|
50
|
+
- Coordinating 5+ asynchronous processes
|
|
51
|
+
|
|
52
|
+
## Detailed Document Definitions
|
|
53
|
+
|
|
54
|
+
### PRD (Product Requirements Document)
|
|
55
|
+
**Purpose**: Define business requirements and user value
|
|
56
|
+
**Includes**: Business requirements, success metrics, user stories, MoSCoW prioritization, MVP/Future phase separation, user journey diagram, scope boundary diagram
|
|
57
|
+
**Excludes**: Technical implementation details, technical selection rationale, implementation phases, task breakdown
|
|
58
|
+
|
|
59
|
+
### ADR (Architecture Decision Record)
|
|
60
|
+
**Purpose**: Record technical decision rationale and background
|
|
61
|
+
**Includes**: Decision, rationale, option comparison (minimum 3 options), architecture impact, principled implementation guidelines
|
|
62
|
+
**Excludes**: Implementation schedule, detailed procedures, specific code examples, resource assignments
|
|
63
|
+
|
|
64
|
+
### UI Specification
|
|
65
|
+
**Purpose**: Define UI structure, screen transitions, component decomposition, and interaction design
|
|
66
|
+
**Includes**: Screen list and transitions, component state x display matrix, interaction definitions, AC traceability, existing component reuse map, accessibility requirements
|
|
67
|
+
**Excludes**: Technical implementation details, API contracts, test implementation, implementation schedule
|
|
68
|
+
|
|
69
|
+
### Design Document
|
|
70
|
+
**Purpose**: Define technical implementation methods in detail
|
|
71
|
+
**Includes**: Existing codebase analysis, technical approach, dependencies and constraints, interface/contract definitions, data flow, acceptance criteria, change impact map, code inspection evidence
|
|
72
|
+
**Excludes**: Why that technology was chosen (reference ADR), when/who to implement (reference Work Plan)
|
|
73
|
+
|
|
74
|
+
### Work Plan
|
|
75
|
+
**Purpose**: Implementation task management and progress tracking
|
|
76
|
+
**Includes**: Task breakdown, schedule estimates, E2E verification procedures, Phase 4 Quality Assurance Phase (required), progress records
|
|
77
|
+
**Excludes**: Technical rationale, design details
|
|
78
|
+
|
|
79
|
+
**Phase Division Criteria**:
|
|
80
|
+
1. **Phase 1: Foundation Implementation** - Contract definitions, interfaces, test preparation
|
|
81
|
+
2. **Phase 2: Core Feature Implementation** - Business logic, unit tests
|
|
82
|
+
3. **Phase 3: Integration Implementation** - External connections, presentation layer
|
|
83
|
+
4. **Phase 4: Quality Assurance (Required)** - Acceptance criteria, all tests, quality checks
|
|
84
|
+
|
|
85
|
+
## Creation Process [MANDATORY]
|
|
86
|
+
|
|
87
|
+
**STEP 1**: **Problem Analysis** — Change scale assessment, ADR condition check
|
|
88
|
+
**STEP 2**: **ADR Option Consideration** (ADR only) — Compare 3+ options, specify trade-offs
|
|
89
|
+
**STEP 3**: **Creation** — Use templates, include measurable conditions
|
|
90
|
+
**STEP 4**: **Approval** — "Accepted" after review enables implementation
|
|
91
|
+
|
|
92
|
+
**ENFORCEMENT**: Implementation CANNOT begin without approved documents for the relevant scale
|
|
93
|
+
|
|
94
|
+
## Storage Locations
|
|
95
|
+
|
|
96
|
+
| Document | Path | Naming Convention |
|
|
97
|
+
|----------|------|------------------|
|
|
98
|
+
| PRD | `docs/prd/` | `[feature-name]-prd.md` |
|
|
99
|
+
| ADR | `docs/adr/` | `ADR-[4-digits]-[title].md` |
|
|
100
|
+
| UI Spec | `docs/ui-spec/` | `[feature-name]-ui-spec.md` |
|
|
101
|
+
| Design Doc | `docs/design/` | `[feature-name]-design.md` |
|
|
102
|
+
| Work Plan | `docs/plans/` | `YYYYMMDD-{type}-{description}.md` |
|
|
103
|
+
| Task File | `docs/plans/tasks/` | `{plan-name}-task-{number}.md` |
|
|
104
|
+
|
|
105
|
+
## ADR Status
|
|
106
|
+
`Proposed` -> `Accepted` -> `Deprecated`/`Superseded`/`Rejected`
|
|
107
|
+
|
|
108
|
+
## AI Automation Rules [MANDATORY]
|
|
109
|
+
- 5+ files: MUST suggest ADR creation
|
|
110
|
+
- Contract/data flow change detected: ADR REQUIRED
|
|
111
|
+
- Check existing ADRs before implementation — ALWAYS verify alignment
|
|
112
|
+
|
|
113
|
+
## Diagram Requirements
|
|
114
|
+
|
|
115
|
+
| Document | Required Diagrams | Purpose |
|
|
116
|
+
|----------|------------------|---------|
|
|
117
|
+
| PRD | User journey, Scope boundary | Clarify user experience and scope |
|
|
118
|
+
| ADR | Option comparison (when needed) | Visualize trade-offs |
|
|
119
|
+
| UI Spec | Screen transition, Component tree | Clarify screen flow and structure |
|
|
120
|
+
| Design Doc | Architecture, Data flow | Understand technical structure |
|
|
121
|
+
| Work Plan | Phase structure, Task dependency | Clarify implementation order |
|
|
122
|
+
|
|
123
|
+
## Common ADR Relationships
|
|
124
|
+
1. **At creation**: Identify common technical areas, reference existing common ADRs
|
|
125
|
+
2. **When missing**: Consider creating necessary common ADRs
|
|
126
|
+
3. **Design Doc**: Specify common ADRs in "Prerequisite ADRs" section
|
|
127
|
+
4. **Compliance check**: Verify design aligns with common ADR decisions
|
|
@@ -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" (good), "Implement in Phase 1" (bad)
|
|
61
|
+
|
|
62
|
+
## Related Information
|
|
63
|
+
|
|
64
|
+
- [Links to related ADRs, documents, issues, PRs, etc.]
|