agentic-workflow / plugin-v2
AGENTS.md0 starsChanged 6 months agoMITView on GitHub
Cross-tool root context for AI coding agents using the goal-loop plugin (Claude Code, Codex, Cursor, Aider, Copilot, Gemini, etc.). Tool-specific files (CLAUDE.md, .codex/, .cursor/rules/) @import this file rather than duplicate. One source of truth, many tools. Change plugin conventions here. The Goal Loop plugin is a baseline for goal-bounded OODA loops. It unifies: The loop runs once for bounded problems and continuously for ongoing situations. It is domain-agnostic — use it for code, content, research, operations, strategy, or any knowledge…
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,700 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 repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- plugin-v2/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/agents.mdcCursor rule
- agentic-security-reviewSkill
- arc42-baselineSkill
- caveman-commitSkill
- caveman-helpSkill
- caveman-reviewSkill
- cavemanSkill
- create-goalSkill
- design-twiceSkill
- discovery-sprintSkill
- domain-contextSkill
- github-project-setupSkill
- grillSkill
- improve-codebase-architectureSkill
- issue-breakdownSkill
- issue-draftSkill
- issue-pr-syncSkill
- new-adrSkill
- new-glossary-entrySkill
- orchestrateSkill
- portfolio-trackSkill
- product-pageSkill
- project-reviewSkill
- project-runSkill
- project-scaffoldingSkill
- quality-assuranceSkill
- quality-metricsSkill
- record-decisionSkill
- review-fixSkill
- roadmap-managementSkill
- sales-cycleSkill
- specorator-designSkill
- specorator-improvementSkill
- specorator-onboardSkill
- stock-takingSkill
- tackle-issueSkill
- tdd-cycleSkill
- token-budget-reviewSkill
- tracer-bulletSkill
- ubiquitous-languageSkill
- verifySkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Goal first: No iteration runs without a complete, human-signed goal.
- Very specific: line 36
Evidence-based orientation: Every claim in orientation.md cites observations.
- Distinctive: line 37
Reversibility bias: Prefer reversible actions.
- Distinctive: line 39
Acceptance trace: Every review references each acceptance criterion explicitly with evidence.
- Distinctive: line 41
Logged trail: Every decision and action is logged.
≈ “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.
Files
AGENTS.md
Cross-tool root context for AI coding agents using the goal-loop plugin (Claude Code, Codex, Cursor, Aider, Copilot, Gemini, etc.). Tool-specific files (CLAUDE.md, .codex/, .cursor/rules/) @import this file rather than duplicate.
One source of truth, many tools. Change plugin conventions here.
What this plugin is
The Goal Loop plugin is a baseline for goal-bounded OODA loops. It unifies:
- Goal-oriented orchestration — explicit intent, constraints, and falsifiable acceptance criteria (observer-checkable conditions that decide "done"; see glossary).
- OODA loop (Observe → Orient → Decide → Act) — Boyd's decision cycle, gated by humans at the goal gate (the approval of the goal contract before the first iteration) and the act gate (the approval before Act executes any decision). One full pass is one iteration (Observe → Orient → Decide → Act → Review).
The loop runs once for bounded problems and continuously for ongoing situations. It is domain-agnostic — use it for code, content, research, operations, strategy, or any knowledge work. Each goal lives under goals/<slug>/ (slug — a kebab-case short name like my-goal-slug that identifies the goal folder) with declared observe sources (each a feed, repo, inbox, document, person, command, or other input the observer scans).
The authoritative method definition is docs/method.md. Read it first.
Read these first
Just installed? Run
docs/first-five-minutes.mdbefore this list. 90 seconds, zero input, one full loop on disk. Then come back here for depth.
docs/glossary.md— 5-minute orientation for domain-neutral readers. The canonical enums (status,current_phase, action-logstatus, per-criterionverdict, loop-closureoutcome,reversible) and the load-bearing terms (goal gate,act gate,observe source,iteration,health) all live here. The constitution and the method.md both reference enum values introduced in this doc — read it first or you will hit forward-references for the next four docs.memory/constitution.md— ten governing principles. Override only with explicit human approval and an amendment.docs/method.md— the full Goal Loop method, vocabulary, and state model.docs/domain-model.md— the single-read type map. Read this once; use the targeted docs after. Saves you from chasing cross-references across 20 files to assemble the mental model.docs/goal-orientation.md— what makes a goal worth running and an acceptance criterion falsifiable. Helpful before the first/goal:start.docs/usage-patterns.md— the canonical use-case patterns (issue resolution, daily brief, incident triage, release readiness, continuous awareness).docs/session-vs-iteration-goals.md— pick-by-scenario comparison of/create-goal(session-scoped guardrails) vs./goal:start(iteration-scoped Goal Loop). Read before deciding which surface to use for a given piece of work.- The active goal's
goals/<slug>/goal-state.md— current phase, iteration, and history.
Operating rules
- Goal first. No iteration runs without a complete, human-signed goal.
set-goalis non-skippable. - Phase isolation. Each phase subagent writes only its own artifacts under
goals/<slug>/. No cross-writes. - Human gates. The goal gate and act gate (for irreversible actions) are non-negotiable. Other gates are opt-in per goal.
- Evidence-based orientation. Every claim in
orientation.mdcites observations. No speculation, no extrapolation beyond signals. - Reversibility bias. Prefer reversible actions. Every irreversible action requires a rollback plan in its action spec.
- Escalate, don't invent. Ambiguity goes to the human. The plugin never silently fills in a missing acceptance criterion, constraint, or source.
- Acceptance trace. Every review references each acceptance criterion explicitly with evidence.
- Domain neutrality. Resist software-only language. The method serves any domain.
- Logged trail. Every decision and action is logged. The trail must reconstruct the reasoning.
- Closure honesty. A loop closes only when acceptance is met or the goal is explicitly abandoned. No silent abandonment.
Subagent roster
| Agent | Phase | Scope | Tools |
goal-orchestrator | conductor | Routes, gates, persists goal-state.md. Never produces phase artifacts. | Read, Grep, Edit, Write, AskUserQuestion |
observer | Observe | Scans declared sources, records raw signals. Parallel-capable. | Read, Grep, Write, Bash, WebFetch, WebSearch |
orienter | Orient | Synthesises observations vs. goal + history. | Read, Edit, Write |
decider | Decide | Proposes a ranked decision set with rationale and confidence. | Read, Edit, Write |
actor | Act | Executes the human-approved decision set. May fan out per action. | Read, Edit, Write, Bash |
loop-reviewer | Review | Compares outcomes to acceptance criteria; emits loop verdict. | Read, Edit, Write, Grep |
Consult-only agents (advise the human or a phase agent at gates; never own phase artifacts):
| Agent | Consulted by | Scope | Tools |
goal-critic | set-goal skill (pre-sign-off) | Adversarial review of a drafted goal-state.md. | Read, Grep |
signal-deduper | observe skill (fan-in, N ≥ 2 sources) | Merge cross-source duplicate signals into an attributed view. | Read, Edit, Write, Grep |
risk-scout | decide skill (pre-dispatch) | Surface unstated risks the orientation missed. | Read, Grep |
Skill roster
| Skill | When to use |
goal-loop | Top-level conductor. End-to-end loop drive. |
set-goal | Structured intake — define or amend a goal with falsifiable acceptance. |
observe | Run the Observe phase, fan out parallel observers if needed. |
orient | Run the Orient phase. |
decide | Run the Decide phase, gate the user before Act. |
act | Run the Act phase against the human-approved decision set. |
review-loop | Close the iteration; choose continue / close / amend. |
acceptance-criteria-helper | Walk a user through writing or sharpening a falsifiable acceptance criterion. |
trace-loop | Reconstruct the full reasoning trail for one iteration. Read-only. |
list-goals | Portfolio view — scan goals/, summarise each goal-state.md, emit a recency-sorted table. Read-only. Invoked by /goal:list. |
welcome | First-time guided welcome: tour, hello-world iteration, or docs hand-off. Invoked by /goal:welcome. |
create-goal | Interactive interview that produces a session-scoped goal at session-goals/<slug>.md. Distinct from set-goal (Goal Loop intake). Invoked by /create-goal. |
activate-goal | Activate a session goal in the current tool (native /goal in Claude Code, SESSION-GOAL.md in Codex, .cursor/rules/session-goal.mdc in Cursor). Dispatched by /set-goal. |
export-trace | Export a Goal Loop iteration as an OpenTelemetry GenAI trace JSON for Langfuse / Datadog / Helicone / Arize / Phoenix ingestion. Read-only. Machine-facing sibling of trace-loop. |
Shared rules every conductor obeys: skills/_shared/loop-pattern.md.
State file contract: skills/_shared/goal-state.md.
Slash-command roster
Session goals (cross-tool)
A session goal is a session-scoped intent that keeps the assistant aligned on what the user wants the current sitting to produce. It is distinct from a Goal Loop iteration goal (below) — no phases, no act gate, no goals/<slug>/ state folder. Session goals live one-file-per-goal under session-goals/ and activate per-tool: native /goal stop-hook in Claude Code, SESSION-GOAL.md in Codex, .cursor/rules/session-goal.mdc in Cursor.
| Command | What it does |
/create-goal [slug-or-intent] | Interactive interview that writes session-goals/<slug>.md. Wraps the create-goal skill. |
/set-goal [slug] | Activate (or --clear to deactivate) a session goal. Wraps the activate-goal skill. The user-visible name is /set-goal; the backing skill is named activate-goal to avoid colliding with the Goal Loop intake skill of the same name. |
Goal Loop iterations
| Command | What it does |
/goal:demo [slug] | Zero-input first-touch — scaffolds goals/hello-loop/ from the canonical seed and drives one full iteration end-to-end. The fastest way to confirm the plugin works in your project. |
/goal:welcome [tour|hello|docs] | First-time guided welcome — plain-language tour, hello-world iteration, or hand-off to docs/getting-started.md. Start here for the Goal Loop. |
/goal:start <slug> | Bootstrap and define a new goal (also amend-mode entry for an existing slug). |
/goal:observe [slug] | Run the Observe phase. |
/goal:orient [slug] | Run the Orient phase. |
/goal:decide [slug] | Run the Decide phase + user gate. |
/goal:act [slug] | Execute the approved decision set. |
/goal:review [slug] | Close the iteration. |
/goal:run [slug] | Run a full iteration end-to-end. |
/goal:status [slug] | Read-only state snapshot. |
/goal:list [filter] | Read-only portfolio view of every goal under goals/. Filter --all / --active / --stalled / --done / --cancelled. |
/goal:close [slug] [outcome] | Manually close a goal out-of-band. |
/goal:brief [slug] | Render the periodic brief (recurring goals). |
/goal:amend [slug] | Dedicated amend entry; re-runs the goal gate. |
/goal:trace [slug] [iter] | Read-only walk of the full reasoning trail for one iteration. |
/goal:export-trace [slug] [iter|--all] [--format=otel-genai|langfuse|raw] | Export a Goal Loop iteration as OpenTelemetry GenAI trace JSON. Read-only. Machine-facing sibling of /goal:trace; pipes into Langfuse / Datadog / Helicone / Arize / Phoenix. |
Repo conventions
- Markdown for all artifacts. Concise; precision over completeness.
- File names = kebab-case. Per-goal work under
goals/<slug>/. - Phase artifacts use ISO-timestamp filenames where multiple are produced per iteration (e.g.
observations/2026-05-16T10-00-00.md). - Templates in
templates/are framework-agnostic Markdown. - Cross-doc links are relative.
Tool-specific notes
- Claude Code. Subagents (
agents/), skills (skills/), commands (commands/), plugin manifest (.claude-plugin/plugin.json) are picked up natively.CLAUDE.mdimports this file plus the constitution and method. - Codex. Primary context = this file. Codex specifics in
.codex/. Workflows for Goal Loop iterations under.codex/workflows/. - Cursor. Primary context = this file. Cursor rule at
.cursor/rules/goal-loop.mdcis a thin pointer. - All tools. Templates in
templates/are framework-agnostic.
When the harness gets in your way
The Goal Loop is process-light. If a check or gate is making you fight the tool, fix the goal definition (often the issue is an under-specified acceptance criterion or a missing observe source) — don't work around the loop.
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.

