Deterministic AI development workflows for coding agents
Your coding agent can't skip a step.
popcorn is a Claude Code plugin. You describe your team's process once in a YAML file, and popcorn enforces it through the agent's own hooks. The agent can't skip the tests, can't merge without a review, and can't push before you approve.
- ClaudeTests pass. Pushing the branch now.
- git push origin popcorn/p1-user-login
- popcorn: phase "build" of run "p1-user-login": "git push origin popcorn/p1-user-login" is guarded. It is allowed only in a phase that unlocks it, after the user approves.
- ClaudeUnderstood. Waiting for your approval.
- popcorn approve
- Approval recorded. The push is unlocked.
Prompts are suggestions. popcorn makes them rules.
| What you ask today | What popcorn enforces |
|---|---|
| "Please run the tests before you finish." | The agent can't end its turn until the phase's gate commands pass. |
| "Don't push until I've looked." | git push is refused until you type popcorn approve. |
| "Get the code reviewed." | Review isn't complete until every reviewer agent files a valid verdict. A high-severity finding sends the run back to Build. |
| "Only touch the docs while planning." | Edits outside the phase's paths are refused. |
| The process lives in a long prompt. | The process lives in .popcorn/workflow.yaml, versioned with your code. |
See a real run
A real Claude Code session with popcorn. The agent builds a discount code until the test gate passes. When it's told to push, popcorn refuses until the user types popcorn approve.
The starter workflow
Seven phases, each with its own agent, paths and gates. The agent works on one phase at a time and can't move on until the engine says it's done. Edit the YAML to add, remove or reorder phases.
Plan
The product manager writes a user story with acceptance criteria.
Design
The architect sets the approach and the ordered build steps.
Build
The implementer works test-first, one commit per step.
Test
The test engineer adds edge cases. Gates must pass.
Publish
The branch is pushed and a pull request opened.
Review
Code, quality and security reviewers post verdicts on the pull request.
Deploy
Merges only once every reviewer approves.
A blocking review finding sends the run back to Build, with the findings attached.
One file describes it all
A shorter, five-phase version. It lives at .popcorn/workflow.yaml in your project and is committed with your code.
version: 1
name: my-team
description: Plan → Build → Test → Review → Deploy
policy:
# Never allowed, in any phase.
deny_shell: ["git push --force*", "git reset --hard*"]
# Allowed only in a phase that unlocks them (deploy, below).
guarded_shell: ["git push*", "git merge*"]
max_attempts_per_phase: 3
blocking_severities: [BLOCKER, CRITICAL, HIGH]
phases:
# 1. A user story you sign off before any code is written.
- id: plan
agent: product-manager
goal: Turn the request into a user story with acceptance criteria.
artifacts: ["docs/plans/{task}.md"] # must exist to finish the phase
approval: after # you approve the plan
allow: { edit: ["docs/**"] } # only docs can change here
# 2. Test-first implementation; the phase ends only when the tests pass.
- id: build
agent: implementer
goal: Implement the plan test-first, one commit per step.
gates: ["npm test"]
deny: { edit: ["docs/plans/**"] }
# 3. Edge cases and every check your CI runs.
- id: test
agent: test-engineer
goal: Add edge-case and error-path tests.
gates: ["npm test", "npm run lint"]
# 4. Two reviewers each file a JSON verdict; a HIGH finding goes back to build.
- id: review
goal: Get the change reviewed.
outputs: { schema: review, required: [code-reviewer, security-reviewer] }
on_fail: build
# 5. Push and merge, only after you approve.
- id: deploy
goal: Merge the branch and push it.
approval: before
allow: { guarded: ["git push*", "git merge*"] }
schemas:
review: { type: object, required: [verdict, findings] }Install
Requires Claude Code and Node.js 20 or later.
Add the plugin
/plugin marketplace add l0ger/popcorn /plugin install popcorn@popcornSet it up in your project
/popcorn:initThis copies the starter workflow to
.popcorn/workflow.yamland helps you swap in your real test commands. You can also write that file yourself: see the workflow file.Start a run
/popcorn:start p1-user-login Users can sign in with email and passwordWhen a phase needs you, popcorn stops and says so. Type
popcorn approve,popcorn rejectwith feedback, orpopcorn status.
What popcorn doesn't do
- Shell rules are best effort. popcorn looks inside chained commands and
bash -c, but a determined agent can disguise a command. Keep branch protection and CI in place. - Only you approve. An approval counts only when your own prompt says
popcorn approve. No tool call can grant one. - Invisible without a run. In a project without
.popcorn/, the hooks exit immediately and change nothing.