from-spec

from-spec is a command for Claude Code from dork-labs/dorkos. It costs 8 tokens per session (1,069 once invoked), scanned A, original, MIT.

A command that extracts important technical choices from a finished specification and records them as Architecture Decision Records (ADRs).

In plain words
What is it for?
Use it after completing a specification to identify selected technologies, adopted patterns, trade-offs, and rejected alternatives worth recording.
Why use it?
It preserves project-wide decisions and avoids creating duplicate records for choices already documented.

Command for Claude Code

Part of the flow plugin — 33 skills, 42 commands, 5 agents, 4 hooks, 5 plugins shipped together

Install

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.

agentmods
npx agentmods add commands/dork-labs/dorkos/from-spec
Clone the repo
git clone --depth 1 https://github.com/dork-labs/dorkos

Made for: Claude Code.

Or install flow, the plugin that ships this one along with the rest of its 33 skills, 42 commands, 5 agents, 4 hooks, 5 plugins.

Wrote 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.

agentmods badge for from-spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/dork-labs/dorkos/from-spec.svg)](https://agentmods.dev/commands/dork-labs/dorkos/from-spec)
Your own site
<a href="https://agentmods.dev/commands/dork-labs/dorkos/from-spec"><img src="https://agentmods.dev/badge/commands/dork-labs/dorkos/from-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,069 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00008 $0.01069
Opus 5 $0.00004 $0.00535
Sonnet 5 $0.00002 $0.00214
Haiku 4.5 $0.00001 $0.00107

Measured 4d ago against content hash fe1fdb4975ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

from-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 4d 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.

.claude/commands/adr/from-spec.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Extract ADRs from Specification

Spec Slug: $ARGUMENTS

Extract the architecturally significant decisions from a spec into ADRs. Significance is judged at creation time — no ADR is ever created with status: draft, and there is no separate curation pass.

Steps

Step 1: Read the Specification

Read specs/$ARGUMENTS/01-ideation.md (exploration and research) and specs/$ARGUMENTS/02-specification.md (final decisions).

Step 2: Check for Existing ADRs

Read decisions/manifest.json and list any existing ADRs that already reference this spec slug — don't create duplicates.

Step 3: Identify Candidate Decisions

Scan the spec documents for decision signals: technology choices ("we chose X", "X instead of Y"), pattern adoption, trade-off resolutions, and rejected alternatives.

Step 4: Score Each Candidate Against the Significance Rubric

# Criterion How to Assess
1 Chooses between alternatives Does it describe selecting X over Y? Or just "we used X"?
2 Project-wide impact Does this affect how future features are built, beyond the originating spec?
3 Would surprise a new team member Is this a non-obvious choice that needs explanation?
4 Adopts a lasting pattern or technology New library, architecture pattern, data model with long-term consequences?

Score = number of criteria met (0-4).

  • Criterion 2 (project-wide impact) met AND score >= 2 → write the ADR (Step 5)
  • Otherwise → do not write it; list it in the Step 6 summary with its score so the judgment is auditable

Criterion 2 is mandatory, not one vote among four: the 2026-08 corpus audit (research/20260806_adr-corpus-health-and-lifecycle.md) found the sub-2 bar had admitted single-surface implementation details (component variants, indicator placement) that rot the fastest and are visible from the code anyway. A decision confined to one feature belongs in the spec, not the decision log.

Read the full file on GitHub · 79 lines

Changes

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.

  1. 4d ago First seen · 79 lines · 8 tokens per session scan A fe1fdb4975ef

Subscribe to this mod's changes

from-spec is a command published in the GitHub repository dork-labs/dorkos (9 stars, last pushed today), licensed MIT. It adds 8 tokens to every session and 1,069 once invoked, about $0.0000 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.