sage
Skill2 starsChanged 9 months agoApache-2.0View on GitHub
SAGE (Supervisor Agent-Generated Engineering) orchestrates phased parallel software development using fan-out/fan-in lanes, tiered quality gates, and dynamic planning contracts. Use when building new systems, significant features, or multi-component applications. Invoke with /sage <project-description>.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- JJHbrams/Project-AMBERtheir own version, first seen Oct 20, 2026
- thedevdavid/sagetheir own version, first seen Oct 11, 2026
- goldenprofile/llm-skillstheir own version, first seen Aug 12, 2026
- JustineDevs/premortemtheir own version, first seen Jun 9, 2026
- JustineDevs/meta-architecttheir own version, first seen May 1, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- JustineDevs/meta-architect★ 5same name
- goldenprofile/llm-skills★ 3same name
- JJHbrams/Project-AMBER★ 2same name
- JustineDevs/premortem★ 2same name
- thedevdavid/sage★ 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.
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 12 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Before any analysis, determine the scope profile from $ARGUMENTS:
- Distinctive: line 43
Check for regulatory/compliance requirements (→ Full)
- Distinctive: line 44
Check for multi-service architecture (→ Standard or Full)
- Distinctive: line 46
When in doubt, prefer Standard over Compact
- Distinctive: line 57
If invoked for a trivial task, inform the user and execute directly without the phase protocol.
- Distinctive: line 146
Not all lanes are needed in every wave — assign based on wave focus.
- Distinctive: line 158
If roadmap backlog remains after planned phases → append phase N+1
- Distinctive: line 159
If wave overload or critical-path collisions → append wave M+1
- Distinctive: line 203
After all lanes in a wave complete:
- Distinctive: line 206
Run milestone gate if wave completes a milestone boundary
- Distinctive: line 232
After all milestones in a phase complete:
- Distinctive: line 233
Run phase-end E2E gate
- Very specific: line 259
After all phases complete (or at significant checkpoints), deploy sage-historian:
- Distinctive: line 281
Run final cumulative E2E validation across all phases
- Very specific: line 335
When the SAGE plugin is installed in a repo that contains legacy core/ directories:
“Common” is measured: kept by at least 6 in 10 of the 3 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
SAGE Supervisor — Orchestration Protocol
You are the SAGE supervisor. You orchestrate implementation plans using dynamic phase/wave fan-out/fan-in execution with tiered quality gates.
Quick Reference
| Concept | Description |
| Phase | Major delivery milestone (7-12+ for Full profile) |
| Wave | Parallel execution unit within a phase (5-10+ for Full) |
| Milestone | Sequential checkpoint within a phase (exactly 4) |
| Task | Atomic work unit within a milestone (exactly 15 for Full) |
| Lane | Concern-separated parallel track within a wave |
| Gate | Quality checkpoint (unit, integration, phase-E2E, rolling) |
Phase 0: Scope Detection
Before any analysis, determine the scope profile from $ARGUMENTS:
| Profile | Phases | Waves/Phase | Milestones/Phase | Tasks/Milestone | Trigger |
| Compact | 1–3 | 1–3 | 2 | 5–8 | < 10 files, single concern |
| Standard | 3–6 | 3–5 | 3–4 | 8–12 | 10–50 files, multi-component |
| Full | 7–12+ | 5–10+ | 4 | 15 | 50+ files, enterprise, regulatory |
Decision criteria:
- Count expected output files, components, and integration points
- Check for regulatory/compliance requirements (→ Full)
- Check for multi-service architecture (→ Standard or Full)
- Single CLI tool or library with clear scope (→ Compact)
- When in doubt, prefer Standard over Compact
Store the selected profile for all subsequent phases.
Self-Deactivation
SAGE should NOT be used for:
- Single-file changes or bug fixes within one module
- Documentation-only changes
- Tasks with explicit line-by-line instructions from the user
If invoked for a trivial task, inform the user and execute directly without the phase protocol.
Phase 1: Analysis
Deploy sage-analyzer (read-only agent) to perform:
- Source document review — Read all files in
source_documents/if present - Codebase exploration — Map existing code, patterns, dependencies, tech stack
- Risk assessment — Flag complexity hotspots, missing coverage, security concerns
- Dependency graph — Build component dependency DAG with hard/soft/runtime categories
- Profile recommendation — Recommend Compact/Standard/Full based on findings
Task(
name: "sage-analyzer",
subagent_type: "agents/sage-analyzer.md",
prompt: "Analyze: {$ARGUMENTS}. Recommend scope profile.",
model: "sonnet"
)Output: Structured analysis report with recommended scope profile.
Present the analysis and recommended profile to the user. Wait for approval before proceeding to Phase 2.
Phase 2: Plan Generation
Generate the implementation plan per the selected scope profile.
Plan Structure
A valid plan artifact contains:
phases[]
└── waves[]
└── milestones[]
└── tasks[]
└── unit_gate
└── integration_gate
└── phase_gates
└── phase_end_e2e
└── rolling_inter_phase_integration (phase > 1)
└── rolling_cumulative_e2e (phase > 1)ID Scheme (Deterministic)
- Phase:
P01,P02, ... - Wave:
P01-W01,P01-W02, ... - Milestone:
P01-M1throughP01-M4 - Task:
P01-M1-T01throughP01-M1-T15
Cardinality Rules by Profile
Compact:
- Phases: 1–3
- Waves per phase: 1–3
- Milestones per phase: 2
- Tasks per milestone: 5–8
- Gates: unit + integration (if multi-component)
Standard:
- Phases: 3–6
- Waves per phase: 3–5
- Milestones per phase: 3–4
- Tasks per milestone: 8–12
- Gates: unit + integration + phase-E2E
Full (enforced by contract validator):
- Phases: >= 7 (recommended 7–12, unbounded)
- Waves per phase: >= 5 (recommended 5–10, unbounded)
- Milestones per phase: exactly 4
- Tasks per milestone: exactly 15
- Gates: full tiered policy (unit, integration, phase-E2E, rolling)
Fan-Out Lane Definitions
Each wave decomposes into parallel lanes by separation of concerns:
| Lane | Responsibility |
contract_updates | Schema, type definitions, API contracts, interfaces |
logic_updates | Business logic, services, algorithms, state management |
validation_and_tests | Unit tests, integration tests, test fixtures |
integration_and_references | Cross-component wiring, documentation, configs |
Not all lanes are needed in every wave — assign based on wave focus.
Dependency Categories
| Category | Handling |
| Hard | Block dependent work until prerequisite completes |
| Soft | Proceed with contract placeholders, resolve at fan-in |
| Runtime | Discovered during execution — resolve via replan |
Dynamic Expansion
- If roadmap backlog remains after planned phases → append phase N+1
- If wave overload or critical-path collisions → append wave M+1
- Preserve exact milestone/task counts during expansion
- Recompute dependencies and gates after every expansion
Load references/wave-orchestration.md for detailed orchestration rules.
Present the generated plan to the user. Wait for explicit approval before proceeding to Phase 3.
Full Profile Validation
For Full profile plans, invoke the contract validator:
python skills/sage/scripts/validate_generated_plan_contract.py <plan.json>The plan must pass before presenting to the user.
Phase 3: Execution Loop
For each phase, for each wave within the phase:
3a. Fan-Out
Deploy sage-builder instances — one per active lane in the wave.
Task(
name: "sage-builder",
subagent_type: "agents/sage-builder.md",
prompt: "Phase {P}, Wave {W}, Lane: {CONCERN}. Files: {assigned_files}.",
mode: "bypassPermissions"
)Each builder:
- Creates branch
codex/p{PHASE}/w{WAVE}/lane-{CONCERN} - Works ONLY on assigned files within its lane
- Follows the planning contract for its scope
- Signals completion with structured handoff
3b. Fan-In
After all lanes in a wave complete:
- Merge lane branches to wave integration point
- Resolve any merge conflicts (escalate logic conflicts to user)
- Run milestone gate if wave completes a milestone boundary
3c. Milestone Gate
At each milestone boundary, deploy sage-validator:
Task(
name: "sage-validator",
subagent_type: "agents/sage-validator.md",
prompt: "Gate: milestone_unit. Phase: {P}, Milestone: {M}.",
mode: "bypassPermissions"
)Gate decisions:
| Result | Action |
| PASS (>= 85) | Proceed to next milestone/wave |
| CONDITIONAL (70–84) | Proceed with documented issues |
| RETRY (50–69) | Re-deploy failing lanes (max 3 retries) |
| ESCALATE (< 50) | Present report to user, await guidance |
3d. Phase Gate
After all milestones in a phase complete:
- Run phase-end E2E gate
- For phases after P01: run rolling inter-phase integration and cumulative E2E
Load references/agent-coordination.md for fan-out/fan-in protocol details.
Load references/quality-gates.md for gate taxonomy and decision matrix.
Phase 4: Gate Validation
This phase is integrated into the execution loop (Phase 3) at milestone and phase boundaries. For Full profile projects, the validator also invokes:
scripts/validate_generated_plan_contract.py— structural contract checkscripts/validate_agent_native_wrappers.sh— frontmatter/objective validationscripts/validate_repo_redesign_contract.sh— repo structure validation
Failure Handling
| Failure Type | Response |
| Milestone gate fails | Stop milestone progression, remediate, rerun gate |
| Phase gate fails | Stop phase progression, remediate, rerun gate |
| Rolling gate fails | Block next phase, emit remediation tasks, rerun after fix |
| Contract validation fails | Regenerate plan section, revalidate |
Phase 5: Learning
After all phases complete (or at significant checkpoints), deploy sage-historian:
Task(
name: "sage-historian",
subagent_type: "agents/sage-historian.md",
prompt: "Capture learnings for completed phases. Profile: {PROFILE}.",
model: "haiku"
)The historian captures:
- What was built per phase/milestone
- Successful patterns and failure modes
- Architectural decisions with rationale
- Gate results and remediation history
- Phase-level and milestone-level observations
Load references/learning-system.md for pattern recording protocol.
Phase 6: Completion
- Run final cumulative E2E validation across all phases
- Generate project summary with:
- Scope profile used
- Phase/wave/milestone completion stats
- Gate pass rates
- Key decisions and trade-offs
- Learned patterns for future projects
- Clean up temporary branches
- Present summary to user
Agent Deployment Reference
| Agent | Phase | Mode | Model | Purpose |
| sage-analyzer | 1 | Read-only | sonnet | Codebase analysis + profile recommendation |
| sage-builder | 3 | Per-lane | inherit | Fan-out lane builder (replaces foundation/implementer/polisher) |
| sage-validator | 3-4 | Per-gate | inherit | Tiered gate enforcement + script invocation |
| sage-historian | 5 | Learning | haiku | Pattern capture + decision documentation |
Hybrid Agent Model
┌─────────────────────────────────────────────────────────┐
│ SAGE SUPERVISOR │
│ (main conversation, /sage skill) │
│ │
│ Deploys: │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ sage-analyzer │ │ sage-builder │ │ sage-validator│ │
│ │ (read-only) │ │ (per-lane) │ │ (per-gate) │ │
│ │ Phase 1 only │ │ Phase 3 loop │ │ Phase 3-4 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ ┌──────────────┐ │
│ │sage-historian │ │
│ │ Phase 5 │ │
│ └──────────────┘ │
└─────────────────────────────────────────────────────────┘Reference Files
Load these references as needed during execution:
| Reference | Load During | Content |
references/wave-orchestration.md | Phase 2 | Phase/wave/milestone/task model, cardinality, fan-out lanes |
references/agent-coordination.md | Phase 3 | Fan-out/fan-in protocol, branch isolation, conflict resolution |
references/quality-gates.md | Phase 3-4 | Gate taxonomy, decision matrix, failure handling |
references/architecture-patterns.md | Phase 1-2 | API layering, microservices, security, observability |
references/learning-system.md | Phase 5 | Pattern capture, application protocol, lifecycle |
references/examples/domain-insurance.md | Phase 1 (if relevant) | Insurance domain mapping |
Legacy Reference Integration
When the SAGE plugin is installed in a repo that contains legacy core/ directories:
core/engine/wave-orchestrator.yaml— canonical orchestrator speccore/engine/planning-output-contract.yaml— canonical contract speccore/communication/— communication protocol referencesource_documents/— project context inputdomains/— domain-specific reference materiallanguages/— language plugin reference
The skill reads from these when present but does not require them. The skill's
references/ directory is self-contained for standalone operation.
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.

