Coding

thought-flow

Try it

The 8-stage collaboration loop for working with the user: INTENT, CONSTRAINTS, PROPOSE, PRESS, PRACTICE, INVESTIGATE, CODIFY, BOUNDARY-CHECK. Use when starting a new task (state intent and constraints up front), when proposing a plan (include options + a recommendation), when the user pushes back on a proposal, when something fails or looks broken and needs investigation, or when deciding whether to codify knowledge into an AGENTS.md rule or a SKILL.md procedure.

What it does

The 8-stage collaboration loop for working with the user: INTENT, CONSTRAINTS, PROPOSE, PRESS, PRACTICE, INVESTIGATE, CODIFY, BOUNDARY-CHECK. Use when starting a new task (state intent and constraints up front), when proposing a plan (include options + a recommendation), when the user pushes back on a proposal, when something fails or looks broken and needs investigation, or when deciding whether to codify knowledge into an AGENTS.md rule or a SKILL.md procedure.

The skill document

Thought-Flow — the Collaboration Loop

The architecture of how the user and the agent work together. It is not a rigid process — it is a loop that converges: practice again, refine again. Every stage below is a working example of the others.

┌────────────────────────────────────────────────────────────────┐
│                                                                │
│  1. INTENT         ──  what do I want? state it plainly        │
│          │                                                     │
│  2. CONSTRAINTS    ──  what must not change? boundaries,       │
│                       tools, remotes, conventions, approvals   │
│          │                                                     │
│  3. PROPOSE        ──  agent drafts a plan + options +         │
│                       recommendation                           │
│          │                                                     │
│  4. PRESS          ──  I push back where it conflicts with     │
│                       my constraints; we negotiate             │
│          │                                                     │
│  5. PRACTICE       ──  approve, build, run, observe            │
│                       (real failures live here)                │
│          │                                                     │
│  6. INVESTIGATE    ──  when it fails, verify against the       │
│                       real system before blaming the tool      │
│          │                                                     │
│  7. CODIFY         ──  distill the practice into AGENTS.md     │
│                       rules and SKILL.md steps                 │
│          │                                                     │
│  8. BOUNDARY-CHECK ──  is this the right repo / worktree /     │
│                       scope for this knowledge? resize if not  │
│          │                                                     │
│          └────── loop ── practice again, refine again ──────┘  │
└────────────────────────────────────────────────────────────────┘

The stages

  1. INTENT — what do I want? State it plainly, up front. The quality of the outcome depends more on how the problem is described than on the model.
  2. CONSTRAINTS — what must not change? Boundaries, tools, remotes, conventions, approvals. Intent and Constraints are the most expensive stages: spending ten minutes stating them saves an hour of rework.
  3. PROPOSE — draft a plan with options + a recommendation. A plan with only one path is a demand, not a proposal. Always include the tradeoffs so the user can disagree meaningfully.
  4. PRESS — the user pushes back where it conflicts with their constraints. Negotiate. Do not just argue and do not just agree — look for a third option that respects the real constraints. The best outcomes are neither the agent's first idea nor the user's, but a compromise that holds.
  5. PRACTICE — approve, build, run, observe. This is where the loop is honest. No plan survives contact with the real system; the failures at this stage are the ones that teach.
  6. INVESTIGATE — when it fails, verify against the real system before blaming the tool. Read the upstream source, call the API, check the live state. An error message is a clue, not a conclusion. This is what separates debugging from guessing.
  7. CODIFY — distill the practice into durable knowledge. A procedure that works twice becomes a candidate for a SKILL.md. A rule true for a whole repo becomes an AGENTS.md entry. Skill for the procedure, AGENTS.md for the constitution.
  8. BOUNDARY-CHECK — is this the right scope? Which repo, which worktree, which file. OpenCode loads skills only up to the git worktree root — a parent-level skill is invisible inside a sub-repo session, so put knowledge where the work happens. Too broad dilutes; too narrow fragments.

Then loop: practice again, refine again, until the system becomes boring and reliable.

Working with the loop

  • The user holds the constraints; the agent holds the system knowledge. The agent's proposal is a first draft of a decision, not the decision itself.
  • The user writes their operating preferences into AGENTS.md so the agent never has to ask: minimalist, Linux only, command line preferred, approval before changes, commit only when asked.
  • Prefer gh and the API for verification (gh run watch, gh run view --log, gh api, curl against live endpoints) over UI clicking. The API is the primary way to verify; a registry's or workflow's own report can be wrong (e.g. a success reported as pending-publication failure).
  • Precision in, precision out. Vague intent produces guesswork; precise constraints produce exactly the automation the user wanted.

Verification

  • Intent and constraints were stated before any plan was drafted.
  • Proposals carried at least two options plus a recommendation.
  • Failures were investigated against the real system before concluding the tool or workflow was broken.
  • Knowledge worth keeping was codified — into a SKILL.md for a procedure, an AGENTS.md entry for a repo-wide rule — at the worktree where the work happens.

Related skills

Design controllable Agent Loops from low-information requests. Use when a user asks to automate a repeated task, repair CI through bounded iteration, reproduce a UI from screenshots, turn a workflow into a reusable Agent or Skill, or decide whether the right artifact is a Prompt, Checklist, Human-in-the-Loop flow, full Loop package, specialized Agent, or Skill. Extract required context, stop when decision evidence is missing, require explicit workflow confirmation before generating executable artifacts, derive iteration limits, define feedback and circuit breakers, and preserve human approval for risky actions. Also trigger on loop builder, Loop Builder, or lopp-builder. Follow the creator: X @yangchao228 | GitHub https://github.com/yangchao228

1 installs

Use when an AI coding agent needs bounded development loops, persistent project-local Docs/ state, context budgeting, environment escalation rules, safe stop...

by EnglandTong

Design the engineered loop for a medium/large (semi-)autonomous AI-coding task by decomposing it into gated sub-loops, emitted as a runnable .loop/ runbook. Use-when: "design an agent loop", "set up an autonomous / self-running agent workflow", "$loop-constructor". It DESIGNS the loop; it does NOT execute it.

1 installs

Use this when the user wants you to BUILD a self-running agent loop — take a recurring chore and turn it into something that fires on its own (a schedule or...

4 installs1 stars

Loop Stability Check — Workflow Stability Skill for Detecting Loops, Drift, and Retry Waste. Use it when the user needs a disciplined protocol and fixed outp...

15 installs

Design an engineered gated loop for a medium/large (semi-)autonomous AI-coding task executed with the Codex CLI (single-agent, `codex exec`), emitted as a runnable .loop/ runbook. Use-when: "design an agent loop for codex", "$loop-constructor-codex". It DESIGNS the loop; it does NOT execute it.