preflight

A pre-release checker for a feature plan in SpecSwarm, a system that organizes software work through written specifications and project memory files.

In plain words
What is it for?
Use it before implementing a planned feature to check package versions, memory files, specification headings, search commands, and cited technical claims.
Why use it?
It finds mismatched package versions, missing references, invalid specification links, unclear search patterns, heading mistakes, and unsupported assumptions before implementation.

Command

Part of the ss plugin — 10 skills, 34 commands, 6 agents, 4 hooks 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/martybonacci/specswarm/preflight
Clone the repo
git clone --depth 1 https://github.com/MartyBonacci/specswarm

Or install ss, the plugin that ships this one along with the rest of its 10 skills, 34 commands, 6 agents, 4 hooks.

Per session 48 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,469 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.00048 $0.01469
Opus 5 $0.00024 $0.00734
Sonnet 5 $0.00010 $0.00294
Haiku 4.5 $0.00005 $0.00147

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

Security

Grade A, and why

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

plugins/ss/commands/preflight.md · 112 lines

How it starts

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

SpecSwarm Preflight

Runs 6 deterministic checks against the current feature's plan.md and surfaces issues that would otherwise be caught by manual review (or worse, slip through to /ss:implement).

Project-agnostic — every check discovers project context via existing SpecSwarm infrastructure (.specswarm/references.md, lockfiles, git root). No project-specific configuration required.

Run Preflight

PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
RUNNER="${PLUGIN_DIR}/lib/preflight/run.sh"

if [ ! -x "$RUNNER" ]; then
  echo "❌ Preflight runner not found or not executable: $RUNNER"
  exit 2
fi

"$RUNNER" "$@"

Checks Performed

Check What it catches Skip condition (clean PASS)
version-currency Hallucinated, typo'd, or yanked package versions No package manager / lockfile detected
memory-coverage References to missing memory files; orphan files not in MEMORY.md No memory dirs declared in references.md
spec-section-existence §X.Y refs that don't resolve to any spec corpus heading No spec corpus declared in references.md
grep-word-boundary Short literal grep patterns prone to false positives (none — always applicable)
heading-fidelity Quoted headings whose text doesn't match the source No spec corpus declared in references.md
assumptions-provenance (v7.13.0) Spec ## Assumptions entries without a taste:/corpus:/codebase:/convention: citation or valid status — an uncited assumption is a guess, not a reviewable ledger entry No spec.md sibling, or spec has no ## Assumptions section (pre-v7.13 spec)

Each check independently emits PASS, WARN, or FAIL. The overall exit code is the worst result:

  • 0 — all PASS (or a check skipped because its subsystem isn't configured)
  • 1 — at least one WARN, no FAIL
  • 2 — at least one FAIL (/ss:implement should not run until resolved)

WARN-on-zero (v7.11.0): A check whose subsystem is configured but which then extracts zero items from plan.md (0 version pins, 0 memory refs, 0 § refs, 0 grep invocations, 0 quoted headings) now emits a WARN rather than a silent PASS. A green check should mean "I verified N>0 items," not "I found nothing to check." A 0/0 PASS previously masked real silent failures — e.g. memory citations written in a `backtick` style the extractor didn't recognise. WARN is non-blocking; it asks "is this expected?" instead of gating /ss:implement. The pure not-configured case (no package manager, no declared corpus/memory dirs) stays a clean PASS-skip, so docs-only or unconfigured projects aren't spammed.

Read the full file on GitHub · 112 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 · 112 lines · 48 tokens per session scan A b4f96b1a5d7c

Subscribe to this mod's changes

preflight is a command published in the GitHub repository MartyBonacci/specswarm (65 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 1,469 once invoked, about $0.0002 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.