agentleFS
DariuszDuszaDariuszDusza/agentic-workflow-foundry/AGENTS.md

agentic-workflow-foundry

AGENTS.md1 starsChanged 26 days agoApache-2.0View on GitHub

The always-on entry point for every coding agent working in this repository, whatever runtime it runs in. It is short on purpose: it routes you to the one piece of guidance your task needs instead of loading everything. The canonical, detailed rules live in .agents/. When this file and a guardrail disagree, the guardrail wins. - You run inside an agent with file and terminal tools, and you have access to this repository. Read the file, then answer. Never claim…

  • Reads credentials

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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. Distinctive:

    Read the file, then answer.

    line 11
  2. Distinctive:

    Do not invent facts, paths, counts or command output.

    line 12
  3. Very specific:

    Check with ls or git ls-files before describing anything as present.

    line 14
  4. Very specific:

    Never edit in the shared main checkout: several sessions may work this tree at once, and switching a branch there moves HEAD for all of …

    line 20

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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

The always-on entry point for every coding agent working in this repository, whatever runtime it runs in. It is short on purpose: it routes you to the one piece of guidance your task needs instead of loading everything. The canonical, detailed rules live in .agents/. When this file and a guardrail disagree, the guardrail wins.

You have tools, use them

  • You run inside an agent with file and terminal tools, and you have access to this repository. Read the file, then answer. Never claim you cannot read something you have not tried to read.
  • Do not invent facts, paths, counts or command output. Find them in the repository, run the command, or say they are unknown.
  • Check with ls or git ls-files before describing anything as present. Prose drifts; the tree and .agents/areas.json do not.

Before the first edit, every time

  1. The change gets its own branch in its own worktree: make worktree NAME=<branch> FROM=origin/main. Never edit in the shared main checkout: several sessions may work this tree at once, and switching a branch there moves HEAD for all of them (docs/decisions/0003-one-worktree-per-change.md).
  2. The change gets a work item in work/04-doing/ with its ## Plan, its model and effort keys and its merge-gate:. A request carried straight into code leaves nothing another session can read and no receipt when it lands (work/README.md). Work that will not happen now goes to work/00-inbox/ instead: make item TITLE="..." PRIO=3.

How a change gets in

Nothing is committed to the default branch directly. A change is cut onto a branch, verified locally against its merge result with the trunk, read by the reviewer agents its areas route to, opened as a pull request, and merged through the gate its work item declares: merge-gate: auto merges once the review is clean and the merge result verifies; merge-gate: operator waits for a person. No agent ever approves a pull request. Details: .agents/guardrails/change-delivery.md.

The rules that cause real damage if broken

  1. Nothing lands on the default branch without review (docs/decisions/0002-nothing-lands-on-main-without-review.md).
  2. No git stash, no --no-verify, no --no-gpg-sign. Finish, revert or commit; fix the underlying issue instead of bypassing the check that found it.
  3. Never hand-edit generated files. .agents/generated/** and the index block in this file are written by tools/agent-index.py; .claude/agents/, .claude/commands/ and .claude/skills/ by tools/agent-adapters.py. Run make index adapters. Hand edits are overwritten and fail the checks.
  4. Secrets never enter a transcript, a commit, a log line or a report. Credential-shaped files are ask-first to read and never echoed (.agents/guardrails/data-handling.md).
  5. Report faithfully. A run that did nothing must never read as a run that found nothing. Say what you did not cover, and report failed steps instead of dropping them (docs/decisions/0006-faithful-reporting.md).

Load guidance progressively

Load the one guardrail that matches your task from the table below, plus .agents/policy/model-policy.md when the action is risky (destructive, outward-facing, production-bound or irreversible). Skills route a task type to its context and checks; reviewer agents and orchestration playbooks are dispatched by the recipes in .agents/commands/. The loading contract is .agents/guardrails/README.md.

<!-- agent-index:start --><!-- Generated by tools/agent-index.py from the frontmatter under .agents/. Do not edit this block by hand: run make index. -->

Guardrails

Load the one that matches the task.

GuardrailLoad whenRisk
.agents/guardrails/area-kinds.mdLoad before deciding how a change to an area is verified, editing .agents/areas.json, or touching a generated or published file.none
.agents/guardrails/change-delivery.mdLoad before starting any change, cutting a worktree, requesting review, opening a pull request, or merging.review
.agents/guardrails/code-style.mdLoad before writing any code, test, script, commit message, pull request body, or report.none
.agents/guardrails/data-handling.mdLoad before touching credentials, secrets, API keys, env files, state files, logs, personal or customer data, or sending any data to a model provider, and when a secret has leaked into a log or a commit.escalate
.agents/guardrails/git-safety.mdLoad before committing, branching, tagging, resetting, force-pushing, stashing, rewriting history, or deleting a branch or worktree.irreversible
.agents/guardrails/imports.mdLoad before bringing an external project, repository or large tree into this repository.escalate
.agents/guardrails/infrastructure.mdLoad before editing Terraform, running any terraform or cloud CLI command, changing deploy configuration, or touching the infra area or the terraform safety-gate example.escalate
.agents/guardrails/knowledge-architecture.mdLoad before writing or moving a document, filing a decision record, moving a work item between stages, writing a record, or editing the knowledge graph.none
.agents/guardrails/repo-hygiene.mdLoad before editing any .gitignore, staging a tree for the first time, or deciding whether a file may enter history.irreversible

Rules

Apply whenever a file matching the paths is edited.

RuleApplies to
.agents/rules/areas-manifest.md.agents/areas.json, tools/check-areas.sh, tools/test-check-areas.sh
.agents/rules/credential-surface.md**/.env, **/.env.*, **/*.tfvars, **/*.tfstate, **/.secrets/**, **/*.pem, **/*.key, infra/**, examples/terraform-safety-gates/**, tools/check-secrets.sh, tools/test-check-secrets.sh
.agents/rules/doc-frontmatter.mddocs/**/*.md
.agents/rules/gate-authoring.mdtools/*.sh, tools/*.py, tools/gates.txt, .agents/hooks/*.py, evals/retrieval/*.py, examples/terraform-safety-gates/*.sh
.agents/rules/gitignore-anchoring.md.gitignore, **/.gitignore, tools/preflight-init.sh, tools/test-preflight-init.sh
.agents/rules/orchestration-authoring.md.agents/workflows/*.md
.agents/rules/root-makefile-delegates.mdMakefile, **/Makefile, **/*.mk
.agents/rules/work-and-records.mdwork/**, records/**
.agents/rules/worktree-basing-and-gates.mdtools/worktree.sh, tools/test-worktree.sh

Skills

Task routers: the context to load, the rules that bite, the checks to run.

SkillUse when
.agents/skills/agent-coordination/SKILL.mdUse when more than one agent works at once, meaning dispatching subagents, running an orchestration playbook, working while other sessions share the checkout, claiming or handing over a work item, or consolidating several agents' reports. Keeps agents out of each other's trees, every dispatch at a declared tier and effort, and every report honest about what nobody did.
.agents/skills/api-code-generation/SKILL.mdUse when generating API code from a contract or by pattern, meaning handlers or clients generated from a schema, scaffolding a new resource from a sibling, regenerating an SDK, or changing the schema or generator config itself. Keeps the contract the single source, generated output reproducible, and breaking changes explicit.
.agents/skills/api-test-generation/SKILL.mdUse when writing or extending tests for API endpoints, whether for a new endpoint, a bug fix that needs a regression test, or a coverage gap. Produces tests that fail when the behaviour breaks, cover denial as well as success, and never carry real data or real secrets.
.agents/skills/ci-cd-change/SKILL.mdUse when changing a CI pipeline definition, a deploy or release job, build automation, the root Makefile or its delegation, or the list of gates the pipeline runs. Keeps local and CI verification one definition, secrets out of logs, and every path to production behind an explicit approval.
.agents/skills/frontend-change/SKILL.mdUse when changing a frontend application, a shared UI package, a translation bundle, user-facing copy, or content files the frontend renders. Routes to the frontend rulebook the area declares and to the parity and typography checks that must pass.
.agents/skills/guidance-maintenance/SKILL.mdUse when changing the agent guidance layer, meaning AGENTS.md or anything under .agents (guardrails, rules, agents, skills, commands, workflows, policy, hooks, areas.json), the knowledge graph, or the retrieval evals. Covers adding, renaming or removing a guardrail, rule, skill or agent and regenerating the routing table in AGENTS.md with make index. Keeps each rule in one home, the generated maps in sync, and every claim true against the tree.
.agents/skills/infrastructure-change/SKILL.mdUse when editing infrastructure as code, a deploy script, the cloud resource inventory or a production safety gate, or before running any command that plans, applies or deploys against a real environment. Routes to the infrastructure guardrail, the identity-lock pattern and the credential-free checks that must follow every edit.
.agents/skills/refactoring/SKILL.mdUse when restructuring code or guidance without changing behaviour, meaning a rename, an extraction, a move, deduplication, or hoisting repeated code into a shared module. Keeps behaviour identical, scope contained, and every reference (code, docs, guidance, generated maps) moved with the thing it names.
.agents/skills/secret-and-pii-handling/SKILL.mdUse when a task touches credentials, secrets, tokens, environment files, key files, infrastructure state or variables files, or customer and tenant data, or when writing a log line, an error path, a report, a fixture or a prompt that could carry any of them. Also the first stop when a secret or API key has leaked: pasted into a log, a commit, a chat or a report. Keeps secret values out of transcripts, commits, logs and model providers, and customer data out of reports.
.agents/skills/secure-api-endpoint/SKILL.mdUse when adding or modifying an API endpoint by hand (route, handler, serializer, validation, authorization policy). Applies the two-layer auth model, public-identifier-only exposure, tenant-safe persistence and the input, query, upload and log checklist.
.agents/skills/tenant-safe-change/SKILL.mdUse when adding or changing anything that stores or reads tenant-scoped data, meaning a migration or model on the tenant database, a seeder, a background job or cache holding tenant data, or any code that writes across tenants. Prevents row-level-security failures at runtime and silent cross-tenant leaks.
.agents/skills/workspace-import/SKILL.mdUse when changing the ignore rules that decide what may enter history (any .gitignore, a new credential or packaging class, a question about what git add would stage), or when copying another project tree into this repository. Keeps packaging, credentials and customer data out of a history that cannot forget.

Agents

Dispatched through the runtime's subagent facility by the recipes and playbooks.

AgentTier / effortUse when
api-standards-reviewerstandard / highUse to review a new or changed API endpoint (route, handler, serializer, validation, policy, model) before it is committed. Checks route prefix and naming, route ordering traps, the identity and authorization layers, public-identifier-only exposure, validation and pagination, and that tests cover denial as well as success. Read-only. Reports findings, never edits.
code-reviewerdeep / highUse to review a change or pull request for correctness, security, data safety, interface drift and test honesty, the general-logic lens no area rulebook encodes. Read-only on code. Returns verified findings, and when run on its own keeps one review comment updated on the code host. Never approves, never merges.
conflict-resolverdeep / maxUse to resolve the merge conflicts release-merger may not, one agent per pull request in that branch's own worktree, dispatched by the land-prs playbook after the merger returned blocked. Integrates the trunk into the branch, resolves every conflicting file keeping both sides' intent, verifies the merge result, sends the item back for a re-read, and pushes once. Refuses credential, hook, policy, infrastructure, ignore-rule and dependency conflicts. Never merges, approves or force-pushes.
finding-skepticstandard / highUse to try to refute one review finding before it is reported, one agent per finding per lens, dispatched by the review playbooks. Reproduces the claim, looks for the reading under which the code is correct, checks the finding is this change's doing, checks the cited rule exists, and checks the fix. Read-only. Defaults to refuted when it cannot confirm.
guidance-consistency-reviewerstandard / highUse to review a change to the guidance layer (AGENTS.md, anything under .agents, docs, the knowledge graph, the root Makefile help lines the guidance quotes) before it is committed. Catches a rule stated in two places, generated maps drifted from disk, claims about paths or counts that are not true, and hard rules with no mechanical enforcement. Read-only. Reports findings, never edits.
i18n-parity-reviewerstandard / highUse to review a frontend, copy or translation change before it is committed. Catches keys added to one locale and not the others, hardcoded user-facing strings, machine typography in user-facing text, stale content checksums, and product facts typed into a locale bundle. Runs the parity checks. Read-only. Reports findings, never edits.
idea-generatordeep / highUse to turn one operator brief in the inbox into the ideas it actually contains, one agent per brief, working in the worktree it is given. Diverges into the readings the brief could mean, checks each against the tree and the whole queue, and files only the survivors in the ideas stage with the brief quoted verbatim. Never invents a measurement and never shapes an item past the ideas stage.
implementation-plannerdeep / highUse to attach an implementation plan to one backlog idea, one agent per item, in the worktree it is given. Reads the tree first, then writes the item's Plan section (steps, files, gates, the proving command quoted from the area manifest, risks, overlap), sets the tier and effort keys and proposes the merge gate with its reason. Writes no code and never invents a path or a number.
infra-change-reviewerstandard / highUse to review an infrastructure-as-code, deploy-script, pipeline or Makefile change before it is committed. Catches divergent region or project literals, config planted in one environment layer and not the other, deploy-state bypasses, weakened production gates and identity locks, and destroy-or-replace of stateful resources. Runs the credential-free lint first. Read-only. Reports findings, never edits.
plan-reviewerdeep / highUse to challenge one backlog item's Plan before implementation starts, one agent per item, working in the worktree it is given. Asks whether the evidence is real, whether done is provable by the quoted command, whether it is the simplest honest path, whether the tree already does it, whether it collides with work in flight, whether the scope is its own, and what it earns against what it costs. Holds a severity floor, edits only its own review section, may raise the merge gate and never lower it.
release-mergerdeep / highUse to take one reviewed item in the ready stage to a merged commit on the trunk, one agent per item, serially, in that branch's own worktree. Merges the trunk into the branch, resolves only mechanical conflicts, verifies the merge result locally, reads the item's merge gate, and squash-merges only when the review is clean, the merge result is green and the gate allows it. Never approves, never force-pushes, never merges over red.
repo-hygiene-reviewerstandard / highUse to review a change to ignore rules, attributes, tags, tools, work items, records, or any import that copies a tree in, before it is committed. Catches anchored patterns, killed negations, stageable credential shapes, version-tag hijacks and records rewritten in place. Read-only. Reports findings, never edits.
security-data-reviewerstandard / highUse to review a change for credential exposure, secret handling, PII leakage, infrastructure-state risk and data-class routing before it is committed, and for API code the input, query, upload and log checklist. Read-only. Reports findings, never edits.
tenant-safety-reviewerstandard / highUse to review a change that touches tenant-scoped data (a migration, a model on the tenant database, a seeder, a background job, a cache key, or any write that crosses tenants) for row-level-security and isolation safety before it is committed. Catches context-mismatched inserts, unsanctioned bypass paths, new tenant tables left out of forced isolation, and tests that run as a role isolation does not apply to. Read-only. Reports findings, never edits.

Commands

Operator recipes: slash commands where the runtime supports them, runbooks otherwise.

CommandArgumentsDoes
audit<security | docs | hygiene | auth | wiring | free text> [scope] [--deep]Audit one subject and report, never auto-fix. Security, docs, hygiene, auth or wiring by checklist in one context; any focus fanned out with every finding verified by skeptics and a critic naming what nobody looked at, with --deep.
docs<new <what it is about> | adr <the decision> | sync [area or theme]>Documentation work. new writes one document in the right mode (reference, how-to, explanation); adr records a decision with its rejected options and its enforcing mechanism; sync brings documents up to what just landed and bumps only what was actually checked.
end<nothing | quick>Close the session. The full close records the session, reconciles docs and the backlog, releases claims and opens a pull request from its own close branch; quick only summarises and releases claims and commits nothing. Neither runs the tests.
fresh<area id> [seed profile]Reset and reseed an area's LOCAL development data to a known state. Local only; the target is confirmed local before anything runs, and success is read from the output, not from an exit code alone.
idea<the idea, in your own words> [--shaped | todo] [--prio 1-4]Turn an idea, a defect or an improvement into a backlog item. By default a verbatim brief in work/00-inbox for the pipeline to shape; --shaped files a finished idea in work/01-ideas; todo hand-shapes a ticket, plan and review included.
merge<pull request number | approve <slug>>The operator's merge. With a pull request number, check it is really ready, verify the merge result, squash-merge and close out its item; approve <slug> instead records the operator's approval on an operator-gated item so the pipeline may merge it. Runs only after the operator says so.
new<endpoint | service | migration> <what it is>Scaffold something in the api area. An API endpoint, a service class, or a schema change; the schema change stops for the operator's explicit approval before a line is written.
pipeline<nothing | pass | land | prs [numbers] | ideate | plan | deliver [slug] | fix [numbers] | merge | <slug>> [--count N] [--rounds N] [--agents N]Move the backlog. No argument runs the autopilot (one agent per ticket until nothing can move); pass runs every stage once in order; land merges and finishes what is already in flight; prs lands the code host's open pull requests oldest first; a stage name runs one stage; a slug carries one item to merged. Every mode reports what it did not move.
pr<one line on what changed, if the branch name does not say it>Take a branch to a reviewed pull request. Stage only what is yours, run the house review, commit, verify the merge result, push, open the pull request with evidence, and move the item to 05-review on its branch.
review<nothing | session | pull request number>Review and answer. No argument reviews this branch's diff and triages every finding to a fix or a reply; session reviews and improves this session's own work; a pull request number runs the full house review on it.
startOpen a session. Report the tree, the gates, what other sessions and branches already hold, and what is in flight in the backlog, then ask what we are working on. Changes nothing.
status<nothing | next [area or theme]>Where work stands. No argument is a read-only glance at open pull requests and all eight backlog stages across every branch; next recommends two or three items to pick up, in priority order, with what each runs at and how it merges.
verify<nothing | area id | health [area] | i18n [area] | fix [area, suite or test]>Run the gates and report one verdict. No argument runs every gate and every live area's verification; health fans it out per area; i18n checks translation parity; fix runs the tests and repairs failures by root cause.
work<backlog item slug, or what you are about to do>Cut the branch a change happens on, in its own worktree, push it before the first edit, and claim its backlog item. The branch comes before the work, never after.

Workflows

Orchestration playbooks: one agent per unit of work, coverage reported.

WorkflowFans out overDoes
.agents/workflows/audit-sweep.mdone auditor per dimension, then one finding-skeptic per finding per lens, then one completeness criticA read-only audit bigger than one context. A scout decides which dimensions the tree actually has, one auditor per dimension sweeps in parallel, every finding is put to skeptics, and a critic names the ground nobody looked at. Reports; never fixes.
.agents/workflows/autopilot.mdone carrier per ticket, refilled per round from the deepest non-empty stageRun the backlog with one agent per ticket. N tickets in flight, each carried from whatever stage it is in as far as the rules allow, slots refilled from the deepest non-empty stage until nothing can move. Never merges; what reaches 06-ready is handed to merge-ready. A run that moved nothing names every stage it read and why each yielded nothing.
.agents/workflows/deliver.mdone implementer per ticket in work/03-todo, each in its own worktreeTake ready tickets from work/03-todo to reviewed pull requests in parallel. One implementer per ticket claims it, cuts and pushes its branch in its own worktree, builds and verifies exactly what the ticket asks, opens the pull request, and the house review reads it. Never merges.
.agents/workflows/fix-reviewed.mdone fixer per open pull request with confirmed findings, then a pr-review re-read per roundFix every open pull request whose house review confirmed findings, each on its own branch in its own worktree, re-read after every fix pass, up to a round cap; a clean re-read advances the item to work/06-ready. Never merges.
.agents/workflows/guardrail-review.mdone area reviewer per area (and cross-cutting dimension) the diff touches, then one finding-skeptic per finding per lensMap a diff to the areas it touches, fan out the read-only area reviewers in parallel, and put every finding to skeptics; reports every changed file no reviewer read. Run before committing a change that spans areas, and before opening a pull request.
.agents/workflows/ideate.mdone idea-generator per brief in work/00-inboxShape the operator's briefs in work/00-inbox into ideas in work/01-ideas. One idea-generator per brief works out what the brief could mean, drops what the queue or the tree already covers, and files the survivors with the operator's words kept verbatim. Writes only in the pass worktree.
.agents/workflows/land-prs.mdthe open pull requests, oldest first, carried one at a timeLand the open pull requests on the code host, oldest first, one at a time. Each is read, fixed and re-read, then handed to merge-ready; a merge blocked on a conflict is resolved on its branch by the conflict-resolver, re-read, and handed back. Honours every gate; never merges itself.
.agents/workflows/merge-ready.mdone release-merger per ready item, strictly one at a timeMerge the reviewed items in work/06-ready one at a time. Each branch is re-merged with the trunk, the union is verified in its worktree, the item's declared merge-gate is read again, and only then is it squash-merged. The one playbook allowed to merge; it never approves.
.agents/workflows/plan.mdone implementation-planner per idea, then one plan-reviewer per planGive ideas in work/01-ideas an implementation plan, model and effort keys and a merge gate, then an independent plan review; shape an item into work/03-todo only when the review passes. Writes only in the pass worktree.
.agents/workflows/pr-review.mdone reader per question (the correctness reader and each routed area reviewer), then one finding-skeptic per finding per lensThe house review of one pull request, fully automatic. Both readers at once (correctness and the area rules), every finding put to skeptics, one sticky comment that names what nobody read, and on a clean read of the current head the item advances to 06-ready. Never approves, never merges.
<!-- agent-index:end -->

Verify before you claim

  • make verify runs every gate in tools/gates.txt.
  • make test-gates runs every gate's own assertion suite and the command-guard hook tests.
  • make check-index fails if the generated index or the block above is stale.
  • make verify-areas runs every live area's own verify from .agents/areas.json (app/api/, app/ui/, contracts/).
  • make check-adapters fails if a generated runtime adapter in .claude/ is stale; regenerate with make adapters.
  • A gate that checked nothing says SKIP, never PASS. Quote the output; do not summarise it into a pass.

Escalate to the operator

Anything destructive, outward-facing, production-bound or irreversible is asked, not assumed. An approval covers the action it was given for, once; it never carries forward to the next one. The hook in .agents/hooks/ enforces the sharpest of these as a backstop; the guardrails are the rule.

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.