From 5c128531243a63509451bf22691164ff43768a3b Mon Sep 17 00:00:00 2001 From: pseudo Date: Thu, 13 Aug 2026 22:27:13 -0600 Subject: [PATCH 01/15] chore(porch): bugfix-1455 init bugfix --- .../status.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml diff --git a/codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml b/codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml new file mode 100644 index 000000000..8d10e6c25 --- /dev/null +++ b/codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml @@ -0,0 +1,14 @@ +id: bugfix-1455 +title: pr-create-is-not-a-forge-conce +protocol: bugfix +phase: investigate +plan_phases: [] +current_plan_phase: null +gates: + pr: + status: pending +iteration: 1 +build_complete: false +history: [] +started_at: '2026-08-14T04:27:13.239Z' +updated_at: '2026-08-14T04:27:13.241Z' From 949d355986a3af0e37394b298b735c3d7cf8719e Mon Sep 17 00:00:00 2001 From: pseudo Date: Thu, 13 Aug 2026 22:34:29 -0600 Subject: [PATCH 02/15] chore(porch): bugfix-1455 init bugfix --- .../status.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml diff --git a/codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml b/codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml new file mode 100644 index 000000000..7819a8a8c --- /dev/null +++ b/codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml @@ -0,0 +1,14 @@ +id: bugfix-1455 +title: pr-create-is-not-a-forge-conce +protocol: bugfix +phase: investigate +plan_phases: [] +current_plan_phase: null +gates: + pr: + status: pending +iteration: 1 +build_complete: false +history: [] +started_at: '2026-08-14T04:34:29.595Z' +updated_at: '2026-08-14T04:34:29.596Z' From a6bbaed6b91ece70e0c682c6fe948f78af1f07fa Mon Sep 17 00:00:00 2001 From: pseudo Date: Thu, 13 Aug 2026 22:53:12 -0600 Subject: [PATCH 03/15] chore(porch): bugfix-1455 fix phase-transition --- .../bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml b/codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml index 7819a8a8c..b88eaec54 100644 --- a/codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml +++ b/codev/projects/bugfix-1455-pr-create-is-not-a-forge-conce/status.yaml @@ -1,7 +1,7 @@ id: bugfix-1455 title: pr-create-is-not-a-forge-conce protocol: bugfix -phase: investigate +phase: fix plan_phases: [] current_plan_phase: null gates: @@ -11,4 +11,4 @@ iteration: 1 build_complete: false history: [] started_at: '2026-08-14T04:34:29.595Z' -updated_at: '2026-08-14T04:34:29.596Z' +updated_at: '2026-08-14T04:53:12.811Z' From 908a25c3d47c90ecae7a0b89c07fd3f6ff0658ca Mon Sep 17 00:00:00 2001 From: pseudo Date: Thu, 13 Aug 2026 23:35:52 -0600 Subject: [PATCH 04/15] [Bugfix #1455] Fix: route PR creation through a pr-create forge concept MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `pr-create` was the one forge operation with no concept behind it. It was absent from KNOWN_CONCEPTS, no provider shipped a script for it, and every protocol prompt wrote `gh pr create` literally — so a project with `forge.provider: gitea` fully configured still shelled out to `gh` at the single most important write in the protocol, and only worked if someone kept a `gh`→forge shim on PATH. Contract (env in, JSON out — the shape every other concept uses, so it stays callable from executeForgeCommand): in: CODEV_PR_TITLE, CODEV_PR_BODY, and optional CODEV_PR_BASE / _HEAD / _REPO / _DRAFT out: {"number": , "url": ""} - scripts/forge/github/pr-create.sh — `gh pr create` with the flags it already took, so nothing changes for GitHub users. - scripts/forge/gitea/pr-create.sh — `tea pulls create --description` (not `--body`), tea's rendered output pushed to stderr, and the new PR looked up via `tea pulls list --output json` instead of parsing that rendered view. - scripts/forge/gitlab/pr-create.sh — `glab mr create`, marked UNVERIFIED (`glab` is not installed here); without it the gitlab preset falls through to `gh`, which is this bug. - porch substitutes `{{pr_create_command}}` into phase prompts, mirroring the existing `pr-merge` injection, and falls back to "open the PR manually" when the concept is disabled. Verified end to end against a live Forgejo with tea 0.14.2: the created PR's body, read back from the server, is byte-identical to the input (428 bytes, quotes/backticks/$VAR/backslash/fenced block all intact), and base, head and title match. On 0.14.2 with a single login and an explicit --head, `tea pulls create` needs no --repo/--login and does not prompt. Co-Authored-By: Claude Opus 5 --- .claude/skills/forge/SKILL.md | 1 + .codex/skills/forge/SKILL.md | 1 + codev-skeleton/protocols/air/prompts/pr.md | 7 +- .../protocols/aspir/prompts/review.md | 7 +- codev-skeleton/protocols/bugfix/prompts/pr.md | 7 +- codev-skeleton/protocols/bugfix/protocol.md | 3 +- .../protocols/maintain/prompts/review.md | 7 +- .../protocols/pir/prompts/review.md | 16 +- .../protocols/spir/prompts/review.md | 7 +- codev/protocols/air/prompts/pr.md | 7 +- codev/protocols/aspir/prompts/review.md | 7 +- codev/protocols/bugfix/prompts/pr.md | 7 +- codev/protocols/bugfix/protocol.md | 3 +- codev/protocols/maintain/prompts/review.md | 7 +- codev/protocols/pir/prompts/review.md | 16 +- codev/protocols/spir/prompts/review.md | 7 +- codev/resources/commands/forge.md | 1 + codev/state/bugfix-1455_thread.md | 121 +++++++++ .../codev/scripts/forge/gitea/pr-create.sh | 55 ++++ .../codev/scripts/forge/github/pr-create.sh | 39 +++ .../codev/scripts/forge/gitlab/pr-create.sh | 45 +++ .../bugfix-1455-pr-create-concept.test.ts | 256 ++++++++++++++++++ .../bugfix-685-close-keyword.test.ts | 12 +- packages/codev/src/__tests__/forge.test.ts | 9 +- .../bugfix-1455-pr-create-prompt.test.ts | 93 +++++++ packages/codev/src/commands/porch/prompts.ts | 17 +- packages/codev/src/lib/forge-contracts.ts | 15 + packages/codev/src/lib/forge.ts | 2 +- 28 files changed, 729 insertions(+), 46 deletions(-) create mode 100644 codev/state/bugfix-1455_thread.md create mode 100755 packages/codev/scripts/forge/gitea/pr-create.sh create mode 100755 packages/codev/scripts/forge/github/pr-create.sh create mode 100755 packages/codev/scripts/forge/gitlab/pr-create.sh create mode 100644 packages/codev/src/__tests__/bugfix-1455-pr-create-concept.test.ts create mode 100644 packages/codev/src/commands/porch/__tests__/bugfix-1455-pr-create-prompt.test.ts diff --git a/.claude/skills/forge/SKILL.md b/.claude/skills/forge/SKILL.md index be2c2062f..f24b4ae37 100644 --- a/.claude/skills/forge/SKILL.md +++ b/.claude/skills/forge/SKILL.md @@ -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) | diff --git a/.codex/skills/forge/SKILL.md b/.codex/skills/forge/SKILL.md index be2c2062f..f24b4ae37 100644 --- a/.codex/skills/forge/SKILL.md +++ b/.codex/skills/forge/SKILL.md @@ -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) | diff --git a/codev-skeleton/protocols/air/prompts/pr.md b/codev-skeleton/protocols/air/prompts/pr.md index f9e4f7abe..ea2690092 100644 --- a/codev-skeleton/protocols/air/prompts/pr.md +++ b/codev-skeleton/protocols/air/prompts/pr.md @@ -18,7 +18,8 @@ Open the PR with the review embedded in its body, optionally run CMAP, and notif The body must carry `Closes #` for the driving issue — one per issue if several — so GitHub auto-closes it on merge. **Exception:** a partial fix uses `Refs #` or `Part of #` instead. Substitute the real number for ``; leave no `{{...}}` tag or `` placeholder in the committed body. ```bash -gh pr create --title "[Air #] feat: " --body "$(cat <<'EOF' +CODEV_PR_TITLE="[Air #] feat: " \ +CODEV_PR_BODY="$(cat <<'EOF' ## Summary <1-2 sentence description of the feature> @@ -43,9 +44,11 @@ Closes # EOF -)" +)" {{pr_create_command}} ``` +Porch substitutes `{{pr_create_command}}` with your forge's `pr-create` concept command (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "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: diff --git a/codev-skeleton/protocols/aspir/prompts/review.md b/codev-skeleton/protocols/aspir/prompts/review.md index fa2112549..ef8c82e59 100644 --- a/codev-skeleton/protocols/aspir/prompts/review.md +++ b/codev-skeleton/protocols/aspir/prompts/review.md @@ -44,7 +44,8 @@ The review's `## Architecture Updates` and `## Lessons Learned Updates` sections The PR body must carry `Closes #` (feature) or `Fixes #` (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 #` or `Part of #` instead, leaving the issue open for the follow-up. ```bash -gh pr create --title "[Spec {{project_id}}] {{title}}" --body "$(cat <<'EOF' +CODEV_PR_TITLE="[Spec {{project_id}}] {{title}}" \ +CODEV_PR_BODY="$(cat <<'EOF' ## Summary [what was implemented] @@ -62,9 +63,11 @@ codev/specs/{{artifact_name}}.md ## Review codev/reviews/{{artifact_name}}.md EOF -)" +)" {{pr_create_command}} ``` +Porch substitutes `{{pr_create_command}}` with your forge's `pr-create` concept command (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "url": ""}`. + ## Signals - Review document complete: diff --git a/codev-skeleton/protocols/bugfix/prompts/pr.md b/codev-skeleton/protocols/bugfix/prompts/pr.md index 4dd89ff5c..0133573e1 100644 --- a/codev-skeleton/protocols/bugfix/prompts/pr.md +++ b/codev-skeleton/protocols/bugfix/prompts/pr.md @@ -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 #` 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 #` or `Part of #` instead, leaving it open for the follow-up. Substitute the real number for ``; leave no `{{...}}` tag or `` placeholder in the committed body. ```bash -gh pr create --title "Fix #: " --body "$(cat <<'EOF' +CODEV_PR_TITLE="Fix #: " \ +CODEV_PR_BODY="$(cat <<'EOF' ## Summary <1-2 sentence description of the bug and fix> @@ -37,9 +38,11 @@ Fixes # - [ ] Build passes - [ ] All tests pass EOF -)" +)" {{pr_create_command}} ``` +Porch substitutes `{{pr_create_command}}` with your forge's `pr-create` concept command (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "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: diff --git a/codev-skeleton/protocols/bugfix/protocol.md b/codev-skeleton/protocols/bugfix/protocol.md index 5854a9434..c1462e87a 100644 --- a/codev-skeleton/protocols/bugfix/protocol.md +++ b/codev-skeleton/protocols/bugfix/protocol.md @@ -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 #` 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 ` and wait. diff --git a/codev-skeleton/protocols/maintain/prompts/review.md b/codev-skeleton/protocols/maintain/prompts/review.md index c61e05fd5..5cf345a83 100644 --- a/codev-skeleton/protocols/maintain/prompts/review.md +++ b/codev-skeleton/protocols/maintain/prompts/review.md @@ -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' +CODEV_PR_TITLE="[Maintain] Codebase maintenance run NNNN" \ +CODEV_PR_BODY="$(cat <<'PREOF' ## Summary <2-3 bullet points of what was done> @@ -66,9 +67,11 @@ Closes # EOF -)" +)" {{pr_create_command}} ``` +Porch substitutes `{{pr_create_command}}` with your forge's `pr-create` concept command (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "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: diff --git a/codev/protocols/aspir/prompts/review.md b/codev/protocols/aspir/prompts/review.md index fa2112549..ef8c82e59 100644 --- a/codev/protocols/aspir/prompts/review.md +++ b/codev/protocols/aspir/prompts/review.md @@ -44,7 +44,8 @@ The review's `## Architecture Updates` and `## Lessons Learned Updates` sections The PR body must carry `Closes #` (feature) or `Fixes #` (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 #` or `Part of #` instead, leaving the issue open for the follow-up. ```bash -gh pr create --title "[Spec {{project_id}}] {{title}}" --body "$(cat <<'EOF' +CODEV_PR_TITLE="[Spec {{project_id}}] {{title}}" \ +CODEV_PR_BODY="$(cat <<'EOF' ## Summary [what was implemented] @@ -62,9 +63,11 @@ codev/specs/{{artifact_name}}.md ## Review codev/reviews/{{artifact_name}}.md EOF -)" +)" {{pr_create_command}} ``` +Porch substitutes `{{pr_create_command}}` with your forge's `pr-create` concept command (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "url": ""}`. + ## Signals - Review document complete: diff --git a/codev/protocols/bugfix/prompts/pr.md b/codev/protocols/bugfix/prompts/pr.md index 4dd89ff5c..0133573e1 100644 --- a/codev/protocols/bugfix/prompts/pr.md +++ b/codev/protocols/bugfix/prompts/pr.md @@ -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 #` 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 #` or `Part of #` instead, leaving it open for the follow-up. Substitute the real number for ``; leave no `{{...}}` tag or `` placeholder in the committed body. ```bash -gh pr create --title "Fix #: " --body "$(cat <<'EOF' +CODEV_PR_TITLE="Fix #: " \ +CODEV_PR_BODY="$(cat <<'EOF' ## Summary <1-2 sentence description of the bug and fix> @@ -37,9 +38,11 @@ Fixes # - [ ] Build passes - [ ] All tests pass EOF -)" +)" {{pr_create_command}} ``` +Porch substitutes `{{pr_create_command}}` with your forge's `pr-create` concept command (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "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: diff --git a/codev/protocols/bugfix/protocol.md b/codev/protocols/bugfix/protocol.md index 5854a9434..c1462e87a 100644 --- a/codev/protocols/bugfix/protocol.md +++ b/codev/protocols/bugfix/protocol.md @@ -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 #` 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 ` and wait. diff --git a/codev/protocols/maintain/prompts/review.md b/codev/protocols/maintain/prompts/review.md index c61e05fd5..5cf345a83 100644 --- a/codev/protocols/maintain/prompts/review.md +++ b/codev/protocols/maintain/prompts/review.md @@ -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' +CODEV_PR_TITLE="[Maintain] Codebase maintenance run NNNN" \ +CODEV_PR_BODY="$(cat <<'PREOF' ## Summary <2-3 bullet points of what was done> @@ -66,9 +67,11 @@ Closes # EOF -)" {{pr_create_command}} +)" + +{{pr_create_command}} ``` -The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "url": ""}`. +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": , "url": ""}`. ## Optional CMAP review diff --git a/codev-skeleton/protocols/aspir/prompts/review.md b/codev-skeleton/protocols/aspir/prompts/review.md index 91cb4a279..a3bd72903 100644 --- a/codev-skeleton/protocols/aspir/prompts/review.md +++ b/codev-skeleton/protocols/aspir/prompts/review.md @@ -44,8 +44,8 @@ The review's `## Architecture Updates` and `## Lessons Learned Updates` sections The PR body must carry `Closes #` (feature) or `Fixes #` (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 #` or `Part of #` instead, leaving the issue open for the follow-up. ```bash -CODEV_PR_TITLE="[Spec {{project_id}}] {{title}}" \ -CODEV_PR_BODY="$(cat <<'EOF' +export CODEV_PR_TITLE="[Spec {{project_id}}] {{title}}" +export CODEV_PR_BODY="$(cat <<'EOF' ## Summary [what was implemented] @@ -63,10 +63,12 @@ codev/specs/{{artifact_name}}.md ## Review codev/reviews/{{artifact_name}}.md EOF -)" {{pr_create_command}} +)" + +{{pr_create_command}} ``` -The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "url": ""}`. +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": , "url": ""}`. ## Signals diff --git a/codev-skeleton/protocols/bugfix/prompts/pr.md b/codev-skeleton/protocols/bugfix/prompts/pr.md index 0548514fe..a45a2f87f 100644 --- a/codev-skeleton/protocols/bugfix/prompts/pr.md +++ b/codev-skeleton/protocols/bugfix/prompts/pr.md @@ -16,8 +16,8 @@ Open the PR, run CMAP review on it, address feedback, and hand off to the archit The PR body must carry `Fixes #` 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 #` or `Part of #` instead, leaving it open for the follow-up. Substitute the real number for ``; leave no `{{...}}` tag or `` placeholder in the committed body. ```bash -CODEV_PR_TITLE="Fix #: " \ -CODEV_PR_BODY="$(cat <<'EOF' +export CODEV_PR_TITLE="Fix #: " +export CODEV_PR_BODY="$(cat <<'EOF' ## Summary <1-2 sentence description of the bug and fix> @@ -38,10 +38,12 @@ Fixes # - [ ] Build passes - [ ] All tests pass EOF -)" {{pr_create_command}} +)" + +{{pr_create_command}} ``` -The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "url": ""}`. +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": , "url": ""}`. ## Run CMAP review diff --git a/codev-skeleton/protocols/maintain/prompts/review.md b/codev-skeleton/protocols/maintain/prompts/review.md index b448ff579..ecdcd4d68 100644 --- a/codev-skeleton/protocols/maintain/prompts/review.md +++ b/codev-skeleton/protocols/maintain/prompts/review.md @@ -46,8 +46,8 @@ If the run was not tied to any issue, the `Closes` line can be omitted. ```bash git push origin HEAD -CODEV_PR_TITLE="[Maintain] Codebase maintenance run NNNN" \ -CODEV_PR_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> @@ -67,10 +67,12 @@ Closes # EOF -)" {{pr_create_command}} +)" + +{{pr_create_command}} ``` -The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "url": ""}`. +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": , "url": ""}`. ## Optional CMAP review diff --git a/codev/protocols/aspir/prompts/review.md b/codev/protocols/aspir/prompts/review.md index 91cb4a279..a3bd72903 100644 --- a/codev/protocols/aspir/prompts/review.md +++ b/codev/protocols/aspir/prompts/review.md @@ -44,8 +44,8 @@ The review's `## Architecture Updates` and `## Lessons Learned Updates` sections The PR body must carry `Closes #` (feature) or `Fixes #` (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 #` or `Part of #` instead, leaving the issue open for the follow-up. ```bash -CODEV_PR_TITLE="[Spec {{project_id}}] {{title}}" \ -CODEV_PR_BODY="$(cat <<'EOF' +export CODEV_PR_TITLE="[Spec {{project_id}}] {{title}}" +export CODEV_PR_BODY="$(cat <<'EOF' ## Summary [what was implemented] @@ -63,10 +63,12 @@ codev/specs/{{artifact_name}}.md ## Review codev/reviews/{{artifact_name}}.md EOF -)" {{pr_create_command}} +)" + +{{pr_create_command}} ``` -The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "url": ""}`. +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": , "url": ""}`. ## Signals diff --git a/codev/protocols/bugfix/prompts/pr.md b/codev/protocols/bugfix/prompts/pr.md index 0548514fe..a45a2f87f 100644 --- a/codev/protocols/bugfix/prompts/pr.md +++ b/codev/protocols/bugfix/prompts/pr.md @@ -16,8 +16,8 @@ Open the PR, run CMAP review on it, address feedback, and hand off to the archit The PR body must carry `Fixes #` 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 #` or `Part of #` instead, leaving it open for the follow-up. Substitute the real number for ``; leave no `{{...}}` tag or `` placeholder in the committed body. ```bash -CODEV_PR_TITLE="Fix #: " \ -CODEV_PR_BODY="$(cat <<'EOF' +export CODEV_PR_TITLE="Fix #: " +export CODEV_PR_BODY="$(cat <<'EOF' ## Summary <1-2 sentence description of the bug and fix> @@ -38,10 +38,12 @@ Fixes # - [ ] Build passes - [ ] All tests pass EOF -)" {{pr_create_command}} +)" + +{{pr_create_command}} ``` -The command above is your forge's `pr-create` concept, substituted by porch (`gh pr create` by default). It reads `CODEV_PR_TITLE` / `CODEV_PR_BODY` — optionally `CODEV_PR_BASE`, `CODEV_PR_HEAD`, `CODEV_PR_REPO` — and prints `{"number": , "url": ""}`. +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": , "url": ""}`. ## Run CMAP review diff --git a/codev/protocols/maintain/prompts/review.md b/codev/protocols/maintain/prompts/review.md index b448ff579..ecdcd4d68 100644 --- a/codev/protocols/maintain/prompts/review.md +++ b/codev/protocols/maintain/prompts/review.md @@ -46,8 +46,8 @@ If the run was not tied to any issue, the `Closes` line can be omitted. ```bash git push origin HEAD -CODEV_PR_TITLE="[Maintain] Codebase maintenance run NNNN" \ -CODEV_PR_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> @@ -67,10 +67,12 @@ Closes #