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.
npx agentmods add commands/helgdemidov/refigure/tech-specgit clone --depth 1 https://github.com/HelgDemidov/refigureWrote 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/helgdemidov/refigure/tech-spec)<a href="https://agentmods.dev/commands/helgdemidov/refigure/tech-spec"><img src="https://agentmods.dev/badge/commands/helgdemidov/refigure/tech-spec.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 | $0.00027 | $0.01692 |
| Opus 5 | $0.00014 | $0.00846 |
| Sonnet 5 | $0.00005 | $0.00338 |
| Haiku 4.5 | $0.00003 | $0.00169 |
Grade A, and why
tech-spec 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 3d 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Turn a feature/refactor/porting-task request into a structured spec (ТЗ), following this repo's docs/<category>/<slug>/<slug>-<date>.md convention (category = thematic grouping, e.g. vlm, cli, project-meta, package-foundation — see Step 6).
Take the task description from the user's message (and any command args) as the primary input. Everything below is a DEFAULT — an explicit instruction in that message (different length, different process, different location) overrides it.
Cross-cutting principle — refigure's architectural invariants
The spec is built against current industry best practices — code robustness, cleanliness, secure development — AND against the architecture decisions already locked in CLAUDE.md and docs/project-meta/v1-scope-and-api-design/v1-scope-and-api-design-2026-08-04.md. This isn't a separate step but a criterion applied at every stage — draft (Step 2), self-critique (Step 3), finalization (Step 4). Concretely, any spec touching converter code must respect:
- Format isolation:
refigure/docx/__init__.pyimports only mammoth+markdownify;refigure/xlsx/__init__.pyimports only openpyxl. Neither imports the other's heavy dependency. - Core stays light:
refigure/core/chart_data.py/refigure/core/chart_render.pyimport onlylxml(+ optionalmermaidxinsidechart_render.py) — never mammoth/openpyxl. - Optional-dependency pattern: module-level
try/except ImportError+ capability flag +functools.lru_cachewarn-once vialogger.warning— reuse the existing pattern, don't invent a new one per dependency. - Sync core:
chart_data/chart_render/docx/xlsxstay synchronous; async is reserved for a future narrow VLM-batch entry point only, not the whole library. - Rich public API:
ConversionResultdataclass + typed exceptions +strict: bool, not a bare string or raised-kwarg pile.
Step 1 — Ground the spec in reality
Read the relevant existing code (refigure/), related docs/*.md (for tone/structure/prior decisions), CLAUDE.md, and relevant project memory (MEMORY.md index + linked files). Every concrete claim that ends up in the spec — file path, function name, module boundary — must be verified against the actual repo, not assumed.
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.
- 3d ago First seen · 84 lines · 27 tokens per session scan A 37d678fb3728
tech-spec is a command published in the GitHub repository HelgDemidov/refigure (0 stars, last pushed 6d ago), licensed Apache-2.0. It adds 27 tokens to every session and 1,692 once invoked, about $0.0001 per session on Opus 5. 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
build
Fase Build del ciclo SDD (dbv-specs-ops) — implementación incremental.
code-simplify
Fase Simplify del ciclo SDD (dbv-specs-ops) — revisión por pases + refactor.
maintain
Fase Maintain (opcional) del ciclo SDD (dbv-specs-ops) — diagnóstico de un hallazgo detectado.
plan
Fase Plan del ciclo SDD (dbv-specs-ops) — Architect Review y desglose de tareas.
ship
Fase Ship del ciclo SDD (dbv-specs-ops) — versionado, changelog y release.
spec
Fase Spec del ciclo SDD (dbv-specs-ops) — define el "qué" y el "por qué".