Skip to content

Prompt sweep: fix broken commands, the porch-approve contradiction, and three owner rulings across roles, skills, templates and non-PIR protocols #1902

Closed

Description

@waleedkadous

Problem

A sweep of every shipped prompt (roles, templates, skills, protocols) on 2026-11-15 found instructions that fail when followed and rules stated in opposite ways. This issue covers everything outside protocols/pir/ (PIR has its own issue). Text edits only unless noted. Mirror every change in BOTH codev-skeleton/ and codev/ (and the repo-local .claude/skills/ copies). Line numbers are for codev-skeleton/ at d3ffaa1.

The ~300-line BUGFIX guideline does not apply: this is many small text edits by design. Verify each claim against the CLI source before editing; the sweep is evidence, not ground truth.

A. Commands that fail as written

  1. roles/architect.md:55 and resources/risk-triage.md:32: consult -m claude --type integration pr <N> is rejected ("Unknown subcommand: pr"). Correct form uses --issue <N>.
  2. protocols/research/builder-prompt.md:51-53: passes both --prompt and --prompt-file; consult throws "Cannot use both".
  3. .claude/skills/porch/SKILL.md:14,56 and root CLAUDE.md Tooling line: porch run has been removed (porch exits 1). Use porch next. Add porch verify to the skill's list.
  4. .claude/skills/consult/SKILL.md:76-77, templates/pr-overview.md:60-68: --type spec|plan|pr without --protocol does not resolve; only --type integration works bare.
  5. templates/pr-overview.md:63,72-73: describes --context - (stdin) and a filesystem-less mode; neither exists.
  6. templates/CLAUDE.md:52-55 and root CLAUDE.md/AGENTS.md: "afx spawn --protocol <name> --help succeeds if registered" exits 0 for any name. Replace with a check that can fail, or drop it.

B. Who runs porch approve (ruling already in the role docs)

The builder runs it after the architect relays the human's decision, with --a-human-explicitly-approved-this. Bring into line:

  • .claude/skills/porch/SKILL.md:53,55,57 ("Builders must NEVER call porch approve", architect subshell recipe).
  • protocols/bugfix/prompts/pr.md:69 (reads as the architect typing it; omits the flag).
  • roles/builder.md:26 (omits the flag).
  • templates/lifecycle.md:132 ("tell the Architect to mark it approved").

C. Owner rulings (M Waleed Kadous, 2026-11-15)

  1. The builder writes specs and plans; the architect reviews them at the gates. Fix templates/lifecycle.md:19,31,43, templates/cheatsheet.md:74, root CLAUDE.md "Architects create specs and plans".
  2. BUGFIX and AIR get three reviewers by default (gemini, codex, claude), reducible per project through .codev/config.json porch.consultation. Today bugfix/protocol.json:78,107 and air/protocol.json:61,101 say two and type impl while the prose says three and type pr; and because the builder hand-runs the three consult lines from bugfix/prompts/pr.md / air/prompts/pr.md, the project config override is not honoured there (it is honoured in porch-driven verify via resolveConsultationModels). Required outcome: JSON and prose agree on three, and a project's configured lane list is what actually runs. Pick the smallest mechanism; if it needs more than a small code change, stop and tell the architect.
  3. Fix in place. A small adjacent bug found during the work is fixed in the same PR. A follow-up issue is for work that needs something unavailable now (a device, an owner decision), touches a different subsystem, or is a large refactor. Replace "file separate issues" in bugfix/prompts/fix.md:16, bugfix/protocol.md:23,68,69, maintain/protocol.md:53, the bugfix reviewer prompts' "no drive-by fixes" wording, and add the rule to roles/builder.md and roles/architect.md. Make the 300-line figure a guideline everywhere (bugfix/builder-prompt.md:35,43, fix.md:19 vs protocol.md:52-54).

D. Other contradictions and stale text

  • Gate lists: roles/builder.md:20, .claude/skills/porch/SKILL.md:32-34, templates/lifecycle.md:113-118, root CLAUDE.md Gates section. Make them match the protocol.json files (pr in SPIR/ASPIR/AIR/BUGFIX/PIR; PIR plan-approval and dev-approval; SPIR/ASPIR verify-approval; MAINTAIN maintain-complete; RESEARCH and EXPERIMENT gates).
  • Dead signal machinery: TOO_COMPLEX, PHASE_COMPLETE, <signal> blocks, on_too_complex: escalate in bugfix, AIR, maintain, SPIR, ASPIR prompts and JSON. Nothing parses them. Replace with the working path (afx send architect + porch done).
  • SPIR/ASPIR prompts say "porch runs the consultation, do not run consult" (spir/prompts/specify.md:59, plan.md:54, review.md:84, aspir copies); porch actually emits the consult commands for the builder to run. Also spir/prompts/implement.md:20 says porch commits; it does not, and no phase prompt tells the builder to commit.
  • spir/consult-types/pr-review.md:5,46 says the PR is about to be opened; it already exists. spir/builder-prompt.md:67 vs spir/prompts/review.md:42 on when the PR opens. spir/protocol.md:74,107-108 (gate list; phase status that does not exist). Branch names in spir/protocol.md:101, air/protocol.md:60 (real: builder/<protocol>-<id>).
  • ASPIR: copied prompts keep human-gate wording; aspir/protocol.md:28 points at a file not delivered to the builder; builder-prompt drops rules SPIR has.
  • AIR: Baked Decisions text refers to spec and plan AIR does not have; escalation target differs (ASPIR vs SPIR or ASPIR).
  • MAINTAIN: reviewer prompts are unmodified SPIR copies demanding spec/plan/review; soft-delete (builder-prompt.md:30, protocol.md:33) vs git rm (prompts/maintain.md:46); prompts/review.md:36-37 vs the "not for one targeted cleanup" scope; templates/maintenance-run.md:13 cites a nonexistent Step 3a; prompts hardcode cd packages/codev; the gate is never mentioned in prose. Sync codev/protocols/maintain/protocol.md with the skeleton and remove the two orphan templates if nothing references them.
  • BUGFIX: three commit formats (protocol.md:26, fix.md:21, reviewer prompts); "SPIR/TICK" in consult-types/impl-review.md:21, pr-review.md:13; flaky-test handling (roles/builder.md:115 vs bugfix/protocol.md:68); post-merge message (roles/builder.md:56 vs porch's actual text); Fixes #N auto-close vs "builders don't close issues".
  • RESEARCH: protocol.md:5-7 says the JSON is authoritative with one model; the builder prompt runs three and nothing reads the JSON block.
  • TICK remnants in repo-local .claude/skills/afx and .claude/skills/porch.
  • afx skill: says --branch does not exist (it does, with --remote); protocol list omits PIR (also consult/SKILL.md:42); omits --delay, afx inbox, afx self-refresh; claims afx send needs zero-padded IDs (it does not); describes send as builder-only.
  • Cheatsheet: ports 4200/4300; protocol table lists four of the protocols; codev import description; & + wait background pattern (also consult/SKILL.md:85-88, pr-overview.md, bugfix/prompts/pr.md:53-58) vs "run_in_background, not a trailing &".
  • templates/CLAUDE.md:112-116: "three CLI tools", afx start, consult subcommands that do not exist; omits porch.
  • roles/architect.md:86-88: "work from anywhere" next to "only from the main workspace root".
  • .claude/skills/codev/SKILL.md:60: doctor's AI-CLI list.
  • ID placeholders XXXX/NNN vs "no leading zeros".
  • protocols/protocol-schema.json does not describe the protocol.json files (gate shape, build_verify, missing keys).
  • RELEASE (codev/protocols/release/protocol.md): has the architect commit and push to main; release-notes filename; stale codename table. Flag to the architect rather than rewriting the procedure.

Out of scope

Anything under protocols/pir/, and the {{issue.number}} substitution problem (owned by the PIR issue, including the AIR prompt occurrences). Do not edit those.

Testing

Run every command you write into a prompt (--help or a dry invocation) and say so in the PR. Existing skeleton/prompt tests must pass. CLAUDE.md and AGENTS.md stay byte-identical. Grep both trees for each removed term (porch run, TICK, TOO_COMPLEX, integration pr) before claiming done.

Activity

  1. added
    area/protocols
    on Nov 16, 2026
  2. waleedkadous commented on Nov 16, 2026

    @waleedkadous
    ContributorAuthor

    On it! Working on a fix now.

  3. added 18 commits that reference this issue on Nov 16, 2026
  4. waleedkadous commented on Nov 16, 2026

    @waleedkadous
    ContributorAuthor

    Fixed by PR #1905 (merge commit ee6d2f6). On main; not yet in a published release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/protocols

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions