@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,282 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://codev.dev/protocol-schema.json",
|
|
4
|
+
"title": "Codev Protocol Definition",
|
|
5
|
+
"description": "Schema for porch protocol definitions (SPIR, TICK, BUGFIX, etc.)",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "phases"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "JSON Schema reference"
|
|
12
|
+
},
|
|
13
|
+
"name": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Protocol name (e.g., 'spir', 'tick', 'bugfix')",
|
|
16
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
17
|
+
},
|
|
18
|
+
"alias": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Alternative name for the protocol (e.g., 'spider' for spir)"
|
|
21
|
+
},
|
|
22
|
+
"version": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Semantic version of the protocol",
|
|
25
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(-[a-z0-9.]+)?$"
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Human-readable description of the protocol"
|
|
30
|
+
},
|
|
31
|
+
"phases": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"description": "Ordered list of protocol phases",
|
|
34
|
+
"minItems": 1,
|
|
35
|
+
"items": { "$ref": "#/$defs/phase" }
|
|
36
|
+
},
|
|
37
|
+
"signals": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"description": "Signals that can be emitted during protocol execution",
|
|
40
|
+
"additionalProperties": { "$ref": "#/$defs/signal" }
|
|
41
|
+
},
|
|
42
|
+
"phase_completion": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"description": "Checks run when a plan phase completes",
|
|
45
|
+
"additionalProperties": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "Shell command to run"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"defaults": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"description": "Default values for phase properties",
|
|
53
|
+
"properties": {
|
|
54
|
+
"max_iterations": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": 1,
|
|
57
|
+
"maximum": 20,
|
|
58
|
+
"default": 7
|
|
59
|
+
},
|
|
60
|
+
"verify": { "$ref": "#/$defs/verifyConfig" }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"$defs": {
|
|
65
|
+
"phase": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": ["id", "name"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"id": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "Unique phase identifier",
|
|
72
|
+
"pattern": "^[a-z][a-z0-9_-]*$"
|
|
73
|
+
},
|
|
74
|
+
"name": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "Human-readable phase name"
|
|
77
|
+
},
|
|
78
|
+
"description": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "What this phase does"
|
|
81
|
+
},
|
|
82
|
+
"type": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"enum": ["once", "build_verify", "per_plan_phase"],
|
|
85
|
+
"description": "Phase execution type",
|
|
86
|
+
"default": "build_verify"
|
|
87
|
+
},
|
|
88
|
+
"build": { "$ref": "#/$defs/buildConfig" },
|
|
89
|
+
"verify": { "$ref": "#/$defs/verifyConfig" },
|
|
90
|
+
"max_iterations": {
|
|
91
|
+
"type": "integer",
|
|
92
|
+
"description": "Maximum build-verify iterations before failing",
|
|
93
|
+
"minimum": 1,
|
|
94
|
+
"maximum": 20,
|
|
95
|
+
"default": 7
|
|
96
|
+
},
|
|
97
|
+
"on_complete": { "$ref": "#/$defs/onCompleteConfig" },
|
|
98
|
+
"checks": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"description": "Named checks to run during this phase",
|
|
101
|
+
"additionalProperties": { "$ref": "#/$defs/check" }
|
|
102
|
+
},
|
|
103
|
+
"gate": {
|
|
104
|
+
"oneOf": [
|
|
105
|
+
{
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "Gate name (simple format)",
|
|
108
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"$ref": "#/$defs/gateConfig",
|
|
112
|
+
"description": "Gate with options (extended format)"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"transition": { "$ref": "#/$defs/transitionConfig" },
|
|
117
|
+
"next": {
|
|
118
|
+
"oneOf": [
|
|
119
|
+
{ "type": "string", "description": "Next phase id" },
|
|
120
|
+
{ "type": "null", "description": "Terminal phase" }
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"buildConfig": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"description": "Configuration for the build step",
|
|
128
|
+
"required": ["prompt", "artifact"],
|
|
129
|
+
"properties": {
|
|
130
|
+
"prompt": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"description": "Prompt file name (e.g., 'specify.md')"
|
|
133
|
+
},
|
|
134
|
+
"artifact": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"description": "Artifact path pattern with ${PROJECT_ID} variable"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"verifyConfig": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"description": "Configuration for 3-way verification",
|
|
143
|
+
"required": ["type", "models"],
|
|
144
|
+
"properties": {
|
|
145
|
+
"type": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"description": "Review type (maps to consult --type)",
|
|
148
|
+
"enum": ["spec-review", "plan-review", "impl-review", "pr-ready", "integration-review"]
|
|
149
|
+
},
|
|
150
|
+
"models": {
|
|
151
|
+
"type": "array",
|
|
152
|
+
"description": "Models to consult",
|
|
153
|
+
"items": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"enum": ["gemini", "codex", "claude"]
|
|
156
|
+
},
|
|
157
|
+
"minItems": 1
|
|
158
|
+
},
|
|
159
|
+
"parallel": {
|
|
160
|
+
"type": "boolean",
|
|
161
|
+
"description": "Run consultations in parallel",
|
|
162
|
+
"default": true
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"onCompleteConfig": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"description": "Actions to perform after successful verification",
|
|
169
|
+
"properties": {
|
|
170
|
+
"commit": {
|
|
171
|
+
"type": "boolean",
|
|
172
|
+
"description": "Commit artifact to git",
|
|
173
|
+
"default": false
|
|
174
|
+
},
|
|
175
|
+
"push": {
|
|
176
|
+
"type": "boolean",
|
|
177
|
+
"description": "Push commit to remote",
|
|
178
|
+
"default": false
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"check": {
|
|
183
|
+
"oneOf": [
|
|
184
|
+
{
|
|
185
|
+
"type": "string",
|
|
186
|
+
"description": "Simple shell command"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "object",
|
|
190
|
+
"description": "Check with options",
|
|
191
|
+
"required": ["command"],
|
|
192
|
+
"properties": {
|
|
193
|
+
"command": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"description": "Shell command to run"
|
|
196
|
+
},
|
|
197
|
+
"description": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "Human-readable description"
|
|
200
|
+
},
|
|
201
|
+
"on_fail": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"enum": ["fail", "retry", "warn"],
|
|
204
|
+
"description": "Action on failure",
|
|
205
|
+
"default": "fail"
|
|
206
|
+
},
|
|
207
|
+
"max_retries": {
|
|
208
|
+
"type": "integer",
|
|
209
|
+
"description": "Maximum retry attempts",
|
|
210
|
+
"minimum": 0,
|
|
211
|
+
"maximum": 10,
|
|
212
|
+
"default": 0
|
|
213
|
+
},
|
|
214
|
+
"optional": {
|
|
215
|
+
"type": "boolean",
|
|
216
|
+
"description": "Don't fail protocol if check fails",
|
|
217
|
+
"default": false
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
"transitionConfig": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"description": "Transition rules for per_plan_phase types",
|
|
226
|
+
"properties": {
|
|
227
|
+
"on_complete": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "Phase to transition to after each plan phase"
|
|
230
|
+
},
|
|
231
|
+
"on_all_phases_complete": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"description": "Phase to transition to when all plan phases complete"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"signal": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"description": "Signal definition",
|
|
240
|
+
"properties": {
|
|
241
|
+
"description": {
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
"transitions_to": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "State to transition to when signal received"
|
|
247
|
+
},
|
|
248
|
+
"requires": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"description": "Required parameter name"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"gateConfig": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"description": "Gate with extended configuration",
|
|
257
|
+
"required": ["name"],
|
|
258
|
+
"properties": {
|
|
259
|
+
"name": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"description": "Gate identifier",
|
|
262
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
263
|
+
},
|
|
264
|
+
"description": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"description": "Human-readable description"
|
|
267
|
+
},
|
|
268
|
+
"requires": {
|
|
269
|
+
"type": "array",
|
|
270
|
+
"description": "Check names that must pass before gate can be approved",
|
|
271
|
+
"items": { "type": "string" }
|
|
272
|
+
},
|
|
273
|
+
"next": {
|
|
274
|
+
"oneOf": [
|
|
275
|
+
{ "type": "string", "description": "Next phase after gate approval" },
|
|
276
|
+
{ "type": "null", "description": "Terminal gate" }
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 BUGFIX protocol 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
|
+
|
|
21
|
+
### ABSOLUTE RESTRICTIONS (STRICT MODE)
|
|
22
|
+
- **NEVER edit `status.yaml` directly** — only porch commands may modify project state
|
|
23
|
+
- **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
|
|
24
|
+
- **NEVER skip the 3-way review** — always follow porch next → porch done cycle
|
|
25
|
+
{{/if}}
|
|
26
|
+
|
|
27
|
+
## Protocol
|
|
28
|
+
Follow the BUGFIX protocol: `codev/protocols/bugfix/protocol.md`
|
|
29
|
+
|
|
30
|
+
{{#if issue}}
|
|
31
|
+
## Issue #{{issue.number}}
|
|
32
|
+
**Title**: {{issue.title}}
|
|
33
|
+
|
|
34
|
+
**Description**:
|
|
35
|
+
{{issue.body}}
|
|
36
|
+
|
|
37
|
+
## Your Mission
|
|
38
|
+
1. Reproduce the bug
|
|
39
|
+
2. Identify root cause
|
|
40
|
+
3. Implement fix (< 300 LOC)
|
|
41
|
+
4. Add regression test
|
|
42
|
+
5. Run CMAP review (3-way parallel: Gemini, Codex, Claude)
|
|
43
|
+
6. Create PR with "Fixes #{{issue.number}}" in body
|
|
44
|
+
|
|
45
|
+
If the fix is too complex (> 300 LOC or architectural changes), notify the Architect via:
|
|
46
|
+
```bash
|
|
47
|
+
af send architect "Issue #{{issue.number}} is more complex than expected. [Reason]. Recommend escalating to SPIR/TICK."
|
|
48
|
+
```
|
|
49
|
+
{{/if}}
|
|
50
|
+
|
|
51
|
+
## Getting Started
|
|
52
|
+
1. Read the BUGFIX protocol
|
|
53
|
+
2. Review the issue details
|
|
54
|
+
3. Reproduce the bug before fixing
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# FIX Phase Prompt
|
|
2
|
+
|
|
3
|
+
You are executing the **FIX** phase of the BUGFIX protocol.
|
|
4
|
+
|
|
5
|
+
## Your Goal
|
|
6
|
+
|
|
7
|
+
Implement the bug fix and add a regression test. Keep it minimal and focused.
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
- **Issue**: #{{issue.number}} — {{issue.title}}
|
|
12
|
+
- **Current State**: {{current_state}}
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
### 1. Implement the Fix
|
|
17
|
+
|
|
18
|
+
Apply the minimum change needed to resolve the bug:
|
|
19
|
+
- Fix the root cause identified in the INVESTIGATE phase
|
|
20
|
+
- Do NOT refactor surrounding code
|
|
21
|
+
- Do NOT add features beyond what's needed
|
|
22
|
+
- Do NOT fix other bugs you happen to notice (file separate issues)
|
|
23
|
+
|
|
24
|
+
**Code Quality**:
|
|
25
|
+
- Self-documenting code (clear names, obvious structure)
|
|
26
|
+
- No commented-out code or debug prints
|
|
27
|
+
- Follow existing project conventions
|
|
28
|
+
|
|
29
|
+
### 2. Add a Regression Test
|
|
30
|
+
|
|
31
|
+
**A regression test is MANDATORY.** Every bugfix MUST include a test unless you provide explicit justification for why a test is impossible (e.g., pure CSS-only change with no testable behavior). If you skip the test, you MUST explain why in your commit message and PR description.
|
|
32
|
+
|
|
33
|
+
Write a test that:
|
|
34
|
+
- Fails without the fix (demonstrates the bug)
|
|
35
|
+
- Passes with the fix (demonstrates the fix works)
|
|
36
|
+
- Covers the specific scenario from the issue
|
|
37
|
+
- Is deterministic (not flaky)
|
|
38
|
+
|
|
39
|
+
Place tests following project conventions (`__tests__/`, `*.test.ts`, etc.).
|
|
40
|
+
|
|
41
|
+
### 3. Verify the Fix
|
|
42
|
+
|
|
43
|
+
Run build and tests:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm run build # Must pass
|
|
47
|
+
npm test # Must pass
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Fix any failures before proceeding. If build/test commands don't exist, check `package.json`.
|
|
51
|
+
|
|
52
|
+
### 4. Commit
|
|
53
|
+
|
|
54
|
+
Stage and commit your changes:
|
|
55
|
+
- Use explicit file paths (never `git add -A` or `git add .`)
|
|
56
|
+
- Commit message: `Fix #{{issue.number}}: <brief description>`
|
|
57
|
+
|
|
58
|
+
## Signals
|
|
59
|
+
|
|
60
|
+
When fix and tests are complete and passing:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
<signal>PHASE_COMPLETE</signal>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
If you encounter a blocker:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
<signal>BLOCKED:reason goes here</signal>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Important Notes
|
|
73
|
+
|
|
74
|
+
1. **Minimal changes only** — Fix the bug, nothing else
|
|
75
|
+
2. **Regression test is MANDATORY** — No fix without a test. If truly untestable, justify in writing.
|
|
76
|
+
3. **Build AND tests must pass** — Don't signal complete until both pass
|
|
77
|
+
4. **Stay under 300 LOC** — If the fix grows beyond this, signal `TOO_COMPLEX`
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# INVESTIGATE Phase Prompt
|
|
2
|
+
|
|
3
|
+
You are executing the **INVESTIGATE** phase of the BUGFIX protocol.
|
|
4
|
+
|
|
5
|
+
## Your Goal
|
|
6
|
+
|
|
7
|
+
Understand the bug, reproduce it, identify the root cause, and assess whether it's fixable within BUGFIX scope (< 300 LOC).
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
- **Issue**: #{{issue.number}} — {{issue.title}}
|
|
12
|
+
- **Current State**: {{current_state}}
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
### 1. Read the Issue
|
|
17
|
+
|
|
18
|
+
Read the full issue description. Identify:
|
|
19
|
+
- What is the expected behavior?
|
|
20
|
+
- What is the actual behavior?
|
|
21
|
+
- Are there reproduction steps?
|
|
22
|
+
- Are there error messages or screenshots?
|
|
23
|
+
|
|
24
|
+
### 2. Reproduce the Bug
|
|
25
|
+
|
|
26
|
+
Before fixing anything, confirm the bug exists:
|
|
27
|
+
- Follow the reproduction steps from the issue
|
|
28
|
+
- If no steps are given, infer them from the description
|
|
29
|
+
- Document the exact reproduction steps you used
|
|
30
|
+
- If you **cannot** reproduce, signal `BLOCKED` with details
|
|
31
|
+
|
|
32
|
+
### 3. Identify Root Cause
|
|
33
|
+
|
|
34
|
+
Trace the bug to its source:
|
|
35
|
+
- Read the relevant code paths
|
|
36
|
+
- Use grep/search to find related code
|
|
37
|
+
- Identify the exact file(s) and line(s) causing the issue
|
|
38
|
+
- Understand **why** the bug occurs, not just **where**
|
|
39
|
+
|
|
40
|
+
### 4. Assess Complexity
|
|
41
|
+
|
|
42
|
+
Determine if this is BUGFIX-appropriate:
|
|
43
|
+
- **< 300 LOC change**: Proceed with BUGFIX
|
|
44
|
+
- **> 300 LOC or architectural**: Signal `TOO_COMPLEX` to escalate
|
|
45
|
+
|
|
46
|
+
Consider:
|
|
47
|
+
- How many files need to change?
|
|
48
|
+
- Does it require new abstractions or refactoring?
|
|
49
|
+
- Are there cascading effects?
|
|
50
|
+
|
|
51
|
+
## Output
|
|
52
|
+
|
|
53
|
+
By the end of this phase, you should know:
|
|
54
|
+
1. The exact root cause
|
|
55
|
+
2. Which files need to change
|
|
56
|
+
3. The approximate size of the fix
|
|
57
|
+
4. Whether it's BUGFIX-appropriate
|
|
58
|
+
|
|
59
|
+
## Signals
|
|
60
|
+
|
|
61
|
+
When investigation is complete:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
<signal>PHASE_COMPLETE</signal>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If the bug is too complex for BUGFIX:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
<signal>TOO_COMPLEX</signal>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
If you're blocked (can't reproduce, missing context, etc.):
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
<signal>BLOCKED:reason goes here</signal>
|
|
77
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# PR Phase Prompt
|
|
2
|
+
|
|
3
|
+
You are executing the **PR** phase of the BUGFIX protocol.
|
|
4
|
+
|
|
5
|
+
## Your Goal
|
|
6
|
+
|
|
7
|
+
Create a pull request, run CMAP review, and address feedback.
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
- **Issue**: #{{issue.number}} — {{issue.title}}
|
|
12
|
+
- **Current State**: {{current_state}}
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
### 1. Create the Pull Request
|
|
17
|
+
|
|
18
|
+
Create a PR that links to the issue:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
gh pr create --title "Fix #{{issue.number}}: <brief description>" --body "$(cat <<'EOF'
|
|
22
|
+
## Summary
|
|
23
|
+
|
|
24
|
+
<1-2 sentence description of the bug and fix>
|
|
25
|
+
|
|
26
|
+
Fixes #{{issue.number}}
|
|
27
|
+
|
|
28
|
+
## Root Cause
|
|
29
|
+
|
|
30
|
+
<Brief explanation of why the bug occurred>
|
|
31
|
+
|
|
32
|
+
## Fix
|
|
33
|
+
|
|
34
|
+
<Brief explanation of what was changed>
|
|
35
|
+
|
|
36
|
+
## Test Plan
|
|
37
|
+
|
|
38
|
+
- [ ] Regression test added
|
|
39
|
+
- [ ] Build passes
|
|
40
|
+
- [ ] All tests pass
|
|
41
|
+
EOF
|
|
42
|
+
)"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 2. Signal Completion
|
|
46
|
+
|
|
47
|
+
After the PR is created, signal completion. Porch will run consultation automatically via the verify step. If reviewers request changes, you'll be respawned with their feedback.
|
|
48
|
+
|
|
49
|
+
## Signals
|
|
50
|
+
|
|
51
|
+
When PR is created and reviews are complete:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
<signal>PHASE_COMPLETE</signal>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If you're blocked:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
<signal>BLOCKED:reason goes here</signal>
|
|
61
|
+
```
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "../../protocol-schema.json",
|
|
3
3
|
"name": "bugfix",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"description": "Lightweight protocol for minor bugfixes using GitHub Issues",
|
|
6
|
+
"input": {
|
|
7
|
+
"type": "github-issue",
|
|
8
|
+
"required": false,
|
|
9
|
+
"default_for": ["--issue", "-i"]
|
|
10
|
+
},
|
|
11
|
+
"hooks": {
|
|
12
|
+
"pre-spawn": {
|
|
13
|
+
"collision-check": true,
|
|
14
|
+
"comment-on-issue": "On it! Working on a fix now."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
6
17
|
"phases": [
|
|
7
18
|
{
|
|
8
19
|
"id": "investigate",
|
|
@@ -32,6 +43,11 @@
|
|
|
32
43
|
"commit"
|
|
33
44
|
],
|
|
34
45
|
"checks": {
|
|
46
|
+
"regression_test": {
|
|
47
|
+
"description": "A regression test MUST be added unless explicitly justified. No fix without a test.",
|
|
48
|
+
"required": true,
|
|
49
|
+
"skip_requires_justification": true
|
|
50
|
+
},
|
|
35
51
|
"build": {
|
|
36
52
|
"command": "npm run build",
|
|
37
53
|
"on_fail": "retry",
|
|
@@ -105,7 +121,7 @@
|
|
|
105
121
|
"transitions_to": "next_phase"
|
|
106
122
|
},
|
|
107
123
|
"TOO_COMPLEX": {
|
|
108
|
-
"description": "Bug is too complex for BUGFIX, escalate to
|
|
124
|
+
"description": "Bug is too complex for BUGFIX, escalate to SPIR",
|
|
109
125
|
"transitions_to": "escalate"
|
|
110
126
|
},
|
|
111
127
|
"BLOCKED": {
|
|
@@ -114,6 +130,7 @@
|
|
|
114
130
|
}
|
|
115
131
|
},
|
|
116
132
|
"defaults": {
|
|
133
|
+
"mode": "soft",
|
|
117
134
|
"consultation": {
|
|
118
135
|
"enabled": true,
|
|
119
136
|
"models": ["gemini", "codex"],
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# {{protocol_name}} Builder ({{mode}} mode)
|
|
2
|
+
|
|
3
|
+
You are executing a disciplined experiment.
|
|
4
|
+
|
|
5
|
+
{{#if mode_soft}}
|
|
6
|
+
## Mode: SOFT
|
|
7
|
+
You are running in SOFT mode. This means:
|
|
8
|
+
- You follow the EXPERIMENT protocol yourself (no porch orchestration)
|
|
9
|
+
- The architect monitors your work and verifies you're adhering to the protocol
|
|
10
|
+
- Document your findings thoroughly
|
|
11
|
+
{{/if}}
|
|
12
|
+
|
|
13
|
+
{{#if mode_strict}}
|
|
14
|
+
## Mode: STRICT
|
|
15
|
+
You are running in STRICT mode. This means:
|
|
16
|
+
- Porch orchestrates your work
|
|
17
|
+
- Run: `porch run {{project_id}}`
|
|
18
|
+
- Follow porch signals and gate approvals
|
|
19
|
+
|
|
20
|
+
### ABSOLUTE RESTRICTIONS (STRICT MODE)
|
|
21
|
+
- **NEVER edit `status.yaml` directly** — only porch commands may modify project state
|
|
22
|
+
- **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
|
|
23
|
+
- **NEVER skip the 3-way review** — always follow porch next → porch done cycle
|
|
24
|
+
{{/if}}
|
|
25
|
+
|
|
26
|
+
## Protocol
|
|
27
|
+
Follow the EXPERIMENT protocol: `codev/protocols/experiment/protocol.md`
|
|
28
|
+
|
|
29
|
+
## EXPERIMENT Overview
|
|
30
|
+
The EXPERIMENT protocol ensures disciplined experimentation:
|
|
31
|
+
|
|
32
|
+
1. **Hypothesis Phase**: Define what you're testing and success criteria
|
|
33
|
+
2. **Design Phase**: Plan the experiment approach
|
|
34
|
+
3. **Execute Phase**: Run the experiment and gather data
|
|
35
|
+
4. **Analyze Phase**: Evaluate results and draw conclusions
|
|
36
|
+
|
|
37
|
+
{{#if task}}
|
|
38
|
+
## Experiment Focus
|
|
39
|
+
{{task_text}}
|
|
40
|
+
{{/if}}
|
|
41
|
+
|
|
42
|
+
## Key Principles
|
|
43
|
+
- Start with a clear, falsifiable hypothesis
|
|
44
|
+
- Define success/failure criteria upfront
|
|
45
|
+
- Keep scope minimal for quick iteration
|
|
46
|
+
- Document findings regardless of outcome
|
|
47
|
+
- Separate experiment artifacts from production code
|
|
48
|
+
|
|
49
|
+
## Getting Started
|
|
50
|
+
1. Read the EXPERIMENT protocol document
|
|
51
|
+
2. Define your hypothesis clearly
|
|
52
|
+
3. Follow the phases in order
|