Skip to content

feat: review faculty — the ship gate's automatic-review leg#37

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/review-faculty
Jul 8, 2026
Merged

feat: review faculty — the ship gate's automatic-review leg#37
Jammy2211 merged 1 commit into
mainfrom
feature/review-faculty

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Adds agents/faculties/review/ — a read-only faculty, the automatic-review leg of the autonomous-ship gate (AUTONOMY.md). A stdlib entrypoint (bin/pyauto-brain review --task <name> / --repo <path> / --json) prepares the ReviewSurface per repo: merge-base against origin/main, commits ahead, diff stat, changed files, risk flags. The verdict (CLEAN / FINDINGS / BLOCKED) is produced by the reviewing agent following the procedure in the faculty's AGENTS.md — code review at high effort + a verify pass — mirroring how vitals' script reads Heart and the agent reasons over the result.

Boundary settled and recorded in the faculty doc: a diff review is a side-effect-free opinion (the definition of a faculty), not a Heart check — Heart never sees feature branches and stays the sole release authority; this faculty gates the dev workflow's ship step only and never fixes what it finds.

Registered in bin/pyauto-brain (help/dispatch), the AGENTS.md faculties list, and noted in WORKFLOW.md's Autonomy section. Ship-path gate composition is series tasks 3–4. Task 2 of PyAutoMind/feature/autonomy/.

Closes #36.

API Changes

Added CLI surface: pyauto-brain review [--task <name> | --repo <path>] [--json] — read-only; exit codes 0/4/5. No changes to existing commands.

Test Plan

  • bin/pyauto-brain help lists the faculty; help review prints its doc
  • review --task <this-task> emits the correct surface for this very branch (dogfooded)
  • no-diff path exits 4 with a clear message; --json parses
  • verdict stays agent-side: script exit codes never encode findings
Full API Changes (for automation & release notes)

Added

  • pyauto-brain review (faculty) — ReviewSurface preparation; verdict semantics CLEAN/FINDINGS/BLOCKED defined in agents/faculties/review/AGENTS.md

🤖 Generated with Claude Code

https://claude.ai/code/session_013UptUDNTYiB7izaQJBAKgS

Adds agents/faculties/review/: a read-only faculty that prepares a
feature branch's ReviewSurface (merge-base, commits ahead, diff stat,
changed files, risk flags) via a stdlib entrypoint; the reviewing agent
maps it to CLEAN/FINDINGS/BLOCKED per the documented procedure.
Boundary settled in AGENTS.md: a diff review is a side-effect-free
opinion (faculty), not a Heart check — Heart stays the sole release
authority. Registered in bin/pyauto-brain; ship-path gate composition
lands with series tasks 3-4.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013UptUDNTYiB7izaQJBAKgS
Copilot AI review requested due to automatic review settings July 8, 2026 12:11
@Jammy2211 Jammy2211 merged commit 303e2ca into main Jul 8, 2026
1 check passed
@Jammy2211 Jammy2211 deleted the feature/review-faculty branch July 8, 2026 12:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new review faculty to PyAutoBrain as the automatic-review leg of the autonomous ship gate: a read-only surface generator (ReviewSurface) that the reviewing agent uses to produce a CLEAN / FINDINGS / BLOCKED verdict, without involving Heart or performing side effects.

Changes:

  • Introduces agents/faculties/review/ with docs + deterministic entrypoint that emits per-repo ReviewSurface (merge-base vs origin/main, commits ahead, changed files, risk flags).
  • Registers the new faculty in bin/pyauto-brain dispatch/help and in the repo-level agent documentation.
  • Notes the review faculty’s role in the workflow autonomy doctrine (skills/WORKFLOW.md).

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
skills/WORKFLOW.md Documents the review faculty as the ship gate’s automatic-review leg.
bin/pyauto-brain Adds review faculty to CLI dispatch, help text, and ordering.
agents/faculties/review/review.sh New deterministic entrypoint wrapper invoking the stdlib surface script.
agents/faculties/review/AGENTS.md Defines boundary, verdict semantics, and the review procedure contract.
agents/faculties/review/_review.py Implements ReviewSurface generation and CLI output (--json / human).
AGENTS.md Adds the review faculty to the canonical agent inventory and run examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +115 to +117
if not a.task and not a.repo:
print("review: pass --task <name> or --repo <path>", file=sys.stderr)
return 5
Comment on lines +118 to +121
repos = resolve_repos(a.task or None, a.repo)
if not repos:
print("review: could not resolve any repo checkout", file=sys.stderr)
return 4
Comment on lines +2 to +3
# agents/faculties/review/review.sh — the review faculty (a PyAutoBrain
# read-only reasoning capability). It reviews the change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review faculty: automatic branch-review verdict for the ship gate

2 participants