Skip to content

docs: cut CLAUDE.md to orientation, and gate it there - #55

Open
dobby-coder[bot] wants to merge 2 commits into
mainfrom
docs/claude-md-orientation
Open

docs: cut CLAUDE.md to orientation, and gate it there#55
dobby-coder[bot] wants to merge 2 commits into
mainfrom
docs/claude-md-orientation

Conversation

@dobby-coder

@dobby-coder dobby-coder Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Cuts this repo's CLAUDE.md from 3,525 B to 2,992 B, and more to the point changes what it is for.

Requested in encryption4all/dobby-code#696, under the cross-repo picture settled in dobby-code#675.

Merge order

Merge postguard-docs#128 before this PR.

The cut file forwards readers to docs.postguard.eu/repos/postguard-dotnet for the tracked public API surface, and that page carries nothing about it today: no PublicAPI.Shipped.txt, no RS0016, and no testing section either. #128 is what puts them there. Merged in the other order, three procedures have no home for as long as the gap lasts: regenerating a line from the RS0016 message, the release-time promotion of PublicAPI.Unshipped.txt into PublicAPI.Shipped.txt, and the caveat that both TFMs share one surface until a member becomes #if-conditional.

Both PRs are drafts waiting on the same reviewer, so the order is a review decision and not something this branch can enforce. Saying it here is the whole mitigation.

What the file said, and what it says now

It had become a list of everything an agent had ever noticed here: a Coder-workspace quirk, the pg-ffi pin mechanism, a public-API walkthrough, an API-layout map, and three invariants. What it never said is the thing a container actually needs in its first screen: what this repo is, the position it takes in the PostGuard family, and which siblings a change here touches.

It says that now, and little else.

Where the cut content went

Nothing was only deleted.

Section Went to
Tracked public API surface postguard-docs#128 — a new "Public API surface" section on docs.postguard.eu/repos/postguard-dotnet
Pinned pg-ffi native binaries Same PR, folded into "Build the native library" and the Releasing steps
Multi-TFM test invocation Same PR, a new "Testing" section
Workspace limitation (no net8.0 runtime) Filed as a repo-scoped binding rule. It is a property of the container, not of this repo, so it does not belong in a file checked into it
API layout Already on the docs page under "Architecture", in more detail
Chunked upload range header Already in src/Api/CryptifyClient.cs:97-99, which explains the RFC 9110 §14.4 inclusive end better than CLAUDE.md did, and CryptifyContentRangeTests enforces it
Zip Slip sanitization Already in src/Zip/ZipHelper.cs:38-42, likewise, with ZipHelperTests enforcing it

The last two are worth calling out: those sections were duplicating comments that already sat at the point of enforcement. That is the failure mode the file had, in miniature. A second copy of a rule drifts from the first, and the copy in CLAUDE.md is the one nobody updates.

Naming the revision

Per the ticket, the corpus is not migrated or reconstructed. It stays in history, and the surviving file names the SHA that holds it, so a reader can git show 40004d5:CLAUDE.md. Same shape dobby-code's own CLAUDE.md uses.

Holding the size

This repo has an xUnit suite, so the gate is a test rather than a CI step: tests/E4A.PostGuard.Tests/ClaudeMdOrientationTests.cs, modelled on dobby-code's webhook/claude-md-orientation.test.ts and using the same RepoRoot() walk as the neighbouring PgFfiVersionTests.

It holds the file from both sides:

  1. 4,000 bytes. Not cosmetic. It is the gate from dobby-code#482 that decides whether a container working this repo gets its cwd pointed at the clone.
  2. The six cut headings. The byte cap alone lets any one of them return in a slimmer form, and a small file can still be a junk drawer. #675 makes that point directly: the test is content shape, not byte count.

Both assertions were verified to fail when violated, not just to pass:

CLAUDE.md is 4360 B, over the 4000 B cap. ...
CLAUDE.md carries a heading from the cut corpus again: Zip Slip sanitization. ...

Testing

dotnet build E4A.PostGuard.slnx clean, 0 warnings, both TFMs. dotnet test --framework net10.0: 90 passed, 0 failed (88 before, plus the 2 added here).

--framework net8.0 could not run in this container, which lacks the net8.0 runtime. That is the workspace limitation the old file documented and this PR moves to a rule. CI exercises both.

Round 2

Two points came back on the first review.

The docs dependency. Handled as merge order, above. #128's own description had the order backwards; it now matches.

The riskiest of the three orphaned procedures did not wait for the docs, though. E4A.PostGuard-v0.6.0 was released at 16:51 on 27 July, and the surface promotion landed six minutes later as a separate chore PR (#53), so that release did go out unpromoted. Nothing catches it: PublicApiTrackingTests reads Shipped and Unshipped combined, so an unpromoted surface is green. Filed as a repo-scoped rule, so it reaches the next container working this repo whatever happens to #128.

The third RepoRoot() copy. Not changed. A file-local private RepoRoot() is already the convention in this directory (PgFfiVersionTests, PublicApiTrackingTests each have one), TestHelpers/ holds a test double rather than path utilities, and consolidating would edit two files this PR otherwise leaves alone. Worth doing when someone is next in this area, as its own change.

Re-verified on the branch after both points: dotnet build E4A.PostGuard.slnx clean on both TFMs, 0 warnings, and 90 of 90 tests passing on net10.0.

Reviewed by dobby: one binding rule (code-comments) over the whole two-file diff, plus the two nits carried from the last cycle re-verified against HEAD — no rule breach (the new test file's doc comments are the WHY the neighbouring PgFfiVersionTests and PublicApiTrackingTests also carry), no bugs, and the one fixable nit fixed here in 6b59b0a: the CutSections doc comment counted "three invariants" and then listed four see cref tests, so it now counts four, the way CLAUDE.md:47-51 already does — dotnet build E4A.PostGuard.slnx clean on both TFMs with 0 warnings, 90 of 90 tests passing on net10.0, and both CI checks green on 6b59b0a — approve.
Attention: CLAUDE.md line 43 sends the reader to docs.postguard.eu/repos/postguard-dotnet for how the tracked public API surface works and how a release is cut, but the PR that publishes that content, postguard-docs#128, is still an open draft (state=OPEN, isDraft=true, and the target page carries nothing on the public API surface or testing today), so three procedures land nowhere until it merges: regenerating a line from the RS0016 message, the release-time move of PublicAPI.Unshipped.txt entries into PublicAPI.Shipped.txt, and the "both TFMs share one surface, split per TFM if a member becomes #if-conditional" caveat. This is a merge-order decision for the reviewer and not something this branch can fix — land #128 first, or hold this PR until it merges. Both PR bodies now agree on that order.
Attention: tests/E4A.PostGuard.Tests/ClaudeMdOrientationTests.cs line 74 is the third byte-identical copy of the RepoRoot() slnx-walk, after PgFfiVersionTests and PublicApiTrackingTests. Left as-is deliberately and non-blocking: copying it matches the convention already there, and extracting it into the existing TestHelpers/ would touch two files this PR does not otherwise change. Worth consolidating all three whenever someone is next in this area.

@dobby-coder
dobby-coder Bot requested a review from rubenhensen August 21, 2026 13:23
The file had become a list of everything an agent had ever noticed in the
repo: a workspace quirk, the pg-ffi pin mechanism, a public-API walkthrough,
an API-layout map and three invariants that already have tests carrying their
own reasons. What it did not say is what the repo IS, the position it takes in
the PostGuard family, and which siblings a change here touches.

It says that now, and nothing else. The cut corpus stays in git history at
40004d5, which the surviving file names.

ClaudeMdOrientationTests holds the shape from both sides: 4,000 bytes (also
dobby-code#482's cwd gate), and the six cut headings, so a slimmer version of
the same junk drawer cannot come back under the cap.

Refs: encryption4all/dobby-code#696
The sentence counted "three invariants that already have tests of their own"
and then listed four `see cref` tests. The pg-ffi pin was counted twice: once
as "a build mechanism" and again inside the invariants parenthesis.

Counted the way CLAUDE.md:47-51 already does it — the pg-ffi pin is a repo
invariant — so the six cut headings split 1 + 1 + 4 and the parenthesis lists
four.
@dobby-coder
dobby-coder Bot marked this pull request as ready for review August 21, 2026 17:51
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.

0 participants