agentleFS
sdageltcsdageltc/letitloop/skill/SKILL.md

letitloop

Skill4 starsChanged 3 months agoMITView on GitHub

Comprehensive Autonomous Macro-Task Control Loop & Verification Engine. Plans DAG dependency contracts, executes tasks via pluggable worker adapters (Claude Code, Antigravity CLI, Omniroute, Ollama, direct LLMs), enforces zero-trust deterministic acceptance checks, arbitrates multi-lens quality reviews, and reconciles cryptographic evidence ledgers. Fully provider-agnostic (0-subscription local Ollama, routing gateways, or commercial APIs).

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

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

    When this skill is triggered by a user request:

    line 25
  2. Very specific:

    Auto-Install Check: Check if the lil CLI engine is installed.

    line 26
  3. Very specific:

    MCP Server Mode: If connecting through Model Context Protocol, the agent starts and queries letitloop-mcp to run deterministic checks, …

    line 35
  4. Distinctive:

    No API keys or cloud subscriptions needed:

    line 92
  5. Distinctive:

    Use dynamic gateway routing across dozens of models:

    line 102
  6. Very specific:

    When connecting via Model Context Protocol (letitloop-mcp), the assistant has direct access to the full orchestrator engine:

    line 161
  7. Distinctive:

    Every step in an autonomous plan is defined by a strictly validated contract:

    line 199
  8. Very specific:

    Zero Blind Edits: All worker file mutations must reside within workspace_scope.allow.

    line 289
  9. Very specific:

    Bounded 3-Strike Policy: If a worker fails 3 consecutive attempts on a contract, the supervisor halts that branch, marks it ESCALATED, and …

    line 291

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill 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
SKILL.md

letitloop (LIL) — Universal Agent Skill Specification

The assistant decomposes complex, ambiguous goals into typed contract dependency graphs (DAGs), delegates task execution through sandboxed worker adapters, runs deterministic acceptance verification, and arbitrates multi-lens quality reviews with zero hallucinations and crash-resilient state recovery.

⚡ Autonomous Engine Setup & Launch Protocol

When this skill is triggered by a user request:

  1. Auto-Install Check: Check if the lil CLI engine is installed. If not yet installed in the current environment, run:
    pip install letitloop
    (Or from GitHub: pip install git+https://github.com/sdageltc/letitloop.git)
  2. Execute Full Orchestrator:
    lil propose "<natural language goal>" --run
  3. MCP Server Mode: If connecting through Model Context Protocol, the agent starts and queries letitloop-mcp to run deterministic checks, inspect DAG states, and evaluate quality lenses directly.

🌟 Core System Capabilities

                                  ┌───────────────────────────────┐
                                  │     Natural Language Goal     │
                                  └───────────────┬───────────────┘
                                                  ▼
                                  ┌───────────────────────────────┐
                                  │       LLM DAG Planner         │
                                  │   (Decomposes into Contracts) │
                                  └───────────────┬───────────────┘
                                                  ▼
                                  ┌───────────────────────────────┐
                                  │   Contract Dependency Graph   │
                                  └───────────────┬───────────────┘
                                                  ▼
                     ┌─────────────────────────────────────────────────────────┐
                     │                     Supervisor Loop                     │
                     │  1. Atomic File-Locking & State Journal (WAL)          │
                     │  2. Sandboxed Worker Dispatch (Claude Code, agy, Local) │
                     │  3. Deterministic Acceptance Verifier (AST / Tests)     │
                     │  4. Multi-Lens Quality Plane (Security / Correctness)   │
                     │  5. Dynamic Replanning & Bounded 3-Strike Escalation    │
                     └────────────────────────────┬────────────────────────────┘
                                                  ▼
                                  ┌───────────────────────────────┐
                                  │ Cryptographic Evidence Ledger │
                                  │ & Reconciled Workspace Files  │
                                  └───────────────────────────────┘

📊 Deterministic Architecture vs. Other Autonomous Agents

Architectural Featureletitloop (LIL)OpenHandsSWE-agentAutoGPT / AgentGPTMetaGPT / ChatDev
Orchestration ModelTyped DAG ContractsContainer Terminal ChatSingle-Task Benchmark AgentOpen-Ended While-LoopMulti-Role Chat Simulation
Deterministic Verifier8 Machine-Verified Checks (AST, Cmd Exit Codes, Regex, Render, Scope)Eyeball / Agent JudgementUnit Test Execution OnlyNone (LLM Self-Assessment)Role-Play Text Review
Crash Recovery & ResumeWrite-Ahead Log (WAL) JournalManual Session ReplayNo (Ephemeral Run)None (Lost State)None
Retry & Failure PolicyBounded 3-Strike with Strategy Mutation & Impossibility ProofInfinite Loop / TimeoutFixed Retries / Prompt DumpInfinite Hallucination LoopReprompting Loop
Sandbox Scope EnforcementStrict allow/deny & Undeclared Output DetectionDocker Container IsolationBash Environment IsolationNone (Unrestricted Host)None
Quality Plane & Lenses5 Specialized Lenses + Senior Arbitration & QC OverruleSingle Review StepNoneNoneSimulated Peer Chat
AI Ecosystem & Skill SupportUniversal Skill & MCP across 8 Platforms (Claude Code, Antigravity, OpenAI Codex, Hermes, Cursor, OpenCode, Cline, Windsurf)Standalone Web UI / DockerStandalone CLIStandalone CLI / WebStandalone Framework
Zero-Subscription Local UseNative Ollama, vLLM, LM Studio & Omniroute SupportLocal LLMs supported via LiteLLMLocal LLMs supportedLocal LLMs (Ollama)Local LLMs supported

🔑 Universal Provider & Model Support (Zero Subscriptions Required)

letitloop is completely vendor-agnostic. It does not require any specific commercial subscription. Users can run on free local models, open-source gateways, or frontier commercial APIs:

1. Free / Local Zero-Cloud Execution (Ollama, LM Studio, vLLM)

No API keys or cloud subscriptions needed:

# Run local models via Ollama
export OLLAMA_BASE_URL="http://localhost:11434/v1"
export WORKER_MODEL="ollama:qwen2.5-coder:32b"
export QC_MODEL="ollama:deepseek-r1:14b"
export PLANNER_MODEL="ollama:qwen2.5-coder:32b"

2. Multi-Provider Routing Gateways (Omniroute, OpenRouter, Groq)

Use dynamic gateway routing across dozens of models:

# Omniroute Gateway (Local or Remote Proxy)
export OMNIROUTE_API_KEY="your-key"
export OMNIROUTE_BASE_URL="http://localhost:8000/v1"
export WORKER_MODEL="omniroute:auto"

# OpenRouter
export OPENROUTER_API_KEY="your-openrouter-key"
export WORKER_MODEL="openrouter:anthropic/claude-3.5-sonnet"

# Groq (Ultra-Fast LPU Inference)
export GROQ_API_KEY="your-groq-key"
export WORKER_MODEL="groq:llama-3.3-70b-versatile"

3. Frontier Commercial APIs (Gemini, Anthropic, OpenAI, DeepSeek)

# Google Gemini 3 Generation
export GEMINI_API_KEY="your-gemini-key"
export WORKER_MODEL="gemini:gemini-3.7-flash"
export QC_MODEL="gemini:gemini-3.1-pro"

# OpenAI GPT-5.6 Generation
export OPENAI_API_KEY="your-openai-key"
export WORKER_MODEL="openai:gpt-5.6-luna"
export QC_MODEL="openai:gpt-5.6-sol"

# Anthropic Claude 5 Generation
export ANTHROPIC_API_KEY="your-anthropic-key"
export WORKER_MODEL="anthropic:claude-sonnet-5"
export QC_MODEL="anthropic:claude-opus-5"

# DeepSeek V4 Generation
export DEEPSEEK_API_KEY="your-deepseek-key"
export WORKER_MODEL="deepseek:deepseek-v4-flash"
export QC_MODEL="deepseek:deepseek-v4-pro"

🤖 Pluggable Worker Adapters

The Supervisor executes task contracts through specialized worker adapters:

Adapter NameMode IdentifierDescription
Claude Code Adapterclaude-codeInvokes the Claude Code CLI (claude -p "<prompt>") autonomously
Antigravity CLI Adapterantigravity-cliInvokes Google Antigravity CLI (agy exec --prompt "<prompt>")
OpenAI Codex AdaptercodexInvokes the OpenAI Codex CLI (codex exec --prompt "<prompt>") autonomously
Omniroute AdapteromnirouteInvokes local/remote multi-provider proxy gateways
Script Worker AdapterscriptExecutes custom local bash/Python scripts with injected environment variables
Direct API WorkerdirectIn-process zero-dependency stdlib HTTP transport
Mock WorkermockDeterministic simulation worker for CI, offline verification, and dry-runs

🛠️ Complete MCP Tool Catalog (8 Native Tools)

When connecting via Model Context Protocol (letitloop-mcp), the assistant has direct access to the full orchestrator engine:

1. create_goal

Initializes a new macro-goal with isolated state directory.

  • Arguments: goal_id (str), title (str), description (str)

2. load_contract_file

Loads and validates a contract JSON file against strict schema rules.

  • Arguments: contract_path (str)

3. run_contract_verification

Executes deterministic acceptance checks against task outputs.

  • Arguments: contract_path (str), task_id (optional str)

4. run_quality_review

Executes multi-lens quality plane review on produced artifacts.

  • Arguments: contract_path (str), lens (optional str, e.g. code_correctness, security, documentation, adversarial_architecture_audit)

5. execute_supervisor_plan

Executes a multi-task contract DAG with automated retries, WAL state logging, and parallel execution.

  • Arguments: goal_id (str), contracts (array of contract dicts), parallel (bool, default False)

6. inspect_task_state

Inspects state journal, attempt history, and evidence artifacts for a specific task.

  • Arguments: task_id (str), run_dir (optional str)

7. reconcile_workspace_state

Audits file hashes against cryptographic evidence ledgers to detect out-of-band edits or missing outputs.

  • Arguments: goal_id (str), contracts (array of contract dicts)

8. get_system_health

Returns runtime status, registered worker adapters, configured model transports, and memory health.

  • Arguments: None

📋 Comprehensive Contract JSON Schema

Every step in an autonomous plan is defined by a strictly validated contract:

{
  "task_id": "auth-jwt-01",
  "title": "Implement JWT validation middleware",
  "status": "drafted",
  "risk_tier": "qc_required",
  "workspace_scope": {
    "allow": ["src/auth/", "tests/test_auth.py"],
    "deny": [".env", "config/secrets.json"]
  },
  "objective": "Build token decode, expiration validation, and signature verification with unit tests.",
  "worker": {
    "model": "gemini:gemini-3.7-flash",
    "fallback_model": "openai:gpt-5.6-luna",
    "max_attempts": 3,
    "adapter": "direct"
  },
  "inputs": [],
  "outputs": [
    {"path": "src/auth/jwt.py"},
    {"path": "tests/test_auth.py"}
  ],
  "acceptance_checks": [
    {
      "id": "syntax_check",
      "kind": "syntax",
      "path": "src/auth/jwt.py",
      "expected": "python"
    },
    {
      "id": "unit_tests",
      "kind": "command",
      "command": "pytest tests/test_auth.py -q",
      "expected": 0,
      "timeout_sec": 30
    },
    {
      "id": "doc_check",
      "kind": "render",
      "path": "src/auth/README.md",
      "expected": "markdown"
    },
    {
      "id": "scope_check",
      "kind": "undeclared_outputs"
    }
  ],
  "qc": {
    "required": true,
    "lens": "security"
  }
}

Supported Acceptance Check Kinds:

  • syntax: AST syntax validation for Python, TypeScript, JavaScript, Go, Rust.
  • command: Subprocess command execution with exit code matching and process-tree killing on timeout.
  • file_exists: Verifies output files exist and are non-empty.
  • min_size: Asserts minimum byte size of generated artifact.
  • content_regex: Matches required regular expressions in output text.
  • required_sections: Asserts presence of required Markdown headers or JSON keys.
  • render: Heuristic source structure validator for Markdown and HTML.
  • undeclared_outputs: Detects any modified or created files outside the declared output manifest.

⚡ CLI Operational Playbook

For command-line and shell execution:

# 1. Propose & Preview a Contract DAG from natural language
lil propose "Build a rate-limiting middleware with Redis backend and unit tests" --run

# 2. Monitor execution in real-time via live ASCII Dashboard
lil dashboard

# 3. Reconcile workspace file hashes with evidence ledger
lil reconcile <goal_id>

# 4. Diagnose system configuration and provider health
lil doctor

🛡️ Fail-Closed Governance Invariants

  1. Zero Blind Edits: All worker file mutations must reside within workspace_scope.allow.
  2. Deterministic Empirical Proof: A task is never marked complete without evaluating acceptance check exit codes.
  3. Bounded 3-Strike Policy: If a worker fails 3 consecutive attempts on a contract, the supervisor halts that branch, marks it ESCALATED, and emits an impossibility.md report.
  4. Secret Masking Firewall: API keys, OAuth tokens, and SSH keys are automatically redacted from evidence ledgers and stdout logs.

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.