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.
npx agentmods add commands/rajconnects/founder-stack/test-gategit clone --depth 1 https://github.com/rajconnects/founder-stackWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00023 | $0.00811 |
| Opus 5 | $0.00012 | $0.00405 |
| Sonnet 5 | $0.00005 | $0.00162 |
| Haiku 4.5 | $0.00002 | $0.00081 |
Grade A, and why
test-gate 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are running the test gate. This gate runs BEFORE implementation — tests establish the contract.
Arguments: $ARGUMENTS
Steps
-
If
$ARGUMENTSis empty, fail fast: "test-gate requires a scope (feature/component name or spec section). Example:/test-gate ThemeToggle." Do not guess. -
Classify the scope. Read the cited brief/spec section. Pick one:
- Bounded — acceptance criteria explicitly enumerate ≤5 test cases AND the contract fits in one paragraph. → main agent writes tests inline (step 3).
- Open — criteria are prose, list >5 cases, or the contract is ambiguous. → delegate to subagent (step 4).
-
(Bounded path.) Read the cited spec section. Write 3–5 behavior/structure tests in the adjacent
*.test.tsx/tests/location. Skip styling assertions — those are/design-gate's job. Runtest_commands.*fromtest_commands.*_cwd. Confirm failures are contract failures. If the test runner itself is broken (JSX runtime, polyfill gap, stale deps), fix it inline — config rot is a tax of doing business, not a workflow step. Report tests + paths. Skip to step 5. -
(Open path.) Launch the
test-authorsubagent with a self-contained prompt:- The scope argument.
- Instruct it to read
.claude/project.jsonfortest_commands,test_roots,design_system.*_spec. - Ask it to write failing tests, run them to confirm the failure mode is a contract failure, and return the standard output. Print the subagent output verbatim.
-
If verdict is CONTRACT_ESTABLISHED (bounded or open), remind: "Tests red by design. Implement against the test file(s). When green, run
/design-gate <scope>." -
If verdict is ERROR (spec has no acceptance criteria), surface it — the user's next step is to tighten the spec, not to write code.
-
Real-corpus gate (if
real_corporais configured in project.json). Synthetic fixtures don't catch the gap between "code accepts the shape we wrote" and "code accepts the shape on disk." For each entry inreal_corpora:- Resolve
validator(file path + named export). Load the validator at test time, not at this gate's runtime. - List every artifact under
path. For each, run it through the validator. - On any failure: surface the file path + the specific validator error. Do NOT auto-fix; the spec or the validator (depending on which is correct) needs to change. This is a contract conversation, not a code task.
- On pass: log
[real-corpus] <name>: <count> validatedso the result is visible in handoff output. This step is the difference between "tests passed against my fixtures" and "the system handles real data." If the project doesn't ship a corpus on disk, omitreal_corporaand skip this step.
- Resolve
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.
- yesterday First seen · 43 lines · 23 tokens per session scan A ff351fc366ed
test-gate is a command published in the GitHub repository rajconnects/founder-stack (2 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 811 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-31.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.