agentleFS
Luis85Luis85/agentic-workflow/plugin-v2/AGENTS.md

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…

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
  1. Very specific:

    Goal first: No iteration runs without a complete, human-signed goal.

    line 33
  2. Very specific:

    Evidence-based orientation: Every claim in orientation.md cites observations.

    line 36
  3. Distinctive:

    Reversibility bias: Prefer reversible actions.

    line 37
  4. Distinctive:

    Acceptance trace: Every review references each acceptance criterion explicitly with evidence.

    line 39
  5. Distinctive:

    Logged trail: Every decision and action is logged.

    line 41

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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.md before this list. 90 seconds, zero input, one full loop on disk. Then come back here for depth.

  1. docs/glossary.md — 5-minute orientation for domain-neutral readers. The canonical enums (status, current_phase, action-log status, per-criterion verdict, loop-closure outcome, 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.
  2. memory/constitution.md — ten governing principles. Override only with explicit human approval and an amendment.
  3. docs/method.md — the full Goal Loop method, vocabulary, and state model.
  4. 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.
  5. docs/goal-orientation.md — what makes a goal worth running and an acceptance criterion falsifiable. Helpful before the first /goal:start.
  6. docs/usage-patterns.md — the canonical use-case patterns (issue resolution, daily brief, incident triage, release readiness, continuous awareness).
  7. 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.
  8. 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-goal is 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.md cites 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

AgentPhaseScopeTools
goal-orchestratorconductorRoutes, gates, persists goal-state.md. Never produces phase artifacts.Read, Grep, Edit, Write, AskUserQuestion
observerObserveScans declared sources, records raw signals. Parallel-capable.Read, Grep, Write, Bash, WebFetch, WebSearch
orienterOrientSynthesises observations vs. goal + history.Read, Edit, Write
deciderDecideProposes a ranked decision set with rationale and confidence.Read, Edit, Write
actorActExecutes the human-approved decision set. May fan out per action.Read, Edit, Write, Bash
loop-reviewerReviewCompares 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):

AgentConsulted byScopeTools
goal-criticset-goal skill (pre-sign-off)Adversarial review of a drafted goal-state.md.Read, Grep
signal-deduperobserve skill (fan-in, N ≥ 2 sources)Merge cross-source duplicate signals into an attributed view.Read, Edit, Write, Grep
risk-scoutdecide skill (pre-dispatch)Surface unstated risks the orientation missed.Read, Grep

Skill roster

SkillWhen to use
goal-loopTop-level conductor. End-to-end loop drive.
set-goalStructured intake — define or amend a goal with falsifiable acceptance.
observeRun the Observe phase, fan out parallel observers if needed.
orientRun the Orient phase.
decideRun the Decide phase, gate the user before Act.
actRun the Act phase against the human-approved decision set.
review-loopClose the iteration; choose continue / close / amend.
acceptance-criteria-helperWalk a user through writing or sharpening a falsifiable acceptance criterion.
trace-loopReconstruct the full reasoning trail for one iteration. Read-only.
list-goalsPortfolio view — scan goals/, summarise each goal-state.md, emit a recency-sorted table. Read-only. Invoked by /goal:list.
welcomeFirst-time guided welcome: tour, hello-world iteration, or docs hand-off. Invoked by /goal:welcome.
create-goalInteractive interview that produces a session-scoped goal at session-goals/<slug>.md. Distinct from set-goal (Goal Loop intake). Invoked by /create-goal.
activate-goalActivate 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-traceExport 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.

CommandWhat 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

CommandWhat 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.md imports 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.mdc is 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.

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.