@cluesmith/codev 2.0.0-rc.9 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/af.js +2 -2
- package/bin/consult.js +1 -1
- package/dashboard/dist/assets/index-4n9zpWLY.css +32 -0
- package/dashboard/dist/assets/index-b38SaXk5.js +136 -0
- package/dashboard/dist/assets/index-b38SaXk5.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 +179 -104
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/architect.d.ts +3 -3
- package/dist/agent-farm/commands/architect.d.ts.map +1 -1
- package/dist/agent-farm/commands/architect.js +20 -147
- 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 +144 -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 +35 -19
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/consult.d.ts +3 -4
- package/dist/agent-farm/commands/consult.d.ts.map +1 -1
- package/dist/agent-farm/commands/consult.js +27 -37
- 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 +33 -83
- package/dist/agent-farm/commands/open.js.map +1 -1
- package/dist/agent-farm/commands/send.d.ts +1 -1
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +70 -79
- 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 +50 -0
- package/dist/agent-farm/commands/shell.js.map +1 -0
- package/dist/agent-farm/commands/spawn-roles.d.ts +80 -0
- package/dist/agent-farm/commands/spawn-roles.d.ts.map +1 -0
- package/dist/agent-farm/commands/spawn-roles.js +278 -0
- package/dist/agent-farm/commands/spawn-roles.js.map +1 -0
- package/dist/agent-farm/commands/spawn-worktree.d.ts +96 -0
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -0
- package/dist/agent-farm/commands/spawn-worktree.js +305 -0
- package/dist/agent-farm/commands/spawn-worktree.js.map +1 -0
- package/dist/agent-farm/commands/spawn.d.ts +5 -1
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +241 -561
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/start.d.ts +10 -20
- package/dist/agent-farm/commands/start.d.ts.map +1 -1
- package/dist/agent-farm/commands/start.js +45 -449
- 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 +75 -24
- 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 +49 -109
- package/dist/agent-farm/commands/stop.js.map +1 -1
- package/dist/agent-farm/commands/tower-cloud.d.ts +48 -0
- package/dist/agent-farm/commands/tower-cloud.d.ts.map +1 -0
- package/dist/agent-farm/commands/tower-cloud.js +293 -0
- package/dist/agent-farm/commands/tower-cloud.js.map +1 -0
- 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 +6 -2
- package/dist/agent-farm/db/index.d.ts.map +1 -1
- package/dist/agent-farm/db/index.js +301 -19
- package/dist/agent-farm/db/index.js.map +1 -1
- package/dist/agent-farm/db/migrate.d.ts +0 -4
- package/dist/agent-farm/db/migrate.d.ts.map +1 -1
- package/dist/agent-farm/db/migrate.js +6 -55
- package/dist/agent-farm/db/migrate.js.map +1 -1
- package/dist/agent-farm/db/schema.d.ts +3 -3
- package/dist/agent-farm/db/schema.d.ts.map +1 -1
- package/dist/agent-farm/db/schema.js +25 -19
- package/dist/agent-farm/db/schema.js.map +1 -1
- package/dist/agent-farm/db/types.d.ts +3 -13
- package/dist/agent-farm/db/types.d.ts.map +1 -1
- package/dist/agent-farm/db/types.js +3 -11
- 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/cloud-config.d.ts +59 -0
- package/dist/agent-farm/lib/cloud-config.d.ts.map +1 -0
- package/dist/agent-farm/lib/cloud-config.js +143 -0
- package/dist/agent-farm/lib/cloud-config.js.map +1 -0
- package/dist/agent-farm/lib/device-name.d.ts +25 -0
- package/dist/agent-farm/lib/device-name.d.ts.map +1 -0
- package/dist/agent-farm/lib/device-name.js +46 -0
- package/dist/agent-farm/lib/device-name.js.map +1 -0
- package/dist/agent-farm/lib/nonce-store.d.ts +28 -0
- package/dist/agent-farm/lib/nonce-store.d.ts.map +1 -0
- package/dist/agent-farm/lib/nonce-store.js +60 -0
- package/dist/agent-farm/lib/nonce-store.js.map +1 -0
- package/dist/agent-farm/lib/token-exchange.d.ts +18 -0
- package/dist/agent-farm/lib/token-exchange.d.ts.map +1 -0
- package/dist/agent-farm/lib/token-exchange.js +48 -0
- package/dist/agent-farm/lib/token-exchange.js.map +1 -0
- package/dist/agent-farm/lib/tower-client.d.ts +163 -0
- package/dist/agent-farm/lib/tower-client.d.ts.map +1 -0
- package/dist/agent-farm/lib/tower-client.js +233 -0
- package/dist/agent-farm/lib/tower-client.js.map +1 -0
- package/dist/agent-farm/lib/tunnel-client.d.ts +117 -0
- package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -0
- package/dist/agent-farm/lib/tunnel-client.js +504 -0
- package/dist/agent-farm/lib/tunnel-client.js.map +1 -0
- package/dist/agent-farm/servers/tower-instances.d.ts +82 -0
- package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -0
- package/dist/agent-farm/servers/tower-instances.js +454 -0
- package/dist/agent-farm/servers/tower-instances.js.map +1 -0
- package/dist/agent-farm/servers/tower-routes.d.ts +34 -0
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -0
- package/dist/agent-farm/servers/tower-routes.js +1445 -0
- package/dist/agent-farm/servers/tower-routes.js.map +1 -0
- package/dist/agent-farm/servers/tower-server.d.ts +5 -2
- package/dist/agent-farm/servers/tower-server.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +157 -475
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts +119 -0
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -0
- package/dist/agent-farm/servers/tower-terminals.js +629 -0
- package/dist/agent-farm/servers/tower-terminals.js.map +1 -0
- package/dist/agent-farm/servers/tower-tunnel.d.ts +34 -0
- package/dist/agent-farm/servers/tower-tunnel.d.ts.map +1 -0
- package/dist/agent-farm/servers/tower-tunnel.js +480 -0
- package/dist/agent-farm/servers/tower-tunnel.js.map +1 -0
- package/dist/agent-farm/servers/tower-types.d.ts +86 -0
- package/dist/agent-farm/servers/tower-types.d.ts.map +1 -0
- package/dist/agent-farm/servers/tower-types.js +6 -0
- package/dist/agent-farm/servers/tower-types.js.map +1 -0
- package/dist/agent-farm/servers/tower-utils.d.ts +58 -0
- package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -0
- package/dist/agent-farm/servers/tower-utils.js +182 -0
- package/dist/agent-farm/servers/tower-utils.js.map +1 -0
- package/dist/agent-farm/servers/tower-websocket.d.ts +25 -0
- package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -0
- package/dist/agent-farm/servers/tower-websocket.js +171 -0
- package/dist/agent-farm/servers/tower-websocket.js.map +1 -0
- package/dist/agent-farm/state.d.ts +6 -2
- package/dist/agent-farm/state.d.ts.map +1 -1
- package/dist/agent-farm/state.js +34 -25
- package/dist/agent-farm/state.js.map +1 -1
- package/dist/agent-farm/types.d.ts +49 -26
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.d.ts +0 -5
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +12 -44
- 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 -32
- package/dist/agent-farm/utils/deps.js.map +1 -1
- package/dist/agent-farm/utils/file-tabs.d.ts +27 -0
- package/dist/agent-farm/utils/file-tabs.d.ts.map +1 -0
- package/dist/agent-farm/utils/file-tabs.js +46 -0
- package/dist/agent-farm/utils/file-tabs.js.map +1 -0
- package/dist/agent-farm/utils/gate-status.d.ts +16 -0
- package/dist/agent-farm/utils/gate-status.d.ts.map +1 -0
- package/dist/agent-farm/utils/gate-status.js +79 -0
- package/dist/agent-farm/utils/gate-status.js.map +1 -0
- package/dist/agent-farm/utils/gate-watcher.d.ts +38 -0
- package/dist/agent-farm/utils/gate-watcher.d.ts.map +1 -0
- package/dist/agent-farm/utils/gate-watcher.js +122 -0
- package/dist/agent-farm/utils/gate-watcher.js.map +1 -0
- package/dist/agent-farm/utils/index.d.ts +0 -1
- package/dist/agent-farm/utils/index.d.ts.map +1 -1
- package/dist/agent-farm/utils/index.js +0 -1
- package/dist/agent-farm/utils/index.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/server-utils.d.ts +5 -5
- package/dist/agent-farm/utils/server-utils.d.ts.map +1 -1
- package/dist/agent-farm/utils/server-utils.js +5 -16
- package/dist/agent-farm/utils/server-utils.js.map +1 -1
- package/dist/agent-farm/utils/session.d.ts +32 -0
- package/dist/agent-farm/utils/session.d.ts.map +1 -0
- package/dist/agent-farm/utils/session.js +57 -0
- package/dist/agent-farm/utils/session.js.map +1 -0
- 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/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -37
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +33 -4
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts +13 -2
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +244 -29
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +96 -79
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +36 -3
- 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 +3 -2
- package/dist/commands/porch/checks.d.ts.map +1 -1
- package/dist/commands/porch/checks.js +8 -2
- package/dist/commands/porch/checks.js.map +1 -1
- package/dist/commands/porch/index.d.ts +4 -0
- package/dist/commands/porch/index.d.ts.map +1 -1
- package/dist/commands/porch/index.js +109 -70
- 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 +571 -0
- package/dist/commands/porch/next.js.map +1 -0
- package/dist/commands/porch/plan.d.ts +11 -1
- package/dist/commands/porch/plan.d.ts.map +1 -1
- package/dist/commands/porch/plan.js +33 -5
- package/dist/commands/porch/plan.js.map +1 -1
- package/dist/commands/porch/prompts.d.ts.map +1 -1
- package/dist/commands/porch/prompts.js +44 -26
- package/dist/commands/porch/prompts.js.map +1 -1
- package/dist/commands/porch/protocol.d.ts +6 -4
- package/dist/commands/porch/protocol.d.ts.map +1 -1
- package/dist/commands/porch/protocol.js +59 -15
- package/dist/commands/porch/protocol.js.map +1 -1
- package/dist/commands/porch/state.d.ts +29 -2
- package/dist/commands/porch/state.d.ts.map +1 -1
- package/dist/commands/porch/state.js +71 -3
- package/dist/commands/porch/state.js.map +1 -1
- package/dist/commands/porch/types.d.ts +45 -2
- package/dist/commands/porch/types.d.ts.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 +18 -6
- package/dist/commands/update.js.map +1 -1
- package/dist/lib/scaffold.d.ts +13 -0
- package/dist/lib/scaffold.d.ts.map +1 -1
- package/dist/lib/scaffold.js +36 -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 +69 -0
- package/dist/terminal/pty-manager.d.ts.map +1 -0
- package/dist/terminal/pty-manager.js +377 -0
- package/dist/terminal/pty-manager.js.map +1 -0
- package/dist/terminal/pty-session.d.ts +104 -0
- package/dist/terminal/pty-session.d.ts.map +1 -0
- package/dist/terminal/pty-session.js +327 -0
- package/dist/terminal/pty-session.js.map +1 -0
- package/dist/terminal/ring-buffer.d.ts +34 -0
- package/dist/terminal/ring-buffer.d.ts.map +1 -0
- package/dist/terminal/ring-buffer.js +94 -0
- package/dist/terminal/ring-buffer.js.map +1 -0
- package/dist/terminal/session-manager.d.ts +115 -0
- package/dist/terminal/session-manager.d.ts.map +1 -0
- package/dist/terminal/session-manager.js +582 -0
- package/dist/terminal/session-manager.js.map +1 -0
- package/dist/terminal/shellper-client.d.ts +66 -0
- package/dist/terminal/shellper-client.d.ts.map +1 -0
- package/dist/terminal/shellper-client.js +234 -0
- package/dist/terminal/shellper-client.js.map +1 -0
- package/dist/terminal/shellper-main.d.ts +19 -0
- package/dist/terminal/shellper-main.d.ts.map +1 -0
- package/dist/terminal/shellper-main.js +153 -0
- package/dist/terminal/shellper-main.js.map +1 -0
- package/dist/terminal/shellper-process.d.ts +75 -0
- package/dist/terminal/shellper-process.d.ts.map +1 -0
- package/dist/terminal/shellper-process.js +279 -0
- package/dist/terminal/shellper-process.js.map +1 -0
- package/dist/terminal/shellper-protocol.d.ts +115 -0
- package/dist/terminal/shellper-protocol.d.ts.map +1 -0
- package/dist/terminal/shellper-protocol.js +214 -0
- package/dist/terminal/shellper-protocol.js.map +1 -0
- package/dist/terminal/shellper-replay-buffer.d.ts +38 -0
- package/dist/terminal/shellper-replay-buffer.d.ts.map +1 -0
- package/dist/terminal/shellper-replay-buffer.js +94 -0
- package/dist/terminal/shellper-replay-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 +17 -5
- package/skeleton/.claude/skills/af/SKILL.md +89 -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 +4 -62
- package/skeleton/builders.md +1 -1
- package/skeleton/consult-types/impl-review.md +18 -9
- package/skeleton/consult-types/integration-review.md +1 -1
- package/skeleton/consult-types/plan-review.md +1 -1
- package/skeleton/consult-types/pr-ready.md +1 -1
- package/skeleton/consult-types/spec-review.md +1 -1
- 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 +60 -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 +84 -0
- package/skeleton/protocols/bugfix/protocol.json +20 -33
- 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 +17 -11
- package/skeleton/protocols/protocol-schema.json +54 -1
- package/skeleton/protocols/spir/builder-prompt.md +66 -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 +20 -39
- package/skeleton/protocols/{spider → spir}/prompts/specify.md +24 -59
- package/skeleton/protocols/{spider → spir}/protocol.json +30 -10
- package/skeleton/protocols/{spider → spir}/protocol.md +35 -21
- package/skeleton/protocols/spir/templates/review.md +89 -0
- 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 +63 -46
- package/skeleton/resources/commands/codev.md +0 -2
- package/skeleton/resources/commands/overview.md +7 -17
- package/skeleton/resources/workflow-reference.md +4 -4
- package/skeleton/roles/architect.md +151 -306
- package/skeleton/roles/builder.md +115 -332
- package/skeleton/roles/consultant.md +6 -6
- 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 -16
- 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 -1
- package/templates/open.html +26 -0
- package/templates/tower.html +731 -91
- package/dist/agent-farm/commands/kickoff.d.ts +0 -20
- package/dist/agent-farm/commands/kickoff.d.ts.map +0 -1
- package/dist/agent-farm/commands/kickoff.js +0 -273
- 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 -1858
- 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/agent-farm/utils/orphan-handler.d.ts +0 -27
- package/dist/agent-farm/utils/orphan-handler.d.ts.map +0 -1
- package/dist/agent-farm/utils/orphan-handler.js +0 -149
- package/dist/agent-farm/utils/orphan-handler.js.map +0 -1
- package/dist/agent-farm/utils/port-registry.d.ts +0 -58
- package/dist/agent-farm/utils/port-registry.d.ts.map +0 -1
- package/dist/agent-farm/utils/port-registry.js +0 -166
- package/dist/agent-farm/utils/port-registry.js.map +0 -1
- package/dist/agent-farm/utils/terminal-ports.d.ts +0 -18
- package/dist/agent-farm/utils/terminal-ports.d.ts.map +0 -1
- package/dist/agent-farm/utils/terminal-ports.js +0 -35
- package/dist/agent-farm/utils/terminal-ports.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/claude.d.ts +0 -29
- package/dist/commands/porch/claude.d.ts.map +0 -1
- package/dist/commands/porch/claude.js +0 -79
- package/dist/commands/porch/claude.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 -262
- package/dist/commands/porch/protocol-loader.js.map +0 -1
- package/dist/commands/porch/repl.d.ts +0 -33
- package/dist/commands/porch/repl.d.ts.map +0 -1
- package/dist/commands/porch/repl.js +0 -206
- package/dist/commands/porch/repl.js.map +0 -1
- package/dist/commands/porch/run.d.ts +0 -15
- package/dist/commands/porch/run.d.ts.map +0 -1
- package/dist/commands/porch/run.js +0 -551
- package/dist/commands/porch/run.js.map +0 -1
- package/dist/commands/porch/signal-parser.d.ts +0 -102
- package/dist/commands/porch/signal-parser.d.ts.map +0 -1
- package/dist/commands/porch/signal-parser.js +0 -199
- package/dist/commands/porch/signal-parser.js.map +0 -1
- package/dist/commands/porch/signals.d.ts +0 -35
- package/dist/commands/porch/signals.d.ts.map +0 -1
- package/dist/commands/porch/signals.js +0 -76
- package/dist/commands/porch/signals.js.map +0 -1
- package/dist/commands/porch2/checks.d.ts +0 -29
- package/dist/commands/porch2/checks.d.ts.map +0 -1
- package/dist/commands/porch2/checks.js +0 -141
- package/dist/commands/porch2/checks.js.map +0 -1
- package/dist/commands/porch2/index.d.ts +0 -38
- package/dist/commands/porch2/index.d.ts.map +0 -1
- package/dist/commands/porch2/index.js +0 -483
- package/dist/commands/porch2/index.js.map +0 -1
- package/dist/commands/porch2/plan.d.ts +0 -70
- package/dist/commands/porch2/plan.d.ts.map +0 -1
- package/dist/commands/porch2/plan.js +0 -227
- package/dist/commands/porch2/plan.js.map +0 -1
- package/dist/commands/porch2/protocol.d.ts +0 -37
- package/dist/commands/porch2/protocol.d.ts.map +0 -1
- package/dist/commands/porch2/protocol.js +0 -183
- package/dist/commands/porch2/protocol.js.map +0 -1
- package/dist/commands/porch2/state.d.ts +0 -35
- package/dist/commands/porch2/state.d.ts.map +0 -1
- package/dist/commands/porch2/state.js +0 -124
- package/dist/commands/porch2/state.js.map +0 -1
- package/dist/commands/porch2/types.d.ts +0 -79
- package/dist/commands/porch2/types.d.ts.map +0 -1
- package/dist/commands/porch2/types.js +0 -8
- package/dist/commands/porch2/types.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/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/templates/review.md +0 -207
- /package/skeleton/protocols/{spider → spir}/templates/plan.md +0 -0
- /package/skeleton/protocols/{spider → spir}/templates/spec.md +0 -0
|
@@ -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,84 @@
|
|
|
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. Run CMAP Review
|
|
46
|
+
|
|
47
|
+
Run 3-way parallel consultation on the PR:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
consult --model gemini pr <PR_NUMBER> &
|
|
51
|
+
consult --model codex pr <PR_NUMBER> &
|
|
52
|
+
consult --model claude pr <PR_NUMBER> &
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
All three should run in the background (`run_in_background: true`).
|
|
56
|
+
|
|
57
|
+
### 3. Address Feedback
|
|
58
|
+
|
|
59
|
+
Review the consultation results:
|
|
60
|
+
- Fix any issues identified by reviewers
|
|
61
|
+
- Push updates to the PR branch
|
|
62
|
+
- Re-run CMAP if substantial changes were made
|
|
63
|
+
|
|
64
|
+
### 4. Notify Architect
|
|
65
|
+
|
|
66
|
+
After CMAP review is complete and feedback is addressed, notify the architect:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
af send architect "PR #<number> ready for review (fixes issue #{{issue.number}})"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Signals
|
|
73
|
+
|
|
74
|
+
When PR is created and reviews are complete:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
<signal>PHASE_COMPLETE</signal>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If you're blocked:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
<signal>BLOCKED:reason goes here</signal>
|
|
84
|
+
```
|
|
@@ -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",
|
|
@@ -65,37 +81,7 @@
|
|
|
65
81
|
"max_rounds": 1
|
|
66
82
|
},
|
|
67
83
|
"transition": {
|
|
68
|
-
"on_complete":
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"id": "review",
|
|
73
|
-
"name": "Review",
|
|
74
|
-
"description": "Address review feedback",
|
|
75
|
-
"type": "once",
|
|
76
|
-
"steps": [
|
|
77
|
-
"address_feedback",
|
|
78
|
-
"update_pr"
|
|
79
|
-
],
|
|
80
|
-
"transition": {
|
|
81
|
-
"on_complete": "merge"
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"id": "merge",
|
|
86
|
-
"name": "Merge",
|
|
87
|
-
"description": "Merge the fix and close the issue",
|
|
88
|
-
"type": "once",
|
|
89
|
-
"steps": [
|
|
90
|
-
"merge_pr",
|
|
91
|
-
"verify_main",
|
|
92
|
-
"close_issue"
|
|
93
|
-
],
|
|
94
|
-
"gate": {
|
|
95
|
-
"name": "merge-approval",
|
|
96
|
-
"description": "Architect approves merge",
|
|
97
|
-
"requires": ["review_complete", "tests_pass"],
|
|
98
|
-
"next": null
|
|
84
|
+
"on_complete": null
|
|
99
85
|
}
|
|
100
86
|
}
|
|
101
87
|
],
|
|
@@ -105,7 +91,7 @@
|
|
|
105
91
|
"transitions_to": "next_phase"
|
|
106
92
|
},
|
|
107
93
|
"TOO_COMPLEX": {
|
|
108
|
-
"description": "Bug is too complex for BUGFIX, escalate to
|
|
94
|
+
"description": "Bug is too complex for BUGFIX, escalate to SPIR",
|
|
109
95
|
"transitions_to": "escalate"
|
|
110
96
|
},
|
|
111
97
|
"BLOCKED": {
|
|
@@ -114,6 +100,7 @@
|
|
|
114
100
|
}
|
|
115
101
|
},
|
|
116
102
|
"defaults": {
|
|
103
|
+
"mode": "strict",
|
|
117
104
|
"consultation": {
|
|
118
105
|
"enabled": true,
|
|
119
106
|
"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 next` to get your next tasks
|
|
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
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../protocol-schema.json",
|
|
3
|
+
"name": "experiment",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Disciplined experimentation with hypothesis testing",
|
|
6
|
+
"input": {
|
|
7
|
+
"type": "none",
|
|
8
|
+
"required": false,
|
|
9
|
+
"default_for": []
|
|
10
|
+
},
|
|
11
|
+
"hooks": {
|
|
12
|
+
"pre-spawn": {}
|
|
13
|
+
},
|
|
14
|
+
"phases": [
|
|
15
|
+
{
|
|
16
|
+
"id": "hypothesis",
|
|
17
|
+
"name": "Hypothesis",
|
|
18
|
+
"description": "Define the hypothesis and success criteria",
|
|
19
|
+
"type": "once",
|
|
20
|
+
"steps": [
|
|
21
|
+
"define_hypothesis",
|
|
22
|
+
"define_success_criteria",
|
|
23
|
+
"define_scope",
|
|
24
|
+
"create_experiment_doc"
|
|
25
|
+
],
|
|
26
|
+
"transition": {
|
|
27
|
+
"on_complete": "design"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "design",
|
|
32
|
+
"name": "Design",
|
|
33
|
+
"description": "Design the experiment approach",
|
|
34
|
+
"type": "once",
|
|
35
|
+
"steps": [
|
|
36
|
+
"choose_approach",
|
|
37
|
+
"identify_dependencies",
|
|
38
|
+
"plan_implementation",
|
|
39
|
+
"define_measurements"
|
|
40
|
+
],
|
|
41
|
+
"transition": {
|
|
42
|
+
"on_complete": "execute"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "execute",
|
|
47
|
+
"name": "Execute",
|
|
48
|
+
"description": "Run the experiment",
|
|
49
|
+
"type": "once",
|
|
50
|
+
"steps": [
|
|
51
|
+
"implement_prototype",
|
|
52
|
+
"gather_data",
|
|
53
|
+
"document_findings"
|
|
54
|
+
],
|
|
55
|
+
"transition": {
|
|
56
|
+
"on_complete": "analyze"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "analyze",
|
|
61
|
+
"name": "Analyze",
|
|
62
|
+
"description": "Analyze results and draw conclusions",
|
|
63
|
+
"type": "once",
|
|
64
|
+
"steps": [
|
|
65
|
+
"analyze_data",
|
|
66
|
+
"evaluate_hypothesis",
|
|
67
|
+
"document_conclusions",
|
|
68
|
+
"recommend_next_steps"
|
|
69
|
+
],
|
|
70
|
+
"gate": {
|
|
71
|
+
"name": "experiment-complete",
|
|
72
|
+
"description": "Experiment complete",
|
|
73
|
+
"requires": ["conclusions_documented"],
|
|
74
|
+
"next": null
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"signals": {
|
|
79
|
+
"PHASE_COMPLETE": {
|
|
80
|
+
"description": "Signal current phase is complete",
|
|
81
|
+
"transitions_to": "next_phase"
|
|
82
|
+
},
|
|
83
|
+
"BLOCKED": {
|
|
84
|
+
"description": "Signal experiment is blocked",
|
|
85
|
+
"requires": "reason"
|
|
86
|
+
},
|
|
87
|
+
"HYPOTHESIS_REJECTED": {
|
|
88
|
+
"description": "Signal hypothesis was disproven",
|
|
89
|
+
"transitions_to": "analyze"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"defaults": {
|
|
93
|
+
"mode": "soft",
|
|
94
|
+
"consultation": {
|
|
95
|
+
"enabled": false,
|
|
96
|
+
"models": [],
|
|
97
|
+
"parallel": false
|
|
98
|
+
},
|
|
99
|
+
"checks": {}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -10,7 +10,7 @@ Disciplined experimentation: Each experiment gets its own directory with `notes.
|
|
|
10
10
|
|
|
11
11
|
**Use for**: Testing approaches, evaluating models, prototyping, proof-of-concept work, research spikes
|
|
12
12
|
|
|
13
|
-
**Skip for**: Production code (use
|
|
13
|
+
**Skip for**: Production code (use SPIR), simple one-off scripts, well-understood implementations (use TICK)
|
|
14
14
|
|
|
15
15
|
## Structure
|
|
16
16
|
|
|
@@ -141,7 +141,7 @@ What should be done based on findings?
|
|
|
141
141
|
|
|
142
142
|
## Integration with Other Protocols
|
|
143
143
|
|
|
144
|
-
### Experiment →
|
|
144
|
+
### Experiment → SPIR
|
|
145
145
|
When an experiment validates an approach for production use:
|
|
146
146
|
|
|
147
147
|
1. Create a specification referencing the experiment
|
|
@@ -225,5 +225,5 @@ Determine if Redis caching improves API response times for repeated queries.
|
|
|
225
225
|
- Memory usage: 50MB for 10k cached responses
|
|
226
226
|
|
|
227
227
|
## Next Steps
|
|
228
|
-
Create
|
|
228
|
+
Create SPIR spec for production caching implementation.
|
|
229
229
|
```
|
|
@@ -88,7 +88,7 @@ Based on these findings:
|
|
|
88
88
|
|
|
89
89
|
1. **Immediate**: What should happen right after this experiment?
|
|
90
90
|
2. **Follow-up experiments**: What new questions emerged?
|
|
91
|
-
3. **Production path**: If validated, what's needed for production? (
|
|
91
|
+
3. **Production path**: If validated, what's needed for production? (SPIR spec?)
|
|
92
92
|
|
|
93
93
|
## References
|
|
94
94
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# {{protocol_name}} Builder ({{mode}} mode)
|
|
2
|
+
|
|
3
|
+
You are executing the MAINTAIN protocol to clean up and synchronize the codebase.
|
|
4
|
+
|
|
5
|
+
{{#if mode_soft}}
|
|
6
|
+
## Mode: SOFT
|
|
7
|
+
You are running in SOFT mode. This means:
|
|
8
|
+
- You follow the MAINTAIN protocol yourself (no porch orchestration)
|
|
9
|
+
- The architect monitors your work and verifies you're adhering to the protocol
|
|
10
|
+
- Work through each phase methodically
|
|
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 next` to get your next tasks
|
|
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 MAINTAIN protocol: `codev/protocols/maintain/protocol.md`
|
|
28
|
+
|
|
29
|
+
## MAINTAIN Overview
|
|
30
|
+
The MAINTAIN protocol handles codebase hygiene:
|
|
31
|
+
|
|
32
|
+
1. **Audit Phase**: Scan for dead code, unused dependencies, stale docs
|
|
33
|
+
2. **Clean Phase**: Remove identified cruft, verify build
|
|
34
|
+
3. **Sync Phase**: Update documentation (arch.md, lessons-learned.md, CLAUDE.md)
|
|
35
|
+
4. **Verify Phase**: Run full test suite, confirm health
|
|
36
|
+
|
|
37
|
+
## Key Rules
|
|
38
|
+
- Use soft deletion (move to `codev/maintain/.trash/`)
|
|
39
|
+
- Always verify build passes after removals
|
|
40
|
+
- Update documentation to match current architecture
|
|
41
|
+
- Don't remove anything actively used
|
|
42
|
+
|
|
43
|
+
## Getting Started
|
|
44
|
+
1. Read the MAINTAIN protocol document
|
|
45
|
+
2. Start with the Audit phase
|
|
46
|
+
3. Document all changes made
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# AUDIT Phase Prompt
|
|
2
|
+
|
|
3
|
+
You are executing the **AUDIT** phase of the MAINTAIN protocol.
|
|
4
|
+
|
|
5
|
+
## Your Goal
|
|
6
|
+
|
|
7
|
+
Analyze the codebase to identify dead code, unused dependencies, and stale documentation.
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
- **Current State**: {{current_state}}
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
### 1. Determine Base Commit
|
|
16
|
+
|
|
17
|
+
Find the last maintenance run:
|
|
18
|
+
```bash
|
|
19
|
+
ls codev/maintain/
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If previous runs exist, note the base commit to focus on changes since then.
|
|
23
|
+
|
|
24
|
+
### 2. Scan for Dead Code
|
|
25
|
+
|
|
26
|
+
Run static analysis tools:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# TypeScript/JavaScript
|
|
30
|
+
npx ts-prune 2>/dev/null || echo "ts-prune not available"
|
|
31
|
+
npx depcheck 2>/dev/null || echo "depcheck not available"
|
|
32
|
+
|
|
33
|
+
# Check for unused exports
|
|
34
|
+
grep -r "export " --include="*.ts" --include="*.tsx" | head -50
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 3. Scan for Unused Dependencies
|
|
38
|
+
|
|
39
|
+
Check package.json for unused dependencies:
|
|
40
|
+
```bash
|
|
41
|
+
cat package.json | grep -A100 '"dependencies"' | head -50
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Cross-reference with actual imports in the codebase.
|
|
45
|
+
|
|
46
|
+
### 4. Scan for Stale Documentation
|
|
47
|
+
|
|
48
|
+
Check for references to deleted files/functions:
|
|
49
|
+
```bash
|
|
50
|
+
# Recent changes
|
|
51
|
+
git log --oneline -20
|
|
52
|
+
|
|
53
|
+
# Check if arch.md references exist
|
|
54
|
+
grep -E "src/|packages/" codev/resources/arch.md | head -20
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 5. Create Audit Report
|
|
58
|
+
|
|
59
|
+
Create a maintenance run file: `codev/maintain/NNNN.md`
|
|
60
|
+
|
|
61
|
+
Document:
|
|
62
|
+
- Dead code identified (with file paths)
|
|
63
|
+
- Unused dependencies
|
|
64
|
+
- Stale documentation references
|
|
65
|
+
- Recommended actions
|
|
66
|
+
|
|
67
|
+
Use the template structure:
|
|
68
|
+
```markdown
|
|
69
|
+
# Maintenance Run NNNN
|
|
70
|
+
|
|
71
|
+
**Date**: YYYY-MM-DD
|
|
72
|
+
**Base Commit**: <commit-hash>
|
|
73
|
+
|
|
74
|
+
## Dead Code Identified
|
|
75
|
+
|
|
76
|
+
| File | Item | Reason |
|
|
77
|
+
|------|------|--------|
|
|
78
|
+
| path/to/file.ts | unusedFunction() | Not imported anywhere |
|
|
79
|
+
|
|
80
|
+
## Unused Dependencies
|
|
81
|
+
|
|
82
|
+
| Package | Reason |
|
|
83
|
+
|---------|--------|
|
|
84
|
+
| some-pkg | Not imported |
|
|
85
|
+
|
|
86
|
+
## Stale Documentation
|
|
87
|
+
|
|
88
|
+
| Document | Issue |
|
|
89
|
+
|----------|-------|
|
|
90
|
+
| arch.md | References deleted module |
|
|
91
|
+
|
|
92
|
+
## Recommended Actions
|
|
93
|
+
|
|
94
|
+
1. Remove X
|
|
95
|
+
2. Update Y
|
|
96
|
+
3. ...
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Signals
|
|
100
|
+
|
|
101
|
+
When audit report is complete:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
<signal>PHASE_COMPLETE</signal>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
If blocked:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
<signal>BLOCKED:reason</signal>
|
|
111
|
+
```
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# CLEAN Phase Prompt
|
|
2
|
+
|
|
3
|
+
You are executing the **CLEAN** phase of the MAINTAIN protocol.
|
|
4
|
+
|
|
5
|
+
## Your Goal
|
|
6
|
+
|
|
7
|
+
Remove the dead code and unused dependencies identified in the audit phase.
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
- **Current State**: {{current_state}}
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
Read the audit report from the previous phase:
|
|
16
|
+
```bash
|
|
17
|
+
ls -la codev/maintain/
|
|
18
|
+
cat codev/maintain/*.md | tail -100
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Process
|
|
22
|
+
|
|
23
|
+
### 1. Remove Dead Code
|
|
24
|
+
|
|
25
|
+
For each item identified in the audit:
|
|
26
|
+
|
|
27
|
+
1. Verify it's truly unused (double-check with grep)
|
|
28
|
+
2. Use `git rm` for tracked files
|
|
29
|
+
3. For untracked files, move to `.trash/` before deleting
|
|
30
|
+
|
|
31
|
+
**CRITICAL**: Use soft deletion first:
|
|
32
|
+
```bash
|
|
33
|
+
mkdir -p codev/maintain/.trash/$(date +%Y-%m-%d)
|
|
34
|
+
mv path/to/file codev/maintain/.trash/$(date +%Y-%m-%d)/
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Remove Unused Dependencies
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Remove from package.json
|
|
41
|
+
npm uninstall <package-name>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 3. Verify Build After Each Removal
|
|
45
|
+
|
|
46
|
+
After each significant removal:
|
|
47
|
+
```bash
|
|
48
|
+
npm run build
|
|
49
|
+
npm test -- --exclude='**/e2e/**'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
If build fails, revert the change and investigate.
|
|
53
|
+
|
|
54
|
+
### 4. Commit Changes
|
|
55
|
+
|
|
56
|
+
Make atomic commits for each logical change:
|
|
57
|
+
```bash
|
|
58
|
+
git add <specific-files>
|
|
59
|
+
git commit -m "[Maintain] Remove unused X"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**NEVER use `git add -A` or `git add .`**
|
|
63
|
+
|
|
64
|
+
## Important Rules
|
|
65
|
+
|
|
66
|
+
1. **One removal at a time** - Don't batch unrelated changes
|
|
67
|
+
2. **Verify after each removal** - Build must pass
|
|
68
|
+
3. **Document what was removed** - Update the maintenance run file
|
|
69
|
+
4. **Soft delete first** - Move to .trash/ before permanent deletion
|
|
70
|
+
5. **Check for side effects** - Grep for references before removing
|
|
71
|
+
|
|
72
|
+
## Output
|
|
73
|
+
|
|
74
|
+
Update the maintenance run file with:
|
|
75
|
+
- What was removed
|
|
76
|
+
- Build/test status after removal
|
|
77
|
+
- Any issues encountered
|
|
78
|
+
|
|
79
|
+
## Signals
|
|
80
|
+
|
|
81
|
+
When all dead code is removed and build passes:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
<signal>PHASE_COMPLETE</signal>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If blocked:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
<signal>BLOCKED:reason</signal>
|
|
91
|
+
```
|