tools/sage-claude-plugin/skills/architect/SKILL.md
Architecture Decision Records, System spec, Milestone plan
npx skillsauth add xoai/sage architectInstall 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.
System design for new projects or major redesigns. Elicit, then design, then plan. Never skip steps.
Scan .sage/work/ for architect initiatives.
This scan is MANDATORY — check the DISK.
Manifest-first path: If .sage/work/*/manifest.md exists with
workflow: architect, read it. Resume at the phase indicated.
Use context summary and handoff guidance for judgment context.
Multi-session architect cycles benefit most from the manifest —
it preserves the reasoning behind architecture decisions across sessions.
Fallback path: If no manifest.md but artifacts exist, use file-scan:
You MUST follow this routing. Do not override it.
Scan .sage/docs/ for existing research, ADRs, or decisions.
Read .sage/decisions.md for context. Read handoff field in
the most recent artifact if present.
Create manifest.md when brief.md is saved (after elicitation).
Update at every checkpoint: elicitation gate, design checkpoint,
plan checkpoint, each milestone completion.
Session end ([N]): Manifest update is MANDATORY — architect cycles
span sessions, so handoff guidance is critical.
Completion: Set status: complete after final milestone.
Anti-lazy-manifest: Same contract as build workflow — summary must
contain judgment, not spec titles.
This is the most important step. Understand the full picture before designing anything.
For comprehensive elicitation process, read
sage/core/capabilities/elicitation/deep-elicit/SKILL.md.
Three rounds — each produces a VISIBLE ARTIFACT:
Round 1 — Vision: What are you building and why? Who is it for? What does success look like? → Produce: vision summary (saved inline in brief or presented)
Round 2 — Constraints: Technical constraints, timeline, team size, existing systems to integrate with, non-negotiables. → Produce: constraints list (saved inline in brief or presented)
Round 3 — Gaps: What's still unclear? What assumptions are we making? → Produce: gaps analysis (saved inline in brief or presented)
Save combined elicitation to .sage/work/YYYYMMDD-slug/brief.md.
Do NOT proceed to design until all three rounds are complete. Do NOT compress three rounds into one response. Do NOT skip rounds because "the user already explained everything." Each round asks different questions — answers to Round 1 don't satisfy Round 2 or 3.
If Sage has relevant UNDERSTAND skills (research, analysis), recommend them here:
Sage recommends understanding the context before designing:
[1] Start with research — understand user needs first [2] Continue with elicitation round [N] [3] Something else
🔒 ELICITATION GATE:
File check: Does .sage/work/*/brief.md exist with content
from all three rounds (vision, constraints, gaps)?
If no → complete the missing rounds. Do NOT proceed to design.
Do NOT rationalize skipping:
Sage: Elicitation complete. Brief saved.
[A] Approve — continue to architecture design [R] Revise — I want to add or change something [N] New session — type /architect to continue with design
Pick A/R/N, or tell me what to change.
File check: .sage/work/*/brief.md MUST exist before designing.
If it doesn't exist, go back to Step 2. No exceptions.
Define: system components, data model, API boundaries, technology choices, deployment architecture, security model. Document key trade-offs and the reasoning behind each decision.
Save architecture decisions to .sage/docs/decision-*.md.
Save the full design to .sage/work/YYYYMMDD-slug/spec.md with frontmatter.
🔒 DESIGN CHECKPOINT:
Self-check (observable conditions):
Sage: Architecture design saved. ADRs in .sage/docs/decision-*.md Decision: [key architecture decisions]. (append to .sage/decisions.md)
[A] Approve — continue to planning in this session [R] Revise — here's what needs changing [Q] Question — I want to understand [specific decision] better [N] New session — type /architect to continue with milestone plan
Pick A/R/Q/N, or tell me what to change.
On approval: update spec frontmatter to status: completed.
Write handoff field in frontmatter:
handoff: |
Key decisions: [architecture choices and trade-offs]
Open questions: [what needs resolution during build]
Risks: [cross-cutting concerns, performance, migration]
Next agent should: [specific guidance for milestone planning]
Append architecture decisions to decisions.md (Rule 7).
File check: .sage/work/*/spec.md MUST exist with status: completed
before creating a milestone plan. If it doesn't → go back to Step 3.
Break the build into milestones (not tasks — milestones). Each milestone should be deployable and testable independently. Within each milestone, create a task plan.
Save to .sage/work/YYYYMMDD-slug/plan.md with frontmatter.
🔒 PLAN CHECKPOINT: Sage: Milestone plan saved to .sage/work/YYYYMMDD-slug/plan.md
[A] Approve — start building milestone 1 in this session [R] Revise — adjust the breakdown [N] New session — type /build to start milestone 1
Pick A/R/N, or tell me what to change.
On approval: append plan approach to decisions.md (Rule 7).
Next steps (Zone 3):
Next steps: /build — spec → plan → implement → verify (start milestone 1) /review — independent evaluation of the architecture /reflect — review design decisions before building
Type a command, or describe what you want to do next.
Execute milestone by milestone. Each milestone MUST follow the build workflow gates independently:
For each milestone:
Do NOT batch-implement multiple milestones without checkpoints. Do NOT skip per-milestone verification because "I'll test everything at the end."
At each milestone completion checkpoint: Sage: Milestone [N] complete — [summary] Decision: [what was learned during implementation]. (append to decisions.md)
[C] Continue to milestone [N+1] [R] Revise — adjust before continuing [P] Pause — type /build to continue next session
Re-validate after each milestone: Check architecture assumptions against what implementation revealed. If the architecture needs adjustment, note it in decisions.md and update ADRs before proceeding.
Communication style: Systems thinking. Name trade-offs explicitly, discuss failure modes, and explain decisions in terms of constraints and alternatives considered.
Good architecture output:
tools
Captures agent mistakes, corrections, and discovered gotchas so they are not repeated. Use when: (1) a command or operation fails unexpectedly, (2) the user corrects the agent, (3) the agent discovers non-obvious behavior through debugging, (4) an API or tool behaves differently than expected, (5) a better approach is found for a recurring task. Also searches past learnings before starting tasks to avoid known pitfalls. Activate alongside the sage-memory skill — they share the same MCP backend but serve different purposes (sage-memory = codebase knowledge, sage-self-learning = agent mistakes and gotchas).
development
Typed knowledge graph stored in sage-memory. Use when creating or querying structured entities (Person, Project, Task, Event, Document), linking related objects, checking dependencies, planning multi-step actions as graph transformations, or when skills need to share structured state. Trigger on "remember that X is Y", "what do I know about", "link X to Y", "show dependencies", "what blocks X", entity CRUD, cross-skill data access, or any request involving structured relationships between things.
tools
Integrates sage-memory into Sage workflows. Teaches the agent when to remember (store findings during work), when to recall (search memory at session start and task start), and how to learn (structured knowledge capture via sage learn). Use when the user mentions memory, remember, recall, learn, capture knowledge, onboard to codebase, or when starting any session where sage-memory MCP tools are available.
tools
Captures agent mistakes, corrections, and discovered gotchas so they are not repeated. Use when: (1) a command or operation fails unexpectedly, (2) the user corrects the agent, (3) the agent discovers non-obvious behavior through debugging, (4) an API or tool behaves differently than expected, (5) a better approach is found for a recurring task. Also searches past learnings before starting tasks to avoid known pitfalls. Activate alongside the sage-memory skill — they share the same MCP backend but serve different purposes (sage-memory = codebase knowledge, sage-self-learning = agent mistakes and gotchas).