Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/skills/forge/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Forge concept commands decouple codev from direct `gh` CLI calls. Each GitHub op
| `user-identity` | — | Get current user's handle (plain text) |
| `team-activity` | `CODEV_GRAPHQL_QUERY` | Run a batched GraphQL query |
| `on-it-timestamps` | `CODEV_ISSUE_NUMBERS`, `CODEV_GRAPHQL_QUERY`, `CODEV_REPO_OWNER`, `CODEV_REPO_NAME` | Get "on it" comment timestamps |
| `pr-create` | `CODEV_PR_TITLE`, `CODEV_PR_BODY`, `CODEV_PR_BASE` (optional), `CODEV_PR_HEAD` (optional), `CODEV_PR_REPO` (optional), `CODEV_PR_DRAFT` (optional) | Open a PR; prints `{"number", "url"}` |
| `pr-merge` | `CODEV_PR_NUMBER` | Merge a PR |
| `pr-search` | `CODEV_SEARCH_QUERY` | Search PRs (JSON array) |
| `pr-view` | `CODEV_PR_NUMBER`, `CODEV_INCLUDE_COMMENTS` (optional) | View PR details (JSON or text) |
Expand Down
1 change: 1 addition & 0 deletions .codex/skills/forge/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Forge concept commands decouple codev from direct `gh` CLI calls. Each GitHub op
| `user-identity` | — | Get current user's handle (plain text) |
| `team-activity` | `CODEV_GRAPHQL_QUERY` | Run a batched GraphQL query |
| `on-it-timestamps` | `CODEV_ISSUE_NUMBERS`, `CODEV_GRAPHQL_QUERY`, `CODEV_REPO_OWNER`, `CODEV_REPO_NAME` | Get "on it" comment timestamps |
| `pr-create` | `CODEV_PR_TITLE`, `CODEV_PR_BODY`, `CODEV_PR_BASE` (optional), `CODEV_PR_HEAD` (optional), `CODEV_PR_REPO` (optional), `CODEV_PR_DRAFT` (optional) | Open a PR; prints `{"number", "url"}` |
| `pr-merge` | `CODEV_PR_NUMBER` | Merge a PR |
| `pr-search` | `CODEV_SEARCH_QUERY` | Search PRs (JSON array) |
| `pr-view` | `CODEV_PR_NUMBER`, `CODEV_INCLUDE_COMMENTS` (optional) | View PR details (JSON or text) |
Expand Down
7 changes: 6 additions & 1 deletion codev-skeleton/protocols/air/prompts/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Open the PR with the review embedded in its body, optionally run CMAP, and notif
The body must carry `Closes #<N>` for the driving issue — one per issue if several — so GitHub auto-closes it on merge. **Exception:** a partial fix uses `Refs #<N>` or `Part of #<N>` instead. Substitute the real number for `<N>`; leave no `{{...}}` tag or `<N>` placeholder in the committed body.

```bash
gh pr create --title "[Air #<N>] feat: <brief description>" --body "$(cat <<'EOF'
export CODEV_PR_TITLE="[Air #<N>] feat: <brief description>"
export CODEV_PR_BODY="$(cat <<'EOF'
## Summary

<1-2 sentence description of the feature>
Expand All @@ -44,8 +45,12 @@ Closes #<N> <!-- Substitute <N>; use "Refs #<N>" for a partial fix -->
<anything the reviewer should focus on, or "Standard implementation — no special concerns">
EOF
)"

{{pr_create_command}}
```

The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It takes `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — from the environment, which is why they are exported rather than prefixed onto the command line: an inline override that spells `--title "$CODEV_PR_TITLE"` needs them set in the calling shell too. It prints `{"number": <int>, "url": "<url>"}`.

## Optional CMAP review

CMAP is your judgement call for AIR. Skip it for simple changes (config, small UI); run it for features touching core logic or several modules:
Expand Down
7 changes: 6 additions & 1 deletion codev-skeleton/protocols/aspir/prompts/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ The review's `## Architecture Updates` and `## Lessons Learned Updates` sections
The PR body must carry `Closes #<N>` (feature) or `Fixes #<N>` (bug) for the driving issue — one keyword per issue if several — so GitHub auto-closes on merge. **Exception:** a PR that only partially addresses its issue uses `Refs #<N>` or `Part of #<N>` instead, leaving the issue open for the follow-up.

```bash
gh pr create --title "[Spec {{project_id}}] {{title}}" --body "$(cat <<'EOF'
export CODEV_PR_TITLE="[Spec {{project_id}}] {{title}}"
export CODEV_PR_BODY="$(cat <<'EOF'
## Summary
[what was implemented]

Expand All @@ -63,8 +64,12 @@ codev/specs/{{artifact_name}}.md
codev/reviews/{{artifact_name}}.md
EOF
)"

{{pr_create_command}}
```

The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It takes `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — from the environment, which is why they are exported rather than prefixed onto the command line: an inline override that spells `--title "$CODEV_PR_TITLE"` needs them set in the calling shell too. It prints `{"number": <int>, "url": "<url>"}`.

## Signals

- Review document complete:
Expand Down
7 changes: 6 additions & 1 deletion codev-skeleton/protocols/bugfix/prompts/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Open the PR, run CMAP review on it, address feedback, and hand off to the archit
The PR body must carry `Fixes #<N>` for the driving issue — one per issue if several — so GitHub auto-closes it on merge. **Exception:** a PR that only partially addresses the issue uses `Refs #<N>` or `Part of #<N>` instead, leaving it open for the follow-up. Substitute the real number for `<N>`; leave no `{{...}}` tag or `<N>` placeholder in the committed body.

```bash
gh pr create --title "Fix #<N>: <brief description>" --body "$(cat <<'EOF'
export CODEV_PR_TITLE="Fix #<N>: <brief description>"
export CODEV_PR_BODY="$(cat <<'EOF'
## Summary

<1-2 sentence description of the bug and fix>
Expand All @@ -38,8 +39,12 @@ Fixes #<N> <!-- Substitute <N>; use "Refs #<N>" for a partial fix -->
- [ ] All tests pass
EOF
)"

{{pr_create_command}}
```

The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It takes `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — from the environment, which is why they are exported rather than prefixed onto the command line: an inline override that spells `--title "$CODEV_PR_TITLE"` needs them set in the calling shell too. It prints `{"number": <int>, "url": "<url>"}`.

## Run CMAP review

BUGFIX runs its own 3-way consultation on the PR (porch does not do it for you). Dispatch all three in the background:
Expand Down
3 changes: 2 additions & 1 deletion codev-skeleton/protocols/bugfix/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ refactor surrounding code, fix unrelated bugs (file separate issues), or add fea
[Bugfix #42] Test: regression for unencoded username
```

**PR** — open with `gh pr create`, body carrying Summary, Root Cause, Fix and Test Plan plus
**PR** — open with the `pr-create` forge concept command the PR-phase prompt hands you (`gh
pr create` on GitHub), body carrying Summary, Root Cause, Fix and Test Plan plus
`Fixes #<N>` so the issue closes on merge. Run one CMAP pass (Gemini, Codex, Claude), record
each verdict, and address or rebut every `REQUEST_CHANGES`. Notify the architect with the
verdicts, then `porch done <id>` and wait.
Expand Down
7 changes: 6 additions & 1 deletion codev-skeleton/protocols/maintain/prompts/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ If the run was not tied to any issue, the `Closes` line can be omitted.
```bash
git push origin HEAD

gh pr create --title "[Maintain] Codebase maintenance run NNNN" --body "$(cat <<'PREOF'
export CODEV_PR_TITLE="[Maintain] Codebase maintenance run NNNN"
export CODEV_PR_BODY="$(cat <<'PREOF'
## Summary

<2-3 bullet points of what was done>
Expand All @@ -67,8 +68,12 @@ Closes #<N> <!-- Only if this run was triggered by a GitHub issue. Use "Refs #<
- [x] Documentation links resolve
PREOF
)"

{{pr_create_command}}
```

The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It takes `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — from the environment, which is why they are exported rather than prefixed onto the command line: an inline override that spells `--title "$CODEV_PR_TITLE"` needs them set in the calling shell too. It prints `{"number": <int>, "url": "<url>"}`.

## Signals

When PR is created:
Expand Down
17 changes: 10 additions & 7 deletions codev-skeleton/protocols/pir/prompts/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,16 @@ git push
PR_TITLE="<concise description of the change>"
BRANCH="$(git branch --show-current)"

gh pr create \
--base main \
--head "$BRANCH" \
--title "$PR_TITLE" \
--body-file codev/reviews/{{artifact_name}}.md
export CODEV_PR_TITLE="$PR_TITLE"
export CODEV_PR_BODY="$(cat codev/reviews/{{artifact_name}}.md)"
export CODEV_PR_BASE=main
export CODEV_PR_HEAD="$BRANCH"

{{pr_create_command}}
```

The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It prints `{"number": <int>, "url": "<url>"}`. The inputs are **exported** so an inline override that spells `--title "$CODEV_PR_TITLE"` sees them too. The body goes in as an environment variable, not `--body-file` — read the created PR back and confirm the body arrived intact before moving on.

**Verify the PR body contains `Fixes #{{issue.number}}`** (it should — the review file has it at the top). If somehow missing, edit and re-apply:

```bash
Expand Down Expand Up @@ -154,7 +157,7 @@ For any `REQUEST_CHANGES`:

1. Read the finding in full (`codev/projects/{{project_id}}-*/{{project_id}}-<model>.txt`).
2. **Assess it honestly:**
- **Real defect** (correctness / cancellation / security / data-loss): fix it in code, add a regression test that fails without the fix, commit + push (the PR updates automatically — no new `gh pr create`). Then document the finding, your fix, and the pinning test in the review file's **"Things to Look At During PR Review"** section.
- **Real defect** (correctness / cancellation / security / data-loss): fix it in code, add a regression test that fails without the fix, commit + push (the PR updates automatically — no second PR). Then document the finding, your fix, and the pinning test in the review file's **"Things to Look At During PR Review"** section.
- **False positive / out of scope**: write a brief rebuttal in that same section explaining why no change is warranted.
3. Do **not** re-run `porch done` expecting another consultation pass — `max_iterations: 1` means it will not re-review. Proceed to step 7.

Expand Down Expand Up @@ -257,7 +260,7 @@ Together with the `--pr` record from step 4a and the `--merged` record from step
```
- Resolve conflicts (do NOT use destructive shortcuts)
- Force-push with lease: `git push --force-with-lease`
- Re-run `gh pr create`
- Re-run the PR creation command from step 4

**If porch's consultation fails (e.g., model unavailable):**
- `porch done` will report the failure. Inspect `codev/projects/{{project_id}}-*/{{project_id}}-<model>.txt` for the failure details.
Expand Down
7 changes: 6 additions & 1 deletion codev-skeleton/protocols/spir/prompts/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ The review's `## Architecture Updates` and `## Lessons Learned Updates` sections
The PR body must carry `Closes #<N>` (feature) or `Fixes #<N>` (bug) for the driving issue — one keyword per issue if several — so GitHub auto-closes on merge. **Exception:** a PR that only partially addresses its issue uses `Refs #<N>` or `Part of #<N>` instead, leaving the issue open for the follow-up.

```bash
gh pr create --title "[Spec {{project_id}}] {{title}}" --body "$(cat <<'EOF'
export CODEV_PR_TITLE="[Spec {{project_id}}] {{title}}"
export CODEV_PR_BODY="$(cat <<'EOF'
## Summary
[what was implemented]

Expand All @@ -63,8 +64,12 @@ codev/specs/{{artifact_name}}.md
codev/reviews/{{artifact_name}}.md
EOF
)"

{{pr_create_command}}
```

The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It takes `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — from the environment, which is why they are exported rather than prefixed onto the command line: an inline override that spells `--title "$CODEV_PR_TITLE"` needs them set in the calling shell too. It prints `{"number": <int>, "url": "<url>"}`.

## Signals

- Review document complete:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
id: bugfix-1455
title: pr-create-is-not-a-forge-conce
protocol: bugfix
phase: verified
plan_phases: []
current_plan_phase: null
gates:
pr:
status: approved
requested_at: '2026-08-14T13:32:49.424Z'
approved_at: '2026-08-14T13:33:26.924Z'
iteration: 1
build_complete: false
history: []
started_at: '2026-08-14T04:34:29.595Z'
updated_at: '2026-08-14T13:33:34.558Z'
pr_history:
- phase: pr
pr_number: 1458
branch: builder/bugfix-1455
created_at: '2026-08-14T12:36:11.217Z'
pr_ready_for_human: false
7 changes: 6 additions & 1 deletion codev/protocols/air/prompts/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Open the PR with the review embedded in its body, optionally run CMAP, and notif
The body must carry `Closes #<N>` for the driving issue — one per issue if several — so GitHub auto-closes it on merge. **Exception:** a partial fix uses `Refs #<N>` or `Part of #<N>` instead. Substitute the real number for `<N>`; leave no `{{...}}` tag or `<N>` placeholder in the committed body.

```bash
gh pr create --title "[Air #<N>] feat: <brief description>" --body "$(cat <<'EOF'
export CODEV_PR_TITLE="[Air #<N>] feat: <brief description>"
export CODEV_PR_BODY="$(cat <<'EOF'
## Summary

<1-2 sentence description of the feature>
Expand All @@ -44,8 +45,12 @@ Closes #<N> <!-- Substitute <N>; use "Refs #<N>" for a partial fix -->
<anything the reviewer should focus on, or "Standard implementation — no special concerns">
EOF
)"

{{pr_create_command}}
```

The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It takes `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — from the environment, which is why they are exported rather than prefixed onto the command line: an inline override that spells `--title "$CODEV_PR_TITLE"` needs them set in the calling shell too. It prints `{"number": <int>, "url": "<url>"}`.

## Optional CMAP review

CMAP is your judgement call for AIR. Skip it for simple changes (config, small UI); run it for features touching core logic or several modules:
Expand Down
7 changes: 6 additions & 1 deletion codev/protocols/aspir/prompts/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ The review's `## Architecture Updates` and `## Lessons Learned Updates` sections
The PR body must carry `Closes #<N>` (feature) or `Fixes #<N>` (bug) for the driving issue — one keyword per issue if several — so GitHub auto-closes on merge. **Exception:** a PR that only partially addresses its issue uses `Refs #<N>` or `Part of #<N>` instead, leaving the issue open for the follow-up.

```bash
gh pr create --title "[Spec {{project_id}}] {{title}}" --body "$(cat <<'EOF'
export CODEV_PR_TITLE="[Spec {{project_id}}] {{title}}"
export CODEV_PR_BODY="$(cat <<'EOF'
## Summary
[what was implemented]

Expand All @@ -63,8 +64,12 @@ codev/specs/{{artifact_name}}.md
codev/reviews/{{artifact_name}}.md
EOF
)"

{{pr_create_command}}
```

The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It takes `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — from the environment, which is why they are exported rather than prefixed onto the command line: an inline override that spells `--title "$CODEV_PR_TITLE"` needs them set in the calling shell too. It prints `{"number": <int>, "url": "<url>"}`.

## Signals

- Review document complete:
Expand Down
7 changes: 6 additions & 1 deletion codev/protocols/bugfix/prompts/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Open the PR, run CMAP review on it, address feedback, and hand off to the archit
The PR body must carry `Fixes #<N>` for the driving issue — one per issue if several — so GitHub auto-closes it on merge. **Exception:** a PR that only partially addresses the issue uses `Refs #<N>` or `Part of #<N>` instead, leaving it open for the follow-up. Substitute the real number for `<N>`; leave no `{{...}}` tag or `<N>` placeholder in the committed body.

```bash
gh pr create --title "Fix #<N>: <brief description>" --body "$(cat <<'EOF'
export CODEV_PR_TITLE="Fix #<N>: <brief description>"
export CODEV_PR_BODY="$(cat <<'EOF'
## Summary

<1-2 sentence description of the bug and fix>
Expand All @@ -38,8 +39,12 @@ Fixes #<N> <!-- Substitute <N>; use "Refs #<N>" for a partial fix -->
- [ ] All tests pass
EOF
)"

{{pr_create_command}}
```

The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It takes `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — from the environment, which is why they are exported rather than prefixed onto the command line: an inline override that spells `--title "$CODEV_PR_TITLE"` needs them set in the calling shell too. It prints `{"number": <int>, "url": "<url>"}`.

## Run CMAP review

BUGFIX runs its own 3-way consultation on the PR (porch does not do it for you). Dispatch all three in the background:
Expand Down
3 changes: 2 additions & 1 deletion codev/protocols/bugfix/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ refactor surrounding code, fix unrelated bugs (file separate issues), or add fea
[Bugfix #42] Test: regression for unencoded username
```

**PR** — open with `gh pr create`, body carrying Summary, Root Cause, Fix and Test Plan plus
**PR** — open with the `pr-create` forge concept command the PR-phase prompt hands you (`gh
pr create` on GitHub), body carrying Summary, Root Cause, Fix and Test Plan plus
`Fixes #<N>` so the issue closes on merge. Run one CMAP pass (Gemini, Codex, Claude), record
each verdict, and address or rebut every `REQUEST_CHANGES`. Notify the architect with the
verdicts, then `porch done <id>` and wait.
Expand Down
7 changes: 6 additions & 1 deletion codev/protocols/maintain/prompts/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ If the run was not tied to any issue, the `Closes` line can be omitted.
```bash
git push origin HEAD

gh pr create --title "[Maintain] Codebase maintenance run NNNN" --body "$(cat <<'PREOF'
export CODEV_PR_TITLE="[Maintain] Codebase maintenance run NNNN"
export CODEV_PR_BODY="$(cat <<'PREOF'
## Summary

<2-3 bullet points of what was done>
Expand All @@ -67,8 +68,12 @@ Closes #<N> <!-- Only if this run was triggered by a GitHub issue. Use "Refs #<
- [x] Documentation links resolve
PREOF
)"

{{pr_create_command}}
```

The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It takes `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — from the environment, which is why they are exported rather than prefixed onto the command line: an inline override that spells `--title "$CODEV_PR_TITLE"` needs them set in the calling shell too. It prints `{"number": <int>, "url": "<url>"}`.

## Signals

When PR is created:
Expand Down
Loading