Skip to content
Development
Command

/start-rlcr-loop

Start iterative loop with Codex review

From plugin
humanize
1.4k5 skills4 agents5 commands4 hooks
Install
> /plugin marketplace add PolyArch/humanize
> /plugin install humanize@PolyArch

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/start-rlcr-loop

Context preview

What this command does when you run it.

Start iterative loop with Codex review

Command definition

start-rlcr-loop.md
description: "Start iterative loop with Codex review"
argument-hint: "[path/to/plan.md | --plan-file path/to/plan.md] [--max N] [--codex-model MODEL:EFFORT] [--codex-timeout SECONDS] [--track-plan-file] [--push-every-round] [--base-branch BRANCH] [--full-review-round N] [--skip-impl] [--claude-answer-codex] [--agent-teams] [--yolo] [--skip-quiz] [--privacy]"
allowed-tools:
  - "Bash(${CLAUDE_PLUGIN_ROOT}/scripts/setup-rlcr-loop.sh:*)"
  - "Read"
  - "Task"
  - "AskUserQuestion"

Start RLCR Loop

Plan Compliance Pre-Check

Before running the setup script, validate the plan file for compliance. This is a fool-proofing mechanism that catches obviously wrong plan files early.

**Skip this entire pre-check if** any of these conditions are true:

  • `$ARGUMENTS` contains `--skip-impl` (no plan file to validate)
  • `$ARGUMENTS` contains `-h` or `--help` (just showing help)

Extract the plan file path from arguments

Parse `$ARGUMENTS` to find the plan file path:

  • If `--plan-file <path>` is present, use `<path>`
  • Otherwise, use the first positional argument (the first argument that does not start with `--` and is not a value following a known flag like `--max`, `--codex-model`, `--codex-timeout`, `--base-branch`, `--full-review-round`, `--plan-file`)
  • If no plan file path can be determined, skip the pre-check and let the setup script handle the error

Basic path safety gate

Only proceed with the pre-check if the extracted path meets ALL of these conditions:

  • Is a relative path (does not start with forward slash)
  • Does not contain parent directory traversal (double dot path components)
  • Contains only safe path characters: letters, digits, hyphen, underscore, dot, and forward slash

If any condition fails, skip the pre-check and let the setup script handle path validation.

Read and validate plan content

1. Use the Read tool to read the plan file. If the file does not exist or cannot be read, skip the pre-check and let the setup script handle the error.

2. Use the Task tool to invoke the `humanize:plan-compliance-checker` agent (sonnet model):

   Task tool parameters:
   - model: "sonnet"
   - prompt: Include the plan file content and ask the agent to:
     1. Explore the repository structure (README, CLAUDE.md, main files)
     2. Check if the plan content relates to this repository
     3. Check if the plan contains branch-switching instructions
     4. Return exactly one of: `PASS: <summary>`, `FAIL_RELEVANCE: <reason>`, or `FAIL_BRANCH_SWITCH: <details>`

3. **Parse the result** (fail-closed):

  • If output contains `PASS`: continue to setup script below
  • If output contains `FAIL_RELEVANCE`: report "Plan compliance check failed: the plan does not appear to be related to this repository." Show the reason. **Stop the command.**
  • If output contains `FAIL_BRANCH_SWITCH`: report "Plan compliance check failed: the plan contains branch-switching instructions, which are incompatible with RLCR. The RLCR loop requires the working branch to remain constant across all rounds." Show the details. **Stop the command.**
  • If output contains none of the above (malformed): report "Plan compliance check produced unexpected output. Cannot proceed." **Stop the command.**

---

Plan Understanding Quiz

Before running the setup script, verify the user genuinely understands what the plan will do. This is an advisory check -- it never blocks the loop, but catches "wishful thinking" users who blindly accepted a generated plan without reading it.

**Skip this entire quiz if** any of these conditions are true:

  • `$ARGUMENTS` contains `--skip-impl` (no plan to quiz about)
  • `$ARGUMENTS` contains `--yolo` (user explicitly opted out of all pre-flight checks)
  • `$ARGUMENTS` contains `--skip-quiz` (user explicitly opted out of the quiz)
  • `$ARGUMENTS` contains `-h` or `--help` (just showing help)
  • No plan content is available (the compliance pre-check was skipped because no plan file path could be determined)

Run the quiz agent

1. Reuse the plan content that was already read during the compliance pre-check above (do not re-read the file).

2. Use the Task tool to invoke the `humanize:plan-understanding-quiz` agent (opus model):

   Task tool parameters:
   - model: "opus"
   - prompt: Include the plan file content and ask the agent to:
     1. Explore the repository structure for context
     2. Analyze the plan's technical implementation details
     3. Generate 2 multiple-choice questions (4 options each) and a plan summary
     4. Return in the structured format: QUESTION_1, OPTION_1A-D, ANSWER_1, QUESTION_2, OPTION_2A-D, ANSWER_2, PLAN_SUMMARY

3. **Parse the result**: Extract all 13 fields from the agent output (QUESTION_1, OPTION_1A through OPTION_1D, ANSWER_1, QUESTION_2, OPTION_2A through OPTION_2D, ANSWER_2, PLAN_SUMMARY). If the output is malformed (any field missing or ANSWER not A/B/C/D), warn: "Plan understanding quiz unavailable, continuing without it." and proceed to the Setup section below.

Ask questions and evaluate

4. Use AskUserQuestion to present QUESTION_1 as a multiple-choice question with the 4 options (OPTION_1A through OPTION_1D). Compare the user's choice against ANSWER_1:

  • If the user selected the correct answer, mark QUESTION_1 as **PASS**
  • Otherwise, mark as **WRONG**

5. Use AskUserQuestion to present QUESTION_2 as a multiple-choice question with the 4 options (OPTION_2A through OPTION_2D). Compare the user's choice against ANSWER_2 using the same criteria.

Decide whether to proceed

6. **If both questions PASS**: Briefly acknowledge ("Your understanding of the plan looks solid. Proceeding with setup.") and continue to the Setup section below.

7. **If one or both questions are WRONG**: Show the PLAN_SUMMARY to the user to help them understand what the plan does and the correct answers to the questions they missed. Then use AskUserQuestion with the question: "Would you like to proceed with the RLCR

Read more
Ships withhumanize

Derived from the GAAC (GitHub-as-a-Context) project. A Claude Code plugin that provides iterative development with independent AI review. Build with confidence through continuous feedback loops.

Get the whole plugin