Summary
When an RLCR loop is started with --track-plan-file and the plan file is located under .humanize/plans/, the two hooks enforce contradictory git-tracking requirements:
loop-codex-stop-hook.sh calls git_has_tracked_humanize_state() which runs git ls-files -- .humanize and blocks exit if any file under .humanize/ is tracked.
loop-plan-file-validator.sh checks that the plan file is tracked in git (blocks with "Plan file is no longer tracked in git" if it isn't).
Since gen-plan defaults to placing output under .humanize/plans/, using --track-plan-file (which setup-rlcr-loop.sh enables automatically when the plan file is under .humanize/) creates an unresolvable conflict.
Steps to Reproduce
- Run
/humanize:gen-plan --input <draft> — output goes to .humanize/plans/<slug>.md
- Run
/humanize:start-rlcr-loop .humanize/plans/<slug>.md
- Loop starts with
plan_tracked: true in state.md
- Plan file is committed to git
- Complete a round of work and attempt to exit
- Stop hook fires: "Detected tracked or staged files under
.humanize/. Run git rm --cached -r .humanize"
- User runs
git rm --cached -r .humanize to fix it
- Prompt hook fires on next message: "Plan file is no longer tracked in git"
- User must manually re-add and recommit the plan file
- Go to step 4 — infinite loop
Workaround
Move the plan file outside .humanize/ to a dash-separated path like .humanize-plans/<slug>.md which git_has_tracked_humanize_state() explicitly exempts (it only checks the .humanize/ prefix, not .humanize-*). Update state.md's plan_file: field to match.
Suggested Fix
Option A: git_has_tracked_humanize_state() should exclude .humanize/plans/ from its check when plan_tracked: true in state.md.
Option B: setup-rlcr-loop.sh should move the plan file to .humanize-plans/ (or another exempt path) when --track-plan-file is used, so the two hooks never conflict.
Option C: gen-plan should default to outputting plans to a non-.humanize/ path (e.g., .humanize-plans/ or plans/).
Environment
- humanize plugin version: 1.16.0
- Claude Code version: current
Summary
When an RLCR loop is started with
--track-plan-fileand the plan file is located under.humanize/plans/, the two hooks enforce contradictory git-tracking requirements:loop-codex-stop-hook.shcallsgit_has_tracked_humanize_state()which runsgit ls-files -- .humanizeand blocks exit if any file under.humanize/is tracked.loop-plan-file-validator.shchecks that the plan file is tracked in git (blocks with "Plan file is no longer tracked in git" if it isn't).Since
gen-plandefaults to placing output under.humanize/plans/, using--track-plan-file(whichsetup-rlcr-loop.shenables automatically when the plan file is under.humanize/) creates an unresolvable conflict.Steps to Reproduce
/humanize:gen-plan --input <draft>— output goes to.humanize/plans/<slug>.md/humanize:start-rlcr-loop .humanize/plans/<slug>.mdplan_tracked: trueinstate.md.humanize/. Rungit rm --cached -r .humanize"git rm --cached -r .humanizeto fix itWorkaround
Move the plan file outside
.humanize/to a dash-separated path like.humanize-plans/<slug>.mdwhichgit_has_tracked_humanize_state()explicitly exempts (it only checks the.humanize/prefix, not.humanize-*). Updatestate.md'splan_file:field to match.Suggested Fix
Option A:
git_has_tracked_humanize_state()should exclude.humanize/plans/from its check whenplan_tracked: trueinstate.md.Option B:
setup-rlcr-loop.shshould move the plan file to.humanize-plans/(or another exempt path) when--track-plan-fileis used, so the two hooks never conflict.Option C:
gen-planshould default to outputting plans to a non-.humanize/path (e.g.,.humanize-plans/orplans/).Environment