/sage:sage-gatesfrom sage
Manages Sage quality gates and workflow file checks. Use when an edit is blocked, a hook fails, or before claiming work done. Ensures spec/plan preconditions for build, fix, or architect.
Ships in sage. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Two different mechanisms share the word "gate", and confusing them is how people end up arguing with a hook.
| Hooks | Gates | |
|---|---|---|
| When | Before a tool call (PreToolUse) | After work, on demand |
| What | Block the edit itself | Score the result |
| Failure mode | Fail open — a broken hook must not brick the session | Fail closed — an unrun gate is not a passed gate |
| Examples | sage-spec-gate.sh, sage-tdd-gate.sh | Gates 1–6 |
Hooks are guards, not gates.
"Sage spec gate: no spec exists for the active cycle." A cycle in
.sage/work/*/manifest.md has gate_state: pre-spec, and you tried to edit a
source file. Write the spec, get [A], and the manifest advances to
spec-approved. Then the edit lands.
"Sage TDD gate: tests before code." No test has been written for this change. Write the failing test first. The gate accepts a dirty/untracked test file or a red commit (tests touched, no source) as evidence.
Completion blocked. The manifest cannot reach complete while
gate_state is anything short of gates-passed, and it cannot complete with
an unresolved qa: disposition. This is Rule 5 with a script behind it.
Neither hook is arguing with you. Both are stating a precondition you can satisfy in about a minute.
Build (Standard+) — BEFORE implementing, verify both files exist on disk:
.sage/work/<initiative>/spec.md — status: completed.sage/work/<initiative>/plan.md — status: completedIf either is missing, create it first. No exceptions.
Do not rationalize past this:
| The thought | The reality |
|---|---|
| "The design is clear from earlier discussion" | Not a spec file. |
| "The user described what they want" | Not a spec file. |
| "This is straightforward" | If it is Standard scope, a spec is required. |
| "Just build it" | Write a minimal five-line spec and get [A]. |
Branch gate (Standard+, git projects). Before implementation commits begin,
HEAD must not be the default branch — unless a branching decline is recorded in
the initiative's decision log. Merging is always a user-gated [M] action.
No workflow path merges on its own. Full protocol:
sage/core/capabilities/execution/git-discipline/SKILL.md.
Gate sequence (build):
.sage/work/ → [A]/[R] → wait.sage/work/ → [A]/[R] → wait[A]/[R]Fix — scope AFTER root cause:
[A]/[R]/[S] → wait[A]/[R]/build or /architect[A]/[R]Do not fix before the root cause is confirmed. Do not skip fix scoping — a "quick fix" that touches eight files is a rebuild wearing a smaller word.
Architect — brief BEFORE design:
brief.md must exist before design begins. Do not
compress the rounds. Do not skip them because "I understand the system.".sage/docs/ → spec → .sage/work/ → [A]/[R][A]/[R] → phased build; each milestone follows the
build gates independently.Before presenting any completion checkpoint:
Spec compliance is adversarial. Do not trust your own report that the implementation matches the spec. You wrote it; you are the last one who will notice what it does not do. Verify independently, or let a fresh reviewer do it.
Gate scripts exit 0 pass, 1 fail, 2 unverifiable.
Exit 2 is the one that matters. It exists because "the suite is green" and "there is no suite" are different claims that used to share exit 0 — which is precisely how a gate reports success on code it never looked at.
Exit 2 is never a pass. It is also not a failure: it has produced no evidence either way. On exit 2, present the choice and record it:
[P] Proceed unverified — logged as a waiver in .sage/decisions.md
[F] Fix verification setup — install the runner, then re-run
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (xoai/sage) — no native marketplace selected
npx claudepluginhub p/xoai-sage33 skills in this plugin
/apiUse when designing, reviewing, or changing an HTTP, REST, or GraphQL API — endpoints, resource naming, error responses, pagination, versioning, idempotency, or API contracts between services./autoresearchAutonomous iteration toward a measurable outcome. Use when the user wants to optimize a numeric metric through repeated modify-verify cycles — reduce bundle size, increase test coverage, improve query time, lower readability score. Not for exploratory research, subjective judgment, or tasks without a verification command.
/baasUse when building on Firebase, Supabase, or a similar Backend-as-a-Service — writing security rules, modeling data for client queries, deciding whether logic needs a serverless function, or wiring real-time and client-direct access./flutterUse when writing or reviewing Flutter or Dart code — widget structure, state management, rendering performance on Impeller, or adapting a screen to iOS and Android./mobileUse when building or reviewing a mobile app on any framework — offline behavior, scrolling and animation smoothness, touch targets, battery use, or platform conventions./nextjsUse when writing or reviewing a Next.js App Router project — choosing server or client components, fetching and caching data, server actions, or route handlers.Other plugins' skills for the same job