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
{{ message }}
Repository navigation
Session Handoff [auto-2285]: Every CLI Script Answers --help and Refuses Unknown Arguments, Rule and Gate Remaining for #2285 #2785
The rule. State in CODESTYLE.md (General, and the Shell section) and in the shell-codestyle Skill source that every command-line script the hub ships either answers --help and -h by printing its usage and exiting 0 with nothing written, or refuses an argument it does not recognize, exiting non-zero before any read or write. A script that can write does both. No script falls back to a default mode or target on an unrecognized first argument, and a write mode is never the default. Rebuild the generated Skill copies with scripts/build_dist.py.
The gate. Add a test that runs every tracked command-line entry point with --help and with an unknown --bogus-flag, in a sandbox with no network or credentials, asserting the first exits 0 with usage text and the second exits non-zero, neither making an API call. tests/test_configure_usage.py already does this for configure.sh beside a recording gh stub, so reuse its shape rather than inventing a second one. The issue puts hooks under host-setup/agent-safety/claude/ out of scope, and nothing under host-setup/agent-safety/ is edited in this lane.
External blockers
None known at pick time. Where the gate finds an entry point that breaks the rule and fixing it would edit host-setup/agent-safety/, or the fix needs a choice the issue does not settle, park per the unattended-handoff Skill rather than guessing.
Internal dependencies
The rule lands before or with the gate, since the gate's assertions are the rule's mechanical form and a reviewer reads one against the other.
State
No branch, worktree, or pull request exists for this lane yet. Re-derive the entry-point set from the tree on develop rather than from the issue's survey, which dates from before #2287.
The parked decision queue
None.
What the last round did
The unattended-handoff picker created this lane for #2285. Nothing else.
What not to repeat
Do not redo the configure.sh changes. #2287 made its command required, refused unknown options and malformed targets before any read, and added -h/--help.
Done, on branch feature/auto-2285, pushed at 55a2be09, two commits on develop at adc6c0c3:
CODESTYLE.md General gains "Command-Line Arguments": every command-line script answers --help and -h with its usage and exit 0, changing nothing, and refuses an unrecognized argument with a non-zero exit before any read or write, never taking an unrecognized first argument as a default mode or target. A hook its host runs is not a command-line script. The Shell section points at it, and shell-codestyle and python-codestyle carry it as a generated include. build_dist.py --check is clean.
tests/test_cli_usage.py discovers every tracked .sh, .ps1, and executable or __main__-guarded .py outside tests/ and .husky/, and runs each with --help, -h, and --bogus-flag beside recording stubs, no token, and a local proxy listener that counts connections. It asserts exit 0 with usage for help, a usage or named refusal for the flag, no stub call or connection, and an unchanged tree. It skips on Windows.
Fixed to meet the gate: spec/validate.py, spec/workflow_reuse.py, spec/fidelity_honesty.py, spec/resolve_description.py, and the python-directories action now parse with argparse. catalog/snippets/hub-fetch-run.py answers help and refuses an option before any fetch. install-tools.ps1 and setup-wsl.ps1 refuse a dash-prefixed positional before any read, and setup-wsl.ps1 refuses a distribution outside -Install.
Two local-strict-review passes are recorded, and the edit budget is spent.
No pull request is open. The worktree is left standing at /home/pieter/repos/worktrees/ProjectTemplate-auto-2285, clean.
Waits on decision #2787: whether the rule also says "a write mode is never the default", which would change the defaults of build_dist.py, skills_install.py, install-skills, and upgrade-host. The recommended answer, leaving it out, needs no edit.
Remaining after the answer:
Open the pull request with Closes on promotion: #2285 and drive it.
List these in its body, each with its class. Adding git to the gate's stubs shows that spec/audit.py runs git config --get remote.origin.url at import, so canonical_review.py, spec/audit.py, fidelity_honesty.py, and workflow_reuse.py read before parsing. The rule says "before any read", so this is introduced. It is not fixed, since HUB_NAME is a module constant used about 30 times. The three agent-safety hooks that are also run by name are exempted in NOT_COMMAND_LINE, though the rule counts them as command-line scripts. That is introduced, and filed as Make the Agent-Safety Hooks Run by Name Answer --help and Refuse Unknown Arguments #2786 for an attended session. The --check sentence-length hits on CODESTYLE.md Shell paragraph sentences are pre-existing.
Filed along the way:#2786, ordinary work and not part of this lane. No lesson issue.
Observed:test_prose_lint.TestDiffScopeFloor.test_a_deliberately_narrowed_scan_is_not_told_the_narrowing_is_a_defect fails on unmodified develop on this host. The cause was not investigated.
Activity
ptr727 commentedon Oct 11, 2026
Parked: waiting on decision #2787
Done, on branch
feature/auto-2285, pushed at55a2be09, two commits ondevelopatadc6c0c3:CODESTYLE.mdGeneral gains "Command-Line Arguments": every command-line script answers--helpand-hwith its usage and exit 0, changing nothing, and refuses an unrecognized argument with a non-zero exit before any read or write, never taking an unrecognized first argument as a default mode or target. A hook its host runs is not a command-line script. The Shell section points at it, andshell-codestyleandpython-codestylecarry it as a generated include.build_dist.py --checkis clean.tests/test_cli_usage.pydiscovers every tracked.sh,.ps1, and executable or__main__-guarded.pyoutsidetests/and.husky/, and runs each with--help,-h, and--bogus-flagbeside recording stubs, no token, and a local proxy listener that counts connections. It asserts exit 0 with usage for help, a usage or named refusal for the flag, no stub call or connection, and an unchanged tree. It skips on Windows.spec/validate.py,spec/workflow_reuse.py,spec/fidelity_honesty.py,spec/resolve_description.py, and the python-directories action now parse with argparse.catalog/snippets/hub-fetch-run.pyanswers help and refuses an option before any fetch.install-tools.ps1andsetup-wsl.ps1refuse a dash-prefixed positional before any read, andsetup-wsl.ps1refuses a distribution outside-Install.local-strict-reviewpasses are recorded, and the edit budget is spent.No pull request is open. The worktree is left standing at
/home/pieter/repos/worktrees/ProjectTemplate-auto-2285, clean.Waits on decision #2787: whether the rule also says "a write mode is never the default", which would change the defaults of
build_dist.py,skills_install.py,install-skills, andupgrade-host. The recommended answer, leaving it out, needs no edit.Remaining after the answer:
Closes on promotion: #2285and drive it.gitto the gate's stubs shows thatspec/audit.pyrunsgit config --get remote.origin.urlat import, socanonical_review.py,spec/audit.py,fidelity_honesty.py, andworkflow_reuse.pyread before parsing. The rule says "before any read", so this is introduced. It is not fixed, sinceHUB_NAMEis a module constant used about 30 times. The three agent-safety hooks that are also run by name are exempted inNOT_COMMAND_LINE, though the rule counts them as command-line scripts. That is introduced, and filed as Make the Agent-Safety Hooks Run by Name Answer --help and Refuse Unknown Arguments #2786 for an attended session. The--check sentence-lengthhits onCODESTYLE.mdShell paragraph sentences are pre-existing.Filed along the way: #2786, ordinary work and not part of this lane. No lesson issue.
Observed:
test_prose_lint.TestDiffScopeFloor.test_a_deliberately_narrowed_scan_is_not_told_the_narrowing_is_a_defectfails on unmodifieddevelopon this host. The cause was not investigated.ptr727 commentedon Oct 11, 2026
Resumed in an attended session. The maintainer's answers:
git configread inspec/audit.py, which conflicts with the rule's "before any read": tracked in Resolve spec/audit.py's Hub Name Lazily So Importing Scripts Parse Arguments Before Any Read #2829 and listed in the pull request body as introduced. It is not fixed in this pull request.develop, then to a mergeabledevelop -> mainpromotion pull request. Merging main stays a separate go-ahead.test_prose_lintfailure on unmodifieddevelop: being investigated, and an issue follows.This session keeps
blockedon this link while it works the lane.ptr727 commentedon Oct 11, 2026
Lane closed out with no successor: #2285 is done and released in 2.0.970.
nopep8NOT_PROSEgap that Copilot raised on the promotion. Promotion Promote Prose Gate, Review Tooling, Unattended Worker, and Install Failure Reporting Fixes to Main #2816 merged to main, release 2.0.970 published, and this machine's Skills snapshot was refreshed.spec/audit.py), Make the Agent-Safety Hooks Run by Name Answer --help and Refuse Unknown Arguments #2786 (the agent-safety hooks run by name), Harden the CLI Usage Gate Against False Greens #2831 (hardening the CLI-usage gate against false greens), Make the Narrowed-Scan Diff-Floor Test Independent of the Working Directory #2830 (the cwd-dependenttest_prose_linttest), and Bind the Workspace-Edit Rule on the Session the Reload Hits, Not on Where the Editor Runs #2834 (the workspace-edit rule scope from Bind the Workspace-Edit Rule Only to an Agent Running Inside VS Code #2815's post-merge review).decisionissues.