You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve gen-plan convergence and task-tag routing (#35)
* feat: extract F2 gen-plan-convergence changes
Cherry-picked from SHAs: c283a929c0eef75156a05002308a8ba3a57437567b3c8caf54a57429821f225
Revert pair 5156a05+002308a included (net-zero; hooks/lib/loop-common.sh not in diff)
Version files kept at origin/main values; version bump deferred per runbook 4.5
Fix: added missing append_task_tag_routing_note call in implementation-phase continuation
* docs: add F2 gen-plan-convergence feature analysis
* refactor(gen-plan): remove redundant sections, add discussion/direct mode
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: delete f2 analysis docs from branch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(gen-plan): flip section assertions to absence checks, add mode flag tests
- Flip Convergence Log and Codex Team Workflow presence→absence assertions
- Add Convergence Status presence test
- Add --discussion, --direct, and mutual-exclusion tests for validate script
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: initialize bitlesson.md for project knowledge base
* fix(gen-plan): sync Plan Structure block with template, add AC-12 regression test
- Fix Task Breakdown intro wording to match template exactly
- Add Output File Convention section to gen-plan.md Plan Structure block
- Add regression test verifying byte-for-byte sync between extracted block and template
- Simplify awk pattern in test (idiomatic form, drop cat subprocess)
* refactor: simplify code-simplifier improvements from finalize phase
- tests/test-gen-plan.sh: remove redundant inner file guard, remove
unused EXIT captures, add per-test comments for mode-flag tests
- commands/gen-plan.md: clarify Phase 0 AUTO_START variable naming,
move priority note to Phase 0.5 where resolution actually occurs
* chore: revert version to 1.13.2, add gen-plan hard constraint and remove bitlesson.md
Reverts version to 1.13.2 across plugin.json, marketplace.json, and
README.md. Adds "Hard Constraint: No Coding During Plan Generation"
section to gen-plan.md and clarifies auto-start fallback behavior.
Removes bitlesson.md from repository.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: restore bitlesson.md (auto-initialized by rlcr setup)
* fix(gen-plan): gate auto-start to discussion mode
* Remove bitlesson and bump version to 1.14.1
* Skip stophook CI test on forks
* Skip stophook test in GitHub Actions
* Enable Claude review on fork PRs
* Restore Claude review workflow from main
* Fix silent drop of user questions on auto-start path (v1.14.2)
Add Step 1.5 in Phase 6 to consolidate pending user decisions
before the manual review gate takes effect. This step runs
unconditionally and transfers Phase 3 QUESTIONS_FOR_USER and
Phase 5 needs_user_decision items into the Pending User Decisions
section, ensuring the auto-start gate in Phase 8 correctly blocks
when unresolved questions exist.
* Bump version to 1.15.0
---------
Co-authored-by: zenus <q18003877513@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Sihao Liu <sihao@cs.ucla.edu>
Copy file name to clipboardExpand all lines: .claude-plugin/marketplace.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
"name": "humanize",
9
9
"source": "./",
10
10
"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.",
Copy file name to clipboardExpand all lines: .claude-plugin/plugin.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "humanize",
3
3
"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.",
Copy file name to clipboardExpand all lines: commands/start-rlcr-loop.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,9 @@ If the pre-check passed (or was skipped), execute the setup script to initialize
67
67
68
68
This command starts an iterative development loop where:
69
69
70
-
1. You work on the implementation plan provided
70
+
1. You execute the implementation plan with task-tag routing
71
+
-`coding` tasks: Claude executes directly
72
+
-`analyze` tasks: execute via `/humanize:ask-codex`
71
73
2. Write a summary of your work to the specified summary file
72
74
3. When you try to exit, Codex reviews your summary
73
75
4. If Codex finds issues, you receive feedback and continue
@@ -86,9 +88,11 @@ This loop uses a **Goal Tracker** to prevent goal drift across iterations:
86
88
87
89
### Key Features
88
90
1.**Acceptance Criteria**: Each task maps to a specific AC - nothing can be "forgotten"
89
-
2.**Plan Evolution Log**: If you discover the plan needs changes, document the change with justification
90
-
3.**Explicit Deferrals**: Deferred tasks require strong justification and impact analysis
91
-
4.**Full Alignment Checks**: At configurable intervals (default every 5 rounds: rounds 4, 9, 14, etc.), Codex conducts a comprehensive goal alignment audit. Use `--full-review-round N` to customize (min: 2)
91
+
2.**Task Tag Routing**: Every task should carry `coding` or `analyze` tag from plan generation
92
+
-`coding -> Claude`, `analyze -> Codex`
93
+
3.**Plan Evolution Log**: If you discover the plan needs changes, document the change with justification
94
+
4.**Explicit Deferrals**: Deferred tasks require strong justification and impact analysis
95
+
5.**Full Alignment Checks**: At configurable intervals (default every 5 rounds: rounds 4, 9, 14, etc.), Codex conducts a comprehensive goal alignment audit. Use `--full-review-round N` to customize (min: 2)
92
96
93
97
### How to Use
94
98
1.**Round 0**: Initialize the Goal Tracker with Ultimate Goal and Acceptance Criteria
@@ -113,7 +117,7 @@ This loop uses a **Goal Tracker** to prevent goal drift across iterations:
113
117
114
118
The RLCR loop has two phases within the active loop:
115
119
116
-
1.**Implementation Phase**: Work on the plan, Codex reviews your summary
120
+
1.**Implementation Phase**: Work by task tags (`coding -> Claude`, `analyze -> /humanize:ask-codex`), then Codex reviews your summary
117
121
2.**Review Phase**: After COMPLETE, `codex review` checks code quality with `[P0-9]` severity markers
118
122
119
123
The `--base-branch` option specifies the base branch for code review comparison. If not provided, it auto-detects from: remote default > local main > local master.
- <Topic>: Claude vs Codex summary, chosen resolution, and rationale
87
+
88
+
### Convergence Status
89
+
- Final Status: `converged` or `partially_converged`
90
+
91
+
## Pending User Decisions
92
+
93
+
- DEC-1: <Decisiontopic>
94
+
- Claude Position: <...>
95
+
- Codex Position: <...>
96
+
- Tradeoff Summary: <...>
97
+
- Decision Status: `PENDING` or `<User's final decision>`
98
+
69
99
## Implementation Notes
70
100
71
101
### Code Style Requirements
72
102
- Implementation code and comments must NOT contain plan-specific terminology such as "AC-", "Milestone", "Step", "Phase", or similar workflow markers
73
103
- These terms are for plan documentation only, not for the resulting codebase
74
104
- Use descriptive, domain-appropriate naming in code instead
105
+
106
+
## Output File Convention
107
+
108
+
This template is used to produce the main output file (e.g., `plan.md`).
109
+
110
+
### Chinese Variant (`_zh` file)
111
+
112
+
When `chinese_plan=true` is set in `.humanize/config.json`, a `_zh` variant of the output file is also written after the main file. The `_zh` filename is constructed by inserting `_zh` immediately before the file extension:
113
+
114
+
-`plan.md` becomes `plan_zh.md`
115
+
-`docs/my-plan.md` becomes `docs/my-plan_zh.md`
116
+
-`output` (no extension) becomes `output_zh`
117
+
118
+
The `_zh` file contains a full Chinese translation of the English plan. All identifiers (`AC-*`, task IDs, file paths, API names, command flags) remain unchanged, as they are language-neutral.
119
+
120
+
When `chinese_plan=false` (the default), or when `.humanize/config.json` does not exist, or when the `chinese_plan` field is absent, the `_zh` file is NOT written. A missing config file is not an error.
| [To be populated by Claude based on plan] | - | pending | coding or analyze | claude or codex | - |
936
938
937
939
### Completed and Verified
938
940
<!-- Only move tasks here after Codex verification -->
@@ -1007,7 +1009,7 @@ Before starting implementation, you MUST initialize the Goal Tracker:
1007
1009
1. Read @$GOAL_TRACKER_FILE
1008
1010
2. If the "Ultimate Goal" section says "[To be extracted...]", extract a clear goal statement from the plan
1009
1011
3. If the "Acceptance Criteria" section says "[To be defined...]", define 3-7 specific, testable criteria
1010
-
4. Populate the "Active Tasks" table with tasks from the plan, mapping each to an AC
1012
+
4. Populate the "Active Tasks" table with tasks from the plan, mapping each to an AC and filling Tag/Owner
1011
1013
5. Write the updated goal-tracker.md
1012
1014
1013
1015
**IMPORTANT**: The IMMUTABLE SECTION can only be modified in Round 0. After this round, it becomes read-only.
@@ -1019,6 +1021,15 @@ Before starting implementation, you MUST initialize the Goal Tracker:
1019
1021
For all tasks that need to be completed, please use the Task system (TaskCreate, TaskUpdate, TaskList) to track each item in order of importance.
1020
1022
You are strictly prohibited from only addressing the most important issues - you MUST create Tasks for ALL discovered issues and attempt to resolve each one.
1021
1023
1024
+
## Task Tag Routing (MUST FOLLOW)
1025
+
1026
+
Each task must have one routing tag from the plan: \`coding\` or \`analyze\`.
1027
+
1028
+
- Tag \`coding\`: Claude executes the task directly.
1029
+
- Tag \`analyze\`: Claude must execute via \`/humanize:ask-codex\`, then integrate Codex output.
1030
+
- Keep Goal Tracker "Active Tasks" columns **Tag** and **Owner** aligned with execution (\`coding -> claude\`, \`analyze -> codex\`).
1031
+
- If a task is missing a valid tag, do not guess silently; document it in Plan Evolution Log and block completion until clarified.
1032
+
1022
1033
EOF
1023
1034
1024
1035
# Append plan content directly (avoids command substitution size limits for large files)
echo" --input Path to the input draft file (required)"
21
21
echo" --output Path to the output plan file (required)"
22
+
echo" --auto-start-rlcr-if-converged Enable direct RLCR start after converged planning (discussion mode only)"
23
+
echo" --discussion Use discussion mode (iterative Claude/Codex convergence rounds)"
24
+
echo" --direct Use direct mode (skip convergence rounds, proceed immediately to plan)"
22
25
echo" -h, --help Show this help message"
23
26
exit 6
24
27
}
25
28
26
29
INPUT_FILE=""
27
30
OUTPUT_FILE=""
31
+
AUTO_START_RLCR_IF_CONVERGED="false"
32
+
GEN_PLAN_MODE_DISCUSSION="false"
33
+
GEN_PLAN_MODE_DIRECT="false"
28
34
29
35
# Parse arguments
30
36
while [[ $#-gt 0 ]];do
@@ -45,6 +51,18 @@ while [[ $# -gt 0 ]]; do
45
51
OUTPUT_FILE="$2"
46
52
shift 2
47
53
;;
54
+
--auto-start-rlcr-if-converged)
55
+
AUTO_START_RLCR_IF_CONVERGED="true"
56
+
shift
57
+
;;
58
+
--discussion)
59
+
GEN_PLAN_MODE_DISCUSSION="true"
60
+
shift
61
+
;;
62
+
--direct)
63
+
GEN_PLAN_MODE_DIRECT="true"
64
+
shift
65
+
;;
48
66
-h|--help)
49
67
usage
50
68
;;
@@ -55,6 +73,12 @@ while [[ $# -gt 0 ]]; do
55
73
esac
56
74
done
57
75
76
+
# Validate mutually exclusive flags
77
+
if [[ "$GEN_PLAN_MODE_DISCUSSION"=="true"&&"$GEN_PLAN_MODE_DIRECT"=="true" ]];then
78
+
echo"Error: --discussion and --direct are mutually exclusive"
79
+
exit 6
80
+
fi
81
+
58
82
# Validate required arguments
59
83
if [[ -z"$INPUT_FILE" ]];then
60
84
echo"ERROR: --input is required"
@@ -66,6 +90,11 @@ if [[ -z "$OUTPUT_FILE" ]]; then
66
90
usage
67
91
fi
68
92
93
+
# Note on auto-start behavior in direct mode
94
+
if [[ "$GEN_PLAN_MODE_DIRECT"=="true"&&"$AUTO_START_RLCR_IF_CONVERGED"=="true" ]];then
95
+
echo"NOTE: --auto-start-rlcr-if-converged only triggers in --discussion mode; in --direct mode the plan is not considered converged and auto-start will be skipped."
0 commit comments