dotfiles
AGENTS.md2 starsChanged 5 months agoMITView on GitHub
Main operating contract for this repository. This repository is a public, maintainable, cross-platform dotfiles repository managed safely and incrementally. Although public, it is treated as private by default — no secrets, credentials, or sensitive data are ever committed (see §9). Key context: Keep this block current. Whenever a Stow package is added, removed, or first stowed to $HOME, update this status block and the matching block in CLAUDE.md in the same commit. See docs/decisions/ for the rule. Responsibilities: Output format:
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-dotfile-packageSkill
- create-architectureSkill
- create-planSkill
- create-prdSkill
- review-changeSkill
- ship-changeSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
46 rules. About 2 are common, 26 are distinctive, and 18 are very specific to this project.
≈2
Common · estimate
Many files like this have a rule of this kind.
≈26
Distinctive · estimate
This author's own choices. Worth a look.
18
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 58
Consider long-term maintainability across macOS, Arch, and Debian.
- Distinctive: line 59
Consider macOS, Arch, and Debian separately — never assume a shared approach.
- Distinctive: line 61
Avoid implementation unless explicitly asked.
- Distinctive: line 97
Avoid implementation — planning only.
- Distinctive: line 137
Never invent architecture or deviate from the approved plan.
- Distinctive: line 138
Never modify files outside the repository.
- Very specific: line 139
Never run destructive commands (rm, mv against $HOME, stow --adopt).
- Very specific: line 140
Never run stow automatically.
- Very specific: line 141
Prefer creating documentation and .example files before executable automation.
- Distinctive: line 172
Check that examples use placeholder values, not real data.
- Very specific: line 173
Verify no stow --adopt, rm, mv, or ln -s targeting $HOME was introduced.
- Distinctive: line 238
No agent may perform destructive operations or modify files outside the repository.
- Very specific: line 262
Use the create-prd skill to produce PRDs.
- Very specific: line 264
Use the create-architecture skill for architecture proposals and the create-plan skill for implementation plans.
- Distinctive: line 293
Do not rely only on conversation history for important project decisions.
- Very specific: line 299
Do not delete real user dotfiles.
- Very specific: line 300
Do not overwrite real user dotfiles.
- Very specific: line 301
Do not run stow --adopt automatically.
- Very specific: line 302
Do not run stow without explicit user approval.
- Distinctive: line 303
Do not create symlinks without explicit user approval.
- Very specific: line 304
Do not run rm, mv, or ln -s against $HOME.
- Distinctive: line 305
Do not modify files outside the repository.
- Distinctive: line 306
Prefer dry-run examples over live commands.
- Very specific: line 307
Prefer .example, .sample, or .template files for initial config.
- Common: line 325
Never include passwords, tokens, API keys, SSH private keys, private hostnames, work secrets, or sensitive personal information.
- Very specific: line 326
Use placeholder values in all examples (e.g., your-token-here, YOUR_API_KEY).
- Very specific: line 328
Prefer .example files over real config files during early adoption.
- Distinctive: line 335
Do not use Homebrew commands in Arch or Debian configs.
- Distinctive: line 336
Do not use pacman or yay commands in macOS or Debian configs.
- Distinctive: line 337
Do not use apt commands in macOS or Arch configs.
- Distinctive: line 338
Do not mix OS-specific config into shared/common config.
- Distinctive: line 341
Avoid hardcoded machine-specific paths.
- Distinctive: line 351
Use a package-based layout — one directory per logical config group.
- Very specific: line 352
Do not use a flat stow . approach (unsafe, uncontrolled).
- Distinctive: line 359
Always provide a dry-run example before an install example:
- Distinctive: line 369
Keep common, macOS, and Arch packages separate directories.
- Very specific: line 370
Do not use stow --adopt automatically — it overwrites files without warning.
- Very specific: line 371
Do not stow .example files unless intentionally renamed by the user.
- Distinctive: line 377
Every important decision must be documented.
- Distinctive: line 378
Keep documentation short and clear — prefer Markdown.
- Common: line 397
Check for secrets: before staging any file.
- Distinctive: line 398
Prefer small, focused commits over large batched changes.
- Distinctive: line 399
Commit messages must explain intent, not just what changed.
- Distinctive: line 400
Do not commit generated sensitive files.
- Distinctive: line 401
Do not commit machine-specific local overrides.
- Very specific: line 427
Do not use commands that modify $HOME without explicit user approval.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Main operating contract for this repository.
1. Project Purpose
This repository is a public, maintainable, cross-platform dotfiles repository managed safely and incrementally. Although public, it is treated as private by default — no secrets, credentials, or sensitive data are ever committed (see §9).
Key context:
- macOS is frequently used (primary environment).
- EndeavourOS / Arch Linux is also used.
- Debian (stable, trixie / 13+) runs on all servers.
- GNU Stow is the symlink manager (package-based layout under
stow/). - Dotfiles are stowed — all
stow/common/packages exceptrex(imported by hand, seedocs/guides/rex-setup.md), plus the macOS-onlystow/macos/ghosttyon macOS, are symlinked into$HOME. - The Claude Code operating layer (agents, rules, skills, documentation workflow) is complete and active.
2. Repository Status
Current status: Claude Code operating layer complete; common and macOS packages stowed.
Dotfiles implementation: stowed — all stow/common/ packages except rex symlinked into $HOME.
GNU Stow packages: see stow/common/ and stow/macos/ (source of truth; arch/, debian/ empty).
Stowed to $HOME: all stow/common/ packages except rex (theme imported into Rex by hand; stowing it is optional), plus stow/macos/ghostty on macOS — live symlinks into the repo; other stow/macos/ packages are not stowed.
Home directory: modified by these symlinks; further modifications forbidden unless explicitly requested.Keep this block current. Whenever a Stow package is added, removed, or first stowed to
$HOME, update this status block and the matching block inCLAUDE.mdin the same commit. Seedocs/decisions/for the rule.
3. Core Principles
- Safety first — never modify the user's home directory without explicit approval.
- Privacy first — repository is private by default; no secrets, credentials, or sensitive data.
- PRD before implementation — define what and why before how.
- Architecture before planning — structure decisions precede task breakdown.
- Planning before building — approved plan required before any implementation.
- Review before committing — Reviewer validates every change before commit.
- Incremental adoption — add dotfiles one package at a time, never all at once.
- Cross-platform by design — macOS, Arch, and Debian are treated separately from the start.
- No destructive automation — risky commands are shown, not executed.
4. Agent Roles
Architect
Responsibilities:
- Define repository structure and layout.
- Make architecture decisions and document tradeoffs.
- Consider long-term maintainability across macOS, Arch, and Debian.
- Consider macOS, Arch, and Debian separately — never assume a shared approach.
- Define risks and open questions.
- Avoid implementation unless explicitly asked.
Output format:
## Context
[Summary of what was requested and current state]
## Proposed Architecture
[Structure, layout, design decisions]
## Decisions
[Explicit architecture decisions made]
## Risks
[What could go wrong, edge cases, platform differences]
## Open Questions
[Unresolved decisions that need user input]
## Recommended Next Step
[What the Planner or user should do next]Planner
Responsibilities:
- Convert an approved architecture or PRD into a concrete step-by-step implementation plan.
- Break work into small, safe, reviewable tasks.
- Identify files to create or modify.
- Identify validation steps for each task.
- Identify rollback strategy when applicable.
- Persist significant plans under
docs/plans/. - Avoid implementation — planning only.
Output format:
## Objective
[What this plan achieves]
## Assumptions
[What must be true before starting]
## Ordered Tasks
1. [Task description]
2. [Task description]
...
## Files Affected
- [path/to/file] — created / modified / deleted
## Safety Checks
- [Condition that must be verified]
## Validation Commands
- [Safe, read-only commands to verify each task]
## Rollback Strategy
[How to undo if something goes wrong]
## Completion Criteria
[How to know the plan is fully done]Builder
Responsibilities:
- Implement only approved plan items — no improvisation.
- Make minimal, focused changes per task.
- Never invent architecture or deviate from the approved plan.
- Never modify files outside the repository.
- Never run destructive commands (
rm,mvagainst$HOME,stow --adopt). - Never run
stowautomatically. - Prefer creating documentation and
.examplefiles before executable automation.
Output format:
## Changes Made
[Description of what was implemented]
## Files Created or Modified
- [path/to/file] — created / modified
## Commands Run
- [command executed]
## Skipped
[Items from the plan that were intentionally skipped and why]
## Next Steps
[What the Reviewer or user should do next]Reviewer
Responsibilities:
- Review changes for safety — no destructive operations introduced.
- Review changes for privacy — no secrets, tokens, keys, or sensitive data.
- Review cross-platform correctness — macOS, Arch, and Debian not incorrectly mixed.
- Review documentation clarity — commands are copy-pasteable and safe.
- Check that examples use placeholder values, not real data.
- Verify no
stow --adopt,rm,mv, orln -stargeting$HOMEwas introduced. - Persist significant review reports under
docs/reviews/.
Output format:
## Summary
[What was reviewed]
## Blocking Issues
- [Issue that must be resolved before commit]
## Non-Blocking Suggestions
- [Optional improvement]
## Safety Verdict
PASS / FAIL — [reason]
## Privacy Verdict
PASS / FAIL — [reason]
## Documentation Verdict
PASS / FAIL — [reason]
## Recommended Next Action
[What the user or Builder should do]5. Agent Handoff Flow
1. User request
↓
2. Architect — analyzes request, proposes structure, defines decisions
↓
3. Planner — converts approved architecture/PRD into ordered tasks
↓
4. Builder — implements approved plan items only
↓
5. Reviewer — validates for safety, privacy, documentation
↓
6. User confirmation
↓
7. Commit (only after Reviewer approves)Rules:
- Builder must not start without a plan whose
**Status:** Approved. - Builder must stop and wait at PRD, architecture, and plan approval gates; approval must be an explicit user response after the artifact exists.
- Reviewer may recommend approval, but may not approve a PRD, architecture, or plan on the user's behalf.
- Approval must not be inferred from the original request, urgency, or broad instructions such as "do the work", "end to end", or "follow the workflow".
- Builder must not change the Plan status — only the Reviewer may mark a Plan Complete.
- Reviewer marks the Plan Complete only after implementation review passes with no blocking issues.
- Reviewer must name the completed Plan in the review report Summary.
- Reviewer must be strict — blocking issues prevent commit.
- Architect must not ignore cross-platform concerns.
- Planner must include validation steps and rollback strategy.
- New PRDs, architectures, and plans start as Draft. Change them to Approved only after explicit user approval.
- No agent may perform destructive operations or modify files outside the repository.
See docs/claude/DOCUMENT-LIFECYCLE.md for the full lifecycle rules.
6. PRD-First Workflow
Any significant change starts with a Product Requirements Document (PRD).
A PRD must define:
- Goals — what this achieves.
- Non-goals — what is explicitly out of scope.
- Scope — what files, systems, or packages are affected.
- Safety requirements — constraints to prevent data loss or exposure.
- Acceptance criteria — how to verify the work is complete and correct.
Workflow:
PRD → Architecture → Review → Plan → Review → Build → Review → CommitUse the create-prd skill to produce PRDs. Store them under docs/prd/.
Use the create-architecture skill for architecture proposals and the create-plan skill for implementation plans.
See docs/claude/DOCUMENT-LIFECYCLE.md for valid statuses, transition rules, and who is responsible for each status update.
7. Persistent Documentation Workflow
Project knowledge must be persisted in these directories:
docs/prd/ → PRDs and feature requirements
docs/architecture/ → architecture proposals and decisions
docs/plans/ → implementation plans (Planner output)
docs/reviews/ → Reviewer reports
docs/decisions/ → ADR-style decision records
docs/claude/ → agent guides and workflow documentationRules:
- Significant work must have a PRD under
docs/prd/. - Significant implementation must have a plan under
docs/plans/. - Reviews must be stored under
docs/reviews/. - Important technical decisions must be stored under
docs/decisions/. - Use numbered filenames:
0001-dotfiles-foundation.md0002-stow-package-layout.md0003-macos-arch-separation.md
- Do not rely only on conversation history for important project decisions.
8. Safety Rules
- Do not delete real user dotfiles.
- Do not overwrite real user dotfiles.
- Do not run
stow --adoptautomatically. - Do not run
stowwithout explicit user approval. - Do not create symlinks without explicit user approval.
- Do not run
rm,mv, orln -sagainst$HOME. - Do not modify files outside the repository.
- Prefer dry-run examples over live commands.
- Prefer
.example,.sample, or.templatefiles for initial config. - Any risky command must be shown to the user, not executed.
One bounded exception. When an operator explicitly asks for an install or update run and you are following
docs/agent/(a different contract from this one — that directory is for deploying this repository onto a machine, not authoring it), that request is the approval this section requires forstowand the symlinks it creates. See ADR-0065 for what is lifted and what stays absolutely forbidden —sudo,--adopt,rm/mvin$HOME, and resolving conflicts among them. The exception cannot be inferred: absent an explicit request, this section applies unchanged.
9. Privacy Rules
- Repository is public, but treated as private by default — assume sensitive data must never be committed, even though the repo is publicly visible.
- Never commit secrets.
- Never include passwords, tokens, API keys, SSH private keys, private hostnames, work secrets, or sensitive personal information.
- Use placeholder values in all examples (e.g.,
your-token-here,YOUR_API_KEY). - Audit files before committing — check for real credentials.
- Prefer
.examplefiles over real config files during early adoption.
10. Cross-Platform Rules
- macOS, EndeavourOS / Arch, and Debian must be considered separately.
- Do not use Homebrew commands in Arch or Debian configs.
- Do not use pacman or yay commands in macOS or Debian configs.
- Do not use apt commands in macOS or Arch configs.
- Do not mix OS-specific config into shared/common config.
- Commands must specify the target OS when relevant.
- Future scripts must detect OS before suggesting package manager commands.
- Avoid hardcoded machine-specific paths.
- Common packages: configurations that work on all platforms without modification.
- macOS-specific: configurations only for macOS.
- Arch-specific: configurations only for EndeavourOS / Arch.
- Debian-specific: configurations only for Debian.
11. Future GNU Stow Rules
- Use a package-based layout — one directory per logical config group.
- Do not use a flat
stow .approach (unsafe, uncontrolled). Preferred explicit command style:
stow --dir=stow --target="$HOME" <package>Always provide a dry-run example before an install example:
# Dry run first stow --dir=stow --target="$HOME" --simulate <package> # Install only after verifying dry-run output stow --dir=stow --target="$HOME" <package>- Keep common, macOS, and Arch packages separate directories.
- Do not use
stow --adoptautomatically — it overwrites files without warning. - Do not stow
.examplefiles unless intentionally renamed by the user.
12. Documentation Rules
- Every important decision must be documented.
- Keep documentation short and clear — prefer Markdown.
- Commands must be copy-pasteable and safe by default.
Dangerous commands must be clearly marked:
⚠️ MANUAL STEP — review before running- README is user-oriented: explains purpose and usage.
- Architecture docs are decision-oriented: explain what and why.
- PRDs define scope, goals, non-goals, and acceptance criteria.
- Plans define ordered, safe, actionable implementation steps.
- Reviews define findings, verdicts, and recommended next action.
13. Commit Rules
- Review before commit — Reviewer must approve.
- Check for secrets before staging any file.
- Prefer small, focused commits over large batched changes.
- Commit messages must explain intent, not just what changed.
- Do not commit generated sensitive files.
- Do not commit machine-specific local overrides.
- Conventional Commits 1.0.0 (spec) — every
commit message and pull request title uses it.
git-cliffbuildsCHANGELOG.mdfrom the commit log (docs/decisions/0055-git-cliff-changelog-generation.md), so a malformed subject is lost from the changelog. - Format:
type(scope)!: short description, where(scope)and!are optional.- Types:
feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert. Usefeatandfixonly for a change a user of the code can observe. - A breaking change carries
!before the colon, or aBREAKING CHANGE:footer. feat(stow): add zsh common packagedocs(plans): add zsh bootstrap plan for macOSfix(rules): correct cross-platform package manager guidance
- Types:
14. Suggested Commands
Safe read-only commands for inspecting repository state:
git status
git diff
git diff --staged
git log --oneline -20Do not use commands that modify $HOME without explicit user approval.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

