Skip to content

Add a CLAUDE.md so agents inherit the project's rules - #13

Merged
nikolaystrikhar merged 1 commit into
mainfrom
claude-md
Aug 11, 2026
Merged

Add a CLAUDE.md so agents inherit the project's rules#13
nikolaystrikhar merged 1 commit into
mainfrom
claude-md

Conversation

@nikolaystrikhar

Copy link
Copy Markdown
Contributor

What: a CLAUDE.md capturing the conventions a coding agent cannot infer from src/.

Usage:

slic run unit tests/unit/ConfigTest.php
slic run unit "tests/unit/ConfigTest.php:test_it_rejects_invalid_hook_prefixes"

Both forms are in the file because slic run exposes no --filter — narrowing is the positional <test> argument, which is not guessable from the help output.

Why this way: the rules worth writing down are the ones that are invisible or actively counter-intuitive — tests only run through slic, the namespace (Nexcess\PluginAbsorber\) deliberately does not match the package (stellarwp/plugin-absorber), production classes never grow a reset() for the suite's benefit, exit() is never mocked, and the design spec overrides engineering-plan.md wherever they disagree. Architecture is described at the level that needs several files to reconstruct (the resolve/boot/load lifecycle, the four collaborators) rather than restating file listings. It is export-ignored with the other dev-only files, matching the existing .gitattributes policy, so consumers do not receive it.

Verify: composer test:analysis is green, and git check-attr export-ignore -- CLAUDE.md README.md src/Config.php shows the attribute set on CLAUDE.md only. The test suite is untouched by this PR — it adds no PHP.

The conventions that bite hardest here are the ones no amount of reading
src/ reveals: tests only run through slic, the namespace deliberately does
not match the package name, production classes never grow a reset() for the
suite's benefit, and exit() is never mocked. Collect them where a coding
agent reads them before touching anything.

Export-ignored alongside the other dev-only files, so consumers installing
the library do not receive it.
@nikolaystrikhar
nikolaystrikhar merged commit c4292d1 into main Aug 11, 2026
5 checks passed
@nikolaystrikhar
nikolaystrikhar deleted the claude-md branch August 11, 2026 11:18
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