@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
package/templates/AGENTS.md
CHANGED
|
@@ -1,102 +1,131 @@
|
|
|
1
1
|
# Repository Agent Guidelines (RIPER-5 Framework)
|
|
2
2
|
|
|
3
|
-
<agent_guidelines version="
|
|
3
|
+
<agent_guidelines version="4.0">
|
|
4
4
|
|
|
5
5
|
<overview>
|
|
6
|
-
|
|
6
|
+
Entry-point configuration for AI agents in this subsystem. Establishes
|
|
7
|
+
project-specific settings and wires the two universal layers:
|
|
8
|
+
- **`.agents/`** — stateless agent-control rules (behavior, guardrails, conventions)
|
|
9
|
+
- **`process/`** — task workflow, artifact chain, and durable knowledge base
|
|
10
|
+
|
|
11
|
+
This file ONLY contains what is unique to this project: toolchain commands,
|
|
12
|
+
architecture guardrail calibration, and path references.
|
|
7
13
|
</overview>
|
|
8
14
|
|
|
9
15
|
---
|
|
10
16
|
|
|
11
|
-
## 1.
|
|
17
|
+
## 1. Agent Control Layer Reference
|
|
18
|
+
|
|
19
|
+
<agent_control_ref>
|
|
20
|
+
The universal agent control rules live in [`.agents/`](.agents/README.md):
|
|
21
|
+
|
|
22
|
+
| File | What it governs |
|
|
23
|
+
|------|----------------|
|
|
24
|
+
| [`.agents/behavior.md`](.agents/behavior.md) | Mode declaration, session startup, context priority |
|
|
25
|
+
| [`.agents/guardrails.md`](.agents/guardrails.md) | Retry budget, escalation triggers, completion gate |
|
|
26
|
+
| [`.agents/conventions/naming.md`](.agents/conventions/naming.md) | Naming and structural hygiene |
|
|
27
|
+
|
|
28
|
+
Read these files at session start. They require no project-specific edits.
|
|
29
|
+
</agent_control_ref>
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 2. Core Pillars
|
|
12
34
|
|
|
13
35
|
<foundations>
|
|
14
36
|
<!-- Pillar 1: Task & Specification -->
|
|
15
37
|
<pillar id="task_spec" title="Task & Specification">
|
|
16
|
-
<rule>Single Source of Truth: Active task file in [`process/features/{feature}/
|
|
38
|
+
<rule>Single Source of Truth: Active task file in [`process/features/active/{feature}/task.md`](process/features/) or [`process/general-plans/active/{task}/task.md`](process/general-plans/) (instantiated from [`process/_seeds/task-template.md.seed`](process/_seeds/task-template.md.seed)).</rule>
|
|
17
39
|
<rule>Define changes via Goal, Current Behavior, Expected Behavior, Invariants, and `<out_of_scope>`.</rule>
|
|
18
40
|
<rule>Acceptance Criteria (AC) must be unambiguous, verifiable markdown checkboxes (`- [ ]`).</rule>
|
|
41
|
+
<rule>Every task has a master contract (`task.md`) and a full artifact chain: `research.md → decision.md → plan.md → state.md → review.md → handoff.md`.</rule>
|
|
19
42
|
</pillar>
|
|
20
43
|
|
|
21
44
|
<!-- Pillar 2: Context Navigation -->
|
|
22
45
|
<pillar id="context" title="Context Navigation">
|
|
23
46
|
<rule>Gather minimum sufficient context. No full-repo scanning or drive-by refactoring.</rule>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
2. Relevant Test Suites (`tests/...`)
|
|
27
|
-
3. Domain Models & Ports (`src/.../domain/`, `src/.../application/port_*`)
|
|
28
|
-
4. Configuration & DI (`src/.../infrastructure/config/`, `pyproject.toml` / `package.json`)
|
|
29
|
-
5. Concrete Implementations (`src/.../infrastructure/`, `src/.../application/service/`, `src/.../api/`)
|
|
30
|
-
</information_priority>
|
|
47
|
+
<rule>Follow information priority defined in [`.agents/behavior.md`](.agents/behavior.md).</rule>
|
|
48
|
+
<rule>Project context routes via [`process/context/all-context.md`](process/context/all-context.md).</rule>
|
|
31
49
|
</pillar>
|
|
32
50
|
|
|
33
51
|
<!-- Pillar 3: Engineering Harness & Guardrails -->
|
|
34
52
|
<pillar id="harness" title="Engineering Harness & Guardrails">
|
|
35
53
|
<validation_commands>
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
54
|
+
# ── Project-specific: adapt these commands to your toolchain ──
|
|
55
|
+
# Python: uv run pytest && uv run mypy --strict . && uv run ruff check . && uv run ruff format --check .
|
|
56
|
+
# Node/TS: npm run test && npm run typecheck && npm run lint
|
|
57
|
+
# Go: go test ./... && go vet ./...
|
|
39
58
|
</validation_commands>
|
|
40
59
|
<architecture_guardrail>
|
|
41
|
-
Clean Architecture & Dependency Injection provide structural guidance, NOT an
|
|
60
|
+
Clean Architecture & Dependency Injection provide structural guidance, NOT an
|
|
61
|
+
instruction to blindly over-engineer simple utilities.
|
|
42
62
|
</architecture_guardrail>
|
|
43
63
|
</pillar>
|
|
44
64
|
</foundations>
|
|
45
65
|
|
|
46
66
|
---
|
|
47
67
|
|
|
48
|
-
##
|
|
68
|
+
## 3. RIPER-5 Operating Protocol (Pillar 4: Loop)
|
|
69
|
+
|
|
70
|
+
<riper5_protocol>
|
|
49
71
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
72
|
+
<!-- ─────────────────── PHASE CONSTRAINTS ─────────────────── -->
|
|
73
|
+
|
|
74
|
+
<phase name="RESEARCH" order="1">
|
|
75
|
+
<constraint>READ-ONLY. No source-code modifications.</constraint>
|
|
76
|
+
<constraint>No implementation decisions.</constraint>
|
|
77
|
+
<constraint>No architectural choices.</constraint>
|
|
78
|
+
<output>Produce/update `research.md`. Classify evidence as Confirmed / Observed / Hypothesized.</output>
|
|
79
|
+
<gate id="G0">All Research Exit Criteria in `research.md` checked before advancing.</gate>
|
|
53
80
|
</phase>
|
|
54
81
|
|
|
55
|
-
<phase
|
|
56
|
-
|
|
82
|
+
<phase name="INNOVATE" order="2">
|
|
83
|
+
<constraint>READ-ONLY. No source-code modifications.</constraint>
|
|
84
|
+
<constraint>Present 2–3 viable options with trade-off matrix. Do NOT decide unilaterally.</constraint>
|
|
85
|
+
<constraint>Never decide public API / DB schema / security policy / business policy without human approval.</constraint>
|
|
86
|
+
<output>Produce `decision.md`. Leave `<engineer_decision>` blank — human fills it.</output>
|
|
87
|
+
<gate id="G1">Gate 1 in `decision.md` checked and signed by engineer before advancing to Plan.</gate>
|
|
57
88
|
</phase>
|
|
58
89
|
|
|
59
|
-
<phase
|
|
60
|
-
|
|
90
|
+
<phase name="PLAN" order="3">
|
|
91
|
+
<constraint>Plan artifacts only. No source-code changes.</constraint>
|
|
92
|
+
<constraint>Every slice must have a defined verifier, expected evidence, and rollback point.</constraint>
|
|
93
|
+
<constraint>Scope contract (allowed / forbidden files) must be explicit.</constraint>
|
|
94
|
+
<output>Produce `plan.md`. Populate Verification Matrix headers.</output>
|
|
95
|
+
<gate id="G2">Gate 2 in `plan.md` checked and signed by engineer before advancing to Execute.</gate>
|
|
61
96
|
</phase>
|
|
62
97
|
|
|
63
|
-
<phase
|
|
64
|
-
|
|
98
|
+
<phase name="EXECUTE" order="4">
|
|
99
|
+
<constraint>Read/write only within the scope approved in `plan.md`.</constraint>
|
|
100
|
+
<constraint>One slice at a time. Run verifier after each slice. Inspect diff after each slice.</constraint>
|
|
101
|
+
<constraint>No unrelated refactoring. No changes to forbidden files.</constraint>
|
|
102
|
+
<constraint>Update `state.md` after every slice.</constraint>
|
|
103
|
+
<output>Source code + tests + updated `state.md` with verification evidence.</output>
|
|
65
104
|
</phase>
|
|
66
105
|
|
|
67
|
-
<phase
|
|
68
|
-
|
|
106
|
+
<phase name="REVIEW" order="5">
|
|
107
|
+
<constraint>READ-ONLY. May run verification commands.</constraint>
|
|
108
|
+
<constraint>No code fixes during review. Log findings in `review.md` instead.</constraint>
|
|
109
|
+
<constraint>Cover: behavior, architecture, data, security, regression.</constraint>
|
|
110
|
+
<output>Produce `review.md` with findings classified by category/severity/type and Gate 3 checklist.</output>
|
|
111
|
+
<gate id="G3">Gate 3 in `review.md` checked before handoff. Review decision must be PASS.</gate>
|
|
69
112
|
</phase>
|
|
70
113
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<escalation_and_stop_conditions>
|
|
76
|
-
Halt immediately and request human guidance if:
|
|
77
|
-
1. Retry budget is exhausted on a recurring failure.
|
|
78
|
-
2. Modification requires undeclared changes to public APIs, DB schemas, or security policies.
|
|
79
|
-
3. Modification requires touching files outside defined boundaries or in `<out_of_scope>`.
|
|
80
|
-
*Exception:* Do not stop if the change was explicitly authorized by the user in the prompt/spec, or is a mandatory accompanying test/import update.
|
|
81
|
-
</escalation_and_stop_conditions>
|
|
82
|
-
|
|
83
|
-
<completion_gate>
|
|
84
|
-
A task is COMPLETE only when:
|
|
85
|
-
1. All Acceptance Criteria in the active task spec are verified (`- [x]`).
|
|
86
|
-
2. All validation commands execute with zero errors/warnings.
|
|
87
|
-
3. The final `git diff` contains zero extraneous or unreviewed modifications.
|
|
88
|
-
</completion_gate>
|
|
89
|
-
</operational_loop>
|
|
114
|
+
<!-- Behavior rules (mode declaration, retry, escalation, completion gate) →
|
|
115
|
+
see .agents/behavior.md and .agents/guardrails.md -->
|
|
116
|
+
|
|
117
|
+
</riper5_protocol>
|
|
90
118
|
|
|
91
119
|
---
|
|
92
120
|
|
|
93
|
-
##
|
|
121
|
+
## 4. Workspace Protocols
|
|
94
122
|
|
|
95
123
|
<workspace_rules>
|
|
96
124
|
<rule id="env">Execute all commands inside the designated runtime virtual environment / harness.</rule>
|
|
97
|
-
<rule id="sync">Only toggle `- [x]` after
|
|
125
|
+
<rule id="sync">Only toggle `- [x]` after the relevant verifier passes. Never overwrite human-written specs.</rule>
|
|
98
126
|
<rule id="isolation">Keep edits within this subsystem unless explicit cross-system coordination is requested.</rule>
|
|
99
127
|
<rule id="subagents">Subagent delegation must adhere to [`process/development-protocols/orchestration.md`](process/development-protocols/orchestration.md).</rule>
|
|
128
|
+
<rule id="no_stale_context">Re-read relevant files after the repository changes. Do not rely on stale conversation context.</rule>
|
|
100
129
|
</workspace_rules>
|
|
101
130
|
|
|
102
131
|
</agent_guidelines>
|
|
@@ -1,57 +1,116 @@
|
|
|
1
1
|
# Process & Task Orchestration (RIPER-5)
|
|
2
2
|
|
|
3
|
-
<process_orchestration version="
|
|
3
|
+
<process_orchestration version="3.0" framework="RIPER-5">
|
|
4
4
|
|
|
5
5
|
<overview>
|
|
6
|
-
Standard template and operational control center for managing engineering tasks and coordinating AI agent execution in this subsystem.
|
|
6
|
+
Standard template and operational control center for managing engineering tasks and coordinating AI agent execution in this subsystem. Each active task is a self-contained engineering workspace with a full RIPER-5 artifact chain.
|
|
7
7
|
</overview>
|
|
8
8
|
|
|
9
|
+
---
|
|
10
|
+
|
|
9
11
|
## 1. Directory Structure
|
|
12
|
+
|
|
10
13
|
```text
|
|
11
14
|
process/
|
|
12
|
-
├── README.md
|
|
13
|
-
├── _seeds/
|
|
14
|
-
│ ├── _GUIDE.md
|
|
15
|
-
│ ├── task-template.md.seed
|
|
16
|
-
│ ├──
|
|
17
|
-
│
|
|
18
|
-
├──
|
|
19
|
-
│ ├──
|
|
20
|
-
│
|
|
21
|
-
├──
|
|
15
|
+
├── README.md # Operational guide (this file)
|
|
16
|
+
├── _seeds/ # Read-only archetype blueprints
|
|
17
|
+
│ ├── _GUIDE.md # Full catalog, artifact chain, and instantiation commands
|
|
18
|
+
│ ├── task-template.md.seed # Master contract & RIPER state record
|
|
19
|
+
│ ├── context-group.md.seed # Research phase artifact
|
|
20
|
+
│ ├── decision-template.md.seed # Innovate phase artifact (Gate 1 memory)
|
|
21
|
+
│ ├── plan-template.md.seed # Plan phase artifact (execution contract, Gate 2)
|
|
22
|
+
│ ├── state-template.md.seed # Execute loop persistent memory
|
|
23
|
+
│ ├── review-template.md.seed # Review phase artifact (Gate 3)
|
|
24
|
+
│ ├── handoff-template.md.seed # Final projection (short)
|
|
25
|
+
│ └── program-template.md.seed # Multi-phase program blueprint
|
|
26
|
+
├── context/ # Durable knowledge base & context routers
|
|
27
|
+
│ ├── all-context.md # Root context router
|
|
28
|
+
│ └── planning/all-planning.md # Planning calibration & vertical slicing rules
|
|
29
|
+
├── development-protocols/ # System rules & execution harness
|
|
22
30
|
│ ├── all-development-protocols.md
|
|
23
|
-
│ ├── orchestration.md
|
|
24
|
-
│ └── implementation-standards.md
|
|
25
|
-
├── features/
|
|
26
|
-
│ ├── active/
|
|
27
|
-
│
|
|
28
|
-
│
|
|
29
|
-
|
|
31
|
+
│ ├── orchestration.md # Subagent delegation rules
|
|
32
|
+
│ └── implementation-standards.md # Typing, linting, and testing standards
|
|
33
|
+
├── features/ # Domain features (≥5 files / ≥3 phases)
|
|
34
|
+
│ ├── active/ # Active task workspaces: {CHG-ID}-{task-slug}/
|
|
35
|
+
│ │ └── CHG-XXX-example/ # One folder per task
|
|
36
|
+
│ │ ├── task.md # Master contract & state record
|
|
37
|
+
│ │ ├── research.md # Research phase output
|
|
38
|
+
│ │ ├── decision.md # Innovate phase output
|
|
39
|
+
│ │ ├── plan.md # Plan phase output
|
|
40
|
+
│ │ ├── state.md # Execute loop memory
|
|
41
|
+
│ │ ├── review.md # Review phase output
|
|
42
|
+
│ │ └── handoff.md # Final projection
|
|
43
|
+
│ ├── completed/ # Archived task workspaces
|
|
44
|
+
│ └── backlog/ # Backlog notes: {note_slug}_NOTE_{dd-mm-yy}.md
|
|
45
|
+
└── general-plans/ # Cross-cutting & standalone tasks
|
|
30
46
|
├── active/
|
|
31
47
|
├── completed/
|
|
32
48
|
└── backlog/
|
|
33
49
|
```
|
|
34
50
|
|
|
35
|
-
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 2. RIPER-5 Artifact Chain
|
|
54
|
+
|
|
55
|
+
Every task produces a sequential chain of artifacts. Create them progressively as the task advances:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
task.md ← (always) Master contract, RIPER phase/gate state, AC, decisions
|
|
59
|
+
research.md ← (Research) Execution flow, evidence, boundaries
|
|
60
|
+
decision.md ← (Innovate) Options, trade-offs, Gate 1 — engineer must approve
|
|
61
|
+
plan.md ← (Plan) Slices, verifiers, scope contract, Gate 2 — engineer must approve
|
|
62
|
+
state.md ← (Execute) Per-slice progress, failure memory, retry budget
|
|
63
|
+
review.md ← (Review) Findings, verification matrix, Gate 3
|
|
64
|
+
handoff.md ← (Complete) Short final projection
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Concept → Artifact mapping
|
|
68
|
+
|
|
69
|
+
| Concept | Artifact |
|
|
70
|
+
|---|---|
|
|
71
|
+
| Task / Spec | `task.md` |
|
|
72
|
+
| Research / Context | `research.md` |
|
|
73
|
+
| Innovate / Decision | `decision.md` |
|
|
74
|
+
| Plan | `plan.md` |
|
|
75
|
+
| Loop state | `state.md` |
|
|
76
|
+
| Execute | source code + tests + `state.md` |
|
|
77
|
+
| Review | `review.md` |
|
|
78
|
+
| Handoff | `handoff.md` |
|
|
79
|
+
| Gate 1 | `decision.md` approval |
|
|
80
|
+
| Gate 2 | `plan.md` approval |
|
|
81
|
+
| Gate 3 | `review.md` approval |
|
|
82
|
+
| Harness / Policy | `AGENTS.md` + `development-protocols/` |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 3. RIPER-5 Operational Phases
|
|
87
|
+
|
|
36
88
|
<operational_phases>
|
|
37
89
|
<phase order="1" name="Research">
|
|
38
|
-
Ingest task spec
|
|
90
|
+
READ-ONLY. Ingest task spec; follow `<information_priority>`; produce `research.md`.
|
|
91
|
+
Classify evidence: Confirmed / Observed / Hypothesized.
|
|
92
|
+
Pass Research Exit Criteria (Gate 0) before advancing.
|
|
39
93
|
</phase>
|
|
40
94
|
|
|
41
|
-
<phase order="2" name="Innovate
|
|
42
|
-
|
|
95
|
+
<phase order="2" name="Innovate">
|
|
96
|
+
READ-ONLY. Present 2–3 options with trade-off matrix. Do not decide unilaterally.
|
|
97
|
+
Produce `decision.md`. Engineer approves Gate 1.
|
|
43
98
|
</phase>
|
|
44
99
|
|
|
45
|
-
<phase order="3" name="
|
|
46
|
-
|
|
100
|
+
<phase order="3" name="Plan">
|
|
101
|
+
Plan artifacts only — no source changes.
|
|
102
|
+
Decompose into vertical slices with verifiers, rollback points, and scope contract.
|
|
103
|
+
Produce `plan.md`. Engineer approves Gate 2.
|
|
47
104
|
</phase>
|
|
48
105
|
|
|
49
|
-
<phase order="4" name="
|
|
50
|
-
|
|
106
|
+
<phase order="4" name="Execute">
|
|
107
|
+
Read/write only within approved scope from `plan.md`.
|
|
108
|
+
One slice at a time. Run verifier after each slice. Update `state.md` after each slice.
|
|
51
109
|
</phase>
|
|
52
110
|
|
|
53
|
-
<phase order="5" name="
|
|
54
|
-
|
|
111
|
+
<phase order="5" name="Review">
|
|
112
|
+
READ-ONLY. May run verification commands. No code fixes.
|
|
113
|
+
Produce `review.md` with findings. Gate 3 must pass before handoff.
|
|
55
114
|
</phase>
|
|
56
115
|
</operational_phases>
|
|
57
116
|
|
|
@@ -1,30 +1,141 @@
|
|
|
1
1
|
# Seeds & Archetypes Scaffolding Guide
|
|
2
2
|
|
|
3
|
-
<seeds_guide version="
|
|
3
|
+
<seeds_guide version="2.0" framework="RIPER-5">
|
|
4
4
|
|
|
5
5
|
<scope>
|
|
6
6
|
`_seeds/` is a read-only scaffolding directory containing blueprint templates.
|
|
7
|
-
Copy and instantiate these seeds when defining new tasks, programs, or context
|
|
7
|
+
Copy and instantiate these seeds when defining new tasks, programs, or context groups.
|
|
8
|
+
Never edit seeds in-place — always copy first.
|
|
8
9
|
</scope>
|
|
9
10
|
|
|
11
|
+
---
|
|
12
|
+
|
|
10
13
|
## 1. Blueprint Catalog
|
|
14
|
+
|
|
11
15
|
<catalog>
|
|
16
|
+
|
|
12
17
|
<seed type="task" path="task-template.md.seed">
|
|
13
|
-
|
|
18
|
+
Master contract and state record for the full RIPER-5 lifecycle.
|
|
19
|
+
Contains: Task Control metadata, Spec, Context Boundaries, Verification Strategy,
|
|
20
|
+
Decisions, RIPER-5 Execution Plan (with Gates G0–G3), and Guardrails.
|
|
14
21
|
</seed>
|
|
15
|
-
|
|
16
|
-
<seed type="
|
|
17
|
-
|
|
22
|
+
|
|
23
|
+
<seed type="research" path="context-group.md.seed">
|
|
24
|
+
Research phase artifact. READ-ONLY during production.
|
|
25
|
+
Contains: Current Behavior, Execution Flow, Components, Boundaries, Existing Tests,
|
|
26
|
+
Runtime/Config, Source-of-Truth Analysis, Evidence Classification
|
|
27
|
+
(Confirmed / Observed / Hypothesized), Assumptions, Impacted Files,
|
|
28
|
+
Open Decisions, and Research Exit Criteria.
|
|
29
|
+
</seed>
|
|
30
|
+
|
|
31
|
+
<seed type="decision" path="decision-template.md.seed">
|
|
32
|
+
Innovate phase artifact. Gate 1 memory.
|
|
33
|
+
Contains: Decision question, Options (A/B/C) with trade-off matrix,
|
|
34
|
+
Recommendation, Engineer Decision (must be filled by human), Constraints Created,
|
|
35
|
+
Evidence Still Required, and Gate 1 checklist.
|
|
36
|
+
</seed>
|
|
37
|
+
|
|
38
|
+
<seed type="plan" path="plan-template.md.seed">
|
|
39
|
+
Plan phase artifact. Execution contract.
|
|
40
|
+
Contains: Input Artifacts, Execution Constraints (allowed/forbidden files,
|
|
41
|
+
allowed commands), Slice Summary table, Slice Details (objective, change,
|
|
42
|
+
verifier, expected evidence, rollback point, stop conditions),
|
|
43
|
+
Scope Contract, Verification Matrix, and Gate 2 checklist.
|
|
44
|
+
</seed>
|
|
45
|
+
|
|
46
|
+
<seed type="state" path="state-template.md.seed">
|
|
47
|
+
Execute loop persistent memory. Updated after every slice.
|
|
48
|
+
Contains: Current Phase/Gate, Task Ref, Goal/Invariants, Approved Decisions,
|
|
49
|
+
Completed Slices, Current Slice, Current Diff, Verification Evidence,
|
|
50
|
+
Failure Memory (signature/hypothesis/experiment/result), Retry Budget,
|
|
51
|
+
Scope Changes, Open Risks, Next Action, and Context Freshness Check.
|
|
52
|
+
</seed>
|
|
53
|
+
|
|
54
|
+
<seed type="review" path="review-template.md.seed">
|
|
55
|
+
Review phase artifact. Distinct from Handoff.
|
|
56
|
+
Contains: Review Scope, Behavior Review, Architecture Review, Data Review,
|
|
57
|
+
Security Review, Regression Review, Findings table (category/severity/type),
|
|
58
|
+
Verification Matrix, Residual Risk, Review Decision, and Gate 3 checklist.
|
|
59
|
+
</seed>
|
|
60
|
+
|
|
61
|
+
<seed type="handoff" path="handoff-template.md.seed">
|
|
62
|
+
Final projection artifact. Intentionally short.
|
|
63
|
+
Answers: What changed? Why? What proves it? What remains risky?
|
|
64
|
+
Does NOT duplicate research/plan/review artifacts.
|
|
18
65
|
</seed>
|
|
19
66
|
|
|
20
|
-
<seed type="
|
|
21
|
-
|
|
67
|
+
<seed type="program" path="program-template.md.seed">
|
|
68
|
+
Multi-phase program blueprint with umbrella planning, phase breakdown,
|
|
69
|
+
blast radius registries, and phase gate rules.
|
|
22
70
|
</seed>
|
|
71
|
+
|
|
23
72
|
</catalog>
|
|
24
73
|
|
|
25
|
-
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 2. Artifact Chain per Task
|
|
77
|
+
|
|
78
|
+
Every active task follows this artifact chain:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
task.md ← Master contract & RIPER state record
|
|
82
|
+
research.md ← Research phase output (READ-ONLY mode)
|
|
83
|
+
decision.md ← Innovate phase output, Gate 1 memory
|
|
84
|
+
plan.md ← Plan phase output, execution contract, Gate 2
|
|
85
|
+
state.md ← Execute loop persistent memory (updated per slice)
|
|
86
|
+
review.md ← Review phase output, Gate 3
|
|
87
|
+
handoff.md ← Final projection (short)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Concept → Artifact mapping
|
|
91
|
+
|
|
92
|
+
| Concept | Artifact |
|
|
93
|
+
|---|---|
|
|
94
|
+
| Task/Spec | `task.md` |
|
|
95
|
+
| Research / Context | `research.md` |
|
|
96
|
+
| Innovate / Decision | `decision.md` |
|
|
97
|
+
| Plan | `plan.md` |
|
|
98
|
+
| Loop state | `state.md` |
|
|
99
|
+
| Execute | source code + tests + `state.md` |
|
|
100
|
+
| Review | `review.md` |
|
|
101
|
+
| Handoff | `handoff.md` |
|
|
102
|
+
| Gate 1 | `decision.md` approval |
|
|
103
|
+
| Gate 2 | `plan.md` approval |
|
|
104
|
+
| Gate 3 | `review.md` approval |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 3. Recommended Task Workspace Layout
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
process/features/active/CHG-017-your-feature/
|
|
112
|
+
├── task.md ← instantiated from task-template.md.seed
|
|
113
|
+
├── research.md ← instantiated from context-group.md.seed
|
|
114
|
+
├── decision.md ← instantiated from decision-template.md.seed
|
|
115
|
+
├── plan.md ← instantiated from plan-template.md.seed
|
|
116
|
+
├── state.md ← instantiated from state-template.md.seed
|
|
117
|
+
├── review.md ← instantiated from review-template.md.seed
|
|
118
|
+
└── handoff.md ← instantiated from handoff-template.md.seed
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Not all artifacts are required at start. Create them progressively as the task advances through RIPER phases.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 4. Instantiation Commands
|
|
126
|
+
|
|
26
127
|
```bash
|
|
27
|
-
|
|
128
|
+
# Create a new task workspace
|
|
129
|
+
mkdir -p process/features/active/CHG-XXX-your-feature
|
|
130
|
+
|
|
131
|
+
# Instantiate seeds into the workspace
|
|
132
|
+
cp process/_seeds/task-template.md.seed process/features/active/CHG-XXX-your-feature/task.md
|
|
133
|
+
cp process/_seeds/context-group.md.seed process/features/active/CHG-XXX-your-feature/research.md
|
|
134
|
+
cp process/_seeds/decision-template.md.seed process/features/active/CHG-XXX-your-feature/decision.md
|
|
135
|
+
cp process/_seeds/plan-template.md.seed process/features/active/CHG-XXX-your-feature/plan.md
|
|
136
|
+
cp process/_seeds/state-template.md.seed process/features/active/CHG-XXX-your-feature/state.md
|
|
137
|
+
cp process/_seeds/review-template.md.seed process/features/active/CHG-XXX-your-feature/review.md
|
|
138
|
+
cp process/_seeds/handoff-template.md.seed process/features/active/CHG-XXX-your-feature/handoff.md
|
|
28
139
|
```
|
|
29
140
|
|
|
30
141
|
</seeds_guide>
|
|
@@ -1,24 +1,154 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Research: [TASK-ID]
|
|
2
2
|
|
|
3
|
-
<
|
|
3
|
+
<research_context task_id="[TASK-ID]" version="2.0" framework="RIPER-5">
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
</
|
|
5
|
+
<!-- READ-ONLY PHASE. No source modifications. No implementation decisions. -->
|
|
6
|
+
<research_status>
|
|
7
|
+
<phase>RESEARCH</phase>
|
|
8
|
+
<mode>READ-ONLY</mode>
|
|
9
|
+
<research_owner></research_owner>
|
|
10
|
+
<last_updated></last_updated>
|
|
11
|
+
</research_status>
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. Current Behavior
|
|
16
|
+
|
|
17
|
+
<current_behavior>
|
|
18
|
+
[Observable system behavior prior to this change, based on evidence.]
|
|
19
|
+
</current_behavior>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 2. Execution Flow
|
|
24
|
+
|
|
25
|
+
<execution_flow>
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
Entry
|
|
29
|
+
→ ...
|
|
30
|
+
→ ...
|
|
31
|
+
→ Side effect / output
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
</execution_flow>
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 3. Relevant Components
|
|
39
|
+
|
|
40
|
+
<components>
|
|
41
|
+
|
|
42
|
+
| File / Symbol | Role | Evidence | Confidence |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| | | | |
|
|
45
|
+
|
|
46
|
+
</components>
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 4. Dependencies & Boundaries
|
|
51
|
+
|
|
52
|
+
<boundaries>
|
|
53
|
+
<callers>[Who invokes the target code]</callers>
|
|
54
|
+
<callees>[What the target code invokes]</callees>
|
|
55
|
+
<persistence>[Database tables, cache keys, queues]</persistence>
|
|
56
|
+
<external_systems>[Third-party APIs, message brokers]</external_systems>
|
|
57
|
+
<transaction_boundary>[Where transactions begin and end]</transaction_boundary>
|
|
58
|
+
<security_boundary>[Auth context, permission checks, trust boundary]</security_boundary>
|
|
59
|
+
</boundaries>
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 5. Existing Tests
|
|
64
|
+
|
|
65
|
+
<existing_tests>
|
|
66
|
+
|
|
67
|
+
| Test | Behavior covered | Gap |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| | | |
|
|
70
|
+
|
|
71
|
+
</existing_tests>
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 6. Runtime / Configuration
|
|
76
|
+
|
|
77
|
+
<runtime_config>
|
|
78
|
+
[Environment variables, feature flags, configuration files relevant to this change.]
|
|
79
|
+
</runtime_config>
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 7. Source-of-Truth Analysis
|
|
84
|
+
|
|
85
|
+
<source_of_truth_analysis>
|
|
86
|
+
|
|
87
|
+
| Source | Says | Authority | Conflict |
|
|
88
|
+
|---|---|---|---|
|
|
89
|
+
| | | | |
|
|
90
|
+
|
|
91
|
+
</source_of_truth_analysis>
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 8. Evidence Classification
|
|
96
|
+
|
|
97
|
+
<!-- NEVER mix facts, observations, and hypotheses in a single list -->
|
|
98
|
+
<evidence>
|
|
99
|
+
<confirmed>
|
|
100
|
+
<!-- Directly verified from code, tests, or authoritative docs -->
|
|
101
|
+
-
|
|
102
|
+
</confirmed>
|
|
103
|
+
|
|
104
|
+
<observed>
|
|
105
|
+
<!-- Inferred from behavior, logs, or indirect reading — not directly proven -->
|
|
106
|
+
-
|
|
107
|
+
</observed>
|
|
108
|
+
|
|
109
|
+
<hypothesized>
|
|
110
|
+
<!-- Assumptions that still need verification before acting -->
|
|
111
|
+
-
|
|
112
|
+
</hypothesized>
|
|
113
|
+
</evidence>
|
|
14
114
|
|
|
15
115
|
---
|
|
16
116
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
117
|
+
## 9. Assumptions & Uncertainty
|
|
118
|
+
|
|
119
|
+
<assumptions>
|
|
120
|
+
[List any assumptions that drive the research conclusions. Flag each as LOW / MEDIUM / HIGH uncertainty.]
|
|
121
|
+
</assumptions>
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 10. Impacted Files
|
|
126
|
+
|
|
127
|
+
<impacted_files>
|
|
128
|
+
- `path/to/file` — [Reason for impact]
|
|
129
|
+
</impacted_files>
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## 11. Open Decisions
|
|
134
|
+
|
|
135
|
+
<open_decisions>
|
|
136
|
+
<!-- Unresolved questions that must flow into the Innovate phase decision.md -->
|
|
137
|
+
-
|
|
138
|
+
</open_decisions>
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 12. Research Exit Criteria
|
|
143
|
+
|
|
144
|
+
<research_exit_criteria>
|
|
145
|
+
- [ ] Current behavior understood and documented.
|
|
146
|
+
- [ ] Execution flow traced end-to-end.
|
|
147
|
+
- [ ] Relevant boundaries identified (callers, callees, persistence, security).
|
|
148
|
+
- [ ] Source-of-truth conflicts identified or confirmed absent.
|
|
149
|
+
- [ ] Impacted files identified.
|
|
150
|
+
- [ ] Evidence classified (Confirmed / Observed / Hypothesized).
|
|
151
|
+
- [ ] No unresolved research blocker.
|
|
152
|
+
</research_exit_criteria>
|
|
23
153
|
|
|
24
|
-
</
|
|
154
|
+
</research_context>
|