Repository navigation
docs: rewrite CLAUDE.md as a short card - #74
Merged
Merged
Conversation
Replace the 299-line CLAUDE.md with a 59-line card: what the repo is, the gate commands in the order CI runs them, the hazard, and only the rules a past failure proved, each citing the PR that fixed it. Two code comments cited CLAUDE.md sentences the card drops; they now point at documentation/agent-notes.md or stand on their own. Harness-Task: 75 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harness-Task: 75 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.
What
Replaces the 299-line
CLAUDE.mdwith a short card (59 lines): what the repo is, its gate in the order CI runs it, its hazard, and only the rules a past failure proved, each citing the cosyte/synth PR that fixed that failure. Nothing was moved into another file: the old text stays in git history, anddocumentation/agent-notes.mdis untouched.Two code comments cited
CLAUDE.mdsentences the card drops, so they were repointed (comments only, no behaviour change):scripts/determinism/engines.ts: the "nothing inside this repository can observe its own ruleset" sentence now citesdocumentation/agent-notes.md, where it still lives.scripts/check-no-internal-refs.sh: the JSDoc guardrail sentence no longer says it lives inCLAUDE.md; the JSDoc lint rule enforces it.No
src/change, so no changeset.Finish line
wc -l < CLAUDE.mdprints59(limit 60).Every command the card names, and how it was checked (checked, not run)
package.json scripts (
jq -r '.scripts | keys[]' package.json):typecheck,lint,format:check,phi-scan,test,test:coverage,build,attw,examples,smoke,check:install,check:test-selection,determinism:digest,check:determinism-window,acquire:oracle,oracle,check:no-emdash,check:no-internal-refs. All 18 present.pnpm phi-scan --staged: thepre-commitentry ofsimple-git-hooksinpackage.json.pnpm check:no-emdash --stdin pr: the--stdin LABELmode in the usage header ofscripts/check-no-emdash.sh.Files (
git ls-files <path>, each returns the path):CHANGELOG.md,README.md,package.json,vitest.config.ts,src/index.ts,src/select.ts,scripts/attw.mjs,scripts/sync-version.mjs,scripts/phi-scan.ts,scripts/phi-allow-list.txt,.github/workflows/ci.yml,smoke.yml,install.yml,test-selection.yml,no-emdash.yml,no-internal-refs.yml. Directories:vendor/(7 tracked),docs-content/(15),.changeset/(2)..changeset/<slug>.mdis a pattern for a new file.Identifiers (grep):
SynthErrorandSYNTH_FATAL_MESSAGESinsrc/codes.ts;resolveKindandresolveMixexported fromsrc/select.ts;VERSIONinsrc/index.ts;BINARY_EXEMPT_PATHSinscripts/phi-scan.ts;NAME,EMAILandEMAILDOMAINtags inscripts/phi-allow-list.txt.Binaries (
command -v):corepack,actionlint,java,git.pnpmmust be pnpm 10 (packageManagerispnpm@10.0.0): the pnpm 12 on this box's PATH refuses the repo (ERR_PNPM_VERIFY_DEPS_BEFORE_RUN, thenERR_PNPM_BAD_PM_VERSION), andtest/docs-content.test.tsshells out topnpm build, socorepack pnpm testalone still fails. The card's fix,corepack enable --install-directory <dir> pnpmwith<dir>first on PATH, was run here and givespnpm --version=10.0.0.attw, named only as the thing not to call, isnode_modules/.bin/attwafter install. CI-only, said as such in the card: the shared prepublish checks and CodeQL (and reviewdog foractionlint).Where the gate comes from
ci.ymlcalls the sharedcosyte/.githubreusableci.yml, whoseverifyjob runsinstall,typecheck,lint,format:check,phi-scan(on, viarun-phi-scan: true),test,test:coverage,build,attwand a dual ESM/CJS smoke; itsprepublishjob runs the shared manifest lint and packed-tarball install;actionlintruns through reviewdog. This repo'sci.ymladdsoracle(acquire:oracle,oracle), the determinism jobs (determinism:digeston Node 22 and 24,determinism:verify,check:determinism-window) andexamples(build,examples).smoke.yml,install.ymlandtest-selection.ymlrunsmoke,check:installandcheck:test-selection.no-emdash.ymlandno-internal-refs.ymlcall the shared gate workflows, which runcheck:no-emdash(tracked files, then--stdinover the PR title, body and commits) andcheck:no-internal-refs.Rules kept, and the failure behind each
SynthError(code)fromSYNTH_FATAL_MESSAGES; selectors resolved firsterr.messagethrough a peer builder; unresolved kinds mislabeled corporaCHANGELOG.md; no hand edits, no[Unreleased]VERSION"0.0.0"pnpm attwis the wrapper; no bareattw, no extra flagsincludeor the test scripts; stage new tests--allow-fixtureexits 2--allow-fixturereached exit 0 over a seeded violator)@cosyte/ccdamoved four digests and six golden fixturessrc/, 562 lines in the built.d.tsDropped
Brand, no-PHI, em dashes and what waits for the owner (every session reads those first, before this file); architecture, per-format status, history and phase names; and rules with no recorded failure in this repo: the ruleset-handling notes (renaming or splitting a required job, requiring a context early), design notes (
buildCcda's defaulteffectiveTime, distinct ASTM patient ids, the deid sweep loci, quirk grounding), and porting rationales from sibling repos.One left out on purpose: the old note to run Prettier over
docs-content/by hand.mainalready fails it (prettier --list-different "docs-content/**/*.md"listsdocs-content/limitations.md), and fixing that is outside this task.Gate run
Run locally on the head commit, from the repo root, with pnpm 10.0.0 on PATH (the card's corepack step), in the card's order. All exit 0:
pnpm typecheck,pnpm lint,pnpm format:check,pnpm phi-scan(262 files, no hits),pnpm test,pnpm test:coverage,pnpm build,pnpm attw,pnpm examples,pnpm smoke,pnpm check:install,pnpm check:test-selection,pnpm run determinism:digest,pnpm run check:determinism-window,pnpm run acquire:oracle,pnpm run oracle,pnpm check:no-emdash,pnpm check:no-internal-refs,actionlint.Two things the first run hit, both from this box rather than the change:
pnpm testfailed under the pnpm 12 on PATH (test/docs-content.test.tsrunspnpm build), which is why the card now says how to get pnpm 10 on PATH; andpnpm run oraclefailed until a JDK was selected (javahere is a version manager shim with no default), then graded clean. Dash check on the changed files and this text:rg -n '[\x{2013}\x{2014}]'finds nothing.Harness-Task: 75
🤖 Generated with Claude Code