@alexandrealvaro/agentic 0.11.3-beta.1 → 0.13.0-beta.1
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 +6 -0
- package/package.json +1 -1
- package/src/commands/init.js +2 -0
- package/src/lib/profiles.js +7 -1
- package/src/lib/rootdoc.js +4 -0
- package/src/skills/claude-code/agentic-spike/SKILL.md +220 -0
- package/src/skills/claude-code/agentic-tdg/SKILL.md +126 -0
- package/src/skills/codex/agentic-spike/SKILL.md +89 -0
- package/src/skills/codex/agentic-spike/agents/openai.yaml +5 -0
- package/src/skills/codex/agentic-tdg/SKILL.md +109 -0
- package/src/skills/codex/agentic-tdg/agents/openai.yaml +5 -0
package/README.md
CHANGED
|
@@ -40,6 +40,8 @@ Two categories ([ADR-0007](doc/adr/0007-workflow-operational-skills.md)) and two
|
|
|
40
40
|
| `agentic-review` | workflow-operational | universal | Fresh-context code review per WORKFLOW §10; structured findings, no "approve" | `/agentic-review <range>` |
|
|
41
41
|
| `agentic-ground` | workflow-operational | universal | Four-source pre-implementation research (docs / OSS / in-repo / git history) + happy-path synthesis + deviation gate per WORKFLOW §4 + §5 | `/agentic-ground` |
|
|
42
42
|
| `agentic-next` | workflow-operational | universal | State-aware navigation aid (`flutter doctor` pattern) — surveys the four-layer artifact stack and recommends prioritized next actions; complements `agentic-audit` (drift) | `/agentic-next` |
|
|
43
|
+
| `agentic-spike` | workflow-operational | universal | Staged spike with golden fixtures per WORKFLOW §14, for cases where the *technique* is uncertain across multiple plausible approaches; produces `spikes/NNNN-<slug>/` with discovery + fixture + pipeline-with-gates + two-layer evaluation | `/agentic-spike` |
|
|
44
|
+
| `agentic-tdg` | workflow-operational | universal | Outcome-based prompting per WORKFLOW §9 — ground truth pair + Test Dependency Map + three approaches + single-criterion selection, for cases where the technique is known but the implementation strategy is uncertain | `/agentic-tdg` |
|
|
43
45
|
| `agentic-design` | spec-driven | auto if frontend detected | Bootstrap `DESIGN.md` from existing tokens (Figma, tailwind.config, tokens.json, CSS custom props) | `/agentic-design` |
|
|
44
46
|
| `agentic-subagent` | spec-driven | auto if installing for Claude Code | Drafts `.claude/agents/<name>.md` (Claude Code only — Codex has no subagent primitive) | `/agentic-subagent` |
|
|
45
47
|
| `agentic-skill` | spec-driven | opt-in only | Drafts a new Claude Code or Codex skill at the appropriate path | `/agentic-skill` |
|
|
@@ -155,6 +157,10 @@ The kit's discipline scales with the project's maturity. A solo PoC may legitima
|
|
|
155
157
|
|
|
156
158
|
**Lost mid-flow?** Invoke `/agentic-next` at any time to survey the project's state across the four-layer artifact stack (Constitution → Spec → Plan/Decisions → Code) and get prioritized next-action recommendations. Read-only; complements `/agentic-audit` (drift detection — different question).
|
|
157
159
|
|
|
160
|
+
**Technique uncertain across multiple plausible approaches?** Invoke `/agentic-spike` (per WORKFLOW §14) when the spec is clear but the *how* is unknown — library choice, multi-stage transformation, novel domain. The skill scaffolds a staged spike with golden fixtures + per-stage debug artifacts + two-layer evaluation under `spikes/NNNN-<slug>/`. The directory is throwaway by design; conclude with `/agentic-adr` and delete.
|
|
161
|
+
|
|
162
|
+
**Technique known but implementation strategy uncertain?** Invoke `/agentic-tdg` (per WORKFLOW §9) when multiple algorithms could produce the expected output with different trade-offs along readability / performance / testability. The skill forces a ground-truth pair, lists the tests covering the file (Test Dependency Map), generates three implementation candidates, and commits to one by a single named criterion — refusing the "optimize for all three at once" failure mode. No file written; the verified implementation is the artifact, with the candidate set + criterion landing in the commit message body.
|
|
163
|
+
|
|
158
164
|
## Manual prompts
|
|
159
165
|
|
|
160
166
|
If you prefer to skip the installer, the same artifacts can be generated by pasting prompts directly into your agent. Each prompt file has the literal text to copy, plus the matching template structure:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexandrealvaro/agentic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0-beta.1",
|
|
4
4
|
"description": "Bootstrap and audit AGENTS.md, ARCHITECTURE.md, ADRs, skills, and subagents for engineering production code with LLMs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/commands/init.js
CHANGED
|
@@ -370,6 +370,8 @@ export async function initCommand(opts) {
|
|
|
370
370
|
'/agentic-review (WORKFLOW §10)',
|
|
371
371
|
'/agentic-ground (WORKFLOW §4 + §5)',
|
|
372
372
|
'/agentic-next (state survey + recommendations)',
|
|
373
|
+
'/agentic-spike (WORKFLOW §14 — staged spike with golden fixtures)',
|
|
374
|
+
'/agentic-tdg (WORKFLOW §9 — outcome-based prompting + TDM)',
|
|
373
375
|
...(optedSkills.includes('agentic-design') ? ['/agentic-design (DESIGN.md)'] : []),
|
|
374
376
|
...(optedSkills.includes('agentic-subagent') && agents.includes('claude-code')
|
|
375
377
|
? ['/agentic-subagent']
|
package/src/lib/profiles.js
CHANGED
|
@@ -20,7 +20,7 @@ export const PROFILE_NAMES = ['poc', 'solo', 'team', 'mature'];
|
|
|
20
20
|
|
|
21
21
|
export const PROFILES = {
|
|
22
22
|
poc: {
|
|
23
|
-
universal: ['agentic-philosophy', 'agentic-ground', 'agentic-audit', 'agentic-next'],
|
|
23
|
+
universal: ['agentic-philosophy', 'agentic-ground', 'agentic-audit', 'agentic-next', 'agentic-spike', 'agentic-tdg'],
|
|
24
24
|
conditional: {
|
|
25
25
|
'agentic-design': 'blocked',
|
|
26
26
|
'agentic-subagent': 'blocked',
|
|
@@ -35,6 +35,8 @@ export const PROFILES = {
|
|
|
35
35
|
'agentic-ground',
|
|
36
36
|
'agentic-audit',
|
|
37
37
|
'agentic-next',
|
|
38
|
+
'agentic-spike',
|
|
39
|
+
'agentic-tdg',
|
|
38
40
|
'agentic-bootstrap',
|
|
39
41
|
'agentic-spec',
|
|
40
42
|
'agentic-task',
|
|
@@ -62,6 +64,8 @@ export const PROFILES = {
|
|
|
62
64
|
'agentic-review',
|
|
63
65
|
'agentic-ground',
|
|
64
66
|
'agentic-next',
|
|
67
|
+
'agentic-spike',
|
|
68
|
+
'agentic-tdg',
|
|
65
69
|
],
|
|
66
70
|
conditional: {
|
|
67
71
|
'agentic-design': 'frontend',
|
|
@@ -83,6 +87,8 @@ export const PROFILES = {
|
|
|
83
87
|
'agentic-review',
|
|
84
88
|
'agentic-ground',
|
|
85
89
|
'agentic-next',
|
|
90
|
+
'agentic-spike',
|
|
91
|
+
'agentic-tdg',
|
|
86
92
|
],
|
|
87
93
|
conditional: {
|
|
88
94
|
'agentic-design': 'frontend',
|
package/src/lib/rootdoc.js
CHANGED
|
@@ -28,6 +28,10 @@ export const SKILL_DESCRIPTIONS = {
|
|
|
28
28
|
'Four-source pre-implementation research (docs / OSS / in-repo / git history) + happy-path synthesis + deviation gate. WORKFLOW §4 + §5.',
|
|
29
29
|
'agentic-next':
|
|
30
30
|
'State survey + prioritized next-action recommendations across the four-layer artifact stack. Read-only navigation aid (`flutter doctor` pattern).',
|
|
31
|
+
'agentic-spike':
|
|
32
|
+
'Staged spike with golden fixtures per WORKFLOW §14. Discovery + fixture + pipeline-with-gates + two-layer evaluation, when the *technique* is uncertain across multiple plausible approaches.',
|
|
33
|
+
'agentic-tdg':
|
|
34
|
+
'Outcome-based prompting per WORKFLOW §9. Ground truth pair + Test Dependency Map + three approaches + single-criterion selection, when the technique is known but the implementation strategy is uncertain.',
|
|
31
35
|
'agentic-design': 'Bootstrap `DESIGN.md` from existing tokens (frontend projects).',
|
|
32
36
|
'agentic-subagent': 'Draft a new Claude Code subagent at `.claude/agents/<name>.md`.',
|
|
33
37
|
'agentic-skill': 'Draft a new Claude Code or Codex skill at the appropriate path.',
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-spike
|
|
3
|
+
description: Scaffold a staged spike with golden fixtures per WORKFLOW.md §14, for cases where the spec is clear but the technique is uncertain across multiple plausible approaches. Four stages — discovery, golden fixture, pipeline with gates, two-layer evaluation. Use when the unknown is *how*, not *what*. Triggers on "spike", "uncertain technique", "which library", "CV pipeline", "evaluate approaches", "ground truth", "golden fixture", "staged pipeline", "debug per stage". Routes to `agentic-ground` if the *how* is routine and a single happy path is obvious. Read-and-write — creates `spikes/NNNN-<slug>/` with fixtures, debug per-stage artifacts, eval results.
|
|
4
|
+
allowed-tools: Read, Write, Glob, Grep, Bash, WebFetch, WebSearch
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /agentic-spike
|
|
8
|
+
|
|
9
|
+
Implements WORKFLOW.md §14 (Staged Spikes With Golden Fixtures) end-to-end. The skill is for cases where the spec is clear but the *technique* is uncertain across multiple plausible approaches — library choice, CV approach, multi-stage transformation. WORKFLOW §9 (TDG) assumes the path is known and validates end-to-end; §14 assumes the path is unknown and validates per stage. Different uncertainty regimes; this skill is for the unknown one.
|
|
10
|
+
|
|
11
|
+
The skill creates a working directory under `spikes/NNNN-<slug>/` and fills it stage-by-stage. The directory is throwaway by design — when the spike concludes, an ADR records the decision (`/agentic-adr`) and the spike directory is deleted. See ADR-0017 for the promote-or-delete lifecycle rationale.
|
|
12
|
+
|
|
13
|
+
## Step 0 — Confirm uncertainty
|
|
14
|
+
|
|
15
|
+
The skill is for *unknown technique* across multiple plausible approaches, not for *non-trivial work* in general. If a single happy path is obvious, **do not start a spike**. If the *how* is knowable from official docs / OSS examples / in-repo patterns / git history, route to `agentic-ground` and stop.
|
|
16
|
+
|
|
17
|
+
Concrete tests to run before starting:
|
|
18
|
+
|
|
19
|
+
* Could `agentic-ground`'s four-source research surface a single happy path with a defensible deviation gate? If yes, run that instead.
|
|
20
|
+
* Are there ≥2 candidate techniques with materially different trade-offs that no source resolves? If no, this is not a spike.
|
|
21
|
+
* Is end-to-end validation against expected outputs feasible without per-stage debug? If yes, this is `agentic-task` + `agentic-philosophy` Goal-Driven Execution territory, not a spike.
|
|
22
|
+
|
|
23
|
+
If the spike is warranted, confirm with the user the *recortte* (the specific surface where uncertainty sits — not the whole feature) and proceed.
|
|
24
|
+
|
|
25
|
+
## Step 1 — Discovery
|
|
26
|
+
|
|
27
|
+
List canonical approaches grounded in **official docs and real examples**. Pick one (or a small set, ≤3) by an **explicit criterion**.
|
|
28
|
+
|
|
29
|
+
Candidate-listing process:
|
|
30
|
+
|
|
31
|
+
1. Search official documentation for the language / library / domain in question. Cite URL + version.
|
|
32
|
+
2. Search public OSS for repos that solve the same technical recortte. Cite `<repo>:<path>:<line-range>` and fetch via tools — never paraphrase from training memory.
|
|
33
|
+
3. Survey in-repo for analogous patterns the codebase already uses. Cite `<file>:<line>` or "no analog found".
|
|
34
|
+
4. Survey git history for prior attempts at the same problem. Cite `<commit-sha>` or "no prior attempt".
|
|
35
|
+
|
|
36
|
+
Output format:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
## Discovery — <recortte>
|
|
40
|
+
|
|
41
|
+
### Candidate techniques
|
|
42
|
+
1. **<name>** — <one-line description>. Source: <URL or repo:path>. Trade-offs: <pros / cons>.
|
|
43
|
+
2. **<name>** — ...
|
|
44
|
+
3. **<name>** — ...
|
|
45
|
+
|
|
46
|
+
### Selection criterion
|
|
47
|
+
<one-line criterion: latency / accuracy / readability / dependencies / etc>
|
|
48
|
+
|
|
49
|
+
### Picked
|
|
50
|
+
<technique X>, picked by criterion <Y>. Alternatives held in reserve: <list>.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The output of this step is **information, not code**. No spike directory is created yet. The user reviews the candidate list and confirms the picked approach (or revises) before Step 2.
|
|
54
|
+
|
|
55
|
+
## Step 2 — Golden fixture
|
|
56
|
+
|
|
57
|
+
Curate inputs with rich expected outputs. The fixture is the ground truth the staged pipeline validates against; richer fixtures catch more failure modes.
|
|
58
|
+
|
|
59
|
+
Create the spike directory:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
mkdir -p spikes/NNNN-<slug>/{fixtures,debug,eval}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Where `NNNN` is the next available 4-digit number (mirrors ADR / task / spec numbering). List `spikes/` and pick the next slot.
|
|
66
|
+
|
|
67
|
+
The fixture format is JSON keyed by input path (recommended) or whatever shape the domain demands. For computer vision: bounding boxes, sizes, lighting condition, difficulty tag, edge case markers. For multi-stage transformations: intermediate states. For library choice: representative inputs covering typical and edge cases.
|
|
68
|
+
|
|
69
|
+
Example fixture file (`spikes/0001-detect-circles/fixtures/golden.json`):
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"inputs/easy-01.jpg": {
|
|
74
|
+
"expected": [
|
|
75
|
+
{ "bbox": [120, 80, 240, 200], "label": "circle", "size": "large", "lighting": "even" }
|
|
76
|
+
],
|
|
77
|
+
"difficulty": "easy",
|
|
78
|
+
"edge_cases": []
|
|
79
|
+
},
|
|
80
|
+
"inputs/hard-01.jpg": {
|
|
81
|
+
"expected": [
|
|
82
|
+
{ "bbox": [50, 60, 90, 100], "label": "circle", "size": "small", "lighting": "low" },
|
|
83
|
+
{ "bbox": [200, 80, 260, 140], "label": "circle", "size": "medium", "lighting": "even", "occluded": true }
|
|
84
|
+
],
|
|
85
|
+
"difficulty": "hard",
|
|
86
|
+
"edge_cases": ["low-light", "partial-occlusion", "multiple-objects"]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Curation principles:
|
|
92
|
+
|
|
93
|
+
* Include **edge cases** (low light, partial occlusion, malformed inputs, large inputs, empty inputs) — not just "happy path" examples. The fixture's job is to surface *where* a technique fails, not just whether it succeeds on easy cases.
|
|
94
|
+
* Include **difficulty tags** so per-stage evaluation can report performance segmented by difficulty.
|
|
95
|
+
* Keep the fixture as data, not code. JSON / YAML / CSV — anything that diffs cleanly and survives a refactor.
|
|
96
|
+
|
|
97
|
+
The fixture is the contract the pipeline validates against. Treat it like spec text — it should not change once the spike runs unless ground truth itself changes.
|
|
98
|
+
|
|
99
|
+
## Step 3 — Pipeline with gates
|
|
100
|
+
|
|
101
|
+
One technique per stage. Each stage emits a **debug artifact** that makes its output inspectable.
|
|
102
|
+
|
|
103
|
+
Pipeline structure:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
spikes/NNNN-<slug>/
|
|
107
|
+
├── README.md # spike framing (Step 1 output)
|
|
108
|
+
├── fixtures/ # golden inputs + expected outputs
|
|
109
|
+
│ └── golden.json
|
|
110
|
+
├── pipeline/ # one file per stage
|
|
111
|
+
│ ├── 01-preprocess.<ext>
|
|
112
|
+
│ ├── 02-detect.<ext>
|
|
113
|
+
│ └── 03-postprocess.<ext>
|
|
114
|
+
├── debug/ # per-stage debug artifacts
|
|
115
|
+
│ ├── 01-preprocess/
|
|
116
|
+
│ ├── 02-detect/
|
|
117
|
+
│ └── 03-postprocess/
|
|
118
|
+
└── eval/ # evaluation results (Step 4)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Each stage's debug artifact format depends on the domain:
|
|
122
|
+
|
|
123
|
+
* CV pipelines: image saved to `debug/NN-<stage>/<input-name>.png` showing the stage's output.
|
|
124
|
+
* Multi-stage transformations: intermediate JSON saved to `debug/NN-<stage>/<input-name>.json`.
|
|
125
|
+
* Library evaluation: log row per (input, library) saved to `debug/NN-<stage>/log.csv`.
|
|
126
|
+
|
|
127
|
+
The discipline: **each stage's output must be inspectable independently**. End-to-end output alone tells you *that* it failed; per-stage debug tells you *where*.
|
|
128
|
+
|
|
129
|
+
Implementation pattern (any language):
|
|
130
|
+
|
|
131
|
+
* Stage takes (input, context) and returns (output, debug-record). Debug-record is written to `debug/NN-<stage>/`.
|
|
132
|
+
* Pipeline runs stages sequentially. Failure at any stage halts the pipeline and reports the stage where divergence happened.
|
|
133
|
+
|
|
134
|
+
## Step 4 — Two-layer evaluation
|
|
135
|
+
|
|
136
|
+
Run the pipeline against the fixture and emit two layers of results:
|
|
137
|
+
|
|
138
|
+
* **End-to-end:** how many fixture inputs produced expected outputs? Reported as pass / fail per input, plus aggregate pass rate.
|
|
139
|
+
* **Per-stage:** for each fixture input, where did the pipeline diverge? Stage NN's output vs the expected intermediate. Reported as pass / fail per (input, stage).
|
|
140
|
+
|
|
141
|
+
Output to `spikes/NNNN-<slug>/eval/results.json`:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"fixture": "fixtures/golden.json",
|
|
146
|
+
"pipeline_version": "<commit-sha or timestamp>",
|
|
147
|
+
"end_to_end": {
|
|
148
|
+
"total": 10,
|
|
149
|
+
"passed": 7,
|
|
150
|
+
"failed": 3
|
|
151
|
+
},
|
|
152
|
+
"per_stage": {
|
|
153
|
+
"01-preprocess": { "passed": 10, "failed": 0 },
|
|
154
|
+
"02-detect": { "passed": 8, "failed": 2 },
|
|
155
|
+
"03-postprocess": { "passed": 7, "failed": 1 }
|
|
156
|
+
},
|
|
157
|
+
"failures": [
|
|
158
|
+
{
|
|
159
|
+
"input": "inputs/hard-02.jpg",
|
|
160
|
+
"diverged_at": "02-detect",
|
|
161
|
+
"expected": [...],
|
|
162
|
+
"actual": [...],
|
|
163
|
+
"debug_artifact": "debug/02-detect/hard-02.png"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
The per-stage layer is what makes the spike actionable. End-to-end says *that* it failed; per-stage + debug artifact says *where* and *why*.
|
|
170
|
+
|
|
171
|
+
## Step 5 — Conclude (promote or delete)
|
|
172
|
+
|
|
173
|
+
When the spike concludes — either the picked technique works or it does not — record the outcome via `/agentic-adr` and delete the spike directory. The ADR is the persistent artifact; the spike code is throwaway.
|
|
174
|
+
|
|
175
|
+
ADR template for spike outcomes:
|
|
176
|
+
|
|
177
|
+
```markdown
|
|
178
|
+
# ADR-NNNN: We will use technique X for <recortte>
|
|
179
|
+
|
|
180
|
+
## Context
|
|
181
|
+
|
|
182
|
+
<why the spike was needed — what was uncertain>
|
|
183
|
+
|
|
184
|
+
## Decision
|
|
185
|
+
|
|
186
|
+
We will use technique X. The spike at `spikes/NNNN-<slug>/` (now deleted) showed:
|
|
187
|
+
- End-to-end pass rate: <%>
|
|
188
|
+
- Failures concentrated at stage <NN>, root cause <Y>
|
|
189
|
+
- Mitigation: <Z>
|
|
190
|
+
|
|
191
|
+
Alternatives held in reserve and rejected:
|
|
192
|
+
- Technique A: rejected because <reason from spike eval>
|
|
193
|
+
- Technique B: rejected because <reason from spike eval>
|
|
194
|
+
|
|
195
|
+
## Consequences
|
|
196
|
+
|
|
197
|
+
<follow-on work this decision unblocks; rails to maintain>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Then:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
rm -rf spikes/NNNN-<slug>/
|
|
204
|
+
git add doc/adr/NNNN-<slug>.md
|
|
205
|
+
git commit -m "feat: adopt technique X for <recortte> per spike NNNN"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Spikes that conclude inconclusively get an ADR too — `Decision: defer; the spike at NNNN inconclusive because Y` — and the directory is deleted. Inconclusive spikes are real signal; preserving the framing in an ADR prevents re-litigation.
|
|
209
|
+
|
|
210
|
+
## Output contract
|
|
211
|
+
|
|
212
|
+
A spike directory at `spikes/NNNN-<short-slug>/` with the four-stage layout above (discovery README, fixtures, pipeline, debug per stage, eval results). The directory is throwaway by design — promote-or-delete lifecycle per ADR-0017 §4. No `Status: shipped` lifecycle; spikes do not "ship" — they conclude with an ADR.
|
|
213
|
+
|
|
214
|
+
When the host exposes `AskUserQuestion` (per ADR-0014), use it for the Step 1 selection criterion confirmation and the Step 5 promote/delete decision.
|
|
215
|
+
|
|
216
|
+
## Next
|
|
217
|
+
|
|
218
|
+
- After Step 1 (discovery output reviewed): proceed to Step 2 to create the spike directory + fixture, or abort if the discovery surfaced a single happy path (route to `agentic-ground`).
|
|
219
|
+
- After Step 4 (eval results): `/agentic-adr` to record the outcome, then delete the spike directory.
|
|
220
|
+
- If the spike succeeds and production work follows: `/agentic-task` for the work units to apply the spike's findings to production code (Spec ref the original spec if applicable; cite the ADR in the task `Notes`).
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-tdg
|
|
3
|
+
description: Outcome-based prompting per WORKFLOW.md §9. Give the agent the finish line first, not the path. Five steps — confirm regime, ground truth pair, Test Dependency Map, three approaches, pick by one criterion, implement and verify. Triggers on "outcome-based", "TDG", "ground truth", "expected output", "three approaches", "pick by criterion", "test dependency map", "TDM", "before modifying", "tests covering this file", "give the finish line". Routes to `agentic-spike` if the technique itself is uncertain. No file written; output is the verified implementation that lands through normal commits.
|
|
4
|
+
allowed-tools: Read, Glob, Grep, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /agentic-tdg
|
|
8
|
+
|
|
9
|
+
Implements WORKFLOW.md §9 (Outcome-Based Prompting / Test Dependency Map) end-to-end. Process scaffold for the implementation phase when the canonical technique is known and multiple implementation strategies are plausible. No file written — output is the verified implementation that lands through normal commits; ground-truth pair, candidate set, and selection criterion go into the commit message body or task `Notes`.
|
|
10
|
+
|
|
11
|
+
## Step 0 — Confirm regime
|
|
12
|
+
|
|
13
|
+
TDG is for the *technique-known, implementation-strategy-uncertain* regime. Run the skill only when:
|
|
14
|
+
|
|
15
|
+
* The canonical approach is settled (via `agentic-ground` or prior knowledge), AND
|
|
16
|
+
* Multiple implementation strategies could produce the expected output with different trade-offs along readability / performance / testability axes.
|
|
17
|
+
|
|
18
|
+
Route elsewhere when:
|
|
19
|
+
|
|
20
|
+
* The *technique itself* is uncertain across multiple plausible approaches → `/agentic-spike` (WORKFLOW §14). Spike validates technique with golden fixture + per-stage debug; TDG validates implementation with ground-truth pair + TDM.
|
|
21
|
+
* The path is fully obvious (one-line fix, mechanical refactor, byte-for-byte port) → TDG is overkill; proceed directly without the skill.
|
|
22
|
+
* No tests cover the surface and the project does not yet have a test runner wired → consider `/agentic-hooks` for project gates first; TDG depends on a verifiable green baseline.
|
|
23
|
+
|
|
24
|
+
## Step 1 — Ground truth pair
|
|
25
|
+
|
|
26
|
+
State raw input + exact expected output before any code is written. Concrete, not aspirational. The pair is the contract the implementation must satisfy.
|
|
27
|
+
|
|
28
|
+
Format depends on the surface:
|
|
29
|
+
|
|
30
|
+
* For pure functions: input arguments + expected return value, as code-block or JSON.
|
|
31
|
+
* For data transformations: source data + transformed data, side-by-side.
|
|
32
|
+
* For CLI / API surfaces: request payload + response payload, as paste-ready examples.
|
|
33
|
+
* For UI changes: pre-state DOM / screenshot + post-state DOM / screenshot.
|
|
34
|
+
|
|
35
|
+
Example (pure function):
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Input: parse('--agent claude-code --yes')
|
|
39
|
+
Expected output: { agent: 'claude-code', yes: true, dryRun: false, force: false }
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The pair is small, explicit, and verifiable. Aspirational language ("loads fast", "handles all edge cases") is not ground truth — concrete examples are.
|
|
43
|
+
|
|
44
|
+
## Step 2 — Test Dependency Map (TDM)
|
|
45
|
+
|
|
46
|
+
List the tests covering the file(s) the change will touch. Run them to establish the green baseline. If no tests cover the surface, write one first that exercises the *current* behavior before any modification.
|
|
47
|
+
|
|
48
|
+
Process:
|
|
49
|
+
|
|
50
|
+
1. Grep for tests referencing the file by import path: `grep -r 'from.*<file>' test/ tests/`.
|
|
51
|
+
2. Grep for tests referencing the function or symbol: `grep -r '<symbol>' test/ tests/`.
|
|
52
|
+
3. Run the matched tests in isolation to confirm green: `npx node --test test/<matched>.test.js` or equivalent for the language.
|
|
53
|
+
4. If empty: write a test that asserts the current behavior. Run. Confirm green. *Then* proceed to Step 3.
|
|
54
|
+
|
|
55
|
+
The TDM is the verification surface — Step 5's "implement + verify" loop runs these tests, not the full suite, so the feedback loop stays under a few seconds. Full-suite runs happen at commit-time via the project's pre-push hook (`agentic-hooks`).
|
|
56
|
+
|
|
57
|
+
## Step 3 — Three approaches
|
|
58
|
+
|
|
59
|
+
Generate three implementation candidates that produce the ground-truth pair. Each candidate names trade-offs along the §9 axes:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Approach A: <name / one-line description>
|
|
63
|
+
- readability: <high / medium / low + reason>
|
|
64
|
+
- performance: <O(...), bytes allocated, etc.>
|
|
65
|
+
- testability: <surface area, mockability, isolation>
|
|
66
|
+
|
|
67
|
+
Approach B: <name / one-line description>
|
|
68
|
+
- readability: ...
|
|
69
|
+
- performance: ...
|
|
70
|
+
- testability: ...
|
|
71
|
+
|
|
72
|
+
Approach C: <name / one-line description>
|
|
73
|
+
- readability: ...
|
|
74
|
+
- performance: ...
|
|
75
|
+
- testability: ...
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
No premature optimization across all three axes — each candidate names its trade-offs honestly. A candidate that is "high on every axis" is suspect; surface what it actually trades against.
|
|
79
|
+
|
|
80
|
+
Three is a soft target. If the surface is small and only two approaches are plausible, two is fine. If the third candidate is contrived to fill a slot, drop it; the criterion-based selection in Step 4 handles two as easily as three.
|
|
81
|
+
|
|
82
|
+
## Step 4 — Pick by one criterion
|
|
83
|
+
|
|
84
|
+
The user names the criterion explicitly — readability *or* performance *or* testability, **not all three at once**. The skill commits to the selected candidate. Alternatives get one-line rejection notes for the commit message body or task `Notes`:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Criterion: testability
|
|
88
|
+
Picked: Approach B (smaller mock surface, no global state read)
|
|
89
|
+
Rejected:
|
|
90
|
+
- Approach A — one fewer allocation but mocks four singletons (testability lower)
|
|
91
|
+
- Approach C — clearer at the call site but writes shared state (testability lower)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The discipline: refuse "optimize for readability AND performance AND testability". Tradeoffs are real — naming the criterion makes them visible.
|
|
95
|
+
|
|
96
|
+
When the host exposes `AskUserQuestion` (per ADR-0014), render the three candidates as a structured multi-choice card with the criterion as the framing question.
|
|
97
|
+
|
|
98
|
+
## Step 5 — Implement + verify
|
|
99
|
+
|
|
100
|
+
Modify the file. Run the TDM tests from Step 2. If green, the change is done — proceed to commit with the ground-truth pair + criterion + rejection notes in the commit message body. If red, iterate against the same ground-truth pair until green.
|
|
101
|
+
|
|
102
|
+
Verification rules:
|
|
103
|
+
|
|
104
|
+
* Do **not** edit the TDM tests to make them green. The tests are the verification surface; modifying them while implementing is the hidden form of "almost right" that WORKFLOW §12 names. If a test is wrong, fix the test first as a separate diff with its own ground-truth pair.
|
|
105
|
+
* Do **not** declare done before the TDM tests pass. Type-check passing is not the gate; the test gate is.
|
|
106
|
+
* If iteration loops past three attempts and the implementation still fails, **stop and re-examine the ground-truth pair**. The pair may be ambiguous, or the canonical approach may not actually map to the expected output. Routing back to `agentic-ground` (re-research) or `agentic-spike` (technique uncertain) is preferable to forcing a wrong implementation through.
|
|
107
|
+
|
|
108
|
+
## Output contract
|
|
109
|
+
|
|
110
|
+
No file written. Output is structured conversation:
|
|
111
|
+
|
|
112
|
+
1. Confirmation of regime (Step 0 — TDG or routed elsewhere).
|
|
113
|
+
2. Ground-truth pair (Step 1).
|
|
114
|
+
3. TDM list with green-baseline confirmation (Step 2).
|
|
115
|
+
4. Three candidates with trade-off table (Step 3).
|
|
116
|
+
5. Selection by criterion + rejection notes (Step 4).
|
|
117
|
+
6. Implementation + verification result (Step 5).
|
|
118
|
+
|
|
119
|
+
When the change is committed, the ground-truth pair, criterion, and rejection notes go into the commit message body. When a task file exists, the same content also lands in the task's `Notes` log under a dated entry.
|
|
120
|
+
|
|
121
|
+
## Next
|
|
122
|
+
|
|
123
|
+
- After Step 5 verification passes: commit the change with the ground-truth pair + criterion + rejection notes in the body.
|
|
124
|
+
- `/agentic-review main..HEAD` (or current scope) before merge — WORKFLOW §10. The TDM tests verify the implementation matches ground truth; §10 review checks coupling, edge cases, spec drift the pair did not cover.
|
|
125
|
+
- If the work spans multiple sessions: `/agentic-task` for explicit decomposition (Spec ref the original spec; cite this TDG run in the task `Notes`).
|
|
126
|
+
- If iteration stalled at Step 5 and routing back was needed: `/agentic-ground` (re-research) or `/agentic-spike` (technique uncertain).
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-spike
|
|
3
|
+
description: Scaffold a staged spike with golden fixtures per WORKFLOW.md §14, for cases where the spec is clear but the technique is uncertain across multiple plausible approaches. Four stages — discovery, golden fixture, pipeline with gates, two-layer evaluation. Use when the unknown is *how*, not *what*. Triggers on "spike", "uncertain technique", "which library", "CV pipeline", "evaluate approaches", "ground truth", "golden fixture", "staged pipeline", "debug per stage". Routes to `agentic-ground` if the *how* is routine and a single happy path is obvious.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<background_information>
|
|
7
|
+
Implements WORKFLOW.md §14 (Staged Spikes With Golden Fixtures) end-to-end. The skill is for cases where the spec is clear but the technique is uncertain across multiple plausible approaches. WORKFLOW §9 (TDG) assumes the path is known and validates end-to-end; §14 assumes the path is unknown and validates per stage.
|
|
8
|
+
|
|
9
|
+
The skill creates `spikes/NNNN-<slug>/` and fills it stage-by-stage. The directory is throwaway by design — when the spike concludes, an ADR records the decision and the spike directory is deleted (promote-or-delete lifecycle per ADR-0017 §4).
|
|
10
|
+
|
|
11
|
+
Codex auto-trigger on description keywords is less mature than Claude Code's. If auto-invocation does not fire when the user mentions an uncertain technique or asks to evaluate approaches, invoke this skill manually.
|
|
12
|
+
</background_information>
|
|
13
|
+
|
|
14
|
+
<instructions>
|
|
15
|
+
Step 0 — confirm uncertainty. Skill is for unknown technique across multiple plausible approaches, not non-trivial work in general. If a single happy path is obvious, do NOT start a spike — route to `agentic-ground` and stop.
|
|
16
|
+
|
|
17
|
+
Tests:
|
|
18
|
+
- Could `agentic-ground`'s four-source research surface a single happy path with a defensible deviation gate? If yes, run that instead.
|
|
19
|
+
- Are there ≥2 candidate techniques with materially different trade-offs that no source resolves? If no, this is not a spike.
|
|
20
|
+
- Is end-to-end validation feasible without per-stage debug? If yes, this is `agentic-task` + `agentic-philosophy` Goal-Driven Execution territory.
|
|
21
|
+
|
|
22
|
+
If spike warranted, confirm the recortte with the user and proceed.
|
|
23
|
+
|
|
24
|
+
Step 1 — discovery. List canonical approaches grounded in official docs and real examples. Pick one (or ≤3) by an explicit criterion.
|
|
25
|
+
|
|
26
|
+
Process:
|
|
27
|
+
- Search official documentation. Cite URL + version.
|
|
28
|
+
- Search OSS for repos solving the same recortte. Cite `<repo>:<path>:<line-range>`; fetch via tools, never paraphrase from training memory.
|
|
29
|
+
- Survey in-repo for analogous patterns. Cite `<file>:<line>` or "no analog found".
|
|
30
|
+
- Survey git history for prior attempts. Cite `<commit-sha>` or "no prior attempt".
|
|
31
|
+
|
|
32
|
+
Output: candidate-list markdown with techniques, sources, trade-offs, selection criterion, picked technique. NO code yet. User reviews before Step 2.
|
|
33
|
+
|
|
34
|
+
Step 2 — golden fixture. Curate inputs with rich expected outputs. JSON keyed by input path (recommended). Include edge cases (low light, partial occlusion, malformed inputs, large inputs, empty inputs) and difficulty tags.
|
|
35
|
+
|
|
36
|
+
Create the spike directory:
|
|
37
|
+
```
|
|
38
|
+
mkdir -p spikes/NNNN-<slug>/{fixtures,debug,eval}
|
|
39
|
+
```
|
|
40
|
+
NNNN = next 4-digit number after highest existing under `spikes/`.
|
|
41
|
+
|
|
42
|
+
The fixture is the contract the pipeline validates against. Treat like spec text — should not change once the spike runs unless ground truth changes.
|
|
43
|
+
|
|
44
|
+
Step 3 — pipeline with gates. One technique per stage. Each stage emits a debug artifact making its output inspectable.
|
|
45
|
+
|
|
46
|
+
Layout:
|
|
47
|
+
```
|
|
48
|
+
spikes/NNNN-<slug>/
|
|
49
|
+
├── README.md # spike framing (Step 1 output)
|
|
50
|
+
├── fixtures/ # golden inputs + expected outputs
|
|
51
|
+
├── pipeline/ # one file per stage (01-preprocess, 02-detect, etc)
|
|
52
|
+
├── debug/ # per-stage debug artifacts (image / JSON / log row)
|
|
53
|
+
└── eval/ # evaluation results (Step 4)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Each stage takes (input, context), returns (output, debug-record). Debug-record written to `debug/NN-<stage>/`. Pipeline halts and reports stage on first divergence.
|
|
57
|
+
|
|
58
|
+
Step 4 — two-layer evaluation:
|
|
59
|
+
- End-to-end: pass rate against fixture inputs.
|
|
60
|
+
- Per-stage: for each input, where did pipeline diverge?
|
|
61
|
+
|
|
62
|
+
Output to `spikes/NNNN-<slug>/eval/results.json`:
|
|
63
|
+
```
|
|
64
|
+
{
|
|
65
|
+
"fixture": "fixtures/golden.json",
|
|
66
|
+
"end_to_end": { "total": 10, "passed": 7, "failed": 3 },
|
|
67
|
+
"per_stage": { "01-preprocess": { "passed": 10, "failed": 0 }, ... },
|
|
68
|
+
"failures": [{ "input": "...", "diverged_at": "02-detect", "debug_artifact": "..." }]
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Per-stage layer is what makes the spike actionable.
|
|
73
|
+
|
|
74
|
+
Step 5 — conclude (promote or delete). When the spike concludes:
|
|
75
|
+
- Record outcome via `/agentic-adr` (ADR is the persistent artifact).
|
|
76
|
+
- Delete the spike directory: `rm -rf spikes/NNNN-<slug>/`.
|
|
77
|
+
|
|
78
|
+
ADR captures: which technique picked, alternatives held in reserve, end-to-end pass rate, failures and root causes, mitigation. Inconclusive spikes get ADRs too — preserves framing, prevents re-litigation.
|
|
79
|
+
</instructions>
|
|
80
|
+
|
|
81
|
+
<output_contract>
|
|
82
|
+
A spike directory at `spikes/NNNN-<short-slug>/` with the four-stage layout (discovery README, fixtures, pipeline, debug per stage, eval results). The directory is throwaway by design — promote-or-delete lifecycle per ADR-0017 §4. No `Status: shipped` lifecycle; spikes conclude with an ADR.
|
|
83
|
+
</output_contract>
|
|
84
|
+
|
|
85
|
+
## Next
|
|
86
|
+
|
|
87
|
+
- After Step 1: proceed to Step 2, or abort if discovery surfaced a single happy path (route to `agentic-ground`).
|
|
88
|
+
- After Step 4: `/agentic-adr` to record the outcome, then delete the spike directory.
|
|
89
|
+
- If spike succeeds and production work follows: `/agentic-task` for work units (Spec ref the original spec; cite the ADR in task Notes).
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: agentic-spike
|
|
3
|
+
short_description: Staged spike with golden fixtures per WORKFLOW §14. Discovery + fixture + pipeline-with-gates + two-layer evaluation. For unknown-technique uncertainty, not non-trivial work in general.
|
|
4
|
+
policy:
|
|
5
|
+
allow_implicit_invocation: false
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-tdg
|
|
3
|
+
description: Outcome-based prompting per WORKFLOW.md §9. Give the agent the finish line first, not the path. Five steps — confirm regime, ground truth pair, Test Dependency Map, three approaches, pick by one criterion, implement and verify. Triggers on "outcome-based", "TDG", "ground truth", "expected output", "three approaches", "pick by criterion", "test dependency map", "TDM", "before modifying", "tests covering this file", "give the finish line". Routes to `agentic-spike` if the technique itself is uncertain. No file written; output is the verified implementation that lands through normal commits.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<background_information>
|
|
7
|
+
Implements WORKFLOW.md §9 (Outcome-Based Prompting / Test Dependency Map) end-to-end. The skill is for the implementation phase when the canonical technique is known and multiple implementation strategies are plausible. WORKFLOW §14 (`agentic-spike`) covers the technique-unknown regime; §9 (this skill) covers the implementation-strategy-uncertain regime.
|
|
8
|
+
|
|
9
|
+
No file is written. The output of the skill is the verified implementation that lands in the repo through normal commits. The ground-truth pair, candidate set, selection criterion, and TDM list go into the commit message body — or the task's `Notes` log when one exists — not into a separate `doc/` artifact.
|
|
10
|
+
|
|
11
|
+
Codex auto-trigger on description keywords is less mature than Claude Code's. If auto-invocation does not fire when the user mentions outcome-based prompting, ground truth, three approaches, or a Test Dependency Map, invoke this skill manually.
|
|
12
|
+
</background_information>
|
|
13
|
+
|
|
14
|
+
<instructions>
|
|
15
|
+
Step 0 — confirm regime. TDG is for the *technique-known, implementation-strategy-uncertain* regime. Run the skill only when the canonical approach is settled (via `agentic-ground` or prior knowledge) AND multiple implementation strategies could produce the expected output with different trade-offs along readability / performance / testability axes.
|
|
16
|
+
|
|
17
|
+
Route elsewhere when:
|
|
18
|
+
- The *technique itself* is uncertain across multiple plausible approaches → `agentic-spike` (WORKFLOW §14). Spike validates technique with golden fixture + per-stage debug; TDG validates implementation with ground-truth pair + TDM.
|
|
19
|
+
- The path is fully obvious (one-line fix, mechanical refactor, byte-for-byte port) → TDG is overkill; proceed directly without the skill.
|
|
20
|
+
- No tests cover the surface and the project does not yet have a test runner wired → consider `agentic-hooks` for project gates first; TDG depends on a verifiable green baseline.
|
|
21
|
+
|
|
22
|
+
Step 1 — ground truth pair. State raw input + exact expected output before any code is written. Concrete, not aspirational. The pair is the contract the implementation must satisfy.
|
|
23
|
+
|
|
24
|
+
Format depends on the surface:
|
|
25
|
+
- For pure functions: input arguments + expected return value, as code-block or JSON.
|
|
26
|
+
- For data transformations: source data + transformed data, side-by-side.
|
|
27
|
+
- For CLI / API surfaces: request payload + response payload, as paste-ready examples.
|
|
28
|
+
- For UI changes: pre-state DOM / screenshot + post-state DOM / screenshot.
|
|
29
|
+
|
|
30
|
+
Example (pure function):
|
|
31
|
+
```
|
|
32
|
+
Input: parse('--agent claude-code --yes')
|
|
33
|
+
Expected output: { agent: 'claude-code', yes: true, dryRun: false, force: false }
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The pair is small, explicit, and verifiable. Aspirational language ("loads fast", "handles all edge cases") is not ground truth — concrete examples are.
|
|
37
|
+
|
|
38
|
+
Step 2 — Test Dependency Map (TDM). List the tests covering the file(s) the change will touch. Run them to establish the green baseline. If no tests cover the surface, write one first that exercises the *current* behavior before any modification.
|
|
39
|
+
|
|
40
|
+
Process:
|
|
41
|
+
1. Grep for tests referencing the file by import path: `grep -r 'from.*<file>' test/ tests/`.
|
|
42
|
+
2. Grep for tests referencing the function or symbol: `grep -r '<symbol>' test/ tests/`.
|
|
43
|
+
3. Run the matched tests in isolation to confirm green: `npx node --test test/<matched>.test.js` or equivalent for the language.
|
|
44
|
+
4. If empty: write a test that asserts the current behavior. Run. Confirm green. *Then* proceed to Step 3.
|
|
45
|
+
|
|
46
|
+
The TDM is the verification surface — Step 5's "implement + verify" loop runs these tests, not the full suite, so the feedback loop stays under a few seconds. Full-suite runs happen at commit-time via the project's pre-push hook (`agentic-hooks`).
|
|
47
|
+
|
|
48
|
+
Step 3 — three approaches. Generate three implementation candidates that produce the ground-truth pair. Each candidate names trade-offs along the §9 axes:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Approach A: <name / one-line description>
|
|
52
|
+
- readability: <high / medium / low + reason>
|
|
53
|
+
- performance: <O(...), bytes allocated, etc.>
|
|
54
|
+
- testability: <surface area, mockability, isolation>
|
|
55
|
+
|
|
56
|
+
Approach B: <name / one-line description>
|
|
57
|
+
- readability: ...
|
|
58
|
+
- performance: ...
|
|
59
|
+
- testability: ...
|
|
60
|
+
|
|
61
|
+
Approach C: <name / one-line description>
|
|
62
|
+
- readability: ...
|
|
63
|
+
- performance: ...
|
|
64
|
+
- testability: ...
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
No premature optimization across all three axes — each candidate names its trade-offs honestly. A candidate that is "high on every axis" is suspect; surface what it actually trades against.
|
|
68
|
+
|
|
69
|
+
Three is a soft target. If the surface is small and only two approaches are plausible, two is fine. If the third candidate is contrived to fill a slot, drop it; the criterion-based selection in Step 4 handles two as easily as three.
|
|
70
|
+
|
|
71
|
+
Step 4 — pick by one criterion. The user names the criterion explicitly — readability *or* performance *or* testability, **not all three at once**. The skill commits to the selected candidate. Alternatives get one-line rejection notes for the commit message body or task `Notes`:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Criterion: testability
|
|
75
|
+
Picked: Approach B (smaller mock surface, no global state read)
|
|
76
|
+
Rejected:
|
|
77
|
+
- Approach A — one fewer allocation but mocks four singletons (testability lower)
|
|
78
|
+
- Approach C — clearer at the call site but writes shared state (testability lower)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The discipline: refuse "optimize for readability AND performance AND testability". Tradeoffs are real — naming the criterion makes them visible.
|
|
82
|
+
|
|
83
|
+
Step 5 — implement + verify. Modify the file. Run the TDM tests from Step 2. If green, the change is done — proceed to commit with the ground-truth pair + criterion + rejection notes in the commit message body. If red, iterate against the same ground-truth pair until green.
|
|
84
|
+
|
|
85
|
+
Verification rules:
|
|
86
|
+
- Do **not** edit the TDM tests to make them green. The tests are the verification surface; modifying them while implementing is the hidden form of "almost right" that WORKFLOW §12 names. If a test is wrong, fix the test first as a separate diff with its own ground-truth pair.
|
|
87
|
+
- Do **not** declare done before the TDM tests pass. Type-check passing is not the gate; the test gate is.
|
|
88
|
+
- If iteration loops past three attempts and the implementation still fails, **stop and re-examine the ground-truth pair**. The pair may be ambiguous, or the canonical approach may not actually map to the expected output. Routing back to `agentic-ground` (re-research) or `agentic-spike` (technique uncertain) is preferable to forcing a wrong implementation through.
|
|
89
|
+
</instructions>
|
|
90
|
+
|
|
91
|
+
<output_contract>
|
|
92
|
+
No file written. Output is structured conversation:
|
|
93
|
+
|
|
94
|
+
1. Confirmation of regime (Step 0 — TDG or routed elsewhere).
|
|
95
|
+
2. Ground-truth pair (Step 1).
|
|
96
|
+
3. TDM list with green-baseline confirmation (Step 2).
|
|
97
|
+
4. Three candidates with trade-off table (Step 3).
|
|
98
|
+
5. Selection by criterion + rejection notes (Step 4).
|
|
99
|
+
6. Implementation + verification result (Step 5).
|
|
100
|
+
|
|
101
|
+
When the change is committed, the ground-truth pair, criterion, and rejection notes go into the commit message body. When a task file exists, the same content also lands in the task's `Notes` log under a dated entry.
|
|
102
|
+
</output_contract>
|
|
103
|
+
|
|
104
|
+
## Next
|
|
105
|
+
|
|
106
|
+
- After Step 5 verification passes: commit the change with the ground-truth pair + criterion + rejection notes in the body.
|
|
107
|
+
- `/agentic-review main..HEAD` (or current scope) before merge — WORKFLOW §10. The TDM tests verify the implementation matches ground truth; §10 review checks coupling, edge cases, spec drift the pair did not cover.
|
|
108
|
+
- If the work spans multiple sessions: `/agentic-task` for explicit decomposition (Spec ref the original spec; cite this TDG run in the task `Notes`).
|
|
109
|
+
- If iteration stalled at Step 5 and routing back was needed: `/agentic-ground` (re-research) or `/agentic-spike` (technique uncertain).
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: agentic-tdg
|
|
3
|
+
short_description: Outcome-based prompting per WORKFLOW §9. Ground truth pair + Test Dependency Map + three approaches + single-criterion selection. For implementation-strategy uncertainty when the technique is known; routes to agentic-spike if the technique itself is uncertain.
|
|
4
|
+
policy:
|
|
5
|
+
allow_implicit_invocation: false
|