Skip to content

chore(claude): prune what a public repo should not ship, label what stays - #643

Merged
koniecdev merged 5 commits into
mainfrom
chore/prune-public-claude-surface
Aug 14, 2026
Merged

chore(claude): prune what a public repo should not ship, label what stays#643
koniecdev merged 5 commits into
mainfrom
chore/prune-public-claude-surface

Conversation

@koniecdev

Copy link
Copy Markdown
Owner

Why

LotroKoniecDev is public. The .claude/ tree and scripts/claude/ were built for one maintainer
and shipped to everyone who clones, with nothing explaining which parts were meant for a reader and
which were personal leftovers. This sorts that out: remove what has no value to a stranger, and put
a label on what stays.

What goes

  • .claude/agent-memory/ — one maintainer's accumulated corrections. Three of the four files
    were empty "no entries yet" stubs; the only real entry described an internal loop run (M3-10: HTTPS in compose — lift TheKittySaver dev-cert setup 1:1 (working browser OIDC login in the stack) #144) and
    spawn cost that nobody outside can verify. Now gitignored: agents still read and write it
    locally, it just does not ship. CLAUDE.md's flywheel step routes anything worth keeping to a
    shared place instead — this file, an ADR, or docs/knowledge-base/.
  • enabledPlugins in .claude/settings.json — shared project config was switching on two
    marketplace plugins for every clone. Which plugins a developer runs is their environment, not a
    property of this project. Moved to the gitignored settings.local.json. The dotnet build/test
    pre-allow stays, because that part really is about this repo.
  • The model pin in .claude/agents/code-reviewer.mdmodel: claude-opus-5 + effort: high,
    stamped in from a personal model-policy.env. A public repo should not hardcode a subscription
    tier a contributor may not have. Dropping the # model-policy: review marker opts the file out
    of that stamping; model: inherit matches dat-format-expert.md. Review instructions unchanged.

What gets hardened

Claude's runtime artifacts — scheduled_tasks.json, routines/.state/, checkpoints/,
mailbox/, agent-registry.json, worktrees/, the audit lens runner — were held back only by
.git/info/exclude, which is machine-local and is not cloned. On any other machine a single
git add -A would have published maintainer runtime state to a public repository. The rules move
into .gitignore so the decision belongs to the repo rather than to one laptop.

What stays, now labelled

The loop (scripts/claude/, docs/claude-loop.md, /backlog, /work-ticket) stays. It is tested,
ADR-backed engineering and it belongs with the workflow it drives — but nothing said it was
maintainer-only, so it read as clutter.

  • New scripts/claude/README.md: this needs push access, it does nothing from a fork, here is what
    a contributor wants instead — and here is why issue-trust.sh exists and why it stays on.
  • Maintainer-only banner on /backlog and /work-ticket, pointing hand-driven work at /ticket.
  • A short README.md section, so someone who cloned and wondered about .claude/ gets the answer
    where they are looking, plus a line for issue filers: their text passes the ADR-0026 provenance
    gate and is read by a human first.

Verification

scripts/tests/claude-loop-provenance.tests.sh34/34 pass. The gate itself is untouched;
the run confirms the README's description of it (fails closed, checks comment authors, argument
guard survives LOOP_TRUST_GATE=0) matches the real behaviour. No source or build files change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AxWv8yHP7QAGFuFt2qS7q9

Artur Koniec and others added 5 commits August 14, 2026 19:55
The repo is public. .claude/agent-memory/ held one maintainer's accumulated
corrections -- three of the four files were empty 'no entries yet' index stubs
and the only real entry described an internal loop run (#144) and spawn cost,
which nobody outside can verify or use.

Agents keep reading and writing it locally; it is now gitignored instead of
tracked. CLAUDE.md's flywheel step says so, and routes anything worth keeping to
a shared place: this file, an ADR, or docs/knowledge-base/.

Also moves .claude/worktrees/ from .git/info/exclude into .gitignore, so the
decision travels with a clone instead of living on one machine.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AxWv8yHP7QAGFuFt2qS7q9
…who clones

.claude/settings.json is shared project config, and it was enabling two
marketplace plugins (superpowers, security-guidance) for every clone. Which
plugins a developer runs is their own environment, not a property of this
project -- and a public repo silently turning them on for strangers is the
wrong default.

They move to .claude/settings.local.json, which is gitignored. What stays shared
is the part that really is about this project: pre-allowing dotnet build/test so
a contributor is not prompted for the repo's own gates.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AxWv8yHP7QAGFuFt2qS7q9
…gent

code-reviewer.md carried 'model: claude-opus-5' and 'effort: high', stamped in
from one maintainer's ~/.claude/model-policy.env by apply-model-policy.sh via the
'# model-policy: review' marker. In a public repo that hardcodes a subscription
tier a contributor may not have, and the marker meant any local policy run would
silently write it back.

Dropping the marker opts the file out of stamping; 'model: inherit' matches
dat-format-expert.md and lets the reviewer run on whatever model the session
already uses. The review instructions themselves are unchanged -- they are what
carries the value here, not the model pin.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AxWv8yHP7QAGFuFt2qS7q9
Claude's runtime artifacts -- scheduled_tasks.json, routines/.state/,
checkpoints/, mailbox/, agent-registry.json, the audit lens runner -- were held
back only by .git/info/exclude. That file is machine-local and is not cloned, so
on any other machine a single 'git add -A' would have published this repo's
maintainer runtime state to a public repository.

Moving the rules into .gitignore makes the decision part of the repo instead of
part of one laptop.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AxWv8yHP7QAGFuFt2qS7q9
…tors

Nothing in the repo told a reader what .claude/ and scripts/claude/ were, so the
whole directory read as one maintainer's leftovers. It is two things with two
audiences, and now it says so.

Adds scripts/claude/README.md: the loop is maintainer automation, it needs push
access, it does nothing useful from a fork, and here is what a contributor
actually wants instead. It also explains why issue-trust.sh exists and why it
stays on -- public issues feed an agent that can merge to main, and publishing an
allowlist check does not weaken it.

Puts a maintainer-only banner on /backlog and /work-ticket, which push and merge,
pointing hand-driven work at /ticket. Adds a short README section so someone who
cloned the repo and wondered about .claude/ gets the answer where they are
looking, plus a line for issue filers: their text passes a provenance gate and is
read by a human first.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AxWv8yHP7QAGFuFt2qS7q9
@koniecdev
koniecdev force-pushed the chore/prune-public-claude-surface branch from 2f10c1a to 1df995b Compare August 14, 2026 17:55
@koniecdev
koniecdev merged commit b0f79c4 into main Aug 14, 2026
6 checks passed
@koniecdev
koniecdev deleted the chore/prune-public-claude-surface branch August 14, 2026 17:55
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