agentleFS
tylerbutlertylerbutler/repoverlay/.github/copilot-instructions.md

repoverlay

Copilot instructions9 starsChanged 3 months agoMITView on GitHub

Run a single test: repoverlay is a CLI tool that overlays config files into git repositories without committing them. Files are symlinked (or copied) from overlay sources and excluded via .git/info/exclude. This repository optionally uses jj (Jujutsu) for version control, colocated with git. Check which VCS is active by looking for a .jj/ directory at the repo root. If present, use jj commands; otherwise fall back to standard git. When using jj: Key differences from git: - No staging area…

  • Commits and pushes

The file

We split this copilot-instructions.md into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run a single test:

    line 12
  2. Very specific:

    Tests: Use tempfile::TempDir for temporary git repos.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
copilot-instructions.md

Copilot Instructions

Build, Test, and Lint

just check      # Run all checks: format, lint, test
just test       # Run all tests (alias: t)
just lint       # Run clippy lints (alias: l)
just format     # Format code (alias: f)

Run a single test:

cargo test <test_name>
cargo test apply::applies_single_file   # module::test_name pattern
just test <name>                        # passes args to cargo test

Architecture

repoverlay is a CLI tool that overlays config files into git repositories without committing them. Files are symlinked (or copied) from overlay sources and excluded via .git/info/exclude.

  • Single public entry point: lib.rs exposes only run(). All modules are pub(crate).
  • CLI layer (cli.rs): clap derive macros define subcommands. Delegates to core operations in lib.rs.
  • State layer (state.rs): Dual-write persistence — in-repo (.repoverlay/overlays/<name>.ccl) and external backup (~/.local/share/repoverlay/applied/) for recovery after git clean.
  • Source resolution (sources.rs, overlay_repo.rs): Priority-ordered multi-source resolution with first-match-wins semantics. Supports local paths, GitHub URLs, and shared overlay repo references (org/repo/name).
  • Fork inheritance (upstream.rs): Overlays from upstream repositories are automatically inherited by forks via remote detection.
  • Caching (cache.rs): GitHub repos cached in ~/.cache/repoverlay/github/owner/repo/ using shallow clones.

Key Conventions

  • Rust 2024 edition, minimum version 1.91.
  • Clippy pedantic + nursery lints are enabled (see [lints.clippy] in Cargo.toml for allowed exceptions).
  • CCL format (via sickle crate) is used for all configuration and state files — not TOML or JSON.
  • pub(crate) visibility: Used explicitly on all internal APIs for clarity, even in private modules (redundant_pub_crate lint is allowed).
  • Error handling: anyhow::Result for application errors, thiserror for typed errors.
  • Security: Path components (org, repo, overlay names) are validated against traversal attacks. Repository URLs must use https://, ssh://, or git@ schemes. Use -- separator before positional args in git commands to prevent flag injection.
  • Tests: Use tempfile::TempDir for temporary git repos. Test helpers in src/testutil.rs (create_test_repo(), create_test_overlay()). CLI integration tests in tests/cli.rs use assert_cmd.
  • Changelogs: Created via changie new (or just change). Entries go in .changes/unreleased/.
  • Conventional commits: Used for automated version bumps (fix: = patch, feat: = minor, feat!: = major).
  • rustfmt: 100 char max width, 4-space tabs, 2024 edition.

Version Control

This repository optionally uses jj (Jujutsu) for version control, colocated with git. Check which VCS is active by looking for a .jj/ directory at the repo root. If present, use jj commands; otherwise fall back to standard git.

When using jj:

  • jj st — status
  • jj log — history
  • jj diff — working copy changes
  • jj new — create a new change
  • jj bookmark create <name> -r @ — create a bookmark (branch) at the current change
  • jj bookmark set <name> -r @ — move a bookmark to the current change
  • jj git push --bookmark <name> — push a bookmark to the remote

Key differences from git:

  • No staging area — all working copy changes are automatically part of the current change.
  • Bookmarks are jj's equivalent of git branches.
  • jj describe sets the commit message for the current change.
  • jj squash folds the current change into its parent.

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.