Repository navigation
Description
Problem
A prompt sweep on 2026-11-15 found that PIR's prompts, mainly protocols/pir/prompts/review.md, disagree with pir/protocol.json and with what porch does. A builder following them literally stalls or skips steps. Mirror every change in BOTH codev-skeleton/ and codev/. Line numbers are for codev-skeleton/ at d3ffaa1. Verify each claim against porch source before editing.
Findings
- Reviewer count.
pir/protocol.json:81lists["gemini","codex"];prompts/review.md:7,146,172andconsult-types/pr-review.md:5say three. Porch uses the JSON. Owner ruling (2026-11-15): three reviewers by default, reducible per project via.codev/config.jsonporch.consultation. - Wrong reviewer prompt at the PR.
protocol.json:80has"type": "impl", so the PR-time review loadsconsult-types/impl-review.md, which describes the already-passed dev-approval gate and demands a review file thatimplement.md:141forbids.consult-types/pr-review.mdis never used. Alsoimplement.md:110says the implement phase has no AI consult. - Who runs consult.
review.md:146,248says porch runs it automatically and a manual run doubles it; porch emits theconsultcommands as a task for the builder (next.ts:584-592).review.md:148(verdicts inporch doneoutput) is wrong for the same reason. - REQUEST_CHANGES handling.
review.md:147-161: rebuttal mechanism, "do not re-run porch done", output file names ({{project_id}}-gemini.txt; porch writes<id>-<phase>-iter<N>-<model>.txt), and a grep at:170-172for a line startingapprovewhen reviewers writeVERDICT: APPROVE, so every verdict reads UNKNOWN.:161vs:194contradict each other on re-runningporch done. - pr gate. Four accounts of who approves and merges (
protocol.md:33,35-36;review.md:7,178,186-192,217;protocol.json:73). The rule: the architect relays the human's approval, the builder runsporch approve <id> pr --a-human-explicitly-approved-this, then the builder merges withgh pr merge --merge. Remove the "wait for porch wake-up" and "human merges on GitHub" accounts. Same forplan.md:103,implement.md:126. - Gate notification.
plan.md:97says porch notifies the architect;protocol.md:38says it does not (correct).builder-prompt.md:63requires anafx sendat every gate; the phase prompts give no such step. Porch's own task text atnext.ts:354("The architect has already been notified") is stale too; fix it. - Post-approval verification.
review.md:201-204waits forgate_status: approvedinporch next(exists only inporch status --json);:210reads a.pr/historyfield (porch storespr_history[].pr_number);:136same. {{issue.number}}/{{issue.title}}never substituted in phase prompts.porch/prompts.ts:138matches\w+only. Affectspir/prompts/plan.md,implement.md,review.mdandair/prompts/implement.md,pr.md. Fix once (support the variables in porch, or use ones that exist) and cover both protocols.- Baked Decisions section is absent from PIR's protocol.md, builder-prompt, prompts and consult-types; the other protocols carry it.
- Minor: signal block used two ways (
plan.md:110vsreview.md:237); hardcodedmainatreview.md:48; "View Diff" vs "Review Diff"; dangling<slug>atplan.md:48;implement.md:161cites a verify block that is null; PR title/commit prefix conventions.
Scope
Owns protocols/pir/** in both trees, the {{issue.number}} fix (including the AIR prompt occurrences), and the stale porch task text. Another builder is editing the rest of the skeleton under a sibling issue; do not touch files outside this scope.
Testing
Unit test for the prompt-variable fix. Then walk a PIR project through review with porch in a scratch workspace (or by reading each emitted task) and confirm every command and field the prompt names exists and matches. Say in the PR which path you exercised.
Activity
waleedkadous commentedon Nov 16, 2026
On it! Working on a fix now.
Fix #1903: porch substitutes {{issue.number}}/{{issue.title}}; gate t…
[Bugfix #1903] PIR prompts match porch: reviewers, verdicts, rebuttal…
[Bugfix #1903] CMAP: issue lookup uses the workspace forge; pin PIR c…
[Bugfix #1903] Thread: PR + CMAP notes
[Bugfix #1903] Architect fold-ins: pin PIR prompts, {{pr_merge_comman…
[Bugfix #1903] Thread: architect fold-ins
waleedkadous commentedon Nov 16, 2026
Fixed by PR #1904 (merge commit 618612d): porch renders the issue variables, and the PIR prompts now match porch. On main; not yet in a published release.
[Bugfix #1902] Test: #1903's shipped-prompt render carries each phase…
[Spec 1658] Merge main (#1902 agent-facing docs and porch prompt rend…