# Chunk <!-- ref: @protocol/chunk tags: [task management, execution, workflow, protocol, implementation] triggers: [execute task, update spec, verify changes, record outcomes] trigger_prompt: When a user needs to systematically approach a task, ensuring each phase from context building to recording results is thoroughly addressed. category: execute last_reviewed: 2026-04-30 complements: [@protocol/loop, @protocol/orchestrate, @protocol/dev-checklist] audience: [agent-author] version: 15 updated_at: 2026-07-14T23:23:52.407Z --> Chunk organizes and executes tasks in a structured manner through a defined process. ``` CONTEXT → PLAN → IMPLEMENT → VERIFY → RECORD ``` --- ## CONTEXT Build up working context for the task. Not research — just loading what you need to do the work. - Read the relevant section of the spec tree - Read the code files involved - Understand the current state of the area - Note any adjacent areas that could be affected **Keep it lean.** Only load what this specific task requires. Use the orchestrate posture — delegate exploration to sub-agents rather than pulling everything into your own context. --- ## PLAN Plan the implementation based on that context. - Identify the specific changes needed - Consider edge cases and adjacent impacts - If the task is complex, break it into steps - If uncertainty is high, surface it now — escalate to ri or the user before implementing --- ## IMPLEMENT Do the work. - One chunk = one coherent change - Commit as you go (revertible checkpoints) - If you discover the task is larger than expected, finish what you can and mark the remainder in the spec tree --- ## VERIFY Confirm it works. - Run relevant tests - Check that adjacent areas weren't broken - Verify against the spec/acceptance criteria - If verification fails, fix or revert — don't leave it broken for the next iteration --- ## RECORD Update the spec tree with what happened. - **Complete**: Mark the item done with a brief summary of what was done and when - **Partial**: Mark in-progress with what's done and what remains. ri's audit will pick this up. - **Failed**: Mark the attempt and why it failed. ri will decide whether to retry, revert, or escalate. The spec tree is the shared state between chunk and ri. What you record here is what the next audit reads. --- ## Invocation Chunk is typically invoked by loop after SELECT. It can also be used standalone: ``` "Chunk: [task description]" "Execute: [task from spec]" ``` When standalone, it still follows CONTEXT → PLAN → IMPLEMENT → VERIFY → RECORD, but without ri's audit/select wrapping it. --- ## Composition ``` chunk (execution: context, plan, implement, verify, record) └── orchestrate posture (delegate to sub-agents, keep context lean) ``` Chunk doesn't decide WHAT to work on — it receives a task. The strategic decision lives in `@protocol/loop`. --- *Related: `@content/youtube/wes-mcdowell/how-to-use-chatgpt-for-content-creation-itll-sound-like-you` · `@content/youtube/every-inc/how-to-build-a-multi-agent-review-swarm` · `@content/youtube/hormozi/reacting-to-my-first-videos-10-years-later` · `@protocol/onboarding` · `@wildeagency-public/protocol-readability`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*