aiwf 0.3.15 → 0.3.17
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/README.ko.md +4 -5
- package/README.md +90 -196
- package/docs/ADR_MANAGEMENT_GUIDE.ko.md +602 -0
- package/docs/ADR_MANAGEMENT_GUIDE.md +602 -0
- package/docs/API_REFERENCE_FULL.ko.md +1135 -0
- package/docs/API_REFERENCE_FULL.md +1135 -0
- package/docs/ARCHITECTURE.ko.md +314 -0
- package/docs/ARCHITECTURE.md +314 -0
- package/docs/EXAMPLES.ko.md +695 -0
- package/docs/EXAMPLES.md +12 -12
- package/docs/GETTING_STARTED.ko.md +219 -0
- package/docs/GETTING_STARTED.md +19 -26
- package/docs/MODULE_MANAGEMENT_GUIDE.ko.md +289 -0
- package/docs/MODULE_MANAGEMENT_GUIDE.md +289 -0
- package/docs/PERFORMANCE_GUIDELINES.ko.md +388 -0
- package/docs/PRD.ko.md +2 -2
- package/docs/PRD.md +2 -2
- package/docs/TROUBLESHOOTING.ko.md +366 -0
- package/docs/YOLO_SYSTEM_GUIDE.ko.md +542 -0
- package/docs/YOLO_SYSTEM_GUIDE.md +542 -0
- package/package.json +50 -2
- package/src/DEPENDENCY_MAP.md +90 -0
- package/src/lib/installer.js +1 -0
- package/src/lib/resources/templates/api-server/template/src/controllers/aiwfController.ts +0 -14
- package/src/lib/resources/templates/api-server/template/src/routes/aiwf.ts +0 -11
- package/src/lib/resources/templates/web-app/template/src/pages/AiwfDashboard.tsx +2 -5
- package/src/lib/resources/utils/token-reporter.js +2 -3
- package/src/utils/checkpoint-manager.js +11 -1
- package/src/utils/engineering-guard.js +11 -1
- package/templates/api-server/template/src/controllers/aiwfController.ts +0 -14
- package/templates/api-server/template/src/routes/aiwf.ts +0 -11
- package/templates/web-app/template/src/pages/AiwfDashboard.tsx +2 -5
- package/docs/guides/feature-git-integration-guide-ko.md +0 -481
- package/docs/guides/feature-git-integration-guide.md +0 -481
- package/src/commands/cache-templates.js +0 -209
- package/src/commands/create-offline.js +0 -86
- package/src/commands/state-refactored.js +0 -419
- package/src/lib/resources/commands/feature-ledger.js +0 -565
- package/src/lib/resources/commands/feature_commit_report.js +0 -370
- package/src/lib/resources/commands/scan_git_history.js +0 -234
- package/src/lib/resources/commands/sync_feature_commits.js +0 -154
- package/src/lib/resources/templates/web-app/template/src/components/aiwf/FeatureLedger.tsx +0 -93
- package/src/lib/resources/utils/feature-updater.js +0 -271
- package/src/utils/git-integration.js +0 -173
- package/templates/web-app/template/src/components/aiwf/FeatureLedger.tsx +0 -93
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
# AIWF Architecture Decision Record (ADR) Management Guide
|
|
2
|
+
|
|
3
|
+
> A comprehensive guide to managing architectural decisions using ADRs in AIWF projects
|
|
4
|
+
|
|
5
|
+
[한국어](ADR_MANAGEMENT_GUIDE.ko.md) | [English](ADR_MANAGEMENT_GUIDE.md)
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
1. [What are ADRs?](#what-are-adrs)
|
|
10
|
+
2. [Why Use ADRs in AIWF?](#why-use-adrs-in-aiwf)
|
|
11
|
+
3. [ADR Structure](#adr-structure)
|
|
12
|
+
4. [Integration with AIWF](#integration-with-aiwf)
|
|
13
|
+
5. [Creating ADRs](#creating-adrs)
|
|
14
|
+
6. [Managing ADRs](#managing-adrs)
|
|
15
|
+
7. [ADR Templates](#adr-templates)
|
|
16
|
+
8. [Best Practices](#best-practices)
|
|
17
|
+
9. [Automation and Tools](#automation-and-tools)
|
|
18
|
+
10. [Examples](#examples)
|
|
19
|
+
|
|
20
|
+
## What are ADRs?
|
|
21
|
+
|
|
22
|
+
Architecture Decision Records (ADRs) are short text documents that capture important architectural decisions made in a project, along with their context and consequences. They serve as a historical record of why certain decisions were made and help future developers understand the reasoning behind architectural choices.
|
|
23
|
+
|
|
24
|
+
### Key Characteristics
|
|
25
|
+
|
|
26
|
+
- **Immutable**: Once written, ADRs should not be changed (only superseded)
|
|
27
|
+
- **Numbered**: Sequential numbering for easy reference
|
|
28
|
+
- **Context-Rich**: Includes the situation that led to the decision
|
|
29
|
+
- **Consequence-Aware**: Documents the results and trade-offs
|
|
30
|
+
|
|
31
|
+
## Why Use ADRs in AIWF?
|
|
32
|
+
|
|
33
|
+
### Benefits for AI-Assisted Development
|
|
34
|
+
|
|
35
|
+
1. **AI Context**: Provides Claude Code with historical context for decisions
|
|
36
|
+
2. **Autonomous Guidance**: Helps YOLO mode make informed architectural choices
|
|
37
|
+
3. **Consistency**: Ensures AI follows established architectural patterns
|
|
38
|
+
4. **Documentation**: Maintains architectural knowledge across development sessions
|
|
39
|
+
|
|
40
|
+
### AIWF-Specific Advantages
|
|
41
|
+
|
|
42
|
+
- **Sprint Planning**: ADRs inform task creation and priority
|
|
43
|
+
- **Persona Context**: Different AI personas can reference relevant decisions
|
|
44
|
+
- **Quality Control**: Engineering Guard can validate compliance with decisions
|
|
45
|
+
- **Recovery**: Checkpoint system can reference ADRs for context restoration
|
|
46
|
+
|
|
47
|
+
## ADR Structure
|
|
48
|
+
|
|
49
|
+
### Standard ADR Format
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
# ADR-001: Decision Title
|
|
53
|
+
|
|
54
|
+
**Date**: YYYY-MM-DD
|
|
55
|
+
**Status**: [Proposed | Accepted | Deprecated | Superseded]
|
|
56
|
+
**Context**: AIWF Project Context
|
|
57
|
+
|
|
58
|
+
## Context
|
|
59
|
+
|
|
60
|
+
Description of the issue or situation that prompted this decision.
|
|
61
|
+
|
|
62
|
+
## Decision
|
|
63
|
+
|
|
64
|
+
The architectural decision that was made.
|
|
65
|
+
|
|
66
|
+
## Consequences
|
|
67
|
+
|
|
68
|
+
### Positive
|
|
69
|
+
- Benefits and advantages of this decision
|
|
70
|
+
|
|
71
|
+
### Negative
|
|
72
|
+
- Drawbacks and trade-offs
|
|
73
|
+
|
|
74
|
+
### Neutral
|
|
75
|
+
- Other effects and considerations
|
|
76
|
+
|
|
77
|
+
## Implementation Notes
|
|
78
|
+
|
|
79
|
+
Specific guidance for implementation within AIWF.
|
|
80
|
+
|
|
81
|
+
## Related Decisions
|
|
82
|
+
- Links to related ADRs
|
|
83
|
+
- References to AIWF components affected
|
|
84
|
+
|
|
85
|
+
## Compliance Validation
|
|
86
|
+
- How to verify adherence to this decision
|
|
87
|
+
- Engineering Guard rules if applicable
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### AIWF-Enhanced Structure
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
# ADR-001: Decision Title
|
|
94
|
+
|
|
95
|
+
**Date**: YYYY-MM-DD
|
|
96
|
+
**Status**: Accepted
|
|
97
|
+
**Context**: AIWF v0.3.16+ Project
|
|
98
|
+
**Affects**: [CLI | YOLO | Personas | Templates]
|
|
99
|
+
**Persona Relevance**: [architect | developer | security]
|
|
100
|
+
|
|
101
|
+
## Context
|
|
102
|
+
[Standard context section]
|
|
103
|
+
|
|
104
|
+
## Decision
|
|
105
|
+
[Standard decision section]
|
|
106
|
+
|
|
107
|
+
## AIWF Integration
|
|
108
|
+
|
|
109
|
+
### CLI Impact
|
|
110
|
+
How this decision affects CLI commands and workflows.
|
|
111
|
+
|
|
112
|
+
### YOLO Mode Considerations
|
|
113
|
+
Implications for autonomous execution and safety mechanisms.
|
|
114
|
+
|
|
115
|
+
### Persona Guidelines
|
|
116
|
+
Specific guidance for different AI personas.
|
|
117
|
+
|
|
118
|
+
### Template Updates
|
|
119
|
+
Required changes to project templates.
|
|
120
|
+
|
|
121
|
+
## Consequences
|
|
122
|
+
[Standard consequences section]
|
|
123
|
+
|
|
124
|
+
## Validation Rules
|
|
125
|
+
|
|
126
|
+
### Engineering Guard Rules
|
|
127
|
+
```yaml
|
|
128
|
+
# .aiwf/yolo-config.yaml additions
|
|
129
|
+
custom_rules:
|
|
130
|
+
- name: "ADR-001 Compliance"
|
|
131
|
+
pattern: "validation_pattern"
|
|
132
|
+
severity: "warning"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Automated Checks
|
|
136
|
+
- Unit tests to validate compliance
|
|
137
|
+
- CI/CD pipeline validations
|
|
138
|
+
- AIWF command integrations
|
|
139
|
+
|
|
140
|
+
## Implementation Guide
|
|
141
|
+
|
|
142
|
+
### Step-by-Step Implementation
|
|
143
|
+
1. [Detailed implementation steps]
|
|
144
|
+
2. [AIWF-specific considerations]
|
|
145
|
+
3. [Validation checkpoints]
|
|
146
|
+
|
|
147
|
+
### Code Examples
|
|
148
|
+
```javascript
|
|
149
|
+
// Implementation examples
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Related Documents
|
|
153
|
+
- [Link to relevant AIWF documentation]
|
|
154
|
+
- [Related ADRs]
|
|
155
|
+
- [AIWF module documentation]
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Integration with AIWF
|
|
159
|
+
|
|
160
|
+
### Directory Structure
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
.aiwf/
|
|
164
|
+
├── adrs/
|
|
165
|
+
│ ├── 0001-module-architecture.md
|
|
166
|
+
│ ├── 0002-yolo-safety-mechanisms.md
|
|
167
|
+
│ ├── 0003-persona-selection-strategy.md
|
|
168
|
+
│ └── template.md
|
|
169
|
+
├── yolo-config.yaml
|
|
170
|
+
└── state.json
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### AIWF Command Integration
|
|
174
|
+
|
|
175
|
+
#### Planned Commands (Future Enhancement)
|
|
176
|
+
```bash
|
|
177
|
+
# Create new ADR
|
|
178
|
+
aiwf adr create "Database Migration Strategy"
|
|
179
|
+
|
|
180
|
+
# List ADRs
|
|
181
|
+
aiwf adr list
|
|
182
|
+
|
|
183
|
+
# Show specific ADR
|
|
184
|
+
aiwf adr show 001
|
|
185
|
+
|
|
186
|
+
# Link ADR to current work
|
|
187
|
+
aiwf adr link 001 --to-task T001
|
|
188
|
+
|
|
189
|
+
# Validate current code against ADRs
|
|
190
|
+
aiwf adr validate
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Claude Code Integration
|
|
194
|
+
|
|
195
|
+
#### ADR-Aware Commands
|
|
196
|
+
```markdown
|
|
197
|
+
# In Claude Code
|
|
198
|
+
/aiwf_prime # Now includes ADR context loading
|
|
199
|
+
/aiwf_create_milestone_plan # References relevant ADRs
|
|
200
|
+
/aiwf_yolo # Considers ADR constraints
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Creating ADRs
|
|
204
|
+
|
|
205
|
+
### When to Create an ADR
|
|
206
|
+
|
|
207
|
+
1. **Major Architectural Changes**: Database schema, API design, module structure
|
|
208
|
+
2. **Technology Choices**: Framework selection, library adoption, tool integration
|
|
209
|
+
3. **AIWF-Specific Decisions**: YOLO behavior, persona configuration, template design
|
|
210
|
+
4. **Security Decisions**: Authentication, authorization, data protection
|
|
211
|
+
5. **Performance Decisions**: Caching strategies, optimization approaches
|
|
212
|
+
|
|
213
|
+
### Creation Process
|
|
214
|
+
|
|
215
|
+
#### Manual Creation
|
|
216
|
+
```bash
|
|
217
|
+
# 1. Copy template
|
|
218
|
+
cp .aiwf/adrs/template.md .aiwf/adrs/0001-your-decision.md
|
|
219
|
+
|
|
220
|
+
# 2. Edit the ADR
|
|
221
|
+
vim .aiwf/adrs/0001-your-decision.md
|
|
222
|
+
|
|
223
|
+
# 3. Link to current work
|
|
224
|
+
# Add ADR reference to task or sprint documentation
|
|
225
|
+
|
|
226
|
+
# 4. Commit
|
|
227
|
+
git add .aiwf/adrs/0001-your-decision.md
|
|
228
|
+
git commit -m "docs: add ADR-001 for your decision"
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
#### Using AIWF (Future)
|
|
232
|
+
```bash
|
|
233
|
+
# Create from template
|
|
234
|
+
aiwf adr create "Microservices Communication Pattern"
|
|
235
|
+
|
|
236
|
+
# Create with context
|
|
237
|
+
aiwf adr create "YOLO Safety Mechanism" --context="yolo-mode"
|
|
238
|
+
|
|
239
|
+
# Create from persona perspective
|
|
240
|
+
aiwf adr create "Security Policy" --persona="security"
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Managing ADRs
|
|
244
|
+
|
|
245
|
+
### Lifecycle Management
|
|
246
|
+
|
|
247
|
+
#### Status Transitions
|
|
248
|
+
```
|
|
249
|
+
Proposed → Accepted → [Deprecated | Superseded]
|
|
250
|
+
↓
|
|
251
|
+
Rejected
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
#### Updating Status
|
|
255
|
+
```markdown
|
|
256
|
+
# To deprecate an ADR
|
|
257
|
+
## Status Update
|
|
258
|
+
**Previous Status**: Accepted
|
|
259
|
+
**New Status**: Deprecated
|
|
260
|
+
**Date**: 2025-01-27
|
|
261
|
+
**Reason**: Superseded by ADR-015
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Linking and References
|
|
265
|
+
|
|
266
|
+
#### Task Integration
|
|
267
|
+
```markdown
|
|
268
|
+
# In task files
|
|
269
|
+
## Architectural Context
|
|
270
|
+
- ADR-001: Module Architecture Pattern
|
|
271
|
+
- ADR-003: API Design Principles
|
|
272
|
+
|
|
273
|
+
## Compliance Requirements
|
|
274
|
+
- Follow ADR-001 module structure
|
|
275
|
+
- Implement ADR-003 error handling
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
#### Sprint Planning
|
|
279
|
+
```markdown
|
|
280
|
+
# In sprint documentation
|
|
281
|
+
## Architectural Decisions to Consider
|
|
282
|
+
- [ ] Review ADR-002 for database access patterns
|
|
283
|
+
- [ ] Apply ADR-004 security guidelines
|
|
284
|
+
- [ ] Validate against ADR-001 module structure
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## ADR Templates
|
|
288
|
+
|
|
289
|
+
### Basic Template
|
|
290
|
+
|
|
291
|
+
```markdown
|
|
292
|
+
# ADR-{NUMBER}: {TITLE}
|
|
293
|
+
|
|
294
|
+
**Date**: {DATE}
|
|
295
|
+
**Status**: Proposed
|
|
296
|
+
**Context**: AIWF Project
|
|
297
|
+
|
|
298
|
+
## Context
|
|
299
|
+
|
|
300
|
+
What is the issue we're facing? What factors are relevant?
|
|
301
|
+
|
|
302
|
+
## Decision
|
|
303
|
+
|
|
304
|
+
What is the change we're making?
|
|
305
|
+
|
|
306
|
+
## Consequences
|
|
307
|
+
|
|
308
|
+
What becomes easier or more difficult as a result?
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### AIWF-Specific Template
|
|
312
|
+
|
|
313
|
+
```markdown
|
|
314
|
+
# ADR-{NUMBER}: {TITLE}
|
|
315
|
+
|
|
316
|
+
**Date**: {DATE}
|
|
317
|
+
**Status**: Proposed
|
|
318
|
+
**Context**: AIWF v{VERSION}+ Project
|
|
319
|
+
**Affects**: [CLI | YOLO | Personas | Templates | Core]
|
|
320
|
+
**Persona Relevance**: [architect | developer | security | tester]
|
|
321
|
+
|
|
322
|
+
## Context
|
|
323
|
+
|
|
324
|
+
### Problem Statement
|
|
325
|
+
[Description of the architectural challenge]
|
|
326
|
+
|
|
327
|
+
### AIWF Context
|
|
328
|
+
[How this relates to AIWF workflows and components]
|
|
329
|
+
|
|
330
|
+
### Constraints
|
|
331
|
+
[Technical, business, or project constraints]
|
|
332
|
+
|
|
333
|
+
## Decision
|
|
334
|
+
|
|
335
|
+
### Chosen Approach
|
|
336
|
+
[The architectural decision made]
|
|
337
|
+
|
|
338
|
+
### Alternatives Considered
|
|
339
|
+
[Other options that were evaluated]
|
|
340
|
+
|
|
341
|
+
### Rationale
|
|
342
|
+
[Why this decision was made]
|
|
343
|
+
|
|
344
|
+
## AIWF Integration
|
|
345
|
+
|
|
346
|
+
### CLI Impact
|
|
347
|
+
[How this affects command-line operations]
|
|
348
|
+
|
|
349
|
+
### YOLO Mode Considerations
|
|
350
|
+
[Implications for autonomous execution]
|
|
351
|
+
|
|
352
|
+
### Persona Guidelines
|
|
353
|
+
[Guidance for different AI personas]
|
|
354
|
+
|
|
355
|
+
### Template Changes
|
|
356
|
+
[Required updates to project templates]
|
|
357
|
+
|
|
358
|
+
## Consequences
|
|
359
|
+
|
|
360
|
+
### Positive
|
|
361
|
+
- [Benefits and improvements]
|
|
362
|
+
|
|
363
|
+
### Negative
|
|
364
|
+
- [Trade-offs and limitations]
|
|
365
|
+
|
|
366
|
+
### Neutral
|
|
367
|
+
- [Other effects]
|
|
368
|
+
|
|
369
|
+
## Implementation
|
|
370
|
+
|
|
371
|
+
### Action Items
|
|
372
|
+
- [ ] [Specific implementation steps]
|
|
373
|
+
- [ ] [AIWF configuration updates]
|
|
374
|
+
- [ ] [Documentation updates]
|
|
375
|
+
|
|
376
|
+
### Validation
|
|
377
|
+
[How to verify correct implementation]
|
|
378
|
+
|
|
379
|
+
### Timeline
|
|
380
|
+
[Implementation schedule if applicable]
|
|
381
|
+
|
|
382
|
+
## Compliance
|
|
383
|
+
|
|
384
|
+
### Engineering Guard Rules
|
|
385
|
+
```yaml
|
|
386
|
+
# Additional rules for .aiwf/yolo-config.yaml
|
|
387
|
+
adr_compliance:
|
|
388
|
+
adr_{NUMBER}:
|
|
389
|
+
enabled: true
|
|
390
|
+
severity: warning
|
|
391
|
+
pattern: "{validation_pattern}"
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Automated Checks
|
|
395
|
+
[Unit tests, CI/CD validations, etc.]
|
|
396
|
+
|
|
397
|
+
## Related Documents
|
|
398
|
+
- [Links to relevant documentation]
|
|
399
|
+
- [Related ADRs]
|
|
400
|
+
- [AIWF module references]
|
|
401
|
+
|
|
402
|
+
## Review and Approval
|
|
403
|
+
|
|
404
|
+
### Reviewers
|
|
405
|
+
- [ ] Architect: {NAME}
|
|
406
|
+
- [ ] Lead Developer: {NAME}
|
|
407
|
+
- [ ] Security Lead: {NAME} (if security-related)
|
|
408
|
+
|
|
409
|
+
### Approval Date
|
|
410
|
+
[Date when ADR was accepted]
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
## Best Practices
|
|
414
|
+
|
|
415
|
+
### Writing Effective ADRs
|
|
416
|
+
|
|
417
|
+
1. **Be Concise**: Keep ADRs focused and readable
|
|
418
|
+
2. **Be Specific**: Avoid vague language and generalities
|
|
419
|
+
3. **Include Context**: Explain the situation that led to the decision
|
|
420
|
+
4. **Document Trade-offs**: Be honest about consequences
|
|
421
|
+
5. **Link to Code**: Reference specific implementations
|
|
422
|
+
|
|
423
|
+
### AIWF-Specific Best Practices
|
|
424
|
+
|
|
425
|
+
1. **Persona Alignment**: Consider how different personas will interpret the ADR
|
|
426
|
+
2. **YOLO Compatibility**: Ensure decisions work with autonomous execution
|
|
427
|
+
3. **Template Integration**: Update project templates to reflect decisions
|
|
428
|
+
4. **Engineering Guard Rules**: Add validation rules where applicable
|
|
429
|
+
5. **Sprint Planning**: Reference ADRs in task and sprint documentation
|
|
430
|
+
|
|
431
|
+
### Maintenance Practices
|
|
432
|
+
|
|
433
|
+
1. **Regular Reviews**: Periodically review and update ADR status
|
|
434
|
+
2. **Link Validation**: Ensure references remain accurate
|
|
435
|
+
3. **Implementation Tracking**: Monitor compliance with decisions
|
|
436
|
+
4. **Knowledge Transfer**: Use ADRs for onboarding new team members
|
|
437
|
+
|
|
438
|
+
## Automation and Tools
|
|
439
|
+
|
|
440
|
+
### Git Hooks Integration
|
|
441
|
+
|
|
442
|
+
```bash
|
|
443
|
+
# .git/hooks/pre-commit
|
|
444
|
+
#!/bin/bash
|
|
445
|
+
# Validate ADR references in commit messages
|
|
446
|
+
if git log -1 --pretty=%B | grep -q "ADR-[0-9]"; then
|
|
447
|
+
echo "✅ ADR reference found in commit message"
|
|
448
|
+
else
|
|
449
|
+
echo "ℹ️ Consider referencing relevant ADRs in commit message"
|
|
450
|
+
fi
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
### Future AIWF Integration
|
|
454
|
+
|
|
455
|
+
#### Planned Features
|
|
456
|
+
- **ADR Command**: `aiwf adr` command suite
|
|
457
|
+
- **Context Loading**: Automatic ADR context in Claude Code
|
|
458
|
+
- **Validation**: Engineering Guard ADR compliance checks
|
|
459
|
+
- **Templates**: ADR-aware project templates
|
|
460
|
+
|
|
461
|
+
#### Proposed Workflow
|
|
462
|
+
```bash
|
|
463
|
+
# 1. Create ADR with AIWF
|
|
464
|
+
aiwf adr create "API Rate Limiting Strategy"
|
|
465
|
+
|
|
466
|
+
# 2. Link to current work
|
|
467
|
+
aiwf task link ADR-001 --to-current
|
|
468
|
+
|
|
469
|
+
# 3. Validate implementation
|
|
470
|
+
aiwf adr validate --against=ADR-001
|
|
471
|
+
|
|
472
|
+
# 4. Generate compliance report
|
|
473
|
+
aiwf adr report --sprint=S01
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
## Examples
|
|
477
|
+
|
|
478
|
+
### Example 1: Module Architecture ADR
|
|
479
|
+
|
|
480
|
+
```markdown
|
|
481
|
+
# ADR-001: Modular Component Architecture
|
|
482
|
+
|
|
483
|
+
**Date**: 2025-01-27
|
|
484
|
+
**Status**: Accepted
|
|
485
|
+
**Context**: AIWF v0.3.16+ Project
|
|
486
|
+
**Affects**: Core, CLI, Templates
|
|
487
|
+
**Persona Relevance**: architect, developer
|
|
488
|
+
|
|
489
|
+
## Context
|
|
490
|
+
|
|
491
|
+
AIWF grew organically and components became tightly coupled, making it difficult to test, maintain, and extend individual features.
|
|
492
|
+
|
|
493
|
+
## Decision
|
|
494
|
+
|
|
495
|
+
Adopt a modular architecture with clear dependency boundaries:
|
|
496
|
+
- Core utilities (paths, messages, language-utils)
|
|
497
|
+
- Feature modules (persona, checkpoint, compression)
|
|
498
|
+
- Plugin system for extensions
|
|
499
|
+
|
|
500
|
+
## AIWF Integration
|
|
501
|
+
|
|
502
|
+
### CLI Impact
|
|
503
|
+
Commands will load modules dynamically based on functionality needed.
|
|
504
|
+
|
|
505
|
+
### YOLO Mode Considerations
|
|
506
|
+
Modular design allows YOLO to load only necessary components, improving performance.
|
|
507
|
+
|
|
508
|
+
### Engineering Guard Rules
|
|
509
|
+
```yaml
|
|
510
|
+
module_architecture:
|
|
511
|
+
enforce_boundaries: true
|
|
512
|
+
max_dependencies: 5
|
|
513
|
+
circular_dependency_check: true
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
## Consequences
|
|
517
|
+
|
|
518
|
+
### Positive
|
|
519
|
+
- Improved testability and maintainability
|
|
520
|
+
- Faster development cycles
|
|
521
|
+
- Better plugin support
|
|
522
|
+
|
|
523
|
+
### Negative
|
|
524
|
+
- Increased initial complexity
|
|
525
|
+
- Need for dependency management
|
|
526
|
+
|
|
527
|
+
## Implementation
|
|
528
|
+
- Refactor existing monolithic components
|
|
529
|
+
- Implement dependency injection
|
|
530
|
+
- Update documentation and templates
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
### Example 2: YOLO Safety Mechanism ADR
|
|
534
|
+
|
|
535
|
+
```markdown
|
|
536
|
+
# ADR-002: YOLO Safety Mechanism Framework
|
|
537
|
+
|
|
538
|
+
**Date**: 2025-01-27
|
|
539
|
+
**Status**: Accepted
|
|
540
|
+
**Context**: AIWF v0.3.16+ YOLO Mode
|
|
541
|
+
**Affects**: YOLO, Engineering Guard, Checkpoint
|
|
542
|
+
**Persona Relevance**: architect, security
|
|
543
|
+
|
|
544
|
+
## Context
|
|
545
|
+
|
|
546
|
+
Autonomous execution needs robust safety mechanisms to prevent data loss, security issues, and code quality degradation.
|
|
547
|
+
|
|
548
|
+
## Decision
|
|
549
|
+
|
|
550
|
+
Implement multi-layered safety framework:
|
|
551
|
+
1. Engineering Guard for code quality
|
|
552
|
+
2. Checkpoint system for recovery
|
|
553
|
+
3. Breakpoint system for critical operations
|
|
554
|
+
4. Real-time monitoring and intervention
|
|
555
|
+
|
|
556
|
+
## YOLO Mode Considerations
|
|
557
|
+
|
|
558
|
+
The safety framework is specifically designed for autonomous execution:
|
|
559
|
+
- Non-blocking quality checks
|
|
560
|
+
- Automatic rollback on failures
|
|
561
|
+
- Progressive escalation of interventions
|
|
562
|
+
|
|
563
|
+
## Engineering Guard Rules
|
|
564
|
+
```yaml
|
|
565
|
+
yolo_safety:
|
|
566
|
+
critical_file_protection: true
|
|
567
|
+
test_failure_threshold: 10
|
|
568
|
+
complexity_monitoring: true
|
|
569
|
+
automatic_checkpoints: 5
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
## Implementation
|
|
573
|
+
- Deploy engineering-guard.js with YOLO templates
|
|
574
|
+
- Integrate checkpoint-manager.js with session tracking
|
|
575
|
+
- Add safety configuration to yolo-config.yaml
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
## Related Commands
|
|
579
|
+
|
|
580
|
+
### Current AIWF Commands
|
|
581
|
+
- `/aiwf_prime` - Load project context (can include ADR context)
|
|
582
|
+
- `/aiwf_create_milestone_plan` - Reference ADRs in planning
|
|
583
|
+
- `/aiwf_do_task` - Consider ADR constraints during implementation
|
|
584
|
+
|
|
585
|
+
### Planned Commands
|
|
586
|
+
- `aiwf adr create` - Create new ADR
|
|
587
|
+
- `aiwf adr list` - List all ADRs
|
|
588
|
+
- `aiwf adr validate` - Validate code against ADRs
|
|
589
|
+
- `aiwf adr link` - Link ADRs to tasks
|
|
590
|
+
|
|
591
|
+
## Related Documents
|
|
592
|
+
|
|
593
|
+
- [ARCHITECTURE.md](ARCHITECTURE.md) - Overall system architecture
|
|
594
|
+
- [MODULE_MANAGEMENT_GUIDE.md](MODULE_MANAGEMENT_GUIDE.md) - Module dependency management
|
|
595
|
+
- [YOLO_SYSTEM_GUIDE.md](YOLO_SYSTEM_GUIDE.md) - YOLO mode documentation
|
|
596
|
+
- [DEVELOPMENT_GUIDE.md](DEVELOPMENT_GUIDE.md) - Development practices
|
|
597
|
+
|
|
598
|
+
---
|
|
599
|
+
|
|
600
|
+
**Last Updated**: 2025-01-27
|
|
601
|
+
**Version**: Compatible with AIWF v0.3.16+
|
|
602
|
+
**Status**: Documentation Framework (ADR commands to be implemented)
|