speckit.product-forge.backfill

speckit.product-forge.backfill is a command for Claude Code from VaiYav/speckit-product-forge. It costs 118 tokens per session (2,417 once invoked), scanned A, original, MIT.

A command that reconstructs a Product Forge feature record from an existing code module or directory. It creates a reverse-engineered specification, plan, task list, status file, and report of missing lifecycle information.

In plain words
What is it for?
Use it when bringing an existing feature into Product Forge, especially in a codebase that was built without its normal specification and planning process.
Why use it?
It gives older code a documented feature history while clearly marking that the documents describe the code as it exists, not the original intent.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Part of the speckit-product-forge plugin — 31 commands shipped together

Good fit Use it when bringing an existing feature into Product Forge, especially in a codebase that was built without its normal specification and planning process.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/vaiyav/speckit-product-forge/backfill
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.

Clone the repo
git clone --depth 1 https://github.com/VaiYav/speckit-product-forge

Made for: Claude Code.

Or install speckit-product-forge, the plugin that ships this one along with the rest of its 31 commands.

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 speckit.product-forge.backfill

README.md
[![agentmods](https://agentmods.dev/badge/commands/vaiyav/speckit-product-forge/backfill.svg)](https://agentmods.dev/commands/vaiyav/speckit-product-forge/backfill)
Your own site
<a href="https://agentmods.dev/commands/vaiyav/speckit-product-forge/backfill"><img src="https://agentmods.dev/badge/commands/vaiyav/speckit-product-forge/backfill.svg" alt="Measured on agentmods" height="20"></a>
Per session 118 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,417 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00118 $0.02417
Opus 5 $0.00059 $0.01208
Sonnet 5 $0.00024 $0.00483
Haiku 4.5 $0.00012 $0.00242

Measured 8d ago against content hash 21d0614b098a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

speckit.product-forge.backfill 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 8d 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.

commands/backfill.md · 271 lines

How it starts

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

Product Forge — Backfill

You are the Backfill Archaeologist for Product Forge. Your job: take an existing module or directory in the user's codebase and produce a Product Forge feature folder that looks as if the feature had gone through the lifecycle — but clearly marked as reverse-engineered, not original intent.

This is the only Product Forge command allowed to write completed phase statuses without running the underlying phases. It compensates by stamping backfilled: true on the feature and emitting a gaps report describing what the real lifecycle would have required.

Living spec (v1.6, Theme B): backfill also writes initial canonical requirements into specs/<domain>/spec.md (stable REQ-* ids) reverse-engineered from the code, so brownfield features have a living source of truth that future changes can delta against via spec-merge. This directly addresses the "diminishing returns on large/brownfield codebases" critique.

User Input

$ARGUMENTS

Parse for:

  • --source=<path> — required. Path to the module/directory to backfill (e.g. back/src/modules/core/users, apps/web/src/features/checkout).
  • --slug=<feature-slug> — optional. Default: last path component of source.
  • --dry-run — do everything except write files; report what would be produced.

Step 0: Load Config

Read .product-forge/config.yml:

  • project_name, project_tech_stack, project_domain, codebase_path, features_dir.

Step 1: Validate Source

  1. Resolve --source to an absolute path.
  2. Check the path exists and is a directory or file.
  3. Confirm the path is under codebase_path (warn if not).
  4. Derive slug from --slug or last path component (slugify). Place/resolve FEATURE_DIR via the Path-Resolution Contract CREATE rule (resolve(slug), docs/runtime.md §12.2) — flat{features_dir}/<slug>/; domain-nested → prompt for/derive <domain> and use {features_dir}/<domain>/<slug>/.

Read the full file on GitHub · 271 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. 8d ago First seen · 271 lines · 118 tokens per session scan A 21d0614b098a

Subscribe to this mod's changes

speckit.product-forge.backfill is a command published in the GitHub repository VaiYav/speckit-product-forge (23 stars, last pushed 14d ago), licensed MIT. It adds 118 tokens to every session and 2,417 once invoked, about $0.0006 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.