Skip to content

docs(agents): fix broken steps and de-duplicate the instruction files - #100

Merged
galatanovidiu merged 1 commit into
trunkfrom
docs/agent-instructions-audit
Jul 27, 2026
Merged

docs(agents): fix broken steps and de-duplicate the instruction files#100
galatanovidiu merged 1 commit into
trunkfrom
docs/agent-instructions-audit

Conversation

@galatanovidiu

Copy link
Copy Markdown
Contributor

Audit of AGENTS.md / CLAUDE.md. Three of the findings are things that were actively wrong, not style.

AGENTS.md and CLAUDE.md were the same file

diff reports one differing line out of 32 — Codex vs Claude Code in the purpose sentence. AGENTS.md was added later (9347182 chore: add AGENTS.md for Codex) by copying CLAUDE.md and swapping that word.

Two copies of one file drift, and any edit to either would silently miss the other. CLAUDE.md is now just @AGENTS.md, and the purpose line no longer names a specific agent — the proxy sits between an MCP client and WordPress.

--help never worked

The gate said to smoke-test the tarball with npx mcp-wordpress-remote --help. There is no argv handling anywhere in src/; the binary starts the stdio server and hangs. Measured: exit 124, zero bytes on both stdout and stderr. Published 0.3.5 behaves identically, so this step has never been passable.

Replaced with a check that actually catches something — that the packed dist/proxy.js is the tsup bundle and not per-file output, which is exactly the failure mode #98 just fixed.

"Run all tests" did not run all tests

npx jest tests/unit/ --no-coverage covers 12 suites and silently skips the 3 integration suites. It reported green while omitting a fifth of the tests. Corrected to npx jest tests/unit/ tests/integration/ --no-coverage — 15 suites, 225 tests.

Canary and dist-tag steps removed

Steps 6 and 7 described publishing a canary, soaking it, and rolling back a dist-tag. Those are human release operations; an agent reading this file never performs them. They belonged in a runbook, not in agent instructions.

Added: the version rule

Not inferable from the code and it has broken twice — once shipping a token directory named wordpress-remote-undefined, once needing the follow-up in #85. package.json and MCP_WORDPRESS_REMOTE_VERSION in src/lib/config.ts must move together. Noted alongside it that the token store is namespaced by version, so a bump forces every user to re-authenticate.

Left alone

Commit discipline and the architecture notes verify clean against the code — InitResult at session-utils.ts:130, transportType: null at :93, and the nock endpoint matches transport-detection.test.ts:17. Untouched.

@galatanovidiu
galatanovidiu force-pushed the docs/agent-instructions-audit branch 4 times, most recently from 24517d2 to 4d53cf7 Compare July 27, 2026 14:10
WHAT:
- CLAUDE.md collapses to `@AGENTS.md`. The two files were byte-identical
  except for one word, so AGENTS.md is now the single source of truth and the
  purpose line no longer names a specific agent.
- Reshape "Commit discipline" into "Commits". The agents.md convention asks
  this section for runnable steps, so it now leads with the pre-commit
  commands the repo was missing and states plainly that nothing enforces
  them. The scope rule stays as one line, minus the release number and the
  unrelated SOCKS detail.
- Drop the canary and dist-tag-rollback steps from the release gate. Nothing
  an agent reading this file ever performs; publishing is a human operation.
- Replace the `npx mcp-wordpress-remote --help` smoke test. There is no argv
  handling anywhere in src/, so the binary starts the stdio server and hangs
  with no output. The step could never pass. It now checks that the packed
  dist/proxy.js is the tsup bundle rather than per-file output.
- Correct "run all tests", which ran only tests/unit/ and silently skipped
  the three integration suites.
- Add a Version section: package.json and MCP_WORDPRESS_REMOTE_VERSION in
  src/lib/config.ts must move together.

WHY: Two copies of one file drift, and an edit to either would silently miss
the other. The two commands were wrong in ways that only surface when someone
trusts them: --help hangs, and "all tests" reported green while skipping a
fifth of the suites. The version rule is not inferable from the code and has
broken twice, once shipping a token directory named wordpress-remote-undefined.
@galatanovidiu
galatanovidiu force-pushed the docs/agent-instructions-audit branch from 4d53cf7 to 8f2ae6f Compare July 27, 2026 14:22
@galatanovidiu
galatanovidiu merged commit 7190a4c into trunk Jul 27, 2026
2 checks passed
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