github-close

A command that closes the GitHub issue linked to a completed SpecWeave increment, a tracked unit of development work, and posts a completion summary.

In plain words
What is it for?
Use it to sync the latest living documents, close or reopen a linked issue, and optionally provide a custom closing comment.
Why use it?
It prevents the issue from being closed with outdated requirements, task status, or acceptance-criteria checkboxes by syncing the project documents first.

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/anton-abyzov/specweave/github-close
Clone the repo
git clone --depth 1 https://github.com/anton-abyzov/specweave
Per session 32 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,579 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.00032 $0.02579
Opus 5 $0.00016 $0.01290
Sonnet 5 $0.00006 $0.00516
Haiku 4.5 $0.00003 $0.00258

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

Security

Grade A, and why

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

plugins/specweave/commands/github-close.md · 441 lines

How it starts

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

Close GitHub Issue for Completed Increment

Close the GitHub issue associated with a completed SpecWeave increment.

⛔ MANDATORY: Sync Living Docs BEFORE Closing

GitHub issue content is generated FROM living docs. If living docs are stale, the closing summary will have outdated information.

You MUST run sw:sync-specs BEFORE closing (unless using sw:sync-progress):

# STEP 1: Ensure living docs reflect final state
sw:sync-specs <increment-id>

# STEP 2: Then close GitHub issue
sw-github:close <increment-id>

Why?

  • Closing comment includes final stats from living docs
  • User story completion status read from living docs
  • AC checkboxes reflect living docs state

Note: sw:done and sw:sync-progress call sync-specs automatically.


Usage: sw-github:close <increment-id>

sw:github:close-issue <increment-id> [options]

Arguments

  • increment-id: Increment ID (e.g., 0004 or 0004-plugin-architecture)

Options

  • --force: Force close even if increment not marked complete
  • --comment: Custom closing comment (default: auto-generated summary)
  • --reopen: Reopen a previously closed issue
  • --skip-validation: Skip PM gate validation

Examples

# Basic usage (auto-generates completion summary)
sw:github:close-issue 0004

# With custom comment
sw:github:close-issue 0004 --comment "Merged to main, deploying to production"

# Force close (skip validation)
sw:github:close-issue 0004 --force

# Reopen closed issue
sw:github:close-issue 0004 --reopen

What This Command Does

  1. Validates Increment Completion

    • All tasks completed (48/48)
    • All tests passing
    • PM gates passed (from sw:done)
    • Documentation updated
  2. Generates Completion Summary

    ✅ **Increment Completed**
    
    This increment has been successfully completed and is ready for release.
    
    ## Final Stats
    
    - **Tasks**: 48/48 completed (100%)
    - **Duration**: 4 weeks (2025-10-01 → 2025-10-30)
    - **Time Tracked**: 240 hours (estimated) / 235 hours (actual)
    - **Test Coverage**: 127 test cases, 95% coverage
    - **Priority**: P1
    
    ## Deliverables
    
    ✅ Plugin architecture implemented
    ✅ 15 plugins migrated (github, kubernetes, frontend-stack, ...)
    ✅ Documentation updated (ADRs, user guides, API docs)
    ✅ E2E tests passing (Playwright suite)
    ✅ Integration tests passing (Jest suite)
    
    ## Key Changes
    
    - Added plugin system with loader, manager, detector
    - Implemented 4 adapters (Claude, Cursor, Copilot, Generic)
    - Created 15 domain-specific plugins
    - Updated all documentation
    - Achieved 80% test coverage
    
    ## Files Changed
    
    - 48 files modified
    - +12,500 lines added
    - -3,200 lines removed
    - Net: +9,300 lines
    
    ## Related
    
    - **Spec**: [spec.md](https://github.com/owner/repo/blob/main/.specweave/increments/0004/spec.md)
    - **Plan**: [plan.md](https://github.com/owner/repo/blob/main/.specweave/increments/0004/plan.md)
    - **Tests**: [tests.md](https://github.com/owner/repo/blob/main/.specweave/increments/0004/tests.md)
    
    ## Next Steps
    
    - Deploy to production (tracked in #135)
    - Monitor for issues (see runbook)
    - Plan next increment (0005-user-authentication)
    
    ---
    
    🎉 Thank you to all contributors!
    
    🤖 Auto-closed by SpecWeave at 2025-10-30 17:00:00
    

Read the full file on GitHub · 441 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 · 441 lines · 32 tokens per session scan A 4d61bc3f42ba

Subscribe to this mod's changes

github-close is a command published in the GitHub repository anton-abyzov/specweave (159 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 2,579 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.