agentleFS
simpletibrsimpletibr/simplicio-loop/AGENTS.md

simplicio-loop

AGENTS.md2 starsChanged 47 days agoMITView on GitHub

Full map + step-by-step: docs/ECOSYSTEM_LLM_GUIDE.md · ADR 0009 · 0010 Max-speed LLM orientation (always): docs/LLM_MAX_SPEED_ORIENTATION.md — also re-fed every loop turn via SIMPLICIO-LLM-ORIENTATION in the loop skill. Three packages, one responsibility each: root simplicio_loop/ = orchestration (this package); packages/mapper/ = survey (scan/inspect/handoff); packages/dev-cli/ = mutation (edit/test/capabilities). All three ship in ONE wheel: pip install simplicio-loop provides simplicio-mapper, simplicio-dev-cli and every other console script (there are no separate simplicio-mapper / simplicio-cli PyPI dependencies; update with simplicio-loop update). packages/fast/ was removed entirely…

  • Installs packages

The file

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

10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every subagent, worker, and provider session MUST read AGENTS.md and every relevant local skill before operating.

    line 61
  2. Distinctive:

    If no argument is given, default to "all open work-items in the default source" and confirm scope in one line only if ambiguous.

    line 129
  3. Very specific:

    Run simplicio-loop squads plan --issues <file.json|-> --family <family> --json.

    line 146
  4. Distinctive:

    Run commands for real — never simulate output.

    line 302
  5. Distinctive:

    TDD is mandatory: every new function or behavior change starts with a failing test (red), then the minimal code to pass (green), then …

    line 303
  6. Distinctive:

    No production code without a test written first.

    line 305
  7. Very specific:

    GitHub issue signature first: before taking an issue, publish the canonical CLAIMED lifecycle comment with the worker/run/attempt identity …

    line 306
  8. Distinctive:

    Never mark an item done without green gates + evidence ("works, not just compiles").

    line 310
  9. Very specific:

    Verify claims locally before pushing: python3 scripts/check.py (the impacted tests — the default selection is scripts/impact_tests.py …

    line 316
  10. Very specific:

    Big refactors/doc rewrites: run python3 scripts/check.py --token-budget and treat a FAIL as a real regression to justify or trim, not to …

    line 321

≈ “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
<!-- simplicio-contract:begin -->

contract: agents schema: simplicio.agents/v1 purpose: Operating contract for every agent in this repository: layout, bound operators, skills, and delivery rules. rules: Read before operating; mutable data (versions, dates, counts) lives in the footer, never in this header.

<!-- simplicio-contract:end -->

AGENTS.md — simplicio-loop

Full map + step-by-step: docs/ECOSYSTEM_LLM_GUIDE.md · ADR 0009 · 0010
Max-speed LLM orientation (always): docs/LLM_MAX_SPEED_ORIENTATION.md — also re-fed every loop turn via SIMPLICIO-LLM-ORIENTATION in the loop skill.

Monorepo layout

Three packages, one responsibility each: root simplicio_loop/ = orchestration (this package); packages/mapper/ = survey (scan/inspect/handoff); packages/dev-cli/ = mutation (edit/test/capabilities). All three ship in ONE wheel: pip install simplicio-loop provides simplicio-mapper, simplicio-dev-cli and every other console script (there are no separate simplicio-mapper / simplicio-cli PyPI dependencies; update with simplicio-loop update). packages/fast/ was removed entirely (issue #1343): the survey that every flow requires is now Mapper-only. Dev setup: bash scripts/dev_install.sh. Local gate: python3 scripts/check.py (by default it runs only the tests the change can affect; --full runs every test file; --package all / --package <name> / --changed scope the package gates). No GitHub Actions gate — the local gate is authoritative.

Simplicio Ecosystem Contract (canonical)

This loop is the convergence layer of one Simplicio ecosystem. For every non-trivial task: survey with simplicio-mapper (scan/inspect/handoff), rank/load relevant skills, mutate through simplicio-dev-cli, validate, and record evidence. There is no Runtime/MCP backend in this stack.

The 7 skills

SkillRole
simplicio-loopunified public entrypoint: orchestrator core + hardened Ralph loop — re-feed the goal until an evidence-gated <promise> or a cap; durable run-journal (attempt memory) + stall detector (scripts/loop_journal.py) so it switches strategy instead of oscillating, plus a task anchor (scripts/task_anchor.py) — durable memory for SCOPE that freezes the acceptance criteria and blocks drift / "done" while any AC is unverified — and, above it, a task backlog (scripts/task_backlog.py, SKILL.md § Phase 0): the frozen multi-item LLM decomposition (per-item ACs + depends_on), genesis-aware (an empty repo leads with a scaffold item), whose done is gated on the verified anchor
simplicio-taskslegacy alias kept only for compatibility with older installs and saved prompts
simplicio-orientterminal-first token economy — output-reduction catalog, tee-cache, signatures-read
simplicio-reviewthermos-style parallel adversarial review on distinct rubrics → deduped verdict
simplicio-compresscaveman-style prose + memory compression, byte-preserving, transform_guard
simplicio-learnretrospective → durable, deduped lessons written to memory
simplicio-autoresearchevolutionary mutate/eval/keep-revert optimizer (Karpathy autoresearch) — yool-guardrailed caps, git-isolated branch, anti-Goodhart gate-first eval, savings-event receipt (scripts/autoresearch.py)

They live in .claude/skills/ and load automatically in this repo.

The 2 bound operators (REQUIRED by the loop)

simplicio-loop does not survey or edit with the LLM — it delegates to two in-repo packages. The loop BLOCKS if either runtime binary is absent:

OperatorBinaryPackageBindsRole
simplicio-mappersimplicio-mapperpackages/mapper/orientsurvey the repo → .simplicio-loop/*.json (the survey that feeds the goal)
simplicio-dev-clisimplicio-dev-clipackages/dev-cli/execute/deterministic_editoperate — apply+verify each decided change via its 6-layer contract, instead of the AI hand-editing

The AI decides; the operators act. See .claude/skills/simplicio-loop/SKILL.md § Bound operators and .claude/skills/simplicio-loop/references/extension-points.md § bound operators.

Worker startup and centralized artifacts (mandatory)

Every subagent, worker, and provider session MUST read AGENTS.md and every relevant local skill before operating. For Loop work, the baseline skills are .claude/skills/simplicio-loop/SKILL.md and .claude/skills/simplicio-prism/SKILL.md; load additional satellite skills selected by the task before mutation.

The canonical default branch owns one centrally built binary/artifact set. Workers consume that binary read-only; they MUST NOT rebuild binaries or regenerate canonical Mapper artifacts. Worktrees isolate source edits and receipts only. Every receipt/handoff MUST record repository and revision, binary digest/version, Mapper generation and artifact digest. Missing, stale, incompatible, or mismatched central artifacts fail closed and route to the central rebuild path only; a worker may not repair them locally or fall back to fabricated/uncertified context.

Full-stack boundaries

simplicio-mapper / simplicio-dev-cli observe, plan, and edit standalone — there is no Runtime/MCP backend in this stack. simplicio-loop owns the full loop subsystem (activation + convergence authority) and mandatory execution-report metrics (per task + consolidated). Coordinators own cognition, not loop activation. See docs/adr/0009 and docs/adr/0010. Providers are workers, never authorities.

Delivery runs through simplicio-loop turbo (simplicio-mapper surveys, the invoking model plans, simplicio-dev-cli applies), preserve simplicio.io/v1, and close only with real tests plus recorded evidence. Facts are MEASURED| only with receipts; otherwise UNVERIFIED|. Missing dependencies fail closed; never fabricate context, tests, savings or provider output. This repository ships a runtime-agnostic super-plugin: the Universal Looping AI Orchestrator plus five satellite skills, with 6 wired adapters and 29 listed hosts (see Runtimes). Any agent runtime that reads AGENTS.md / skill folders can load it.

What to load

The orchestrator IS the protocol — load it and follow it end-to-end:

.claude/skills/simplicio-loop/SKILL.md

It is self-contained and uses only standard tools (shell, git, gh, file edit, web), so it works on any strong LLM. When present, it DELEGATES to its five satellites for deeper, token-cheaper behavior (it never requires them):

SkillAbsorbsRole
simplicio-loopRalph Wiggum loopre-feed the goal until an evidence-gated <promise> or a max_iterations cap; durable run-journal (attempt memory) + stall detector so it changes strategy instead of oscillating (scripts/loop_journal.py); a local task backlog (scripts/task_backlog.py) freezes a vague goal's multi-item decomposition (per-item ACs, dependency-ordered, genesis-aware) and gates each item's close on the task anchor
simplicio-orientrtk + caveman terminal disciplineterminal-first execution, output-reduction catalog, tee-cache, signatures-read
simplicio-reviewthermosparallel adversarial review on distinct rubrics → deduped verdict
simplicio-compresscavemanprose + memory compression, byte-preserving, fail-closed transform_guard
simplicio-learncontinual-learning + teachingretrospective → durable, deduped lessons in memory

Hooks (cross-platform Python, fail-open)

hooks/ makes the loop + token economy deterministic where the runtime supports hooks: loop_stop.py / loop_capture.py (the loop), orient_clamp.py (clamp any command's output + tee-on-failure — works with NO wiring on every runtime), orient_rewrite.py (opt-in auto-clamp). See hooks/README.md.

Runtimes

Wired and listed are different claims. 6 wired adapters ship code in adapters/ and a test in tests/host_<host>/: Claude Code, Codex, Cursor, Grok, Kiro and VS Code. The other 29 listed hosts in simplicio_loop/_catalog/harnesses.json are catalog entries with a README and no adapter code: 28 of them have a generic installer target that writes the skills and the host's entry file (a listing is not proof the host runs the loop), and DeepSeek is a model provider with manual steps. Status per host: adapters/MATRIX.md. Install a host that has an installer target with scripts/install.sh <runtime> (or install.ps1).

Activation

The user invokes it with a target body of work:

/simplicio-loop finish all the open issues
/simplicio-loop clear the CI queue
/simplicio-loop drain the Jira board

If no argument is given, default to "all open work-items in the default source" and confirm scope in one line only if ambiguous.

LLM quick flow

The compact current sequence is canonical in llms.txt: run simplicio-loop "<task>" [--verify "<tests>"] (short for simplicio-loop turbo --repo . --task "<task>"; Mapper reads the repo once and it prints a needs_plan request), then run the printed apply command once with your JSON plan as its heredoc body (simplicio-loop turbo --repo . --apply - --verify "<tests>" <<'PLAN'; Dev CLI applies it and runs --verify; on failed fix the plan once and run it again). Exactly two commands: do not explore, list or read files, and do not run the tests yourself. Then run the focused gates and the live PR re-query. No provider and no API key. Never hand-edit; Dev CLI makes every edit. Execution is always standalone; there is no Runtime/MCP backend.

Squads & Multi-Issue Planning

For >3 issues or multi-issue batch flows:

  1. Run simplicio-loop squads plan --issues <file.json|-> --family <family> --json. The --issues option accepts a .json file path, - for stdin, or an inline JSON list. The planner parses issue dependencies (depends on #N, Parte de #N, full GitHub URLs), orders issues across waves, and outputs explicit contracts and blocked_by constraints.
  2. Mandatory preview before spawn or merge: You MUST present a full preview (assigned squads/roles/effort, file ownership boundaries, and topological merge policy) before starting worker execution or opening PRs. Merges to main always require explicit authorized human approval via simplicio-loop squads gate --approver LOGIN.

Operational Utilities

  • Health check: simplicio-loop doctor runs the general stack overview by default (equivalent to doctor all), verifying login, distribution, runtime, and disk space without requiring --storage or subcommands.
  • Dashboard: simplicio-loop dashboard reuses any active server and preserves state.json without token loss. For remote Tailscale access, pass --allow-host <hostname> or access via *.ts.net with the assigned token.
  • Global cleanup: simplicio-loop install --global --prune-project-copies detects and removes stale project-scope copies when upgrading or installing globally.

Extension points (bind native when available)

The skill defines 50 named extension points (see the Step 1b table in SKILL.md). For each point, if this runtime exposes a faster native capability, bind it — the step becomes deterministic and near-zero-token. The skill never requires a specific runtime; the binding lives here in the host, not in the skill.

There is no Runtime/MCP backend in this stack. When a host cannot bind a given extension point natively, the loop records that it was skipped and continues with the required simplicio-mapper and simplicio-dev-cli operators.

Canonical source per topic (#119 — avoid re-stating the same pitch in N docs)

Each topic below has exactly ONE canonical doc; every other file that touches the topic should link to it instead of repeating the content. When editing one of these topics, edit the canonical file and let secondary docs (PYPI.md, llms.txt, etc.) stay short pointers.

TopicCanonical docSecondary docs that point here instead of repeating it
Elevator pitch / what this repo isREADME.mdllms.txt (one-line summary + link)
Runtime-agnostic contract (extension points, non-negotiables)AGENTS.md (this file, the single agent-instruction file for every runtime)—
Ecosystem / cross-repo dependenciesSIMPLICIO_ECOSYSTEM.md—
Pricing / monetizationPRICING.md—
Loop mechanics (protocol, exit gates).claude/skills/simplicio-loop/SKILL.md + references/*.mdAGENTS.md § Video evidence links in rather than re-describing
PyPI package listing copyPYPI.md (wired as readme in pyproject.toml)— (this is itself the PyPI-rendered page, so it necessarily carries its own condensed pitch)
LLM quick-orientation indexllms.txt—
scripts/*.py core vs satellite classificationdocs/SCRIPTS_INVENTORY.md (#118)README.md § Tests & local checks links in rather than re-listing

Video evidence (Playwright by default · hyperframes on request)

The loop produces demo videos as proof a change works — two engines, one video_evidence extension point. The normal evidence flow uses Playwright: video_evidence verify --url … records the real browser session driving the screen (.webm, → .mp4 with FFmpeg) — the "works, not just compiles" moving proof for any UI change. hyperframes is used only for an explicit custom request — "make an explainer video of screen X" — rendering a deterministic, captioned slideshow of the web_verify screenshots (hyperframes, Node 22+ + FFmpeg, no API keys). Worker: scripts/video_evidence.py; contract: .claude/skills/simplicio-loop/references/video-evidence.md. A missing toolchain BLOCKS, never a fake pass.

PR evidence (prints + item-by-item AC check on every PR)

The PR body is assembled mechanically, never hand-written, so it always shows the proof. Worker scripts/pr_evidence.py build --require-evidence pulls the item-by-item acceptance-criteria checklist from the task anchor (scripts/task_anchor.py, frozen at intake) AND embeds the screenshots (web_verify, under .simplicio-loop/orchestrator/tee/web) and recordings (video_evidence, under .simplicio-loop/orchestrator/tee/video). With --require-evidence it FAILS CLOSED (exit 3, blocked) rather than open a PR that has neither a checklist nor a print. It honors a discovered .github/PULL_REQUEST_TEMPLATE.md (keeps the maintainer's sections, appends checklist + prints below). The task anchor is the same worker that stops task deviation: every turn re-checks the frozen goal (task_anchor.py check) and the DoD gate (task_anchor.py gate) blocks "done" while any AC is unverified.

Progress feedback (real-time)

scripts/loop_progress.py computes "where are we / how much is left" deterministically from the backlog + anchor + its own event trail — never fabricated. Three surfaces, one denominator: N1 hook (Claude/Cursor re-feed header shows phase/step/item/ACs/%), N2 transcript (every turn's first line is render --turn-header, normative on all runtimes), N3 file (.simplicio-loop/orchestrator/loop/PROGRESS.md/progress.json, regenerated every turn — the universal fallback any host, adapted or not, can read with zero extra code). Status command: python3 scripts/loop_progress.py status --json. Full contract, event schema, and the turn×event/runtime×level tables: .claude/skills/simplicio-loop/references/progress-feedback.md.

Development

scripts/dev_install.sh creates ONE venv and installs the root package editable (mapper and dev-cli are built into the single simplicio-loop wheel) — so the loop you run locally always talks to its in-repo siblings, never a stale PyPI release:

bash scripts/dev_install.sh            # venv at .venv/ (default)
source .venv/bin/activate
python3 scripts/check.py                     # default: impact-based, only the tests the change can affect vs origin/main
python3 scripts/check.py --full              # every test file (run before a release tag)
python3 scripts/check.py --base REF          # diff against REF instead of origin/main
python3 scripts/impact_tests.py --json       # the test files the change affects, and the symbols that selected them
python3 scripts/check.py --package mapper    # ruff + pytest tests/python -q (impacted files only; --full for all)
python3 scripts/check.py --package dev-cli   # ruff + mypy + pytest tests/python tests/contracts -q
python3 scripts/check.py --package loop      # no-op alias: the loop's own gate is the rest of this script
python3 scripts/check.py --package all       # all four
python3 scripts/check.py --changed           # only the package(s) touched vs origin/main

A missing tool (no ruff/mypy/pytest on PATH or importable) fails with its own typed reason rather than being silently skipped.

Install (this or another project)

# project-local (copies skills, wires Stop + PreToolUse hooks)
bash scripts/install.sh claude
# global (all projects)
bash scripts/install.sh claude --global
# Windows
pwsh scripts/install.ps1 claude

Or as a marketplace plugin:

/plugin marketplace add wesleysimplicio/simplicio-loop
/plugin install simplicio-loop@simplicio

The marketplace install carries only the lean plugin/ subdirectory (the 7 skills + the wired hooks) — .claude-plugin/marketplace.json source points at ./plugin, so the pip-only assets (capture proxy engine/, token-monitor dashboard) are NOT copied into a user's plugin cache. plugin/ is generated from source by python3 scripts/sync_plugin.py (run it after editing skills or a wired hook); scripts/check.py fails if plugin/ drifts from source.

The installer writes an AGENTS.md-based entry file into the target project for every runtime that needs one (Codex, Antigravity, OpenCode, Orca, Grok → AGENTS.md; VS Code/Copilot → .github/copilot-instructions.md; Kiro → .kiro/steering/simplicio-loop.md; Gemini → GEMINI.md; Aider → CONVENTIONS.md) by appending a marker block that points at the installed skills — it never ships a copy of this repo's own instruction file. Claude Code and Cursor need no entry file (they discover .claude/skills/ / .cursor/ directly).

Hooks (the loop + token economy)

hooks/ ships cross-platform Python hooks (fail-open): loop_stop.py (re-feed/exit), loop_capture.py (promise detect), orient_clamp.py (clamp any command's output, tee on failure), orient_rewrite.py (opt-in auto-clamp). See hooks/README.md for settings.json wiring (the installer does it).

orient_clamp.py needs no wiring — python3 hooks/orient_clamp.py -- <cmd> anywhere.

Safety is enforced, not just described: hooks/action_gate.py is a fail-closed PreToolUse (Bash) / git pre-push hook that BLOCKS irreversible ops (force-push, history rewrite, mass-delete, destructive DDL, infra teardown) and secret-laden commits/pushes before they run (exit 2). python3 hooks/action_gate.py selftest proves the ruleset.

Releases in a monorepo

One wheel, one tag: vX.Y.Z releases simplicio-loop, which carries the Mapper and the Dev CLI (their own __version__ values are component versions, not separate releases). Bump every surface with python3 scripts/version_sync.py apply --version X.Y.Z. There is no GitHub Actions gate and no cross-repo release-train machinery; python3 scripts/check.py is the authoritative local gate before any tag.

Non-negotiables

Delivery work follows the bounded WIP, frozen-AC, finding classification, review-cap, ownership, rebase, and release rules in ADR 0008 and the canonical simplicio-loop policy.

  • Run commands for real — never simulate output.
  • TDD is mandatory: every new function or behavior change starts with a failing test (red), then the minimal code to pass (green), then refactor. No production code without a test written first.
  • GitHub issue signature first: before taking an issue, publish the canonical CLAIMED lifecycle comment with the worker/run/attempt identity and goal. Do this before mutation or a worktree; never take a live claimed issue. A PR reviewer signs its assessment on the PR instead and does not steal the implementation lease.
  • Never mark an item done without green gates + evidence ("works, not just compiles").
  • Secret-scan every diff; route irreversible ops through the human gate. Where hooks exist this is ENFORCED fail-closed by hooks/action_gate.py (PreToolUse/pre-push) — not left to the model.
  • Report token-savings ONLY when a measured receipt backs it (clamp / signatures-read / cache hit / deterministic_edit / savings_ledger); never fabricate a figure. No measured economy → no savings line. Credited only on a passing quality gate.
  • Verify claims locally before pushing: python3 scripts/check.py (the impacted tests — the default selection is scripts/impact_tests.py against origin/main, --full runs every test file — plus claims-audit + _bundle ≡ source parity + the token/context budget guard, scripts/token_budget.py, #121). It requires importable pytest from pip install "simplicio-loop[dev]"; missing pytest is a failing gate result, never a bare-Python fallback. Keep it green.
  • Big refactors/doc rewrites: run python3 scripts/check.py --token-budget and treat a FAIL as a real regression to justify or trim, not to silence with --update-baseline unreviewed.

LLM command and feature index

The complete installed-entry-point and simplicio-loop command map is docs/CLI_COMMANDS.md. Run the most specific --help before invoking a command (not simplicio-loop turbo for a task run: the skill and the quick flow above give its two commands in full). Every new public command must have meaningful help= text, documentation in that file, and a help regression check. The release version lives in pyproject.toml only (python3 scripts/version_sync.py check).

For GitHub work items, keep the body focused on objective, implementation, deployment, and tests. Do not add an Acceptance Criteria section to new or updated issues; report incomplete implementation or failed tests as such.

<!-- simplicio-global-llm-architecture-rules:start -->

Regras arquiteturais obrigatórias para qualquer LLM

Estas regras valem para análise, planejamento, implementação, revisão, testes, release e documentação neste ecossistema. O agente deve lê-las antes de agir:

  1. Não mantenha compatibilidade retroativa. O que está obsoleto deve ser deletado diretamente. Não adicione camadas de compatibilidade, migrações ou fallbacks.
  2. Escolha a implementação mais simples que atende à necessidade atual. Não crie abstrações preventivas nem camadas de configuração desnecessárias.
  3. Divida o sistema em camadas longas. Faça primeiro uma versão mínima end-to-end funcionando; depois adicione capacidades por cima. Não desmonte algo que funciona por complexidades inacabadas.
  4. Mantenha os componentes modulares, com responsabilidades claramente separadas e limites explícitos.
  5. Priorize bibliotecas maduras e mantidas. Não reescreva do zero sem motivo técnico explícito e registrado.
  6. Inspecione primeiro as dependências existentes. Antes de adicionar um pacote ou escrever uma solução própria, verifique o que o projeto já possui.
  7. Decida a arquitetura pensando no longo prazo. Não aceite soluções temporárias com a intenção de mudar depois.
  8. Use padrões de produtos maduros. Pesquise como soluções consolidadas resolvem o mesmo problema e reutilize padrões validados; não reinvente a roda.
<!-- simplicio-global-llm-architecture-rules:end -->

Language precedence

docs/LLM_OPERATING_INSTRUCTIONS.md is the authoritative active instruction set and is written in English. Any other-language passage retained in this compatibility/reference file is non-normative; do not execute it as an instruction.

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.