prime-flow
Skill0 starsChanged 2 months agoMITView on GitHub
Explicit-only phase-gated development workflow for code changes. Use only when the user explicitly mentions `prime-flow` or asks to use the Prime Flow workflow. Guides work through hard approval gates: research, domain model, structures, interfaces, TODOs, invariant checks, and implementation, with Plannotator review at each gate.
In this repository9 other files it gives its agents.
- agent-orchestratorSkill
- atlassian-apiSkill
- classify-code-reviewSkill
- conventional-commitsSkill
- go-test-effectivenessSkill
- service-designSkill
- show-complexitySkill
- spec-plannerSkill
- zellij-tasksSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 13 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill only when explicitly invoked.
- Distinctive: line 16
Hard gates: Stop after every phase. Do not advance until the user explicitly says to continue, approve, next phase, or equivalent.
- Distinctive: line 17
Stop on ambiguity: If anything is ambiguous after inspecting the codebase, stop and ask.
- Distinctive: line 18
Codebase-first: If a question can be answered by reading the repo, inspect the repo instead of asking.
- Distinctive: line 19
Current tree only: Do not create branches, stashes, or worktrees.
- Very specific: line 21
Durable domain model: When domain terms are resolved, update CONTEXT.md using the repo's existing domain-modeling conventions.
- Very specific: line 22
Workflow artifact: Create or update a Markdown plan under docs/workflows/ for every run.
- Distinctive: line 23
Run project checks: After phases that edit code, run the repo's relevant checks.
- Very specific: line 46
Read commands/start.md when starting a Prime Flow run.
- Distinctive: line 51
If there are existing changes, stop and ask whether they belong to this workflow.
- Very specific: line 53
Create docs/workflows/<slug>.md using references/workflow-template.md.
- Distinctive: line 55
Run Plannotator on the workflow doc.
- Distinctive: line 56
Stop for explicit approval.
- Very specific: line 62
Read the relevant command file in commands/.
- Distinctive: line 65
Update the workflow Markdown file with:
- Distinctive: line 73
Run project checks after code edits.
- Distinctive: line 77
Stop and wait for explicit approval.
- Distinctive: line 81
Treat Plannotator as the review surface, not as an autonomous decision maker.
- Very specific: line 83
If plannotator is unavailable, record that in the workflow file and stop for approval rather than inventing a substitute.
≈ “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.
Files
Prime Flow
Prime Flow is a controlled development workflow for making code changes without letting the agent run ahead. It is inspired by a phase-gated AI coding process: design the change in layers, edit only inside the current phase's scope, verify, run Plannotator review, then stop for explicit approval.
Use this skill only when explicitly invoked. Do not apply Prime Flow to ordinary coding tasks unless the user asks for it.
Core rules
- Hard gates. Stop after every phase. Do not advance until the user explicitly says to continue, approve, next phase, or equivalent.
- Stop on ambiguity. If anything is ambiguous after inspecting the codebase, stop and ask. Do not silently assume.
- Codebase-first. If a question can be answered by reading the repo, inspect the repo instead of asking.
- Current tree only. Do not create branches, stashes, or worktrees. If the working tree is already dirty at kickoff, stop and ask whether the existing changes belong to this workflow.
- Phase-scoped edits. The agent may edit code in every phase, but only for that phase's purpose. The user reviews each phase's diff through Plannotator.
- Durable domain model. When domain terms are resolved, update
CONTEXT.mdusing the repo's existing domain-modeling conventions. Create it lazily only when there is something real to capture. - Workflow artifact. Create or update a Markdown plan under
docs/workflows/for every run. - Run project checks. After phases that edit code, run the repo's relevant checks. If checks are expensive, run them anyway unless the user says otherwise.
- Plannotator gate. At each gate, run Plannotator by target:
- Code diffs:
plannotator review --git - Plan-only/doc review:
plannotator annotate docs/workflows/<slug>.md
- Code diffs:
Phase sequence
Prime Flow uses seven numbered phases:
| Phase | Name | Purpose |
| 0 | Research + run plan | Inspect the codebase, existing docs, tests, and constraints. Create the workflow file and propose how phases will apply. |
| 1 | Domain model | Clarify ubiquitous language, scenarios, and domain boundaries. Update CONTEXT.md when terms are resolved. |
| 2 | Structures | Design or modify data structures, schemas, state shapes, and core representations. |
| 3 | Interfaces | Design public APIs, seams, function signatures, command shapes, or module boundaries. |
| 4 | Implementation TODOs | Place precise TODOs/checkpoints in the files where implementation will happen. |
| 5 | Invariant checks | Add executable checks first: tests, assertions, type constraints, validation scripts, or comparable guards. These may fail initially. |
| 6 | Implementation | Implement the change, verify it, report where the plan held or broke, and finish with a final review summary. |
Phases are adaptive: if a phase is irrelevant, mark it N/A in the workflow file with a brief reason, run the appropriate review if files changed, then stop for approval.
Kickoff procedure
Read commands/start.md when starting a Prime Flow run. Read commands/resume.md when continuing an existing run, especially in a fresh session.
At kickoff:
- Check
git status --short. - If there are existing changes, stop and ask whether they belong to this workflow.
- Inspect relevant repo docs and code before asking questions.
- Create
docs/workflows/<slug>.mdusingreferences/workflow-template.md. - Complete phase 0 only.
- Run Plannotator on the workflow doc.
- Stop for explicit approval.
Per-phase procedure
For each phase:
- Read the relevant command file in
commands/. - Inspect the codebase enough to answer non-user questions yourself.
- Make only phase-scoped edits.
- Update the workflow Markdown file with:
- phase status
- files changed
- decisions made
- verification commands and results
- Plannotator command run
- open questions
- recommendation for the next phase
- Run project checks after code edits.
- Run Plannotator:
plannotator review --gitif code changedplannotator annotate docs/workflows/<slug>.mdif the workflow doc is the main artifact
- Stop and wait for explicit approval.
Plannotator behavior
Treat Plannotator as the review surface, not as an autonomous decision maker. The user decides whether to approve the next phase.
If plannotator is unavailable, record that in the workflow file and stop for approval rather than inventing a substitute.
Implementation phase special rule
Phase 6 merges the video's trial and final implementation steps. During phase 6, ask whether trial implementation changes should be kept, rolled back, or treated as final if that distinction matters. If there is no meaningful distinction, proceed with a normal implementation and document where the earlier plan was insufficient.
Command files
commands/start.md— kickoff and phase 0commands/resume.md— recover workflow state and continue an existing runcommands/phase-1-domain.mdcommands/phase-2-structures.mdcommands/phase-3-interfaces.mdcommands/phase-4-todos.mdcommands/phase-5-invariants.mdcommands/phase-6-implementation.md
Load only the command file needed for the current phase.
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
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.

