@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,42 +1,28 @@
|
|
|
1
1
|
# Implementation Review Prompt
|
|
2
2
|
|
|
3
3
|
## Context
|
|
4
|
-
You are reviewing implementation work during the Implement phase. A builder has completed a plan phase and needs feedback before proceeding. Your job is to verify the implementation matches the spec and plan.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
You are reviewing implementation work during the Implement phase. A builder has completed a plan phase and needs feedback before proceeding. Verify the implementation matches the spec and plan.
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
1. **Check `package.json`** for actual dependency versions — framework conventions change between major versions
|
|
10
|
-
2. **Read the actual config files** (or confirm their deliberate absence) before flagging missing configs
|
|
11
|
-
3. **Do not assume** your training data reflects the version in use — verify against project files
|
|
12
|
-
4. If "Previous Iteration Context" is provided, read it carefully before re-raising concerns that were already disputed
|
|
7
|
+
## Verify before flagging
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
1. **Spec Adherence**
|
|
17
|
-
- Does the implementation fulfill the spec requirements for this phase?
|
|
18
|
-
- Are acceptance criteria met?
|
|
19
|
-
|
|
20
|
-
2. **Code Quality**
|
|
21
|
-
- Is the code readable and maintainable?
|
|
22
|
-
- Are there obvious bugs or issues?
|
|
23
|
-
- Are error cases handled appropriately?
|
|
9
|
+
Before requesting changes for missing configuration, wrong patterns, or framework issues, confirm the claim against the project rather than your training data:
|
|
24
10
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
11
|
+
- Check `package.json` for the actual dependency versions — framework conventions change between major versions.
|
|
12
|
+
- Read the actual config files (or confirm their deliberate absence) before flagging a missing config.
|
|
13
|
+
- If "Previous Iteration Context" is provided, read it before re-raising concerns already disputed.
|
|
28
14
|
|
|
29
|
-
|
|
30
|
-
- Does the implementation follow the plan?
|
|
31
|
-
- Are there plan items skipped or partially completed?
|
|
15
|
+
## Focus Areas
|
|
32
16
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
17
|
+
- **Spec Adherence** — the implementation fulfills the spec requirements for this phase; acceptance criteria are met.
|
|
18
|
+
- **Code Quality** — readable and maintainable; no obvious bugs; error cases handled.
|
|
19
|
+
- **Test Coverage** — tests are adequate for this phase and cover main paths and edge cases.
|
|
20
|
+
- **Plan Alignment** — the implementation follows the plan; no plan items silently skipped.
|
|
21
|
+
- **UX Verification** (if the spec has UX requirements) — the actual behavior matches what the spec describes (e.g. "async"/"non-blocking" really is).
|
|
36
22
|
|
|
37
23
|
## Verdict Format
|
|
38
24
|
|
|
39
|
-
|
|
25
|
+
Provide your verdict in exactly this format — `consult` parses it:
|
|
40
26
|
|
|
41
27
|
```
|
|
42
28
|
---
|
|
@@ -50,23 +36,10 @@ KEY_ISSUES:
|
|
|
50
36
|
...
|
|
51
37
|
```
|
|
52
38
|
|
|
53
|
-
|
|
54
|
-
- `
|
|
55
|
-
- `
|
|
56
|
-
- `COMMENT`: Minor suggestions, can proceed but note feedback
|
|
39
|
+
- `APPROVE`: phase is complete, builder can proceed.
|
|
40
|
+
- `REQUEST_CHANGES`: issues that must be fixed before proceeding.
|
|
41
|
+
- `COMMENT`: minor suggestions; can proceed but note the feedback.
|
|
57
42
|
|
|
58
43
|
## Scoping (Multi-Phase Plans)
|
|
59
44
|
|
|
60
|
-
|
|
61
|
-
- **ONLY review work belonging to the current plan phase**
|
|
62
|
-
- The query will specify which phase you are reviewing
|
|
63
|
-
- Do NOT request changes for functionality scheduled in later phases
|
|
64
|
-
- Do NOT flag missing features that are out of scope for this phase
|
|
65
|
-
- If unsure whether something belongs to this phase, check the plan file
|
|
66
|
-
|
|
67
|
-
## Notes
|
|
68
|
-
|
|
69
|
-
- This is a phase-level review, not the final PR review
|
|
70
|
-
- Focus on "does this phase work" not "is the whole feature done"
|
|
71
|
-
- If referencing line numbers, use `file:line` format
|
|
72
|
-
- The builder needs actionable feedback to continue
|
|
45
|
+
Review **only the current plan phase** — the query names which one. Do not request changes for functionality scheduled in later phases, and do not flag missing features that are out of scope for this phase. If unsure whether something belongs to this phase, check the plan file. This is a phase-level review ("does this phase work"), not the final PR review.
|
|
@@ -1,44 +1,24 @@
|
|
|
1
1
|
# PR Ready Review Prompt
|
|
2
2
|
|
|
3
3
|
## Context
|
|
4
|
-
You are performing a final self-check during the Review phase. The builder has completed all implementation phases and is about to create a PR. This is the last check before the work goes to the architect for integration review.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
1. **Completeness**
|
|
9
|
-
- Are all spec requirements implemented?
|
|
10
|
-
- Are all plan phases complete?
|
|
11
|
-
- Is the review document written (`codev/reviews/XXXX-name.md`)?
|
|
12
|
-
- Are all commits properly formatted (`[Spec XXXX][Phase]`)?
|
|
13
|
-
|
|
14
|
-
2. **Test Status**
|
|
15
|
-
- Do all tests pass?
|
|
16
|
-
- Is test coverage adequate for the changes?
|
|
17
|
-
- Are there any skipped or flaky tests?
|
|
5
|
+
You are performing the final self-check during the Review phase — the builder has completed all implementation phases and is about to open the PR. This is the last check before the work goes to the architect for integration review.
|
|
18
6
|
|
|
19
|
-
|
|
20
|
-
- Is there any debug code left in?
|
|
21
|
-
- Are there any TODO comments that should be resolved?
|
|
22
|
-
- Are there any `// REVIEW:` comments that weren't addressed?
|
|
23
|
-
- Is the code properly formatted?
|
|
24
|
-
|
|
25
|
-
4. **Documentation**
|
|
26
|
-
- Are inline comments clear where needed?
|
|
27
|
-
- Is the review document comprehensive?
|
|
28
|
-
- Are any new APIs documented?
|
|
7
|
+
## Focus Areas
|
|
29
8
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
9
|
+
- **Completeness** — all spec requirements implemented, all plan phases complete, the review document written (`codev/reviews/XXXX-name.md`), and commits in the `[Spec XXXX][Phase]` format.
|
|
10
|
+
- **Test Status** — all tests pass, coverage is adequate for the changes, and any skipped/flaky tests are accounted for.
|
|
11
|
+
- **Code Cleanliness** — no debug code, no stray `TODO` / `// REVIEW:` left unaddressed, code properly formatted.
|
|
12
|
+
- **Documentation** — inline comments clear where needed, the review document comprehensive, new APIs documented.
|
|
13
|
+
- **PR Readiness** — the branch is up to date with its base (the integration branch the PR targets), commits are atomic and well-described, and the diff size is reasonable.
|
|
34
14
|
|
|
35
15
|
## Scope
|
|
36
16
|
|
|
37
|
-
|
|
17
|
+
Do not flag the syntax of `git diff` examples that appear in review-file prose (e.g. `git diff ci..HEAD` inside a "Files Changed" caption or "How to Test Locally" section) — quoted diff syntax is documentation, not a command. Apply two-dot/three-dot scrutiny only to diffs you compute yourself.
|
|
38
18
|
|
|
39
19
|
## Verdict Format
|
|
40
20
|
|
|
41
|
-
|
|
21
|
+
Provide your verdict in exactly this format — `consult` parses it:
|
|
42
22
|
|
|
43
23
|
```
|
|
44
24
|
---
|
|
@@ -63,14 +43,8 @@ PR_SUMMARY: |
|
|
|
63
43
|
- [How to test]
|
|
64
44
|
```
|
|
65
45
|
|
|
66
|
-
|
|
67
|
-
- `
|
|
68
|
-
- `
|
|
69
|
-
- `COMMENT`: Minor items, can create PR but note feedback
|
|
70
|
-
|
|
71
|
-
## Notes
|
|
46
|
+
- `APPROVE`: ready to create the PR.
|
|
47
|
+
- `REQUEST_CHANGES`: issues to fix before PR creation.
|
|
48
|
+
- `COMMENT`: minor items; can create the PR but note the feedback.
|
|
72
49
|
|
|
73
|
-
|
|
74
|
-
- The PR_SUMMARY in your output can be used as the PR description
|
|
75
|
-
- Focus on "is this ready for someone else to review" not "is this perfect"
|
|
76
|
-
- Any issues found here are cheaper to fix than during integration review
|
|
50
|
+
The `PR_SUMMARY` block can be used directly as the PR description.
|
|
@@ -47,7 +47,7 @@ For each audit finding:
|
|
|
47
47
|
3. Build and test: `cd packages/codev && pnpm build && pnpm test`
|
|
48
48
|
4. Commit: `git add <specific-files> && git commit -m "[Maintain] Remove unused X"`
|
|
49
49
|
|
|
50
|
-
One removal at a time
|
|
50
|
+
One removal at a time, verified after each — staging only the specific files that removal touched.
|
|
51
51
|
|
|
52
52
|
## Step 4: Sync Documentation
|
|
53
53
|
|
|
@@ -1,284 +1,50 @@
|
|
|
1
1
|
# MAINTAIN Protocol
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Audit → Clean → Sync, in a single pass, then a PR. Two phases, one consultation during the
|
|
4
|
+
maintain phase and one before the PR.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Use it for dead code and unused dependencies, quarterly hygiene, pre-release cleanup, and
|
|
7
|
+
keeping the governance docs honest — `arch.md`/`arch-critical.md`,
|
|
8
|
+
`lessons-learned.md`/`lessons-critical.md`, and the `CLAUDE.md`↔`AGENTS.md` twins.
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
## The state machine
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- `codev/resources/lessons-learned.md` (COLD reference) + `codev/resources/lessons-critical.md` (HOT, always-injected) — Engineering wisdom, two tiers
|
|
12
|
-
|
|
13
|
-
The two governance docs are siblings with **different purposes**: `arch.md` owns system shape (services, transports, mental models, verified-wrong assumptions about *this* system); `lessons-learned.md` owns durable engineering wisdom that applies *across* specs. Use the routing matrix below to decide where each fact belongs.
|
|
14
|
-
|
|
15
|
-
### Lives where: routing facts to the right home
|
|
16
|
-
|
|
17
|
-
| Type of fact/insight | Lives in |
|
|
18
|
-
|---|---|
|
|
19
|
-
| Current system shape (services, transports, key mental models) | `codev/resources/arch.md` |
|
|
20
|
-
| Mechanism for a unique subsystem | `codev/resources/arch.md` (subsystem section) OR a meta-spec under `codev/architecture/<domain>.md` if the mechanism is large enough to warrant its own doc |
|
|
21
|
-
| A durable engineering pattern that applies across multiple specs | `codev/resources/lessons-learned.md` (COLD reference) |
|
|
22
|
-
| A **behavior-changing, cross-cutting** rule (should change how the next project is built) | `codev/resources/lessons-critical.md` (HOT, capped) — demote to `lessons-learned.md` if full |
|
|
23
|
-
| A **behavior-changing, cross-cutting** architecture invariant (a future builder must know up front) | `codev/resources/arch-critical.md` (HOT, capped) — demote to `arch.md` if full |
|
|
24
|
-
| A spec-narrow fix recipe (reference detail) | `codev/resources/lessons-learned.md` (COLD) — kept as reference; **never** the hot file |
|
|
25
|
-
| A system-shape surprise verified-wrong in production ("looks like X but isn't") | `codev/resources/arch.md` § "Verified-Wrong Assumptions" |
|
|
26
|
-
| Aspirational architectural direction (where we want to go) | The relevant meta-spec or roadmap doc, NOT `arch.md` body |
|
|
27
|
-
| A changelog entry ("we shipped X in spec Y on date Z") | `git log` + the spec/review document — NOT `arch.md`, NOT `lessons-learned.md` |
|
|
28
|
-
| A retired or removed component | Delete the section entirely; do NOT keep a "retired components" graveyard. (`git log` retains history.) |
|
|
29
|
-
|
|
30
|
-
The most commonly-misrouted entry is the system-shape surprise. If a future reader needs to know "the system *looks* like X but actually does Y," that is system shape and lives in `arch.md`. If they need to know "we learned that doing X is generally a bad idea," that is engineering wisdom and lives in `lessons-learned.md`.
|
|
31
|
-
|
|
32
|
-
## When to Use
|
|
33
|
-
|
|
34
|
-
- Before a release (clean slate for shipping)
|
|
35
|
-
- After completing a major feature
|
|
36
|
-
- Quarterly maintenance window
|
|
37
|
-
- When the codebase feels "crusty"
|
|
38
|
-
|
|
39
|
-
## Execution Model
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
afx spawn --protocol maintain
|
|
43
|
-
↓
|
|
44
|
-
1. MAINTAIN: Audit → Clean → Sync docs (single pass)
|
|
45
|
-
↓ (build + test checks, 3-way review)
|
|
46
|
-
2. REVIEW: Create PR
|
|
47
|
-
↓ (3-way review)
|
|
48
|
-
Architect reviews → Merge
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Two phases total. One consultation during the maintain phase, one before PR.
|
|
52
|
-
|
|
53
|
-
## Prerequisites
|
|
54
|
-
|
|
55
|
-
Before starting:
|
|
56
|
-
1. Check `codev/maintain/` for the last run number
|
|
57
|
-
2. Note the base commit: `git log --oneline -1` on the last run file
|
|
58
|
-
3. Focus on changes since then: `git log --oneline <base-commit>..HEAD`
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## The Maintain Phase (Single Pass)
|
|
63
|
-
|
|
64
|
-
The builder works through these tasks in order, committing as they go.
|
|
65
|
-
|
|
66
|
-
### Step 1: Audit
|
|
67
|
-
|
|
68
|
-
Identify what needs fixing. Don't fix yet — just catalog.
|
|
69
|
-
|
|
70
|
-
**Dead code**:
|
|
71
|
-
```bash
|
|
72
|
-
# Find unused exports (TypeScript)
|
|
73
|
-
npx ts-prune 2>/dev/null || echo "ts-prune not available"
|
|
74
|
-
|
|
75
|
-
# Find unused dependencies
|
|
76
|
-
npx depcheck 2>/dev/null || echo "depcheck not available"
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**Stale documentation**:
|
|
80
|
-
```bash
|
|
81
|
-
# What changed since last maintenance?
|
|
82
|
-
git log --oneline <base-commit>..HEAD
|
|
83
|
-
|
|
84
|
-
# Check arch.md references still exist
|
|
85
|
-
grep -oE '[a-zA-Z]+/[a-zA-Z/]+\.[a-z]+' codev/resources/arch.md | sort -u | while read f; do
|
|
86
|
-
[ -e "$f" ] || echo "Missing: $f"
|
|
87
|
-
done
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**Stale project tracking**:
|
|
91
|
-
- GitHub Issues that should be closed
|
|
92
|
-
- Labels that need updating
|
|
93
|
-
|
|
94
|
-
Record findings in the maintenance run file (`codev/maintain/NNNN.md`).
|
|
95
|
-
|
|
96
|
-
### Step 2: Clean
|
|
97
|
-
|
|
98
|
-
For each finding from the audit:
|
|
99
|
-
1. Verify it's truly unused (grep the codebase)
|
|
100
|
-
2. Remove it (use `git rm` for tracked files)
|
|
101
|
-
3. Verify build + tests still pass
|
|
102
|
-
4. Commit with `[Maintain] Remove unused X`
|
|
103
|
-
|
|
104
|
-
**Rules**:
|
|
105
|
-
- One removal at a time — don't batch unrelated changes
|
|
106
|
-
- Verify after each removal — build must pass
|
|
107
|
-
- Use soft deletion for untracked files: `mv file codev/maintain/.trash/$(date +%Y-%m-%d)/`
|
|
108
|
-
- Never use `git add -A` or `git add .`
|
|
109
|
-
|
|
110
|
-
### Step 3: Sync Documentation
|
|
111
|
-
|
|
112
|
-
Step 3 is split into two sub-steps: **Audit first, then update.** This split exists because `arch.md` and `lessons-learned.md` accumulate without bound when MAINTAIN does only "what's new" — the audit pass surfaces what should be cut so the update pass is not purely additive.
|
|
113
|
-
|
|
114
|
-
The `update-arch-docs` skill (at `.claude/skills/update-arch-docs/SKILL.md`) is invoked by both sub-steps. Read it before starting Step 3 so the discipline is fresh.
|
|
115
|
-
|
|
116
|
-
#### Step 3a: Audit documentation
|
|
117
|
-
|
|
118
|
-
Invoke the `update-arch-docs` skill in **audit-mode**. The skill reads all four governance files — `codev/resources/arch.md` / `arch-critical.md` and `codev/resources/lessons-learned.md` / `lessons-critical.md` — end-to-end against the discipline below, applies the cuts via the Edit tool, and records each cut's reason in the run file (`codev/maintain/NNNN.md`) under a `## Audit Findings` section. The diff plus the recorded reasons **is** the proposal; the architect's PR review is the human-confirmation step (consistent with the skill's audit-mode).
|
|
119
|
-
|
|
120
|
-
**Per-arch.md-section pruning checklist** — for each section in `arch.md`, ask:
|
|
121
|
-
- Does it describe **current state**? If aspirational, the section moves to a meta-spec; `arch.md` keeps a 1-paragraph summary + pointer (or nothing, if the meta-spec stands on its own).
|
|
122
|
-
- Does it duplicate a meta-spec? If yes, replace with a 1-paragraph summary + pointer.
|
|
123
|
-
- Is it a per-file enumeration that's gone stale? If yes, prune to the directory shape + a few key files.
|
|
124
|
-
- Is it a changelog/narrative section ("Spec 0042 added X")? If yes, absorb the architecturally-relevant facts and remove the spec-numbered framing.
|
|
125
|
-
- Is the component still alive? If retired, delete the section entirely.
|
|
126
|
-
|
|
127
|
-
**Per-COLD-`lessons-learned.md`-entry pruning checklist** — for each entry, ask:
|
|
128
|
-
- Is it terse (1–3 sentences)? If multi-paragraph, split or compress.
|
|
129
|
-
- Is the topic section the right home? If filed under "Architecture (continued)" or a spec-numbered section, move it to the right topical home.
|
|
130
|
-
- Is it a duplicate of an adjacent entry? If yes, fold them.
|
|
131
|
-
- (Spec-narrow recipes are **kept** as reference — do not cut them just for being spec-narrow. Anti-accretion now lives in the hot cap, not the cold archive.)
|
|
132
|
-
|
|
133
|
-
**Per-HOT-file checklist** (`arch-critical.md`, `lessons-critical.md`) — audit the cap and map:
|
|
134
|
-
- Within the cap (≈10 entries + a ≈12-topic map, ≤35 lines)? If over, **demote** the weakest entries into the cold doc.
|
|
135
|
-
- Does every map topic name a real top-level cold-doc section, and is any new/renamed section reflected? Fix drift; keep the map top-level only.
|
|
136
|
-
- Is every entry still behavior-changing? Demote reference detail into the cold archive.
|
|
137
|
-
|
|
138
|
-
**Sample audit prompt** (paste into the skill invocation if you want a baseline checklist run):
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
Audit all four governance files — codev/resources/arch.md + arch-critical.md and
|
|
142
|
-
lessons-learned.md + lessons-critical.md — against the discipline in the
|
|
143
|
-
update-arch-docs skill. For each cold section/entry run the cold pruning checklists,
|
|
144
|
-
and for each hot file check the cap, displacement, and map accuracy (Step 3a).
|
|
145
|
-
Apply the cuts with one-line reasons. Bias toward fewer, higher-confidence
|
|
146
|
-
cuts ("when in doubt, KEEP"). Record each cut's reason in the current run
|
|
147
|
-
file's ## Audit Findings section as you go — the diff plus those reasons is the proposal.
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
**When in doubt, KEEP.** This rule is preserved from the older Step 3. A confident cut is better than three speculative ones. The audit pass is a *proposal*; the architect's PR review confirms it.
|
|
151
|
-
|
|
152
|
-
#### Step 3b: Update documentation
|
|
153
|
-
|
|
154
|
-
Apply the audit decisions from Step 3a, plus any additive content needed.
|
|
155
|
-
|
|
156
|
-
**arch.md / arch-critical.md**: Compare documented structure with actual codebase. Route behavior-changing invariants to `arch-critical.md` (HOT — respect the cap + keep its map accurate); reference detail to `arch.md` (COLD). Update:
|
|
157
|
-
- Directory structure
|
|
158
|
-
- Component descriptions (explain HOW things work, not just WHAT)
|
|
159
|
-
- Key files and their purposes
|
|
160
|
-
- Remove references to deleted code (per Step 3a audit findings)
|
|
161
|
-
- Add new components/utilities
|
|
162
|
-
|
|
163
|
-
**lessons-learned.md / lessons-critical.md**: Scan `codev/reviews/` for new reviews since last run. **Route** each new lesson by tier — behavior-changing + cross-cutting → `lessons-critical.md` (HOT; respect the cap, demote a weaker entry to cold if full); reference recipe / spec-narrow → `lessons-learned.md` (COLD). Apply Step 3a's per-entry cuts and keep each hot file's cold-doc map accurate.
|
|
164
|
-
|
|
165
|
-
For specific additive changes, invoke `update-arch-docs` in **diff-mode** — it applies the smallest section update needed.
|
|
166
|
-
|
|
167
|
-
**CLAUDE.md / AGENTS.md**: Diff the two files. They must be identical. Update the stale one.
|
|
168
|
-
|
|
169
|
-
**Documentation pruning**:
|
|
170
|
-
- Remove obsolete references
|
|
171
|
-
- ~400 line guideline for CLAUDE.md/README.md (not a hard limit)
|
|
172
|
-
- Document every deletion with justification (OBSOLETE, DUPLICATIVE, MOVED, VERBOSE)
|
|
173
|
-
- When in doubt, KEEP the content
|
|
174
|
-
|
|
175
|
-
### Step 4: Final Checks
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
# Build and test from the package directory
|
|
179
|
-
cd packages/codev && pnpm build && pnpm test
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Both must pass before moving to the review phase.
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
|
-
## Maintenance Run File
|
|
187
|
-
|
|
188
|
-
Each run creates `codev/maintain/NNNN.md`:
|
|
189
|
-
|
|
190
|
-
```markdown
|
|
191
|
-
# Maintenance Run NNNN
|
|
192
|
-
|
|
193
|
-
**Date**: YYYY-MM-DD
|
|
194
|
-
**Base Commit**: <hash>
|
|
195
|
-
**PR**: #NNN
|
|
196
|
-
|
|
197
|
-
## Changes Since Last Run
|
|
198
|
-
|
|
199
|
-
<key commits summary>
|
|
200
|
-
|
|
201
|
-
## Audit Findings
|
|
202
|
-
|
|
203
|
-
Recorded by Step 3a (Audit documentation) as the cuts are applied — one line per cut, with its reason. The diff plus these reasons is the proposal; the architect's PR review is the gate.
|
|
204
|
-
|
|
205
|
-
### arch.md (cold) / arch-critical.md (hot)
|
|
206
|
-
- <section or hot entry>: <reason for cut / compression / demotion>
|
|
207
|
-
|
|
208
|
-
### lessons-learned.md (cold) / lessons-critical.md (hot)
|
|
209
|
-
- <entry>: <reason; note hot→cold demotions and any cold-doc-map fixes>
|
|
210
|
-
|
|
211
|
-
## What Was Done
|
|
212
|
-
|
|
213
|
-
### Dead Code Removed
|
|
214
|
-
- `path/to/file.ts`: `unusedFunction()` — not imported anywhere
|
|
215
|
-
- Removed `some-package` dependency — zero imports
|
|
216
|
-
|
|
217
|
-
### Documentation Updated
|
|
218
|
-
- arch.md / arch-critical.md: Added VS Code extension section + removed old dashboard-server refs (cold); routed 1 invariant to the hot tier, demoted 1 stale entry to cold
|
|
219
|
-
- lessons-learned.md / lessons-critical.md: Extracted 3 lessons from reviews 653, 672 (cold); promoted 1 behavior-changer to the hot tier, refreshed its cold-doc map
|
|
220
|
-
|
|
221
|
-
### Documentation Changes Log
|
|
222
|
-
| Document | Section | Action | Reason |
|
|
223
|
-
|----------|---------|--------|--------|
|
|
224
|
-
| arch.md | "Dashboard Server" | DELETED | OBSOLETE — replaced by Tower |
|
|
225
|
-
|
|
226
|
-
## Deferred
|
|
227
|
-
|
|
228
|
-
- Items found but not worth fixing now
|
|
229
|
-
|
|
230
|
-
## Summary
|
|
231
|
-
|
|
232
|
-
<2-3 sentences>
|
|
12
|
+
```json
|
|
13
|
+
{{> protocols/maintain/protocol.json}}
|
|
233
14
|
```
|
|
234
15
|
|
|
235
|
-
|
|
16
|
+
## Before starting
|
|
236
17
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
```
|
|
242
|
-
[Maintain] Remove 5 unused exports
|
|
243
|
-
[Maintain] Remove http-proxy dependency
|
|
244
|
-
[Maintain] Update arch.md — add VS Code extension, remove dashboard-server refs
|
|
245
|
-
[Maintain] Generate lessons-learned.md from reviews 653, 672
|
|
246
|
-
[Maintain] Sync CLAUDE.md with AGENTS.md
|
|
247
|
-
```
|
|
18
|
+
Find the last run in `codev/maintain/`, note its base commit, and scope the audit to
|
|
19
|
+
`git log --oneline <base>..HEAD`. Maintenance without a since-marker re-audits the whole
|
|
20
|
+
repository every time and quietly stops being run.
|
|
248
21
|
|
|
249
|
-
|
|
22
|
+
## The maintain phase
|
|
250
23
|
|
|
251
|
-
|
|
24
|
+
**Audit** — find unused exports, unused dependencies, and orphaned files. Treat every hit as a
|
|
25
|
+
*candidate*, not a verdict: a detector cannot tell "vestigial" from "used by a path you did not
|
|
26
|
+
search". Confirm each with a targeted grep before removing it.
|
|
252
27
|
|
|
253
|
-
|
|
28
|
+
**Clean** — remove what you confirmed. Deletions go to `codev/maintain/.trash/` (gitignored,
|
|
29
|
+
30-day retention) rather than straight out, so a wrong call is recoverable for a month rather
|
|
30
|
+
than needing an archaeology session.
|
|
254
31
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
| Consultation | Yes — 3-way review before PR |
|
|
32
|
+
**Sync documentation** — route facts by tier rather than appending: behaviour-changing and
|
|
33
|
+
cross-cutting go to the capped hot files (displace a weaker entry rather than growing them),
|
|
34
|
+
reference detail to the cold archives. The `update-arch-docs` skill encodes the routing matrix,
|
|
35
|
+
the caps, and what does *not* belong in each tier. Keep `CLAUDE.md` and `AGENTS.md`
|
|
36
|
+
byte-identical.
|
|
261
37
|
|
|
262
|
-
|
|
38
|
+
## The maintenance run file
|
|
263
39
|
|
|
264
|
-
|
|
40
|
+
Each run is recorded in `codev/maintain/` using this structure:
|
|
265
41
|
|
|
266
|
-
|
|
42
|
+
{{> protocols/maintain/templates/maintenance-run.md}}
|
|
267
43
|
|
|
268
|
-
|
|
269
|
-
2. **Check git blame** — understand why code/docs exist before removing
|
|
270
|
-
3. **Run full test suite** — not just affected tests
|
|
271
|
-
4. **Group related changes** — one commit per logical change
|
|
272
|
-
5. **Document every deletion** — what, why, and where (if moved)
|
|
273
|
-
6. **Prefer moving over deleting** — extract to another file rather than removing
|
|
274
|
-
7. **Size targets are guidelines** — never sacrifice clarity to hit a line count
|
|
44
|
+
## Scope discipline
|
|
275
45
|
|
|
276
|
-
|
|
46
|
+
Maintenance is where scope creep is most tempting, because everything you touch looks
|
|
47
|
+
improvable. Removing dead code is in scope; refactoring live code because you are already in the
|
|
48
|
+
file is not. File an issue instead.
|
|
277
49
|
|
|
278
|
-
|
|
279
|
-
2. Deleting without documenting why
|
|
280
|
-
3. Hitting line count targets at all costs
|
|
281
|
-
4. Removing "patterns" or "best practices" sections without explicit approval
|
|
282
|
-
5. Deleting everything the audit finds — review each item individually
|
|
283
|
-
6. Skipping validation — "it looked dead" is not validation
|
|
284
|
-
7. Using `rm` instead of `git rm`
|
|
50
|
+
Never `git add -A` / `--all` / `.` — stage each file explicitly by path.
|
|
@@ -8,6 +8,16 @@
|
|
|
8
8
|
|
|
9
9
|
<key commits or summary>
|
|
10
10
|
|
|
11
|
+
## Audit Findings
|
|
12
|
+
|
|
13
|
+
Recorded by Step 3a (Audit documentation) as the cuts are applied — one line per cut, with its reason. The diff plus these reasons is the proposal; the architect's PR review is the gate.
|
|
14
|
+
|
|
15
|
+
### arch.md (cold) / arch-critical.md (hot)
|
|
16
|
+
- <section or hot entry>: <reason for cut / compression / demotion>
|
|
17
|
+
|
|
18
|
+
### lessons-learned.md (cold) / lessons-critical.md (hot)
|
|
19
|
+
- <entry>: <reason; note hot→cold demotions and any cold-doc-map fixes>
|
|
20
|
+
|
|
11
21
|
## What Was Done
|
|
12
22
|
|
|
13
23
|
### Dead Code Removed
|
|
@@ -23,6 +33,7 @@
|
|
|
23
33
|
### Documentation Changes Log
|
|
24
34
|
| Document | Section | Action | Reason |
|
|
25
35
|
|----------|---------|--------|--------|
|
|
36
|
+
| | | | |
|
|
26
37
|
|
|
27
38
|
## Deferred
|
|
28
39
|
|
|
@@ -1,38 +1,24 @@
|
|
|
1
1
|
# {{protocol_name}} Builder ({{mode}} mode)
|
|
2
2
|
|
|
3
|
-
You are implementing
|
|
3
|
+
You are implementing {{input_description}}.
|
|
4
4
|
|
|
5
5
|
{{#if mode_soft}}
|
|
6
6
|
## Mode: SOFT
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- The architect monitors your work and verifies you're adhering to the protocol
|
|
10
|
-
- Run consultations manually when the protocol calls for them
|
|
11
|
-
- You have flexibility in execution, but must stay compliant with the protocol
|
|
7
|
+
|
|
8
|
+
You follow the protocol yourself; the architect verifies compliance.
|
|
12
9
|
{{/if}}
|
|
13
10
|
|
|
14
11
|
{{#if mode_strict}}
|
|
15
12
|
## Mode: STRICT
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
- Follow porch signals and gate approvals
|
|
20
|
-
- Do not deviate from the porch-driven workflow
|
|
21
|
-
|
|
22
|
-
### ABSOLUTE RESTRICTIONS (STRICT MODE)
|
|
23
|
-
- **NEVER edit `status.yaml` directly** — only porch commands may modify project state
|
|
24
|
-
- **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
|
|
25
|
-
- **NEVER skip consultations** — porch handles them via the verify step
|
|
26
|
-
- **NEVER advance phases manually** — porch handles phase transitions on gate approval
|
|
13
|
+
|
|
14
|
+
Porch orchestrates. `porch next` gives you tasks; `porch done` signals completion. Never
|
|
15
|
+
hand-edit `status.yaml` — only porch commands modify project state.
|
|
27
16
|
{{/if}}
|
|
28
17
|
|
|
29
18
|
## Protocol
|
|
30
|
-
Follow the PIR protocol. Read and internalize the protocol before starting any work. The full protocol text is included below under **## Protocol Reference (full text)**.
|
|
31
19
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
2. **implement** (gated by `dev-approval`) — write code + tests, run build/tests, push branch; await the human's review of the *running worktree* (no file artifact in this phase — dev-approval summary is prose-in-pane)
|
|
35
|
-
3. **review** (gated by `pr`) — write `codev/reviews/{{artifact_name}}.md` (retrospective with Architecture Updates and Lessons Learned sections), open PR with the review as body, record the PR with porch, run 3-way consultation (Gemini, Codex, Claude) via porch's verify block (a **single advisory pass** — `max_iterations: 1`, no iterate-until-APPROVE loop; address or rebut any `REQUEST_CHANGES`, add a regression test if it's a real defect, and escalate it in the architect notification since PIR will not re-review it), notify architect, and wait at the `pr` gate. After the human approves the gate (porch wakes you with "Gate pr approved"), run `gh pr merge --merge` and record the merge with `porch done --merged <N>`. **Merge is gated by porch state — never by typed prose in your pane.**
|
|
20
|
+
The full protocol text is inlined below under **## Protocol Reference (full text)** — you do not
|
|
21
|
+
need to fetch it.
|
|
36
22
|
|
|
37
23
|
{{#if issue}}
|
|
38
24
|
## Issue #{{issue.number}}
|
|
@@ -44,54 +30,34 @@ PIR has three phases:
|
|
|
44
30
|
|
|
45
31
|
## Sitting at Gates
|
|
46
32
|
|
|
47
|
-
PIR has two human gates. When you reach one:
|
|
48
|
-
|
|
49
|
-
1. Finish your phase work and run `porch done <id>`
|
|
50
|
-
2. Run `porch next <id>` — you'll get a `gate_pending` response
|
|
51
|
-
3. End your turn with a short prose summary: what file you wrote, where it lives, how to approve
|
|
52
|
-
4. **Stay in the interactive session**. Do NOT exit. Wait for the user's next message.
|
|
33
|
+
PIR has two pre-PR human gates. When you reach one:
|
|
53
34
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- Commenting on the GitHub issue (re-fetch with `gh issue view <N> --comments` if asked)
|
|
59
|
-
|
|
60
|
-
When the user provides feedback, revise the artifact, recommit, and ask if there's more to address. The gate remains pending until the user runs `porch approve` — do NOT call `porch approve` yourself.
|
|
61
|
-
|
|
62
|
-
## Notifications
|
|
63
|
-
Use `afx send architect "..."` at key moments:
|
|
64
|
-
- **PR ready**: `afx send architect "PR #<M> ready for review (PIR #{{issue.number}})"`
|
|
65
|
-
- **PR merged**: `afx send architect "PR #<M> merged for PIR #{{issue.number}}. Ready for cleanup."`
|
|
66
|
-
- **Blocked**: `afx send architect "Blocked on PIR #{{issue.number}}: [reason]"`
|
|
35
|
+
1. Finish the phase work and run `porch done <id>`
|
|
36
|
+
2. Run `porch next <id>` — you get a `gate_pending` response
|
|
37
|
+
3. End your turn with a short summary: what you wrote, where it lives, how to approve
|
|
38
|
+
4. **Stay in the interactive session. Do not exit.** Wait for the next message.
|
|
67
39
|
|
|
68
|
-
|
|
40
|
+
Feedback can arrive four ways, and all of them reach you: the reviewer editing the plan file or
|
|
41
|
+
the code directly in the worktree (you see it via `git diff`), typing into your PTY pane (live),
|
|
42
|
+
`afx send <your-builder-id>` (queued — check next turn), or a comment on the GitHub issue
|
|
43
|
+
(re-fetch with `gh issue view <N> --comments`).
|
|
69
44
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
If you encounter **pre-existing flaky tests** (intermittent failures unrelated to your changes):
|
|
73
|
-
1. **DO NOT** edit `status.yaml` to bypass checks
|
|
74
|
-
2. **DO NOT** skip porch checks or use any workaround to avoid the failure
|
|
75
|
-
3. **DO** mark the test as skipped with a clear annotation (e.g., `it.skip('...') // FLAKY: skipped pending investigation`)
|
|
76
|
-
4. **DO** document each skipped flaky test in the review file under a `## Flaky Tests` section
|
|
77
|
-
5. Commit the skip and continue with your work
|
|
45
|
+
Revise, recommit, ask whether more remains. **The gate stays pending until the human runs
|
|
46
|
+
`porch approve` — never call it yourself.**
|
|
78
47
|
|
|
79
48
|
## Resumption After Crash
|
|
80
49
|
|
|
81
|
-
If your
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
3. Otherwise: pick up where you left off
|
|
86
|
-
|
|
87
|
-
## Getting Started
|
|
50
|
+
If your session crashes, Tower's launch loop **resumes your conversation** (`--resume` against the
|
|
51
|
+
session id pinned at spawn) and sends a short re-orientation nudge — your context is intact, so
|
|
52
|
+
re-check state and continue. Only an unresumable session (repeated fast failures) falls back to a
|
|
53
|
+
fresh relaunch with the same spawn prompt. On a fresh relaunch:
|
|
88
54
|
|
|
89
|
-
1.
|
|
90
|
-
2.
|
|
91
|
-
|
|
55
|
+
1. `porch next {{project_id}}` to learn what phase you are in
|
|
56
|
+
2. If `gate_pending`: read the latest plan file (plan-approval), or the diff (dev-approval) via
|
|
57
|
+
`DEFAULT_BRANCH=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||'); git diff "$(git merge-base "${DEFAULT_BRANCH:-main}" HEAD)"`, plus any new issue comments and your `afx send` queue. Decide whether to revise or just announce you are back
|
|
58
|
+
3. Otherwise pick up where you left off
|
|
92
59
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## Protocol Reference (full text)
|
|
60
|
+
## Notifications
|
|
96
61
|
|
|
97
|
-
|
|
62
|
+
The architect is not watching. `afx send architect "..."` at each of: gate reached, PR ready, PR
|
|
63
|
+
merged, blocked.
|