@cluesmith/codev 2.0.0-rc.6 → 2.0.0-rc.61
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/bin/af.js +2 -2
- package/bin/consult.js +1 -1
- package/bin/porch.js +6 -35
- package/dashboard/dist/assets/index-CXloFYpB.css +32 -0
- package/dashboard/dist/assets/index-Ca2fjOJf.js +131 -0
- package/dashboard/dist/assets/index-Ca2fjOJf.js.map +1 -0
- package/dashboard/dist/index.html +14 -0
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +94 -65
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/architect.d.ts.map +1 -1
- package/dist/agent-farm/commands/architect.js +13 -6
- package/dist/agent-farm/commands/architect.js.map +1 -1
- package/dist/agent-farm/commands/attach.d.ts +13 -0
- package/dist/agent-farm/commands/attach.d.ts.map +1 -0
- package/dist/agent-farm/commands/attach.js +202 -0
- package/dist/agent-farm/commands/attach.js.map +1 -0
- package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +30 -3
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/consult.js +1 -1
- package/dist/agent-farm/commands/consult.js.map +1 -1
- package/dist/agent-farm/commands/index.d.ts +2 -2
- package/dist/agent-farm/commands/index.d.ts.map +1 -1
- package/dist/agent-farm/commands/index.js +2 -2
- package/dist/agent-farm/commands/index.js.map +1 -1
- package/dist/agent-farm/commands/open.d.ts +4 -2
- package/dist/agent-farm/commands/open.d.ts.map +1 -1
- package/dist/agent-farm/commands/open.js +34 -70
- package/dist/agent-farm/commands/open.js.map +1 -1
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +55 -17
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/shell.d.ts +15 -0
- package/dist/agent-farm/commands/shell.d.ts.map +1 -0
- package/dist/agent-farm/commands/shell.js +61 -0
- package/dist/agent-farm/commands/shell.js.map +1 -0
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +503 -226
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/start.d.ts +3 -0
- package/dist/agent-farm/commands/start.d.ts.map +1 -1
- package/dist/agent-farm/commands/start.js +58 -265
- package/dist/agent-farm/commands/start.js.map +1 -1
- package/dist/agent-farm/commands/status.d.ts +2 -0
- package/dist/agent-farm/commands/status.d.ts.map +1 -1
- package/dist/agent-farm/commands/status.js +61 -3
- package/dist/agent-farm/commands/status.js.map +1 -1
- package/dist/agent-farm/commands/stop.d.ts +6 -0
- package/dist/agent-farm/commands/stop.d.ts.map +1 -1
- package/dist/agent-farm/commands/stop.js +116 -12
- package/dist/agent-farm/commands/stop.js.map +1 -1
- package/dist/agent-farm/commands/tower.d.ts +9 -0
- package/dist/agent-farm/commands/tower.d.ts.map +1 -1
- package/dist/agent-farm/commands/tower.js +59 -19
- package/dist/agent-farm/commands/tower.js.map +1 -1
- package/dist/agent-farm/db/index.d.ts.map +1 -1
- package/dist/agent-farm/db/index.js +124 -0
- package/dist/agent-farm/db/index.js.map +1 -1
- package/dist/agent-farm/db/schema.d.ts +2 -2
- package/dist/agent-farm/db/schema.d.ts.map +1 -1
- package/dist/agent-farm/db/schema.js +26 -5
- package/dist/agent-farm/db/schema.js.map +1 -1
- package/dist/agent-farm/db/types.d.ts +3 -0
- package/dist/agent-farm/db/types.d.ts.map +1 -1
- package/dist/agent-farm/db/types.js +3 -0
- package/dist/agent-farm/db/types.js.map +1 -1
- package/dist/agent-farm/hq-connector.d.ts +2 -6
- package/dist/agent-farm/hq-connector.d.ts.map +1 -1
- package/dist/agent-farm/hq-connector.js +2 -17
- package/dist/agent-farm/hq-connector.js.map +1 -1
- package/dist/agent-farm/lib/tower-client.d.ts +157 -0
- package/dist/agent-farm/lib/tower-client.d.ts.map +1 -0
- package/dist/agent-farm/lib/tower-client.js +223 -0
- package/dist/agent-farm/lib/tower-client.js.map +1 -0
- package/dist/agent-farm/servers/tower-server.js +2340 -109
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/state.d.ts +4 -10
- package/dist/agent-farm/state.d.ts.map +1 -1
- package/dist/agent-farm/state.js +30 -31
- package/dist/agent-farm/state.js.map +1 -1
- package/dist/agent-farm/types.d.ts +48 -1
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +13 -14
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/deps.d.ts.map +1 -1
- package/dist/agent-farm/utils/deps.js +0 -16
- package/dist/agent-farm/utils/deps.js.map +1 -1
- package/dist/agent-farm/utils/notifications.d.ts +30 -0
- package/dist/agent-farm/utils/notifications.d.ts.map +1 -0
- package/dist/agent-farm/utils/notifications.js +121 -0
- package/dist/agent-farm/utils/notifications.js.map +1 -0
- package/dist/agent-farm/utils/port-registry.d.ts +0 -1
- package/dist/agent-farm/utils/port-registry.d.ts.map +1 -1
- package/dist/agent-farm/utils/port-registry.js +1 -1
- package/dist/agent-farm/utils/port-registry.js.map +1 -1
- package/dist/agent-farm/utils/server-utils.d.ts +4 -4
- package/dist/agent-farm/utils/server-utils.d.ts.map +1 -1
- package/dist/agent-farm/utils/server-utils.js +4 -15
- package/dist/agent-farm/utils/server-utils.js.map +1 -1
- package/dist/agent-farm/utils/shell.d.ts +9 -22
- package/dist/agent-farm/utils/shell.d.ts.map +1 -1
- package/dist/agent-farm/utils/shell.js +34 -34
- package/dist/agent-farm/utils/shell.js.map +1 -1
- package/dist/agent-farm/utils/terminal-ports.d.ts +1 -1
- package/dist/agent-farm/utils/terminal-ports.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +9 -54
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +49 -4
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts +2 -0
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +103 -6
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +0 -15
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +41 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/porch/build-counter.d.ts +5 -0
- package/dist/commands/porch/build-counter.d.ts.map +1 -0
- package/dist/commands/porch/build-counter.js +5 -0
- package/dist/commands/porch/build-counter.js.map +1 -0
- package/dist/commands/porch/checks.d.ts +17 -29
- package/dist/commands/porch/checks.d.ts.map +1 -1
- package/dist/commands/porch/checks.js +96 -144
- package/dist/commands/porch/checks.js.map +1 -1
- package/dist/commands/porch/index.d.ts +21 -43
- package/dist/commands/porch/index.d.ts.map +1 -1
- package/dist/commands/porch/index.js +418 -1123
- package/dist/commands/porch/index.js.map +1 -1
- package/dist/commands/porch/next.d.ts +22 -0
- package/dist/commands/porch/next.d.ts.map +1 -0
- package/dist/commands/porch/next.js +481 -0
- package/dist/commands/porch/next.js.map +1 -0
- package/dist/commands/porch/plan.d.ts +70 -0
- package/dist/commands/porch/plan.d.ts.map +1 -0
- package/dist/commands/porch/plan.js +190 -0
- package/dist/commands/porch/plan.js.map +1 -0
- package/dist/commands/porch/prompts.d.ts +19 -0
- package/dist/commands/porch/prompts.d.ts.map +1 -0
- package/dist/commands/porch/prompts.js +255 -0
- package/dist/commands/porch/prompts.js.map +1 -0
- package/dist/commands/porch/protocol.d.ts +59 -0
- package/dist/commands/porch/protocol.d.ts.map +1 -0
- package/dist/commands/porch/protocol.js +294 -0
- package/dist/commands/porch/protocol.js.map +1 -0
- package/dist/commands/porch/state.d.ts +23 -112
- package/dist/commands/porch/state.d.ts.map +1 -1
- package/dist/commands/porch/state.js +81 -699
- package/dist/commands/porch/state.js.map +1 -1
- package/dist/commands/porch/types.d.ts +99 -164
- package/dist/commands/porch/types.d.ts.map +1 -1
- package/dist/commands/porch/types.js +2 -1
- package/dist/commands/porch/types.js.map +1 -1
- package/dist/commands/porch/verdict.d.ts +31 -0
- package/dist/commands/porch/verdict.d.ts.map +1 -0
- package/dist/commands/porch/verdict.js +59 -0
- package/dist/commands/porch/verdict.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +31 -0
- package/dist/commands/update.js.map +1 -1
- package/dist/lib/scaffold.d.ts +37 -0
- package/dist/lib/scaffold.d.ts.map +1 -1
- package/dist/lib/scaffold.js +114 -0
- package/dist/lib/scaffold.js.map +1 -1
- package/dist/terminal/index.d.ts +8 -0
- package/dist/terminal/index.d.ts.map +1 -0
- package/dist/terminal/index.js +5 -0
- package/dist/terminal/index.js.map +1 -0
- package/dist/terminal/pty-manager.d.ts +60 -0
- package/dist/terminal/pty-manager.d.ts.map +1 -0
- package/dist/terminal/pty-manager.js +334 -0
- package/dist/terminal/pty-manager.js.map +1 -0
- package/dist/terminal/pty-session.d.ts +79 -0
- package/dist/terminal/pty-session.d.ts.map +1 -0
- package/dist/terminal/pty-session.js +215 -0
- package/dist/terminal/pty-session.js.map +1 -0
- package/dist/terminal/ring-buffer.d.ts +27 -0
- package/dist/terminal/ring-buffer.d.ts.map +1 -0
- package/dist/terminal/ring-buffer.js +74 -0
- package/dist/terminal/ring-buffer.js.map +1 -0
- package/dist/terminal/ws-protocol.d.ts +27 -0
- package/dist/terminal/ws-protocol.d.ts.map +1 -0
- package/dist/terminal/ws-protocol.js +44 -0
- package/dist/terminal/ws-protocol.js.map +1 -0
- package/package.json +18 -5
- package/skeleton/.claude/skills/af/SKILL.md +74 -0
- package/skeleton/.claude/skills/codev/SKILL.md +41 -0
- package/skeleton/.claude/skills/consult/SKILL.md +81 -0
- package/skeleton/.claude/skills/generate-image/SKILL.md +56 -0
- package/skeleton/DEPENDENCIES.md +3 -29
- package/skeleton/builders.md +1 -1
- package/skeleton/consult-types/impl-review.md +9 -0
- package/skeleton/porch/prompts/defend.md +1 -1
- package/skeleton/porch/prompts/evaluate.md +2 -2
- package/skeleton/porch/prompts/implement.md +1 -1
- package/skeleton/porch/prompts/plan.md +1 -1
- package/skeleton/porch/prompts/review.md +4 -4
- package/skeleton/porch/prompts/specify.md +1 -1
- package/skeleton/porch/prompts/understand.md +2 -2
- package/skeleton/protocol-schema.json +282 -0
- package/skeleton/protocols/bugfix/builder-prompt.md +54 -0
- package/skeleton/protocols/bugfix/prompts/fix.md +77 -0
- package/skeleton/protocols/bugfix/prompts/investigate.md +77 -0
- package/skeleton/protocols/bugfix/prompts/pr.md +61 -0
- package/skeleton/protocols/bugfix/protocol.json +19 -2
- package/skeleton/protocols/experiment/builder-prompt.md +52 -0
- package/skeleton/protocols/experiment/protocol.json +101 -0
- package/skeleton/protocols/experiment/protocol.md +3 -3
- package/skeleton/protocols/experiment/templates/notes.md +1 -1
- package/skeleton/protocols/maintain/builder-prompt.md +46 -0
- package/skeleton/protocols/maintain/prompts/audit.md +111 -0
- package/skeleton/protocols/maintain/prompts/clean.md +91 -0
- package/skeleton/protocols/maintain/prompts/sync.md +113 -0
- package/skeleton/protocols/maintain/prompts/verify.md +110 -0
- package/skeleton/protocols/maintain/protocol.json +141 -0
- package/skeleton/protocols/maintain/protocol.md +14 -8
- package/skeleton/protocols/protocol-schema.json +54 -1
- package/skeleton/protocols/spir/builder-prompt.md +59 -0
- package/skeleton/protocols/spir/prompts/implement.md +208 -0
- package/skeleton/protocols/{spider → spir}/prompts/plan.md +6 -70
- package/skeleton/protocols/{spider → spir}/prompts/review.md +7 -25
- package/skeleton/protocols/{spider → spir}/prompts/specify.md +33 -61
- package/skeleton/protocols/spir/protocol.json +152 -0
- package/skeleton/protocols/{spider → spir}/protocol.md +35 -21
- package/skeleton/protocols/{spider → spir}/templates/plan.md +14 -0
- package/skeleton/protocols/{spider → spir}/templates/review.md +1 -1
- package/skeleton/protocols/tick/builder-prompt.md +56 -0
- package/skeleton/protocols/tick/protocol.json +7 -2
- package/skeleton/protocols/tick/protocol.md +18 -18
- package/skeleton/protocols/tick/templates/review.md +1 -1
- package/skeleton/resources/commands/agent-farm.md +25 -43
- package/skeleton/resources/commands/overview.md +7 -17
- package/skeleton/resources/workflow-reference.md +4 -4
- package/skeleton/roles/architect.md +152 -315
- package/skeleton/roles/builder.md +109 -218
- package/skeleton/templates/AGENTS.md +2 -2
- package/skeleton/templates/CLAUDE.md +2 -2
- package/skeleton/templates/cheatsheet.md +7 -5
- package/skeleton/templates/projectlist.md +1 -1
- package/templates/dashboard/index.html +17 -43
- package/templates/dashboard/js/dialogs.js +7 -7
- package/templates/dashboard/js/files.js +2 -2
- package/templates/dashboard/js/main.js +4 -4
- package/templates/dashboard/js/projects.js +3 -3
- package/templates/dashboard/js/tabs.js +1 -1
- package/templates/dashboard/js/utils.js +22 -87
- package/templates/open.html +26 -0
- package/templates/tower.html +542 -27
- package/dist/agent-farm/commands/kickoff.d.ts +0 -19
- package/dist/agent-farm/commands/kickoff.d.ts.map +0 -1
- package/dist/agent-farm/commands/kickoff.js +0 -331
- package/dist/agent-farm/commands/kickoff.js.map +0 -1
- package/dist/agent-farm/commands/rename.d.ts +0 -13
- package/dist/agent-farm/commands/rename.d.ts.map +0 -1
- package/dist/agent-farm/commands/rename.js +0 -33
- package/dist/agent-farm/commands/rename.js.map +0 -1
- package/dist/agent-farm/commands/tutorial.d.ts +0 -10
- package/dist/agent-farm/commands/tutorial.d.ts.map +0 -1
- package/dist/agent-farm/commands/tutorial.js +0 -49
- package/dist/agent-farm/commands/tutorial.js.map +0 -1
- package/dist/agent-farm/commands/util.d.ts +0 -15
- package/dist/agent-farm/commands/util.d.ts.map +0 -1
- package/dist/agent-farm/commands/util.js +0 -108
- package/dist/agent-farm/commands/util.js.map +0 -1
- package/dist/agent-farm/servers/dashboard-server.d.ts +0 -7
- package/dist/agent-farm/servers/dashboard-server.d.ts.map +0 -1
- package/dist/agent-farm/servers/dashboard-server.js +0 -1872
- package/dist/agent-farm/servers/dashboard-server.js.map +0 -1
- package/dist/agent-farm/servers/open-server.d.ts +0 -7
- package/dist/agent-farm/servers/open-server.d.ts.map +0 -1
- package/dist/agent-farm/servers/open-server.js +0 -315
- package/dist/agent-farm/servers/open-server.js.map +0 -1
- package/dist/agent-farm/tutorial/index.d.ts +0 -8
- package/dist/agent-farm/tutorial/index.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/index.js +0 -8
- package/dist/agent-farm/tutorial/index.js.map +0 -1
- package/dist/agent-farm/tutorial/prompts.d.ts +0 -57
- package/dist/agent-farm/tutorial/prompts.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/prompts.js +0 -147
- package/dist/agent-farm/tutorial/prompts.js.map +0 -1
- package/dist/agent-farm/tutorial/runner.d.ts +0 -52
- package/dist/agent-farm/tutorial/runner.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/runner.js +0 -204
- package/dist/agent-farm/tutorial/runner.js.map +0 -1
- package/dist/agent-farm/tutorial/state.d.ts +0 -26
- package/dist/agent-farm/tutorial/state.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/state.js +0 -89
- package/dist/agent-farm/tutorial/state.js.map +0 -1
- package/dist/agent-farm/tutorial/steps/first-spec.d.ts +0 -7
- package/dist/agent-farm/tutorial/steps/first-spec.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/steps/first-spec.js +0 -136
- package/dist/agent-farm/tutorial/steps/first-spec.js.map +0 -1
- package/dist/agent-farm/tutorial/steps/implementation.d.ts +0 -7
- package/dist/agent-farm/tutorial/steps/implementation.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/steps/implementation.js +0 -76
- package/dist/agent-farm/tutorial/steps/implementation.js.map +0 -1
- package/dist/agent-farm/tutorial/steps/index.d.ts +0 -10
- package/dist/agent-farm/tutorial/steps/index.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/steps/index.js +0 -10
- package/dist/agent-farm/tutorial/steps/index.js.map +0 -1
- package/dist/agent-farm/tutorial/steps/planning.d.ts +0 -7
- package/dist/agent-farm/tutorial/steps/planning.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/steps/planning.js +0 -143
- package/dist/agent-farm/tutorial/steps/planning.js.map +0 -1
- package/dist/agent-farm/tutorial/steps/review.d.ts +0 -7
- package/dist/agent-farm/tutorial/steps/review.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/steps/review.js +0 -78
- package/dist/agent-farm/tutorial/steps/review.js.map +0 -1
- package/dist/agent-farm/tutorial/steps/setup.d.ts +0 -7
- package/dist/agent-farm/tutorial/steps/setup.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/steps/setup.js +0 -126
- package/dist/agent-farm/tutorial/steps/setup.js.map +0 -1
- package/dist/agent-farm/tutorial/steps/welcome.d.ts +0 -7
- package/dist/agent-farm/tutorial/steps/welcome.d.ts.map +0 -1
- package/dist/agent-farm/tutorial/steps/welcome.js +0 -50
- package/dist/agent-farm/tutorial/steps/welcome.js.map +0 -1
- package/dist/commands/pcheck/cache.d.ts +0 -48
- package/dist/commands/pcheck/cache.d.ts.map +0 -1
- package/dist/commands/pcheck/cache.js +0 -170
- package/dist/commands/pcheck/cache.js.map +0 -1
- package/dist/commands/pcheck/evaluator.d.ts +0 -15
- package/dist/commands/pcheck/evaluator.d.ts.map +0 -1
- package/dist/commands/pcheck/evaluator.js +0 -246
- package/dist/commands/pcheck/evaluator.js.map +0 -1
- package/dist/commands/pcheck/index.d.ts +0 -12
- package/dist/commands/pcheck/index.d.ts.map +0 -1
- package/dist/commands/pcheck/index.js +0 -249
- package/dist/commands/pcheck/index.js.map +0 -1
- package/dist/commands/pcheck/parser.d.ts +0 -39
- package/dist/commands/pcheck/parser.d.ts.map +0 -1
- package/dist/commands/pcheck/parser.js +0 -155
- package/dist/commands/pcheck/parser.js.map +0 -1
- package/dist/commands/pcheck/types.d.ts +0 -82
- package/dist/commands/pcheck/types.d.ts.map +0 -1
- package/dist/commands/pcheck/types.js +0 -5
- package/dist/commands/pcheck/types.js.map +0 -1
- package/dist/commands/porch/consultation.d.ts +0 -56
- package/dist/commands/porch/consultation.d.ts.map +0 -1
- package/dist/commands/porch/consultation.js +0 -330
- package/dist/commands/porch/consultation.js.map +0 -1
- package/dist/commands/porch/notifications.d.ts +0 -99
- package/dist/commands/porch/notifications.d.ts.map +0 -1
- package/dist/commands/porch/notifications.js +0 -223
- package/dist/commands/porch/notifications.js.map +0 -1
- package/dist/commands/porch/plan-parser.d.ts +0 -38
- package/dist/commands/porch/plan-parser.d.ts.map +0 -1
- package/dist/commands/porch/plan-parser.js +0 -166
- package/dist/commands/porch/plan-parser.js.map +0 -1
- package/dist/commands/porch/protocol-loader.d.ts +0 -46
- package/dist/commands/porch/protocol-loader.d.ts.map +0 -1
- package/dist/commands/porch/protocol-loader.js +0 -253
- package/dist/commands/porch/protocol-loader.js.map +0 -1
- package/dist/commands/porch/signal-parser.d.ts +0 -88
- package/dist/commands/porch/signal-parser.d.ts.map +0 -1
- package/dist/commands/porch/signal-parser.js +0 -148
- package/dist/commands/porch/signal-parser.js.map +0 -1
- package/dist/commands/tower.d.ts +0 -16
- package/dist/commands/tower.d.ts.map +0 -1
- package/dist/commands/tower.js +0 -21
- package/dist/commands/tower.js.map +0 -1
- package/skeleton/config.json +0 -7
- package/skeleton/porch/protocols/bugfix.json +0 -85
- package/skeleton/porch/protocols/spider.json +0 -135
- package/skeleton/porch/protocols/tick.json +0 -76
- package/skeleton/protocols/spider/prompts/defend.md +0 -215
- package/skeleton/protocols/spider/prompts/evaluate.md +0 -241
- package/skeleton/protocols/spider/prompts/implement.md +0 -149
- package/skeleton/protocols/spider/protocol.json +0 -210
- package/templates/dashboard/css/activity.css +0 -151
- package/templates/dashboard/js/activity.js +0 -112
- /package/skeleton/protocols/{spider → spir}/templates/spec.md +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../protocol-schema.json",
|
|
3
|
+
"name": "maintain",
|
|
4
|
+
"alias": "maint",
|
|
5
|
+
"version": "2.0.0",
|
|
6
|
+
"description": "Codebase maintenance - dead code removal, doc sync, hygiene with 3-way review",
|
|
7
|
+
"input": {
|
|
8
|
+
"type": "protocol",
|
|
9
|
+
"required": false,
|
|
10
|
+
"default_for": ["--protocol maintain"]
|
|
11
|
+
},
|
|
12
|
+
"phases": [
|
|
13
|
+
{
|
|
14
|
+
"id": "audit",
|
|
15
|
+
"name": "Audit",
|
|
16
|
+
"description": "Analyze codebase for dead code, unused dependencies, stale docs",
|
|
17
|
+
"type": "build_verify",
|
|
18
|
+
"build": {
|
|
19
|
+
"prompt": "audit.md",
|
|
20
|
+
"artifact": "codev/maintain/*.md"
|
|
21
|
+
},
|
|
22
|
+
"verify": {
|
|
23
|
+
"type": "impl-review",
|
|
24
|
+
"models": ["gemini", "codex", "claude"],
|
|
25
|
+
"parallel": true
|
|
26
|
+
},
|
|
27
|
+
"max_iterations": 3,
|
|
28
|
+
"on_complete": {
|
|
29
|
+
"commit": true,
|
|
30
|
+
"push": true
|
|
31
|
+
},
|
|
32
|
+
"next": "clean"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "clean",
|
|
36
|
+
"name": "Clean",
|
|
37
|
+
"description": "Remove identified dead code and unused dependencies",
|
|
38
|
+
"type": "build_verify",
|
|
39
|
+
"build": {
|
|
40
|
+
"prompt": "clean.md",
|
|
41
|
+
"artifact": "src/**/*.{ts,tsx,js,jsx}"
|
|
42
|
+
},
|
|
43
|
+
"verify": {
|
|
44
|
+
"type": "impl-review",
|
|
45
|
+
"models": ["gemini", "codex", "claude"],
|
|
46
|
+
"parallel": true
|
|
47
|
+
},
|
|
48
|
+
"max_iterations": 5,
|
|
49
|
+
"on_complete": {
|
|
50
|
+
"commit": true,
|
|
51
|
+
"push": true
|
|
52
|
+
},
|
|
53
|
+
"checks": {
|
|
54
|
+
"build": {
|
|
55
|
+
"command": "npm run build",
|
|
56
|
+
"on_fail": "retry",
|
|
57
|
+
"max_retries": 2
|
|
58
|
+
},
|
|
59
|
+
"tests": {
|
|
60
|
+
"command": "npm test -- --exclude='**/e2e/**'",
|
|
61
|
+
"on_fail": "retry",
|
|
62
|
+
"max_retries": 2
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"next": "sync"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "sync",
|
|
69
|
+
"name": "Sync Documentation",
|
|
70
|
+
"description": "Update documentation to match current codebase",
|
|
71
|
+
"type": "build_verify",
|
|
72
|
+
"build": {
|
|
73
|
+
"prompt": "sync.md",
|
|
74
|
+
"artifact": "codev/resources/*.md"
|
|
75
|
+
},
|
|
76
|
+
"verify": {
|
|
77
|
+
"type": "impl-review",
|
|
78
|
+
"models": ["gemini", "codex", "claude"],
|
|
79
|
+
"parallel": true
|
|
80
|
+
},
|
|
81
|
+
"max_iterations": 5,
|
|
82
|
+
"on_complete": {
|
|
83
|
+
"commit": true,
|
|
84
|
+
"push": true
|
|
85
|
+
},
|
|
86
|
+
"next": "verify"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "verify",
|
|
90
|
+
"name": "Verify",
|
|
91
|
+
"description": "Final validation and PR creation",
|
|
92
|
+
"type": "build_verify",
|
|
93
|
+
"build": {
|
|
94
|
+
"prompt": "verify.md",
|
|
95
|
+
"artifact": "codev/maintain/*.md"
|
|
96
|
+
},
|
|
97
|
+
"verify": {
|
|
98
|
+
"type": "pr-ready",
|
|
99
|
+
"models": ["gemini", "codex", "claude"],
|
|
100
|
+
"parallel": true
|
|
101
|
+
},
|
|
102
|
+
"max_iterations": 3,
|
|
103
|
+
"on_complete": {
|
|
104
|
+
"commit": true,
|
|
105
|
+
"push": true
|
|
106
|
+
},
|
|
107
|
+
"checks": {
|
|
108
|
+
"build": {
|
|
109
|
+
"command": "npm run build",
|
|
110
|
+
"on_fail": "retry",
|
|
111
|
+
"max_retries": 2
|
|
112
|
+
},
|
|
113
|
+
"tests": {
|
|
114
|
+
"command": "npm test",
|
|
115
|
+
"on_fail": "retry",
|
|
116
|
+
"max_retries": 2
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"gate": "maintain-complete",
|
|
120
|
+
"next": null
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"signals": {
|
|
124
|
+
"PHASE_COMPLETE": {
|
|
125
|
+
"description": "Signal current phase is complete",
|
|
126
|
+
"transitions_to": "verify"
|
|
127
|
+
},
|
|
128
|
+
"BLOCKED": {
|
|
129
|
+
"description": "Signal maintenance is blocked",
|
|
130
|
+
"requires": "reason"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"defaults": {
|
|
134
|
+
"mode": "strict",
|
|
135
|
+
"max_iterations": 5,
|
|
136
|
+
"verify": {
|
|
137
|
+
"models": ["gemini", "codex", "claude"],
|
|
138
|
+
"parallel": true
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
MAINTAIN is a periodic maintenance protocol for keeping codebases healthy.
|
|
5
|
+
MAINTAIN is a periodic maintenance protocol for keeping codebases healthy. It runs as a **strict porch protocol** with sequential phases and 3-way consultation (Gemini, Codex, Claude) at each phase.
|
|
6
6
|
|
|
7
7
|
**Core Principle**: Regular maintenance prevents technical debt accumulation.
|
|
8
8
|
|
|
@@ -22,20 +22,26 @@ Any builder can update these files during development, but MAINTAIN ensures they
|
|
|
22
22
|
|
|
23
23
|
## Execution Model
|
|
24
24
|
|
|
25
|
-
MAINTAIN is
|
|
25
|
+
MAINTAIN is orchestrated by porch with 4 sequential phases:
|
|
26
26
|
|
|
27
27
|
```
|
|
28
|
-
Architect: "Time for maintenance"
|
|
29
|
-
↓
|
|
30
28
|
af spawn --protocol maintain
|
|
31
29
|
↓
|
|
32
|
-
|
|
33
|
-
↓
|
|
30
|
+
1. AUDIT: Scan for dead code, unused deps, stale docs
|
|
31
|
+
↓ (3-way review)
|
|
32
|
+
2. CLEAN: Remove identified cruft
|
|
33
|
+
↓ (3-way review + build/test checks)
|
|
34
|
+
3. SYNC: Update documentation
|
|
35
|
+
↓ (3-way review)
|
|
36
|
+
4. VERIFY: Final validation + PR
|
|
37
|
+
↓ (3-way review)
|
|
34
38
|
PR with maintenance changes
|
|
35
39
|
↓
|
|
36
|
-
Architect reviews →
|
|
40
|
+
Architect reviews → Merge
|
|
37
41
|
```
|
|
38
42
|
|
|
43
|
+
Each phase goes through build-verify cycles with 3-way consultation before proceeding.
|
|
44
|
+
|
|
39
45
|
## Prerequisites
|
|
40
46
|
|
|
41
47
|
Before starting MAINTAIN:
|
|
@@ -473,7 +479,7 @@ MAINTAIN is an **operational protocol**, not a feature development protocol:
|
|
|
473
479
|
| Review | No |
|
|
474
480
|
| 3-Way Consultation | **Yes** (before creating PR) |
|
|
475
481
|
|
|
476
|
-
**Exception**: If MAINTAIN reveals need for architectural changes, those should follow
|
|
482
|
+
**Exception**: If MAINTAIN reveals need for architectural changes, those should follow SPIR.
|
|
477
483
|
|
|
478
484
|
---
|
|
479
485
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"properties": {
|
|
9
9
|
"name": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"description": "Protocol identifier (e.g., '
|
|
11
|
+
"description": "Protocol identifier (e.g., 'spir', 'tick', 'bugfix')"
|
|
12
12
|
},
|
|
13
13
|
"version": {
|
|
14
14
|
"type": "string",
|
|
@@ -27,6 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"minItems": 1
|
|
29
29
|
},
|
|
30
|
+
"input": {
|
|
31
|
+
"$ref": "#/definitions/protocolInput"
|
|
32
|
+
},
|
|
33
|
+
"hooks": {
|
|
34
|
+
"$ref": "#/definitions/protocolHooks"
|
|
35
|
+
},
|
|
30
36
|
"signals": {
|
|
31
37
|
"type": "object",
|
|
32
38
|
"description": "Signal definitions for state transitions",
|
|
@@ -38,6 +44,11 @@
|
|
|
38
44
|
"type": "object",
|
|
39
45
|
"description": "Default configuration for the protocol",
|
|
40
46
|
"properties": {
|
|
47
|
+
"mode": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"enum": ["strict", "soft"],
|
|
50
|
+
"description": "Default orchestration mode for the protocol"
|
|
51
|
+
},
|
|
41
52
|
"consultation": {
|
|
42
53
|
"$ref": "#/definitions/consultationDefaults"
|
|
43
54
|
},
|
|
@@ -232,6 +243,48 @@
|
|
|
232
243
|
"type": "string"
|
|
233
244
|
}
|
|
234
245
|
}
|
|
246
|
+
},
|
|
247
|
+
"protocolInput": {
|
|
248
|
+
"type": "object",
|
|
249
|
+
"description": "Protocol input configuration - defines what input types a protocol accepts",
|
|
250
|
+
"properties": {
|
|
251
|
+
"type": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"enum": ["spec", "github-issue", "task", "protocol", "shell", "worktree"],
|
|
254
|
+
"description": "Primary input type for this protocol"
|
|
255
|
+
},
|
|
256
|
+
"required": {
|
|
257
|
+
"type": "boolean",
|
|
258
|
+
"description": "Whether an input of this type is required"
|
|
259
|
+
},
|
|
260
|
+
"default_for": {
|
|
261
|
+
"type": "array",
|
|
262
|
+
"items": {
|
|
263
|
+
"type": "string"
|
|
264
|
+
},
|
|
265
|
+
"description": "CLI flags this protocol is the default for (e.g., ['--issue', '-i'])"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"protocolHooks": {
|
|
270
|
+
"type": "object",
|
|
271
|
+
"description": "Hooks triggered at various points in the spawn lifecycle",
|
|
272
|
+
"properties": {
|
|
273
|
+
"pre-spawn": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"description": "Hooks executed before spawning the builder",
|
|
276
|
+
"properties": {
|
|
277
|
+
"collision-check": {
|
|
278
|
+
"type": "boolean",
|
|
279
|
+
"description": "Check for worktree/PR collisions before spawning"
|
|
280
|
+
},
|
|
281
|
+
"comment-on-issue": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"description": "Comment to post on GitHub issue when spawning"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
235
288
|
}
|
|
236
289
|
}
|
|
237
290
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# {{protocol_name}} Builder ({{mode}} mode)
|
|
2
|
+
|
|
3
|
+
You are implementing {{input_description}}.
|
|
4
|
+
|
|
5
|
+
{{#if mode_soft}}
|
|
6
|
+
## Mode: SOFT
|
|
7
|
+
You are running in SOFT mode. This means:
|
|
8
|
+
- You follow the protocol document yourself (no porch orchestration)
|
|
9
|
+
- The architect monitors your work and verifies you're adhering to the protocol
|
|
10
|
+
- Run consultations manually when the protocol calls for them
|
|
11
|
+
- You have flexibility in execution, but must stay compliant with the protocol
|
|
12
|
+
{{/if}}
|
|
13
|
+
|
|
14
|
+
{{#if mode_strict}}
|
|
15
|
+
## Mode: STRICT
|
|
16
|
+
You are running in STRICT mode. This means:
|
|
17
|
+
- Porch orchestrates your work
|
|
18
|
+
- Run: `porch run {{project_id}}`
|
|
19
|
+
- Follow porch signals and gate approvals
|
|
20
|
+
- Do not deviate from the porch-driven workflow
|
|
21
|
+
|
|
22
|
+
### ABSOLUTE RESTRICTIONS (STRICT MODE)
|
|
23
|
+
- **NEVER edit `status.yaml` directly** — only porch commands may modify project state
|
|
24
|
+
- **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
|
|
25
|
+
- **NEVER skip the 3-way review** — always follow porch next → porch done cycle
|
|
26
|
+
- **NEVER advance plan phases manually** — porch handles phase transitions after unanimous review approval
|
|
27
|
+
{{/if}}
|
|
28
|
+
|
|
29
|
+
## Protocol
|
|
30
|
+
Follow the SPIR protocol: `codev/protocols/spir/protocol.md`
|
|
31
|
+
Read and internalize the protocol before starting any work.
|
|
32
|
+
|
|
33
|
+
{{#if spec}}
|
|
34
|
+
## Spec
|
|
35
|
+
Read the specification at: `{{spec.path}}`
|
|
36
|
+
{{/if}}
|
|
37
|
+
|
|
38
|
+
{{#if plan}}
|
|
39
|
+
## Plan
|
|
40
|
+
Follow the implementation plan at: `{{plan.path}}`
|
|
41
|
+
{{/if}}
|
|
42
|
+
|
|
43
|
+
{{#if issue}}
|
|
44
|
+
## Issue #{{issue.number}}
|
|
45
|
+
**Title**: {{issue.title}}
|
|
46
|
+
|
|
47
|
+
**Description**:
|
|
48
|
+
{{issue.body}}
|
|
49
|
+
{{/if}}
|
|
50
|
+
|
|
51
|
+
{{#if task}}
|
|
52
|
+
## Task
|
|
53
|
+
{{task_text}}
|
|
54
|
+
{{/if}}
|
|
55
|
+
|
|
56
|
+
## Getting Started
|
|
57
|
+
1. Read the protocol document thoroughly
|
|
58
|
+
2. Review the spec and plan (if available)
|
|
59
|
+
3. Begin implementation following the protocol phases
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# IMPLEMENT Phase Prompt
|
|
2
|
+
|
|
3
|
+
You are executing the **IMPLEMENT** phase of the SPIR protocol.
|
|
4
|
+
|
|
5
|
+
## Your Goal
|
|
6
|
+
|
|
7
|
+
Write clean, well-structured code AND tests that implement the current plan phase.
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
- **Project ID**: {{project_id}}
|
|
12
|
+
- **Project Title**: {{title}}
|
|
13
|
+
- **Current State**: {{current_state}}
|
|
14
|
+
- **Plan Phase**: {{plan_phase_id}} - {{plan_phase_title}}
|
|
15
|
+
|
|
16
|
+
## ⚠️ SCOPE RESTRICTION — READ THIS FIRST
|
|
17
|
+
|
|
18
|
+
**You are implementing ONLY the current plan phase: {{plan_phase_id}} ({{plan_phase_title}}).**
|
|
19
|
+
|
|
20
|
+
- **DO NOT** implement other phases. Other phases will be handled in subsequent porch iterations.
|
|
21
|
+
- **DO NOT** read the full plan file and implement everything you see.
|
|
22
|
+
- The plan phase details are included below under "Current Plan Phase Details". That is your ONLY scope.
|
|
23
|
+
- If you need to reference the spec for requirements, read `codev/specs/{{project_id}}-*.md` but ONLY implement what the current phase requires.
|
|
24
|
+
|
|
25
|
+
## What Happens After You Finish
|
|
26
|
+
|
|
27
|
+
When you signal `PHASE_COMPLETE`, porch will:
|
|
28
|
+
1. Run 3-way consultation (Gemini, Codex, Claude) on your implementation
|
|
29
|
+
2. Check that tests exist and pass
|
|
30
|
+
3. If reviewers request changes, you'll be respawned with their feedback
|
|
31
|
+
4. Once approved, porch commits and moves to the next plan phase
|
|
32
|
+
|
|
33
|
+
## Spec Compliance (CRITICAL)
|
|
34
|
+
|
|
35
|
+
**The spec is the source of truth. Code that doesn't match the spec is wrong, even if it "works".**
|
|
36
|
+
|
|
37
|
+
### Trust Hierarchy
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
SPEC (source of truth)
|
|
41
|
+
↓
|
|
42
|
+
PLAN (implementation guide derived from spec)
|
|
43
|
+
↓
|
|
44
|
+
EXISTING CODE (NOT TRUSTED - must be validated against spec)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Never trust existing code over the spec.** Previous implementations may have drifted.
|
|
48
|
+
|
|
49
|
+
### Pre-Implementation Sanity Check (PISC)
|
|
50
|
+
|
|
51
|
+
**Before writing ANY code:**
|
|
52
|
+
|
|
53
|
+
1. ✅ "Have I read the spec in the last 30 minutes?"
|
|
54
|
+
2. ✅ "If the spec has a 'Traps to Avoid' section, have I read it?"
|
|
55
|
+
3. ✅ "Does my approach match the spec's Technical Implementation section?"
|
|
56
|
+
4. ✅ "If the spec has code examples, am I following them?"
|
|
57
|
+
5. ✅ "Does the existing code I'm building on actually match the spec?"
|
|
58
|
+
|
|
59
|
+
**If ANY answer is "no" or "unsure" → STOP and re-read the spec.**
|
|
60
|
+
|
|
61
|
+
### Avoiding "Fixing Mode"
|
|
62
|
+
|
|
63
|
+
A dangerous pattern: You start looking at symptoms in code, making incremental fixes, copying existing patterns - without going back to the spec. This leads to:
|
|
64
|
+
- Cargo-culting patterns that may be wrong
|
|
65
|
+
- Building on broken foundations
|
|
66
|
+
- Implementing something different from the spec
|
|
67
|
+
|
|
68
|
+
**When you catch yourself "fixing" code:**
|
|
69
|
+
1. STOP
|
|
70
|
+
2. Ask: "What does the spec say about this?"
|
|
71
|
+
3. Re-read the spec's Traps to Avoid section
|
|
72
|
+
4. Verify existing code matches the spec before building on it
|
|
73
|
+
|
|
74
|
+
## Prerequisites
|
|
75
|
+
|
|
76
|
+
Before implementing, verify:
|
|
77
|
+
1. Previous phase (if any) is committed to git
|
|
78
|
+
2. You've read the plan phase you're implementing
|
|
79
|
+
3. You understand the success criteria for this phase
|
|
80
|
+
4. Dependencies from earlier phases are available
|
|
81
|
+
|
|
82
|
+
## Process
|
|
83
|
+
|
|
84
|
+
### 1. Review the Plan Phase
|
|
85
|
+
|
|
86
|
+
Read the current phase in the plan:
|
|
87
|
+
- What is the objective?
|
|
88
|
+
- What files need to be created/modified?
|
|
89
|
+
- What are the success criteria?
|
|
90
|
+
- What dependencies exist?
|
|
91
|
+
|
|
92
|
+
### 2. Set Up
|
|
93
|
+
|
|
94
|
+
- Verify you're on the correct branch
|
|
95
|
+
- Check that previous phase is committed: `git log --oneline -5`
|
|
96
|
+
- Ensure build passes before starting: `npm run build` (or equivalent)
|
|
97
|
+
|
|
98
|
+
### 3. Implement the Code
|
|
99
|
+
|
|
100
|
+
Write the code following these principles:
|
|
101
|
+
|
|
102
|
+
**Code Quality Standards**:
|
|
103
|
+
- Self-documenting code (clear names, obvious structure)
|
|
104
|
+
- No commented-out code
|
|
105
|
+
- No debug prints in final code
|
|
106
|
+
- Explicit error handling
|
|
107
|
+
- Follow project style guide
|
|
108
|
+
|
|
109
|
+
**Implementation Approach**:
|
|
110
|
+
- Work on one file at a time
|
|
111
|
+
- Make small, incremental changes
|
|
112
|
+
- Document complex logic with comments
|
|
113
|
+
|
|
114
|
+
### 4. Write Tests
|
|
115
|
+
|
|
116
|
+
**Tests are required.** For each piece of functionality you implement:
|
|
117
|
+
|
|
118
|
+
- Write unit tests for core logic
|
|
119
|
+
- Write integration tests if the phase involves multiple components
|
|
120
|
+
- Test error cases and edge conditions
|
|
121
|
+
- Ensure tests are deterministic (no flaky tests)
|
|
122
|
+
|
|
123
|
+
**Test file locations** (follow project conventions):
|
|
124
|
+
- `tests/` or `__tests__/` directories
|
|
125
|
+
- `*.test.ts` or `*.spec.ts` naming
|
|
126
|
+
|
|
127
|
+
### 5. Verify Everything Works
|
|
128
|
+
|
|
129
|
+
Run both build and tests:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npm run build # Must pass
|
|
133
|
+
npm test # Must pass
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Important**: Don't assume these commands exist. Check `package.json` first.
|
|
137
|
+
|
|
138
|
+
Fix any errors before signaling completion.
|
|
139
|
+
|
|
140
|
+
### 6. Self-Review
|
|
141
|
+
|
|
142
|
+
Before signaling completion:
|
|
143
|
+
- Read through all code changes
|
|
144
|
+
- Read through all test changes
|
|
145
|
+
- Verify code matches the spec requirements
|
|
146
|
+
- Ensure no accidental debug code
|
|
147
|
+
- Check test coverage is adequate
|
|
148
|
+
|
|
149
|
+
## Output
|
|
150
|
+
|
|
151
|
+
When complete, you should have:
|
|
152
|
+
- Modified/created source files as specified in the plan phase
|
|
153
|
+
- Tests covering the new functionality
|
|
154
|
+
- All build checks passing
|
|
155
|
+
- All tests passing
|
|
156
|
+
|
|
157
|
+
## Signals
|
|
158
|
+
|
|
159
|
+
When implementation AND tests are complete and passing:
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
<signal>PHASE_COMPLETE</signal>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
If you encounter a blocker:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
<signal>BLOCKED:reason goes here</signal>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
If you need spec/plan clarification:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
<signal type=AWAITING_INPUT>
|
|
175
|
+
Your specific questions here
|
|
176
|
+
</signal>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Important Notes
|
|
180
|
+
|
|
181
|
+
1. **Follow the plan** - Implement what's specified, not more
|
|
182
|
+
2. **Don't over-engineer** - Simplest solution that works
|
|
183
|
+
3. **Don't skip error handling** - But don't go overboard either
|
|
184
|
+
4. **Keep changes focused** - Only touch files in this phase
|
|
185
|
+
5. **Build AND tests must pass** - Don't signal complete until both pass
|
|
186
|
+
6. **Write tests** - Every implementation phase needs tests
|
|
187
|
+
|
|
188
|
+
## What NOT to Do
|
|
189
|
+
|
|
190
|
+
- Don't modify files outside this phase's scope
|
|
191
|
+
- Don't add features not in the spec
|
|
192
|
+
- Don't leave TODO comments for later (fix now or note as blocker)
|
|
193
|
+
- Don't skip writing tests
|
|
194
|
+
- Don't use `git add .` or `git add -A` when you commit (security risk)
|
|
195
|
+
|
|
196
|
+
## Handling Problems
|
|
197
|
+
|
|
198
|
+
**If the plan is unclear**:
|
|
199
|
+
Signal `AWAITING_INPUT` with your specific question.
|
|
200
|
+
|
|
201
|
+
**If you discover the spec is wrong**:
|
|
202
|
+
Signal `BLOCKED` and explain the issue. The Architect may need to update the spec.
|
|
203
|
+
|
|
204
|
+
**If a dependency is missing**:
|
|
205
|
+
Signal `BLOCKED` with details about what's missing.
|
|
206
|
+
|
|
207
|
+
**If build or tests fail and you can't fix it**:
|
|
208
|
+
Signal `BLOCKED` with the error message.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PLAN Phase Prompt
|
|
2
2
|
|
|
3
|
-
You are executing the **PLAN** phase of the
|
|
3
|
+
You are executing the **PLAN** phase of the SPIR protocol.
|
|
4
4
|
|
|
5
5
|
## Your Goal
|
|
6
6
|
|
|
@@ -14,10 +14,6 @@ Transform the approved specification into an executable implementation plan with
|
|
|
14
14
|
- **Spec File**: `codev/specs/{{project_id}}-{{title}}.md`
|
|
15
15
|
- **Plan File**: `codev/plans/{{project_id}}-{{title}}.md`
|
|
16
16
|
|
|
17
|
-
## CRITICAL: Multi-Agent Consultation is MANDATORY
|
|
18
|
-
|
|
19
|
-
The SPIDER protocol **requires** consultation with GPT-5 Codex AND Gemini Pro at specific checkpoints. This is BLOCKING - you cannot proceed without completing consultations.
|
|
20
|
-
|
|
21
17
|
## Prerequisites
|
|
22
18
|
|
|
23
19
|
Before planning, verify:
|
|
@@ -72,51 +68,15 @@ Phase 3: API Endpoints (depends on Phase 2)
|
|
|
72
68
|
Phase 4: Frontend Integration (depends on Phase 3)
|
|
73
69
|
```
|
|
74
70
|
|
|
75
|
-
### 5.
|
|
76
|
-
|
|
77
|
-
After completing the initial plan draft:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
# Run consultations in parallel (REQUIRED)
|
|
81
|
-
consult --model gemini plan {{project_id}} &
|
|
82
|
-
consult --model codex plan {{project_id}} &
|
|
83
|
-
wait
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
- Review ALL feedback from both models
|
|
87
|
-
- Update the plan with incorporated feedback
|
|
88
|
-
- Add a **Consultation Log** section documenting:
|
|
89
|
-
- Key feedback received
|
|
90
|
-
- Changes made in response
|
|
91
|
-
- Any feedback intentionally not incorporated (with reasoning)
|
|
92
|
-
|
|
93
|
-
### 6. Human Review
|
|
94
|
-
|
|
95
|
-
After consultation feedback is incorporated:
|
|
96
|
-
- Present the plan for human review
|
|
97
|
-
- Wait for approval or change requests
|
|
98
|
-
- If changes requested, make them and proceed to Step 7
|
|
99
|
-
|
|
100
|
-
### 7. MANDATORY: Second Consultation (After Human Feedback)
|
|
101
|
-
|
|
102
|
-
After incorporating human feedback:
|
|
71
|
+
### 5. Finalize
|
|
103
72
|
|
|
104
|
-
|
|
105
|
-
# Run consultations again (REQUIRED)
|
|
106
|
-
consult --model gemini plan {{project_id}} &
|
|
107
|
-
consult --model codex plan {{project_id}} &
|
|
108
|
-
wait
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
- Update Consultation Log with new feedback
|
|
112
|
-
- Incorporate changes
|
|
113
|
-
- Prepare final plan for approval
|
|
73
|
+
After completing the plan draft, signal completion. Porch will run 3-way consultation (Gemini, Codex, Claude) automatically via the verify step. If reviewers request changes, you'll be respawned with their feedback.
|
|
114
74
|
|
|
115
75
|
## Output
|
|
116
76
|
|
|
117
77
|
Create the plan file at `codev/plans/{{project_id}}-{{title}}.md`.
|
|
118
78
|
|
|
119
|
-
Use the plan template from `codev/protocols/
|
|
79
|
+
Use the plan template from `codev/protocols/spir/templates/plan.md` if available.
|
|
120
80
|
|
|
121
81
|
### Plan Structure
|
|
122
82
|
|
|
@@ -148,18 +108,6 @@ Brief summary of what will be implemented.
|
|
|
148
108
|
- [Risk 1]: [Mitigation]
|
|
149
109
|
- [Risk 2]: [Mitigation]
|
|
150
110
|
|
|
151
|
-
## Consultation Log
|
|
152
|
-
|
|
153
|
-
### First Consultation (After Draft)
|
|
154
|
-
- **Gemini Feedback**: [Summary]
|
|
155
|
-
- **Codex Feedback**: [Summary]
|
|
156
|
-
- **Changes Made**: [List]
|
|
157
|
-
- **Not Incorporated**: [List with reasons]
|
|
158
|
-
|
|
159
|
-
### Second Consultation (After Human Feedback)
|
|
160
|
-
- **Gemini Feedback**: [Summary]
|
|
161
|
-
- **Codex Feedback**: [Summary]
|
|
162
|
-
- **Changes Made**: [List]
|
|
163
111
|
```
|
|
164
112
|
|
|
165
113
|
## Signals
|
|
@@ -171,16 +119,6 @@ Emit appropriate signals based on your progress:
|
|
|
171
119
|
<signal>PLAN_DRAFTED</signal>
|
|
172
120
|
```
|
|
173
121
|
|
|
174
|
-
- After incorporating consultation feedback:
|
|
175
|
-
```
|
|
176
|
-
<signal>CONSULTATION_INCORPORATED</signal>
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
- After final plan is ready for human approval:
|
|
180
|
-
```
|
|
181
|
-
<signal>PLAN_READY_FOR_APPROVAL</signal>
|
|
182
|
-
```
|
|
183
|
-
|
|
184
122
|
## Commit Cadence
|
|
185
123
|
|
|
186
124
|
Make commits at these milestones:
|
|
@@ -196,16 +134,14 @@ git add codev/plans/{{project_id}}-{{title}}.md
|
|
|
196
134
|
|
|
197
135
|
## Important Notes
|
|
198
136
|
|
|
199
|
-
1. **
|
|
200
|
-
2. **No time estimates** - Don't include hours/days/weeks
|
|
137
|
+
1. **No time estimates** - Don't include hours/days/weeks
|
|
201
138
|
3. **Be specific about files** - Exact paths, not "the config file"
|
|
202
139
|
4. **Keep phases small** - 1-3 files per phase is ideal
|
|
203
140
|
5. **Document dependencies clearly** - Prevents blocked work
|
|
204
|
-
6. **Document consultations** - Maintain the Consultation Log section
|
|
205
141
|
|
|
206
142
|
## What NOT to Do
|
|
207
143
|
|
|
208
|
-
- Don't
|
|
144
|
+
- Don't run `consult` commands yourself (porch handles consultations)
|
|
209
145
|
- Don't write code (that's for Implement phase)
|
|
210
146
|
- Don't estimate time (meaningless in AI development)
|
|
211
147
|
- Don't create phases that can't be independently tested
|