@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
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
# Task: [TASK-ID] [Task Title]
|
|
2
2
|
|
|
3
|
-
<task_spec version="
|
|
3
|
+
<task_spec version="3.0" framework="RIPER-5">
|
|
4
|
+
|
|
5
|
+
<!-- ════════════════════════════════════════════
|
|
6
|
+
SECTION 0 — TASK CONTROL (master state record)
|
|
7
|
+
════════════════════════════════════════════ -->
|
|
8
|
+
<task_control>
|
|
9
|
+
<status>BACKLOG</status> <!-- BACKLOG | ACTIVE | BLOCKED | REVIEW | COMPLETED -->
|
|
10
|
+
<spec_level>S1</spec_level> <!-- S0=sketch | S1=defined | S2=verified | S3=locked -->
|
|
11
|
+
<risk>MEDIUM</risk> <!-- LOW | MEDIUM | HIGH -->
|
|
12
|
+
<working_mode>PAIR</working_mode> <!-- MANUAL | PAIR | DELEGATED | DIAGNOSE-ONLY -->
|
|
13
|
+
<current_phase>RESEARCH</current_phase> <!-- RESEARCH | INNOVATE | PLAN | EXECUTE | REVIEW -->
|
|
14
|
+
<owner>@engineer</owner>
|
|
15
|
+
<decision_owner>@engineer</decision_owner>
|
|
16
|
+
<created></created>
|
|
17
|
+
<last_updated></last_updated>
|
|
18
|
+
</task_control>
|
|
4
19
|
|
|
5
|
-
|
|
6
|
-
<phase>PLANNING</phase> <!-- RESEARCHING | PLANNING | PRODUCING | EVALUATING | RECONCILED | COMPLETED -->
|
|
7
|
-
<state>IN_PROGRESS</state>
|
|
8
|
-
<assignee>@agent_or_human</assignee>
|
|
9
|
-
</status>
|
|
20
|
+
---
|
|
10
21
|
|
|
11
22
|
## 1. Specification (Pillar 1: Task / Spec)
|
|
23
|
+
|
|
12
24
|
<specification>
|
|
13
25
|
<goal>
|
|
14
26
|
[Target outcome, business value, or functional capability.]
|
|
@@ -22,8 +34,12 @@
|
|
|
22
34
|
[Expected behavior once the change is complete.]
|
|
23
35
|
</expected_behavior>
|
|
24
36
|
|
|
37
|
+
<actor_authorization>
|
|
38
|
+
[Who initiates this action, under what authorization context.]
|
|
39
|
+
</actor_authorization>
|
|
40
|
+
|
|
25
41
|
<invariants>
|
|
26
|
-
- [Invariant 1 — Conditions that must remain true.]
|
|
42
|
+
- [Invariant 1 — Conditions that must remain true throughout and after this change.]
|
|
27
43
|
</invariants>
|
|
28
44
|
|
|
29
45
|
<out_of_scope>
|
|
@@ -31,62 +47,149 @@
|
|
|
31
47
|
</out_of_scope>
|
|
32
48
|
|
|
33
49
|
<acceptance_criteria>
|
|
34
|
-
- [ ]
|
|
35
|
-
- [ ]
|
|
36
|
-
- [ ]
|
|
50
|
+
- [ ] AC-1: [Verifiable functional behavior with explicit input and expected output]
|
|
51
|
+
- [ ] AC-2: [Edge cases, validation rules, or error handling]
|
|
52
|
+
- [ ] AC-3: [Automated tests added/updated and passing]
|
|
37
53
|
</acceptance_criteria>
|
|
38
54
|
</specification>
|
|
39
55
|
|
|
40
56
|
---
|
|
41
57
|
|
|
42
58
|
## 2. Context Boundaries (Pillar 2: Context)
|
|
59
|
+
|
|
43
60
|
<context_boundaries>
|
|
44
61
|
<target_files>
|
|
45
62
|
- `src/[path/to/file]` — [Planned modification]
|
|
46
63
|
- `tests/[path/to/test_file]` — [Target assertions and test fixtures]
|
|
47
64
|
</target_files>
|
|
65
|
+
|
|
66
|
+
<source_of_truth>
|
|
67
|
+
<requirement>[Link to requirement or spec]</requirement>
|
|
68
|
+
<architecture>[Link to architecture doc or ADR]</architecture>
|
|
69
|
+
<existing_behavior>[Test file or code path that proves current behavior]</existing_behavior>
|
|
70
|
+
<tests>[Primary test suite path]</tests>
|
|
71
|
+
</source_of_truth>
|
|
48
72
|
</context_boundaries>
|
|
49
73
|
|
|
50
74
|
---
|
|
51
75
|
|
|
52
|
-
## 3.
|
|
76
|
+
## 3. Verification Strategy
|
|
77
|
+
|
|
78
|
+
<!-- Evidence required to close each AC before marking COMPLETED -->
|
|
79
|
+
<verification_strategy>
|
|
80
|
+
|
|
81
|
+
| AC / Risk | Evidence required | Verifier |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| AC-1 | | |
|
|
84
|
+
| AC-2 | | |
|
|
85
|
+
| AC-3 | | |
|
|
86
|
+
|
|
87
|
+
</verification_strategy>
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 4. Decisions
|
|
92
|
+
|
|
93
|
+
<decisions>
|
|
94
|
+
<approved_decisions>
|
|
95
|
+
<!-- Decisions that are final and must not be re-opened by the agent -->
|
|
96
|
+
<!-- | ID | Decision | Rationale | Owner | -->
|
|
97
|
+
</approved_decisions>
|
|
98
|
+
|
|
99
|
+
<open_decisions>
|
|
100
|
+
<!-- Decisions that still need a human to choose; agent must HALT on these -->
|
|
101
|
+
<!-- | ID | Question | Why it matters | Owner | Blocking? | -->
|
|
102
|
+
</open_decisions>
|
|
103
|
+
</decisions>
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 5. RIPER-5 Execution Plan (Pillar 4: Loop)
|
|
108
|
+
|
|
53
109
|
<execution_plan>
|
|
54
|
-
<phase name="Research">
|
|
110
|
+
<phase name="Research" order="1">
|
|
111
|
+
<!-- READ-ONLY. No source modifications. No implementation decisions. -->
|
|
55
112
|
- [ ] Ingest task spec, domain invariants, and out-of-scope boundaries.
|
|
56
113
|
- [ ] Read corresponding tests and port interfaces.
|
|
114
|
+
- [ ] Establish execution flow, boundaries, and source-of-truth conflicts.
|
|
115
|
+
- [ ] Produce/update `research.md` artifact.
|
|
116
|
+
<gate id="G0" label="Research Complete">
|
|
117
|
+
- [ ] Current behavior understood and documented.
|
|
118
|
+
- [ ] Execution flow traced.
|
|
119
|
+
- [ ] No unresolved research blocker.
|
|
120
|
+
</gate>
|
|
57
121
|
</phase>
|
|
58
122
|
|
|
59
|
-
<phase name="Innovate
|
|
60
|
-
-
|
|
61
|
-
- [ ]
|
|
123
|
+
<phase name="Innovate" order="2">
|
|
124
|
+
<!-- READ-ONLY. Present 2-3 viable options. Do not decide unilaterally. -->
|
|
125
|
+
- [ ] Generate 2–3 alternative approaches with trade-off matrix.
|
|
126
|
+
- [ ] Produce `decision.md` artifact.
|
|
127
|
+
<gate id="G1" label="Gate 1 — Decision Approved">
|
|
128
|
+
- [ ] Options reviewed by engineer.
|
|
129
|
+
- [ ] Selected option recorded in `decision.md`.
|
|
130
|
+
- [ ] No blocking business/schema/security decision remains open.
|
|
131
|
+
<approved_by></approved_by>
|
|
132
|
+
<approved_date></approved_date>
|
|
133
|
+
</gate>
|
|
62
134
|
</phase>
|
|
63
135
|
|
|
64
|
-
<phase name="
|
|
65
|
-
|
|
66
|
-
- [ ]
|
|
136
|
+
<phase name="Plan" order="3">
|
|
137
|
+
<!-- Plan artifacts only. No source-code changes. -->
|
|
138
|
+
- [ ] Decompose into vertical slices with verifiers and rollback points.
|
|
139
|
+
- [ ] Populate `plan.md` with scope contract and verification matrix.
|
|
140
|
+
<gate id="G2" label="Gate 2 — Plan Approved">
|
|
141
|
+
- [ ] Every slice has a verifier.
|
|
142
|
+
- [ ] Allowed/forbidden file scope is defined.
|
|
143
|
+
- [ ] Rollback point defined per slice.
|
|
144
|
+
- [ ] Stop conditions defined.
|
|
145
|
+
- [ ] Engineer approved.
|
|
146
|
+
<approved_by></approved_by>
|
|
147
|
+
<approved_date></approved_date>
|
|
148
|
+
</gate>
|
|
67
149
|
</phase>
|
|
68
150
|
|
|
69
|
-
<phase name="
|
|
70
|
-
|
|
151
|
+
<phase name="Execute" order="4">
|
|
152
|
+
<!-- Read/write only within approved scope. One slice at a time. -->
|
|
153
|
+
- [ ] Implement each slice atomically.
|
|
154
|
+
- [ ] Run verifier after each slice.
|
|
155
|
+
- [ ] Inspect diff after each slice.
|
|
156
|
+
- [ ] Update `state.md` after each slice.
|
|
71
157
|
</phase>
|
|
72
158
|
|
|
73
|
-
<phase name="
|
|
74
|
-
-
|
|
75
|
-
- [ ]
|
|
76
|
-
- [ ]
|
|
159
|
+
<phase name="Review" order="5">
|
|
160
|
+
<!-- READ-ONLY. May run verification commands. No code fixes during review. -->
|
|
161
|
+
- [ ] Review full diff, behavior, architecture, data, security, regression.
|
|
162
|
+
- [ ] Produce `review.md` with findings and verification matrix.
|
|
163
|
+
<gate id="G3" label="Gate 3 — Review Passed">
|
|
164
|
+
- [ ] All AC verified with evidence.
|
|
165
|
+
- [ ] Residual risk accepted.
|
|
166
|
+
- [ ] Review decision: PASS | CHANGES_REQUIRED | BLOCKED.
|
|
167
|
+
- [ ] Ready for handoff.
|
|
168
|
+
<approved_by></approved_by>
|
|
169
|
+
<approved_date></approved_date>
|
|
170
|
+
</gate>
|
|
77
171
|
</phase>
|
|
78
172
|
</execution_plan>
|
|
79
173
|
|
|
80
174
|
---
|
|
81
175
|
|
|
82
|
-
##
|
|
176
|
+
## 6. Guardrails & Escalation (Pillar 3 & 4: Harness)
|
|
177
|
+
|
|
83
178
|
<guardrails>
|
|
84
|
-
<
|
|
85
|
-
<!--
|
|
86
|
-
|
|
179
|
+
<stop_conditions>
|
|
180
|
+
<!-- Agent must HALT and request human guidance on any of these -->
|
|
181
|
+
- Missing business or policy decision.
|
|
182
|
+
- Public API / DB schema change not declared in this spec.
|
|
183
|
+
- New external dependency not declared in this spec.
|
|
184
|
+
- Security policy change required.
|
|
185
|
+
- Scope expansion beyond `<out_of_scope>`.
|
|
186
|
+
- Retry budget exhausted on a recurring failure.
|
|
187
|
+
</stop_conditions>
|
|
87
188
|
|
|
88
189
|
<retry_budget max_attempts="3">
|
|
89
190
|
Maximum 3 consecutive attempts per distinct failure symptom before halting.
|
|
191
|
+
Never suppress errors with flags (e.g. `# type: ignore`, `eslint-disable`).
|
|
192
|
+
If exhausted, log into `<open_decisions>` and halt.
|
|
90
193
|
</retry_budget>
|
|
91
194
|
</guardrails>
|
|
92
195
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<group id="seeds">
|
|
18
18
|
<title>Seeds & Archetypes Guide</title>
|
|
19
19
|
<path>[`../_seeds/_GUIDE.md`](../_seeds/_GUIDE.md)</path>
|
|
20
|
-
<scope>Scaffolding seeds for tasks,
|
|
20
|
+
<scope>Scaffolding seeds for tasks, research, decisions, plans, state, reviews, handoffs, and programs. Full artifact chain and instantiation commands.</scope>
|
|
21
21
|
</group>
|
|
22
22
|
|
|
23
23
|
<group id="protocols">
|