spec-init

A command that checks project terms and prepares the context before breaking a product requirements document into smaller parts.

In plain words
What is it for?
Use it before product-requirements decomposition to validate the glossary, project documents, and readiness for planning.
Why use it?
It catches missing or incomplete project documents before planning continues, and directs the user to the appropriate preparation step.

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-init
Clone the repo
git clone --depth 1 https://github.com/nicelight/DevRails-26
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 1,943 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.01943
Opus 5 $0.00008 $0.00971
Sonnet 5 $0.00003 $0.00389
Haiku 4.5 $0.00002 $0.00194

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

Security

Grade A, and why

spec-init 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 2d 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-init.md · 207 lines

How it starts

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

/spec-init - Pre-PRD spec framing

/spec-init is a decomposition-safety gate, not architecture design. Its result is Pre-PRD Spec Status: ready_for_prd|blocked; the global SDD backbone and Foundation Dev Path remain intentionally pending for /spec-design after /prd-to-features.

<input_contract> Require .memory-bank/prd.md with all existing clarified-PRD markers:

type: prd
clarification_status: complete
constitution_checked: true

If any marker is missing or has another value, stop and route to /write-prd or /constitution according to the failed owner contract; do not frame the PRD as ready. Read relevant context from the Constitution, Product Brief, existing glossary.md, spec-backbone.md, pure spec-index.md, user scenarios, invariants, and canonical subject specs under architecture/, contracts/, domains/, states/, adrs/, testing/, guides/, and runbooks/.

Legacy .memory-bank/tech-specs/FT-*.md may be read as brownfield evidence only; it is not a target path for new specs. If the PRD is missing or too unclear to frame truthfully, stop and route to /write-prd. </input_contract>

<glossary_gate> Before any other framing, inspect .memory-bank/glossary.md. It is unfilled if missing, empty, or placeholder-only. In that case populate it from the Product Brief, clarified PRD, and other authoritative project sources; otherwise reconcile existing terms with current evidence.

Keep only evidenced definitions. If a conflicting meaning can affect decomposition, use the existing operator-decision blocker. Continue only when the glossary has no placeholders and its spec-index.md row matches it. </glossary_gate>

<hard_invariants>

  • Do not create feature files, task records, implementation plans, feature-owned or FT-* design specs, full architecture decisions, source-of-truth hierarchy, API/OpenAPI details, DB migrations, deployment design, detailed state machines, or invented security posture.
  • Do not set feature spec_design_status; /prd-to-features creates features and later design skills own that status.
  • Keep .memory-bank/spec-index.md a pure registry. Readiness, open design questions, matrices, and handoffs belong in spec-backbone.md.
  • Preserve any existing Global Backbone Planning Revision. /spec-init does not initialize or increment the post-PRD planning contract; a fresh bootstrap placeholder remains 0 until /spec-design succeeds.
  • Keep boundary hints preliminary in spec-backbone.md#Decomposition Inputs. /spec-init does not create accepted module/change-unit nodes, dependency edges, or boundary contracts.
  • Do not turn a later architecture question into a product assumption. Record it for /spec-design unless it blocks truthful L1-L3 decomposition now. </hard_invariants>

<operator_decisions> If an unresolved product/domain branch can change actors, core scenarios, non-goals, entity/business-rule ownership, lifecycles, boundary hints, constraints, risks, or feature/epic cuts, ask the operator before setting ready_for_prd.

Use an adaptive interview: ask one question or a small group of tightly related questions, explain decomposition impact, and optionally recommend an option. Do not run a fixed framing questionnaire. A recommendation is not a decision. Do not re-ask matters settled by authoritative PRD/Constitution/spec evidence.

In unattended flow, use only an already accepted authoritative decision. If none exists, record the question and affected decomposition inputs, set Pre-PRD Spec Status: blocked, and halt with HALT_BLOCKING_QUESTIONS.

After every accepted answer, apply the decision to its existing owning canonical artifact and to the corresponding spec-backbone.md decomposition input or blocker. Remove contradictory superseded wording and rerun the PRD, source-precedence, link, and decomposition-safety checks before setting ready_for_prd. Do not create a separate decision artifact or status. </operator_decisions>

Read the full file on GitHub · 207 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. 2d ago First seen · 207 lines · 15 tokens per session scan A a3eda5d1c9c1

Subscribe to this mod's changes

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