# Spec Preflight Gate

> Gate for briefs citing spec files. Triggers: spawn hygiene, assert-before-spawn, handoff brief, spec path preflight.

- Skill: `etanhey/spec-preflight-gate` (Agent Skill, multi-file: 21 files)
- Install (CLI): `npx skillmds@latest add etanhey/spec-preflight-gate`
- Raw SKILL.md: https://api.skillmd.com/api/skills/etanhey/spec-preflight-gate/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: EtanHey (https://skillmd.com/u/etanhey)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/etanhey/spec-preflight-gate

---


# Spec Preflight Gate

Use this gate before accepting or ending a spawn/dispatch turn that routes work from a spec, plan, or handoff file.

The gate is deterministic and replay-based:

```bash
bun skills/golem-powers/spec-preflight-gate/scripts/spec-preflight-gate-cli.mjs < transcript.jsonl
bun skills/golem-powers/spec-preflight-gate/scripts/spec-preflight-gate-cli.mjs fixture.json
cat transcript.jsonl | bun skills/golem-powers/spec-preflight-gate/scripts/spec-preflight-gate-cli.mjs -
```

Exit codes:

- `0` = PASS
- `3` = FLAG
- `2` = usage / parse error

## Scope

A deterministic gate for spawn/dispatch briefs that reference spec or handoff files.

## Doctrine

For spawn/dispatch briefs:

- Assert every referenced spec/handoff path exists before dispatching from it.
- Brief from grep-patterns and structural invariants, not a load-bearing exact filename.
- Keep seat identity consistent across `name`, `repo`, `launcher`, and "you are ..." prompt text.
- Try user-space setup workarounds before declaring an install blocker human-only.

## Evidence Rule

Clearance comes only from tool calls and tool_result outputs in the current turn:

- Dispatch calls: `spawn_agent`, `Task`, `send_to`, `send_to_agent`, `agent`, and `parallel`.
- Spec checks: earlier `Read`, `cat`, `ls`, `test -f`, `grep`, `stat`, or similar file probes of the exact path.
- Workarounds: visible `--appdir`, `~/Applications`, `$HOME`, `shared.env`, `--user`, `--no-sudo`, or user-space install paths before the blocker output.

Assistant prose can state intent, but it cannot verify a path, clear identity drift, or prove a workaround was attempted.

