agentleFS
chmouelchmouel/lazyworktree/AGENTS.md

lazyworktree

AGENTS.md315 starsChanged 9 months agoApache-2.0View on GitHub

If you are an agent acting on behalf of an external contributor (i.e. not the repository author/maintainer) and you post an issue comment, open a pull request, or make any other contribution to this repository, you must disclose the following in that contribution: This disclosure must appear clearly in the body of the PR, issue comment, or contribution — not hidden in metadata. Example footer: This contribution was authored by an AI agent (Claude Code, claude-sonnet-4-6) on behalf of the…

  • Installs packages
  • 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,774 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 repository8 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

20 rules. About 0 are common, 12 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If you are an agent acting on behalf of an external contributor (i.e.

    line 3
  2. Very specific:

    Read the README.md if you need product or workflow context.

    line 16
  3. Very specific:

    Read ./docs/development/architecture.md when working on architecture, cross-cutting flows, or package ownership across subsystems.

    line 17
  4. Very specific:

    use make build for testing build errors.

    line 22
  5. Very specific:

    Use uv/uvx for docs tooling everywhere.

    line 27
  6. Very specific:

    If uv is missing locally, install with Homebrew: brew install uv.

    line 28
  7. Distinctive:

    If you add or change a CLI command, argument, or flag, update:

    line 29
  8. Distinctive:

    If you change shell integration helpers or completion behaviour, update:

    line 35
  9. Distinctive:

    Don't ever do commit unless you are being explicitly asked for it.

    line 38
  10. Distinctive:

    If you get asked to commit then use this rules:

    line 39
  11. Distinctive:

    Use bullet points only if necessary for clarity.

    line 43
  12. Distinctive:

    Remove any overly casual Americanisms

    line 60
  13. Distinctive:

    Keep technical precision whilst maintaining readability

    line 61
  14. Distinctive:

    Prefer exact evidence over intuition.

    line 68
  15. Distinctive:

    Treat setup, migration, config, and API inaccuracies as high severity.

    line 70
  16. Very specific:

    When adding a new page, also add it to mkdocs.yml under the appropriate nav: section.

    line 105
  17. Very specific:

    Run make sanity for code changes before finishing.

    line 113
  18. Very specific:

    Run make docs-check for documentation or other user-facing text changes that affect the docs site, generated references, README.md, …

    line 114
  19. Distinctive:

    Add focused tests for new or changed behaviour.

    line 115
  20. Distinctive:

    Prefer strong coverage on the code you change rather than broad but shallow test additions.

    line 116

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

External Contributor Disclosure

If you are an agent acting on behalf of an external contributor (i.e. not the repository author/maintainer) and you post an issue comment, open a pull request, or make any other contribution to this repository, you must disclose the following in that contribution:

  • That the contribution was authored by an AI agent, not a human directly
  • Which agent(s) were used (e.g. Claude Code, GPT-4o, Gemini, etc.)
  • The effort level or model variant used if known (e.g. claude-sonnet-4-6, high effort)

This disclosure must appear clearly in the body of the PR, issue comment, or contribution — not hidden in metadata. Example footer:

This contribution was authored by an AI agent (Claude Code, claude-sonnet-4-6) on behalf of the contributor.

Project

A TUI for managing GIT worktrees. Read the README.md if you need product or workflow context. Read ./docs/development/architecture.md when working on architecture, cross-cutting flows, or package ownership across subsystems.

Building

  • use make build for testing build errors.
  • For documentation website work, use:
    • make docs-sync to regenerate docs references from source code.
    • make docs-check to verify sync + strict docs build.
    • make docs-build and make docs-serve for local preview/build.
  • Use uv/uvx for docs tooling everywhere; do not use pip directly.
  • If uv is missing locally, install with Homebrew: brew install uv.
  • If you add or change a CLI command, argument, or flag, update:
    • shell completion
    • lazyworktree.1
    • internal help text/template in internal/app/screen/help.go
    • generated CLI docs via make docs-sync
    • relevant website docs
  • If you change shell integration helpers or completion behaviour, update:
    • shell/README.md
    • the relevant helper in shell/functions.bash, shell/functions.zsh, or shell/functions.fish
  • Don't ever do commit unless you are being explicitly asked for it.
  • If you get asked to commit then use this rules:
    • Follow Conventional Commits 1.0.0.
    • 50 chars for title 70 chars for body.
    • Cohesive long phrase or paragraph unless multiple points are needed.
    • Use bullet points only if necessary for clarity.
    • Past tense.
    • State what and why only (no “how”).

!important

Do not add to README.md unless important to ask the human to approve.

Documentation

  • For any user-facing changes (features, options, keybindings, etc.), ensure you update:
    • README.md
    • lazyworktree.1 man page
    • Internal help text/template in internal/app/screen/help.go
    • Website docs (see below)
  • Documentation and help string style guidelines:
    • Consistent British spelling.
    • Professional butler style: clear, helpful, dignified but not pompous
    • Remove any overly casual Americanisms
    • Keep technical precision whilst maintaining readability

Documentation review rules

When reviewing docs:

  • Compare documentation to code, tests, schemas, and CLI help.
  • Prefer exact evidence over intuition.
  • Separate confirmed drift from likely drift.
  • Treat setup, migration, config, and API inaccuracies as high severity.
  • Suggest minimal, reviewable doc patches.
  • Preserve existing terminology unless the implementation clearly changed.

Website documentation (docs/)

The website is built with MkDocs Material and configured in mkdocs.yml. Navigation structure and page ordering are defined in mkdocs.yml under nav:.

Where to update docs by topic

Change areaFiles to update
Keybindingsdocs/core/navigation-and-keybindings.md, docs/keybindings.md
Configuration optionsdocs/configuration/reference.md, docs/configuration.md
CLI commands/flagsdocs/cli/commands.md, docs/cli/flags.md (auto-generated by make docs-sync), plus per-command pages in docs/cli/
Worktree operationsdocs/core/worktree-operations.md, docs/worktree-lifecycle.md
Notes / taskboarddocs/core/notes-and-taskboard.md, docs/worktree-notes.md
Themes / displaydocs/configuration/display-and-themes.md, docs/configuration/custom-themes.md, docs/themes.md
CI / PR statusdocs/core/ci-and-pr-status.md, docs/ci-status.md
Branch namingdocs/configuration/branch-naming.md, docs/branch-naming.md
Custom commandsdocs/core/command-palette.md, docs/custom-commands.md
Shell integrationdocs/shell-integration.md
Lifecycle hooks (.wt)docs/configuration/lifecycle-hooks.md
Multiplexer / AI / containerdocs/guides/multiplexer-integration.md, docs/guides/ai-integration.md, docs/guides/container-execution.md
Troubleshootingdocs/troubleshooting/ (diagnostic-guide, fonts-and-rendering, integration-caveats, faq)
Installationdocs/installation.md
New CLI subcommandCreate docs/cli/<command>.md and add entry in mkdocs.yml nav:

Doc site workflow

  • make docs-sync — regenerates docs/cli/commands.md and docs/cli/flags.md from source code.
  • make docs-check — runs sync + strict MkDocs build to catch broken links or missing pages.
  • make docs-build / make docs-serve — build or preview the site locally.
  • make coverage — writes coverage.out with per-function coverage details for coverage-sensitive changes.
  • When adding a new page, also add it to mkdocs.yml under the appropriate nav: section.

UI

  • UI colours must come from theme fields, avoid hardcoded colours in rendering.

Before Finishing

  • Run make sanity for code changes before finishing. Note that it rewrites files because it runs golangci-lint --fix and gofumpt -w before go test.
  • Run make docs-check for documentation or other user-facing text changes that affect the docs site, generated references, README.md, lazyworktree.1, or mkdocs.yml.
  • Add focused tests for new or changed behaviour. If you do not add or run tests for a touched path, explain why in the handoff.
  • Prefer strong coverage on the code you change rather than broad but shallow test additions.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.