@cluesmith/codev 3.0.0-rc.1 → 3.0.0-rc.11
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/LICENSE +201 -0
- package/bin/af.js +2 -2
- package/bin/afx.js +8 -0
- package/bin/consult.js +2 -1
- package/bin/team.js +2 -1
- package/{dashboard/dist/assets/index-nr0cXxtf.css → dashboard-dist/assets/index-Bs8I7N2s.css} +1 -1
- package/dashboard-dist/assets/index-CkNo2z6t.js +195 -0
- package/dashboard-dist/assets/index-CkNo2z6t.js.map +1 -0
- package/dashboard-dist/dist/assets/index-Bs8I7N2s.css +32 -0
- package/dashboard-dist/dist/assets/index-CkNo2z6t.js +195 -0
- package/dashboard-dist/dist/assets/index-CkNo2z6t.js.map +1 -0
- package/{dashboard → dashboard-dist}/dist/index.html +2 -2
- package/dashboard-dist/index.html +14 -0
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +17 -14
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/architect.d.ts +4 -4
- package/dist/agent-farm/commands/architect.d.ts.map +1 -1
- package/dist/agent-farm/commands/architect.js +23 -12
- package/dist/agent-farm/commands/architect.js.map +1 -1
- package/dist/agent-farm/commands/attach.js +8 -8
- package/dist/agent-farm/commands/attach.js.map +1 -1
- package/dist/agent-farm/commands/bench.d.ts +1 -1
- package/dist/agent-farm/commands/bench.js +1 -1
- package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +10 -5
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/cron.js +1 -1
- package/dist/agent-farm/commands/cron.js.map +1 -1
- package/dist/agent-farm/commands/db.d.ts +3 -3
- package/dist/agent-farm/commands/db.js +4 -4
- package/dist/agent-farm/commands/db.js.map +1 -1
- package/dist/agent-farm/commands/open.js +2 -2
- package/dist/agent-farm/commands/open.js.map +1 -1
- package/dist/agent-farm/commands/rename.js +1 -1
- package/dist/agent-farm/commands/rename.js.map +1 -1
- package/dist/agent-farm/commands/send.d.ts +4 -1
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +8 -5
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/shell.js +3 -3
- package/dist/agent-farm/commands/shell.js.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.d.ts +2 -1
- package/dist/agent-farm/commands/spawn-roles.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.js +1 -1
- package/dist/agent-farm/commands/spawn-roles.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts +49 -10
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +356 -51
- package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts +6 -6
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +182 -74
- 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 +48 -3
- package/dist/agent-farm/commands/status.js.map +1 -1
- package/dist/agent-farm/commands/team-update.d.ts +1 -1
- package/dist/agent-farm/commands/team-update.d.ts.map +1 -1
- package/dist/agent-farm/commands/team-update.js +8 -5
- package/dist/agent-farm/commands/team-update.js.map +1 -1
- package/dist/agent-farm/commands/team.d.ts +1 -1
- package/dist/agent-farm/commands/team.d.ts.map +1 -1
- package/dist/agent-farm/commands/team.js +7 -3
- package/dist/agent-farm/commands/team.js.map +1 -1
- package/dist/agent-farm/commands/tower-cloud.d.ts +2 -2
- package/dist/agent-farm/commands/tower-cloud.js +3 -3
- package/dist/agent-farm/commands/tower-cloud.js.map +1 -1
- package/dist/agent-farm/commands/tower.js +2 -2
- package/dist/agent-farm/commands/tower.js.map +1 -1
- package/dist/agent-farm/lib/cloud-config.js +2 -2
- package/dist/agent-farm/lib/cloud-config.js.map +1 -1
- package/dist/agent-farm/lib/tower-client.d.ts +6 -230
- package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tower-client.js +6 -293
- package/dist/agent-farm/lib/tower-client.js.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.js +1 -1
- package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
- package/dist/agent-farm/servers/message-write.d.ts +24 -0
- package/dist/agent-farm/servers/message-write.d.ts.map +1 -0
- package/dist/agent-farm/servers/message-write.js +63 -0
- package/dist/agent-farm/servers/message-write.js.map +1 -0
- package/dist/agent-farm/servers/overview.d.ts +10 -8
- package/dist/agent-farm/servers/overview.d.ts.map +1 -1
- package/dist/agent-farm/servers/overview.js +78 -38
- package/dist/agent-farm/servers/overview.js.map +1 -1
- package/dist/agent-farm/servers/send-buffer.d.ts +4 -3
- package/dist/agent-farm/servers/send-buffer.d.ts.map +1 -1
- package/dist/agent-farm/servers/send-buffer.js +7 -4
- package/dist/agent-farm/servers/send-buffer.js.map +1 -1
- package/dist/agent-farm/servers/tower-cron-parser.js +1 -1
- package/dist/agent-farm/servers/tower-cron-parser.js.map +1 -1
- package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-cron.js +4 -5
- package/dist/agent-farm/servers/tower-cron.js.map +1 -1
- package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-instances.js +15 -13
- package/dist/agent-farm/servers/tower-instances.js.map +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +9 -16
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts +2 -2
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.js +64 -36
- package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.js +2 -2
- package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
- package/dist/agent-farm/servers/tower-utils.d.ts +9 -6
- package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.js +13 -7
- package/dist/agent-farm/servers/tower-utils.js.map +1 -1
- package/dist/agent-farm/types.d.ts +13 -0
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.d.ts +11 -0
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +39 -17
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/harness.d.ts +85 -0
- package/dist/agent-farm/utils/harness.d.ts.map +1 -0
- package/dist/agent-farm/utils/harness.js +212 -0
- package/dist/agent-farm/utils/harness.js.map +1 -0
- package/dist/agent-farm/utils/roles.d.ts +11 -4
- package/dist/agent-farm/utils/roles.d.ts.map +1 -1
- package/dist/agent-farm/utils/roles.js +21 -6
- package/dist/agent-farm/utils/roles.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +40 -5
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +16 -45
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts +37 -3
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +281 -194
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +121 -31
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +13 -43
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/porch/artifacts.d.ts +69 -0
- package/dist/commands/porch/artifacts.d.ts.map +1 -0
- package/dist/commands/porch/artifacts.js +368 -0
- package/dist/commands/porch/artifacts.js.map +1 -0
- package/dist/commands/porch/checks.d.ts +14 -3
- package/dist/commands/porch/checks.d.ts.map +1 -1
- package/dist/commands/porch/checks.js +150 -4
- package/dist/commands/porch/checks.js.map +1 -1
- package/dist/commands/porch/config.d.ts +6 -9
- package/dist/commands/porch/config.d.ts.map +1 -1
- package/dist/commands/porch/config.js +12 -37
- package/dist/commands/porch/config.js.map +1 -1
- package/dist/commands/porch/index.d.ts +12 -7
- package/dist/commands/porch/index.d.ts.map +1 -1
- package/dist/commands/porch/index.js +273 -82
- 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 +142 -75
- package/dist/commands/porch/next.js.map +1 -1
- package/dist/commands/porch/notify.d.ts +2 -2
- package/dist/commands/porch/notify.js +5 -5
- package/dist/commands/porch/notify.js.map +1 -1
- package/dist/commands/porch/prompts.d.ts +2 -1
- package/dist/commands/porch/prompts.d.ts.map +1 -1
- package/dist/commands/porch/prompts.js +34 -38
- package/dist/commands/porch/prompts.js.map +1 -1
- package/dist/commands/porch/protocol.d.ts +4 -3
- package/dist/commands/porch/protocol.d.ts.map +1 -1
- package/dist/commands/porch/protocol.js +21 -21
- package/dist/commands/porch/protocol.js.map +1 -1
- package/dist/commands/porch/state.d.ts +27 -2
- package/dist/commands/porch/state.d.ts.map +1 -1
- package/dist/commands/porch/state.js +100 -9
- package/dist/commands/porch/state.js.map +1 -1
- package/dist/commands/porch/types.d.ts +10 -2
- package/dist/commands/porch/types.d.ts.map +1 -1
- package/dist/commands/sync.d.ts +26 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +207 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/update.d.ts +15 -2
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +159 -202
- package/dist/commands/update.js.map +1 -1
- package/dist/lib/config.d.ts +96 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +165 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/forge-contracts.d.ts +100 -0
- package/dist/lib/forge-contracts.d.ts.map +1 -0
- package/dist/lib/forge-contracts.js +35 -0
- package/dist/lib/forge-contracts.js.map +1 -0
- package/dist/lib/forge.d.ts +102 -0
- package/dist/lib/forge.d.ts.map +1 -0
- package/dist/lib/forge.js +376 -0
- package/dist/lib/forge.js.map +1 -0
- package/dist/lib/github.d.ts +68 -60
- package/dist/lib/github.d.ts.map +1 -1
- package/dist/lib/github.js +160 -169
- package/dist/lib/github.js.map +1 -1
- package/dist/lib/skeleton.d.ts +15 -5
- package/dist/lib/skeleton.d.ts.map +1 -1
- package/dist/lib/skeleton.js +82 -7
- package/dist/lib/skeleton.js.map +1 -1
- package/dist/lib/team-github.d.ts +7 -3
- package/dist/lib/team-github.d.ts.map +1 -1
- package/dist/lib/team-github.js +29 -19
- package/dist/lib/team-github.js.map +1 -1
- package/dist/terminal/pty-manager.d.ts.map +1 -1
- package/dist/terminal/pty-manager.js +2 -0
- package/dist/terminal/pty-manager.js.map +1 -1
- package/dist/terminal/ws-protocol.d.ts +10 -8
- package/dist/terminal/ws-protocol.d.ts.map +1 -1
- package/dist/terminal/ws-protocol.js +3 -0
- package/dist/terminal/ws-protocol.js.map +1 -1
- package/package.json +27 -24
- package/scripts/forge/gitea/auth-status.sh +3 -0
- package/scripts/forge/gitea/issue-comment.sh +3 -0
- package/scripts/forge/gitea/issue-list.sh +3 -0
- package/scripts/forge/gitea/issue-view.sh +3 -0
- package/scripts/forge/gitea/pr-exists.sh +6 -0
- package/scripts/forge/gitea/pr-list.sh +3 -0
- package/scripts/forge/gitea/pr-merge.sh +3 -0
- package/scripts/forge/gitea/pr-view.sh +3 -0
- package/scripts/forge/gitea/recently-closed.sh +3 -0
- package/scripts/forge/gitea/recently-merged.sh +3 -0
- package/scripts/forge/gitea/repo-archive.sh +11 -0
- package/scripts/forge/gitea/user-identity.sh +3 -0
- package/scripts/forge/github/auth-status.sh +4 -0
- package/scripts/forge/github/issue-comment.sh +5 -0
- package/scripts/forge/github/issue-list.sh +4 -0
- package/scripts/forge/github/issue-view.sh +5 -0
- package/scripts/forge/github/on-it-timestamps.sh +8 -0
- package/scripts/forge/github/pr-diff.sh +10 -0
- package/scripts/forge/github/pr-exists.sh +7 -0
- package/scripts/forge/github/pr-list.sh +4 -0
- package/scripts/forge/github/pr-merge.sh +5 -0
- package/scripts/forge/github/pr-search.sh +5 -0
- package/scripts/forge/github/pr-view.sh +11 -0
- package/scripts/forge/github/recently-closed.sh +15 -0
- package/scripts/forge/github/recently-merged.sh +15 -0
- package/scripts/forge/github/repo-archive.sh +10 -0
- package/scripts/forge/github/team-activity.sh +5 -0
- package/scripts/forge/github/user-identity.sh +4 -0
- package/scripts/forge/gitlab/auth-status.sh +3 -0
- package/scripts/forge/gitlab/issue-comment.sh +3 -0
- package/scripts/forge/gitlab/issue-list.sh +3 -0
- package/scripts/forge/gitlab/issue-view.sh +3 -0
- package/scripts/forge/gitlab/pr-diff.sh +3 -0
- package/scripts/forge/gitlab/pr-exists.sh +5 -0
- package/scripts/forge/gitlab/pr-list.sh +3 -0
- package/scripts/forge/gitlab/pr-merge.sh +3 -0
- package/scripts/forge/gitlab/pr-search.sh +3 -0
- package/scripts/forge/gitlab/pr-view.sh +3 -0
- package/scripts/forge/gitlab/recently-closed.sh +3 -0
- package/scripts/forge/gitlab/recently-merged.sh +3 -0
- package/scripts/forge/gitlab/repo-archive.sh +12 -0
- package/scripts/forge/gitlab/user-identity.sh +3 -0
- package/skeleton/.claude/skills/afx/SKILL.md +144 -0
- package/skeleton/.claude/skills/codev/SKILL.md +3 -3
- package/skeleton/.claude/skills/consult/SKILL.md +1 -1
- package/skeleton/.claude/skills/porch/SKILL.md +2 -2
- package/skeleton/DEPENDENCIES.md +1 -1
- package/skeleton/builders.md +4 -4
- package/skeleton/protocol-schema.json +2 -2
- package/skeleton/protocols/air/builder-prompt.md +6 -6
- package/skeleton/protocols/air/prompts/pr.md +17 -5
- package/skeleton/protocols/air/protocol.md +1 -2
- package/skeleton/protocols/aspir/builder-prompt.md +28 -6
- package/skeleton/protocols/aspir/prompts/review.md +11 -0
- package/skeleton/protocols/aspir/protocol.json +9 -1
- package/skeleton/protocols/aspir/protocol.md +1 -1
- package/skeleton/protocols/aspir/templates/plan.md +0 -20
- package/skeleton/protocols/aspir/templates/spec.md +0 -28
- package/skeleton/protocols/bugfix/builder-prompt.md +6 -6
- package/skeleton/protocols/bugfix/prompts/pr.md +16 -4
- package/skeleton/protocols/experiment/builder-prompt.md +15 -0
- package/skeleton/protocols/experiment/protocol.md +1 -6
- package/skeleton/protocols/maintain/builder-prompt.md +12 -11
- package/skeleton/protocols/maintain/prompts/maintain.md +88 -0
- package/skeleton/protocols/maintain/prompts/review.md +84 -0
- package/skeleton/protocols/maintain/protocol.json +14 -68
- package/skeleton/protocols/maintain/protocol.md +111 -409
- package/skeleton/protocols/maintain/templates/maintenance-run.md +18 -49
- package/skeleton/protocols/protocol-schema.json +1 -1
- package/skeleton/protocols/spike/builder-prompt.md +1 -1
- package/skeleton/protocols/spike/protocol.md +4 -4
- package/skeleton/protocols/spir/builder-prompt.md +28 -5
- package/skeleton/protocols/spir/prompts/review.md +11 -0
- package/skeleton/protocols/spir/protocol.json +9 -1
- package/skeleton/protocols/spir/protocol.md +2 -2
- package/skeleton/protocols/spir/templates/plan.md +0 -20
- package/skeleton/protocols/spir/templates/spec.md +0 -28
- package/skeleton/resources/commands/agent-farm.md +84 -84
- package/skeleton/resources/commands/codev.md +1 -1
- package/skeleton/resources/commands/consult.md +16 -7
- package/skeleton/resources/commands/overview.md +14 -15
- package/skeleton/resources/risk-triage.md +1 -1
- package/skeleton/resources/workflow-reference.md +14 -14
- package/skeleton/roles/architect.md +55 -43
- package/skeleton/roles/builder.md +22 -14
- package/skeleton/templates/AGENTS.md +4 -3
- package/skeleton/templates/CLAUDE.md +4 -3
- package/skeleton/templates/cheatsheet.md +11 -12
- package/templates/3d-viewer.html +16 -18
- package/templates/tower.html +1 -1
- package/dashboard/dist/assets/index-CiIBsixF.js +0 -194
- package/dashboard/dist/assets/index-CiIBsixF.js.map +0 -1
- package/skeleton/.claude/skills/af/SKILL.md +0 -146
- package/skeleton/porch/prompts/understand.md +0 -61
- package/skeleton/porch/prompts/verify.md +0 -58
- package/skeleton/protocols/maintain/prompts/audit.md +0 -111
- package/skeleton/protocols/maintain/prompts/clean.md +0 -91
- package/skeleton/protocols/maintain/prompts/sync.md +0 -113
- package/skeleton/protocols/maintain/prompts/verify.md +0 -110
- package/skeleton/protocols/tick/builder-prompt.md +0 -65
- package/skeleton/protocols/tick/consult-types/impl-review.md +0 -72
- package/skeleton/protocols/tick/consult-types/plan-review.md +0 -59
- package/skeleton/protocols/tick/consult-types/pr-review.md +0 -72
- package/skeleton/protocols/tick/consult-types/spec-review.md +0 -55
- package/skeleton/protocols/tick/protocol.json +0 -151
- package/skeleton/protocols/tick/protocol.md +0 -277
- package/skeleton/protocols/tick/templates/plan.md +0 -67
- package/skeleton/protocols/tick/templates/review.md +0 -89
- package/skeleton/protocols/tick/templates/spec.md +0 -61
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Forge concept: repo-archive (Gitea via tea CLI)
|
|
3
|
+
# Input: CODEV_REPO (owner/repo), CODEV_REF (tag/branch/sha, empty for default), CODEV_OUTPUT_DIR
|
|
4
|
+
# Output: Extracts repository archive into CODEV_OUTPUT_DIR
|
|
5
|
+
REF_PART="${CODEV_REF:-main}"
|
|
6
|
+
# Gitea API: GET /repos/:owner/:repo/archive/:ref.tar.gz
|
|
7
|
+
tea api "repos/${CODEV_REPO}/archive/${REF_PART}.tar.gz" > /tmp/codev-archive-$$.tar.gz
|
|
8
|
+
mkdir -p "${CODEV_OUTPUT_DIR}"
|
|
9
|
+
tar xzf /tmp/codev-archive-$$.tar.gz -C "${CODEV_OUTPUT_DIR}" --strip-components=1
|
|
10
|
+
rm -f /tmp/codev-archive-$$.tar.gz
|
|
11
|
+
echo '{"status":"ok"}'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Forge concept: on-it-timestamps (GitHub via gh CLI)
|
|
3
|
+
# Input: CODEV_GRAPHQL_QUERY, CODEV_REPO_OWNER, CODEV_REPO_NAME
|
|
4
|
+
# Output: raw GraphQL JSON response
|
|
5
|
+
exec gh api graphql \
|
|
6
|
+
-f query="$CODEV_GRAPHQL_QUERY" \
|
|
7
|
+
-f owner="$CODEV_REPO_OWNER" \
|
|
8
|
+
-f name="$CODEV_REPO_NAME"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Forge concept: pr-diff (GitHub via gh CLI)
|
|
3
|
+
# Input: CODEV_PR_NUMBER, CODEV_DIFF_NAME_ONLY (optional, "1" for name-only)
|
|
4
|
+
# Output: raw diff text
|
|
5
|
+
|
|
6
|
+
if [ "$CODEV_DIFF_NAME_ONLY" = "1" ]; then
|
|
7
|
+
exec gh pr diff "$CODEV_PR_NUMBER" --name-only
|
|
8
|
+
else
|
|
9
|
+
exec gh pr diff "$CODEV_PR_NUMBER"
|
|
10
|
+
fi
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Forge concept: pr-exists (GitHub via gh CLI)
|
|
3
|
+
# Input: CODEV_BRANCH_NAME
|
|
4
|
+
# Output: "true" or "false"
|
|
5
|
+
# Returns true for OPEN or MERGED PRs only. CLOSED-not-merged PRs are excluded.
|
|
6
|
+
# (bugfix #568: --state all is needed to catch merged PRs; #653: filter out CLOSED)
|
|
7
|
+
exec gh pr list --state all --head "$CODEV_BRANCH_NAME" --json number,state --jq '[.[] | select(.state == "OPEN" or .state == "MERGED")] | length > 0'
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Forge concept: pr-view (GitHub via gh CLI)
|
|
3
|
+
# Input: CODEV_PR_NUMBER, CODEV_INCLUDE_COMMENTS (optional, "1" to include)
|
|
4
|
+
# Output: JSON or text (with comments)
|
|
5
|
+
|
|
6
|
+
if [ "$CODEV_INCLUDE_COMMENTS" = "1" ]; then
|
|
7
|
+
exec gh pr view "$CODEV_PR_NUMBER" --comments
|
|
8
|
+
else
|
|
9
|
+
exec gh pr view "$CODEV_PR_NUMBER" \
|
|
10
|
+
--json title,body,state,author,baseRefName,headRefName,additions,deletions
|
|
11
|
+
fi
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Forge concept: recently-closed (GitHub via gh CLI)
|
|
3
|
+
# Input: CODEV_SINCE_DATE (optional, ISO date)
|
|
4
|
+
# Output: JSON [{number, title, url, labels, createdAt, closedAt}]
|
|
5
|
+
|
|
6
|
+
if [ -n "$CODEV_SINCE_DATE" ]; then
|
|
7
|
+
exec gh issue list --state closed \
|
|
8
|
+
--search "closed:>$CODEV_SINCE_DATE" \
|
|
9
|
+
--json number,title,url,labels,createdAt,closedAt \
|
|
10
|
+
--limit 1000
|
|
11
|
+
else
|
|
12
|
+
exec gh issue list --state closed \
|
|
13
|
+
--json number,title,url,labels,createdAt,closedAt \
|
|
14
|
+
--limit 1000
|
|
15
|
+
fi
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Forge concept: recently-merged (GitHub via gh CLI)
|
|
3
|
+
# Input: CODEV_SINCE_DATE (optional, ISO date)
|
|
4
|
+
# Output: JSON [{number, title, url, body, createdAt, mergedAt, headRefName}]
|
|
5
|
+
|
|
6
|
+
if [ -n "$CODEV_SINCE_DATE" ]; then
|
|
7
|
+
exec gh pr list --state merged \
|
|
8
|
+
--search "merged:>$CODEV_SINCE_DATE" \
|
|
9
|
+
--json number,title,url,body,createdAt,mergedAt,headRefName \
|
|
10
|
+
--limit 1000
|
|
11
|
+
else
|
|
12
|
+
exec gh pr list --state merged \
|
|
13
|
+
--json number,title,url,body,createdAt,mergedAt,headRefName \
|
|
14
|
+
--limit 1000
|
|
15
|
+
fi
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Forge concept: repo-archive (GitHub via gh CLI)
|
|
3
|
+
# Input: CODEV_REPO (owner/repo), CODEV_REF (tag/branch/sha, empty for default), CODEV_OUTPUT_DIR
|
|
4
|
+
# Output: Extracts repository archive into CODEV_OUTPUT_DIR
|
|
5
|
+
REF_PART="${CODEV_REF:-HEAD}"
|
|
6
|
+
gh api "repos/${CODEV_REPO}/tarball/${REF_PART}" > /tmp/codev-archive-$$.tar.gz
|
|
7
|
+
mkdir -p "${CODEV_OUTPUT_DIR}"
|
|
8
|
+
tar xzf /tmp/codev-archive-$$.tar.gz -C "${CODEV_OUTPUT_DIR}" --strip-components=1
|
|
9
|
+
rm -f /tmp/codev-archive-$$.tar.gz
|
|
10
|
+
echo '{"status":"ok"}'
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Forge concept: pr-exists (GitLab via glab CLI)
|
|
3
|
+
# Returns true for open or merged MRs only. Closed-not-merged MRs are excluded.
|
|
4
|
+
# --all fetches MRs in all states (open, merged, closed); without it, only open MRs are returned.
|
|
5
|
+
glab mr list --all --source-branch "$CODEV_BRANCH_NAME" --output json | jq '[.[] | select(.state == "opened" or .state == "merged")] | length > 0'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Forge concept: repo-archive (GitLab via lab/glab CLI)
|
|
3
|
+
# Input: CODEV_REPO (owner/repo), CODEV_REF (tag/branch/sha, empty for default), CODEV_OUTPUT_DIR
|
|
4
|
+
# Output: Extracts repository archive into CODEV_OUTPUT_DIR
|
|
5
|
+
REF_PART="${CODEV_REF:-main}"
|
|
6
|
+
# GitLab API: GET /projects/:id/repository/archive
|
|
7
|
+
PROJECT_ENCODED=$(echo "${CODEV_REPO}" | sed 's/\//%2F/g')
|
|
8
|
+
glab api "projects/${PROJECT_ENCODED}/repository/archive?sha=${REF_PART}" > /tmp/codev-archive-$$.tar.gz
|
|
9
|
+
mkdir -p "${CODEV_OUTPUT_DIR}"
|
|
10
|
+
tar xzf /tmp/codev-archive-$$.tar.gz -C "${CODEV_OUTPUT_DIR}" --strip-components=1
|
|
11
|
+
rm -f /tmp/codev-archive-$$.tar.gz
|
|
12
|
+
echo '{"status":"ok"}'
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afx
|
|
3
|
+
description: Agent Farm CLI — the tool for spawning builders, managing Tower, workspaces, and cron tasks. ALWAYS consult this skill BEFORE running any `afx` command to get the exact syntax. This prevents wasting time guessing flags that don't exist. Use this whenever you need to spawn a builder, check status, send messages, clean up worktrees, manage Tower, or run cron tasks. If you're about to type `afx` followed by anything, check here first.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Farm CLI
|
|
7
|
+
|
|
8
|
+
## afx spawn
|
|
9
|
+
|
|
10
|
+
Spawns a new builder in an isolated git worktree.
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
afx spawn [number] [options]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**The ONLY flags that exist:**
|
|
17
|
+
|
|
18
|
+
| Flag | Description |
|
|
19
|
+
|------|-------------|
|
|
20
|
+
| `--protocol <name>` | Protocol: spir, aspir, air, bugfix, maintain, experiment. **Required for numbered spawns.** |
|
|
21
|
+
| `--task <text>` | Ad-hoc task (no issue number needed) |
|
|
22
|
+
| `--shell` | Bare Claude session |
|
|
23
|
+
| `--worktree` | Bare worktree session |
|
|
24
|
+
| `--files <files>` | Context files, comma-separated. **Requires `--task`.** |
|
|
25
|
+
| `--no-comment` | Skip commenting on the GitHub issue |
|
|
26
|
+
| `--force` | Skip dirty-worktree and collision checks |
|
|
27
|
+
| `--soft` | Soft mode (AI follows protocol, you verify) |
|
|
28
|
+
| `--strict` | Strict mode (porch orchestrates) — this is the default |
|
|
29
|
+
| `--resume` | Resume builder in existing worktree |
|
|
30
|
+
| `--no-role` | Skip loading role prompt |
|
|
31
|
+
|
|
32
|
+
**There is NO `-t`, `--title`, `--name`, or `--branch` flag.** The branch name is auto-generated from the issue title.
|
|
33
|
+
|
|
34
|
+
**Examples:**
|
|
35
|
+
```bash
|
|
36
|
+
afx spawn 42 --protocol spir # SPIR builder for issue #42
|
|
37
|
+
afx spawn 42 --protocol aspir # ASPIR (autonomous, no human gates)
|
|
38
|
+
afx spawn 42 --protocol air # AIR (small features)
|
|
39
|
+
afx spawn 42 --protocol bugfix # Bugfix
|
|
40
|
+
afx spawn 42 --protocol spir --soft # Soft mode
|
|
41
|
+
afx spawn 42 --resume # Resume existing builder
|
|
42
|
+
afx spawn --task "fix the flaky test" # Ad-hoc task (no issue)
|
|
43
|
+
afx spawn 42 --protocol spir --force # Skip dirty-worktree check
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Pre-spawn checklist:**
|
|
47
|
+
1. `git status` — worktree must be clean (or use `--force`)
|
|
48
|
+
2. Commit specs/plans first — builders branch from HEAD and can't see uncommitted files
|
|
49
|
+
3. `--protocol` is required for numbered spawns
|
|
50
|
+
|
|
51
|
+
## afx send
|
|
52
|
+
|
|
53
|
+
Sends a message to a running builder.
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
afx send [builder] [message]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
| Flag | Description |
|
|
60
|
+
|------|-------------|
|
|
61
|
+
| `--all` | Send to all builders |
|
|
62
|
+
| `--file <path>` | Include file content |
|
|
63
|
+
| `--interrupt` | Send Ctrl+C first |
|
|
64
|
+
| `--raw` | Skip structured formatting |
|
|
65
|
+
| `--no-enter` | Don't press Enter after message |
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
afx send 0042 "PR approved, please merge"
|
|
69
|
+
afx send 0585 "check the test output" --file /tmp/test-results.txt
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## afx cleanup
|
|
73
|
+
|
|
74
|
+
Removes a builder's worktree and branch after work is done.
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
afx cleanup [options]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
| Flag | Description |
|
|
81
|
+
|------|-------------|
|
|
82
|
+
| `-p, --project <id>` | Builder project ID (no leading zeros: `585` not `0585`) |
|
|
83
|
+
| `-i, --issue <number>` | Cleanup bugfix builder by issue number |
|
|
84
|
+
| `-t, --task <id>` | Cleanup task builder (e.g., `task-bEPd`) |
|
|
85
|
+
| `-f, --force` | Force cleanup even if branch not merged |
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
afx cleanup -p 585 # Clean up project 585
|
|
89
|
+
afx cleanup -p 585 -f # Force (unmerged branch)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Note:** `afx cleanup` uses plain numbers (`585`), not zero-padded (`0585`). But `afx send` uses zero-padded IDs (`0585`).
|
|
93
|
+
|
|
94
|
+
## afx status
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
afx status # Show all builders and workspace status
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
No flags needed. Shows Tower status, workspace, and all active builders.
|
|
101
|
+
|
|
102
|
+
## afx tower
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
afx tower start # Start Tower on port 4100
|
|
106
|
+
afx tower stop # Stop Tower
|
|
107
|
+
afx tower log # Tail Tower logs
|
|
108
|
+
afx tower status # Check daemon and cloud connection status
|
|
109
|
+
afx tower connect # Connect to Codev Cloud
|
|
110
|
+
afx tower disconnect # Disconnect from Codev Cloud
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
There is NO `afx tower restart` — use `afx tower stop && afx tower start`.
|
|
114
|
+
|
|
115
|
+
## afx workspace
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
afx workspace start # Start workspace for current project
|
|
119
|
+
afx workspace stop # Stop workspace processes
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
`afx dash` is a deprecated alias — use `afx workspace` instead.
|
|
123
|
+
|
|
124
|
+
## afx cron
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
afx cron list # List all cron tasks
|
|
128
|
+
afx cron status <name> # Check task status
|
|
129
|
+
afx cron run <name> # Run immediately
|
|
130
|
+
afx cron enable <name> # Enable
|
|
131
|
+
afx cron disable <name> # Disable
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
There is NO `afx cron add` — create YAML files in `.af-cron/` directly.
|
|
135
|
+
|
|
136
|
+
## Other commands
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
afx open <file> # Open file in annotation viewer (NOT system open)
|
|
140
|
+
afx shell # Spawn utility shell
|
|
141
|
+
afx attach # Attach to running builder terminal
|
|
142
|
+
afx rename <name> # Rename current shell session
|
|
143
|
+
afx architect # Start architect session in current terminal
|
|
144
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: codev
|
|
3
|
-
description: Codev project management CLI — init, adopt, update, and doctor commands. Check this skill before running any `codev` command (except `consult`, `porch`, or `
|
|
3
|
+
description: Codev project management CLI — init, adopt, update, and doctor commands. Check this skill before running any `codev` command (except `consult`, `porch`, or `afx` which have their own skills). Use when setting up new projects, adding codev to existing repos, updating framework files, or diagnosing missing dependencies.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# codev - Project Management CLI
|
|
@@ -16,7 +16,7 @@ codev doctor Check system dependencies
|
|
|
16
16
|
|
|
17
17
|
## codev init
|
|
18
18
|
|
|
19
|
-
Creates a **new directory** with the full codev structure: specs/, plans/, reviews/, protocols, CLAUDE.md, AGENTS.md, .claude/skills/,
|
|
19
|
+
Creates a **new directory** with the full codev structure: specs/, plans/, reviews/, protocols, CLAUDE.md, AGENTS.md, .claude/skills/, .codev/config.json, .gitignore.
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
22
|
codev init my-app # Interactive setup
|
|
@@ -53,7 +53,7 @@ codev doctor
|
|
|
53
53
|
|
|
54
54
|
## Common mistakes
|
|
55
55
|
|
|
56
|
-
- There is NO `codev tower` command — use `
|
|
56
|
+
- There is NO `codev tower` command — use `afx tower start/stop`
|
|
57
57
|
- `codev init` creates a new directory — use `codev adopt` for existing projects
|
|
58
58
|
- Always run `codev adopt` and `codev update` from the project root
|
|
59
59
|
- `codev update` only updates framework files — it never touches specs/plans/reviews
|
|
@@ -30,7 +30,7 @@ The `-m` / `--model` flag is **always required** except for `consult stats`.
|
|
|
30
30
|
-m, --model <model> Model to use (required except stats)
|
|
31
31
|
--prompt <text> Inline prompt (general mode)
|
|
32
32
|
--prompt-file <path> Prompt file path (general mode)
|
|
33
|
-
--protocol <name> Protocol: spir, aspir, air, bugfix,
|
|
33
|
+
--protocol <name> Protocol: spir, aspir, air, bugfix, maintain
|
|
34
34
|
-t, --type <type> Review type (see below)
|
|
35
35
|
--issue <number> Issue number (required in architect context)
|
|
36
36
|
--output <path> Save result to file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: porch
|
|
3
|
-
description: Protocol orchestrator CLI — drives SPIR, ASPIR, AIR,
|
|
3
|
+
description: Protocol orchestrator CLI — drives SPIR, ASPIR, AIR, and BUGFIX protocols via a state machine. ALWAYS check this skill before running any `porch` command. Use when you need to check project status, approve gates, signal phase completion, or manage protocol state. Also use when a builder asks about gate approvals or phase transitions.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# porch - Protocol Orchestrator
|
|
@@ -31,7 +31,7 @@ Gates are human-only approval checkpoints. The `--a-human-explicitly-approved-th
|
|
|
31
31
|
|------|----------|------|
|
|
32
32
|
| `spec-approval` | SPIR | After spec is written |
|
|
33
33
|
| `plan-approval` | SPIR | After plan is written |
|
|
34
|
-
| `pr` | SPIR,
|
|
34
|
+
| `pr` | SPIR, AIR | After PR is created |
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
37
|
porch approve 42 spec-approval --a-human-explicitly-approved-this
|
package/skeleton/DEPENDENCIES.md
CHANGED
package/skeleton/builders.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Active Builders
|
|
2
2
|
|
|
3
|
-
> **Note**: Builder status is now tracked automatically via SQLite database and the Tower dashboard. Use `
|
|
3
|
+
> **Note**: Builder status is now tracked automatically via SQLite database and the Tower dashboard. Use `afx status` to check all builders. This file is retained as a reference for status values only.
|
|
4
4
|
|
|
5
5
|
## Status Values
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
## Commands
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
afx status # Check all builder statuses
|
|
17
|
+
afx spawn <id> # Spawn a new builder
|
|
18
|
+
afx cleanup -p <id> # Clean up a completed builder
|
|
19
19
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://codev.dev/protocol-schema.json",
|
|
4
4
|
"title": "Codev Protocol Definition",
|
|
5
|
-
"description": "Schema for porch protocol definitions (SPIR,
|
|
5
|
+
"description": "Schema for porch protocol definitions (SPIR, BUGFIX, AIR, etc.)",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["name", "phases"],
|
|
8
8
|
"properties": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"name": {
|
|
14
14
|
"type": "string",
|
|
15
|
-
"description": "Protocol name (e.g., 'spir', '
|
|
15
|
+
"description": "Protocol name (e.g., 'spir', 'bugfix', 'air')",
|
|
16
16
|
"pattern": "^[a-z][a-z0-9-]*$"
|
|
17
17
|
},
|
|
18
18
|
"alias": {
|
|
@@ -38,20 +38,20 @@ Follow the AIR protocol: `codev/protocols/air/protocol.md`
|
|
|
38
38
|
2. Implement the feature (< 300 LOC)
|
|
39
39
|
3. Write tests for the feature
|
|
40
40
|
4. Create PR with review in the PR body (NOT as a separate file)
|
|
41
|
-
5. Notify architect via `
|
|
41
|
+
5. Notify architect via `afx send architect "PR #N ready for review (implements #{{issue.number}})"`
|
|
42
42
|
|
|
43
43
|
**IMPORTANT**: AIR produces NO spec, plan, or review files. The review goes in the PR body.
|
|
44
44
|
|
|
45
45
|
If the feature is too complex (> 300 LOC or architectural changes), notify the Architect via:
|
|
46
46
|
```bash
|
|
47
|
-
|
|
47
|
+
afx send architect "Issue #{{issue.number}} is more complex than expected. [Reason]. Recommend escalating to ASPIR."
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## Notifications
|
|
51
|
-
Always use `
|
|
52
|
-
- **PR ready**: `
|
|
53
|
-
- **PR merged**: `
|
|
54
|
-
- **Blocked**: `
|
|
51
|
+
Always use `afx send architect "..."` to notify the architect at key moments:
|
|
52
|
+
- **PR ready**: `afx send architect "PR #N ready for review (implements #{{issue.number}})"`
|
|
53
|
+
- **PR merged**: `afx send architect "PR #N merged for issue #{{issue.number}}. Ready for cleanup."`
|
|
54
|
+
- **Blocked**: `afx send architect "Blocked on issue #{{issue.number}}: [reason]"`
|
|
55
55
|
{{/if}}
|
|
56
56
|
|
|
57
57
|
## Handling Flaky Tests
|
|
@@ -15,15 +15,27 @@ Create a pull request with the review embedded in the PR body, optionally run CM
|
|
|
15
15
|
|
|
16
16
|
### 1. Create the Pull Request
|
|
17
17
|
|
|
18
|
-
Create a PR that links to the issue. The PR body IS the review — include a summary, key decisions, and test plan
|
|
18
|
+
Create a PR that links to the issue. The PR body IS the review — include a summary, key decisions, and test plan.
|
|
19
|
+
|
|
20
|
+
**PR body requirements**: The PR body MUST include `Closes #<N>` (where `<N>` is
|
|
21
|
+
the driving issue number) so GitHub auto-closes the issue on merge. If the PR
|
|
22
|
+
closes multiple issues (e.g. duplicates consolidated), include one `Closes #<N>`
|
|
23
|
+
per issue. Without this, GitHub will not auto-close the issue.
|
|
24
|
+
|
|
25
|
+
**Exception**: if this PR only partially addresses the issue, use `Refs #<N>`
|
|
26
|
+
or `Part of #<N>` instead of `Closes` — the issue stays open until a
|
|
27
|
+
follow-up PR closes it.
|
|
28
|
+
|
|
29
|
+
**Note**: substitute the real issue number for `<N>` — do not leave the
|
|
30
|
+
placeholder or any `{{...}}` template tag in the committed PR body.
|
|
19
31
|
|
|
20
32
|
```bash
|
|
21
|
-
gh pr create --title "[Air
|
|
33
|
+
gh pr create --title "[Air #<N>] feat: <brief description>" --body "$(cat <<'EOF'
|
|
22
34
|
## Summary
|
|
23
35
|
|
|
24
36
|
<1-2 sentence description of the feature>
|
|
25
37
|
|
|
26
|
-
|
|
38
|
+
Closes #<N> <!-- Substitute <N> with the real issue number -->
|
|
27
39
|
|
|
28
40
|
## What Changed
|
|
29
41
|
|
|
@@ -75,12 +87,12 @@ If you ran CMAP:
|
|
|
75
87
|
Send notification with PR link:
|
|
76
88
|
|
|
77
89
|
```bash
|
|
78
|
-
|
|
90
|
+
afx send architect "PR #<number> ready for review (implements issue #{{issue.number}})"
|
|
79
91
|
```
|
|
80
92
|
|
|
81
93
|
If CMAP was run, include verdicts:
|
|
82
94
|
```bash
|
|
83
|
-
|
|
95
|
+
afx send architect "PR #<number> ready for review (implements issue #{{issue.number}}). CMAP: gemini=<verdict>, codex=<verdict>, claude=<verdict>"
|
|
84
96
|
```
|
|
85
97
|
|
|
86
98
|
## Signals
|
|
@@ -34,7 +34,6 @@ AIR is a minimal protocol for implementing small features (< 300 LOC) where the
|
|
|
34
34
|
|
|
35
35
|
- Bug fixes → use **BUGFIX**
|
|
36
36
|
- Features needing spec discussion → use **SPIR** or **ASPIR**
|
|
37
|
-
- Amendments to existing specs → use **TICK**
|
|
38
37
|
- Architectural changes → use **SPIR**
|
|
39
38
|
- Complex features with multiple phases → use **SPIR** or **ASPIR**
|
|
40
39
|
|
|
@@ -67,7 +66,7 @@ The **PR gate** is preserved — a human reviews all code before merge.
|
|
|
67
66
|
|
|
68
67
|
```bash
|
|
69
68
|
# Spawn a builder using AIR
|
|
70
|
-
|
|
69
|
+
afx spawn 42 --protocol air
|
|
71
70
|
|
|
72
71
|
# The builder implements autonomously and stops at the PR gate
|
|
73
72
|
```
|
|
@@ -27,7 +27,7 @@ You are running in STRICT mode. This means:
|
|
|
27
27
|
{{/if}}
|
|
28
28
|
|
|
29
29
|
## Protocol
|
|
30
|
-
Follow the
|
|
30
|
+
Follow the ASPIR protocol: `codev/protocols/aspir/protocol.md`
|
|
31
31
|
Read and internalize the protocol before starting any work.
|
|
32
32
|
|
|
33
33
|
{{#if spec}}
|
|
@@ -53,12 +53,34 @@ Follow the implementation plan at: `{{plan.path}}`
|
|
|
53
53
|
{{task_text}}
|
|
54
54
|
{{/if}}
|
|
55
55
|
|
|
56
|
+
## Multi-PR Workflow
|
|
57
|
+
|
|
58
|
+
Your worktree is persistent — it survives across PR merges. You can produce multiple PRs sequentially:
|
|
59
|
+
|
|
60
|
+
1. Cut a branch, open a PR, wait for merge
|
|
61
|
+
2. After merge: `git fetch origin main && git checkout -b <next-branch> origin/main`
|
|
62
|
+
3. Continue to the next phase, open another PR
|
|
63
|
+
|
|
64
|
+
**Important**: Do NOT run `git checkout main` — git worktrees cannot check out a branch that's checked out elsewhere. Always branch off `origin/main` via fetch.
|
|
65
|
+
|
|
66
|
+
Record PRs: `porch done {{project_id}} --pr <N> --branch <name>`
|
|
67
|
+
Record merges: `porch done {{project_id}} --merged <N>`
|
|
68
|
+
|
|
69
|
+
## Verify Phase
|
|
70
|
+
|
|
71
|
+
After the final PR merges, the project enters the **verify** phase. You stay alive through verify:
|
|
72
|
+
1. Pull main into your worktree
|
|
73
|
+
2. Run `porch done {{project_id}}` to signal verification is ready
|
|
74
|
+
3. The architect approves `verify-approval` when satisfied
|
|
75
|
+
|
|
76
|
+
If verification is not needed: `porch verify {{project_id}} --skip "reason"`
|
|
77
|
+
|
|
56
78
|
## Notifications
|
|
57
|
-
Always use `
|
|
58
|
-
- **Gate reached**: `
|
|
59
|
-
- **PR ready**: `
|
|
60
|
-
- **PR merged**: `
|
|
61
|
-
- **Blocked**: `
|
|
79
|
+
Always use `afx send architect "..."` to notify the architect at key moments:
|
|
80
|
+
- **Gate reached**: `afx send architect "Project {{project_id}}: <gate-name> ready for approval"`
|
|
81
|
+
- **PR ready**: `afx send architect "PR #N ready for review (project {{project_id}})"`
|
|
82
|
+
- **PR merged**: `afx send architect "Project {{project_id}} PR merged. Entering verify phase."`
|
|
83
|
+
- **Blocked**: `afx send architect "Blocked on project {{project_id}}: [reason]"`
|
|
62
84
|
|
|
63
85
|
## Handling Flaky Tests
|
|
64
86
|
|