Skip to content

docs: purge every literal "--max-iterations 0" mention from docs and tests#17

Merged
JonyanDunh merged 1 commit into
mainfrom
docs/purge-max-iterations-zero-mentions
Apr 12, 2026
Merged

docs: purge every literal "--max-iterations 0" mention from docs and tests#17
JonyanDunh merged 1 commit into
mainfrom
docs/purge-max-iterations-zero-mentions

Conversation

@JonyanDunh
Copy link
Copy Markdown
Owner

Follow-up to #16. The previous PR removed the canonical `--max-iterations 0` example but left explanatory sentences like "you no longer need to pass `--max-iterations 0`" in the docs and a backward-compat test name in `test/setup.test.js`. Those still printed the literal `--max-iterations 0` to readers, defeating the point of the cleanup. This PR removes every remaining occurrence.

Why

Telling users "you don't need to write `--max-iterations 0` anymore" still shows them `--max-iterations 0`. A new user reading the docs has no prior knowledge of the legacy form, so explaining what NOT to write just plants the wrong syntax in their head. Cleaner: omit the deprecation note entirely. New users see only the "omit the flag for unlimited" guidance. Existing users who happen to pass `0` keep working silently.

What changed

commands/help.md

scripts/setup-watchdog.js printHelp()

  • Dropped the "You do NOT need to pass `--max-iterations 0` anymore." line from the help-output trailer

All 7 READMEs (README.{md,zh,es,ja,ko,vi,pt}.md)

test/setup.test.js

  • Renamed the legacy backward-compat test:
    • Before: `setup --no-classifier + --max-iterations 0 is allowed (infinite loop, manual stop only)`
    • After: `setup --no-classifier with no max cap is allowed (infinite loop, manual stop only)`
  • Test args changed from `['build', '--no-classifier', '--max-iterations', '0']` to `['build', '--no-classifier']`
  • Added a comment explaining that the recommended way to express "unlimited" is omission, and that the state file's `max_iterations=0` default is what makes the stop hook treat the loop as uncapped

Backward compatibility

Identical to the previous state. The parser still accepts `--max-iterations 0`; the stop hook still treats `max_iterations=0` as "no cap" (the `> 0` guard fails). Anyone who was passing `0` explicitly keeps working. The only change is that the literal string `--max-iterations 0` no longer appears anywhere in the docs, the in-Claude-Code help, or test names that get printed in CI logs.

Confirmed via `Grep "--max-iterations 0"` returning zero matches across the entire repo.

Test plan

  • 132-test suite still passes (132 active + 2 skipped, 0 failures)
  • `node --test test/*.test.js` clean
  • `Grep "--max-iterations 0"` returns zero matches across the repo
  • CI will confirm on the standard matrix

Scope

  • `commands/help.md` — 2 sentence drops
  • `scripts/setup-watchdog.js` — 1 line drop in `printHelp()`
  • `README.md` + 6 translations — 2 sentence drops each (14 total)
  • `test/setup.test.js` — 1 test renamed + args trimmed

Zero changes to `lib/`, `hooks/`, `.claude-plugin/`, or any other production code. No version bump.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

…tests

Follow-up to #16. The previous PR removed the canonical "--max-iterations
0" example but left explanatory sentences like "you no longer need to
pass --max-iterations 0" in the docs and a backward-compat test name in
test/setup.test.js. Those still printed the literal "--max-iterations 0"
to readers, defeating the point of the cleanup. This PR removes every
remaining occurrence.

## Why

Telling users "you don't need to write --max-iterations 0 anymore" still
shows them "--max-iterations 0". A new user reading the docs has no
prior knowledge of the legacy form, so explaining what NOT to write just
plants the wrong syntax in their head. Cleaner: omit the deprecation
note entirely. New users see only the "omit the flag for unlimited"
guidance. Existing users who happen to pass 0 keep working silently.

## What changed

- **`commands/help.md`**:
  - `--max-iterations` Options description: dropped the trailing "You no
    longer need to pass --max-iterations 0..." sentence
  - Best Practices #4: dropped the trailing "you do not need to pass
    --max-iterations 0" sentence
- **`scripts/setup-watchdog.js` printHelp()**: dropped the
  "You do NOT need to pass --max-iterations 0 anymore." line from the
  help-output trailer
- **All 7 READMEs** (`README.{md,zh,es,ja,ko,vi,pt}.md`):
  - --no-classifier subsection paragraph: dropped the "you no longer
    need to pass --max-iterations 0" trailing sentence
  - Best Practices #4 paragraph: dropped the same trailing sentence
- **`test/setup.test.js`**:
  - Renamed test from
    "setup --no-classifier + --max-iterations 0 is allowed (infinite loop, manual stop only)"
    to
    "setup --no-classifier with no max cap is allowed (infinite loop, manual stop only)"
  - Test args changed from `['build', '--no-classifier', '--max-iterations', '0']`
    to `['build', '--no-classifier']`
  - Added a comment explaining that the recommended way to express
    "unlimited" is omission, and that the state file's max_iterations=0
    default is what makes the stop hook treat the loop as uncapped

## Backward compatibility

**Identical** to the previous state. The parser still accepts
--max-iterations 0; the stop hook still treats max_iterations=0 as "no
cap" (the > 0 guard fails). Anyone who was passing 0 explicitly keeps
working. The only change is that the literal string "--max-iterations 0"
no longer appears anywhere in the docs, the in-Claude-Code help, or
test names that get printed in CI logs.

Confirmed via `Grep "--max-iterations 0"` returning **zero matches**
across the entire repo.

## Test plan

- [x] 132-test suite still passes (132 active + 2 skipped, 0 failures)
- [x] node --test test/*.test.js clean
- [x] Grep "--max-iterations 0" returns zero matches in the repo
- [ ] CI will confirm on the standard matrix

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JonyanDunh JonyanDunh merged commit 6f4b19f into main Apr 12, 2026
11 checks passed
@JonyanDunh JonyanDunh deleted the docs/purge-max-iterations-zero-mentions branch April 12, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant