cplt
Copilot instructions140 starsChanged 18 days agoMITView on GitHub
cplt is a kernel-enforced sandbox for AI coding agents using macOS Seatbelt (SBPL) and Linux Landlock, seccomp-BPF, and optional bubblewrap, paired with a local HTTP CONNECT proxy and gh/git command guards.
We split this copilot-instructions.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 16
Prefer &str and &[T] over owned types in function signatures.
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 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.
Files
Copilot instructions for cplt
cplt is a kernel-enforced sandbox for AI coding agents using macOS Seatbelt (SBPL) and Linux Landlock, seccomp-BPF, and optional bubblewrap, paired with a local HTTP CONNECT proxy and gh/git command guards.
Core security invariants
- Hostile filesystem boundary.
cpltruns outside the sandbox. Treat every path the sandboxed agent can write as hostile, including the project directory,.git, the per-session scratch directory, agent config/state/data directories, andcplt's cache. - Untrusted file reads. Never read agent-writable paths on the parent side with
std::fs::read_to_string,std::fs::read, orFile::open. Useuntrusted::read_untrusted(path, limit)oruntrusted::open_untrusted(path)with a bounded read so symlinks and FIFOs are rejected. Before passing an agent-writable path to a subprocess, checksymlink_metadata(path)and.file_type().is_file(), becausePath::is_file()follows symlinks. - Hardened subprocess spawning.
std::process::Command::newis a disallowed method inclippy.toml. Parent-side code must build git invocations throughgit::command(project_dir, args), which resolves git viagit::trusted_git()and appliesgit::harden(), and resolve other host binaries throughgit::trusted_binary(). Only add#[allow(clippy::disallowed_methods)]with a comment when the binary path is already resolved or the command deliberately resolvesPATHinside the sandbox. - No silent grants. A grant, restriction, config key, or CLI flag that cannot be honored must fail loudly at the earliest point, preferring
config setover config resolution over launch. Never accept a setting and silently drop it on one backend. Platform enforcement differences must be declared viaLinuxCoverage::Gap(reason)in the policy tables. - Staged rollout. Changes that can break existing setups need an automatic fallback, a documented one-step recovery, or a default-off config key tracked in issue
#264. When gated behind a default-off key, generated profiles with the key unset must remain byte-identical.
Code style and review priorities
- Prioritize security bypasses, macOS vs Linux enforcement drift, symlink or TOCTOU races, parser discrepancies, and missing tests over minor style preferences.
- Prefer
&strand&[T]over owned types in function signatures. - Security-critical changes must include doc comments explaining the security rationale and update
SECURITY.mdwhen the threat model or defense layers change.
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 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 repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
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.

