mogui-agent-harness
AGENTS.md1 starsChanged 4 months agoMITView on GitHub
This file is a router. It points to where to read, not the content itself. Keep it under 100 lines. Claude Code reads CLAUDE.md, Codex reads AGENTS.md. Cursor uses .cursor/rules/agentic-router.mdc as its project rule adapter. CLAUDE.md, AGENTS.md, .cursorrules, and .windsurfrules share identical content. Automatic memory update: "remember / don't forget / from now on / don't do" triggers an immediate write to Memory.md (protocol = Instructions.md § Memory Update Protocol). If .setup-done is missing, or the project's content files still…
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 33,315 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 repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/agentic-router.mdcCursor rule
- daily-triageSkill
- postmortemSkill
- scopeSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are 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.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
If .setup-done is missing, or the project's content files still contain unfilled double-brace template placeholders (for example the Code …
- Very specific: line 57
Keep open questions in .planning/threads/ instead of locking them into an ADR.
- Very specific: line 58
After writing an important guide/ADR/postmortem, run a Review Gate Quiz of up to 3 questions before commit/push/PR.
- Very specific: line 59
After a long workflow, leave a handoff snapshot in docs/wiki/postmortem/temp/.
- Very specific: line 64
Do not commit directly to dev (it is the integration branch).
- Very specific: line 71
Avoid English-to-Korean calque slang.
- Distinctive: line 73
No emojis in committed files (a hook blocks them).
≈ “Common” is an estimate: at least 1 in 5 of the 42,283 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
Project Instructions: {{product-name}}
This file is a router. It points to where to read, not the content itself. Keep it under 100 lines. Claude Code reads
CLAUDE.md, Codex readsAGENTS.md. Cursor uses.cursor/rules/agentic-router.mdcas its project rule adapter.CLAUDE.md,AGENTS.md,.cursorrules, and.windsurfrulesshare identical content.
Always read before answering
.agent/Instructions.md: Who/What/Rules/Outputs.agent/Context.md: product, team, stack, and decisions SoT.agent/Memory.md: preferences/corrections learning log
Automatic memory update: "remember / don't forget / from now on / don't do" triggers an immediate write to Memory.md (protocol = Instructions.md § Memory Update Protocol).
First-entry autonomous bootstrap
If .setup-done is missing, or the project's content files still contain unfilled double-brace template placeholders (for example the Code safety bullets below), setup has not been completed. Run the appropriate flow yourself instead of telling the human to type commands:
- Empty/greenfield target: run
bash scripts/setup.sh, then fill the remaining placeholders by asking the user (seePROMPTS.md#1).setup.shwrites.setup-donewhen it completes. - Existing project target: from a separate clone of this starter, run
bash scripts/ingest.sh <target-repo-path>(non-destructive; it refuses to run when SOURCE and TARGET resolve to the same directory). Then report the gap report and any*.starterconflicts for the human to adjudicate. After merging, runbash scripts/setup.shto finalize.setup-done— unless ingest warned about an existing husky/lefthook chain, in which case skipsetup.sh(it rewirescore.hooksPath) and merge.githooks/pre-commitautomation into the existing chain by hand (seePROMPTS.md#2).
This contract is host-agnostic: Claude Code and Codex must behave identically here, with no Claude-specific tooling assumed. After either flow, still read .agent/Instructions.md, .agent/Context.md, and .agent/Memory.md before answering.
Required and recommended tools
| Tool | Verify | Install |
| code-review-graph | code-review-graph status | uvx code-review-graph serve or see the MCP config |
| GSD | which gsd-tools | npx @opengsd/gsd-core@latest |
| gstack | command -v gstack (or set GSTACK_HOME) | git clone --depth 1 https://github.com/garrytan/gstack.git <host-skills-dir>/gstack && (cd <host-skills-dir>/gstack && ./setup) |
| Superpowers | check the host plugin manager | install per host |
Workflow definitions live in .agent/workflows/triple-crown.md.
Code safety (load-bearing, fill in per project)
- {{e.g. run the apply command after adding a migration}}
- {{e.g. never print or commit secrets/credentials}}
- {{stack-specific silent failure pattern}}
GSD and the LLM wiki
.planning/= GSD execution state. Useworkstreamsfor large efforts,workspacefor isolation,threadfor open discussions,quickfor small recording tasks,fastfor trivial changes, andcapturefor collecting input.docs/wiki/= long-term knowledge. Decisions go indecisions/D-*.md, operational guides inguides/, retrospectives inpostmortem/.- GSD does not supersede the LLM wiki. GSD holds execution state; the wiki holds long-term knowledge.
code-review-graphMCP = a map of the code structure. Use it first when exploring code or checking the impact of a change. Do not treat it as a document search engine.
Directory conventions
.agent/(singular) = Layer 2 context (Instructions/Context/Memory/workflows). Change it freely..agents/(plural) = external skill library. Do not rename it.docs/wiki/= Layer 3 wiki (decisions/postmortem/guides).
Documentation operations
- Decisions are
D-YYYYMMDD-<author>-<slug>.md(copyD-template.md). After writing one, runbash scripts/decisions-index.shto regenerate the index. - Keep open questions in
.planning/threads/instead of locking them into an ADR. - After writing an important guide/ADR/postmortem, run a Review Gate Quiz of up to 3 questions before commit/push/PR.
- After a long workflow, leave a handoff snapshot in
docs/wiki/postmortem/temp/.
Branch policy
- Work on a
feat|fix|docs|chore/<topic>branch, then open a PR intodev. - Do not commit directly to
dev(it is the integration branch). - Promote
devtomainonly at release time.
Optional: Korean-language projects
These rules apply only when the project writes in Korean. Skip them for English-only projects.
- Avoid English-to-Korean calque slang. Use the approved alternatives in
.agent/korean-persona.md. - Match the Korean voice and tone defined in
.agent/korean-persona.md. - No emojis in committed files (a hook blocks them).
Keep the router under 100 lines. Move the body to .agent/ if it grows.
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.

