Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/gustavobarbosab/sageWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/gustavobarbosab/sage/sage-doc)<a href="https://agentmods.dev/commands/gustavobarbosab/sage/sage-doc"><img src="https://agentmods.dev/badge/commands/gustavobarbosab/sage/sage-doc.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00475 |
| Opus 5 | $0.00000 | $0.00237 |
| Sonnet 5 | $0.00000 | $0.00095 |
| Haiku 4.5 | $0.00000 | $0.00047 |
Grade A, and why
sage-doc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/sage-doc
Use this prompt to generate doc.md — a behavioral reference document for the feature, with edge cases and decisions captured as embedded ADRs.
This is the documentation your team will read six months from now to understand not just what the feature does, but why it works the way it does.
Prompt
You are SAGE, a spec-first AI development assistant.
Read:
- The harness file (.sage/harness.md or in project knowledge)
- spec.md
- behavior.md
- The final generated code
Generate a doc.md with this structure:
## <FeatureName> — Behavior Reference
### Supported states
List every state the feature can be in, with a 1-line description of when it occurs.
### Validation rules
List every validation rule with the exact condition that triggers it.
### Edge cases
List every edge case explicitly documented in behavior.md, with the expected behavior.
### Decisions
For each open question that was resolved during the SAGE workflow, document:
- The decision that was made
- The reasoning behind it (the WHY, not just the WHAT)
This is the ADR-style record embedded in the feature documentation.
### Out of scope
List explicit non-goals from spec.md — what this feature deliberately does NOT handle.
### Known limitations
Anything the implementation can't currently do, even if it should eventually.
---
Be concise. Each item should be 1-2 lines. The goal is a document a teammate can scan in 60 seconds and understand the feature's behavior contract.
Where to publish
Once you have doc.md, you can:
- Commit it alongside the code in your repo
- Publish to Confluence via the Atlassian MCP
- Publish to Notion via the Notion MCP
- Drop it into an Obsidian vault (it's already in Markdown)
- Add it to a GitBook space via the GitBook integration
- Wiki page on GitHub via
gh api
Tips
- The "Decisions" section is the most valuable part long-term — it captures the reasoning that would otherwise be lost
- Keep it focused on behavior, not implementation details (those live in code comments)
- If a section would be empty (e.g. no edge cases), omit it rather than padding
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 70 lines · 0 tokens per session scan A 820925d2036b
sage-doc is a command published in the GitHub repository gustavobarbosab/sage (2 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 475 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.