@damphuquy/agent-init 1.0.2 → 1.0.3
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 +41 -109
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +17 -4
- package/dist/config.js.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/README.md +29 -0
- package/templates/.agents/behavior.md +72 -0
- package/templates/.agents/conventions/naming.md +55 -0
- package/templates/.agents/guardrails.md +76 -0
- package/templates/AGENTS.md +77 -48
- package/templates/process/README.md +88 -29
- package/templates/process/_seeds/_GUIDE.md +121 -10
- package/templates/process/_seeds/context-group.md.seed +147 -17
- package/templates/process/_seeds/decision-template.md.seed +143 -0
- package/templates/process/_seeds/handoff-template.md.seed +79 -0
- package/templates/process/_seeds/plan-template.md.seed +135 -0
- package/templates/process/_seeds/review-template.md.seed +148 -0
- package/templates/process/_seeds/state-template.md.seed +149 -0
- package/templates/process/_seeds/task-template.md.seed +131 -28
- package/templates/process/context/all-context.md +1 -1
- package/templates/.agents/name_rule.md +0 -3
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Decision: [DEC-ID] [Task ID]
|
|
2
|
+
|
|
3
|
+
<technical_decision task_id="[TASK-ID]" dec_id="[DEC-ID]" version="1.0" framework="RIPER-5">
|
|
4
|
+
|
|
5
|
+
<!-- READ-ONLY PHASE. Present options. Do not decide without engineer approval. -->
|
|
6
|
+
<decision_status>
|
|
7
|
+
<phase>INNOVATE</phase>
|
|
8
|
+
<mode>READ-ONLY</mode>
|
|
9
|
+
<decision_owner></decision_owner>
|
|
10
|
+
<last_updated></last_updated>
|
|
11
|
+
</decision_status>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. Context
|
|
16
|
+
|
|
17
|
+
<context>
|
|
18
|
+
<task>[Link to task.md or task ID]</task>
|
|
19
|
+
<research_artifact>[Link to research.md]</research_artifact>
|
|
20
|
+
<constraints>
|
|
21
|
+
[Key constraints from research that narrow the solution space.]
|
|
22
|
+
</constraints>
|
|
23
|
+
</context>
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. Decision Required
|
|
28
|
+
|
|
29
|
+
<decision_question>
|
|
30
|
+
[Precise statement of what must be decided. One question per decision artifact.]
|
|
31
|
+
</decision_question>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Options
|
|
36
|
+
|
|
37
|
+
<options>
|
|
38
|
+
|
|
39
|
+
<option id="A">
|
|
40
|
+
<approach>[High-level implementation approach]</approach>
|
|
41
|
+
<advantages>-</advantages>
|
|
42
|
+
<disadvantages>-</disadvantages>
|
|
43
|
+
<complexity>LOW | MEDIUM | HIGH</complexity>
|
|
44
|
+
<compatibility>[Backward compatibility impact]</compatibility>
|
|
45
|
+
<concurrency_transaction_risk>[Race conditions, lock contention, rollback complexity]</concurrency_transaction_risk>
|
|
46
|
+
<testability>[How easy to verify this option]</testability>
|
|
47
|
+
<maintainability>[Long-term maintenance burden]</maintainability>
|
|
48
|
+
</option>
|
|
49
|
+
|
|
50
|
+
<option id="B">
|
|
51
|
+
<approach>[High-level implementation approach]</approach>
|
|
52
|
+
<advantages>-</advantages>
|
|
53
|
+
<disadvantages>-</disadvantages>
|
|
54
|
+
<complexity>LOW | MEDIUM | HIGH</complexity>
|
|
55
|
+
<compatibility>[Backward compatibility impact]</compatibility>
|
|
56
|
+
<concurrency_transaction_risk>[Race conditions, lock contention, rollback complexity]</concurrency_transaction_risk>
|
|
57
|
+
<testability>[How easy to verify this option]</testability>
|
|
58
|
+
<maintainability>[Long-term maintenance burden]</maintainability>
|
|
59
|
+
</option>
|
|
60
|
+
|
|
61
|
+
<option id="C">
|
|
62
|
+
<approach>[High-level implementation approach]</approach>
|
|
63
|
+
<advantages>-</advantages>
|
|
64
|
+
<disadvantages>-</disadvantages>
|
|
65
|
+
<complexity>LOW | MEDIUM | HIGH</complexity>
|
|
66
|
+
<compatibility>[Backward compatibility impact]</compatibility>
|
|
67
|
+
<concurrency_transaction_risk>[Race conditions, lock contention, rollback complexity]</concurrency_transaction_risk>
|
|
68
|
+
<testability>[How easy to verify this option]</testability>
|
|
69
|
+
<maintainability>[Long-term maintenance burden]</maintainability>
|
|
70
|
+
</option>
|
|
71
|
+
|
|
72
|
+
</options>
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 4. Trade-off Matrix
|
|
77
|
+
|
|
78
|
+
<tradeoff_matrix>
|
|
79
|
+
|
|
80
|
+
| Criterion | A | B | C |
|
|
81
|
+
|---|:---:|:---:|:---:|
|
|
82
|
+
| Compatibility | | | |
|
|
83
|
+
| Complexity | | | |
|
|
84
|
+
| Risk | | | |
|
|
85
|
+
| Testability | | | |
|
|
86
|
+
| Maintainability | | | |
|
|
87
|
+
|
|
88
|
+
<!-- Score: 1 (poor) → 5 (excellent) -->
|
|
89
|
+
</tradeoff_matrix>
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 5. Recommendation
|
|
94
|
+
|
|
95
|
+
<recommendation>
|
|
96
|
+
[Agent's recommended option with rationale. This is a proposal — engineer decides.]
|
|
97
|
+
</recommendation>
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 6. Engineer Decision
|
|
102
|
+
|
|
103
|
+
<!-- This section must be completed by the engineer before Gate 1 passes -->
|
|
104
|
+
<engineer_decision>
|
|
105
|
+
<selected_option></selected_option>
|
|
106
|
+
<rationale></rationale>
|
|
107
|
+
<rejected_alternatives>
|
|
108
|
+
- Option [X]: [Reason rejected]
|
|
109
|
+
</rejected_alternatives>
|
|
110
|
+
</engineer_decision>
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 7. Constraints Created by This Decision
|
|
115
|
+
|
|
116
|
+
<constraints_created>
|
|
117
|
+
[List any new constraints on implementation that flow into plan.md]
|
|
118
|
+
-
|
|
119
|
+
</constraints_created>
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 8. Evidence Still Required
|
|
124
|
+
|
|
125
|
+
<evidence_required>
|
|
126
|
+
[Any facts not yet confirmed that must be verified during the Plan or Execute phase]
|
|
127
|
+
-
|
|
128
|
+
</evidence_required>
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Gate 1 — Decision Approved
|
|
133
|
+
|
|
134
|
+
<gate id="G1">
|
|
135
|
+
- [ ] All options presented and trade-offs analyzed.
|
|
136
|
+
- [ ] Engineer reviewed options.
|
|
137
|
+
- [ ] Engineer selected option recorded above.
|
|
138
|
+
- [ ] No blocking business / schema / security decision remains open.
|
|
139
|
+
<approved_by></approved_by>
|
|
140
|
+
<approved_date></approved_date>
|
|
141
|
+
</gate>
|
|
142
|
+
|
|
143
|
+
</technical_decision>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Handoff: [TASK-ID]
|
|
2
|
+
|
|
3
|
+
<handoff task_id="[TASK-ID]" version="2.0" framework="RIPER-5">
|
|
4
|
+
|
|
5
|
+
<!-- Final projection. Short. Do not duplicate research/plan/review artifacts. -->
|
|
6
|
+
<!-- Answer: What changed? Why? What proves it? What remains risky? -->
|
|
7
|
+
|
|
8
|
+
<handoff_status>
|
|
9
|
+
<review_decision>PASS</review_decision> <!-- Must be PASS before handoff is valid -->
|
|
10
|
+
<review_artifact>[Link to review.md]</review_artifact>
|
|
11
|
+
<completed_date></completed_date>
|
|
12
|
+
</handoff_status>
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 1. What Changed
|
|
17
|
+
|
|
18
|
+
<what_changed>
|
|
19
|
+
[Concise summary of the behavior change delivered. Reference the task goal.]
|
|
20
|
+
</what_changed>
|
|
21
|
+
|
|
22
|
+
<main_changes>
|
|
23
|
+
- `path/to/file` — [Nature of change]
|
|
24
|
+
</main_changes>
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. Why
|
|
29
|
+
|
|
30
|
+
<why>
|
|
31
|
+
[Business/technical rationale. One paragraph. Link to task.md for full context.]
|
|
32
|
+
</why>
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 3. What Proves It
|
|
37
|
+
|
|
38
|
+
<evidence>
|
|
39
|
+
|
|
40
|
+
| AC | Verifier | Result |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| AC-1 | `[command]` | PASS |
|
|
43
|
+
| AC-2 | `[command]` | PASS |
|
|
44
|
+
| AC-3 | `[command]` | PASS |
|
|
45
|
+
|
|
46
|
+
<!-- To reproduce: -->
|
|
47
|
+
```bash
|
|
48
|
+
[Verification commands in order]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
</evidence>
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 4. What Remains Risky
|
|
56
|
+
|
|
57
|
+
<residual_risk>
|
|
58
|
+
[Any risk accepted at Gate 3 that the next owner should be aware of.]
|
|
59
|
+
- [Risk item — mitigation or monitoring recommendation]
|
|
60
|
+
</residual_risk>
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 5. Decisions & Assumptions
|
|
65
|
+
|
|
66
|
+
<decisions_and_assumptions>
|
|
67
|
+
<!-- Only list decisions that affect future maintainers. Full record in decision.md. -->
|
|
68
|
+
- [Decision summary — why this approach was chosen over alternatives]
|
|
69
|
+
</decisions_and_assumptions>
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 6. Next Action
|
|
74
|
+
|
|
75
|
+
<next_action>
|
|
76
|
+
[What the next person or phase should do, if applicable. Otherwise: NONE.]
|
|
77
|
+
</next_action>
|
|
78
|
+
|
|
79
|
+
</handoff>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Plan: [PLAN-ID] [Task ID]
|
|
2
|
+
|
|
3
|
+
<execution_plan task_id="[TASK-ID]" plan_id="[PLAN-ID]" version="2.0" framework="RIPER-5">
|
|
4
|
+
|
|
5
|
+
<!-- PLAN PHASE. Plan artifacts only. No source-code changes. -->
|
|
6
|
+
<plan_status>
|
|
7
|
+
<phase>PLAN</phase>
|
|
8
|
+
<last_updated></last_updated>
|
|
9
|
+
</plan_status>
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Input Artifacts
|
|
14
|
+
|
|
15
|
+
<input_artifacts>
|
|
16
|
+
<task_spec>[Link to task.md]</task_spec>
|
|
17
|
+
<research>[Link to research.md]</research>
|
|
18
|
+
<decision>[Link to decision.md — DEC-ID, selected option]</decision>
|
|
19
|
+
</input_artifacts>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 2. Execution Constraints
|
|
24
|
+
|
|
25
|
+
<!-- These constraints bind the Execute phase. Agent must not exceed them. -->
|
|
26
|
+
<execution_constraints>
|
|
27
|
+
<allowed_files>
|
|
28
|
+
- `src/path/...` — [Reason]
|
|
29
|
+
- `tests/path/...` — [Reason]
|
|
30
|
+
</allowed_files>
|
|
31
|
+
<forbidden_files>
|
|
32
|
+
- `src/public-api/...` — [Not in scope]
|
|
33
|
+
- `schema/...` — [Schema changes require separate approval]
|
|
34
|
+
</forbidden_files>
|
|
35
|
+
<allowed_commands>
|
|
36
|
+
- `[test runner command]`
|
|
37
|
+
- `[lint/format command]`
|
|
38
|
+
</allowed_commands>
|
|
39
|
+
<restricted_operations>
|
|
40
|
+
- No DB migrations without explicit engineer approval.
|
|
41
|
+
- No new third-party dependencies without explicit engineer approval.
|
|
42
|
+
</restricted_operations>
|
|
43
|
+
<required_approvals>
|
|
44
|
+
- [List any mid-execute approvals required, e.g. before touching a shared module]
|
|
45
|
+
</required_approvals>
|
|
46
|
+
</execution_constraints>
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 3. Slice Summary
|
|
51
|
+
|
|
52
|
+
<slice_summary>
|
|
53
|
+
|
|
54
|
+
| ID | Behavior | Boundary | Files | AC | Verifier | Risk | Mode | Rollback |
|
|
55
|
+
|---|---|---|---|---|---|---|---|---|
|
|
56
|
+
| S1 | | | | | | | | |
|
|
57
|
+
| S2 | | | | | | | | |
|
|
58
|
+
|
|
59
|
+
</slice_summary>
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 4. Slice Details
|
|
64
|
+
|
|
65
|
+
<slices>
|
|
66
|
+
|
|
67
|
+
<slice id="S1">
|
|
68
|
+
<objective>[What behavior this slice delivers]</objective>
|
|
69
|
+
<change>[What specifically will be modified]</change>
|
|
70
|
+
<allowed_files>
|
|
71
|
+
- `src/path/file.py`
|
|
72
|
+
</allowed_files>
|
|
73
|
+
<acceptance_criteria>
|
|
74
|
+
- [ ] AC-N: [Criterion this slice satisfies]
|
|
75
|
+
</acceptance_criteria>
|
|
76
|
+
<verifier>
|
|
77
|
+
```bash
|
|
78
|
+
# Command(s) that prove this slice is correct
|
|
79
|
+
```
|
|
80
|
+
</verifier>
|
|
81
|
+
<expected_evidence>[What the verifier output must show]</expected_evidence>
|
|
82
|
+
<rollback_point>[What to undo if this slice fails — git stash / revert commit / flag]</rollback_point>
|
|
83
|
+
<stop_conditions>
|
|
84
|
+
- [Condition that requires halting and requesting human guidance]
|
|
85
|
+
</stop_conditions>
|
|
86
|
+
</slice>
|
|
87
|
+
|
|
88
|
+
<!-- Duplicate <slice> block for each additional slice -->
|
|
89
|
+
|
|
90
|
+
</slices>
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 5. Scope Contract
|
|
95
|
+
|
|
96
|
+
<scope_contract>
|
|
97
|
+
<allowed>
|
|
98
|
+
- [What the agent is permitted to change]
|
|
99
|
+
</allowed>
|
|
100
|
+
<forbidden>
|
|
101
|
+
- [What the agent must never touch during this plan]
|
|
102
|
+
</forbidden>
|
|
103
|
+
</scope_contract>
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 6. Verification Matrix
|
|
108
|
+
|
|
109
|
+
<!-- Populated during and after Execute phase -->
|
|
110
|
+
<verification_matrix>
|
|
111
|
+
|
|
112
|
+
| AC / Risk | Test / Command | Expected Evidence | Actual Result |
|
|
113
|
+
|---|---|---|---|
|
|
114
|
+
| AC-1 | | | |
|
|
115
|
+
| AC-2 | | | |
|
|
116
|
+
| AC-3 | | | |
|
|
117
|
+
|
|
118
|
+
</verification_matrix>
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Gate 2 — Plan Approved
|
|
123
|
+
|
|
124
|
+
<gate id="G2">
|
|
125
|
+
- [ ] Every slice has a defined verifier.
|
|
126
|
+
- [ ] Scope contract (allowed / forbidden) approved.
|
|
127
|
+
- [ ] Stop conditions defined per slice.
|
|
128
|
+
- [ ] Rollback point defined per slice.
|
|
129
|
+
- [ ] Allowed commands listed.
|
|
130
|
+
- [ ] Engineer approved.
|
|
131
|
+
<approved_by></approved_by>
|
|
132
|
+
<approved_date></approved_date>
|
|
133
|
+
</gate>
|
|
134
|
+
|
|
135
|
+
</execution_plan>
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Review: [REVIEW-ID] [Task ID]
|
|
2
|
+
|
|
3
|
+
<review_artifact task_id="[TASK-ID]" review_id="[REVIEW-ID]" version="1.0" framework="RIPER-5">
|
|
4
|
+
|
|
5
|
+
<!-- READ-ONLY PHASE. May run verification commands. No code fixes during review. -->
|
|
6
|
+
<review_status>
|
|
7
|
+
<phase>REVIEW</phase>
|
|
8
|
+
<mode>READ-ONLY</mode>
|
|
9
|
+
<reviewer></reviewer>
|
|
10
|
+
<last_updated></last_updated>
|
|
11
|
+
</review_status>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. Review Scope
|
|
16
|
+
|
|
17
|
+
<review_scope>
|
|
18
|
+
<task_spec>[Link to task.md]</task_spec>
|
|
19
|
+
<plan>[Link to plan.md]</plan>
|
|
20
|
+
<diff>[git diff range or PR link]</diff>
|
|
21
|
+
<tests>[Test suite path(s) executed]</tests>
|
|
22
|
+
</review_scope>
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. Behavior Review
|
|
27
|
+
|
|
28
|
+
<behavior_review>
|
|
29
|
+
|
|
30
|
+
| AC | Expected | Actual | Evidence | Result |
|
|
31
|
+
|---|---|---|---|---|
|
|
32
|
+
| AC-1 | | | | PASS / FAIL |
|
|
33
|
+
| AC-2 | | | | PASS / FAIL |
|
|
34
|
+
| AC-3 | | | | PASS / FAIL |
|
|
35
|
+
|
|
36
|
+
</behavior_review>
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 3. Architecture Review
|
|
41
|
+
|
|
42
|
+
<architecture_review>
|
|
43
|
+
<dependency_direction>[Are imports flowing in the correct direction per architecture rules?]</dependency_direction>
|
|
44
|
+
<boundary_violations>[Any cross-boundary calls that violate the declared scope?]</boundary_violations>
|
|
45
|
+
<unnecessary_abstraction>[Any indirection added without justification?]</unnecessary_abstraction>
|
|
46
|
+
<unrelated_refactor>[Any changes not required by the task spec?]</unrelated_refactor>
|
|
47
|
+
</architecture_review>
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 4. Data Review
|
|
52
|
+
|
|
53
|
+
<data_review>
|
|
54
|
+
<transaction>[Transaction boundaries correct? No partial commits?]</transaction>
|
|
55
|
+
<consistency>[Data consistency guaranteed under concurrent writes?]</consistency>
|
|
56
|
+
<concurrency>[Race conditions, lock contention, optimistic locking?]</concurrency>
|
|
57
|
+
<migration>[Any schema changes backward-compatible?]</migration>
|
|
58
|
+
<constraints>[DB constraints respected?]</constraints>
|
|
59
|
+
</data_review>
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 5. Security Review
|
|
64
|
+
|
|
65
|
+
<security_review>
|
|
66
|
+
<authentication>[Auth context checked where required?]</authentication>
|
|
67
|
+
<authorization>[Permission checks in place?]</authorization>
|
|
68
|
+
<validation>[Input validation and sanitization complete?]</validation>
|
|
69
|
+
<secrets>[No secrets, tokens, or credentials in code or logs?]</secrets>
|
|
70
|
+
<injection>[SQL/command injection vectors covered?]</injection>
|
|
71
|
+
<sensitive_logging>[No PII or sensitive data written to logs?]</sensitive_logging>
|
|
72
|
+
</security_review>
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 6. Regression Review
|
|
77
|
+
|
|
78
|
+
<regression_review>
|
|
79
|
+
<existing_behavior>[Existing tests still passing? No previously green tests now failing?]</existing_behavior>
|
|
80
|
+
<backward_compatibility>[Public API / schema backward-compatible?]</backward_compatibility>
|
|
81
|
+
<existing_tests>[Were existing tests modified without justification?]</existing_tests>
|
|
82
|
+
</regression_review>
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 7. Findings
|
|
87
|
+
|
|
88
|
+
<findings>
|
|
89
|
+
|
|
90
|
+
| ID | Category | Severity | Type | Evidence | File/Symbol | Required Action |
|
|
91
|
+
|---|---|---|---|---|---|---|
|
|
92
|
+
| F-1 | Behavior | HIGH | Confirmed Defect | | | |
|
|
93
|
+
|
|
94
|
+
<!-- Category: Behavior | Architecture | Data | Security | Regression | Scope -->
|
|
95
|
+
<!-- Severity: CRITICAL | HIGH | MEDIUM | LOW | INFO -->
|
|
96
|
+
<!-- Type: Confirmed Defect | Risk requiring validation | Optional Improvement -->
|
|
97
|
+
|
|
98
|
+
</findings>
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 8. Verification Matrix
|
|
103
|
+
|
|
104
|
+
<verification_matrix>
|
|
105
|
+
|
|
106
|
+
| AC / Risk | Verifier | Result | Evidence | Unverified |
|
|
107
|
+
|---|---|---|---|---|
|
|
108
|
+
| AC-1 | | PASS / FAIL | | |
|
|
109
|
+
| AC-2 | | PASS / FAIL | | |
|
|
110
|
+
| AC-3 | | PASS / FAIL | | |
|
|
111
|
+
|
|
112
|
+
</verification_matrix>
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 9. Residual Risk
|
|
117
|
+
|
|
118
|
+
<residual_risk>
|
|
119
|
+
[Risks that remain after review. Must be explicitly accepted before Gate 3 passes.]
|
|
120
|
+
-
|
|
121
|
+
</residual_risk>
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 10. Review Decision
|
|
126
|
+
|
|
127
|
+
<review_decision>
|
|
128
|
+
<!-- Choose one: PASS | CHANGES_REQUIRED | BLOCKED -->
|
|
129
|
+
<decision></decision>
|
|
130
|
+
<rationale></rationale>
|
|
131
|
+
</review_decision>
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Gate 3 — Review Passed
|
|
136
|
+
|
|
137
|
+
<gate id="G3">
|
|
138
|
+
- [ ] Full diff reviewed.
|
|
139
|
+
- [ ] All required evidence exists and is attached.
|
|
140
|
+
- [ ] All findings triaged (Confirmed Defects resolved or risk-accepted).
|
|
141
|
+
- [ ] Residual risk explicitly accepted.
|
|
142
|
+
- [ ] Review decision: PASS.
|
|
143
|
+
- [ ] Ready for handoff.
|
|
144
|
+
<approved_by></approved_by>
|
|
145
|
+
<approved_date></approved_date>
|
|
146
|
+
</gate>
|
|
147
|
+
|
|
148
|
+
</review_artifact>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# State: [TASK-ID]
|
|
2
|
+
|
|
3
|
+
<loop_state task_id="[TASK-ID]" version="2.0" framework="RIPER-5">
|
|
4
|
+
|
|
5
|
+
<!-- The persistent memory of the Execute loop. Update after every slice. -->
|
|
6
|
+
<state_header>
|
|
7
|
+
<current_phase>EXECUTE</current_phase> <!-- RESEARCH | INNOVATE | PLAN | EXECUTE | REVIEW -->
|
|
8
|
+
<current_gate>G2</current_gate> <!-- G0 | G1 | G2 | G3 -->
|
|
9
|
+
<last_updated></last_updated>
|
|
10
|
+
</state_header>
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Task
|
|
15
|
+
|
|
16
|
+
<task_ref>
|
|
17
|
+
<task_spec>[Link to task.md]</task_spec>
|
|
18
|
+
<plan>[Link to plan.md]</plan>
|
|
19
|
+
</task_ref>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 2. Goal & Invariants
|
|
24
|
+
|
|
25
|
+
<goal_and_invariants>
|
|
26
|
+
<goal>[One-line restatement of the task goal]</goal>
|
|
27
|
+
<invariants>
|
|
28
|
+
- [Invariant 1 — must remain true throughout Execute]
|
|
29
|
+
</invariants>
|
|
30
|
+
</goal_and_invariants>
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 3. Approved Decisions
|
|
35
|
+
|
|
36
|
+
<approved_decisions>
|
|
37
|
+
<!-- Never re-open these. Read decision.md for full rationale. -->
|
|
38
|
+
- [DEC-ID]: [Decision summary — selected option X because Y]
|
|
39
|
+
</approved_decisions>
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 4. Completed Slices
|
|
44
|
+
|
|
45
|
+
<completed_slices>
|
|
46
|
+
<!-- Update after each slice verifier passes -->
|
|
47
|
+
| Slice | Status | Verifier Result | Evidence |
|
|
48
|
+
|---|---|---|---|
|
|
49
|
+
| S1 | | | |
|
|
50
|
+
</completed_slices>
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 5. Current Slice
|
|
55
|
+
|
|
56
|
+
<current_slice>
|
|
57
|
+
<id></id>
|
|
58
|
+
<objective></objective>
|
|
59
|
+
<status>IN_PROGRESS</status> <!-- NOT_STARTED | IN_PROGRESS | VERIFYING | DONE | BLOCKED -->
|
|
60
|
+
</current_slice>
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 6. Current Diff
|
|
65
|
+
|
|
66
|
+
<current_diff>
|
|
67
|
+
<!-- Paste relevant `git diff` summary here after each slice to verify zero noise -->
|
|
68
|
+
```diff
|
|
69
|
+
```
|
|
70
|
+
</current_diff>
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 7. Verification Evidence
|
|
75
|
+
|
|
76
|
+
<verification_evidence>
|
|
77
|
+
<!-- Accumulate verifier output for each completed slice -->
|
|
78
|
+
```
|
|
79
|
+
[Verifier command output]
|
|
80
|
+
```
|
|
81
|
+
</verification_evidence>
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 8. Failure Memory
|
|
86
|
+
|
|
87
|
+
<!-- CRITICAL: Record every failure. Never retry the same approach twice. -->
|
|
88
|
+
<failure_memory>
|
|
89
|
+
|
|
90
|
+
<failure id="F1">
|
|
91
|
+
<signature>[Unique error signature / symptom description]</signature>
|
|
92
|
+
<hypothesis>[What was believed to be the cause]</hypothesis>
|
|
93
|
+
<experiment>[What was tried]</experiment>
|
|
94
|
+
<result>[What actually happened]</result>
|
|
95
|
+
<must_not_repeat>[Specific action / assumption to never repeat]</must_not_repeat>
|
|
96
|
+
</failure>
|
|
97
|
+
|
|
98
|
+
</failure_memory>
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 9. Retry Budget
|
|
103
|
+
|
|
104
|
+
<retry_budget>
|
|
105
|
+
<allowed>3</allowed>
|
|
106
|
+
<used>0</used>
|
|
107
|
+
<remaining>3</remaining>
|
|
108
|
+
<!-- If remaining reaches 0: HALT and escalate to open_decisions in task.md -->
|
|
109
|
+
</retry_budget>
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 10. Scope Changes
|
|
114
|
+
|
|
115
|
+
<scope_changes>
|
|
116
|
+
<!-- Any approved deviations from the original plan.md scope contract -->
|
|
117
|
+
-
|
|
118
|
+
</scope_changes>
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 11. Open Risks / Blockers
|
|
123
|
+
|
|
124
|
+
<open_risks>
|
|
125
|
+
-
|
|
126
|
+
</open_risks>
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 12. Next Action
|
|
131
|
+
|
|
132
|
+
<next_action>
|
|
133
|
+
[Precise description of the very next step the agent must take.]
|
|
134
|
+
</next_action>
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 13. Context Freshness Check
|
|
139
|
+
|
|
140
|
+
<context_freshness>
|
|
141
|
+
<!-- Complete before continuing after any pause or context reload -->
|
|
142
|
+
- [ ] Active task spec re-read.
|
|
143
|
+
- [ ] Relevant source files re-read after last change.
|
|
144
|
+
- [ ] Plan.md current slice confirmed.
|
|
145
|
+
- [ ] Failure memory checked — no stale assumption being repeated.
|
|
146
|
+
- [ ] No unverified hypothesis being treated as confirmed fact.
|
|
147
|
+
</context_freshness>
|
|
148
|
+
|
|
149
|
+
</loop_state>
|