skills/workflow-gate/SKILL.md
Use BEFORE heavier workflow skills when route choice matters. Route creative work without a design doc/spec to Brainstorm; destructive or hard-to-reverse work to Discuss; unresolved decisions, Plan/Full fan-out, ship checks, unclear bugs, and fresh-eyes fix-then-re-review need this gate. Skip single-line read-only lookups, pure typo/formatting edits, trivial safe one-line fixes, and clearly safe named-skill requests. Outputs Route, Runtime skill, Fallback alias, and Execution path.
npx skillsauth add adonis0123/adonis-skills workflow-gateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A reflex-fast router. Over-escalating burns minutes on obvious work; under-escalating creates rework or outages. Budget: 60–90s.
Last measured (2026-05-17, v2.0.1): 71/71 collected runs PASS across eval IDs 11, 13, and 19-24 from the 24-eval set (eval runner:
pnpm skills:eval-grade workflow-gate <outputs-dir>); trigger-rate 16/16 on the negative+positive prompt set; fast-path wall-clock median 9.2s across 5 fast-tagged runs.
Fast path (default — meet the reflex budget): read THIS file only and emit the block. The cheat card, 10 precedence rules, tiebreakers, output contract, and skill-name resolution table below are self-contained; for the vast majority of prompts you do NOT need to open any references/*.md. Target wall-clock ≤ 10s.
Slow path (load references only if): (a) you genuinely cannot pick a Route from the cheat card + precedence rules, or (b) the prompt mentions cross-ecosystem terms (superpowers vs addy/agent-skills) and you need the ecosystem boundary, or (c) you need a worked example whose closest match isn't obvious from the cheat card. Even then load at most ONE reference file. Loading all references for every prompt is the dominant speed regression — avoid it.
Before the fast-skip checklist, cheat card, or user-named-skill rule, check Rule #1 and Rule #2 below. If either fires, stop there. The full destructive / creative gate definitions live only in the Precedence rules section to avoid drift.
You may skip emitting the block only if all of these hold:
coco-commit for committing already-staged reviewed work, not coco-commit for "fix this bug and commit"). If any of (i)/(ii)/(iii) is uncertain in under 5 seconds, do not skip — emit the block.For anything else, emit the block. If the user named a skill that clearly mismatches the request (e.g. "use brainstorming for this typo fix"), do NOT take the skip path — emit the block, set the appropriate Route, and flag the mismatch in Assumptions.
| Route | Trigger keyword | Default Runtime skill | Default Execution path |
|---|---|---|---|
| Direct | read-only lookup, no write | none | direct local work |
| Light | small write / debug / docs / ship-check | none (or systematic-debugging / test-driven-development / verification-before-completion via the rules below) | direct local work |
| Brainstorm | creative work — full trigger list in Rule #2; fires even when scope=few-files and decisions=resolved. Also "options / tradeoffs / first principles" framing. | brainstorming | n/a |
| Discuss | "Stripe vs X / decide before plan" | discuss-before-plan | n/a |
| Plan | RFC ready, ≤ 2 bounded contexts | writing-plans | executing-plans |
| Full | ≥ 3 bounded contexts AND parallelizable | writing-plans | subagent-driven-development |
| Review-Handoff | "fresh eyes / fix-then-re-review" | agentic-review-handoff | n/a |
One row fits → emit the block. Multiple fire → use precedence below. Route adjustments (Upgrade / Downgrade / Re-gate / Light's Execution-path upgrades) live in references/route-adjustments.md — consult when the cheat card doesn't fit, or before emitting a Light route with debug / ship / behavior-regression signals. Use references/workflow-systems.md when you need the ecosystem / phase boundary between superpowers, discuss-before-plan, and addyosmani/agent-skills.
destructive=yes — reversibility test: if the action is hard to undo, set destructive=yes and route to minimum Discuss. Covers the literal list (drop table, force push, delete prod data, schema break, public API removal) AND any irreversible mutation not in the keyword list (billing mutation, irreversible external API call, broadcast send, migration that drops state). Flag the reversibility cost in Assumptions. Overrides every rule below, including a user-named skill and Fast-skip.test-driven-development (behavior change with regression risk). Only escalate to Brainstorm if the signature is vague, the API surface affects 3+ consumers, or naming is contested.docs/superpowers/specs/*-design.md, docs/ideas/*.md, docs/rfcs/*.md, docs/forms/*-spec.md, designs/**/*.md, or an explicit spec/design name or path. Note the reference in Assumptions.test-driven-development for direct few-file implementation, Full for 3+ parallel bounded contexts.Runtime skill: systematic-debugging + Execution path: systematic-debugging. Upgrade to Discuss if scope is multi-module OR risk=high (payments / auth / production data).Runtime skill: verification-before-completion + Fallback alias: superpowers:verification-before-completion + Execution path: n/a (then finishing-a-development-branch if branch integration). If the user explicitly asks for persona fan-out / security + test + review coverage, still use this route for now but flag the missing fan-out bridge in Assumptions (see references/workflow-systems.md).Assumptions.Light's default Execution path is direct local work. Upgrade the Execution path (not the Route) when:
Runtime skill: test-driven-development, Fallback alias: superpowers:test-driven-development, Execution path: test-driven-development.Runtime skill: systematic-debugging, Execution path: systematic-debugging.Runtime skill: verification-before-completion, Fallback alias: superpowers:verification-before-completion, Execution path: n/a (the verification skill is the workflow).Rule #1 (destructive) is the canonical override and wins against every other rule when in conflict; the rows below cover the remaining non-obvious pairs.
| When both fire | Pick | Why |
|---|---|---|
| Rule #1 (destructive) and Rule #2 (creative work) | Discuss if the design step itself touches the destructive surface (any keystroke in this turn could trigger irreversible action — typed-confirm flows, account-export, billing modal logic). Brainstorm + explicit re-gate if the design phase is provably non-executing (pure UI sketching, no API/data calls planned in this turn) — Assumptions MUST mark the destructive surface and note re-gating against Rule #1 at implementation time. | Design-only work doesn't trigger destruction, but the discussion must converge before any executing step ships. |
| Rule #4 (bug) and Rule #5 (ship) | Rule #4 first; ship re-fires after the bug closes. | Don't ship a known-failing change. |
| Rule #7 (Brainstorm) and Rule #8 (Discuss) | Brainstorm if options unknown; Discuss if options exist and decisions are the bottleneck. | Widening vs narrowing the space. |
| Rule #3 (user named writing-plans) and Rule #2 (creative work, no spec) | Brainstorm. Record the named skill as a mismatch in Assumptions. | A Plan-class skill cannot substitute for the missing design gate. |
| Rule #2 exception (spec referenced) and Light's behavior-risk upgrade | Light + test-driven-development when the user says "directly implement" and the change is a few files. | The spec only skips Brainstorm; it does not force a planning ceremony for a small implementation. |
| Rule #1 (destructive) and any of #3 / #6 (user-named, Review-Handoff) | Rule #1 always. Record the user's named skill or review intent in Assumptions; the review or named load happens after the destructive issue is resolved through Discuss. | Outage / data loss can't be undone by reviewing or naming around it. |
Authority boundary: this gate is advisory, not a runtime permission override. Higher-priority system/user instructions and downstream skills with true MUST triggers still apply. If a downstream MUST skill is required by the selected Route or by runtime trigger rules, name it as the Runtime skill and load it next instead of treating the gate result as permission to bypass it.
none.Assumptions.Workflow Gate
- Route: <Direct | Light | Brainstorm | Discuss | Plan | Full | Review-Handoff>
- Runtime skill: <none | bare-slug>
- Fallback alias: <none | superpowers:bare-slug>
- Execution path: <direct local work | systematic-debugging | test-driven-development | executing-plans | subagent-driven-development | n/a>
- Goal: <one sentence>
- Signals: scope=<single-file | few-files | multi-module>; risk=<low | medium | high>; destructive=<no | yes>; decisions=<resolved | unresolved>; user-intent=<ideate | decide | plan | implement | debug | review | ship>
- Assumptions: <none | explicit unverified premises>
- Next: <what you will do immediately after this block>
Route and Runtime skill lead because every downstream reader acts on them. Runtime skill is the single skill to load next and must stay one bare token (none or one slug); Fallback alias is metadata for runtimes that cannot resolve that bare token. Execution path is the implementation pattern once code is being written (n/a when no code yet). They may match for skills that are both the workflow and the implementation pattern, such as systematic-debugging and test-driven-development. risk and destructive are separate enums because they answer different questions: blast-radius vs reversibility.
Skill name resolution. Most skills resolve as bare slugs in both Codex (~/.agents/skills/) and Claude Code (~/.claude/skills/ + project mirror). Four skills are intentionally not mirrored to ~/.claude/skills/ because they live under the superpowers: plugin namespace. For those, keep Runtime skill as the bare slug and put the plugin name in Fallback alias. Codex should load Runtime skill; Claude Code should try Runtime skill first and, if it is unavailable, load Fallback alias.
Resolution-failure fallback. If neither Runtime skill nor Fallback alias resolves in the current runtime, do NOT proceed with the emitted Route. Surface the load error to the user with the attempted slug, then re-gate by downgrading to the smallest safe Route that doesn't require the missing skill (typically Light + direct local work, or Discuss if the original task was non-trivial) and emit a fresh block. Stale routing into a non-existent skill silently breaks the downstream workflow.
| Bare slug | Plugin alias | Emit fields |
|---|---|---|
| brainstorming | superpowers:brainstorming | Runtime skill: brainstorming + Fallback alias: superpowers:brainstorming |
| verification-before-completion | superpowers:verification-before-completion | Runtime skill: verification-before-completion + Fallback alias: superpowers:verification-before-completion |
| test-driven-development | superpowers:test-driven-development | Runtime skill: test-driven-development + Fallback alias: superpowers:test-driven-development |
| receiving-code-review | superpowers:receiving-code-review | Runtime skill: receiving-code-review + Fallback alias: superpowers:receiving-code-review |
All other skills (discuss-before-plan, agentic-review-handoff, writing-plans, executing-plans, subagent-driven-development, systematic-debugging, finishing-a-development-branch) are emitted as bare slugs with Fallback alias: none — they exist as bare entries in both runtimes.
Worked output blocks live in two reference files: references/examples-core.md has one example per Route (Direct / Light / Brainstorm / Discuss / Plan / Full / Review-Handoff) and is the default lookup. references/examples-edge.md covers tiebreakers, mismatches, Rule #2 negatives, re-gating, contradictory-signal handling, and "don't ask me" — load it only when core doesn't cover the prompt.
tools
Use when the user's pain is "adding/removing one more X means editing N files" and X is a recurring variant kind: popup, banner, modal, ad slot, payment method, AI model/tool, form field type, connector, sub-site, command, menu item, agent, extension point, or data source. Use when they want to design, refactor, review, name, or explain a pluggable mechanism using registry, interface/trait contract, runtime core, and convention folders; mention pluginize, pluggable, plugin architecture, extension point, registry pattern, or extensibility. Use when explaining the first-principles rationale, DDD/SOLID/OCP mapping, or industry analogies behind that structure. Use for cross-stack mapping to VSCode contributes, Webpack/Vite plugins, Rust/Tauri connectors, Python entry_points, or cargo features. Skip one variant's internals/styles/hooks/copy/bugs, and skip register/registry meaning DI container, user signup, or package registry.
development
Cross-agent code review handoff and review-fix-re-review loop with persistent packet artifacts. Requires a git repo because packet addressing uses git rev-parse --show-toplevel. Use when the user asks for an independent, read-only second pair of eyes on a diff/branch/PR another agent or teammate implemented; asks to verify reviewer feedback before fixing; says a fix is done and wants scoped re-review; asks to continue the latest review packet; or asks for first-principles, DDD, high-cohesion/low-coupling review. Persists each loop under $repo_root/.review-handoff/active/ so agents can resume without copy-paste. Do NOT use for ordinary implementation, generic staged-change review, review-comment copy editing, non-git folders/zips/tarballs/temp dirs, or when the user names a different review skill.
testing
Enforces 'decide then plan' discipline - the pre-planning decision gate. Use when the user asks for a plan or starts a change while key decisions are unresolved: architecture tradeoffs, data flow, public interfaces, unclear requirements, multi-module scope, or roughly 5+ files affected. Also triggers when the user explicitly wants to discuss, compare options, or review architecture before committing. Core job: reduce incorrect-execution cost by confirming decisions before producing executable plans.
development
Scaffold class-based Zustand stores with flattenActions: web (component-level store + Context + Provider) and core (slice-based store with immer). Class-based actions provide Go-to-Definition DX, #private field encapsulation, and prototype-safe slice composition.