Agent loom
The missing middle between prompt and patch.

Coding agents perform better when the work has an explicit structure.
While agents are great at writing patches, the critical software engineering context often vanishes inside ephemeral chat threads. This includes intent, lingering uncertainty, core scope, empirical evidence, code reviews, handoffs, and long-term lessons.
Agent Loom brings that work directly into your repository. It converts a standard coding session into durable Markdown records across several surfaces: decisions, research, specs, tickets, evidence, reviews, and knowledge.
This introduces a deliberate loop: shape vague ideas with a human before writing code, break complex tasks into parent and child tickets, execute via focused subagents, and only declare victory when supported by concrete evidence and reviews.
The chat session can be discarded, but the resulting engineering artifacts continue to compound.
Protocol
The idea
Most failures with coding agents stem from broken processes. A model often jumps straight from a prompt to a patch, leaving the foundational engineering work trapped inside the chat interface.
Loom forces the agent to externalize this context as it works, capturing:
- Intended behavior and technical specs
- Unresolved edge cases or structural uncertainty
- Active task scope boundaries
- Attempted solutions and documented dead ends
- Test observations, outputs, and system logs
- Peer review challenges and lingering risks
- Reusable lessons for future sessions
These records live directly inside the .loom/ directory. The agent can read, update, link, and hand them off to subagents, maintaining perfect continuity even after hitting context windows or starting a new session.
The structured forms guide the model, while humans get a clean audit trail.
Try it
Copy PROTOCOL.md into your project's AGENTS.md, CLAUDE.md, or equivalent rules file, then begin interacting with your coding agent. Records will automatically generate in .loom/ as the agent executes tasks.
Alternatively, install the protocol using the skills ecosystem:
npx skills add z3z1ma/agent-loom
Installing
Copy-paste (recommended)
Copy the contents of PROTOCOL.md into the file your agent references for instructions:
| Harness | File |
|---|
| OpenCode | AGENTS.md |
| Claude Code | CLAUDE.md |
| Cursor | .cursor/rules/loom.md or project rules |
| Codex | AGENTS.md |
| Gemini CLI | GEMINI.md |
| Others | The custom instruction file read by your agent |
This approach requires zero dependencies or specialized tooling and works across any environment.
Skills ecosystem
npx skills add z3z1ma/agent-loom
This uses the Vercel skills CLI to add Loom to your agent's local skill directory. It supports dozens of environments, including OpenCode, Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, and Roo Code.
# Install globally across all projects
npx skills add z3z1ma/agent-loom -g
# Target specific agents explicitly
npx skills add z3z1ma/agent-loom -a claude-code -a opencode
# Run non-interactively
npx skills add z3z1ma/agent-loom -g -a claude-code -y
First-class harness support
Native plugin manifests are available for direct marketplace installation:
| Harness | Install command |
|---|
| Claude Code | claude plugin marketplace add z3z1ma/agent-loom |
| Cursor | Install via Cursor marketplace or clone to ~/.cursor/plugins/local/agent-loom |
| Gemini CLI | gemini extensions install https://github.com/z3z1ma/agent-loom |
| Codex | codex plugin marketplace add z3z1ma/agent-loom |
| OpenCode | Add "@z3z1ma/agent-loom" to your config plugins list |
After installation
The protocol handles the rest. Initiate the workflow with a straightforward prompt:
Let's shape this feature before building it.
The agent will start generating tracking records inside .loom/.
The shape
flowchart TB
Goal["human goal"]
Goal --> Outer["outer loop: shape intent into records"]
Outer --> Tickets["tickets bridge to execution"]
Tickets --> Inner["inner loop: subagent · evidence · review"]
Inner -->|"done"| Knowledge["knowledge compounds"]
Inner -->|"new scope"| Outer
Loom relies on two loops joined by a bridge. The outer loop structures vague intent into clear, written records. The inner loop executes tightly bounded tickets, producing empirical evidence that faces adversarial review. Discoveries feed back into the system, allowing knowledge to compound over time.
Simple, single-line edits do not need this overhead. The record graph shows its value when dealing with architectural ambiguity, technical risk, asynchronous handoffs, rigorous review constraints, or long-term knowledge retention.
What changes