/github-close
Close GitHub issue for completed SpecWeave increment. Posts completion summary with final stats, deliverables, and closes the issue. Links closure in increment metadata.
> /plugin marketplace add anton-abyzov/specweave > /plugin install sw@specweave
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/github-close
Context preview
What this command does when you run it.
Close GitHub issue for completed SpecWeave increment. Posts completion summary with final stats, deliverables, and closes the issue. Links closure in increment metadata.
Command definition
github-close.mddescription: Close GitHub issue for completed SpecWeave increment. Posts completion summary with final stats, deliverables, and closes the issue. Links closure in increment metadata.
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
3. **Posts Completion Comment**
gh issue comment 130 --body "$(cat completion-summary.md)"
4. **Closes GitHub Issue**
gh issue close 130
5. **Updates Metadata**
# .metadata.yaml
github:
issue_number: 130
issue_url: "https://github.com/owner/repo/issues/130"
closed_at: "2025-10-30T17:00:00Z"
closed_by: "specweave-github-plugin"
closing_comment_id: 12345906. **Reports Result**
✅ GitHub issue #130 closed!
Increment 0004 is complete.
Issue: https://github.com/owner/repo/issues/130 (closed)
Configuration
Settings from `.specweave/config.yaml`:
plugins:
settings:
specweave-github:
# Auto-close issues when increment completes
auto_close_issue: true
# Validate before closing
require_validation: true
# Include in closing comment
closing_comment:
include_stats: true
include_deliverables: true
include_file_changes: true
include_next_steps: trueOutput Format
Success
🔒 Closing GitHub issue for increment 0004...
Validation:
✓ All tasks completed (48/48)
✓ All tests passing (127/127)
✓ PM gates passed
✓ Documentation updated
Generating completion summary...
✓ Final stats calculated
✓ Deliverables listed
✓ File changes summarized
Closing issue...
✓ Posted completion comment (ID: 1234590)
✓ Issue #130 closed
✓ Metadata updated
✅ GitHub Issue Closed!
Issue #130: https://github.com/owner/repo/issues/130
Status: Closed
Closed at: 2025-10-30 17:00:00
Increment 0004 is complete! 🎉
Validation Failure
❌ Cannot close issue: Validation failed
Increment 0004 is not yet complete:
Issues:
✗ Tasks: 45/48 completed (3 remaining)
- T-046: Update documentation
- T-047: Run E2E tests
- T-048: Final review
✗ Tests: 2 tests failing
- TC-105: Plugin unload test
- TC-127: E2E sync test
✗ PM Gates: Not run yet
- Run sw:done 0004 first
Fix these issues, then retry:
sw:github:close-issue 0004
Or force close (not recommended):
sw:github:close-issue 0004 --force
Requirements
- GitHub CLI (`gh`) installed and authenticated
- Increment marked as complete (via `sw:done`)
- Valid GitHub issue exists for increment
Error Handling
**Increment not complete**:
❌ Error: Increment 0004 is not complete
Status: in_progress (should be: completed)
Complete the increment fi
Read more
description: Close GitHub issue for completed SpecWeave increment. Posts completion summary with final stats, deliverables, and closes the issue. Links closure in increment metadata.
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
3. **Posts Completion Comment**
gh issue comment 130 --body "$(cat completion-summary.md)"
4. **Closes GitHub Issue**
gh issue close 130
5. **Updates Metadata**
# .metadata.yaml
github:
issue_number: 130
issue_url: "https://github.com/owner/repo/issues/130"
closed_at: "2025-10-30T17:00:00Z"
closed_by: "specweave-github-plugin"
closing_comment_id: 12345906. **Reports Result**
✅ GitHub issue #130 closed! Increment 0004 is complete. Issue: https://github.com/owner/repo/issues/130 (closed)
Configuration
Settings from `.specweave/config.yaml`:
plugins:
settings:
specweave-github:
# Auto-close issues when increment completes
auto_close_issue: true
# Validate before closing
require_validation: true
# Include in closing comment
closing_comment:
include_stats: true
include_deliverables: true
include_file_changes: true
include_next_steps: trueOutput Format
Success
🔒 Closing GitHub issue for increment 0004... Validation: ✓ All tasks completed (48/48) ✓ All tests passing (127/127) ✓ PM gates passed ✓ Documentation updated Generating completion summary... ✓ Final stats calculated ✓ Deliverables listed ✓ File changes summarized Closing issue... ✓ Posted completion comment (ID: 1234590) ✓ Issue #130 closed ✓ Metadata updated ✅ GitHub Issue Closed! Issue #130: https://github.com/owner/repo/issues/130 Status: Closed Closed at: 2025-10-30 17:00:00 Increment 0004 is complete! 🎉
Validation Failure
❌ Cannot close issue: Validation failed Increment 0004 is not yet complete: Issues: ✗ Tasks: 45/48 completed (3 remaining) - T-046: Update documentation - T-047: Run E2E tests - T-048: Final review ✗ Tests: 2 tests failing - TC-105: Plugin unload test - TC-127: E2E sync test ✗ PM Gates: Not run yet - Run sw:done 0004 first Fix these issues, then retry: sw:github:close-issue 0004 Or force close (not recommended): sw:github:close-issue 0004 --force
Requirements
- GitHub CLI (`gh`) installed and authenticated
- Increment marked as complete (via `sw:done`)
- Valid GitHub issue exists for increment
Error Handling
**Increment not complete**:
❌ Error: Increment 0004 is not complete Status: in_progress (should be: completed) Complete the increment fi
Spec-first AI development: describe a feature → AI creates spec + plan + tasks, builds autonomously, syncs to GitHub/JIRA. Domain-expert skills for PM, Architect, Frontend, QA learn your patterns permanently. Claude Code, Codex, Cursor, Copilot & more.
Repo: anton-abyzov/specweave
Other commands on specweave.
- /abandon
Abandon an incomplete increment (requirements changed, obsolete)
Open command - /ado-cleanup-duplicates
Clean up duplicate Azure DevOps work items for a Feature. Finds work items with duplicate titles and closes all except the first created item.
Open command - /ado-clone
Clone Azure DevOps repositories to local workspace. Use after init if cloning was skipped, or to add repos later.
Open command - /ado-close
Close Azure DevOps work item when increment complete
Open command - /ado-create
Create Azure DevOps work item from SpecWeave increment
Open command - /ado-import-areas
Import Azure DevOps area paths from a project and map them to SpecWeave projects. Creates 2-level directory structure with area path-based organization.
Open command

