Community라이팅 & 에디팅github.com

elpy1/parliament-codex

Parliament is tool that runs blind multi-model review panels from a Codex judge

지원 대상Claude CodeCodex CLI~CursorGemini CLI
npx skills add elpy1/parliament-codex

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

문서

Parliament: panel → judge

The active Codex session is the judge and final implementer. Fresh CLI sessions are blind panelists. Do not solve the task first and then ask panelists to endorse an anchored answer.

Invariants

  • Send every panelist the same substantive user request.
  • Keep panelists independent; never include another panelist's output in their prompt.
  • Run panelists concurrently in separate disposable workspaces.
  • Judge candidate work without reading provider identities first.
  • Treat panel answers as evidence, not authority. Verify decisive claims.
  • For artifact work, only the active judge edits the live workspace.

1. Resolve the runner and capture the task

Let SKILL_DIR be the directory containing this SKILL.md. The runner is:

PARLIAMENT="$SKILL_DIR/scripts/parliament"

Write the user's substantive request verbatim to a private temporary UTF-8 file. Omit only the invocation phrase such as $parliament; preserve all task constraints, paths, examples, and requested output formats. Use a unique file, restrict it to the current user, and remove it after fan-out:

PROMPT_FILE="$(mktemp "${TMPDIR:-/tmp}/parliament-prompt.XXXXXX")"
chmod 600 "$PROMPT_FILE"
trap 'rm -f "$PROMPT_FILE"' EXIT

Choose a profile only when the user specified one. Otherwise use auto, which selects the richest available profile and degrades gracefully:

  • codex-codex
  • codex-claude
  • codex-gemini
  • codex-claude-gemini
  • claude-gemini

2. Detect and fan out

Show the informational preflight before spending model calls:

"$PARLIAMENT" preflight \
  --profile auto \
  --prompt-file "$PROMPT_FILE"

This resolves graceful fallback and prints a rough input-size/call estimate. It is not a quality gate; continue unless no provider is available or the user stops the run.

Run the panel from the target repository root:

"$PARLIAMENT" run \
  --cwd "$PWD" \
  --profile auto \
  --prompt-file "$PROMPT_FILE" \
  --json

Use the returned run_dir. Child CLIs need their normal authentication and network access. If the outer Codex sandbox blocks the orchestration command, request narrowly scoped user-approved escalation for that one command rather than weakening every provider.

While the runner is active, avoid repeated waiting updates. Report only approval prompts, completion, timeout/failure, or a meaningful status change.

A failed or empty panelist must not abort surviving work. The runner will fall back from AGY to Gemini when possible and will preserve partial workspace changes.

3. Enforce the identity embargo

Read blind-manifest.md, panel output.md files, changes.json, changes.patch, and candidate workspaces. Do not read provenance.json or anything under provenance/ yet.

Draft the comparison in judge/analysis.md using the judge rubric. Explicitly cover:

  • independent approaches;
  • strong agreements;
  • material contradictions;
  • partial coverage and omissions;
  • unique useful insights;
  • judge verification;
  • selection or merge decision;
  • residual blind spots.

Do not use majority vote to settle a factual or technical disagreement.

4. Choose the delivery track

Track A — code or other artifacts

Follow the artifact protocol. Inspect and test candidates in their disposable workspaces, then implement or merge the best result in the live workspace. Run relevant live checks before finalizing.

Track B — research, analysis, or advice

Synthesize a single answer that preserves supported consensus, resolves contradictions with evidence, incorporates complementary insights, and labels remaining uncertainty. Do not expose a transcript-shaped answer unless the user requested one.

5. Finalize provenance

After judge/analysis.md has been written, open provenance.json. Add a compact provenance section to judge/final.md containing the run ID, resolved profile, panel statuses, and any fallback—not a dump of raw logs.

Mark the run complete:

"$PARLIAMENT" finalize \
  --run-dir "$RUN_DIR" \
  --analysis-file "$RUN_DIR/judge/analysis.md" \
  --final-file "$RUN_DIR/judge/final.md"

Present the validated final answer or artifact summary to the user and include the run directory for auditability. Read security notes before enabling unsafe flags or including secrets.

관련 스킬