Repository navigation
Rewrite CLAUDE.md as a short card - #63
Merged
Merged
Conversation
Replace the 317-line agent guide with a 57-line card: what the library is, the exact gate commands in CI order, the patient-data hazard, and ten rules, each pointing at the fix PR or recorded failure behind it. Every `##` section of documentation/agent-notes.md keeps a pointer from the card, so `pnpm check:agent-notes` still passes. Nothing else changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scripts such as ci:no-internal-refs, and the docs-content test, call a bare pnpm, so `corepack pnpm <script>` still reaches a different pnpm major on PATH and fails with ERR_PNPM_BAD_PM_VERSION. Point at `corepack enable --install-directory <dir> pnpm` with the directory prepended to PATH, which is what made the full gate run here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the 317-line
CLAUDE.mdwith a 58-line card (wc -l < CLAUDE.mdprints58). In order, the card has: what the library is, the gate in CI order, the patient-data hazard in our own words, and ten rules. Each rule points at the PR or recorded failure behind it. OnlyCLAUDE.mdchanges.What was kept, and why
A rule stays only if a past failure proved it. Each one cites the fix PR, plus the
documentation/agent-notes.mdsection where that failure is written up:VERSIONshipped as"0.0.0"(#22); README called a published package unpublished (#17)CHANGELOG.md[Unreleased]heading shipped published code as unreleased (#28)pnpm attwis the wrapper, never the bare CLI--allow-fixture(#44)vendor/grepgrepread 0 during the sweep (#33)Dropped: what the shared agent guide every session reads first already says (brand, no real PHI, what waits for the owner), plus status, phase history, architecture, and rationale with no recorded failure behind it. Git history keeps the old text.
The contract gate still holds.
scripts/check-agent-notes.ts(R5) requires a pointer fromCLAUDE.mdto every##section ofdocumentation/agent-notes.md. The card points at all ten, from the rules and from the gate paragraph (branch protection), so the archive needs no change. No tracked file links to aCLAUDE.md#anchor, so no link elsewhere needed repair.Every command and path the card names, and how it was checked (checked, not run)
package.jsonscripts, checked withjq -r '.scripts | keys[]' package.json:typecheck,lint,format:check,phi-scan,test,test:coverage,build,attw,typecheck:examples,lint:examples,examples,phi-scan:examples,check:no-emdash,ci:no-internal-refs,check:no-internal-refs,check:agent-notes. All 16 are present.Built-in commands and binaries, checked with
command -v:pnpm install --frozen-lockfile: a pnpm built-in.pnpmis on PATH, and CI installs the pinned 10.34.5 frompackageManagerthroughpnpm/action-setup.corepack enable --install-directory <dir> pnpm:corepackis on PATH. This is the card's fix for when thepnpmon PATH is another major. Scripts and tests call a barepnpm, socorepack pnpm <script>alone is not enough. This is how the local gate below was run.npm view @cosyte/transform version:npmis on PATH.python3is on PATH.grep: on PATH. The card names it as the tool not to use.attwCLI:node_modules/.bin/attw, installed bypnpm installfrom devDependencies. The card names it as the thing not to swap in.CI-only, with no local script, and said as such on the card: the dual ESM/CJS import step and actionlint (from the shared
ci.yml), CodeQL (.github/workflows/codeql.yml), and the shared pre-publish pack-and-install job.Files, checked with
git ls-files <path>:.github/workflows/ci.yml,.github/workflows/no-emdash.yml,.github/workflows/no-internal-refs.yml,.github/workflows/codeql.yml,package.json,test/messages/to-fhir.test.ts,scripts/attw.mjs,scripts/phi-scan.ts,CHANGELOG.md,README.md,documentation/agent-notes.md. Directories, checked the same way:.changeset/(2 files),docs-content/(7),vendor/(3).dist/is build output frompnpm build.Gate run
All from the repo root with pnpm 10.34.5:
typecheck,lint,format:check,phi-scan,test(952 of 952),build,attw, the four examples scripts,check:no-emdash,ci:no-internal-refs, and the dual ESM/CJS import.test:coverage: 3 conformance tests hit the 10 s per-test timeout on this shared machine (load average 25 to 47). The same three files pass alone under coverage (34 of 34). With--testTimeout=60000, all 952 tests pass and coverage clears its thresholds. Main CI is green on the same base commit. This change touches no test input except the contract gate, which passes.Follow-up, not in scope
The
documentation/agent-notes.mdpreamble still saysCLAUDE.mdkeeps "every trap" as a one-line imperative. That is no longer true. The task scope isCLAUDE.mdonly, so that sentence is left for a separate change.Harness-Task: 71
🤖 Generated with Claude Code