jj-agentic-workflow
AGENTS.md2 starsChanged 3 months agoMITView on GitHub
You are an agent asked to install this workflow on the current machine. Follow the steps in order — mechanisms before skills, skills before project docs. Ask the user before overwriting anything that already exists; never merge silently. - jj --version ≥ 0.44. If jj is absent, ask the user before installing it. - Identify the host: Claude Code (~/.claude/), Codex (~/.agents/), or other. Skills go to the host's user-level skills directory; hooks only apply on Claude Code. 1. Copy…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository2 other files it gives its agents.
- maintaining-vcs-hygieneSkill
- working-with-jjSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
If the user already has [git] or [aliases] entries with the same keys, show the difference and ask.
- Very specific: line 21
Before setting private-commits, check no existing unpublished commit matches the revset (it would block their next push): run the revset in …
- Distinctive: line 42
If a skill with the same name exists, diff and ask — do not overwrite.
- Distinctive: line 46
Run the hazard suite in a scratch directory (it creates its own temporary repos, never touches real ones):
- Distinctive: line 53
All checks must pass. If a hazard check *fails* on a newer jj, report it as "rule possibly obsolete on jj <version>", not as an …
- Very specific: line 58
Read skills/working-with-jj/references/onboarding.md and apply it: four one-line invariants in the global agent memory file, a short …
- Distinctive: line 60
Do not copy skill content into either — state facts, point at skills.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
Installing jj-agentic-workflow
You are an agent asked to install this workflow on the current machine. Follow the steps in order — mechanisms before skills, skills before project docs. Ask the user before overwriting anything that already exists; never merge silently.
0. Preconditions
jj --version≥ 0.44. If jj is absent, ask the user before installing it.- Identify the host: Claude Code (
~/.claude/), Codex (~/.agents/), or other. Skills go to the host's user-level skills directory; hooks only apply on Claude Code.
1. Mechanisms
- Copy
bin/jj-land,bin/jj-agent-event,bin/jj-agent-reflectto~/.local/bin/(or another directory on PATH — then update thelandalias path accordingly) andchmod +xthem. - Merge
config/jj-config-snippet.tomlinto~/.config/jj/config.toml:- If the user already has
[git]or[aliases]entries with the same keys, show the difference and ask. - Before setting
private-commits, check no existing unpublished commit matches the revset (it would block their next push): run the revset in each active repository and report matches instead of silently installing.
- If the user already has
2. Hooks (Claude Code only)
Copy hooks/*.py to ~/.claude/hooks/ and register them in ~/.claude/settings.json:
jj-abandon-guard.py on PreToolUse (matcher Bash), jj-world-watch.py on PostToolUse
(matcher Bash), jj-session-end-check.py on Stop. All three fail open. The abandon guard
is the only blocking one: it exists because jj abandon deletes bookmarks and cannot be
wrapped by a jj alias, so on a host without hooks that rule stays prose.
Ask the user first, then switch off the host's own Git automation (background fetch,
automatic worktrees, worktree cleanup, PR auto-merge) as far as its settings allow; back up each
settings file. What each host allows and what stays on: "Agent-host Git automation" in
skills/working-with-jj/references/onboarding.md.
3. Skills
Copy skills/working-with-jj/ and skills/maintaining-vcs-hygiene/ to the host's
user-level skills directory. Keep directory names identical to the frontmatter name.
If a skill with the same name exists, diff and ask — do not overwrite.
4. Verify
Run the hazard suite in a scratch directory (it creates its own temporary repos, never touches real ones):
bash tests/multi-writer-hazards.shAll checks must pass. If a hazard check fails on a newer jj, report it as "rule possibly
obsolete on jj <version>", not as an installation error.
5. Onboard the user's projects
Read skills/working-with-jj/references/onboarding.md and apply it: four one-line
invariants in the global agent memory file, a short facts-only AGENTS.md per repository.
Do not copy skill content into either — state facts, point at skills.
6. Report
Tell the user: what was installed where, what was skipped and why, the test result, and
that jj-agent-reflect --days 30 is the periodic review entry point.
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.

