Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
29a528f
Add methodology analysis phase for RLCR loop exit
SihaoLiu Mar 13, 2026
d3ded24
Fix methodology analysis completion: require report and fail closed
SihaoLiu Mar 13, 2026
7282f6e
Fix read validator to allow historical round access during methodolog…
SihaoLiu Mar 13, 2026
50e8bbb
Harden methodology analysis read bypass with path canonicalization an…
SihaoLiu Mar 13, 2026
f34d45f
Enforce read-only project files during methodology analysis phase
SihaoLiu Mar 13, 2026
87687a2
Fix spawned agent bypass and broaden bash restriction coverage
SihaoLiu Mar 13, 2026
9888044
Fix realpath for non-existent files and narrow gh allowlist
SihaoLiu Mar 13, 2026
4c48209
Block project-root reads and interpreters during methodology analysis
SihaoLiu Mar 13, 2026
786ed32
Block shell entry points and fix concurrent session binding in method…
SihaoLiu Mar 13, 2026
f2a12c6
Allow cancel script during methodology analysis, remove gh issue earl…
SihaoLiu Mar 13, 2026
7b91c47
Scope methodology fallback to spawned agents only, add missing git su…
SihaoLiu Mar 13, 2026
3c85332
Remove cross-session methodology fallback, add realpath raw path fall…
SihaoLiu Mar 13, 2026
5c123c2
Expand methodology bash blocklist, require non-empty report, fix moni…
SihaoLiu Mar 13, 2026
03ac7d0
Tighten cancel allowlist, document spawned agent limitation, remove d…
SihaoLiu Mar 13, 2026
5a08329
Remove raw records from read allowlist, document bash read limitation
SihaoLiu Mar 13, 2026
2cba950
Fix stale error messages in read validator methodology analysis block
SihaoLiu Mar 13, 2026
3eed7d6
Add missing template for methodology analysis state file block message
SihaoLiu Mar 13, 2026
0edbe3f
Merge dev: resolve conflicts with yolo/skip-quiz flags
SihaoLiu Mar 13, 2026
13a47fb
Fix cancel allowlist regex and move methodology handler before git-clean
SihaoLiu Mar 13, 2026
9b961a8
Harden RLCR against mainline drift
tastynoob Mar 15, 2026
cfc46d6
Use portable shebang across all shell scripts
Emin017 Mar 17, 2026
4303249
Bump version to 1.14.1 for branch CI validation
Emin017 Mar 17, 2026
4deb1db
Harden template-loader error handling and reduce code duplication
zevorn Mar 18, 2026
0844648
Add native Codex hook support and harden install/test flows
shinezyy Mar 15, 2026
dbb88bc
fixed tests for bitlesson-select-routing
shinezyy Mar 26, 2026
9ed3e1a
bump version of humanize
SihaoLiu Mar 28, 2026
03e159c
Merge PR #49: Use portable shebang across all shell scripts
SihaoLiu Mar 28, 2026
1862329
Merge PR #50: Harden template-loader error handling and reduce duplic…
SihaoLiu Mar 28, 2026
fe1832d
Merge PR #42: Add methodology analysis for RLCR loop exit
SihaoLiu Mar 28, 2026
a8f85e8
Merge PR #48: Harden RLCR against mainline drift
SihaoLiu Mar 28, 2026
611a437
Fix codex_hooks flag probe, managed-hook regex, and legacy compat
SihaoLiu Mar 29, 2026
2a0faf6
Fix BSD sed portability, awk field splitting, and strict parser defaults
SihaoLiu Mar 29, 2026
d122c82
Fix path injection in shim generation, JSON escaping, and legacy trac…
SihaoLiu Mar 29, 2026
9cf2544
Merge branch 'main' into dev
SihaoLiu Mar 29, 2026
febbc00
Fix relative path bypass in methodology analysis read guard
SihaoLiu Mar 29, 2026
17fabf7
Revert version back to 1.16.0 on dev branch
SihaoLiu Mar 29, 2026
2ab5361
Fix relative path bypass in write validator and add Codex flag probes…
SihaoLiu Mar 29, 2026
4326860
Fix mainline verdict parser picking last keyword instead of first
SihaoLiu Mar 29, 2026
016caca
Add ask-gemini skill and tool-filtered monitor subcommands
SihaoLiu Mar 29, 2026
883e3f5
Revert version back to 1.16.0 to match dev branch
SihaoLiu Mar 29, 2026
916fc50
Reject path traversal segments in methodology analysis fallback guards
SihaoLiu Mar 29, 2026
515f90a
Merge pull request #52 from humania-org/ask-gemini
SihaoLiu Mar 29, 2026
95a6b7b
Fix edit validator path fallback and reject whitespace-only completio…
SihaoLiu Mar 29, 2026
bd506f2
Reject ambiguous multi-keyword verdict lines and fix Gemini CLI insta…
SihaoLiu Mar 29, 2026
4561bc4
Shell-quote hook command paths and reject ambiguous verdict lines
SihaoLiu Mar 29, 2026
338b4dd
Remove PR loop feature entirely
SihaoLiu Mar 29, 2026
3374acb
fix minor display bug of monitor script
SihaoLiu Mar 29, 2026
a1f3614
Be more specific about what is a round
SihaoLiu Mar 29, 2026
c045dff
fix: normalize path slashes in PostToolUse hook to prevent session_id…
gyy0592 Apr 4, 2026
707097c
revert: remove version bump, keep only hook fix
gyy0592 Apr 4, 2026
79714b7
Add support for multiple comment formats in refine-plan
Lyken17 Apr 9, 2026
228d6aa
Update README.md
Lyken17 Apr 13, 2026
28813b6
Merge pull request #68 from gyy0592/fix/session-id-double-slash
SihaoLiu Apr 13, 2026
690fb27
fix: use pipe delimiter in find_comment_markers to avoid splitting CM…
SihaoLiu Apr 13, 2026
027bf0b
fix: update test assertions to match renamed comment terminology
SihaoLiu Apr 13, 2026
3bef3ef
Merge pull request #78 from Lyken17/main
SihaoLiu Apr 13, 2026
722eb25
[docs] clarify the place to use monitor script
SihaoLiu Apr 13, 2026
e61b570
Merge branch 'main' into dev
SihaoLiu Apr 14, 2026
7c4356c
fix: correct managed-hook dedup regex and block unresolvable symlinks
SihaoLiu Apr 14, 2026
c4389bb
feat: add integral context to RLCR review prompts (PID complete)
zevorn Apr 14, 2026
50ed1bc
Merge pull request #81 from zevorn/feat/rlcr-integral-context
SihaoLiu Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "humanize",
"source": "./",
"description": "Humanize - An iterative development plugin that uses Codex to review Claude's work. Creates a feedback loop where Claude implements plans and Codex independently reviews progress, ensuring quality through continuous refinement.",
"version": "1.15.2"
"version": "1.16.0"
}
]
}
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "humanize",
"description": "Humanize - An iterative development plugin that uses Codex to review Claude's work. Creates a feedback loop where Claude implements plans and Codex independently reviews progress, ensuring quality through continuous refinement.",
"version": "1.15.2",
"version": "1.16.0",
"author": {
"name": "humania-org"
},
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ temp

# Local Claude client settings
/.claude/settings.json
/.claude/scheduled_tasks.lock

# Humanize state directories (runtime-generated, project-local)
.humanize/
.claude-flow/
.swarm/

# Python cache
__pycache__/
Expand Down
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Humanize

**Current Version: 1.15.2**
**Current Version: 1.16.0**

> Derived from the [GAAC (GitHub-as-a-Context)](https://github.com/SihaoLiu/gaac) project.

Expand All @@ -25,6 +25,7 @@ A Claude Code plugin that provides iterative development with independent AI rev

The loop has two phases: **Implementation** (Claude works, Codex reviews summaries) and **Code Review** (Codex checks code quality with severity markers). Issues feed back into implementation until resolved.


## Install

```bash
Expand All @@ -45,7 +46,7 @@ Requires [codex CLI](https://github.com/openai/codex) for review. See the full [
/humanize:gen-plan --input draft.md --output docs/plan.md
```

2. **Refine an annotated plan** before implementation when reviewers add `CMT:` ... `ENDCMT` comments:
2. **Refine an annotated plan** before implementation when reviewers add comments (`CMT:` ... `ENDCMT`, `<cmt>` ... `</cmt>`, or `<comment>` ... `</comment>`):
```bash
/humanize:refine-plan --input docs/plan.md
```
Expand All @@ -55,10 +56,18 @@ Requires [codex CLI](https://github.com/openai/codex) for review. See the full [
/humanize:start-rlcr-loop docs/plan.md
```

4. **Monitor progress**:
4. **Consult Gemini** for deep web research (requires Gemini CLI):
```bash
/humanize:ask-gemini What are the latest best practices for X?
```

5. **Monitor progress (in another terminal, not inside Claude Code)**:
```bash
source <path/to/humanize>/scripts/humanize.sh
humanize monitor rlcr
source <path/to/humanize>/scripts/humanize.sh # Or just add it into your .bashec or .zshrc
humanize monitor rlcr # RLCR loop
humanize monitor skill # All skill invocations (codex + gemini)
humanize monitor codex # Codex invocations only
humanize monitor gemini # Gemini invocations only
```

## Monitor Dashboard
Expand Down
25 changes: 0 additions & 25 deletions commands/cancel-pr-loop.md

This file was deleted.

3 changes: 2 additions & 1 deletion commands/cancel-rlcr-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ To cancel the active loop:
2. Check the first line of output:
- **NO_LOOP** or **NO_ACTIVE_LOOP**: Say "No active RLCR loop found."
- **CANCELLED**: Report the cancellation message from the output
- **CANCELLED_METHODOLOGY_ANALYSIS**: Report the cancellation message from the output
- **CANCELLED_FINALIZE**: Report the cancellation message from the output
- **FINALIZE_NEEDS_CONFIRM**: The loop is in Finalize Phase. Continue to step 3

Expand All @@ -33,6 +34,6 @@ To cancel the active loop:
- **If user chooses "No, let it finish"**:
- Report: "Understood. The Finalize Phase will continue. Once complete, the loop will end normally."

**Key principle**: The script handles all cancellation logic. A loop is active if `state.md` (normal loop) or `finalize-state.md` (Finalize Phase) exists in the newest loop directory.
**Key principle**: The script handles all cancellation logic. A loop is active if `state.md` (normal loop), `methodology-analysis-state.md` (Methodology Analysis Phase), or `finalize-state.md` (Finalize Phase) exists in the newest loop directory.

The loop directory with summaries, review results, and state information will be preserved for reference.
43 changes: 29 additions & 14 deletions commands/refine-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The refined plan MUST reuse the existing `gen-plan` schema. Do not invent new to
1. **Execution Mode Setup**: Parse CLI arguments and derive output paths
2. **Load Project Config**: Resolve `alternative_plan_language` and mode defaults using `config-loader.sh` semantics
3. **IO Validation**: Run `validate-refine-plan-io.sh`
4. **Comment Extraction**: Scan the annotated plan and extract valid `CMT:` / `ENDCMT` blocks
4. **Comment Extraction**: Scan the annotated plan and extract valid comment blocks (`CMT:`/`ENDCMT`, `<cmt>`/`</cmt>`, `<comment>`/`</comment>`)
5. **Comment Classification**: Classify each extracted comment for downstream handling
6. **Comment Processing**: Answer questions, apply requested plan edits, and perform targeted research
7. **Plan Refinement**: Produce the comment-free refined plan while preserving the `gen-plan` structure
Expand Down Expand Up @@ -167,7 +167,7 @@ Handle exit codes exactly:
- Exit code 0: Continue to Phase 2
- Exit code 1: Report `Input file not found` and stop
- Exit code 2: Report `Input file is empty` and stop
- Exit code 3: Report `Input file has no CMT:/ENDCMT blocks` and stop
- Exit code 3: Report `Input file has no comment blocks` and stop
- Exit code 4: Report `Input file is missing required gen-plan sections` and stop
- Exit code 5: Report `Output directory does not exist or is not writable - please fix it` and stop
- Exit code 6: Report `QA directory is not writable` and stop
Expand Down Expand Up @@ -196,17 +196,32 @@ Track these states while scanning the validated input in document order:

Extraction rules:

1. Recognize `CMT:` as the start marker and `ENDCMT` as the end marker.
2. Support both inline and multi-line blocks:
1. Support three comment formats:
- Classic: `CMT:` as start marker and `ENDCMT` as end marker
- Short tag: `<cmt>` as start marker and `</cmt>` as end marker
- Long tag: `<comment>` as start marker and `</comment>` as end marker
2. Support both inline and multi-line blocks for all formats:
- Inline: `Text before CMT: comment text ENDCMT text after`
- Inline: `Text before <cmt>comment text</cmt> text after`
- Inline: `Text before <comment>comment text</comment> text after`
- Multi-line:
```markdown
CMT:
comment text
ENDCMT
```
3. Ignore `CMT:` and `ENDCMT` sequences inside fenced code blocks.
4. Ignore `CMT:` and `ENDCMT` sequences inside HTML comments.
```markdown
<cmt>
comment text
</cmt>
```
```markdown
<comment>
comment text
</comment>
```
3. Ignore comment markers inside fenced code blocks.
4. Ignore comment markers inside HTML comments.
5. Update `NEAREST_HEADING` whenever a Markdown heading is encountered outside fenced code and HTML comments.
6. Preserve surrounding non-comment text when removing inline comment blocks from the working plan text.
7. Assign raw comment IDs in document order as `CMT-1`, `CMT-2`, ... only for non-empty blocks.
Expand All @@ -217,7 +232,7 @@ Extraction rules:
For each non-empty comment block, capture:

- `id` (`CMT-N`)
- `original_text` exactly as written between `CMT:` and `ENDCMT`
- `original_text` exactly as written between the comment markers
- `normalized_text` with surrounding whitespace trimmed
- `start_line`, `start_column`
- `end_line`, `end_column`
Expand All @@ -230,8 +245,8 @@ For each non-empty comment block, capture:

These are fatal extraction errors:

1. Nested `CMT:` while already inside a comment block
2. `ENDCMT` encountered while not inside a comment block
1. Nested comment start marker while already inside a comment block
2. Comment end marker encountered while not inside a comment block or wrong end marker for the format
3. End of file reached while still inside a comment block

Every fatal parse error MUST report:
Expand All @@ -243,9 +258,9 @@ Every fatal parse error MUST report:

Examples of acceptable messages:

- `Comment parse error: nested CMT block at line 48, column 3 near "## Acceptance Criteria" (context: "CMT: split AC-2...")`
- `Comment parse error: stray ENDCMT at line 109, column 1 near "## Task Breakdown" (context: "ENDCMT")`
- `Comment parse error: missing ENDCMT for block opened at line 72, column 5 near "## Dependencies and Sequence"`
- `Comment parse error: nested comment block at line 48, column 3 near "## Acceptance Criteria" (context: "<cmt>split AC-2...")`
- `Comment parse error: stray comment end marker at line 109, column 1 near "## Task Breakdown" (context: "</comment>")`
- `Comment parse error: missing end marker for block opened at line 72, column 5 near "## Dependencies and Sequence"`

### Outputs from Phase 2

Expand Down Expand Up @@ -403,7 +418,7 @@ Optional sections that MUST be preserved when present in the input:

### Refinement Rules

1. Remove every resolved `CMT:` / `ENDCMT` tag and all enclosed comment text from the refined plan.
1. Remove every resolved comment marker and all enclosed comment text from the refined plan.
2. Do not add any new top-level schema section.
3. Preserve `AC-X` / `AC-X.Y` formatting.
4. Preserve task IDs unless a comment explicitly requests a structural change.
Expand All @@ -429,7 +444,7 @@ Rules:
Before generating the QA document, verify:

1. All required sections are still present
2. No `CMT:` or `ENDCMT` markers remain
2. No comment markers remain
3. Every referenced `AC-*` exists
4. Every task dependency references an existing task ID or `-`
5. Every task row has exactly one valid routing tag: `coding` or `analyze`
Expand Down
61 changes: 0 additions & 61 deletions commands/start-pr-loop.md

This file was deleted.

11 changes: 10 additions & 1 deletion commands/start-rlcr-loop.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
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]"
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"
Expand Down Expand Up @@ -127,6 +127,15 @@ This command starts an iterative development loop where:
7. If code review finds issues (`[P0-9]` markers), you fix them and continue
8. When no issues are found, the loop ends with a Finalize Phase

## What Is a Round

**One round = the agent believes the entire plan is finished.** A round boundary is when the agent writes a summary and attempts to exit, triggering Codex review. This is the fundamental semantic:

- A round is NOT one task, one milestone, one stage, or one layer of the plan.
- If the plan has multiple stages or milestones, they are all completed within a single round before writing the round summary.
- Intermediate progress checks (e.g., verifying a stage before starting the next) should use manual `ask-codex` calls, not round boundaries.
- Only write `round-N-summary.md` and attempt to exit when you believe ALL tasks in the plan are done.

## Goal Tracker System

This loop uses a **Goal Tracker** to prevent goal drift across iterations:
Expand Down
17 changes: 17 additions & 0 deletions config/codex-hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"description": "Humanize Codex Hooks - Native Stop hooks for RLCR loops",
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "{{HUMANIZE_RUNTIME_ROOT}}/hooks/loop-codex-stop-hook.sh",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Quote hook command paths before writing hooks.json

The template emits the hook command as a bare path, so when {{HUMANIZE_RUNTIME_ROOT}} contains spaces (for example a custom CODEX_HOME path like /Users/John Doe/.codex), the command is split at runtime and Codex cannot execute the stop hook script. That breaks RLCR/PR exit gating in those installations; the command value should be shell-quoted or otherwise encoded as a single executable path.

Useful? React with 👍 / 👎.

"timeout": 7200,
"statusMessage": "humanize RLCR stop hook"
}
]
}
]
}
}
4 changes: 4 additions & 0 deletions docs/bitlesson.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Provider routing is automatic:

If the configured provider binary is missing, the selector falls back to the default Codex model so the loop can still proceed.

On Codex-only installs, Humanize writes `provider_mode: "codex-only"` into the user config.
When that mode is present, the selector forces BitLesson selection onto the Codex/OpenAI path
before provider resolution, even if an older default such as `haiku` would otherwise route to Claude.

## Workflow

Each project keeps its BitLesson knowledge base at `.humanize/bitlesson.md`.
Expand Down
1 change: 0 additions & 1 deletion docs/install-for-claude.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ Then use:

```bash
humanize monitor rlcr # Monitor RLCR loop
humanize monitor pr # Monitor PR loop
```

## Other Install Guides
Expand Down
Loading
Loading