@cluesmith/codev 3.2.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard-dist/assets/index-BZRTEMtH.css +32 -0
- package/dashboard-dist/assets/{index-BZ1x7x1X.js → index-JCbkpAcV.js} +33 -33
- package/dashboard-dist/assets/index-JCbkpAcV.js.map +1 -0
- package/dashboard-dist/index.html +2 -2
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +173 -0
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/attach.js +2 -2
- package/dist/agent-farm/commands/attach.js.map +1 -1
- package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +16 -0
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/inbox.d.ts +42 -0
- package/dist/agent-farm/commands/inbox.d.ts.map +1 -0
- package/dist/agent-farm/commands/inbox.js +129 -0
- package/dist/agent-farm/commands/inbox.js.map +1 -0
- package/dist/agent-farm/commands/interrupt.d.ts +20 -0
- package/dist/agent-farm/commands/interrupt.d.ts.map +1 -0
- package/dist/agent-farm/commands/interrupt.js +65 -0
- package/dist/agent-farm/commands/interrupt.js.map +1 -0
- package/dist/agent-farm/commands/reset/constants.d.ts +52 -0
- package/dist/agent-farm/commands/reset/constants.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/constants.js +52 -0
- package/dist/agent-farm/commands/reset/constants.js.map +1 -0
- package/dist/agent-farm/commands/reset/context.d.ts +230 -0
- package/dist/agent-farm/commands/reset/context.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/context.js +428 -0
- package/dist/agent-farm/commands/reset/context.js.map +1 -0
- package/dist/agent-farm/commands/reset/index.d.ts +192 -0
- package/dist/agent-farm/commands/reset/index.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/index.js +488 -0
- package/dist/agent-farm/commands/reset/index.js.map +1 -0
- package/dist/agent-farm/commands/reset/receipt.d.ts +97 -0
- package/dist/agent-farm/commands/reset/receipt.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/receipt.js +149 -0
- package/dist/agent-farm/commands/reset/receipt.js.map +1 -0
- package/dist/agent-farm/commands/reset/reorient.d.ts +117 -0
- package/dist/agent-farm/commands/reset/reorient.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/reorient.js +313 -0
- package/dist/agent-farm/commands/reset/reorient.js.map +1 -0
- package/dist/agent-farm/commands/reset.d.ts +19 -0
- package/dist/agent-farm/commands/reset.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset.js +292 -0
- package/dist/agent-farm/commands/reset.js.map +1 -0
- package/dist/agent-farm/commands/send.d.ts +2 -2
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +52 -11
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/setup.d.ts +4 -1
- package/dist/agent-farm/commands/setup.d.ts.map +1 -1
- package/dist/agent-farm/commands/setup.js +8 -4
- package/dist/agent-farm/commands/setup.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts +116 -6
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +345 -74
- package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +13 -1
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/status.d.ts.map +1 -1
- package/dist/agent-farm/commands/status.js +105 -9
- package/dist/agent-farm/commands/status.js.map +1 -1
- package/dist/agent-farm/commands/tower-sweep-husks.d.ts +6 -0
- package/dist/agent-farm/commands/tower-sweep-husks.d.ts.map +1 -0
- package/dist/agent-farm/commands/tower-sweep-husks.js +77 -0
- package/dist/agent-farm/commands/tower-sweep-husks.js.map +1 -0
- package/dist/agent-farm/commands/tower.d.ts.map +1 -1
- package/dist/agent-farm/commands/tower.js +34 -0
- package/dist/agent-farm/commands/tower.js.map +1 -1
- package/dist/agent-farm/commands/whoami.d.ts +65 -0
- package/dist/agent-farm/commands/whoami.d.ts.map +1 -0
- package/dist/agent-farm/commands/whoami.js +196 -0
- package/dist/agent-farm/commands/whoami.js.map +1 -0
- package/dist/agent-farm/db/index.d.ts +1 -1
- package/dist/agent-farm/db/index.d.ts.map +1 -1
- package/dist/agent-farm/db/index.js +80 -1
- package/dist/agent-farm/db/index.js.map +1 -1
- package/dist/agent-farm/db/mailbox.d.ts +222 -0
- package/dist/agent-farm/db/mailbox.d.ts.map +1 -0
- package/dist/agent-farm/db/mailbox.js +304 -0
- package/dist/agent-farm/db/mailbox.js.map +1 -0
- package/dist/agent-farm/db/schema.d.ts +1 -1
- package/dist/agent-farm/db/schema.d.ts.map +1 -1
- package/dist/agent-farm/db/schema.js +35 -0
- package/dist/agent-farm/db/schema.js.map +1 -1
- package/dist/agent-farm/db/types.d.ts +45 -0
- package/dist/agent-farm/db/types.d.ts.map +1 -1
- package/dist/agent-farm/db/types.js.map +1 -1
- package/dist/agent-farm/lib/builder-lookup.d.ts +1 -1
- package/dist/agent-farm/lib/builder-lookup.js +2 -2
- package/dist/agent-farm/lib/builder-lookup.js.map +1 -1
- package/dist/agent-farm/lib/reconnect-backoff.d.ts +54 -0
- package/dist/agent-farm/lib/reconnect-backoff.d.ts.map +1 -0
- package/dist/agent-farm/lib/reconnect-backoff.js +47 -0
- package/dist/agent-farm/lib/reconnect-backoff.js.map +1 -0
- package/dist/agent-farm/lib/tower-client.d.ts +16 -6
- package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tower-client.js +37 -6
- package/dist/agent-farm/lib/tower-client.js.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.d.ts +69 -1
- package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.js +218 -27
- package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
- package/dist/agent-farm/servers/architect-session-holder.d.ts +133 -0
- package/dist/agent-farm/servers/architect-session-holder.d.ts.map +1 -0
- package/dist/agent-farm/servers/architect-session-holder.js +268 -0
- package/dist/agent-farm/servers/architect-session-holder.js.map +1 -0
- package/dist/agent-farm/servers/cron-delivery.d.ts +72 -0
- package/dist/agent-farm/servers/cron-delivery.d.ts.map +1 -0
- package/dist/agent-farm/servers/cron-delivery.js +80 -0
- package/dist/agent-farm/servers/cron-delivery.js.map +1 -0
- package/dist/agent-farm/servers/delayed-send.d.ts +85 -0
- package/dist/agent-farm/servers/delayed-send.d.ts.map +1 -0
- package/dist/agent-farm/servers/delayed-send.js +165 -0
- package/dist/agent-farm/servers/delayed-send.js.map +1 -0
- package/dist/agent-farm/servers/gate-profiles.d.ts +67 -0
- package/dist/agent-farm/servers/gate-profiles.d.ts.map +1 -0
- package/dist/agent-farm/servers/gate-profiles.js +113 -0
- package/dist/agent-farm/servers/gate-profiles.js.map +1 -0
- package/dist/agent-farm/servers/mailbox-delivery.d.ts +370 -0
- package/dist/agent-farm/servers/mailbox-delivery.d.ts.map +1 -0
- package/dist/agent-farm/servers/mailbox-delivery.js +617 -0
- package/dist/agent-farm/servers/mailbox-delivery.js.map +1 -0
- package/dist/agent-farm/servers/mailbox-wiring.d.ts +125 -0
- package/dist/agent-farm/servers/mailbox-wiring.d.ts.map +1 -0
- package/dist/agent-farm/servers/mailbox-wiring.js +425 -0
- package/dist/agent-farm/servers/mailbox-wiring.js.map +1 -0
- package/dist/agent-farm/servers/message-write.d.ts +53 -1
- package/dist/agent-farm/servers/message-write.d.ts.map +1 -1
- package/dist/agent-farm/servers/message-write.js +63 -0
- package/dist/agent-farm/servers/message-write.js.map +1 -1
- package/dist/agent-farm/servers/overview.d.ts.map +1 -1
- package/dist/agent-farm/servers/overview.js +23 -4
- package/dist/agent-farm/servers/overview.js.map +1 -1
- package/dist/agent-farm/servers/process-census.d.ts +41 -0
- package/dist/agent-farm/servers/process-census.d.ts.map +1 -0
- package/dist/agent-farm/servers/process-census.js +62 -0
- package/dist/agent-farm/servers/process-census.js.map +1 -0
- package/dist/agent-farm/servers/render-gate.d.ts +141 -0
- package/dist/agent-farm/servers/render-gate.d.ts.map +1 -0
- package/dist/agent-farm/servers/render-gate.js +251 -0
- package/dist/agent-farm/servers/render-gate.js.map +1 -0
- package/dist/agent-farm/servers/session-log-sweep.d.ts +93 -0
- package/dist/agent-farm/servers/session-log-sweep.d.ts.map +1 -0
- package/dist/agent-farm/servers/session-log-sweep.js +165 -0
- package/dist/agent-farm/servers/session-log-sweep.js.map +1 -0
- package/dist/agent-farm/servers/session-submit.d.ts +90 -0
- package/dist/agent-farm/servers/session-submit.d.ts.map +1 -0
- package/dist/agent-farm/servers/session-submit.js +127 -0
- package/dist/agent-farm/servers/session-submit.js.map +1 -0
- package/dist/agent-farm/servers/shellper-husk-sweep.d.ts +87 -0
- package/dist/agent-farm/servers/shellper-husk-sweep.d.ts.map +1 -0
- package/dist/agent-farm/servers/shellper-husk-sweep.js +129 -0
- package/dist/agent-farm/servers/shellper-husk-sweep.js.map +1 -0
- package/dist/agent-farm/servers/tower-cron.d.ts +10 -7
- package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-cron.js +58 -53
- package/dist/agent-farm/servers/tower-cron.js.map +1 -1
- package/dist/agent-farm/servers/tower-instances.d.ts +14 -2
- package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-instances.js +128 -19
- package/dist/agent-farm/servers/tower-instances.js.map +1 -1
- package/dist/agent-farm/servers/tower-messages.d.ts +38 -1
- package/dist/agent-farm/servers/tower-messages.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-messages.js +106 -1
- package/dist/agent-farm/servers/tower-messages.js.map +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts +16 -4
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +807 -99
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +241 -15
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts +17 -2
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.js +139 -124
- package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.js +63 -4
- package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
- package/dist/agent-farm/servers/tower-types.d.ts +2 -1
- package/dist/agent-farm/servers/tower-types.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.d.ts +99 -1
- package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.js +242 -6
- package/dist/agent-farm/servers/tower-utils.js.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.js +6 -21
- package/dist/agent-farm/servers/tower-websocket.js.map +1 -1
- package/dist/agent-farm/servers/write-queue.d.ts +35 -0
- package/dist/agent-farm/servers/write-queue.d.ts.map +1 -0
- package/dist/agent-farm/servers/write-queue.js +56 -0
- package/dist/agent-farm/servers/write-queue.js.map +1 -0
- package/dist/agent-farm/state.d.ts +6 -1
- package/dist/agent-farm/state.d.ts.map +1 -1
- package/dist/agent-farm/state.js +5 -2
- package/dist/agent-farm/state.js.map +1 -1
- package/dist/agent-farm/types.d.ts +39 -0
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/agent-names.d.ts +2 -2
- package/dist/agent-farm/utils/agent-names.d.ts.map +1 -1
- package/dist/agent-farm/utils/agent-names.js +3 -3
- package/dist/agent-farm/utils/agent-names.js.map +1 -1
- package/dist/agent-farm/utils/architect-name.d.ts +2 -2
- package/dist/agent-farm/utils/architect-name.d.ts.map +1 -1
- package/dist/agent-farm/utils/architect-name.js +3 -3
- package/dist/agent-farm/utils/architect-name.js.map +1 -1
- package/dist/agent-farm/utils/config.d.ts +13 -0
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +33 -1
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/harness.d.ts +103 -7
- package/dist/agent-farm/utils/harness.d.ts.map +1 -1
- package/dist/agent-farm/utils/harness.js +126 -19
- package/dist/agent-farm/utils/harness.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -32
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +3 -2
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +7 -6
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/agy-auth-cache.d.ts +97 -0
- package/dist/commands/consult/agy-auth-cache.d.ts.map +1 -0
- package/dist/commands/consult/agy-auth-cache.js +320 -0
- package/dist/commands/consult/agy-auth-cache.js.map +1 -0
- package/dist/commands/consult/cli-options.d.ts +34 -0
- package/dist/commands/consult/cli-options.d.ts.map +1 -0
- package/dist/commands/consult/cli-options.js +67 -0
- package/dist/commands/consult/cli-options.js.map +1 -0
- package/dist/commands/consult/index.d.ts +56 -2
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +330 -27
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/consult/metrics.d.ts +42 -0
- package/dist/commands/consult/metrics.d.ts.map +1 -1
- package/dist/commands/consult/metrics.js +129 -9
- package/dist/commands/consult/metrics.js.map +1 -1
- package/dist/commands/doctor.d.ts +28 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +258 -22
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +3 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +7 -6
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/porch/checks.d.ts +23 -0
- package/dist/commands/porch/checks.d.ts.map +1 -1
- package/dist/commands/porch/checks.js +60 -0
- package/dist/commands/porch/checks.js.map +1 -1
- package/dist/commands/porch/config.d.ts +20 -0
- package/dist/commands/porch/config.d.ts.map +1 -1
- package/dist/commands/porch/config.js +20 -0
- package/dist/commands/porch/config.js.map +1 -1
- package/dist/commands/porch/index.d.ts.map +1 -1
- package/dist/commands/porch/index.js +32 -36
- package/dist/commands/porch/index.js.map +1 -1
- package/dist/commands/porch/next.d.ts.map +1 -1
- package/dist/commands/porch/next.js +2 -41
- package/dist/commands/porch/next.js.map +1 -1
- package/dist/commands/update.d.ts +4 -4
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +9 -11
- package/dist/commands/update.js.map +1 -1
- package/dist/lib/config.d.ts +70 -3
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +67 -3
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/consult-lanes.d.ts +149 -0
- package/dist/lib/consult-lanes.d.ts.map +1 -0
- package/dist/lib/consult-lanes.js +360 -0
- package/dist/lib/consult-lanes.js.map +1 -0
- package/dist/lib/default-branch.d.ts +1 -1
- package/dist/lib/default-branch.js +1 -1
- package/dist/lib/github.js +1 -1
- package/dist/lib/github.js.map +1 -1
- package/dist/lib/gitignore.d.ts +25 -2
- package/dist/lib/gitignore.d.ts.map +1 -1
- package/dist/lib/gitignore.js +70 -0
- package/dist/lib/gitignore.js.map +1 -1
- package/dist/lib/migration-backup-audit.d.ts +64 -0
- package/dist/lib/migration-backup-audit.d.ts.map +1 -0
- package/dist/lib/migration-backup-audit.js +145 -0
- package/dist/lib/migration-backup-audit.js.map +1 -0
- package/dist/lib/prompt-behavior-metrics.d.ts +67 -0
- package/dist/lib/prompt-behavior-metrics.d.ts.map +1 -0
- package/dist/lib/prompt-behavior-metrics.js +290 -0
- package/dist/lib/prompt-behavior-metrics.js.map +1 -0
- package/dist/lib/protocol-drift-audit.d.ts +118 -0
- package/dist/lib/protocol-drift-audit.d.ts.map +1 -0
- package/dist/lib/protocol-drift-audit.js +217 -0
- package/dist/lib/protocol-drift-audit.js.map +1 -0
- package/dist/lib/scaffold.d.ts +10 -3
- package/dist/lib/scaffold.d.ts.map +1 -1
- package/dist/lib/scaffold.js +29 -26
- package/dist/lib/scaffold.js.map +1 -1
- package/dist/lib/skeleton.d.ts +22 -1
- package/dist/lib/skeleton.d.ts.map +1 -1
- package/dist/lib/skeleton.js +120 -0
- package/dist/lib/skeleton.js.map +1 -1
- package/dist/lib/test-env.d.ts +74 -0
- package/dist/lib/test-env.d.ts.map +1 -0
- package/dist/lib/test-env.js +92 -0
- package/dist/lib/test-env.js.map +1 -0
- package/dist/terminal/pty-manager.d.ts +9 -0
- package/dist/terminal/pty-manager.d.ts.map +1 -1
- package/dist/terminal/pty-manager.js +32 -6
- package/dist/terminal/pty-manager.js.map +1 -1
- package/dist/terminal/pty-session.d.ts +156 -4
- package/dist/terminal/pty-session.d.ts.map +1 -1
- package/dist/terminal/pty-session.js +307 -42
- package/dist/terminal/pty-session.js.map +1 -1
- package/dist/terminal/ring-buffer.d.ts +39 -6
- package/dist/terminal/ring-buffer.d.ts.map +1 -1
- package/dist/terminal/ring-buffer.js +74 -6
- package/dist/terminal/ring-buffer.js.map +1 -1
- package/dist/terminal/session-manager.d.ts +129 -0
- package/dist/terminal/session-manager.d.ts.map +1 -1
- package/dist/terminal/session-manager.js +337 -44
- package/dist/terminal/session-manager.js.map +1 -1
- package/dist/terminal/session-screen.d.ts +91 -0
- package/dist/terminal/session-screen.d.ts.map +1 -0
- package/dist/terminal/session-screen.js +135 -0
- package/dist/terminal/session-screen.js.map +1 -0
- package/dist/terminal/shellper-client.d.ts +19 -4
- package/dist/terminal/shellper-client.d.ts.map +1 -1
- package/dist/terminal/shellper-client.js +70 -8
- package/dist/terminal/shellper-client.js.map +1 -1
- package/dist/terminal/shellper-main.js +2 -1
- package/dist/terminal/shellper-main.js.map +1 -1
- package/dist/terminal/shellper-process.d.ts +1 -1
- package/dist/terminal/shellper-process.d.ts.map +1 -1
- package/dist/terminal/shellper-process.js +33 -9
- package/dist/terminal/shellper-process.js.map +1 -1
- package/dist/terminal/shellper-protocol.d.ts +40 -2
- package/dist/terminal/shellper-protocol.d.ts.map +1 -1
- package/dist/terminal/shellper-protocol.js +72 -5
- package/dist/terminal/shellper-protocol.js.map +1 -1
- package/dist/terminal/shellper-replay-buffer.d.ts +69 -7
- package/dist/terminal/shellper-replay-buffer.d.ts.map +1 -1
- package/dist/terminal/shellper-replay-buffer.js +167 -31
- package/dist/terminal/shellper-replay-buffer.js.map +1 -1
- package/package.json +11 -9
- package/skeleton/.claude/skills/afx/SKILL.md +27 -1
- package/skeleton/.claude/skills/arch-init/SKILL.md +135 -0
- package/skeleton/.claude/skills/arch-save/SKILL.md +183 -0
- package/skeleton/.claude/skills/codev/SKILL.md +33 -2
- package/skeleton/.claude/skills/runnable-worktrees/SKILL.md +119 -0
- package/skeleton/.codex/skills/afx/SKILL.md +170 -0
- package/skeleton/.codex/skills/arch-init/SKILL.md +135 -0
- package/skeleton/.codex/skills/arch-save/SKILL.md +183 -0
- package/skeleton/.codex/skills/codev/SKILL.md +90 -0
- package/skeleton/.codex/skills/consult/SKILL.md +96 -0
- package/skeleton/.codex/skills/generate-image/SKILL.md +45 -0
- package/skeleton/.codex/skills/porch/SKILL.md +60 -0
- package/skeleton/.codex/skills/runnable-worktrees/SKILL.md +119 -0
- package/skeleton/.codex/skills/update-arch-docs/SKILL.md +132 -0
- package/skeleton/protocols/air/builder-prompt.md +28 -47
- package/skeleton/protocols/air/consult-types/impl-review.md +17 -34
- package/skeleton/protocols/air/consult-types/pr-review.md +14 -37
- package/skeleton/protocols/air/prompts/implement.md +20 -73
- package/skeleton/protocols/air/prompts/pr.md +22 -54
- package/skeleton/protocols/air/protocol.md +40 -71
- package/skeleton/protocols/aspir/builder-prompt.md +29 -66
- package/skeleton/protocols/aspir/consult-types/impl-review.md +17 -44
- package/skeleton/protocols/aspir/consult-types/phase-review.md +17 -44
- package/skeleton/protocols/aspir/consult-types/plan-review.md +14 -38
- package/skeleton/protocols/aspir/consult-types/pr-review.md +13 -39
- package/skeleton/protocols/aspir/consult-types/spec-review.md +13 -33
- package/skeleton/protocols/aspir/prompts/implement.md +27 -196
- package/skeleton/protocols/aspir/prompts/plan.md +21 -85
- package/skeleton/protocols/aspir/prompts/review.md +29 -228
- package/skeleton/protocols/aspir/prompts/specify.md +25 -111
- package/skeleton/protocols/aspir/protocol.json +10 -0
- package/skeleton/protocols/aspir/protocol.md +36 -82
- package/skeleton/protocols/bugfix/builder-prompt.md +23 -45
- package/skeleton/protocols/bugfix/consult-types/impl-review.md +21 -45
- package/skeleton/protocols/bugfix/consult-types/pr-review.md +18 -52
- package/skeleton/protocols/bugfix/prompts/fix.md +16 -61
- package/skeleton/protocols/bugfix/prompts/investigate.md +18 -62
- package/skeleton/protocols/bugfix/prompts/pr.md +22 -57
- package/skeleton/protocols/bugfix/protocol.md +44 -50
- package/skeleton/protocols/experiment/builder-prompt.md +25 -58
- package/skeleton/protocols/experiment/protocol.md +22 -188
- package/skeleton/protocols/experiment/templates/notes.md +11 -71
- package/skeleton/protocols/maintain/builder-prompt.md +24 -45
- package/skeleton/protocols/maintain/consult-types/impl-review.md +17 -44
- package/skeleton/protocols/maintain/consult-types/pr-review.md +13 -39
- package/skeleton/protocols/maintain/prompts/maintain.md +1 -1
- package/skeleton/protocols/maintain/protocol.md +32 -266
- package/skeleton/protocols/maintain/templates/maintenance-run.md +11 -0
- package/skeleton/protocols/pir/builder-prompt.md +30 -64
- package/skeleton/protocols/pir/consult-types/impl-review.md +17 -50
- package/skeleton/protocols/pir/consult-types/pr-review.md +11 -40
- package/skeleton/protocols/pir/prompts/implement.md +1 -2
- package/skeleton/protocols/pir/prompts/plan.md +0 -3
- package/skeleton/protocols/pir/prompts/review.md +1 -1
- package/skeleton/protocols/pir/protocol.md +54 -177
- package/skeleton/protocols/research/builder-prompt.md +27 -58
- package/skeleton/protocols/research/protocol.md +28 -153
- package/skeleton/protocols/spike/builder-prompt.md +30 -48
- package/skeleton/protocols/spike/protocol.md +24 -107
- package/skeleton/protocols/spike/templates/findings.md +9 -39
- package/skeleton/protocols/spir/builder-prompt.md +33 -62
- package/skeleton/protocols/spir/consult-types/impl-review.md +17 -44
- package/skeleton/protocols/spir/consult-types/phase-review.md +17 -44
- package/skeleton/protocols/spir/consult-types/plan-review.md +14 -38
- package/skeleton/protocols/spir/consult-types/pr-review.md +13 -39
- package/skeleton/protocols/spir/consult-types/spec-review.md +13 -33
- package/skeleton/protocols/spir/prompts/implement.md +26 -195
- package/skeleton/protocols/spir/prompts/plan.md +20 -84
- package/skeleton/protocols/spir/prompts/review.md +28 -227
- package/skeleton/protocols/spir/prompts/specify.md +24 -110
- package/skeleton/protocols/spir/protocol.json +10 -0
- package/skeleton/protocols/spir/protocol.md +84 -633
- package/skeleton/protocols/spir/templates/plan.md +28 -147
- package/skeleton/protocols/spir/templates/review.md +21 -80
- package/skeleton/protocols/spir/templates/spec.md +24 -118
- package/skeleton/resources/commands/agent-farm.md +348 -0
- package/skeleton/resources/commands/codev.md +5 -0
- package/skeleton/resources/commands/consult.md +262 -8
- package/skeleton/resources/commands/overview.md +1 -0
- package/skeleton/roles/architect.md +67 -306
- package/skeleton/roles/builder.md +77 -191
- package/skeleton/templates/AGENTS.md +2 -0
- package/skeleton/templates/CLAUDE.md +2 -0
- package/templates/tower.html +39 -2
- package/dashboard-dist/assets/index-BZ1x7x1X.js.map +0 -1
- package/dashboard-dist/assets/index-DB1KBSNE.css +0 -32
- package/dist/agent-farm/servers/send-buffer.d.ts +0 -59
- package/dist/agent-farm/servers/send-buffer.d.ts.map +0 -1
- package/dist/agent-farm/servers/send-buffer.js +0 -103
- package/dist/agent-farm/servers/send-buffer.js.map +0 -1
- package/skeleton/porch/prompts/defend.md +0 -108
- package/skeleton/porch/prompts/diagnose.md +0 -70
- package/skeleton/porch/prompts/evaluate.md +0 -132
- package/skeleton/porch/prompts/fix.md +0 -59
- package/skeleton/porch/prompts/implement.md +0 -88
- package/skeleton/porch/prompts/plan.md +0 -74
- package/skeleton/porch/prompts/pr.md +0 -84
- package/skeleton/porch/prompts/review.md +0 -249
- package/skeleton/porch/prompts/specify.md +0 -53
- package/skeleton/porch/prompts/test.md +0 -63
- package/skeleton/protocols/aspir/templates/plan.md +0 -184
- package/skeleton/protocols/aspir/templates/review.md +0 -120
- package/skeleton/protocols/aspir/templates/spec.md +0 -154
|
@@ -1,657 +1,108 @@
|
|
|
1
1
|
# SPIR Protocol
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
> Each phase has one build-verify cycle with 3-way consultation.
|
|
3
|
+
**S**pecify → **P**lan → **I**mplement → **R**eview. Each phase is a build-verify cycle with
|
|
4
|
+
3-way consultation, and two human gates stand before implementation begins.
|
|
6
5
|
|
|
6
|
+
Use SPIR for new features, new protocols, architecture changes, and complex refactors — work
|
|
7
|
+
where getting the shape wrong is expensive to discover late. For an isolated bug fix or a small
|
|
8
|
+
feature fully described in an issue, a lighter protocol costs less and loses nothing.
|
|
7
9
|
|
|
8
|
-
##
|
|
10
|
+
## The state machine
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- Builders work in git worktrees branched from HEAD — uncommitted files are invisible
|
|
13
|
-
- This includes `codev update` results, spec drafts, and plan approvals
|
|
14
|
-
- The `afx spawn` command enforces this (use `--force` to override)
|
|
15
|
-
|
|
16
|
-
**Required for Multi-Agent Consultation**:
|
|
17
|
-
- The `consult` CLI must be available (installed with `npm install -g @cluesmith/codev`)
|
|
18
|
-
- At least one consultation backend: `claude`, `gemini-cli`, or `codex`
|
|
19
|
-
- Check with: `codev doctor` or `consult --help`
|
|
20
|
-
|
|
21
|
-
## Protocol Configuration
|
|
22
|
-
|
|
23
|
-
### Multi-Agent Consultation (ENABLED BY DEFAULT)
|
|
24
|
-
|
|
25
|
-
**DEFAULT BEHAVIOR:**
|
|
26
|
-
Multi-agent consultation is **ENABLED BY DEFAULT** when using SPIR protocol.
|
|
27
|
-
|
|
28
|
-
**DEFAULT AGENTS:**
|
|
29
|
-
- **GPT-5 Codex**: Primary reviewer for architecture, feasibility, and code quality
|
|
30
|
-
- **Gemini Pro**: Secondary reviewer for completeness, edge cases, and alternative approaches
|
|
31
|
-
|
|
32
|
-
**DISABLING CONSULTATION:**
|
|
33
|
-
To run SPIR without consultation, say "without consultation" when starting work.
|
|
34
|
-
|
|
35
|
-
**CUSTOM AGENTS:**
|
|
36
|
-
The user can specify different agents by saying: "use SPIR with consultation from [agent1] and [agent2]"
|
|
37
|
-
|
|
38
|
-
**CONSULTATION BEHAVIOR:**
|
|
39
|
-
- DEFAULT: MANDATORY consultation with GPT-5 and Gemini Pro at EVERY checkpoint
|
|
40
|
-
- When explicitly disabled: Skip all consultation steps
|
|
41
|
-
- The protocol is BLOCKED until all required consultations are complete
|
|
42
|
-
|
|
43
|
-
**Consultation Checkpoints**:
|
|
44
|
-
- **Specification**: After initial draft, after human comments
|
|
45
|
-
- **Planning**: After initial plan, after human review
|
|
46
|
-
- **Implementation**: After code implementation
|
|
47
|
-
- **Defending**: After test creation
|
|
48
|
-
- **Evaluation**: Before marking phase complete
|
|
49
|
-
- **Review**: After review document
|
|
50
|
-
|
|
51
|
-
## Overview
|
|
52
|
-
SPIR is a structured development protocol that emphasizes specification-driven development with iterative implementation and continuous review. It builds upon the DAPPER methodology with a focus on context-first development and multi-agent collaboration.
|
|
53
|
-
|
|
54
|
-
**The SPIR Model**:
|
|
55
|
-
- **S - Specify**: Write specification with 3-way review → Gate: `spec-approval`
|
|
56
|
-
- **P - Plan**: Write implementation plan with 3-way review → Gate: `plan-approval`
|
|
57
|
-
- **I - Implement**: Execute each plan phase with build-verify cycle (one cycle per phase)
|
|
58
|
-
- **R - Review**: Final review and PR preparation with 3-way review
|
|
59
|
-
|
|
60
|
-
Each phase follows a build-verify loop: build the artifact, then verify with 3-way consultation (Gemini, Codex, Claude).
|
|
61
|
-
|
|
62
|
-
**Core Principle**: Each feature is tracked through exactly THREE documents - a specification, a plan, and a review with lessons learned - all sharing the same filename and sequential identifier.
|
|
63
|
-
|
|
64
|
-
## When to Use SPIR
|
|
65
|
-
|
|
66
|
-
### Use SPIR for:
|
|
67
|
-
- New feature development
|
|
68
|
-
- Architecture changes
|
|
69
|
-
- Complex refactoring
|
|
70
|
-
- System design decisions
|
|
71
|
-
- API design and implementation
|
|
72
|
-
- Performance optimization initiatives
|
|
73
|
-
|
|
74
|
-
### Skip SPIR for:
|
|
75
|
-
- Simple bug fixes (< 10 lines)
|
|
76
|
-
- Documentation updates
|
|
77
|
-
- Configuration changes
|
|
78
|
-
- Dependency updates
|
|
79
|
-
- Emergency hotfixes (but do a lightweight retrospective after)
|
|
80
|
-
|
|
81
|
-
## Baked Decisions (Optional)
|
|
82
|
-
|
|
83
|
-
When filing an issue for SPIR, you can pin architectural decisions you don't want the builder or CMAP reviewers to re-litigate. Include a `## Baked Decisions` section (any heading level is fine) anywhere in the issue body. Useful categories: language, framework, deployment shape, key dependencies, decisions deferred to a later spec. The builder will copy the section verbatim into the spec's Constraints and treat each item as fixed; CMAP reviewers will not propose alternatives unless the spec itself fails to honor a stated decision. Leave the section out for issues where you want the builder to explore freely — absence is the no-op default. You can amend or rescind a baked decision at any time by updating the issue and respawning, or by sending the builder a direct instruction via `afx send`.
|
|
84
|
-
|
|
85
|
-
## Protocol Phases
|
|
86
|
-
|
|
87
|
-
### S - Specify (Collaborative Design Exploration)
|
|
88
|
-
|
|
89
|
-
**Purpose**: Thoroughly explore the problem space and solution options before committing to an approach.
|
|
90
|
-
|
|
91
|
-
**Workflow Overview**:
|
|
92
|
-
1. User provides a prompt describing what they want built
|
|
93
|
-
2. Agent generates initial specification document
|
|
94
|
-
3. **COMMIT**: "Initial specification draft"
|
|
95
|
-
4. Multi-agent review (GPT-5 and Gemini Pro)
|
|
96
|
-
5. Agent updates spec with multi-agent feedback
|
|
97
|
-
6. **COMMIT**: "Specification with multi-agent review"
|
|
98
|
-
7. Human reviews and provides comments for changes
|
|
99
|
-
8. Agent makes changes and lists what was modified
|
|
100
|
-
9. **COMMIT**: "Specification with user feedback"
|
|
101
|
-
10. Multi-agent review of updated document
|
|
102
|
-
11. Final updates based on second review
|
|
103
|
-
12. **COMMIT**: "Final approved specification"
|
|
104
|
-
13. Iterate steps 7-12 until user approves and says to proceed to planning
|
|
105
|
-
|
|
106
|
-
**Important**: Keep documentation minimal - use only THREE core files with the same name:
|
|
107
|
-
- `specs/####-descriptive-name.md` - The specification
|
|
108
|
-
- `plans/####-descriptive-name.md` - The implementation plan
|
|
109
|
-
- `reviews/####-descriptive-name.md` - Review and lessons learned (created during Review phase)
|
|
110
|
-
|
|
111
|
-
**Process**:
|
|
112
|
-
1. **Clarifying Questions** (ALWAYS START HERE)
|
|
113
|
-
- Ask the user/stakeholder questions to understand the problem
|
|
114
|
-
- Probe for hidden requirements and constraints
|
|
115
|
-
- Understand the business context and goals
|
|
116
|
-
- Identify what's in scope and out of scope
|
|
117
|
-
- Continue asking until the problem is crystal clear
|
|
118
|
-
|
|
119
|
-
2. **Problem Analysis**
|
|
120
|
-
- Clearly articulate the problem being solved
|
|
121
|
-
- Identify stakeholders and their needs
|
|
122
|
-
- Document current state and desired state
|
|
123
|
-
- List assumptions and constraints
|
|
124
|
-
|
|
125
|
-
3. **Solution Exploration**
|
|
126
|
-
- Generate multiple solution approaches (as many as appropriate)
|
|
127
|
-
- For each approach, document:
|
|
128
|
-
- Technical design
|
|
129
|
-
- Trade-offs (pros/cons)
|
|
130
|
-
- Estimated complexity
|
|
131
|
-
- Risk assessment
|
|
132
|
-
|
|
133
|
-
4. **Open Questions**
|
|
134
|
-
- List all uncertainties that need resolution
|
|
135
|
-
- Categorize as:
|
|
136
|
-
- Critical (blocks progress)
|
|
137
|
-
- Important (affects design)
|
|
138
|
-
- Nice-to-know (optimization)
|
|
139
|
-
|
|
140
|
-
5. **Success Criteria**
|
|
141
|
-
- Define measurable acceptance criteria
|
|
142
|
-
- Include performance requirements
|
|
143
|
-
- Specify quality metrics
|
|
144
|
-
- Document test scenarios
|
|
145
|
-
|
|
146
|
-
6. **Expert Consultation (DEFAULT - MANDATORY)**
|
|
147
|
-
- **First Consultation** (after initial draft):
|
|
148
|
-
- MUST consult GPT-5 AND Gemini Pro
|
|
149
|
-
- Focus: Problem clarity, solution completeness, missing requirements
|
|
150
|
-
- Update specification with ALL feedback from both models
|
|
151
|
-
- Document changes in "Consultation Log" section of the spec
|
|
152
|
-
- **Second Consultation** (after human comments):
|
|
153
|
-
- MUST consult GPT-5 AND Gemini Pro again
|
|
154
|
-
- Focus: Validate changes, ensure alignment
|
|
155
|
-
- Final specification update with both models' input
|
|
156
|
-
- Update "Consultation Log" with new feedback
|
|
157
|
-
|
|
158
|
-
**Note**: Only skip if user explicitly requested "without multi-agent consultation"
|
|
159
|
-
|
|
160
|
-
**⚠️ BLOCKING**: Cannot proceed without BOTH consultations (unless explicitly disabled)
|
|
161
|
-
|
|
162
|
-
**Output**: Single specification document in `codev/specs/####-descriptive-name.md`
|
|
163
|
-
- All consultation feedback incorporated directly into this document
|
|
164
|
-
- Include a "Consultation Log" section summarizing key feedback and changes
|
|
165
|
-
- Version control captures evolution through commits
|
|
166
|
-
**Structure**: developed through the specify phase
|
|
167
|
-
**Review Required**: Yes - Human approval AFTER consultations
|
|
168
|
-
|
|
169
|
-
### P - Plan (Structured Decomposition)
|
|
170
|
-
|
|
171
|
-
**Purpose**: Transform the approved specification into an executable roadmap with clear phases.
|
|
172
|
-
|
|
173
|
-
**⚠️ CRITICAL: No Time Estimates in the AI Age**
|
|
174
|
-
- **NEVER include time estimates** (hours, days, weeks, story points)
|
|
175
|
-
- AI-driven development makes traditional time estimates meaningless
|
|
176
|
-
- Delivery speed depends on iteration cycles, not calendar time
|
|
177
|
-
- Focus on logical dependencies and phase ordering instead
|
|
178
|
-
- Measure progress by completed phases, not elapsed time
|
|
179
|
-
- The only valid metrics are: "done" or "not done"
|
|
180
|
-
|
|
181
|
-
**Workflow Overview**:
|
|
182
|
-
1. Agent creates initial plan document
|
|
183
|
-
2. **COMMIT**: "Initial plan draft"
|
|
184
|
-
3. Multi-agent review (GPT-5 and Gemini Pro)
|
|
185
|
-
4. Agent updates plan with multi-agent feedback
|
|
186
|
-
5. **COMMIT**: "Plan with multi-agent review"
|
|
187
|
-
6. User reviews and requests modifications
|
|
188
|
-
7. Agent updates plan based on user feedback
|
|
189
|
-
8. **COMMIT**: "Plan with user feedback"
|
|
190
|
-
9. Multi-agent review of updated plan
|
|
191
|
-
10. Final updates based on second review
|
|
192
|
-
11. **COMMIT**: "Final approved plan"
|
|
193
|
-
12. Iterate steps 6-11 until agreement is reached
|
|
194
|
-
|
|
195
|
-
**Phase Design Goals**:
|
|
196
|
-
Each phase should be:
|
|
197
|
-
- A separate piece of work that can be checked in as a unit
|
|
198
|
-
- A complete set of functionality
|
|
199
|
-
- Self-contained and independently valuable
|
|
200
|
-
|
|
201
|
-
**Process**:
|
|
202
|
-
1. **Phase Definition**
|
|
203
|
-
- Break work into logical phases
|
|
204
|
-
- Each phase must:
|
|
205
|
-
- Have a clear, single objective
|
|
206
|
-
- Be independently testable
|
|
207
|
-
- Deliver observable value
|
|
208
|
-
- Be a complete unit that can be committed
|
|
209
|
-
- End with evaluation discussion and single commit
|
|
210
|
-
- Note dependencies inline, for example:
|
|
211
|
-
```markdown
|
|
212
|
-
Phase 2: API Endpoints
|
|
213
|
-
- Depends on: Phase 1 (Database Schema)
|
|
214
|
-
- Objective: Create /users and /todos endpoints
|
|
215
|
-
- Evaluation: Test coverage, API design review, performance check
|
|
216
|
-
- Commit: Will create single commit after user approval
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
2. **Success Metrics**
|
|
220
|
-
- Define "done" for each phase
|
|
221
|
-
- Include test coverage requirements
|
|
222
|
-
- Specify performance benchmarks
|
|
223
|
-
- Document acceptance tests
|
|
224
|
-
|
|
225
|
-
3. **Expert Review (DEFAULT - MANDATORY)**
|
|
226
|
-
- **First Consultation** (after plan creation):
|
|
227
|
-
- MUST consult GPT-5 AND Gemini Pro
|
|
228
|
-
- Focus: Feasibility, phase breakdown, completeness
|
|
229
|
-
- Update plan with ALL feedback from both models
|
|
230
|
-
- **Second Consultation** (after human review):
|
|
231
|
-
- MUST consult GPT-5 AND Gemini Pro again
|
|
232
|
-
- Focus: Validate adjustments, confirm approach
|
|
233
|
-
- Final plan refinement with both models' input
|
|
234
|
-
|
|
235
|
-
**Note**: Only skip if user explicitly requested "without multi-agent consultation"
|
|
236
|
-
|
|
237
|
-
**⚠️ BLOCKING**: Cannot proceed without BOTH consultations (unless explicitly disabled)
|
|
238
|
-
|
|
239
|
-
**Output**: Single plan document in `codev/plans/####-descriptive-name.md`
|
|
240
|
-
- Same filename as specification, different directory
|
|
241
|
-
- All consultation feedback incorporated directly
|
|
242
|
-
- Include phase status tracking within this document
|
|
243
|
-
- **DO NOT include time estimates** - Focus on deliverables and dependencies, not hours/days
|
|
244
|
-
- Version control captures evolution through commits
|
|
245
|
-
**Structure**: follows the plan template provided by the plan phase
|
|
246
|
-
**Review Required**: Yes - Technical lead approval AFTER consultations
|
|
247
|
-
|
|
248
|
-
### I - Implement (Per Plan Phase)
|
|
249
|
-
|
|
250
|
-
Execute for each phase in the plan. Each phase follows a build-verify cycle.
|
|
251
|
-
|
|
252
|
-
**CRITICAL PRECONDITION**: Before starting any phase, verify the previous phase was committed to git. No phase can begin without the prior phase's commit.
|
|
253
|
-
|
|
254
|
-
**Build-Verify Cycle Per Phase**:
|
|
255
|
-
1. **Build** - Implement code and tests for this phase
|
|
256
|
-
2. **Verify** - 3-way consultation (Gemini, Codex, Claude)
|
|
257
|
-
3. **Iterate** - Address feedback until verification passes
|
|
258
|
-
4. **Commit** - Single atomic commit for the phase (MANDATORY before next phase)
|
|
259
|
-
5. **Proceed** - Move to next phase only after commit
|
|
260
|
-
|
|
261
|
-
**Handling Failures**:
|
|
262
|
-
- If verification reveals gaps → iterate and fix
|
|
263
|
-
- If fundamental plan flaws found → mark phase as `blocked` and revise plan
|
|
264
|
-
|
|
265
|
-
**Commit Requirements**:
|
|
266
|
-
- Each phase MUST end with a git commit before proceeding
|
|
267
|
-
- Commit message format: `[Spec ####][Phase: name] type: Description`
|
|
268
|
-
- No work on the next phase until current phase is committed
|
|
269
|
-
- If changes are needed after commit, create a new commit with fixes
|
|
270
|
-
|
|
271
|
-
#### I - Implement (Build with Discipline)
|
|
272
|
-
|
|
273
|
-
**Purpose**: Transform the plan into working code with high quality standards.
|
|
274
|
-
|
|
275
|
-
**Precondition**: Previous phase must be committed (verify with `git log`)
|
|
276
|
-
|
|
277
|
-
**Requirements**:
|
|
278
|
-
1. **Pre-Implementation**
|
|
279
|
-
- Verify previous phase is committed to git
|
|
280
|
-
- Review the phase plan and success criteria
|
|
281
|
-
- Set up the development environment
|
|
282
|
-
- Create feature branch following naming convention
|
|
283
|
-
- Document any plan deviations immediately
|
|
284
|
-
|
|
285
|
-
2. **During Implementation**
|
|
286
|
-
- Write self-documenting code
|
|
287
|
-
- Follow project style guide strictly
|
|
288
|
-
- Implement incrementally with frequent commits
|
|
289
|
-
- Each commit must:
|
|
290
|
-
- Be atomic (single logical change)
|
|
291
|
-
- Include descriptive message
|
|
292
|
-
- Reference the phase
|
|
293
|
-
- Pass basic syntax checks
|
|
294
|
-
|
|
295
|
-
3. **Code Quality Standards**
|
|
296
|
-
- No commented-out code
|
|
297
|
-
- No debug prints in final code
|
|
298
|
-
- Handle all error cases explicitly
|
|
299
|
-
- Include necessary logging
|
|
300
|
-
- Follow security best practices
|
|
301
|
-
|
|
302
|
-
4. **Documentation Requirements**
|
|
303
|
-
- Update API documentation
|
|
304
|
-
- Add inline comments for complex logic
|
|
305
|
-
- Update README if needed
|
|
306
|
-
- Document configuration changes
|
|
307
|
-
|
|
308
|
-
**Evidence Required**:
|
|
309
|
-
- Link to commits
|
|
310
|
-
- Code review approval (if applicable)
|
|
311
|
-
- No linting errors
|
|
312
|
-
- CI pipeline pass link (build/test/lint)
|
|
313
|
-
|
|
314
|
-
**Expert Consultation (DEFAULT - MANDATORY)**:
|
|
315
|
-
- MUST consult BOTH GPT-5 AND Gemini Pro after implementation
|
|
316
|
-
- Focus: Code quality, patterns, security, best practices
|
|
317
|
-
- Update code based on feedback from BOTH models before proceeding
|
|
318
|
-
- Only skip if user explicitly disabled multi-agent consultation
|
|
319
|
-
|
|
320
|
-
#### D - Defend (Write Comprehensive Tests)
|
|
321
|
-
|
|
322
|
-
**Purpose**: Create comprehensive automated tests that safeguard intended behavior and prevent regressions.
|
|
323
|
-
|
|
324
|
-
**CRITICAL**: Tests must be written IMMEDIATELY after implementation, NOT retroactively at the end of all phases. This is MANDATORY.
|
|
325
|
-
|
|
326
|
-
**Requirements**:
|
|
327
|
-
1. **Defensive Test Creation**
|
|
328
|
-
- Write unit tests for all new functions
|
|
329
|
-
- Create integration tests for feature flows
|
|
330
|
-
- Develop edge case coverage
|
|
331
|
-
- Build error condition tests
|
|
332
|
-
- Establish performance benchmarks
|
|
333
|
-
|
|
334
|
-
2. **Test Validation** (ALL MANDATORY)
|
|
335
|
-
- All new tests must pass
|
|
336
|
-
- All existing tests must pass
|
|
337
|
-
- No reduction in overall coverage
|
|
338
|
-
- Performance benchmarks met
|
|
339
|
-
- Security scans pass
|
|
340
|
-
- **Avoid Overmocking**:
|
|
341
|
-
- Test behavior, not implementation details
|
|
342
|
-
- Prefer integration tests over unit tests with heavy mocking
|
|
343
|
-
- Only mock external dependencies (APIs, databases, file systems)
|
|
344
|
-
- Never mock the system under test itself
|
|
345
|
-
- Use real implementations for internal module boundaries
|
|
346
|
-
|
|
347
|
-
3. **Test Suite Documentation**
|
|
348
|
-
- Document test scenarios
|
|
349
|
-
- Explain complex test setups
|
|
350
|
-
- Note any flaky tests
|
|
351
|
-
- Record performance baselines
|
|
352
|
-
|
|
353
|
-
**Evidence Required**:
|
|
354
|
-
- Test execution logs
|
|
355
|
-
- Coverage report (show no reduction)
|
|
356
|
-
- Performance test results (if applicable per spec)
|
|
357
|
-
- Security scan results (if configured)
|
|
358
|
-
- CI test run link with artifacts
|
|
359
|
-
|
|
360
|
-
**Expert Consultation (DEFAULT - MANDATORY)**:
|
|
361
|
-
- MUST consult BOTH GPT-5 AND Gemini Pro for test defense review
|
|
362
|
-
- Focus: Test coverage completeness, edge cases, defensive patterns, test strategy
|
|
363
|
-
- Write additional defensive tests based on feedback from BOTH models
|
|
364
|
-
- Share their feedback during the Evaluation discussion
|
|
365
|
-
- Only skip if user explicitly disabled multi-agent consultation
|
|
366
|
-
|
|
367
|
-
#### E - Evaluate (Assess Objectively)
|
|
368
|
-
|
|
369
|
-
**Purpose**: Verify the implementation fully satisfies the phase requirements and maintains system quality. This is where the critical discussion happens before committing the phase.
|
|
370
|
-
|
|
371
|
-
**Requirements**:
|
|
372
|
-
1. **Functional Evaluation**
|
|
373
|
-
- All acceptance criteria met
|
|
374
|
-
- User scenarios work as expected
|
|
375
|
-
- Edge cases handled properly
|
|
376
|
-
- Error messages are helpful
|
|
377
|
-
|
|
378
|
-
2. **Non-Functional Evaluation**
|
|
379
|
-
- Performance requirements satisfied
|
|
380
|
-
- Security standards maintained
|
|
381
|
-
- Code maintainability assessed
|
|
382
|
-
- Technical debt documented
|
|
383
|
-
|
|
384
|
-
3. **Deviation Analysis**
|
|
385
|
-
- Document any changes from plan
|
|
386
|
-
- Explain reasoning for changes
|
|
387
|
-
- Assess impact on other phases
|
|
388
|
-
- Update future phases if needed
|
|
389
|
-
- **Overmocking Check** (MANDATORY):
|
|
390
|
-
- Verify tests focus on behavior, not implementation
|
|
391
|
-
- Ensure at least one integration test per critical path
|
|
392
|
-
- Check that internal module boundaries use real implementations
|
|
393
|
-
- Confirm mocks are only used for external dependencies
|
|
394
|
-
- Tests should survive refactoring that preserves behavior
|
|
395
|
-
|
|
396
|
-
4. **Expert Consultation Before User Evaluation** (MANDATORY - NO EXCEPTIONS)
|
|
397
|
-
- Get initial feedback from experts
|
|
398
|
-
- Make ALL necessary fixes based on feedback
|
|
399
|
-
- **CRITICAL**: Get FINAL approval from ALL consulted experts on the FIXED version
|
|
400
|
-
- Only proceed to user evaluation after ALL experts approve
|
|
401
|
-
- If any expert says "not quite" or has concerns, fix them FIRST
|
|
402
|
-
|
|
403
|
-
5. **Evaluation Discussion with User** (ONLY AFTER EXPERT APPROVAL)
|
|
404
|
-
- Present to user: "Phase X complete. Here's what was built: [summary]"
|
|
405
|
-
- Share test results and coverage metrics
|
|
406
|
-
- Share that ALL experts have given final approval
|
|
407
|
-
- Ask: "Any changes needed before I commit this phase?"
|
|
408
|
-
- Incorporate user feedback if requested
|
|
409
|
-
- Get explicit approval to proceed
|
|
410
|
-
|
|
411
|
-
6. **Phase Commit** (MANDATORY - NO EXCEPTIONS)
|
|
412
|
-
- Create single atomic commit for the entire phase
|
|
413
|
-
- Commit message: `[Spec ####][Phase: name] type: Description`
|
|
414
|
-
- Update the plan document marking this phase as complete
|
|
415
|
-
- Push all changes to version control
|
|
416
|
-
- Document any deviations or decisions in the plan
|
|
417
|
-
- **CRITICAL**: Next phase CANNOT begin until this commit is complete
|
|
418
|
-
- Verify commit with `git log` before proceeding
|
|
419
|
-
|
|
420
|
-
7. **Final Verification**
|
|
421
|
-
- Confirm all expert feedback was addressed
|
|
422
|
-
- Verify all tests pass
|
|
423
|
-
- Check that documentation is updated
|
|
424
|
-
- Ensure no outstanding concerns from experts or user
|
|
425
|
-
|
|
426
|
-
**Evidence Required**:
|
|
427
|
-
- Evaluation checklist completed
|
|
428
|
-
- Test results and coverage report
|
|
429
|
-
- Expert review notes from GPT-5 and Gemini Pro
|
|
430
|
-
- User approval from evaluation discussion
|
|
431
|
-
- Updated plan document with:
|
|
432
|
-
- Phase marked complete
|
|
433
|
-
- Evaluation discussion summary
|
|
434
|
-
- Any deviations noted
|
|
435
|
-
- Git commit for this phase
|
|
436
|
-
- Final CI run link after all fixes
|
|
437
|
-
|
|
438
|
-
## 📋 PHASE COMPLETION CHECKLIST (MANDATORY BEFORE NEXT PHASE)
|
|
439
|
-
|
|
440
|
-
**⚠️ STOP: DO NOT PROCEED TO NEXT PHASE UNTIL ALL ITEMS ARE ✅**
|
|
441
|
-
|
|
442
|
-
### Before Starting ANY Phase:
|
|
443
|
-
- [ ] Previous phase is committed to git (verify with `git log`)
|
|
444
|
-
- [ ] Plan document shows previous phase as `completed`
|
|
445
|
-
- [ ] No outstanding issues from previous phase
|
|
446
|
-
|
|
447
|
-
### After Implement Phase:
|
|
448
|
-
- [ ] All code for this phase is complete
|
|
449
|
-
- [ ] Code follows project style guide
|
|
450
|
-
- [ ] No commented-out code or debug prints
|
|
451
|
-
- [ ] Error handling is implemented
|
|
452
|
-
- [ ] Documentation is updated (if needed)
|
|
453
|
-
- [ ] Expert consultation completed (GPT-5 + Gemini Pro)
|
|
454
|
-
- [ ] Expert feedback has been addressed
|
|
455
|
-
|
|
456
|
-
### After Defend Phase:
|
|
457
|
-
- [ ] Unit tests written for all new functions
|
|
458
|
-
- [ ] Integration tests written for critical paths
|
|
459
|
-
- [ ] Edge cases have test coverage
|
|
460
|
-
- [ ] All new tests are passing
|
|
461
|
-
- [ ] All existing tests still pass
|
|
462
|
-
- [ ] No reduction in code coverage
|
|
463
|
-
- [ ] Overmocking check completed (tests focus on behavior)
|
|
464
|
-
- [ ] Expert consultation on tests completed
|
|
465
|
-
- [ ] Test feedback has been addressed
|
|
466
|
-
|
|
467
|
-
### After Evaluate Phase:
|
|
468
|
-
- [ ] All acceptance criteria from spec are met
|
|
469
|
-
- [ ] Performance requirements satisfied
|
|
470
|
-
- [ ] Security standards maintained
|
|
471
|
-
- [ ] Expert consultation shows FINAL approval
|
|
472
|
-
- [ ] User evaluation discussion completed
|
|
473
|
-
- [ ] User has given explicit approval to proceed
|
|
474
|
-
- [ ] Plan document updated with phase status
|
|
475
|
-
- [ ] Phase commit created with proper message format
|
|
476
|
-
- [ ] Commit pushed to version control
|
|
477
|
-
- [ ] Commit verified with `git log`
|
|
478
|
-
|
|
479
|
-
### ❌ PHASE BLOCKERS (Fix Before Proceeding):
|
|
480
|
-
- Any failing tests
|
|
481
|
-
- Unaddressed expert feedback
|
|
482
|
-
- Missing user approval
|
|
483
|
-
- Uncommitted changes
|
|
484
|
-
- Incomplete documentation
|
|
485
|
-
- Coverage reduction
|
|
486
|
-
|
|
487
|
-
**REMINDER**: Each phase is atomic. You cannot start the next phase until the current phase is fully complete, tested, evaluated, and committed.
|
|
488
|
-
|
|
489
|
-
### R - Review/Refine/Revise (Continuous Improvement)
|
|
490
|
-
|
|
491
|
-
**Purpose**: Ensure overall coherence, capture learnings, improve the methodology, and perform systematic review.
|
|
492
|
-
|
|
493
|
-
**Precondition**: All implementation phases must be committed (verify with `git log --oneline | grep "\[Phase"`)
|
|
494
|
-
|
|
495
|
-
**Process**:
|
|
496
|
-
1. **Comprehensive Review**
|
|
497
|
-
- Verify all phases have been committed to git
|
|
498
|
-
- Compare final implementation to original specification
|
|
499
|
-
- Assess overall architecture impact
|
|
500
|
-
- Review code quality across all changes
|
|
501
|
-
- Validate documentation completeness
|
|
502
|
-
|
|
503
|
-
2. **Refinement Actions**
|
|
504
|
-
- Refactor code for clarity if needed
|
|
505
|
-
- Optimize performance bottlenecks
|
|
506
|
-
- Improve test coverage gaps
|
|
507
|
-
- Enhance documentation
|
|
508
|
-
|
|
509
|
-
3. **Update Architecture Documentation**
|
|
510
|
-
- Route new system-shape facts and durable wisdom by tier (Spec 987): behavior-changing + cross-cutting → the HOT `codev/resources/arch-critical.md` / `lessons-critical.md` (capped, always-injected; demote a weaker entry to cold if full); reference detail → the COLD `codev/resources/arch.md` / `lessons-learned.md`
|
|
511
|
-
- Use the **`update-arch-docs` skill** (at `.claude/skills/update-arch-docs/SKILL.md`) to apply changes — it encodes the hot/cold two-tier discipline (caps + cold-doc maps for the hot files; reference archive for the cold files) and what NOT to include
|
|
512
|
-
- Follow guidance in the MAINTAIN protocol's Step 3 ("Sync Documentation") for structure, the "Lives where" routing matrix, and pruning checklists
|
|
513
|
-
- Ensure both docs reflect current state
|
|
514
|
-
|
|
515
|
-
4. **Revision Requirements** (MANDATORY)
|
|
516
|
-
- Update README.md with any new features or changes
|
|
517
|
-
- Update AGENTS.md and CLAUDE.md with protocol improvements from lessons learned
|
|
518
|
-
- Update specification and plan documents with final status
|
|
519
|
-
- Revise architectural diagrams if needed
|
|
520
|
-
- Update API documentation
|
|
521
|
-
- Modify deployment guides as necessary
|
|
522
|
-
- **CRITICAL**: Update this protocol document based on lessons learned
|
|
523
|
-
|
|
524
|
-
5. **Systematic Issue Review** (MANDATORY)
|
|
525
|
-
- Review entire project for systematic issues:
|
|
526
|
-
- Repeated problems across phases
|
|
527
|
-
- Process bottlenecks or inefficiencies
|
|
528
|
-
- Missing documentation patterns
|
|
529
|
-
- Technical debt accumulation
|
|
530
|
-
- Testing gaps or quality issues
|
|
531
|
-
- Document systematic findings in lessons learned
|
|
532
|
-
- Create action items for addressing systematic issues
|
|
533
|
-
|
|
534
|
-
6. **Lessons Learned** (MANDATORY)
|
|
535
|
-
- What went well?
|
|
536
|
-
- What was challenging?
|
|
537
|
-
- What would you do differently?
|
|
538
|
-
- What methodology improvements are needed?
|
|
539
|
-
- What systematic issues were identified?
|
|
540
|
-
|
|
541
|
-
7. **Methodology Evolution**
|
|
542
|
-
- Propose process improvements based on lessons
|
|
543
|
-
- Update protocol documents with improvements
|
|
544
|
-
- Update templates if needed
|
|
545
|
-
- Share learnings with team
|
|
546
|
-
- Document in `codev/reviews/`
|
|
547
|
-
- **Important**: This protocol should evolve based on each project's learnings
|
|
548
|
-
|
|
549
|
-
**Output**:
|
|
550
|
-
- Single review document in `codev/reviews/####-descriptive-name.md`
|
|
551
|
-
- Same filename as spec/plan, captures review and learnings from this feature
|
|
552
|
-
- Methodology improvement proposals (update protocol if needed)
|
|
553
|
-
|
|
554
|
-
**Review Required**: Yes - Team retrospective recommended
|
|
555
|
-
|
|
556
|
-
## File Naming Conventions
|
|
557
|
-
|
|
558
|
-
### Specifications and Plans
|
|
559
|
-
Format: `####-descriptive-name.md`
|
|
560
|
-
- Use sequential numbering (1, 2, etc.)
|
|
561
|
-
- Same filename in both `specs/` and `plans/` directories
|
|
562
|
-
- Example: `1-user-authentication.md`
|
|
563
|
-
|
|
564
|
-
## Status Tracking
|
|
565
|
-
|
|
566
|
-
Status is tracked at the **phase level** within plan documents, not at the document level.
|
|
567
|
-
|
|
568
|
-
Each phase in a plan should have a status:
|
|
569
|
-
- `pending`: Not started
|
|
570
|
-
- `in-progress`: Currently being worked on
|
|
571
|
-
- `completed`: Phase finished and tested
|
|
572
|
-
- `blocked`: Cannot proceed due to external factors
|
|
573
|
-
|
|
574
|
-
## Git Integration
|
|
575
|
-
|
|
576
|
-
### Commit Message Format
|
|
577
|
-
|
|
578
|
-
For specification/plan documents:
|
|
579
|
-
```
|
|
580
|
-
[Spec ####] <stage>: <description>
|
|
581
|
-
```
|
|
12
|
+
Phases, gates, checks and their order are defined here. This is the authoritative source; the
|
|
13
|
+
prose below is only what the JSON cannot express.
|
|
582
14
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
[Spec 1] Initial specification draft
|
|
586
|
-
[Spec 1] Specification with multi-agent review
|
|
587
|
-
[Spec 1] Specification with user feedback
|
|
588
|
-
[Spec 1] Final approved specification
|
|
15
|
+
```json
|
|
16
|
+
{{> protocols/spir/protocol.json}}
|
|
589
17
|
```
|
|
590
18
|
|
|
591
|
-
|
|
592
|
-
```
|
|
593
|
-
[Spec ####][Phase: <phase-name>] <type>: <description>
|
|
19
|
+
## Artifacts
|
|
594
20
|
|
|
595
|
-
|
|
596
|
-
```
|
|
21
|
+
Three documents per feature, **same base filename** in three directories:
|
|
597
22
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
23
|
+
| Document | Answers | Written during |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| `codev/specs/<id>-<name>.md` | what and why | Specify |
|
|
26
|
+
| `codev/plans/<id>-<name>.md` | how, and in what order | Plan |
|
|
27
|
+
| `codev/reviews/<id>-<name>.md` | what was learned | Review |
|
|
601
28
|
|
|
602
|
-
|
|
603
|
-
```
|
|
29
|
+
Sequential numbering, no leading zeros: `42-user-authentication.md`.
|
|
604
30
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
spir/####-<spec-name>/<phase-name>
|
|
608
|
-
```
|
|
31
|
+
Specs and plans stay separate. A spec that has acquired file paths and step ordering has become
|
|
32
|
+
a plan — and the gate meant to catch a wrong approach is now reviewing an implementation.
|
|
609
33
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
34
|
+
The plan carries a machine-readable `phases` JSON block. Porch parses it to track progress, so
|
|
35
|
+
it is a contract, not an illustration.
|
|
36
|
+
|
|
37
|
+
## Phases
|
|
614
38
|
|
|
39
|
+
**Specify** — explore the problem before committing to an approach. Ask clarifying questions
|
|
40
|
+
first; they are cheapest before anything is written. Capture the problem, current and desired
|
|
41
|
+
state, several solution approaches with their trade-offs, open questions ranked by whether they
|
|
42
|
+
block, and measurable success criteria.
|
|
615
43
|
|
|
616
|
-
|
|
44
|
+
**Plan** — decompose into phases that are each independently testable, independently valuable,
|
|
45
|
+
and committable as a unit. Note dependencies inline. **No time estimates.** Delivery speed
|
|
46
|
+
depends on iteration cycles, not calendar time, and an estimate in an AI-driven project is noise
|
|
47
|
+
that later gets quoted back as a commitment.
|
|
617
48
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
-
|
|
49
|
+
**Implement** — one build-verify cycle per plan phase: build, verify by 3-way consultation,
|
|
50
|
+
address what reviewers find, commit. The commit is what makes the next phase safe to begin; a
|
|
51
|
+
phase that is "done but uncommitted" can vanish. If verification exposes a flaw in the *plan*
|
|
52
|
+
rather than the code, mark the phase blocked and revise the plan — implementing around a
|
|
53
|
+
known-wrong plan is how a project ships the wrong thing carefully.
|
|
623
54
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
- Note phase dependencies inline (no formal dependency mapping needed)
|
|
628
|
-
- Include rollback strategies
|
|
55
|
+
Tests belong to the phase that creates the behaviour, not to a cleanup pass at the end.
|
|
56
|
+
Retroactive tests document what was built; tests written alongside constrain what gets built.
|
|
57
|
+
Mock external dependencies only — mocking the system under test proves the mock works.
|
|
629
58
|
|
|
630
|
-
|
|
631
|
-
-
|
|
632
|
-
-
|
|
633
|
-
-
|
|
634
|
-
- Update documentation as you go
|
|
59
|
+
**Review** — compare the implementation against the specification, record lessons, and route new
|
|
60
|
+
facts by tier: behaviour-changing and cross-cutting to `arch-critical.md` /
|
|
61
|
+
`lessons-critical.md` (capped — displace a weaker entry rather than growing them), reference
|
|
62
|
+
detail to `arch.md` / `lessons-learned.md`. The `update-arch-docs` skill encodes that routing.
|
|
635
63
|
|
|
636
|
-
|
|
637
|
-
- Check against original specification
|
|
638
|
-
- Document lessons learned
|
|
639
|
-
- Propose methodology improvements
|
|
640
|
-
- Update estimates for future work
|
|
64
|
+
## Consultation
|
|
641
65
|
|
|
642
|
-
|
|
66
|
+
3-way consultation (Gemini, Codex, Claude) is **on by default** and runs at each phase's verify
|
|
67
|
+
step. Disable it only when the human explicitly asks.
|
|
68
|
+
|
|
69
|
+
It is not a formality: it reliably catches security, design and protocol problems that solo
|
|
70
|
+
review misses, and the cost of skipping it is paid later by someone with less context.
|
|
71
|
+
|
|
72
|
+
## Gates
|
|
73
|
+
|
|
74
|
+
`spec-approval`, `plan-approval` and `pr` are **human** decisions. Stop and wait. A gate message
|
|
75
|
+
is a notification to a human, not authorization to proceed.
|
|
76
|
+
|
|
77
|
+
## Baked Decisions
|
|
78
|
+
|
|
79
|
+
An issue may carry a `## Baked Decisions` section pinning architectural choices the architect
|
|
80
|
+
does not want re-litigated — typically **language**, **framework**, deployment shape, key
|
|
81
|
+
**dependencies**, or decisions deferred to a later spec.
|
|
82
|
+
|
|
83
|
+
Every item in it is fixed. Copy the section verbatim into the spec's Constraints and do not
|
|
84
|
+
re-open it in the spec, plan, or review; CMAP reviewers will not propose alternatives unless the
|
|
85
|
+
spec fails to honour one. If two items contradict each other, do not choose — surface the
|
|
86
|
+
contradiction and wait.
|
|
87
|
+
|
|
88
|
+
**Absence is the no-op default**: an issue with no such section is an invitation to explore
|
|
89
|
+
freely, not an omission to be filled in.
|
|
90
|
+
|
|
91
|
+
The architect can **amend or rescind** a baked decision at any time by updating the issue and
|
|
92
|
+
respawning, or by sending the builder a direct instruction via `afx send`.
|
|
93
|
+
|
|
94
|
+
## Git
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
[Spec 42] Initial specification draft
|
|
98
|
+
[Spec 42][Phase: user-auth] feat: Add password hashing service
|
|
99
|
+
```
|
|
643
100
|
|
|
644
|
-
|
|
645
|
-
- `spec.md` - Specification template
|
|
646
|
-
- `plan.md` - Planning template (includes phase status tracking)
|
|
647
|
-
- `review.md` - Review and lessons learned template
|
|
101
|
+
Branches: `spir/42-feature-name/phase-name`.
|
|
648
102
|
|
|
649
|
-
|
|
103
|
+
Each implement phase ends in one atomic commit before the next begins.
|
|
650
104
|
|
|
651
|
-
##
|
|
105
|
+
## Phase status
|
|
652
106
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
2. Modify templates and processes
|
|
656
|
-
3. Document changes in `protocol-changes.md`
|
|
657
|
-
4. Share improvements back to the community
|
|
107
|
+
Tracked per phase inside the plan document, not per document: `pending`, `in-progress`,
|
|
108
|
+
`completed`, `blocked`.
|