gate

A browser-based decision page for reviewing research choices before development starts. It checks the research input, builds a themed page, and waits for the user to submit a decision.

In plain words
What is it for?
Use it to review research options in a browser, choose how each option should guide the work, and submit the decisions for later build steps.
Why use it?
It prevents development from proceeding with missing or invalid research and turns a person's choices into a clear project contract.

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/rchase999/aidd/gate
Clone the repo
git clone --depth 1 https://github.com/rchase999/aidd
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 693 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.00693
Opus 5 $0.00008 $0.00347
Sonnet 5 $0.00003 $0.00139
Haiku 4.5 $0.00002 $0.00069

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

Security

Grade A, and why

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

aidd/commands/gate.md · 70 lines

How it starts

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

The Research Gate

Load the decision-gate skill for the page contract and theming rules.

Arguments: $ARGUMENTS

If --ingest <file> was passed

The user submitted from a page opened without the server. Skip straight to:

node "${CLAUDE_PLUGIN_ROOT}/scripts/aidd.mjs" ingest "<file>"

Then continue at After the gate passes below.

Otherwise

1. Check the inputs

node "${CLAUDE_PLUGIN_ROOT}/scripts/aidd.mjs" validate

If options.json is missing or invalid, stop — the gate cannot be honest about research that isn't there. Go back to /aidd:research.

2. Build the page

node "${CLAUDE_PLUGIN_ROOT}/scripts/aidd.mjs" scaffold-gate

That drops the working template at .aidd/02-research/gate.html.

Now theme it for this project — dispatch the aidd-gate-designer agent, giving it the project brief and options.json. Everything above the THEME LAYER ENDS marker in the stylesheet is its to rewrite, as is the hero markup and the theme block in options.json. The mechanism below that marker is not.

The contract you must not break:

  • the page reads window.AIDD_OPTIONS (the server injects it — never inline your own copy)
  • the page calls window.AIDD.submit(payload) with the documented payload shape
  • <!-- AIDD:INJECT --> stays in <head>
  • every option keeps three stance buttons, its pros, its cons, and its source links

3. Serve it and wait

Run in the background — the process exits the moment the user submits, which is how you find out:

node "${CLAUDE_PLUGIN_ROOT}/scripts/gate-server.mjs" --timeout 90

Tell the user the browser is opening and that nothing is sent back until they press Submit decisions. Then stop and wait. Do not write product code, do not "get a head start on scaffolding", do not guess which options they will pick. The gate is a gate.

Exit codes: 0 submitted · 2 timed out or interrupted · 3 bad inputs.

If it times out, say so plainly and offer to re-serve. A timed-out gate is not a passed gate.

Read the full file on GitHub · 70 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 · 70 lines · 15 tokens per session scan A 9a4fb2a9d258

Subscribe to this mod's changes

gate is a command published in the GitHub repository rchase999/aidd (2 stars, last pushed 23d ago), licensed MIT. It adds 15 tokens to every session and 693 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.