Skip to content

fix(guidance): name precheck_file's argument as file_path, not path - #22

Merged
riponcm merged 1 commit into
riponcm:mainfrom
RTE404:fix/18-precheck-arg-name
Oct 2, 2026
Merged

riponcm merged 1 commit into
riponcm:mainfrom
RTE404:fix/18-precheck-arg-name

Conversation

@RTE404

@RTE404 RTE404 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #18.

The agent guidance showed precheck_file(path), but the tool's parameter is file_path, so agents copying the call sent an argument the schema rejects. Corrected in:

  • AI_INSTRUCTIONS.md (storage.py)
  • the CLAUDE.md / AGENTS.md bridge (commands/init.py)
  • the MCP instructions= field (mcp_server.py)

The README half of this landed on main in 7051f69, so I've rebased onto it and dropped my README edits. This PR is now just the three places agents read at runtime, plus the test.

Test: tests/test_agent_guidance.py reads the parameter name from precheck_file's own signature and checks every precheck_file(...) call shown on all three surfaces uses it, so the guidance can't drift from the tool again. It fails on main (3 failures, one per surface) and passes with this change.

Verification (Windows 11, Python 3.12):

  • Full suite: 278 passed, 4 failed. The same 4 fail on main without this change (test_global_mcp.py ×3, test_init_ux.py::test_print_mcp_config_single_project_still_pins_the_root), so they're pre-existing on Windows and unrelated.
  • ruff check: no new findings. Each changed file reports the same findings as on main.
  • Rebased on current main; one commit.

Note: AI_INSTRUCTIONS.md is only written when missing, so existing projects keep the old text until it is deleted and pjm init is re-run.

AI_INSTRUCTIONS.md, the CLAUDE.md/AGENTS.md bridge, the MCP instructions=
field and the README all showed the call as precheck_file(path). The tool's
parameter is file_path, so agents that copied the shown call shape sent an
argument the schema rejects.

The new test reads the parameter name off the tool itself, so the guidance
cannot drift from the signature again.

Fixes riponcm#18
@RTE404
RTE404 force-pushed the fix/18-precheck-arg-name branch from e076302 to 9d65540 Compare September 30, 2026 19:04
@riponcm

riponcm commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Thanks Rohan, this is a clean fix, and reading the argument name off the tool's own signature is a nice touch so it can't drift again. Verified on my side: the new test fails on main and passes here, full suite green. I'll merge it in the next update, planned for this Sunday.

@riponcm
riponcm merged commit 5e54b14 into riponcm:main Oct 2, 2026
riponcm added a commit that referenced this pull request Oct 2, 2026
…ool's real arguments

PR #22 pinned precheck_file only, and the README still taught
get_issue(id) where the parameter is issue_id. Read every registered
tool's signature and check each call written in AI_INSTRUCTIONS, the
bridge, the MCP instructions, the README, TUTORIAL and llms.txt.
Fixes the two README get_issue(id) call shapes the sweep found.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

AI_INSTRUCTIONS.md mentions precheck_file(path) when the key argument is actually file_path

2 participants