>_Learning Code Genie — Version Beta.

SAGE AI

SAGE AI logoLogo pixelado SAGE AI con contornos desplazados, sin fondo

First learn, then vibe~

>_SAGE AI is your pocket genie — plug it into OpenCode and master your project.
📖ExplainExplore🜨Learn
$ npx sage-aiv0.2.0

Sage. A new tool to guide us all.

Automation abstracts the knowledge you need. Sage is the counter-spell — a pocket genie in your terminal that reads your project, explains the why behind the code, and keeps you present while you build.

pil_0.1

Learn first, then VibeCode

Don't let AI deprive you of learning. Stay in your editor, invoke the genie, and keep growing while you build.

pil_0.2

Explore new frontiers

Learn new stacks, sharpen your practices, and let /wish remember every step of your journey across sessions.

pil_0.3

Read-only by design

Sage doesn't touch your code. It maps it, traces it, explains it. Your repo stays exactly as you left it.

opencode
/exp-file @apps\backend\src\users\users.controller.ts

The Users controller exposes 5 REST endpoints but only 2 are
implemented (create and getAll). The other 3 throw
NotImplementedException from the service.


Key points
Role             HTTP layer of the Users module, delegates to UsersService
Real endpoints   POST / (create), GET / (getAll)
Stubs            GET /:_id, DELETE /:_id, PATCH /:_id
Security         No @UseGuards despite Auth/Users tag
Convention       _id prefix parameter can be misleading

What the agent found
- CRUD ahead of implementation — interface exists, backend incomplete.
- No endpoint protection (no guards, no authentication).
- Design phase clue in ADR002.

Explore the service or check ADR002 directly with /why?

How it works

  1. [ 1 ]Install Sage✨ [ Global or Local ]
  2. [ 2 ]Launch OpenCode
  3. [ 3 ]Select Sage as sub-agent — press Tab in OpenCode
  4. [ 4 ]Simply run /exp, /exp-file, /flow or /why and start exploring your project.
  5. [ 5 ]Want a read on safety or craft? Run /sec for heuristics on threats, or /audit for a mentor-style craft audit — they hand off to each other.
  6. [ 6 ]Ready to learn? Start with /wish and begin your study or implementation plan — without ever leaving OpenCode!

Available /Commands

  • /exp

    Scans the entire project and produces a structured overview: stack, architecture, entry points, and key conventions. Also creates/updates sources.json so other commands have context.

  • /exp-file@path

    Explains a single file in depth — what it does, why it exists, and how it connects to the rest of the project.

  • /flow@path

    Maps the dependency graph of a module — what it imports, what imports it, and how data flows through it.

  • /why@path

    Traces the design decisions behind a file using git history, ADRs, and inline patterns. Teaches you to read intent, not just code.

  • /wish

    Your co-op mentor for conquering new knowledge. Tackling a stack you've never touched? Learning a tech that feels out of reach? Set a goal, pick a level (Casual, Formal, Senior), and Sage walks you through it step by step across sessions — remembering your progress, your decisions, and where you left off.

  • /sec@path

    Sage reviews your file or project with a focus on security and flags up to 5 things worth a second look — exposed secrets, doors left open, risky config. Each finding is rated 🔴 High · 🟡 Medium · 🟢 Low, always as a concern, never a scolding. A quick gut-check to catch the obvious — not a replacement for a real security audit.

  • /audit@path

    Sage audits and evaluates your file or project for quality and best practices — first naming what's genuinely well done (and why), then suggesting small, optional improvements in style, maintainability and modern patterns. Suggestions read as "if you'd like, you could…", never orders. /sec and /audit are complementary views: one watches for threats, the other for craft — each hands off to the other when it makes sense.

*Responses may vary depending on the model in use.

**Run /exp with a strong planning model — it's the heaviest command, optimized to avoid back-to-back re-runs.

***@path refers to a specific file — e.g. index.js, app.tsx, or any path in your project.

>_Integrated Skills.

Built for more.

SAGE AI integrates with the skills available in your OpenCode project — and works with any model, from free tiers to paid plans, all the way to your own self-hosted LLM.

Coming soon[ MCP Support ]

Questions frequently asked