project-iris 0.0.16 → 0.0.18
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.md +86 -15
- package/flows/aidlc/README.md +358 -214
- package/flows/aidlc/agents/README.md +154 -0
- package/flows/aidlc/agents/inception-agent.md +23 -12
- package/flows/aidlc/agents/master-agent.md +204 -24
- package/flows/aidlc/memory-bank.yaml +61 -10
- package/flows/aidlc/quick-start.md +7 -7
- package/flows/aidlc/skills/README.md +106 -0
- package/flows/aidlc/skills/construction/bolt-start.md +5 -1
- package/flows/aidlc/skills/construction/navigator.md +1 -1
- package/flows/aidlc/skills/inception/bolt-plan.md +3 -2
- package/flows/aidlc/skills/inception/context.md +2 -1
- package/flows/aidlc/skills/inception/intent-create.md +91 -2
- package/flows/aidlc/skills/inception/navigator.md +13 -8
- package/flows/aidlc/skills/inception/requirements.md +541 -95
- package/flows/aidlc/skills/inception/review.md +75 -11
- package/flows/aidlc/skills/inception/risks.md +541 -0
- package/flows/aidlc/skills/inception/story-create.md +2 -1
- package/flows/aidlc/skills/inception/units.md +2 -1
- package/flows/aidlc/skills/master/answer-question.md +1 -1
- package/flows/aidlc/skills/master/code-elevate.md +434 -0
- package/flows/aidlc/skills/master/explain-flow.md +6 -6
- package/flows/aidlc/skills/master/project-init.md +110 -12
- package/flows/aidlc/skills/operations/build.md +32 -4
- package/flows/aidlc/skills/operations/monitor.md +75 -14
- package/flows/aidlc/skills/operations/rollback.md +239 -0
- package/flows/aidlc/templates/README.md +128 -0
- package/flows/aidlc/templates/construction/bolt-template.md +5 -5
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/{ddd-02-technical-design-template.md → ddd-02-logical-design-template.md} +1 -1
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +123 -41
- package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +6 -6
- package/flows/aidlc/templates/construction/construction-guide.md +244 -0
- package/flows/aidlc/templates/construction/construction-log-template.md +7 -6
- package/flows/aidlc/templates/construction/elevation-dynamic-model-template.md +265 -0
- package/flows/aidlc/templates/construction/elevation-static-model-template.md +204 -0
- package/flows/aidlc/templates/inception/prfaq-template.md +147 -0
- package/flows/aidlc/templates/inception/requirements-template.md +70 -5
- package/flows/aidlc/templates/inception/risks-template.md +214 -0
- package/flows/aidlc/templates/operations/deployment-unit-template.md +228 -0
- package/package.json +1 -1
- package/flows/aidlc/templates/inception/project/README.md +0 -55
- /package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/{ddd-01-domain-model-template.md → ddd-01-domain-design-template.md} +0 -0
|
@@ -51,7 +51,7 @@ Show at start of this skill:
|
|
|
51
51
|
|
|
52
52
|
## Goal
|
|
53
53
|
|
|
54
|
-
Create deployable packages (containers, functions, bundles) for a Unit and
|
|
54
|
+
Create deployable packages (containers, functions, bundles) for a Unit and create/update the Deployment Unit artifact per AI-DLC specification.
|
|
55
55
|
|
|
56
56
|
---
|
|
57
57
|
|
|
@@ -63,6 +63,13 @@ Create deployable packages (containers, functions, bundles) for a Unit and docum
|
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
66
|
+
## Template
|
|
67
|
+
|
|
68
|
+
**Deployment Unit Template**: `.iris/aidlc/templates/operations/deployment-unit-template.md`
|
|
69
|
+
**Output Location**: `memory-bank/operations/deployment-units/{unit-name}.md`
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
66
73
|
## Process
|
|
67
74
|
|
|
68
75
|
### 1. Verify Prerequisites
|
|
@@ -115,7 +122,24 @@ Upload artifact to configured registry:
|
|
|
115
122
|
- Package → Package registry
|
|
116
123
|
- Function → Function storage
|
|
117
124
|
|
|
118
|
-
### 6.
|
|
125
|
+
### 6. Create/Update Deployment Unit
|
|
126
|
+
|
|
127
|
+
Create or update `memory-bank/operations/deployment-units/{unit-name}.md` using the template:
|
|
128
|
+
|
|
129
|
+
1. **If new**: Create from template with packaged artifacts section populated
|
|
130
|
+
2. **If exists**: Update the Packaged Artifacts and Deployment History sections
|
|
131
|
+
|
|
132
|
+
**Required sections to populate:**
|
|
133
|
+
- Packaged Artifacts (executable code, registry location)
|
|
134
|
+
- Version and status
|
|
135
|
+
- Build timestamp
|
|
136
|
+
|
|
137
|
+
**Sections populated by other skills:**
|
|
138
|
+
- Test Validation → populated by `verify` skill
|
|
139
|
+
- Deployment History → updated by `deploy` skill
|
|
140
|
+
- Monitoring Integration → populated by `monitor` skill
|
|
141
|
+
|
|
142
|
+
### 7. Document Build
|
|
119
143
|
|
|
120
144
|
Create/update `deployment/build.md`:
|
|
121
145
|
|
|
@@ -175,7 +199,8 @@ status: success
|
|
|
175
199
|
|
|
176
200
|
### Documentation Updated
|
|
177
201
|
|
|
178
|
-
- `{unit-
|
|
202
|
+
- `memory-bank/operations/deployment-units/{unit-name}.md` (Deployment Unit)
|
|
203
|
+
- `{unit-path}/deployment/build.md` (Build metadata)
|
|
179
204
|
|
|
180
205
|
### Actions
|
|
181
206
|
|
|
@@ -256,7 +281,10 @@ After build approved and completed:
|
|
|
256
281
|
|
|
257
282
|
```yaml
|
|
258
283
|
input: Unit name, version
|
|
259
|
-
output:
|
|
284
|
+
output:
|
|
285
|
+
- Deployable artifact (container/function/package)
|
|
286
|
+
- memory-bank/operations/deployment-units/{unit}.md (Deployment Unit)
|
|
287
|
+
- deployment/build.md (Build metadata)
|
|
260
288
|
checkpoints: 1
|
|
261
289
|
- Checkpoint 1: Build approved by user
|
|
262
290
|
```
|
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
- ✅ Dashboards created and linked
|
|
17
17
|
- ✅ Alerts configured with thresholds
|
|
18
|
-
- ✅ SLOs defined
|
|
19
|
-
- ✅ Runbooks documented
|
|
18
|
+
- ✅ SLOs defined (traced to requirements.md)
|
|
19
|
+
- ✅ Runbooks documented and stored in `memory-bank/operations/playbooks/`
|
|
20
|
+
- ✅ AI recommendations enabled based on playbooks
|
|
20
21
|
|
|
21
22
|
## Failure Modes
|
|
22
23
|
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
- ❌ Missing dashboard URLs
|
|
25
26
|
- ❌ Alerts without thresholds
|
|
26
27
|
- ❌ No runbooks for common issues
|
|
28
|
+
- ❌ SLOs not traced to requirements
|
|
27
29
|
|
|
28
30
|
---
|
|
29
31
|
|
|
@@ -51,7 +53,7 @@ Show at start of this skill:
|
|
|
51
53
|
|
|
52
54
|
## Goal
|
|
53
55
|
|
|
54
|
-
Configure observability (metrics, logging, alerting) for the unit and document operational runbooks.
|
|
56
|
+
Configure observability (metrics, logging, alerting) for the unit and document operational runbooks. Per AI-DLC specification, AI integrates with predefined incident runbooks to propose actionable recommendations for operational issues.
|
|
55
57
|
|
|
56
58
|
---
|
|
57
59
|
|
|
@@ -59,10 +61,25 @@ Configure observability (metrics, logging, alerting) for the unit and document o
|
|
|
59
61
|
|
|
60
62
|
- **Required**: `--unit` - The unit to monitor
|
|
61
63
|
- **Required**: `.iris/aidlc/memory-bank.yaml` - artifact schema
|
|
64
|
+
- **Required**: `memory-bank/intents/{intent}/requirements.md` - SLOs from requirements
|
|
62
65
|
- **Optional**: `--env` - Specific environment (default: all)
|
|
63
66
|
|
|
64
67
|
---
|
|
65
68
|
|
|
69
|
+
## Context Loading
|
|
70
|
+
|
|
71
|
+
Before configuring monitoring, load:
|
|
72
|
+
|
|
73
|
+
1. **Requirements** (`memory-bank/intents/{intent}/requirements.md`)
|
|
74
|
+
- Extract SLOs from Measurement Criteria section
|
|
75
|
+
- Use defined latency, availability, throughput targets
|
|
76
|
+
|
|
77
|
+
2. **Existing Playbooks** (`memory-bank/operations/playbooks/`)
|
|
78
|
+
- Check for existing runbooks to extend
|
|
79
|
+
- Ensure consistency across units
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
66
83
|
## Process
|
|
67
84
|
|
|
68
85
|
### 1. Identify Key Metrics
|
|
@@ -74,9 +91,24 @@ Implement RED method (Rate, Errors, Duration):
|
|
|
74
91
|
- **Duration**: Latency percentiles → Performance
|
|
75
92
|
- **Saturation**: CPU, Memory, Connections → Capacity
|
|
76
93
|
|
|
77
|
-
### 2. Define SLIs/SLOs
|
|
94
|
+
### 2. Define SLIs/SLOs (From Requirements)
|
|
95
|
+
|
|
96
|
+
**IMPORTANT**: SLOs must trace to the Measurement Criteria defined in `requirements.md`.
|
|
97
|
+
|
|
98
|
+
Load SLOs from requirements and configure monitoring:
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
### SLO Traceability
|
|
102
|
+
|
|
103
|
+
| SLO | Target | Source | Alert Threshold |
|
|
104
|
+
|-----|--------|--------|-----------------|
|
|
105
|
+
| Availability | {from requirements} | requirements.md | < target - 0.1% |
|
|
106
|
+
| Latency (p95) | {from requirements} | requirements.md | > target + 50ms |
|
|
107
|
+
| Error Rate | {from requirements} | requirements.md | > target + 0.05% |
|
|
108
|
+
| Throughput | {from requirements} | requirements.md | < target - 10% |
|
|
109
|
+
```
|
|
78
110
|
|
|
79
|
-
|
|
111
|
+
Default SLOs (if not specified in requirements):
|
|
80
112
|
|
|
81
113
|
- **Availability**: 99.9% (measured by uptime)
|
|
82
114
|
- **Latency**: p95 < 200ms (measured by response time)
|
|
@@ -141,14 +173,25 @@ Dashboard layout recommendation:
|
|
|
141
173
|
- Connection pools
|
|
142
174
|
```
|
|
143
175
|
|
|
144
|
-
### 6. Document Runbooks
|
|
176
|
+
### 6. Document Runbooks (Playbook Integration)
|
|
177
|
+
|
|
178
|
+
Per AI-DLC specification: "AI integrates with predefined incident runbooks, proposing actionable recommendations such as resource scaling, performance tuning, or fault isolation."
|
|
145
179
|
|
|
146
|
-
|
|
180
|
+
**Playbook Storage**: `memory-bank/operations/playbooks/`
|
|
181
|
+
|
|
182
|
+
Create operational runbooks that AI can reference to propose actions:
|
|
147
183
|
|
|
148
184
|
```markdown
|
|
149
185
|
### Runbook: High Error Rate
|
|
150
186
|
|
|
151
187
|
**Trigger**: Error rate > 1% for 5 minutes
|
|
188
|
+
**Playbook File**: `memory-bank/operations/playbooks/high-error-rate.md`
|
|
189
|
+
|
|
190
|
+
**AI Recommendations** (proposed when triggered):
|
|
191
|
+
1. Check recent deployments → If found, propose rollback
|
|
192
|
+
2. Review error logs → Propose fix based on error pattern
|
|
193
|
+
3. Check external dependencies → Propose circuit breaker or fallback
|
|
194
|
+
4. Resource issues → Propose scaling action
|
|
152
195
|
|
|
153
196
|
**Steps**:
|
|
154
197
|
1. Check recent deployments
|
|
@@ -160,6 +203,14 @@ Create operational runbooks:
|
|
|
160
203
|
**Escalation**: If unresolved in 15 min, escalate to {team}
|
|
161
204
|
```
|
|
162
205
|
|
|
206
|
+
**Required Playbooks** (create in `memory-bank/operations/playbooks/`):
|
|
207
|
+
|
|
208
|
+
1. `high-error-rate.md` - Error rate exceeds threshold
|
|
209
|
+
2. `high-latency.md` - Latency exceeds SLO
|
|
210
|
+
3. `service-down.md` - Health check failures
|
|
211
|
+
4. `resource-exhaustion.md` - CPU/Memory critical
|
|
212
|
+
5. `deployment-failure.md` - Deployment rollback procedures
|
|
213
|
+
|
|
163
214
|
### 7. Document Configuration
|
|
164
215
|
|
|
165
216
|
Create/update `deployment/monitoring.md`:
|
|
@@ -184,10 +235,13 @@ configured: {timestamp}
|
|
|
184
235
|
- **High Latency**: p95 > 500ms → Slack
|
|
185
236
|
- **Service Down**: Health failing → PagerDuty
|
|
186
237
|
|
|
187
|
-
### SLOs
|
|
238
|
+
### SLOs (Traced to Requirements)
|
|
188
239
|
|
|
189
|
-
|
|
190
|
-
|
|
240
|
+
| SLO | Target | Source |
|
|
241
|
+
|-----|--------|--------|
|
|
242
|
+
| Availability | 99.9% | requirements.md → Measurement Criteria |
|
|
243
|
+
| Latency (p95) | < 200ms | requirements.md → Measurement Criteria |
|
|
244
|
+
| Error Rate | < 0.1% | requirements.md → Measurement Criteria |
|
|
191
245
|
|
|
192
246
|
### Logs
|
|
193
247
|
|
|
@@ -195,11 +249,18 @@ configured: {timestamp}
|
|
|
195
249
|
- **Query**: `service="{unit}"`
|
|
196
250
|
- **Retention**: {days}
|
|
197
251
|
|
|
198
|
-
###
|
|
252
|
+
### Playbooks (AI-Integrated)
|
|
253
|
+
|
|
254
|
+
Location: `memory-bank/operations/playbooks/`
|
|
255
|
+
|
|
256
|
+
| Playbook | Trigger | AI Action |
|
|
257
|
+
|----------|---------|-----------|
|
|
258
|
+
| `high-error-rate.md` | Error > 1% | Propose rollback or fix |
|
|
259
|
+
| `high-latency.md` | p95 > SLO | Propose scaling or optimization |
|
|
260
|
+
| `service-down.md` | Health failing | Propose restart or failover |
|
|
261
|
+
| `resource-exhaustion.md` | CPU/Mem > 90% | Propose scale-up |
|
|
199
262
|
|
|
200
|
-
|
|
201
|
-
- **Performance Degradation**: `runbook/performance.md`
|
|
202
|
-
- **Service Recovery**: `runbook/recovery.md`
|
|
263
|
+
AI will reference these playbooks to propose actionable recommendations during incidents.
|
|
203
264
|
```
|
|
204
265
|
|
|
205
266
|
---
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Skill: Rollback Deployment
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Mandatory Output Rules (READ FIRST)
|
|
6
|
+
|
|
7
|
+
- 🚫 **NEVER** use ASCII tables for options - they break at different terminal widths
|
|
8
|
+
- ✅ **ALWAYS** use numbered list format: `N - **Option**: Description`
|
|
9
|
+
- ✅ **ALWAYS** use status indicators: ✅ (done) ⏳ (current) [ ] (pending) 🚫 (blocked)
|
|
10
|
+
- ✅ **ALWAYS** show rollback target version clearly
|
|
11
|
+
- ⚠️ **ALWAYS** display warnings prominently for production rollbacks
|
|
12
|
+
- 🛑 **STOP** at rollback confirmation - require explicit approval
|
|
13
|
+
|
|
14
|
+
## Success Metrics
|
|
15
|
+
|
|
16
|
+
- ✅ Previous stable version identified
|
|
17
|
+
- ✅ Rollback executed successfully
|
|
18
|
+
- ✅ Verification completed after rollback
|
|
19
|
+
- ✅ Incident documented
|
|
20
|
+
|
|
21
|
+
## Failure Modes
|
|
22
|
+
|
|
23
|
+
- ❌ Rollback without confirmation
|
|
24
|
+
- ❌ Missing verification after rollback
|
|
25
|
+
- ❌ Not documenting the incident
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Goal
|
|
30
|
+
|
|
31
|
+
Safely rollback a deployment to a previous stable version when issues are detected.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Input
|
|
36
|
+
|
|
37
|
+
- **Required**: `--unit` - The unit to rollback
|
|
38
|
+
- **Required**: `--env` - Environment to rollback (dev, staging, production)
|
|
39
|
+
- **Required**: `.iris/aidlc/memory-bank.yaml` - artifact schema
|
|
40
|
+
- **Optional**: `--version` - Specific version to rollback to (default: previous stable)
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Process
|
|
45
|
+
|
|
46
|
+
### 1. Verify Current State
|
|
47
|
+
|
|
48
|
+
Check deployment status:
|
|
49
|
+
|
|
50
|
+
- [ ] **Current version**: Identify deployed version
|
|
51
|
+
- [ ] **Issue detected**: Document the problem triggering rollback
|
|
52
|
+
- [ ] **Previous versions**: List available rollback targets
|
|
53
|
+
|
|
54
|
+
### 2. Identify Rollback Target
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
## Rollback Target
|
|
58
|
+
|
|
59
|
+
**Current Version**: {current-version}
|
|
60
|
+
**Issue**: {issue-description}
|
|
61
|
+
|
|
62
|
+
### Available Rollback Targets
|
|
63
|
+
|
|
64
|
+
1 - **{previous-version}**: Deployed {timestamp} - Status: stable
|
|
65
|
+
2 - **{older-version}**: Deployed {timestamp} - Status: stable
|
|
66
|
+
|
|
67
|
+
### Recommended Target
|
|
68
|
+
|
|
69
|
+
→ **{previous-version}** - Last known stable version
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 3. Rollback Confirmation
|
|
73
|
+
|
|
74
|
+
**Checkpoint**: Ask user to confirm rollback:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
⚠️ Rollback Confirmation Required
|
|
78
|
+
|
|
79
|
+
Environment: {env}
|
|
80
|
+
Current Version: {current-version}
|
|
81
|
+
Target Version: {target-version}
|
|
82
|
+
|
|
83
|
+
This will:
|
|
84
|
+
1. Stop current deployment
|
|
85
|
+
2. Deploy previous version
|
|
86
|
+
3. Verify rollback success
|
|
87
|
+
|
|
88
|
+
Proceed with rollback?
|
|
89
|
+
1 - Yes, rollback
|
|
90
|
+
2 - Cancel
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Wait for user response.**
|
|
94
|
+
|
|
95
|
+
### 4. Execute Rollback
|
|
96
|
+
|
|
97
|
+
Perform rollback steps:
|
|
98
|
+
|
|
99
|
+
1. **Stop current deployment**: Graceful shutdown
|
|
100
|
+
2. **Deploy target version**: Use existing deployment artifacts
|
|
101
|
+
3. **Health check**: Verify service is responding
|
|
102
|
+
4. **Traffic routing**: Restore traffic to rolled-back version
|
|
103
|
+
|
|
104
|
+
### 5. Verify Rollback
|
|
105
|
+
|
|
106
|
+
Run verification checks:
|
|
107
|
+
|
|
108
|
+
- [ ] **Health endpoints**: All responding
|
|
109
|
+
- [ ] **Smoke tests**: Critical paths working
|
|
110
|
+
- [ ] **Error rates**: Back to baseline
|
|
111
|
+
- [ ] **Latency**: Within acceptable range
|
|
112
|
+
|
|
113
|
+
### 6. Document Incident
|
|
114
|
+
|
|
115
|
+
Update deployment history in `memory-bank/operations/deployment-units/{unit-name}.md`:
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
## Rollback Record
|
|
119
|
+
|
|
120
|
+
| Date | From | To | Environment | Reason | Status |
|
|
121
|
+
|------|------|------|-------------|--------|--------|
|
|
122
|
+
| {timestamp} | {from-version} | {to-version} | {env} | {reason} | ✅ success |
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Create incident record if production:
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
## Incident: {timestamp}
|
|
129
|
+
|
|
130
|
+
### Summary
|
|
131
|
+
Rollback from {from-version} to {to-version} in {env}
|
|
132
|
+
|
|
133
|
+
### Root Cause
|
|
134
|
+
{description of issue}
|
|
135
|
+
|
|
136
|
+
### Timeline
|
|
137
|
+
- {time}: Issue detected
|
|
138
|
+
- {time}: Rollback initiated
|
|
139
|
+
- {time}: Rollback completed
|
|
140
|
+
- {time}: Verification passed
|
|
141
|
+
|
|
142
|
+
### Action Items
|
|
143
|
+
- [ ] Investigate root cause
|
|
144
|
+
- [ ] Fix issue in codebase
|
|
145
|
+
- [ ] Re-deploy when fixed
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Output
|
|
151
|
+
|
|
152
|
+
```markdown
|
|
153
|
+
## Rollback Complete: {unit-name}
|
|
154
|
+
|
|
155
|
+
### Status: ✅ SUCCESS
|
|
156
|
+
|
|
157
|
+
### Details
|
|
158
|
+
|
|
159
|
+
- **Environment**: {env}
|
|
160
|
+
- **Previous Version**: {from-version}
|
|
161
|
+
- **Current Version**: {to-version}
|
|
162
|
+
- **Rollback Time**: {duration}
|
|
163
|
+
|
|
164
|
+
### Verification Results
|
|
165
|
+
|
|
166
|
+
- ✅ Health checks passing
|
|
167
|
+
- ✅ Smoke tests passing
|
|
168
|
+
- ✅ Error rate normal
|
|
169
|
+
- ✅ Latency within bounds
|
|
170
|
+
|
|
171
|
+
### Documentation Updated
|
|
172
|
+
|
|
173
|
+
- `memory-bank/operations/deployment-units/{unit-name}.md`
|
|
174
|
+
|
|
175
|
+
### Actions
|
|
176
|
+
|
|
177
|
+
1 - **investigate**: Review logs for root cause
|
|
178
|
+
2 - **redeploy**: Attempt deployment again after fix
|
|
179
|
+
3 - **menu**: Return to operations menu
|
|
180
|
+
|
|
181
|
+
### Suggested Next Step
|
|
182
|
+
|
|
183
|
+
→ **investigate** - Review logs to identify root cause
|
|
184
|
+
|
|
185
|
+
**Type a number or press Enter for suggested action.**
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Output (Rollback Failed)
|
|
191
|
+
|
|
192
|
+
```markdown
|
|
193
|
+
## Rollback Failed: {unit-name}
|
|
194
|
+
|
|
195
|
+
### Error
|
|
196
|
+
```text
|
|
197
|
+
{error message}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Current State
|
|
201
|
+
|
|
202
|
+
- **Environment**: {env}
|
|
203
|
+
- **Attempted Target**: {target-version}
|
|
204
|
+
- **Actual State**: {current-state}
|
|
205
|
+
|
|
206
|
+
### Immediate Actions
|
|
207
|
+
|
|
208
|
+
1. Check infrastructure status
|
|
209
|
+
2. Review deployment logs
|
|
210
|
+
3. Consider manual intervention
|
|
211
|
+
4. Escalate if needed
|
|
212
|
+
|
|
213
|
+
### Emergency Contacts
|
|
214
|
+
|
|
215
|
+
{From project configuration or runbooks}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Transition
|
|
221
|
+
|
|
222
|
+
After rollback:
|
|
223
|
+
|
|
224
|
+
- → **investigate**: Review logs for root cause
|
|
225
|
+
- → **menu**: Return to operations menu
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Test Contract
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
input: Unit name, environment, target version (optional)
|
|
233
|
+
output:
|
|
234
|
+
- Rolled back deployment
|
|
235
|
+
- Updated deployment history
|
|
236
|
+
- Incident documentation (if production)
|
|
237
|
+
checkpoints: 1
|
|
238
|
+
- Rollback confirmation by user
|
|
239
|
+
```
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# AI-DLC Templates
|
|
2
|
+
|
|
3
|
+
Templates provide consistent structure for artifacts created during the AI-DLC workflow. Each template corresponds to an artifact type defined in `../memory-bank.yaml`.
|
|
4
|
+
|
|
5
|
+
## Directory Structure
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
templates/
|
|
9
|
+
├── inception/ # Inception phase templates
|
|
10
|
+
│ ├── requirements-template.md # Requirements document
|
|
11
|
+
│ ├── prfaq-template.md # Press Release / FAQ
|
|
12
|
+
│ ├── risks-template.md # Risk assessment
|
|
13
|
+
│ ├── system-context-template.md # System context diagram
|
|
14
|
+
│ ├── units-template.md # Unit decomposition overview
|
|
15
|
+
│ ├── unit-brief-template.md # Individual unit brief
|
|
16
|
+
│ ├── stories-template.md # Stories collection
|
|
17
|
+
│ ├── story-template.md # Individual user story
|
|
18
|
+
│ └── inception-log-template.md # Inception progress log
|
|
19
|
+
│
|
|
20
|
+
├── construction/ # Construction phase templates
|
|
21
|
+
│ ├── bolt-template.md # Bolt instance metadata
|
|
22
|
+
│ ├── construction-guide.md # Construction workflow guide
|
|
23
|
+
│ ├── construction-log-template.md # Construction progress log
|
|
24
|
+
│ ├── elevation-static-model-template.md # Brownfield static model
|
|
25
|
+
│ ├── elevation-dynamic-model-template.md # Brownfield dynamic model
|
|
26
|
+
│ │
|
|
27
|
+
│ ├── bolt-types/ # Bolt type definitions
|
|
28
|
+
│ │ ├── ddd-construction-bolt.md # DDD bolt (5 stages)
|
|
29
|
+
│ │ ├── simple-construction-bolt.md # Simple bolt (3 stages)
|
|
30
|
+
│ │ ├── spike-bolt.md # Research/exploration bolt
|
|
31
|
+
│ │ │
|
|
32
|
+
│ │ └── ddd-construction-bolt/ # DDD bolt stage templates
|
|
33
|
+
│ │ ├── ddd-01-domain-design-template.md # Domain design
|
|
34
|
+
│ │ ├── ddd-02-logical-design-template.md # Logical design
|
|
35
|
+
│ │ ├── ddd-03-test-report-template.md # Test report
|
|
36
|
+
│ │ └── adr-template.md # ADR template
|
|
37
|
+
│ │
|
|
38
|
+
│ └── standards/ # Standards templates
|
|
39
|
+
│ ├── tech-stack.md # Tech stack template
|
|
40
|
+
│ ├── coding-standards.md # Coding standards template
|
|
41
|
+
│ └── system-architecture.md # Architecture template
|
|
42
|
+
│
|
|
43
|
+
├── operations/ # Operations phase templates
|
|
44
|
+
│ └── deployment-unit-template.md # Deployment unit documentation
|
|
45
|
+
│
|
|
46
|
+
└── standards/ # Standards facilitation
|
|
47
|
+
├── catalog.yaml # Standards registry
|
|
48
|
+
├── tech-stack.guide.md # Tech stack guide
|
|
49
|
+
├── coding-standards.guide.md # Coding standards guide
|
|
50
|
+
└── data-stack.guide.md # Data stack guide
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Template Usage
|
|
54
|
+
|
|
55
|
+
### Inception Templates
|
|
56
|
+
Used by Inception Agent skills to create planning artifacts:
|
|
57
|
+
- **requirements-template.md**: Captures functional and non-functional requirements
|
|
58
|
+
- **prfaq-template.md**: Documents business intent and expected benefits
|
|
59
|
+
- **risks-template.md**: Identifies and assesses project risks
|
|
60
|
+
- **unit-brief-template.md**: Defines scope and details for each unit
|
|
61
|
+
|
|
62
|
+
### Construction Templates
|
|
63
|
+
Used by Construction Agent during bolt execution:
|
|
64
|
+
|
|
65
|
+
**Bolt Types** define the stages and checkpoints for different types of work:
|
|
66
|
+
- **ddd-construction-bolt.md**: For complex business logic (5 stages)
|
|
67
|
+
1. Domain Design
|
|
68
|
+
2. Logical Design
|
|
69
|
+
3. ADR Analysis (optional)
|
|
70
|
+
4. Code Generation
|
|
71
|
+
5. Testing
|
|
72
|
+
|
|
73
|
+
- **simple-construction-bolt.md**: For UI/integrations (3 stages)
|
|
74
|
+
1. Plan
|
|
75
|
+
2. Code Generation
|
|
76
|
+
3. Testing
|
|
77
|
+
|
|
78
|
+
- **spike-bolt.md**: For research and exploration
|
|
79
|
+
|
|
80
|
+
**Stage Templates** (in `bolt-types/ddd-construction-bolt/`):
|
|
81
|
+
- **ddd-01-domain-design-template.md**: Entities, value objects, aggregates
|
|
82
|
+
- **ddd-02-logical-design-template.md**: APIs, schemas, cloud resources
|
|
83
|
+
- **ddd-03-test-report-template.md**: Test results and coverage
|
|
84
|
+
|
|
85
|
+
### Operations Templates
|
|
86
|
+
Used by Operations Agent for deployment:
|
|
87
|
+
- **deployment-unit-template.md**: Documents deployment artifacts, configurations, and infrastructure
|
|
88
|
+
|
|
89
|
+
### Standards Templates
|
|
90
|
+
Used by Master Agent during project initialization:
|
|
91
|
+
- Facilitation guides help agents gather project standards through conversation
|
|
92
|
+
- Standards are saved to `memory-bank/standards/`
|
|
93
|
+
|
|
94
|
+
## Template Structure
|
|
95
|
+
|
|
96
|
+
Templates use YAML frontmatter for metadata and markdown for content:
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
---
|
|
100
|
+
unit: {UUU}-{unit-name}
|
|
101
|
+
intent: {NNN}-{intent-name}
|
|
102
|
+
created: {YYYY-MM-DDTHH:MM:SSZ}
|
|
103
|
+
status: draft | complete
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
# {Artifact Title}
|
|
107
|
+
|
|
108
|
+
## Section 1
|
|
109
|
+
{Content with placeholders like {placeholder}}
|
|
110
|
+
|
|
111
|
+
## Section 2
|
|
112
|
+
{More content}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Key Conventions
|
|
116
|
+
|
|
117
|
+
1. **Placeholders**: Use `{placeholder-name}` for values to be filled in
|
|
118
|
+
2. **Numbering**: Use `{NNN}` for 3-digit intent numbers, `{UUU}` for unit numbers, `{BBB}` for bolt numbers
|
|
119
|
+
3. **Timestamps**: Use ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`)
|
|
120
|
+
4. **Status values**: Consistent across templates (draft, complete, in-progress, etc.)
|
|
121
|
+
|
|
122
|
+
## Adding New Templates
|
|
123
|
+
|
|
124
|
+
1. Create template in the appropriate phase folder
|
|
125
|
+
2. Include YAML frontmatter with required fields
|
|
126
|
+
3. Use consistent placeholder naming
|
|
127
|
+
4. Document the template's purpose in the header
|
|
128
|
+
5. Reference the template in relevant skill files
|
|
@@ -15,8 +15,8 @@ Use this template when creating new bolt instances during bolt planning.
|
|
|
15
15
|
```text
|
|
16
16
|
memory-bank/bolts/{bolt-id}/
|
|
17
17
|
├── bolt.md # Bolt instance metadata (this template)
|
|
18
|
-
├── ddd-01-domain-
|
|
19
|
-
├── ddd-02-
|
|
18
|
+
├── ddd-01-domain-design.md # Stage 1 artifact (created during execution)
|
|
19
|
+
├── ddd-02-logical-design.md # Stage 2 artifact (created during execution)
|
|
20
20
|
└── ddd-03-test-report.md # Stage 4 artifact (created during execution)
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -167,7 +167,7 @@ current_stage: design
|
|
|
167
167
|
stages_completed:
|
|
168
168
|
- name: model
|
|
169
169
|
completed: 2024-12-05T10:00:00Z
|
|
170
|
-
artifact: ddd-01-domain-
|
|
170
|
+
artifact: ddd-01-domain-design.md
|
|
171
171
|
|
|
172
172
|
requires_bolts: []
|
|
173
173
|
enables_bolts:
|
|
@@ -204,8 +204,8 @@ Implement core authentication functionality including user registration with ema
|
|
|
204
204
|
|
|
205
205
|
## Stages
|
|
206
206
|
|
|
207
|
-
- ✅ **1. model**: Complete → ddd-01-domain-
|
|
208
|
-
- ⏳ **2. design**: In Progress → ddd-02-
|
|
207
|
+
- ✅ **1. model**: Complete → ddd-01-domain-design.md
|
|
208
|
+
- ⏳ **2. design**: In Progress → ddd-02-logical-design.md ← current
|
|
209
209
|
- [ ] **3. implement**: Pending → src/auth-service/
|
|
210
210
|
- [ ] **4. test**: Pending → ddd-03-test-report.md
|
|
211
211
|
|