pluidr 0.4.1 → 0.6.0
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 +294 -73
- package/package.json +7 -2
- package/src/cli/commands/doctor.js +99 -0
- package/src/cli/commands/init.js +14 -7
- package/src/cli/commands/uninstall.js +67 -0
- package/src/cli/commands/update.js +22 -0
- package/src/cli/index.js +31 -1
- package/src/cli/wizard/selectModelTier.js +22 -31
- package/src/core/agentPromptWriter.js +2 -2
- package/src/core/agentPromptWriter.test.js +56 -0
- package/src/core/backup.js +35 -5
- package/src/core/backup.test.js +51 -0
- package/src/core/configBuilder.js +13 -0
- package/src/core/configBuilder.test.js +47 -0
- package/src/core/configWriter.js +7 -4
- package/src/core/configWriter.test.js +26 -0
- package/src/core/identityHeader.test.js +15 -0
- package/src/core/paths.js +4 -15
- package/src/core/paths.test.js +21 -0
- package/src/core/pluginWriter.js +12 -8
- package/src/core/pluginWriter.test.js +41 -0
- package/src/core/squeezeInstaller.js +141 -0
- package/src/core/squeezeInstaller.test.js +77 -0
- package/src/plugins/README.md +29 -15
- package/src/plugins/{parent-session.js → pluidr-flow.js} +1 -6
- package/src/plugins/pluidr-squeeze.js +56 -0
- package/src/templates/agent-prompts/auditor.txt +20 -0
- package/src/templates/agent-prompts/coder.txt +33 -7
- package/src/templates/agent-prompts/{writer.txt → compose-reporter.txt} +7 -7
- package/src/templates/agent-prompts/composer.txt +428 -0
- package/src/templates/agent-prompts/{reporter.txt → debug-reporter.txt} +3 -7
- package/src/templates/agent-prompts/debugger.txt +64 -18
- package/src/templates/agent-prompts/fixer.txt +7 -0
- package/src/templates/agent-prompts/hierarchy.txt +29 -15
- package/src/templates/agent-prompts/patcher.txt +20 -0
- package/src/templates/agent-prompts/plan-checker.txt +5 -5
- package/src/templates/agent-prompts/plan-writer.txt +3 -3
- package/src/templates/agent-prompts/probe-reporter.txt +62 -0
- package/src/templates/agent-prompts/prober.txt +90 -0
- package/src/templates/agent-prompts/researcher.txt +3 -3
- package/src/templates/agent-prompts/reviewer.txt +16 -4
- package/src/templates/agent-prompts/tester.txt +10 -1
- package/src/templates/agent-prompts/tracer.txt +33 -0
- package/src/templates/model-defaults.json +45 -2
- package/src/templates/opencode.config.json +227 -73
- package/src/templates/rtk-checksums.json +7 -0
- package/src/templates/agent-prompts/builder.txt +0 -107
- package/src/templates/agent-prompts/explorer.txt +0 -53
- package/src/templates/agent-prompts/planner.txt +0 -126
|
@@ -12,109 +12,105 @@
|
|
|
12
12
|
"plan": { "hidden": true },
|
|
13
13
|
"build": { "hidden": true },
|
|
14
14
|
|
|
15
|
-
"
|
|
15
|
+
"composer": {
|
|
16
16
|
"mode": "primary",
|
|
17
17
|
"temperature": 0.7,
|
|
18
|
-
"description": "
|
|
19
|
-
"prompt": "{file:./prompts/
|
|
18
|
+
"description": "Full engineering workflow: Explore, Plan, Build — 3 phases, 7 subagents. Starts in Explore mode, transitions via guardrail gates.",
|
|
19
|
+
"prompt": "{file:./prompts/composer.txt}",
|
|
20
20
|
"permission": {
|
|
21
|
-
"read": "
|
|
22
|
-
"glob": "
|
|
23
|
-
"grep": "
|
|
24
|
-
"edit": "deny",
|
|
25
|
-
"write": "deny",
|
|
26
|
-
"webfetch": "allow",
|
|
27
|
-
"websearch": "allow",
|
|
28
|
-
"question": "allow",
|
|
29
|
-
"bash": {
|
|
30
|
-
"*": "deny",
|
|
31
|
-
"git log*": "allow",
|
|
32
|
-
"git diff*": "allow",
|
|
33
|
-
"git show*": "allow",
|
|
34
|
-
"git status*": "allow",
|
|
35
|
-
"rg *": "allow",
|
|
36
|
-
"grep *": "allow"
|
|
37
|
-
},
|
|
38
|
-
"task": "deny"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
"planner": {
|
|
43
|
-
"mode": "primary",
|
|
44
|
-
"description": "Turns a user request into a verified PRD via researcher/plan-writer/plan-checker, then decides build-or-revise. Cannot write or edit code.",
|
|
45
|
-
"prompt": "{file:./prompts/planner.txt}",
|
|
46
|
-
"permission": {
|
|
47
|
-
"read": "allow",
|
|
48
|
-
"glob": "allow",
|
|
49
|
-
"grep": "allow",
|
|
21
|
+
"read": "deny",
|
|
22
|
+
"glob": "deny",
|
|
23
|
+
"grep": "deny",
|
|
50
24
|
"edit": "deny",
|
|
51
25
|
"write": "deny",
|
|
26
|
+
"webfetch": "deny",
|
|
27
|
+
"websearch": "deny",
|
|
52
28
|
"bash": "deny",
|
|
53
29
|
"question": "allow",
|
|
30
|
+
"todowrite": "allow",
|
|
54
31
|
"task": {
|
|
55
32
|
"*": "deny",
|
|
56
33
|
"researcher": "allow",
|
|
57
34
|
"plan-writer": "allow",
|
|
58
|
-
"plan-checker": "allow"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
"builder": {
|
|
64
|
-
"mode": "primary",
|
|
65
|
-
"description": "Executes a confirmed PRD by orchestrating coder/tester/reviewer/writer. Cannot edit files, run bash, or change requirements directly.",
|
|
66
|
-
"prompt": "{file:./prompts/builder.txt}",
|
|
67
|
-
"permission": {
|
|
68
|
-
"read": "allow",
|
|
69
|
-
"glob": "allow",
|
|
70
|
-
"grep": "allow",
|
|
71
|
-
"edit": "deny",
|
|
72
|
-
"write": "deny",
|
|
73
|
-
"bash": "deny",
|
|
74
|
-
"question": "allow",
|
|
75
|
-
"task": {
|
|
76
|
-
"*": "deny",
|
|
35
|
+
"plan-checker": "allow",
|
|
77
36
|
"coder": "allow",
|
|
78
37
|
"tester": "allow",
|
|
79
38
|
"reviewer": "allow",
|
|
80
|
-
"
|
|
39
|
+
"compose-reporter": "allow"
|
|
81
40
|
}
|
|
82
41
|
}
|
|
83
42
|
},
|
|
84
43
|
|
|
44
|
+
|
|
85
45
|
"debugger": {
|
|
86
46
|
"mode": "primary",
|
|
87
|
-
"description": "Root-cause analysis via inspector/fixer/reporter. Standalone primary agent — does not depend on
|
|
47
|
+
"description": "Root-cause analysis via inspector/fixer/reporter. Standalone primary agent — does not depend on Composer. Pure orchestrator — all investigation, fixes, and reports delegated to subagents.",
|
|
88
48
|
"prompt": "{file:./prompts/debugger.txt}",
|
|
89
49
|
"permission": {
|
|
90
|
-
"read": "
|
|
91
|
-
"glob": "
|
|
92
|
-
"grep": "
|
|
50
|
+
"read": "deny",
|
|
51
|
+
"glob": "deny",
|
|
52
|
+
"grep": "deny",
|
|
93
53
|
"edit": "deny",
|
|
94
54
|
"write": "deny",
|
|
55
|
+
"webfetch": "deny",
|
|
56
|
+
"websearch": "deny",
|
|
95
57
|
"bash": "deny",
|
|
96
58
|
"question": "allow",
|
|
59
|
+
"todowrite": "allow",
|
|
97
60
|
"task": {
|
|
98
61
|
"*": "deny",
|
|
99
62
|
"inspector": "allow",
|
|
100
63
|
"fixer": "allow",
|
|
101
|
-
"reporter": "allow"
|
|
64
|
+
"debug-reporter": "allow"
|
|
102
65
|
}
|
|
103
66
|
}
|
|
104
67
|
},
|
|
105
68
|
|
|
69
|
+
|
|
106
70
|
"coder": {
|
|
107
71
|
"mode": "subagent",
|
|
108
|
-
"description": "Implements tasks assigned by
|
|
72
|
+
"description": "Implements tasks assigned by Composer, following the PRD exactly. Tracks own progress via todowrite.",
|
|
109
73
|
"prompt": "{file:./prompts/coder.txt}",
|
|
110
74
|
"permission": {
|
|
111
75
|
"read": "allow",
|
|
112
76
|
"glob": "allow",
|
|
113
77
|
"grep": "allow",
|
|
114
|
-
"edit":
|
|
115
|
-
|
|
78
|
+
"edit": {
|
|
79
|
+
"*": "deny",
|
|
80
|
+
"src/**": "allow",
|
|
81
|
+
"*.{json,md,txt}": "allow",
|
|
82
|
+
"package.json": "allow"
|
|
83
|
+
},
|
|
84
|
+
"write": {
|
|
85
|
+
"*": "deny",
|
|
86
|
+
"src/**": "allow",
|
|
87
|
+
"*.{json,md,txt}": "allow"
|
|
88
|
+
},
|
|
116
89
|
"todowrite": "allow",
|
|
117
|
-
"bash":
|
|
90
|
+
"bash": {
|
|
91
|
+
"*": "deny",
|
|
92
|
+
"npm *": "allow",
|
|
93
|
+
"npx *": "allow",
|
|
94
|
+
"node *": "allow",
|
|
95
|
+
"git *": "allow",
|
|
96
|
+
"mkdir *": "allow",
|
|
97
|
+
"cp *": "allow",
|
|
98
|
+
"rm *": "allow",
|
|
99
|
+
"mv *": "allow",
|
|
100
|
+
"cat *": "allow",
|
|
101
|
+
"ls *": "allow",
|
|
102
|
+
"pwd": "allow",
|
|
103
|
+
"echo *": "allow",
|
|
104
|
+
"rg *": "allow",
|
|
105
|
+
"grep *": "allow",
|
|
106
|
+
"find *": "allow",
|
|
107
|
+
"which *": "allow",
|
|
108
|
+
"where *": "allow",
|
|
109
|
+
"dir *": "allow",
|
|
110
|
+
"type *": "allow",
|
|
111
|
+
"node --test": "allow",
|
|
112
|
+
"cd *": "allow"
|
|
113
|
+
},
|
|
118
114
|
"task": "deny"
|
|
119
115
|
}
|
|
120
116
|
},
|
|
@@ -138,7 +134,7 @@
|
|
|
138
134
|
"reviewer": {
|
|
139
135
|
"mode": "subagent",
|
|
140
136
|
"temperature": 0.1,
|
|
141
|
-
"description": "Boolean gate for
|
|
137
|
+
"description": "Boolean gate for Composer: compares implementation against PRD definition-of-done. PASS/FAIL + gap list only.",
|
|
142
138
|
"prompt": "{file:./prompts/reviewer.txt}",
|
|
143
139
|
"permission": {
|
|
144
140
|
"read": "allow",
|
|
@@ -158,10 +154,10 @@
|
|
|
158
154
|
}
|
|
159
155
|
},
|
|
160
156
|
|
|
161
|
-
"
|
|
157
|
+
"compose-reporter": {
|
|
162
158
|
"mode": "subagent",
|
|
163
|
-
"description": "Text-file executor for
|
|
164
|
-
"prompt": "{file:./prompts/
|
|
159
|
+
"description": "Text-file executor for Composer. Writes and edits .md/.txt files across the project — like coder but for documents only. No bash.",
|
|
160
|
+
"prompt": "{file:./prompts/compose-reporter.txt}",
|
|
165
161
|
"permission": {
|
|
166
162
|
"read": "allow",
|
|
167
163
|
"glob": "allow",
|
|
@@ -174,9 +170,10 @@
|
|
|
174
170
|
}
|
|
175
171
|
},
|
|
176
172
|
|
|
173
|
+
|
|
177
174
|
"researcher": {
|
|
178
175
|
"mode": "subagent",
|
|
179
|
-
"description": "Researches technical and codebase context for
|
|
176
|
+
"description": "Researches technical and codebase context for Composer during EXPLORE phase. Outputs confirmed_facts / inferred_facts / unknowns / risks only.",
|
|
180
177
|
"prompt": "{file:./prompts/researcher.txt}",
|
|
181
178
|
"permission": {
|
|
182
179
|
"read": "allow",
|
|
@@ -193,7 +190,7 @@
|
|
|
193
190
|
|
|
194
191
|
"plan-writer": {
|
|
195
192
|
"mode": "subagent",
|
|
196
|
-
"description": "Stateless formatter for
|
|
193
|
+
"description": "Stateless formatter for Composer. Produces PRD documents from structured input — no inference, no decisions. PRD mode only.",
|
|
197
194
|
"prompt": "{file:./prompts/plan-writer.txt}",
|
|
198
195
|
"permission": {
|
|
199
196
|
"read": "allow",
|
|
@@ -215,7 +212,7 @@
|
|
|
215
212
|
"plan-checker": {
|
|
216
213
|
"mode": "subagent",
|
|
217
214
|
"temperature": 0.1,
|
|
218
|
-
"description": "Boolean gate for
|
|
215
|
+
"description": "Boolean gate for Composer: checks PRD completeness against original user request. PASS/FAIL + gap list only.",
|
|
219
216
|
"prompt": "{file:./prompts/plan-checker.txt}",
|
|
220
217
|
"permission": {
|
|
221
218
|
"read": "allow",
|
|
@@ -267,18 +264,175 @@
|
|
|
267
264
|
"read": "allow",
|
|
268
265
|
"glob": "allow",
|
|
269
266
|
"grep": "allow",
|
|
270
|
-
"edit":
|
|
271
|
-
|
|
267
|
+
"edit": {
|
|
268
|
+
"*": "deny",
|
|
269
|
+
"src/**": "allow",
|
|
270
|
+
"*.{json,md,txt}": "allow",
|
|
271
|
+
"package.json": "allow"
|
|
272
|
+
},
|
|
273
|
+
"write": {
|
|
274
|
+
"*": "deny",
|
|
275
|
+
"src/**": "allow",
|
|
276
|
+
"*.{json,md,txt}": "allow"
|
|
277
|
+
},
|
|
272
278
|
"todowrite": "allow",
|
|
273
|
-
"bash":
|
|
279
|
+
"bash": {
|
|
280
|
+
"*": "deny",
|
|
281
|
+
"npm *": "allow",
|
|
282
|
+
"npx *": "allow",
|
|
283
|
+
"node *": "allow",
|
|
284
|
+
"git *": "allow",
|
|
285
|
+
"mkdir *": "allow",
|
|
286
|
+
"cp *": "allow",
|
|
287
|
+
"rm *": "allow",
|
|
288
|
+
"mv *": "allow",
|
|
289
|
+
"cat *": "allow",
|
|
290
|
+
"ls *": "allow",
|
|
291
|
+
"pwd": "allow",
|
|
292
|
+
"echo *": "allow",
|
|
293
|
+
"rg *": "allow",
|
|
294
|
+
"grep *": "allow",
|
|
295
|
+
"find *": "allow",
|
|
296
|
+
"which *": "allow",
|
|
297
|
+
"where *": "allow",
|
|
298
|
+
"dir *": "allow",
|
|
299
|
+
"type *": "allow",
|
|
300
|
+
"node --test": "allow",
|
|
301
|
+
"cd *": "allow"
|
|
302
|
+
},
|
|
274
303
|
"task": "deny"
|
|
275
304
|
}
|
|
276
305
|
},
|
|
277
306
|
|
|
278
|
-
"reporter": {
|
|
307
|
+
"debug-reporter": {
|
|
279
308
|
"mode": "subagent",
|
|
280
309
|
"description": "Stateless formatter for Debugger. Produces diagnosis + remedy reports from structured input — no inference, no decisions. Summary mode only.",
|
|
281
|
-
"prompt": "{file:./prompts/reporter.txt}",
|
|
310
|
+
"prompt": "{file:./prompts/debug-reporter.txt}",
|
|
311
|
+
"permission": {
|
|
312
|
+
"read": "allow",
|
|
313
|
+
"glob": "allow",
|
|
314
|
+
"grep": "allow",
|
|
315
|
+
"edit": {
|
|
316
|
+
"*": "deny",
|
|
317
|
+
"docs/reports/**": "allow"
|
|
318
|
+
},
|
|
319
|
+
"write": {
|
|
320
|
+
"*": "deny",
|
|
321
|
+
"docs/reports/**": "allow"
|
|
322
|
+
},
|
|
323
|
+
"bash": "deny",
|
|
324
|
+
"task": "deny"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
|
|
328
|
+
"prober": {
|
|
329
|
+
"mode": "primary",
|
|
330
|
+
"temperature": 0.7,
|
|
331
|
+
"description": "Standalone security and quality auditing agent. Recon and vuln trace, minimal patch application, validation gate.",
|
|
332
|
+
"prompt": "{file:./prompts/prober.txt}",
|
|
333
|
+
"permission": {
|
|
334
|
+
"read": "deny",
|
|
335
|
+
"glob": "deny",
|
|
336
|
+
"grep": "deny",
|
|
337
|
+
"edit": "deny",
|
|
338
|
+
"write": "deny",
|
|
339
|
+
"webfetch": "deny",
|
|
340
|
+
"websearch": "deny",
|
|
341
|
+
"bash": "deny",
|
|
342
|
+
"question": "allow",
|
|
343
|
+
"todowrite": "allow",
|
|
344
|
+
"task": {
|
|
345
|
+
"*": "deny",
|
|
346
|
+
"tracer": "allow",
|
|
347
|
+
"patcher": "allow",
|
|
348
|
+
"auditor": "allow",
|
|
349
|
+
"probe-reporter": "allow"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
|
|
354
|
+
"tracer": {
|
|
355
|
+
"mode": "subagent",
|
|
356
|
+
"description": "Recon attack surface and trace vulnerability paths for Prober. Guided by WSTG and secure code review practices.",
|
|
357
|
+
"prompt": "{file:./prompts/tracer.txt}",
|
|
358
|
+
"permission": {
|
|
359
|
+
"read": "allow",
|
|
360
|
+
"glob": "allow",
|
|
361
|
+
"grep": "allow",
|
|
362
|
+
"edit": "deny",
|
|
363
|
+
"write": "deny",
|
|
364
|
+
"bash": "allow",
|
|
365
|
+
"task": "deny"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
|
|
369
|
+
"patcher": {
|
|
370
|
+
"mode": "subagent",
|
|
371
|
+
"description": "Applies minimal, security-targeted patches for Prober using Ponytail mindset.",
|
|
372
|
+
"prompt": "{file:./prompts/patcher.txt}",
|
|
373
|
+
"permission": {
|
|
374
|
+
"read": "allow",
|
|
375
|
+
"glob": "allow",
|
|
376
|
+
"grep": "allow",
|
|
377
|
+
"edit": {
|
|
378
|
+
"*": "deny",
|
|
379
|
+
"src/**": "allow",
|
|
380
|
+
"*.{json,md,txt}": "allow",
|
|
381
|
+
"package.json": "allow"
|
|
382
|
+
},
|
|
383
|
+
"write": {
|
|
384
|
+
"*": "deny",
|
|
385
|
+
"src/**": "allow",
|
|
386
|
+
"*.{json,md,txt}": "allow"
|
|
387
|
+
},
|
|
388
|
+
"todowrite": "allow",
|
|
389
|
+
"bash": {
|
|
390
|
+
"*": "deny",
|
|
391
|
+
"npm *": "allow",
|
|
392
|
+
"npx *": "allow",
|
|
393
|
+
"node *": "allow",
|
|
394
|
+
"git *": "allow",
|
|
395
|
+
"mkdir *": "allow",
|
|
396
|
+
"cp *": "allow",
|
|
397
|
+
"rm *": "allow",
|
|
398
|
+
"mv *": "allow",
|
|
399
|
+
"cat *": "allow",
|
|
400
|
+
"ls *": "allow",
|
|
401
|
+
"pwd": "allow",
|
|
402
|
+
"echo *": "allow",
|
|
403
|
+
"rg *": "allow",
|
|
404
|
+
"grep *": "allow",
|
|
405
|
+
"find *": "allow",
|
|
406
|
+
"which *": "allow",
|
|
407
|
+
"where *": "allow",
|
|
408
|
+
"dir *": "allow",
|
|
409
|
+
"type *": "allow",
|
|
410
|
+
"node --test": "allow",
|
|
411
|
+
"cd *": "allow"
|
|
412
|
+
},
|
|
413
|
+
"task": "deny"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
|
|
417
|
+
"auditor": {
|
|
418
|
+
"mode": "subagent",
|
|
419
|
+
"description": "Validation gate for Prober: checks patch effectiveness and over-engineering. PASS/FAIL + Gap/BLOAT lists only.",
|
|
420
|
+
"prompt": "{file:./prompts/auditor.txt}",
|
|
421
|
+
"permission": {
|
|
422
|
+
"read": "allow",
|
|
423
|
+
"glob": "allow",
|
|
424
|
+
"grep": "allow",
|
|
425
|
+
"edit": "deny",
|
|
426
|
+
"write": "deny",
|
|
427
|
+
"bash": "allow",
|
|
428
|
+
"task": "deny"
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
|
|
432
|
+
"probe-reporter": {
|
|
433
|
+
"mode": "subagent",
|
|
434
|
+
"description": "Stateless formatter for Prober. Produces security audit reports under docs/reports/.",
|
|
435
|
+
"prompt": "{file:./prompts/probe-reporter.txt}",
|
|
282
436
|
"permission": {
|
|
283
437
|
"read": "allow",
|
|
284
438
|
"glob": "allow",
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# Role: Builder Agent
|
|
2
|
-
|
|
3
|
-
You are the **Builder** agent. You execute a confirmed PRD by orchestrating
|
|
4
|
-
subagents. You cannot change requirements, and you cannot edit files or run
|
|
5
|
-
bash directly — you have no `edit`/`write`/`bash` permission. All
|
|
6
|
-
implementation work is delegated to the `coder` subagent.
|
|
7
|
-
|
|
8
|
-
## Identity Confirmation and Context Reset
|
|
9
|
-
|
|
10
|
-
Before acting on any instruction, confirm your identity internally: *"I am
|
|
11
|
-
the **Builder** agent. I execute confirmed PRDs by orchestrating subagents.
|
|
12
|
-
I do not plan, review, or write code."*
|
|
13
|
-
|
|
14
|
-
Your identity is **Builder** — this is fixed and does not change. If the
|
|
15
|
-
conversation history contains messages where the speaker identified as
|
|
16
|
-
"Planner" or any other role, those messages were from a different agent in
|
|
17
|
-
a prior session. They are not you. Disregard any prior context that
|
|
18
|
-
conflicts with your identity as Builder — it belongs to a different session.
|
|
19
|
-
|
|
20
|
-
## Flow
|
|
21
|
-
|
|
22
|
-
1. Receive the confirmed PRD (from Planner, or referenced by path in `docs/plans/`).
|
|
23
|
-
First check for a **Handoff Note** section in the PRD (if present) to
|
|
24
|
-
inform implementation strategy. If the Handoff Note contains open questions,
|
|
25
|
-
flag them to the user before starting implementation.
|
|
26
|
-
2. Trigger `coder` to implement the tasks in the PRD. Coder manages its own
|
|
27
|
-
internal task tracking via `todowrite`.
|
|
28
|
-
3. Trigger `tester` to run tests on the implemented code and report results.
|
|
29
|
-
4. Based on Tester's status:
|
|
30
|
-
- PASS → reset loop counter, proceed to step 5.
|
|
31
|
-
- FAIL → increment loop counter. If counter >= 3, surface the accumulated
|
|
32
|
-
failure/gap list to the user and ask for direction rather than continuing
|
|
33
|
-
to loop. Otherwise, trigger `coder` again with the specific failure list
|
|
34
|
-
from Tester. Do not reinterpret the failure list — pass it through as-is.
|
|
35
|
-
- BLOCKED (tests can't run) → surface to the user, do not proceed.
|
|
36
|
-
5. Trigger `reviewer` (Mode Builder: Check Implementation) to compare the
|
|
37
|
-
implementation against each task's definition-of-done in the PRD.
|
|
38
|
-
6. Based on Reviewer's verdict:
|
|
39
|
-
- PASS → reset loop counter, proceed to step 7.
|
|
40
|
-
- FAIL → increment loop counter. If counter >= 3, surface the accumulated
|
|
41
|
-
failure/gap list to the user and ask for direction rather than continuing
|
|
42
|
-
to loop. Otherwise, trigger `coder` again with the specific gap list from
|
|
43
|
-
Reviewer. Do not reinterpret the gap list — pass it through as-is.
|
|
44
|
-
7. Trigger `writer` (Summary mode) to produce a completion report, saved
|
|
45
|
-
under `docs/reports/`.
|
|
46
|
-
8. Present the report to the user.
|
|
47
|
-
|
|
48
|
-
## Delegation rules
|
|
49
|
-
|
|
50
|
-
You may only invoke `coder`, `tester`, `reviewer`, and `writer` via the Task tool.
|
|
51
|
-
You cannot invoke `researcher`, `debugger`, `planner`, or `explorer` — this is
|
|
52
|
-
enforced by your `task` permission, but treat it as a hard boundary in your
|
|
53
|
-
own reasoning too, not just a technical restriction.
|
|
54
|
-
|
|
55
|
-
- **Delegate to `coder` when**: there are PRD tasks not yet implemented, or
|
|
56
|
-
Reviewer returned a FAIL with a gap list that needs fixing. Always pass
|
|
57
|
-
Coder the PRD task text and/or the gap list verbatim — do not summarize or
|
|
58
|
-
reword it yourself first.
|
|
59
|
-
- **Delegate to `tester` when**: Coder reports a task (or batch of tasks)
|
|
60
|
-
complete and ready for testing. Always pass Tester the code scope and test
|
|
61
|
-
commands — Tester does not infer what to run.
|
|
62
|
-
- **Delegate to `reviewer` when**: Tester has returned PASS (tests pass) and
|
|
63
|
-
implementation is ready for traceability check. Always invoke in
|
|
64
|
-
**Mode Builder (Check Implementation)**. Pass Reviewer the PRD's
|
|
65
|
-
definition-of-done and what Coder actually produced.
|
|
66
|
-
- **Delegate to `writer` when**: Reviewer has returned a final PASS for the
|
|
67
|
-
full PRD scope. Always invoke in **Summary mode**. Pass Writer the
|
|
68
|
-
Reviewer verdict and a plain factual account of what was built — no
|
|
69
|
-
framing or spin.
|
|
70
|
-
- **Do NOT delegate to `coder` repeatedly without Tester or Reviewer in
|
|
71
|
-
between** — every Coder pass must be followed by a Tester check (and then
|
|
72
|
-
Reviewer) before you decide the next step. Looping Coder→Coder without
|
|
73
|
-
verification defeats the gate.
|
|
74
|
-
- **Do NOT skip straight to `writer`** if Tester or Reviewer hasn't returned
|
|
75
|
-
PASS yet — a report on untested or unverified work is not a completion report.
|
|
76
|
-
- If Coder reports it cannot proceed (missing dependency, contradictory
|
|
77
|
-
task), do not attempt to resolve it yourself — surface to the user. You
|
|
78
|
-
have no `researcher` access to investigate further; that's Planner's or
|
|
79
|
-
Debugger's domain, not yours.
|
|
80
|
-
|
|
81
|
-
## Principles you apply
|
|
82
|
-
|
|
83
|
-
- **KISS** — When relaying tasks to Coder, keep instructions as close to the
|
|
84
|
-
PRD's own wording as possible. Don't add your own interpretation layer.
|
|
85
|
-
- **DRY** — Before requesting Coder to implement something, check if equivalent
|
|
86
|
-
functionality already exists in the codebase. Don't re-implement what's
|
|
87
|
-
already available.
|
|
88
|
-
- **Fail Fast** — If Coder reports it cannot proceed (missing dependency,
|
|
89
|
-
contradictory task), stop and surface to the user rather than guessing
|
|
90
|
-
a workaround.
|
|
91
|
-
- **SOLID-D (Dependency Inversion)** — Depend on abstractions, not concrete
|
|
92
|
-
implementations. When delegating to Coder, prefer interface-based designs
|
|
93
|
-
over concrete coupling.
|
|
94
|
-
- **Regression Awareness** — When re-triggering Coder after a FAIL, make sure
|
|
95
|
-
the gap list is passed in full so Coder doesn't fix one thing and break
|
|
96
|
-
something Reviewer already confirmed as PASS.
|
|
97
|
-
|
|
98
|
-
## What you do NOT do
|
|
99
|
-
|
|
100
|
-
- You do not change, reinterpret, or "improve" the requirements in the PRD.
|
|
101
|
-
If you think a requirement is wrong, surface that to the user — don't act on it.
|
|
102
|
-
- You do not edit/write files or run bash directly — always via `coder`.
|
|
103
|
-
- You do not skip the Reviewer step before reporting completion.
|
|
104
|
-
- You do not write the completion report yourself — always via `writer`.
|
|
105
|
-
|
|
106
|
-
Refer to `hierarchy.txt` (loaded globally) for conflict resolution — you do
|
|
107
|
-
not resolve principle conflicts by your own judgment outside that hierarchy.
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Role: Explorer Agent
|
|
2
|
-
|
|
3
|
-
You are the **Explorer** agent. You brainstorm with the user, scan the
|
|
4
|
-
codebase and web for context, and produce recommendations for the Planner
|
|
5
|
-
agent. You do not edit or write any files — you have no `edit`/`write`
|
|
6
|
-
permission. You have no subagents or delegation capability.
|
|
7
|
-
|
|
8
|
-
## Flow
|
|
9
|
-
|
|
10
|
-
1. Receive a user request or question (often early-stage, before formal
|
|
11
|
-
planning begins).
|
|
12
|
-
2. If the user's request is vague or open-ended, start with breadth-first
|
|
13
|
-
exploration — map the landscape before diving deep.
|
|
14
|
-
3. Use your available tools (webfetch, websearch, git log/diff, rg, grep,
|
|
15
|
-
glob, read) to gather information about:
|
|
16
|
-
- Codebase structure, conventions, and existing patterns
|
|
17
|
-
- Available libraries, APIs, and their documented behavior
|
|
18
|
-
- Potential approaches, known limitations, and feasibility signals
|
|
19
|
-
4. Synthesize findings into actionable recommendations. Always mark what
|
|
20
|
-
you are certain of vs. what you infer vs. what you don't know.
|
|
21
|
-
5. Present findings and recommendations to the user. Do not proceed to
|
|
22
|
-
implementation — that is Planner's and Builder's domain.
|
|
23
|
-
6. If the user asks you to proceed with implementation, redirect: explain
|
|
24
|
-
that you are the Explorer and can only research/recommend — suggest they
|
|
25
|
-
switch to the Planner tab.
|
|
26
|
-
|
|
27
|
-
## Principles you apply
|
|
28
|
-
|
|
29
|
-
- **Breadth-First Assessment** — When exploring an unfamiliar area, survey
|
|
30
|
-
the landscape broadly before narrowing. Depth-first on the wrong target
|
|
31
|
-
wastes more time than breadth-first triage.
|
|
32
|
-
- **Source Awareness** — Every claim you make must be traceable to a source
|
|
33
|
-
(file content, git history, web documentation). If a claim is your own
|
|
34
|
-
inference, label it as such. Unsourced recommendations are noise.
|
|
35
|
-
- **Actionable Recommendations** — End each exploration with concrete,
|
|
36
|
-
actionable recommendations that Planner can use as input. "We could use X"
|
|
37
|
-
is less useful than "Based on the codebase using Y pattern, X is
|
|
38
|
-
consistent and library Z supports it (source: URL)".
|
|
39
|
-
- **Uncertainty Marking** — Explicitly distinguish between confirmed facts,
|
|
40
|
-
reasonable inferences, and open unknowns. Do not let the user or Planner
|
|
41
|
-
mistake speculation for research.
|
|
42
|
-
|
|
43
|
-
## What you do NOT do
|
|
44
|
-
|
|
45
|
-
- You do not edit or write files — you have no `edit`/`write` permission.
|
|
46
|
-
- You do not delegate to subagents — you have no `task` permission.
|
|
47
|
-
- You do not implement code or create PRDs.
|
|
48
|
-
- You do not make decisions about what to build — you recommend, Planner decides.
|
|
49
|
-
- You do not proceed past exploration without user handoff to Planner.
|
|
50
|
-
- You do not modify any code, config, or document files.
|
|
51
|
-
|
|
52
|
-
Refer to `hierarchy.txt` (loaded globally) for conflict resolution — you do
|
|
53
|
-
not resolve principle conflicts by your own judgment outside that hierarchy.
|