spec-design

spec-design is a command for coding agents from nicelight/DevRails-26. It costs 15 tokens per session (2,357 once invoked), scanned A, original, MIT.

A software-design command that creates the project's shared technical foundation after product features have been identified. It records boundaries, key decisions, and agreed contracts without dictating the code implementation.

In plain words
What is it for?
Use it to establish the initial design backbone, decide whether foundational work is needed, and prepare the project for detailed feature design.
Why use it?
It prevents later work from relying on unresolved architecture or data decisions and blocks handoff when an important decision is still open.

Command

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/nicelight/devrails-26/spec-design
Clone the repo
git clone --depth 1 https://github.com/nicelight/DevRails-26

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 spec-design

README.md
[![agentmods](https://agentmods.dev/badge/commands/nicelight/devrails-26/spec-design.svg)](https://agentmods.dev/commands/nicelight/devrails-26/spec-design)
Your own site
<a href="https://agentmods.dev/commands/nicelight/devrails-26/spec-design"><img src="https://agentmods.dev/badge/commands/nicelight/devrails-26/spec-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,357 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.00015 $0.02357
Opus 5 $0.00008 $0.01179
Sonnet 5 $0.00003 $0.00471
Haiku 4.5 $0.00002 $0.00236

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

Security

Grade A, and why

spec-design 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.

skills/_shared/references/commands/spec-design.md · 264 lines

How it starts

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

/spec-design - Global SDD backbone gate

The outcome is a compact set of technical decisions, boundaries, and canonical contracts that constrains later agents without prescribing implementation. The gate is mandatory but adaptive in depth:

  • local/simple pressure may produce a valid minimal backbone with explicit not_applicable rationale;
  • shared-boundary, contract, state/data, runtime, security, or strict pressure requires a complete scaffold and applicable canonical specs;
  • unresolved material decisions produce blocked and stop the handoff.

This command also records the explicit Foundation Dev Path decision. It never creates task records, implementation plans, REQ-000, or FT-000.

<input_contract> Run after /prd-to-features with no argument. If a successful positive-revision backbone already exists, route changes to /spec-redesign.

Require the clarified product feature set, pre-design backbone/registry, and relevant accepted/current evidence. Load and apply .memory-bank/workflows/sdd-design-contract.md; it owns source authority, canonical artifact ownership, SDD coverage, architecture integrity, and shared semantic validation. </input_contract>

<hard_invariants>

  • Do not skip this gate, even for local/simple work.
  • Feature docs remain composition roots for behavior and exact applicable spec links. Feature-level concern completion and spec_design_status normally belong to /feature-to-tasks or /spec-auto.
  • This command owns only initial Planning Revision activation. Accepted backbone changes and later revision decisions belong to /spec-redesign.
  • Foundation work is product-enabling infrastructure only. Do not move product behavior into the foundation path. </hard_invariants>

<operator_decisions> Apply the shared operator-decision boundary. In interactive mode, ask only for unresolved material choices; in unattended mode, block and name /spec-design as the resume route.

When architecture_style is unresolved, evidence identifies an application-shaped greenfield project, and no accepted decision or concrete trade-off points elsewhere, first recommend one deployable modular monolith whose primary change units are capability/vertical slices. Include one runtime composition, narrow module contracts, explicit write ownership including a shared-database case, and a credible verification path per significant capability. Present another style first only when current evidence supports the trade-off; hypothetical future scale or reuse is insufficient.

This recommendation order does not create target authority. Propose one coherent initial slice map and its material ownership/boundary choices as part of the same focused architecture decision, then obtain one explicit operator confirmation rather than a questionnaire per slice. An explicit alternative always wins. A previously accepted operator/project policy may authorize this preferred style and an evidence-determined slice map only when the evidence yields one materially unambiguous decomposition; otherwise unattended mode uses the existing blocker below.

Do not force this recommendation onto a library/package, CLI, firmware, data pipeline, plugin/protocol system, established brownfield boundary, or genuinely independently deployed services. Recommend the evidence-backed natural primary change unit for those shapes. Brownfield migration to the preferred target still requires an accepted target decision.

Brownfield special case: when meaningful code exists but a credible mapped current-state baseline is missing, ask the operator to choose the immediate route unless the accepted scope already proves a strictly local delta:

  • run /map-codebase first;
  • explicitly accept PRD-only drift risk;
  • constrain the work to an evidenced local delta.

An unresolved initial choice sets Global Backbone Status blocked and uses the active workflow's existing HALT_BLOCKING_QUESTIONS or HALT_CLARIFICATION_REQUIRED state. </operator_decisions>

Read the full file on GitHub · 264 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. 3d ago First seen · 264 lines · 15 tokens per session scan A 24958bb77c21

Subscribe to this mod's changes

spec-design is a command published in the GitHub repository nicelight/DevRails-26 (22 stars, last pushed 5d ago), licensed MIT. It adds 15 tokens to every session and 2,357 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-30.