chore(agents): stop tracking agent directories - #851
Open
jason931225 wants to merge 5 commits into
Open
Conversation
.grok was tracked and pushed to the remote -- 41 files -- which the no-dot-agent-directories rule forbids. Unlike oyatie's, console's .grok held no source that other code reads. The one code reference, tools/ci/ingest-soft-reds.mjs, WROTE to .grok/harness/lane-board.live.json: a generated artifact, already gitignored. Its output is redirected to ci/harness/ so no tool points into an agent directory. The tree is preserved at refs/preserved/grok; nothing is lost. Recover with: git checkout refs/preserved/grok -- . .gitignore now blocks .grok/, .claude/, .codex/, .cursor/, .agents/, .beads/. NOT DONE HERE: .beads/ and .cursor/ remain tracked. gitignore does not untrack what is already committed, and .cursor/ carries prose that references the moved paths. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
.claude (9), .codex (2), .cursor (53) and .beads (10) are untracked but LEFT ON
DISK: agent tools read those paths from fixed locations, so deleting them would
break local tooling for no gain. The requirement is that they not reach GitHub.
Preserved at refs/preserved/{claude,codex,cursor,beads} before untracking.
.beads carried executable hooks (post-checkout, pre-commit); those are the kind
of load-bearing content that should not live in an agent directory at all. They
remain on disk and are unaffected, but wiring them from a tracked location is
follow-up work.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Four files under .omx/ survived the first pass because the sweep enumerated only the six dot-dirs then known. .omc/ and .omx/ are the same class and are now gitignored too. Preserved at refs/preserved/omx before untracking; files remain on disk. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This repository ran its hooks from an agent working directory (core.hooksPath -> .beads/hooks). Those files are untracked and now gitignored, so a fresh clone has no hooks at all and nothing says so. Meanwhile the ten tracked scripts in tools/hooks/ were not what git was running. Hooks that exist only on the machine that wrote them are not enforcement; they are a local habit. .githooks/ is tracked, reviewable, and identical for everyone. pre-commit refuses staged agent-directory files and staged gitignored files pre-push refuses a workspace that does not compile Local, untracked hooks still run: both delegate to .beads/hooks/<name> and .git/hooks/<name>.local when present, and propagate their exit code. Beads and any per-developer tooling keep working; they simply stop being the only thing between a mistake and the remote. Verified by firing them, not by reading: a staged .claude file was refused, a local delegate ran, and a local delegate exiting 3 propagated 3 rather than 0. Enable with: git config core.hooksPath .githooks Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jason931225
commented
Aug 20, 2026
jason931225
left a comment
Collaborator
Author
There was a problem hiding this comment.
Executive Overview
The PR untracks agent-specific dot-directories (.beads/, .claude/, etc.) to enforce repo isolation and prevent local agent state, logs, and metadata from reaching the remote repository.
16-Lens Reasoning Framework Summary
| Lens | Evaluation |
|---|---|
| 1. Cartesian Doubt & 2. Essentialism | Validates the root requirement: agent scratchpads and local state should not pollute source control. |
| 3. Chesterton's Fence & 9. Operability | Shared review harnesses (such as .claude/workflows/lane-fanout.js) are untracked; any team-wide scripts must be relocated to canonical paths like tools/ or scripts/. |
| 7. Red Team & 16. Zero-Trust | Reduces blast radius and accidental secret/state leakage by stopping tracking of local agent state. |
| 8. Systems Thinking & 11. Blast Radius | Truncated diff confirms deletion of dot-directories; hook delegation to .githooks/ must be verified across contributor environments. |
Key Considerations
- Review is scoped to the provided diff slice (untracking
.beads/and.claude/). - Verify that shared automation workflows previously housed in
.claude/workflows/are preserved in a trackedtools/directory if team-wide execution is required.
Findings not addressable in the diff
.claude/workflows/lane-fanout.js:1[RIGHT] -- diff unavailable or unparseable: Iflane-fanout.jsorbacklog-audit.jsare load-bearing harnesses used across the engineering team, relocate them to a standard tracked path (e.g.tools/ci/orscripts/) rather than leaving them untracked.
🤖 [Reviewed] by Oyatie Anvil
Collaborator
Author
|
❌ Blocked — 12 finding(s) across 72 gates; 10 gate(s) produced no measurement.
🤖 [Blocked] by Oyatie Anvil |
This change was made locally and never reached the branch. .gitignore carried its half; tools/ci/ingest-soft-reds.mjs did not. That is worse than neither half landing. This PR deletes .grok, and the tool still resolved its output to .grok/harness/lane-board.live.json -- so the first CI run after merge would have recreated the very agent directory the PR removes, and .gitignore would have hidden it. PR #851's description already claimed this redirect was in place. It was not. The claim is now true. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Collaborator
Author
Executive OverviewPR #851 (incremental delta 16-Lens Adversarial Evaluation
Critical Risks & Key Observations
Findings not addressable in the diff
🤖 [Reviewed] by Oyatie Anvil |
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.
Agent working directories were tracked and pushed, which the no-dot-agent-directories rule forbids:
.grok(41 files),.claude(9),.cursor(53),.codex(2),.beads(10),.omx(4).Load-bearing content
Unlike oyatie's, console's
.grokheld no source that other code reads. Its one code reference —tools/ci/ingest-soft-reds.mjs— wrote to.grok/harness/lane-board.live.json, a generated artifact that was already gitignored. That output is redirected toci/harness/so no tool points into an agent directory.Untracked, not deleted
.claude,.cursor,.codex,.beadsand.omxremain on disk — agent tools read those exact paths. The requirement is that they not reach GitHub..grokis gone; nothing consumed it.Everything is preserved at
refs/preserved/{grok,claude,codex,cursor,beads,omx}on this remote. Recover withgit checkout refs/preserved/<name> -- ..omxneeded a second pass: the first sweep enumerated only the six dot-directories then known, which is exactly how a stale allowlist lets something through.Tracked hooks
.githooks/is tracked and reviewable, and delegates to local untracked hooks (.beads/hooks/<name>,.git/hooks/<name>.local), propagating their exit codes — so per-developer tooling keeps working while stopping being the only thing between a mistake and the remote.pre-commitrefuses staged agent-directory files and staged gitignored filespre-pushrefuses a workspace that does not compileEnable with
git config core.hooksPath .githooks.Verified by firing them: a staged
.claudefile was refused, a local delegate ran, and a delegate exiting 3 propagated 3 rather than 0.Note
.beads/carried executable hooks (post-checkout,pre-commit). They remain on disk and work, but wiring them from a tracked location is follow-up work — a hook that exists only on the machine that wrote it is a local habit, not enforcement.