feature-flow
Skill1 starsChanged 3 months agoMITView on GitHub
Master workflow orchestrator that drives a feature through this project's full Red-Green-Refactor lifecycle end to end by running four existing skills in sequence — `feature-plan` (design the spec) → `test-badass` in Spec-Driven TDD mode (RED: write failing tests from the plan) → `gen-module` (GREEN: generate the module to satisfy those tests) → `arch-audit` (REFACTOR: fix architecture violations while keeping tests green) — with a single explicit human approval gate between planning and implementation. Use this whenever the user wants to take a feature from idea to finished, tested, architecture-clean code in one go — "let's build the reservations feature end to end", "run the full feature flow for X", "take this from plan to code", "spec-driven TDD this feature", "/feature-flow <name>", or when they paste/accept `feature-plan`'s own completion message asking to "approve this plan and proceed with implementation via /feature-flow". Requires `feature-plan`, `test-badass`, `gen-module`, and `arch-audit` to already exist as skills in this project — this skill only orchestrates them, it doesn't duplicate their logic. Don't use this for a single phase in isolation (just planning, just tests, just scaffolding, just an audit) — trigger the specific skill directly for that; this skill is for running the whole pipeline.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- pankaj-mahaur/Agent-Daemontheir own version, first seen Nov 6, 2026
- awahids/noskilltheir own version, first seen Oct 15, 2026
- rcelebrone/DotAgentstheir own version, first seen Oct 14, 2026
- sameerhimati/claude-code-kittheir own version, first seen Aug 14, 2026
- mateonunez/skillstheir own version, first seen Jul 21, 2026
- tienenwu/fablestheir own version, first seen Jul 7, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- rcelebrone/DotAgents★ 15same name
- mateonunez/skills★ 8same name
- tienenwu/fables★ 4same name
- awahids/noskill★ 1same name
- sameerhimati/claude-code-kit★ 1same name
- pankaj-mahaur/Agent-Daemon★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- arch-auditSkill
- feature-planSkill
- gen-moduleSkill
- test-badassSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Run bun test afterward and confirm the result is genuinely RED:
- Very specific: line 67
If arch-audit reports anything skipped (a finding it judged unsafe to auto-fix), surface that to the user in Phase 5 rather than silently …
- Very specific: line 86
If arch-audit skipped anything (Phase 4), replace that last line with the skipped count and list what's still open and why — don't present …
- Distinctive: line 93
Treat Phase 1's completion question as the only hard stop in the pipeline.
- Distinctive: line 100
Don't invent a second approval gate after Phase 1, and don't skip the one gate Phase 1 does have.
- Distinctive: line 101
Don't edit a RED test's assertions during Phase 3 to make the generated code "pass" — fix the code, or stop and flag a real spec gap.
- Very specific: line 102
Don't re-implement arch-audit's fix-and-reverify logic in this skill — Refactor Mode already owns baselining, fixing, regression-checking, …
- Very specific: line 103
Don't declare Phase 5's summary while bun test is anything other than fully green, and don't hide a skipped arch-audit finding to make the …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
feature-flow — the Red-Green-Refactor orchestrator
This skill has no domain logic of its own — its entire job is sequencing four skills that already work independently (feature-plan, test-badass, gen-module, arch-audit) and holding the line on Red-Green-Refactor discipline across the handoffs between them: tests get written before code, code is judged only by whether it satisfies those tests, and refactoring never changes what the tests check. Each invoked skill is the authority on its own phase's mechanics — this skill doesn't restate them, only tells you when to call each one and what to feed it.
Invoke each phase's skill with the Skill tool, exactly as if the user had asked for that skill directly, then return here to figure out the next phase once it's done.
Step 0 — Figure out which phase you're actually in
Detect the phase from real repository state, not from what you remember discussing. A /feature-flow invocation might be starting completely fresh, or resuming a pipeline that was interrupted last session — reading the actual files tells you the truth either way; conversation memory doesn't survive a compaction or a new session, so don't rely on it as the source of truth for where the pipeline left off.
| Phase | Repo state | Action |
| 1 — Plan | No docs/plans/<feature-name>.md, or it exists with a non-empty Open Questions section | Invoke feature-plan |
| 1 — Gate | Plan exists, Open Questions reads (none currently), but no explicit approval has been given in this session yet | Stop. Show feature-plan's own completion message and wait |
| 2 — RED | Approved, and src/modules/<feature-name>/ doesn't exist yet | Invoke test-badass in Spec-Driven TDD mode |
| 3 — GREEN | tests/modules/<feature-name>/ has RED test files, but src/modules/<feature-name>/ is missing or its tests aren't all passing | Invoke gen-module, then fix until green |
| 4 — REFACTOR | src/modules/<feature-name>/ exists, bun test is fully green, but arch-audit hasn't been run yet (or was run before the last code change) | Invoke arch-audit, then fix findings |
| Done | Module exists, tests green, arch-audit reports clean | Present the final summary (Phase 5) — if asked to run again, say it's already complete and show the summary |
Work through phases in order — don't skip ahead because a later phase seems easy, and don't re-run an earlier phase's skill once its state condition is satisfied (e.g. don't re-invoke feature-plan just because arch-audit found something in Phase 4).
The feature name is one identifier used consistently across all four phases: docs/plans/<feature-name>.md, src/modules/<feature-name>/, tests/modules/<feature-name>/. If the user's plan discussion ends up naming the concrete module differently from the topic they started with (e.g. planning "rate limiting" broadly but landing on a module called throttle-rules), say the mapping out loud once it's decided rather than silently assuming they're the same string.
Phase 1 — Architectural Planning (feature-plan)
Invoke feature-plan for <feature-name>. It already knows how to create or resume docs/plans/<feature-name>.md, run the Current State / Open Questions / Decisions / Example discussion, and declare itself done — you don't need to re-implement any of that here, just let it run to its own completion signal:
"The architecture plan for
<topic>is fully resolved and recorded indocs/plans/<topic-slug>.md. Would you like to approve this plan and proceed with implementation via/feature-flow?"
This is the one hard approval gate in the whole pipeline. Wait for an explicit, unambiguous go-ahead — "OK", "proceed", "approved", "code it", "yes" in direct reply to that question. A mid-discussion "sounds good" about one Decision is not this; only a reply to the actual completion question counts. Don't infer approval from the user having been generally positive earlier, and don't skip the question because the plan "looks obviously ready" — feature-plan's own Step 4 already exists specifically so a human signs off before any code gets written, and this skill's whole reason for having a gate here (and nowhere else in the pipeline) is that this is the last point where redirecting is cheap: everything after this is generated code and generated tests, which are more expensive to unwind than a markdown doc.
If the user's original request already named a clear feature (e.g. "build the reservations feature end to end: one reservation per book, 48-hour expiry"), pass that framing into feature-plan as the starting point rather than making it re-derive intent from nothing — but still run the actual discussion; don't shortcut Phase 1 just because the request sounded detailed.
Phase 2 — RED: Spec-Driven Testing (test-badass)
Once approved, invoke test-badass, pointing it at docs/plans/<feature-name>.md as the input — this matches its own Mode 1 (Spec-Driven TDD) trigger exactly: a plan doc plus a target module that doesn't exist yet. Let it generate the failing .spec.ts/.e2e.spec.ts files per its own Step 1 (Mode 1) reasoning; don't pre-digest the plan for it, it already knows how to read Decisions/Example sections and derive fixtures.
Run bun test afterward and confirm the result is genuinely RED:
- A failing assertion, or
- A module-resolution failure (
bun testreporting the file as failed becausesrc/modules/<feature-name>/...can't be resolved) — this is the expected shape of RED before any implementation exists, pertest-badass's own Mode 1 notes. Don't mistake this for the orchestration having gone wrong.
If bun test instead reports the new tests passing, stop and flag it before moving on. A RED-phase test that passes with no implementation means either the assertion is vacuous (doesn't actually check anything meaningful) or something under src/modules/<feature-name>/ already partially exists — both are worth surfacing to the user rather than silently treating "green" as a success signal in a phase where the only correct outcome is red.
Phase 3 — GREEN: Code Generation (gen-module)
gen-module doesn't read plan docs or test files on its own — its own Step 1 normally asks the user for the feature spec (name, fields, business-rule errors). By this point in the pipeline, that spec already exists in two places, and you should hand it directly to gen-module so it never has to ask:
docs/plans/<feature-name>.md'sDecisionsandExamplesections — the field list, business rules, and request/response shapes as designed.- The RED tests from Phase 2 — the more precise source, since they're real typed TypeScript (
const input: CreateReservationDto = { bookId: '...', memberId: '...' }pins down exact field names and types no prose description can). If the plan and the tests ever seem to disagree on a detail, trust the tests — they're what GREEN is actually judged against — but say so, since it likely means the plan doc drifted from what got written.
Invoke gen-module with this spec already assembled. After it generates the module and wires src/index.ts, run bun test.
Hold the Red-Green-Refactor line: the RED tests from Phase 2 are frozen. Never edit a test to make it pass during this phase — only touch the generated src/ files. If a test's assertion looks wrong once real code exists to compare it against, that's a signal the plan or the RED phase had a gap, not license to quietly loosen the assertion — stop and say what looks wrong instead of editing around it. This is the same discipline test-badass's own Refactor & Repair mode applies to distinguishing a legitimate contract change from a regression — here, the equivalent mistake would be silently rewriting the spec after the fact to match whatever the generator happened to produce.
If tests still aren't all green after inspecting the failures and fixing the generated implementation, keep iterating on the src/ code — don't declare Phase 3 done and move to Phase 4 while there's still red output; that just relocates a real problem into a phase whose job is architecture cleanup, not correctness.
Phase 4 — REFACTOR & Audit (arch-audit)
Invoke arch-audit in Refactor Mode against src/modules/<feature-name>/ — this pipeline is one of Refactor Mode's two triggers by design (its own Step 0), so ask for it explicitly rather than letting it default to Audit Mode's plain report. arch-audit owns the actual fix-and-reverify mechanics itself: it captures a bun test baseline before touching anything, fixes what's safely mechanical, skips (rather than force-fixes) anything that would require guessing at intent, reverts any fix that regresses a previously-passing test, and never touches a file under tests/. Let it finish and report back what it fixed versus skipped — this skill's job here is just to relay that outcome into Phase 5, not to re-implement any of it.
If arch-audit reports anything skipped (a finding it judged unsafe to auto-fix), surface that to the user in Phase 5 rather than silently dropping it — a skipped finding is a real, still-open architecture gap, not a completed step.
Phase 5 — Final Summary
Once Phase 4 finishes — tests green, and every fixable finding fixed — report back concisely. Use this shape, adapting the last line to whichever arch-audit actually reported:
## `<feature-name>` — feature-flow complete
**Plan:** docs/plans/<feature-name>.md
**Generated files:**
- src/modules/<feature-name>/<feature-name>.schema.ts
- src/modules/<feature-name>/<feature-name>.entity.ts
- ... (every file gen-module produced)
**Tests:** N pass, 0 fail (tests/modules/<feature-name>/)
**Architecture audit:** N violations found, N fixed, 0 skipped.If arch-audit skipped anything (Phase 4), replace that last line with the skipped count and list what's still open and why — don't present the pipeline as fully done while a real architecture gap is sitting unresolved.
If the pipeline is invoked again after this point (Step 0's "Done" row), skip straight to re-stating this summary rather than re-running any phase — re-verify quickly (bun test, arch-audit) if it's been a while or files changed since, but don't restart planning or regenerate the module from scratch.
Do
- Detect the current phase from real files (
docs/plans/,src/modules/,tests/modules/,bun testoutput), every time — never assume the phase from conversation memory alone. - Treat Phase 1's completion question as the only hard stop in the pipeline; run Phases 2 through 4 through to Phase 5 without pausing for approval again.
- Feed
gen-modulea fully-assembled spec from the plan + RED tests so it never has to ask the user anything itself. - Re-run
bun testafter every code change you make yourself in Phase 3, and treat "still green" as a hard requirement before moving on to Phase 4. - Invoke
arch-auditexplicitly in Refactor Mode for Phase 4 — its own default is read-only, and this pipeline is one of the two things meant to ask for the other mode.
Don't
- Don't invent a second approval gate after Phase 1, and don't skip the one gate Phase 1 does have.
- Don't edit a RED test's assertions during Phase 3 to make the generated code "pass" — fix the code, or stop and flag a real spec gap.
- Don't re-implement
arch-audit's fix-and-reverify logic in this skill — Refactor Mode already owns baselining, fixing, regression-checking, and reverting; this skill's job in Phase 4 is invoking it correctly and relaying its report. - Don't declare Phase 5's summary while
bun testis anything other than fully green, and don't hide a skippedarch-auditfinding to make the pipeline look more finished than it is.
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.

