speckit-gaia-plan-close

speckit-gaia-plan-close is a command for coding agents from gaia-react/gaia. It costs 55 tokens per session (2,205 once invoked), scanned A, original, MIT.

A command for closing a completed implementation plan after its pull request has been merged. A pull request is a proposed code change that is reviewed and merged into the project.

In plain words
What is it for?
Closing PLAN-NNN work, handling deferred wiki publication, recording the merge, and cleaning up the finished plan folder.
Why use it?
It helps finish the plan's record, optionally publish its summary to the project wiki, and remove local planning data when appropriate.

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/gaia-react/gaia/plan-close
Clone the repo
git clone --depth 1 https://github.com/gaia-react/gaia

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-gaia-plan-close

README.md
[![agentmods](https://agentmods.dev/badge/commands/gaia-react/gaia/plan-close.svg)](https://agentmods.dev/commands/gaia-react/gaia/plan-close)
Your own site
<a href="https://agentmods.dev/commands/gaia-react/gaia/plan-close"><img src="https://agentmods.dev/badge/commands/gaia-react/gaia/plan-close.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 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,205 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.00055 $0.02205
Opus 5 $0.00028 $0.01103
Sonnet 5 $0.00011 $0.00441
Haiku 4.5 $0.00006 $0.00220

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

Security

Grade A, and why

speckit-gaia-plan-close 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.

.specify/extensions/gaia/commands/plan-close.md · 126 lines

How it starts

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

Plan Close, Lifecycle

Closes a spec-less PLAN-NNN after its implementing PR has merged. Mirrors spec-close, with one difference: a plan has no authoring-time wiki_promote_default decision, so this command makes the promotion ask itself. Three responsibilities:

  1. Drain a deferred wiki-promote, if a prior run of this command accepted the promotion offer but the PR had not yet merged.
  2. Offer wiki-promote, a human ask, gated (no size heuristic, no default-on).
  3. Cold-consolidate and reap the local plan folder, once the wiki side is settled (or declined) and the ledger records the merge.

Invokable manually as /speckit-gaia-plan-close [PLAN-NNN]. Nothing auto-triggers it today; a plan reaches this command only by explicit invocation.

Step 1: Resolve target plan

If $ARGUMENTS matches PLAN-NNN, target that plan.

Otherwise, build the candidate list:

  1. Caches (deferred-drain candidates): ls .gaia/local/cache/wiki-promote/PLAN-*.json 2>/dev/null → PLAN IDs awaiting drain.
  2. Plans (in-flight or pending disposition): ls -d .gaia/local/plans/PLAN-*/ 2>/dev/null → PLAN IDs from folder names.

If exactly one candidate exists, default to it. If multiple, surface via AskUserQuestion:

  • Question: Multiple plans eligible for close. Which one?
  • Header: Plan close
  • Options: one per candidate, labeled <plan_id>, <intent first line> with description noting (awaiting drain) if the cache exists.

If no candidates: report plan-close: no plans to close. and exit.

Step 2: Conditional drain

Test for .gaia/local/cache/wiki-promote/<plan_id>.json.

If the cache exists (a prior run of this command accepted the promotion offer but the PR was unmerged at the time):

  1. Read the cache. Run gh pr list --head "$branch" --state merged --json number,mergedAt,url,body --limit 1.
  2. If still unmerged: report <plan_id>: PR for branch <branch> not yet merged. Re-run after merge. and exit. Do not delete the cache. Do not proceed to Step 4, the plan is not closed yet.
  3. If merged: re-invoke /speckit-gaia-wiki-promote by calling the Skill tool to run that command with the plan ID as its argument, and include the exact literal string drained: true in the invoking message. Wiki-promote's Step 3 detects the merged PR, runs Steps 4-7, and deletes the cache. Wiki-promote's Step 8 chain-back is suppressed by that literal token (this command handles the ledger reconcile and reap itself, in Step 4 below), emit it verbatim, see wiki-promote Step 8 for the guard.

Read the full file on GitHub · 126 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 · 126 lines · 55 tokens per session scan A 545cfec02525

Subscribe to this mod's changes

speckit-gaia-plan-close is a command published in the GitHub repository gaia-react/gaia (22 stars, last pushed 3d ago), licensed MIT. It adds 55 tokens to every session and 2,205 once invoked, about $0.0003 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.