[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C2TTBDBWSNMDMP7WJYJA40":3,"skill-same:01M6C2TTBDBWSNMDMP7WJYJA40":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":64,"ownerHtmlUrl":65,"ownerBlogUrl":66,"ownerDescription":67,"updatedAt":68,"install":69,"resources":82},"01M6C2TTBDBWSNMDMP7WJYJA40","issue-close",null,"Mark an issue as complete with comprehensive summary and verification","jmagly\u002Faiwg","jmagly","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1159087?v=4","01M6C10AK8N2WCSQN11FYGTJWN","Joseph Magly","01M6C10AQ8A2RMED1Y1BSVY7NF",229,"MIT","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fcodex-sdlc\u002Fskills\u002Fissue-close\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"close","issue","issue close","read","number","mark","complete","as","project","efficiency","summary","management","MCP","effect","haiku","project-management","gh","text","Bash","verify","verification","artifacts","git","2026-11-10 10:12:30",false,"---\nnamespace: aiwg\nname: issue-close\nplatforms: [all]\ndescription: Mark an issue as complete with comprehensive summary and verification\ncommandHint:\n  argumentHint: \u003Cissue_number> [--reason \u003Ctext>] [--no-verify] [--link-artifacts]\n  allowedTools: Bash(git *, gh *), Bash(aiwg effect *), Read, Glob, mcp__gitea__*\n  model: haiku\n  category: project-management\n  modelRole: efficiency\n  modelTier: economy\n---\n\n# Issue Close\n\n## Semantic Label Contract (#1789)\n\nBefore closure, resolve lifecycle, blocked, review\u002Fapproval, and\nhuman-interaction roles from `.aiwg\u002Faiwg.config` `issues.labels` for the\nconfigured tracker. Do not close while a resolved role declares\n`blocks_automation: true` and its `resume_when` condition is unsatisfied.\nRemove or transition satisfied transient roles while preserving unrelated\nlabels. Report unavailable configured labels without provisioning them.\nNever provision tracker labels during closure.\n\nYou are an Issue Management Specialist responsible for properly closing issues with comprehensive completion summaries and verification.\n\n## Your Task\n\nClose an issue with a complete summary including:\n1. Work completed\n2. Artifacts delivered\n3. Verification checklist\n4. Related commits and PRs\n5. Next steps or follow-up items\n\n## Input Modes\n\n### Basic Close\n```bash\n\u002Fissue-close 17\n```\nCloses issue #17 with auto-generated summary.\n\n### Close with Reason\n```bash\n\u002Fissue-close 17 --reason \"Implemented in commit abc123, all tests passing\"\n```\nCloses with custom reason\u002Fsummary.\n\n### Close Without Verification\n```bash\n\u002Fissue-close 17 --no-verify\n```\nSkips verification checks (use with caution).\n\n### Close and Link Artifacts\n```bash\n\u002Fissue-close 17 --link-artifacts\n```\nAutomatically finds and links related AIWG artifacts.\n\n## Workflow\n\n### Step 1: Validate Issue\n\n**Check Issue Exists and is Open**:\n\n```bash\n# GitHub\ngh issue view {issue_number}\n\n# Gitea (use MCP)\n# Query issue via mcp__gitea__ tools\n```\n\n**Validation Checks**:\n- [ ] Issue exists\n- [ ] Issue is currently open\n- [ ] User has permission to close\n- [ ] No blocking dependencies (check for \"Blocked by\" labels or comments)\n\n**If validation fails**:\n```markdown\nError: Cannot close issue #{number}\nReason: {validation_failure_reason}\n\nSuggestions:\n- Verify issue number is correct\n- Check that issue is not already closed\n- Ensure you have permission to close issues\n- Resolve blocking dependencies first\n```\n\n### Step 2: Gather Issue Context\n\n**Collect Issue Details**:\n- Issue title\n- Issue body\u002Fdescription\n- Labels\n- Assignees\n- Milestone\n- Created date\n- Comments (extract important info)\n\n**Extract Acceptance Criteria**:\n\nParse issue body for checklist items:\n\n```markdown\n### Acceptance Criteria\n- [x] Feature implemented\n- [x] Tests added\n- [ ] Documentation updated  ← INCOMPLETE\n```\n\n**If acceptance criteria incomplete**:\n```markdown\nWarning: Not all acceptance criteria are checked.\n\nIncomplete items:\n- [ ] Documentation updated\n\nProceed with closing? (--no-verify to skip this check)\n```\n\n### Step 3: Find Related Work\n\n**Scan Recent Commits**:\n\n```bash\n# Search commit messages for issue reference\ngit log --all --grep=\"#{issue_number}\" --oneline\n\n# Also check variations\ngit log --all --grep=\"issue.*#{issue_number}\" --oneline\ngit log --all --grep=\"[#]#{issue_number}\" --oneline\n```\n\n**Scan AIWG Artifacts**:\n\n```bash\n# Use grep to find references\ngrep -r \"#{issue_number}\" .aiwg\u002F\ngrep -r \"@issues\u002F{issue_number}\" .aiwg\u002F\n```\n\n**Scan Code References**:\n\n```bash\n# Find TODOs and issue references in code\ngrep -r \"TODO.*#{issue_number}\" src\u002F\ngrep -r \"@issue #{issue_number}\" src\u002F\ngrep -r \"Issue #{issue_number}\" src\u002F\n```\n\n**Find Related PRs**:\n\n```bash\n# GitHub\ngh pr list --search \"#{issue_number}\" --state all\n\n# Gitea (use MCP to search)\n```\n\n### Step 4: Verify Completion\n\n**Verification Checklist** (unless --no-verify):\n\n```markdown\n## Pre-Close Verification\n\n### Code Changes\n- [ ] Commits found referencing this issue\n- [ ] Code review completed (check PR status)\n- [ ] No open PRs still referencing this issue\n\n### Testing\n- [ ] Tests added for new functionality\n- [ ] All tests passing (check CI status)\n- [ ] No test failures in recent runs\n\n### Documentation\n- [ ] Code documentation updated\n- [ ] User documentation updated (if user-facing)\n- [ ] AIWG artifacts updated (requirements, architecture, etc.)\n\n### Quality\n- [ ] No new lint errors introduced\n- [ ] Code coverage maintained or improved\n- [ ] No security vulnerabilities introduced\n\n### Acceptance Criteria\n- [ ] All acceptance criteria met (from issue template)\n- [ ] Definition of Done satisfied\n\n### Cleanup\n- [ ] No TODOs left in code referencing this issue\n- [ ] No FIXME comments unresolved\n- [ ] Feature flags removed (if temporary)\n```\n\n**Auto-Check Where Possible**:\n\n```bash\n# Check CI status of recent commits\ngh run list --limit 5 --json conclusion\n\n# Check for remaining TODOs\ngrep -r \"TODO.*#${issue_number}\" src\u002F test\u002F\n\n# Check test coverage (if available)\nnpm test -- --coverage\n```\n\n**Report Verification Results**:\n\n```markdown\n## Verification Results\n\n✅ Code changes: 3 commits found\n✅ Code review: PR #45 merged\n✅ Tests: All passing (15\u002F15)\n⚠️  Documentation: AIWG artifacts not updated\n❌ TODOs: 2 TODO comments still reference this issue\n\nBlockers:\n- Resolve remaining TODOs before closing\n- Update .aiwg\u002Frequirements\u002Fuse-cases\u002FUC-017.md\n\nProceed anyway? Use --no-verify to skip checks.\n```\n\n### Step 5: Generate Completion Summary\n\nUsing `task-completed.md` template, generate comprehensive summary:\n\n```markdown\n## Task Completed\n\n**Status**: Completed\n**Closed by**: {user}\n**Completion date**: {timestamp}\n**Time to resolution**: {days} days\n\n## Original Request\n\n{issue_title}\n\n{issue_body_summary}\n\n## Summary of Work\n\n{auto_generated_summary_from_commits_and_artifacts}\n\n## Deliverables\n\n### Code Changes\n- Commits: {count}\n  - {sha1}: {message}\n  - {sha2}: {message}\n- Pull Requests: {count}\n  - PR #{number}: {title} (Merged: {date})\n\n### Artifacts Created\u002FUpdated\n- `{artifact_path}` - {description}\n- `{artifact_path}` - {description}\n\n### Tests Added\n- `{test_path}` - {description}\n- Coverage: {percentage}% ({lines} lines covered)\n\n### Documentation Updated\n- `{doc_path}` - {description}\n\n## Implementation Details\n\n### Files Modified\n- `{file_path}` - {change_summary}\n- `{file_path}` - {change_summary}\n\nTotal changes: +{lines_added} -{lines_removed} across {files_count} files\n\n### Key Decisions\n\n{if_any_ADRs_or_design_decisions}\n- {decision_1}: {rationale}\n- {decision_2}: {rationale}\n\n## Verification\n\n- [x] All acceptance criteria met\n- [x] Tests passing ({test_count} tests)\n- [x] Code reviewed and approved\n- [x] Documentation updated\n- [x] CI\u002FCD pipeline passing\n- [x] No outstanding TODOs\n- [x] Ready for deployment\n\n## Related Items\n\n- Closes: #{issue_number}\n- Related PRs: #{pr_numbers}\n- Related issues: #{related_issue_numbers}\n- Artifacts: {artifact_paths}\n- Commits: {commit_range}\n\n## Impact Assessment\n\n### User Impact\n- {impact_description}\n\n### System Impact\n- Performance: {performance_changes}\n- Security: {security_improvements}\n- Dependencies: {dependency_updates}\n\n## Deployment Notes\n\n{if_applicable}\n- Deployment required: {yes\u002Fno}\n- Migration needed: {yes\u002Fno}\n- Feature flags: {enabled\u002Fdisabled}\n- Rollback plan: {description}\n\n## Follow-Up Items\n\n{if_applicable}\n### Future Enhancements\n- {enhancement_1} - Consider for future milestone\n- {enhancement_2} - Tracked in #{issue_number}\n\n### Technical Debt\n- {debt_item_1} - Address in #{issue_number}\n\n### Monitoring\n- Watch for: {metrics_to_monitor}\n- Alert thresholds: {thresholds}\n\n## Next Steps\n\n1. {next_step_1}\n2. {next_step_2}\n3. {next_step_3}\n\n---\n\n*This issue has been completed and verified. All acceptance criteria met and tests passing. Closing as complete.*\n```\n\n### Step 6: Close Issue with Summary\n\n**Guard against a duplicate closing comment (#2722).** Re-entry after a crash\nmust not post the summary twice. Record both effects in the effect ledger with\nthe issue on the configured tracker as the target\n(`gitea:\u003Cowner>\u002F\u003Crepo>#\u003CN>` or `github:\u003Cowner>\u002F\u003Crepo>#\u003CN>`):\n\n```bash\nCOMMENT=(--kind tracker.comment --target \"gitea:{owner}\u002F{repo}#{number}\" --issue {number} --action close-summary)\nCLOSE=(--kind tracker.issue.closed --target \"gitea:{owner}\u002F{repo}#{number}\" --issue {number} --action close)\nEFFECT_ID=$(aiwg effect id \"${COMMENT[@]}\" --format text)\n# Append to completion-summary.md:  \u003C!-- aiwg-effect: $EFFECT_ID -->\naiwg effect lookup \"${COMMENT[@]}\"\n```\n\n- `lookup` exit `0`: the closing comment is already recorded. Skip the comment\n  and continue with the close.\n- `lookup` exit `4` (an intent with no outcome): run\n  `aiwg effect reconcile \"${COMMENT[@]}\"`. Exit `0` means the marker comment is\n  already on the thread; skip the comment. Exit `3` means it is absent; post\n  it. Exit `4` means the tracker could not be read; stop and report a blocker.\n- `lookup` exit `3`: record the intent, then post:\n  `aiwg effect intent \"${COMMENT[@]}\" --payload-file completion-summary.md`.\n\nAfter posting, record the comment and the closure:\n\n```bash\naiwg effect record \"${COMMENT[@]}\" --payload-file completion-summary.md --verify\n# ... close the issue (below) ...\naiwg effect record \"${CLOSE[@]}\" --payload-digest sha256:\u003Cdigest-of-completion-summary> --verify\n```\n\n`record --verify` exits `0` only when the tracker shows the marker comment by\nthe pinned tracker actor, or the issue state `closed`. Exit `4` means the\ntracker could not be read: report it and never claim the issue closed.\n\n**GitHub**:\n\n```bash\n# Close issue with comment\ngh issue close {issue_number} --comment \"{completion_summary}\"\n\n# Add labels if applicable\ngh issue edit {issue_number} --add-label \"completed\"\n```\n\n**Gitea**:\n\n```bash\n# Add completion comment first\nmcp__gitea__create_issue_comment \\\n  --owner {owner} \\\n  --repo {repo} \\\n  --issue_number {number} \\\n  --body \"{completion_summary}\"\n\n# Then close issue\nmcp__gitea__edit_issue \\\n  --owner {owner} \\\n  --repo {repo} \\\n  --issue_number {number} \\\n  --state closed\n```\n\n### Step 7: Update Related Issues\n\n**If this issue unblocks others**:\n\n```bash\n# Find issues blocked by this one\ngh issue list --search \"blocked by #{issue_number}\"\n\n# Add unblocking comment to each\nfor blocked_issue in ${blocked_issues}; do\n  gh issue comment ${blocked_issue} --body \"✅ Unblocked: Issue #{issue_number} has been resolved.\"\ndone\n```\n\n**If this closes a milestone**:\n\n```bash\n# Check milestone status\ngh issue list --milestone \"{milestone}\" --state open\n\n# If all issues closed\ngh api repos\u002F{owner}\u002F{repo}\u002Fmilestones\u002F{milestone_id} \\\n  -X PATCH \\\n  -f state=closed \\\n  -f description=\"Completed {date}: All issues resolved\"\n```\n\n### Step 8: Generate Closure Report\n\n```markdown\n## Issue Closure Report\n\n**Issue**: #{issue_number} - {title}\n**Closed by**: {user}\n**Closed at**: {timestamp}\n**Resolution time**: {duration}\n\n### Summary\n\n{brief_summary}\n\n### Work Completed\n\n- Commits: {count}\n- PRs merged: {count}\n- Files changed: {count}\n- Tests added: {count}\n- Artifacts updated: {count}\n\n### Verification\n\nAll pre-close checks passed:\n- ✅ Acceptance criteria met\n- ✅ Tests passing\n- ✅ Code reviewed\n- ✅ Documentation updated\n- ✅ CI\u002FCD passing\n\n### Related Updates\n\n{if_applicable}\n- Unblocked issues: #{numbers}\n- Milestone completed: {milestone_name}\n- Follow-up issues created: #{numbers}\n\n### Links\n\n- Issue: {issue_url}\n- PR: {pr_url}\n- Commits: {commit_range_url}\n- Artifacts: {artifact_paths}\n\n---\n\nIssue #{issue_number} successfully closed with verification complete.\n```\n\n## Advanced Features\n\n### Automatic Follow-Up Issue Creation\n\nIf incomplete items detected:\n\n```markdown\n## Follow-Up Items Detected\n\nCreating follow-up issues for:\n\n1. Documentation improvements\n   - Created issue #{new_number}: \"Update API documentation for feature X\"\n\n2. Technical debt\n   - Created issue #{new_number}: \"Refactor auth logic for better testability\"\n\n3. Future enhancements\n   - Created issue #{new_number}: \"Add support for OAuth providers\"\n\nThese items were moved to new issues to allow closing #{original_issue}.\n```\n\n### Milestone Auto-Complete\n\nIf this is the last issue in a milestone:\n\n```markdown\n## Milestone Completed! ?\n\nIssue #{issue_number} was the last open issue in milestone \"{milestone}\".\n\nMilestone summary:\n- Total issues: {count}\n- Completed: {count}\n- Duration: {start_date} - {end_date}\n- Success rate: 100%\n\nThe milestone has been automatically marked as complete.\n```\n\n### Artifact Traceability Update\n\nUpdate AIWG artifacts with completion status:\n\n```markdown\n## References\n\n- Implements: @.aiwg\u002Frequirements\u002FUC-017.md ✅ Completed\n- Related issue: #17 (Closed: {date})\n- Implementation: @$AIWG_ROOT\u002Fsrc\u002Fissue-sync.ts\n- Tests: @test\u002Funit\u002Fissue-sync.test.ts\n```\n\n### Changelog Generation\n\nAdd entry to CHANGELOG.md:\n\n```markdown\n### Issue #17 - Issue sync automation (Closed: 2025-01-13)\n\n- Implemented automatic issue synchronization from commits\n- Added issue comment templates\n- Created \u002Fissue-sync, \u002Fissue-close, \u002Fissue-comment commands\n- Test coverage: 85%\n- PRs: #45, #46\n\nCloses #17\n```\n\n## Configuration\n\n### `.aiwg\u002Fconfig.yaml`\n\n```yaml\nissue_close:\n  verify_before_close: true\n  require_all_acceptance_criteria: true\n  auto_link_artifacts: true\n  create_follow_ups: true\n  update_changelog: true\n  minimum_time_open: 1h  # Prevent immediate close\n  labels:\n    on_close: [\"completed\", \"verified\"]\n    on_skip_verify: [\"closed-unverified\"]\n```\n\n## Error Handling\n\n### Issue Already Closed\n\n```markdown\nError: Issue #{number} is already closed.\n\nStatus: Closed {date} by {user}\nResolution: {previous_summary}\n\nNo action needed.\n```\n\n### Incomplete Verification\n\n```markdown\nError: Pre-close verification failed.\n\nFailed checks:\n- ❌ Tests: 2 tests failing\n- ❌ TODOs: 3 TODO comments unresolved\n- ⚠️  Documentation: No AIWG artifacts updated\n\nOptions:\n1. Fix failing checks and try again\n2. Use --no-verify to skip checks (not recommended)\n3. Document why checks can be skipped\n```\n\n### Permission Denied\n\n```markdown\nError: Cannot close issue #{number} - insufficient permissions.\n\nRequired permission: triage or maintain role\n\nSuggestions:\n- Request permission from repository maintainer\n- Have maintainer close the issue\n- Use GitHub\u002FGitea UI to close manually\n```\n\n## Best Practices\n\n### When to Close\n\n**Close immediately when**:\n- All acceptance criteria met\n- Tests passing\n- Code reviewed and merged\n- Documentation complete\n\n**Delay closing when**:\n- Awaiting deployment verification\n- Monitoring for issues in production\n- Need user acceptance testing\n- Dependent work not complete\n\n### Creating Follow-Ups\n\n**Good follow-up issues**:\n```markdown\nTitle: Improve error handling in issue sync (follow-up to #17)\n\nDescription:\nWhile implementing #17, we identified opportunities to improve error handling:\n- Add retry logic for API failures\n- Better error messages for invalid issue references\n- Graceful degradation when API unavailable\n\nThis is a follow-up enhancement, not blocking #17 completion.\n\nLabels: enhancement, technical-debt\n```\n\n### Closure Comments\n\n**Comprehensive**:\n```markdown\n✅ All acceptance criteria met\n✅ 15 tests added, all passing\n✅ Code reviewed and approved in PR #45\n✅ Documentation updated in .aiwg\u002Frequirements\u002F\n\nReady for deployment to production.\n```\n\n**Concise**:\n```markdown\nImplemented in commit abc123. Tests passing. Docs updated. Ready to deploy.\n```\n\n## References\n\n- Template: `@$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsdlc-complete\u002Ftemplates\u002Fissue-comments\u002Ftask-completed.md`\n- Related: @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsdlc-complete\u002Fcommands\u002Fissue-sync.md, @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsdlc-complete\u002Fcommands\u002Fissue-comment.md\n- MCP tools: Gitea issue management\n- GitHub CLI: `gh issue close`\n\n## Success Criteria\n\nThis command succeeds when:\n\n- [x] Issue is successfully closed\n- [x] Comprehensive completion summary added\n- [x] All verification checks passed (unless --no-verify)\n- [x] Related issues updated (if blocking others)\n- [x] Artifacts linked and updated\n- [x] Follow-up issues created (if needed)\n- [x] Changelog updated (if configured)\n- [x] Clear closure report generated\n","# Issue Close\n\n## Semantic Label Contract (#1789)\n\nBefore closure, resolve lifecycle, blocked, review\u002Fapproval, and\nhuman-interaction roles from `.aiwg\u002Faiwg.config` `issues.labels` for the\nconfigured tracker. Do not close while a resolved role declares\n`blocks_automation: true` and its `resume_when` condition is unsatisfied.\nRemove or transition satisfied transient roles while preserving unrelated\nlabels. Report unavailable configured labels without provisioning them.\nNever provision tracker labels during closure.\n\nYou are an Issue Management Specialist responsible for properly closing issues with comprehensive completion summaries and verification.\n\n## Your Task\n\nClose an issue with a complete summary including:\n1. Work completed\n2. Artifacts delivered\n3. Verification checklist\n4. Related commits and PRs\n5. Next steps or follow-up items\n\n## Input Modes\n\n### Basic Close\n```bash\n\u002Fissue-close 17\n```\nCloses issue #17 with auto-generated summary.\n\n### Close with Reason\n```bash\n\u002Fissue-close 17 --reason \"Implemented in commit abc123, all tests passing\"\n```\nCloses with custom reason\u002Fsummary.\n\n### Close Without Verification\n```bash\n\u002Fissue-close 17 --no-verify\n```\nSkips verification checks (use with caution).\n\n### Close and Link Artifacts\n```bash\n\u002Fissue-close 17 --link-artifacts\n```\nAutomatically finds and links related AIWG artifacts.\n\n## Workflow\n\n### Step 1: Validate Issue\n\n**Check Issue Exists and is Open**:\n\n```bash\n# GitHub\ngh issue view {issue_number}\n\n# Gitea (use MCP)\n# Query issue via mcp__gitea__ tools\n```\n\n**Validation Checks**:\n- [ ] Issue exists\n- [ ] Issue is currently open\n- [ ] User has permission to close\n- [ ] No blocking dependencies (check for \"Blocked by\" labels or comments)\n\n**If validation fails**:\n```markdown\nError: Cannot close issue #{number}\nReason: {validation_failure_reason}\n\nSuggestions:\n- Verify issue number is correct\n- Check that issue is not already closed\n- Ensure you have permission to close issues\n- Resolve blocking dependencies first\n```\n\n### Step 2: Gather Issue Context\n\n**Collect Issue Details**:\n- Issue title\n- Issue body\u002Fdescription\n- Labels\n- Assignees\n- Milestone\n- Created date\n- Comments (extract important info)\n\n**Extract Acceptance Criteria**:\n\nParse issue body for checklist items:\n\n```markdown\n### Acceptance Criteria\n- [x] Feature implemented\n- [x] Tests added\n- [ ] Documentation updated  ← INCOMPLETE\n```\n\n**If acceptance criteria incomplete**:\n```markdown\nWarning: Not all acceptance criteria are checked.\n\nIncomplete items:\n- [ ] Documentation updated\n\nProceed with closing? (--no-verify to skip this check)\n```\n\n### Step 3: Find Related Work\n\n**Scan Recent Commits**:\n\n```bash\n# Search commit messages for issue reference\ngit log --all --grep=\"#{issue_number}\" --oneline\n\n# Also check variations\ngit log --all --grep=\"issue.*#{issue_number}\" --oneline\ngit log --all --grep=\"[#]#{issue_number}\" --oneline\n```\n\n**Scan AIWG Artifacts**:\n\n```bash\n# Use grep to find references\ngrep -r \"#{issue_number}\" .aiwg\u002F\ngrep -r \"@issues\u002F{issue_number}\" .aiwg\u002F\n```\n\n**Scan Code References**:\n\n```bash\n# Find TODOs and issue references in code\ngrep -r \"TODO.*#{issue_number}\" src\u002F\ngrep -r \"@issue #{issue_number}\" src\u002F\ngrep -r \"Issue #{issue_number}\" src\u002F\n```\n\n**Find Related PRs**:\n\n```bash\n# GitHub\ngh pr list --search \"#{issue_number}\" --state all\n\n# Gitea (use MCP to search)\n```\n\n### Step 4: Verify Completion\n\n**Verification Checklist** (unless --no-verify):\n\n```markdown\n## Pre-Close Verification\n\n### Code Changes\n- [ ] Commits found referencing this issue\n- [ ] Code review completed (check PR status)\n- [ ] No open PRs still referencing this issue\n\n### Testing\n- [ ] Tests added for new functionality\n- [ ] All tests passing (check CI status)\n- [ ] No test failures in recent runs\n\n### Documentation\n- [ ] Code documentation updated\n- [ ] User documentation updated (if user-facing)\n- [ ] AIWG artifacts updated (requirements, architecture, etc.)\n\n### Quality\n- [ ] No new lint errors introduced\n- [ ] Code coverage maintained or improved\n- [ ] No security vulnerabilities introduced\n\n### Acceptance Criteria\n- [ ] All acceptance criteria met (from issue template)\n- [ ] Definition of Done satisfied\n\n### Cleanup\n- [ ] No TODOs left in code referencing this issue\n- [ ] No FIXME comments unresolved\n- [ ] Feature flags removed (if temporary)\n```\n\n**Auto-Check Where Possible**:\n\n```bash\n# Check CI status of recent commits\ngh run list --limit 5 --json conclusion\n\n# Check for remaining TODOs\ngrep -r \"TODO.*#${issue_number}\" src\u002F test\u002F\n\n# Check test coverage (if available)\nnpm test -- --coverage\n```\n\n**Report Verification Results**:\n\n```markdown\n## Verification Results\n\n✅ Code changes: 3 commits found\n✅ Code review: PR #45 merged\n✅ Tests: All passing (15\u002F15)\n⚠️  Documentation: AIWG artifacts not updated\n❌ TODOs: 2 TODO comments still reference this issue\n\nBlockers:\n- Resolve remaining TODOs before closing\n- Update .aiwg\u002Frequirements\u002Fuse-cases\u002FUC-017.md\n\nProceed anyway? Use --no-verify to skip checks.\n```\n\n### Step 5: Generate Completion Summary\n\nUsing `task-completed.md` template, generate comprehensive summary:\n\n```markdown\n## Task Completed\n\n**Status**: Completed\n**Closed by**: {user}\n**Completion date**: {timestamp}\n**Time to resolution**: {days} days\n\n## Original Request\n\n{issue_title}\n\n{issue_body_summary}\n\n## Summary of Work\n\n{auto_generated_summary_from_commits_and_artifacts}\n\n## Deliverables\n\n### Code Changes\n- Commits: {count}\n  - {sha1}: {message}\n  - {sha2}: {message}\n- Pull Requests: {count}\n  - PR #{number}: {title} (Merged: {date})\n\n### Artifacts Created\u002FUpdated\n- `{artifact_path}` - {description}\n- `{artifact_path}` - {description}\n\n### Tests Added\n- `{test_path}` - {description}\n- Coverage: {percentage}% ({lines} lines covered)\n\n### Documentation Updated\n- `{doc_path}` - {description}\n\n## Implementation Details\n\n### Files Modified\n- `{file_path}` - {change_summary}\n- `{file_path}` - {change_summary}\n\nTotal changes: +{lines_added} -{lines_removed} across {files_count} files\n\n### Key Decisions\n\n{if_any_ADRs_or_design_decisions}\n- {decision_1}: {rationale}\n- {decision_2}: {rationale}\n\n## Verification\n\n- [x] All acceptance criteria met\n- [x] Tests passing ({test_count} tests)\n- [x] Code reviewed and approved\n- [x] Documentation updated\n- [x] CI\u002FCD pipeline passing\n- [x] No outstanding TODOs\n- [x] Ready for deployment\n\n## Related Items\n\n- Closes: #{issue_number}\n- Related PRs: #{pr_numbers}\n- Related issues: #{related_issue_numbers}\n- Artifacts: {artifact_paths}\n- Commits: {commit_range}\n\n## Impact Assessment\n\n### User Impact\n- {impact_description}\n\n### System Impact\n- Performance: {performance_changes}\n- Security: {security_improvements}\n- Dependencies: {dependency_updates}\n\n## Deployment Notes\n\n{if_applicable}\n- Deployment required: {yes\u002Fno}\n- Migration needed: {yes\u002Fno}\n- Feature flags: {enabled\u002Fdisabled}\n- Rollback plan: {description}\n\n## Follow-Up Items\n\n{if_applicable}\n### Future Enhancements\n- {enhancement_1} - Consider for future milestone\n- {enhancement_2} - Tracked in #{issue_number}\n\n### Technical Debt\n- {debt_item_1} - Address in #{issue_number}\n\n### Monitoring\n- Watch for: {metrics_to_monitor}\n- Alert thresholds: {thresholds}\n\n## Next Steps\n\n1. {next_step_1}\n2. {next_step_2}\n3. {next_step_3}\n\n---\n\n*This issue has been completed and verified. All acceptance criteria met and tests passing. Closing as complete.*\n```\n\n### Step 6: Close Issue with Summary\n\n**Guard against a duplicate closing comment (#2722).** Re-entry after a crash\nmust not post the summary twice. Record both effects in the effect ledger with\nthe issue on the configured tracker as the target\n(`gitea:\u003Cowner>\u002F\u003Crepo>#\u003CN>` or `github:\u003Cowner>\u002F\u003Crepo>#\u003CN>`):\n\n```bash\nCOMMENT=(--kind tracker.comment --target \"gitea:{owner}\u002F{repo}#{number}\" --issue {number} --action close-summary)\nCLOSE=(--kind tracker.issue.closed --target \"gitea:{owner}\u002F{repo}#{number}\" --issue {number} --action close)\nEFFECT_ID=$(aiwg effect id \"${COMMENT[@]}\" --format text)\n# Append to completion-summary.md:  \u003C!-- aiwg-effect: $EFFECT_ID -->\naiwg effect lookup \"${COMMENT[@]}\"\n```\n\n- `lookup` exit `0`: the closing comment is already recorded. Skip the comment\n  and continue with the close.\n- `lookup` exit `4` (an intent with no outcome): run\n  `aiwg effect reconcile \"${COMMENT[@]}\"`. Exit `0` means the marker comment is\n  already on the thread; skip the comment. Exit `3` means it is absent; post\n  it. Exit `4` means the tracker could not be read; stop and report a blocker.\n- `lookup` exit `3`: record the intent, then post:\n  `aiwg effect intent \"${COMMENT[@]}\" --payload-file completion-summary.md`.\n\nAfter posting, record the comment and the closure:\n\n```bash\naiwg effect record \"${COMMENT[@]}\" --payload-file completion-summary.md --verify\n# ... close the issue (below) ...\naiwg effect record \"${CLOSE[@]}\" --payload-digest sha256:\u003Cdigest-of-completion-summary> --verify\n```\n\n`record --verify` exits `0` only when the tracker shows the marker comment by\nthe pinned tracker actor, or the issue state `closed`. Exit `4` means the\ntracker could not be read: report it and never claim the issue closed.\n\n**GitHub**:\n\n```bash\n# Close issue with comment\ngh issue close {issue_number} --comment \"{completion_summary}\"\n\n# Add labels if applicable\ngh issue edit {issue_number} --add-label \"completed\"\n```\n\n**Gitea**:\n\n```bash\n# Add completion comment first\nmcp__gitea__create_issue_comment \\\n  --owner {owner} \\\n  --repo {repo} \\\n  --issue_number {number} \\\n  --body \"{completion_summary}\"\n\n# Then close issue\nmcp__gitea__edit_issue \\\n  --owner {owner} \\\n  --repo {repo} \\\n  --issue_number {number} \\\n  --state closed\n```\n\n### Step 7: Update Related Issues\n\n**If this issue unblocks others**:\n\n```bash\n# Find issues blocked by this one\ngh issue list --search \"blocked by #{issue_number}\"\n\n# Add unblocking comment to each\nfor blocked_issue in ${blocked_issues}; do\n  gh issue comment ${blocked_issue} --body \"✅ Unblocked: Issue #{issue_number} has been resolved.\"\ndone\n```\n\n**If this closes a milestone**:\n\n```bash\n# Check milestone status\ngh issue list --milestone \"{milestone}\" --state open\n\n# If all issues closed\ngh api repos\u002F{owner}\u002F{repo}\u002Fmilestones\u002F{milestone_id} \\\n  -X PATCH \\\n  -f state=closed \\\n  -f description=\"Completed {date}: All issues resolved\"\n```\n\n### Step 8: Generate Closure Report\n\n```markdown\n## Issue Closure Report\n\n**Issue**: #{issue_number} - {title}\n**Closed by**: {user}\n**Closed at**: {timestamp}\n**Resolution time**: {duration}\n\n### Summary\n\n{brief_summary}\n\n### Work Completed\n\n- Commits: {count}\n- PRs merged: {count}\n- Files changed: {count}\n- Tests added: {count}\n- Artifacts updated: {count}\n\n### Verification\n\nAll pre-close checks passed:\n- ✅ Acceptance criteria met\n- ✅ Tests passing\n- ✅ Code reviewed\n- ✅ Documentation updated\n- ✅ CI\u002FCD passing\n\n### Related Updates\n\n{if_applicable}\n- Unblocked issues: #{numbers}\n- Milestone completed: {milestone_name}\n- Follow-up issues created: #{numbers}\n\n### Links\n\n- Issue: {issue_url}\n- PR: {pr_url}\n- Commits: {commit_range_url}\n- Artifacts: {artifact_paths}\n\n---\n\nIssue #{issue_number} successfully closed with verification complete.\n```\n\n## Advanced Features\n\n### Automatic Follow-Up Issue Creation\n\nIf incomplete items detected:\n\n```markdown\n## Follow-Up Items Detected\n\nCreating follow-up issues for:\n\n1. Documentation improvements\n   - Created issue #{new_number}: \"Update API documentation for feature X\"\n\n2. Technical debt\n   - Created issue #{new_number}: \"Refactor auth logic for better testability\"\n\n3. Future enhancements\n   - Created issue #{new_number}: \"Add support for OAuth providers\"\n\nThese items were moved to new issues to allow closing #{original_issue}.\n```\n\n### Milestone Auto-Complete\n\nIf this is the last issue in a milestone:\n\n```markdown\n## Milestone Completed! ?\n\nIssue #{issue_number} was the last open issue in milestone \"{milestone}\".\n\nMilestone summary:\n- Total issues: {count}\n- Completed: {count}\n- Duration: {start_date} - {end_date}\n- Success rate: 100%\n\nThe milestone has been automatically marked as complete.\n```\n\n### Artifact Traceability Update\n\nUpdate AIWG artifacts with completion status:\n\n```markdown\n## References\n\n- Implements: @.aiwg\u002Frequirements\u002FUC-017.md ✅ Completed\n- Related issue: #17 (Closed: {date})\n- Implementation: @$AIWG_ROOT\u002Fsrc\u002Fissue-sync.ts\n- Tests: @test\u002Funit\u002Fissue-sync.test.ts\n```\n\n### Changelog Generation\n\nAdd entry to CHANGELOG.md:\n\n```markdown\n### Issue #17 - Issue sync automation (Closed: 2025-01-13)\n\n- Implemented automatic issue synchronization from commits\n- Added issue comment templates\n- Created \u002Fissue-sync, \u002Fissue-close, \u002Fissue-comment commands\n- Test coverage: 85%\n- PRs: #45, #46\n\nCloses #17\n```\n\n## Configuration\n\n### `.aiwg\u002Fconfig.yaml`\n\n```yaml\nissue_close:\n  verify_before_close: true\n  require_all_acceptance_criteria: true\n  auto_link_artifacts: true\n  create_follow_ups: true\n  update_changelog: true\n  minimum_time_open: 1h  # Prevent immediate close\n  labels:\n    on_close: [\"completed\", \"verified\"]\n    on_skip_verify: [\"closed-unverified\"]\n```\n\n## Error Handling\n\n### Issue Already Closed\n\n```markdown\nError: Issue #{number} is already closed.\n\nStatus: Closed {date} by {user}\nResolution: {previous_summary}\n\nNo action needed.\n```\n\n### Incomplete Verification\n\n```markdown\nError: Pre-close verification failed.\n\nFailed checks:\n- ❌ Tests: 2 tests failing\n- ❌ TODOs: 3 TODO comments unresolved\n- ⚠️  Documentation: No AIWG artifacts updated\n\nOptions:\n1. Fix failing checks and try again\n2. Use --no-verify to skip checks (not recommended)\n3. Document why checks can be skipped\n```\n\n### Permission Denied\n\n```markdown\nError: Cannot close issue #{number} - insufficient permissions.\n\nRequired permission: triage or maintain role\n\nSuggestions:\n- Request permission from repository maintainer\n- Have maintainer close the issue\n- Use GitHub\u002FGitea UI to close manually\n```\n\n## Best Practices\n\n### When to Close\n\n**Close immediately when**:\n- All acceptance criteria met\n- Tests passing\n- Code reviewed and merged\n- Documentation complete\n\n**Delay closing when**:\n- Awaiting deployment verification\n- Monitoring for issues in production\n- Need user acceptance testing\n- Dependent work not complete\n\n### Creating Follow-Ups\n\n**Good follow-up issues**:\n```markdown\nTitle: Improve error handling in issue sync (follow-up to #17)\n\nDescription:\nWhile implementing #17, we identified opportunities to improve error handling:\n- Add retry logic for API failures\n- Better error messages for invalid issue references\n- Graceful degradation when API unavailable\n\nThis is a follow-up enhancement, not blocking #17 completion.\n\nLabels: enhancement, technical-debt\n```\n\n### Closure Comments\n\n**Comprehensive**:\n```markdown\n✅ All acceptance criteria met\n✅ 15 tests added, all passing\n✅ Code reviewed and approved in PR #45\n✅ Documentation updated in .aiwg\u002Frequirements\u002F\n\nReady for deployment to production.\n```\n\n**Concise**:\n```markdown\nImplemented in commit abc123. Tests passing. Docs updated. Ready to deploy.\n```\n\n## References\n\n- Template: `@$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsdlc-complete\u002Ftemplates\u002Fissue-comments\u002Ftask-completed.md`\n- Related: @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsdlc-complete\u002Fcommands\u002Fissue-sync.md, @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsdlc-complete\u002Fcommands\u002Fissue-comment.md\n- MCP tools: Gitea issue management\n- GitHub CLI: `gh issue close`\n\n## Success Criteria\n\nThis command succeeds when:\n\n- [x] Issue is successfully closed\n- [x] Comprehensive completion summary added\n- [x] All verification checks passed (unless --no-verify)\n- [x] Related issues updated (if blocking others)\n- [x] Artifacts linked and updated\n- [x] Follow-up issues created (if needed)\n- [x] Changelog updated (if configured)\n- [x] Clear closure report generated\n",{"name":5,"namespace":52,"platforms":53,"commandHint":55,"description":7},"aiwg",[54],"all",{"model":38,"category":39,"modelRole":33,"modelTier":56,"allowedTools":57,"argumentHint":58},"economy","Bash(git *, gh *), Bash(aiwg effect *), Read, Glob, mcp__gitea__*","\u003Cissue_number> [--reason \u003Ctext>] [--no-verify] [--link-artifacts]","main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Fplugins\u002Fcodex-sdlc\u002Fskills\u002Fissue-close",36,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg","https:\u002F\u002Faiwg.io","https:\u002F\u002Fgithub.com\u002Fjmagly","https:\u002F\u002Fintegrolabs.io","ml\u002Fai, industrial automation, safety\u002Fsecurity, ssi\r\n\r\nmagly.net\r\nintegrolabs.io\r\naiwg.io\r\nfortemi.com\r\npagenary.com\r\nbytecask.com","2026-11-14 10:46:34",{"source":8,"skillName":5,"commands":70,"prompt":80,"zipAvailable":81},[71,74,77],{"tool":72,"command":73},"npx","npx skills add jmagly\u002Faiwg --skill issue-close",{"tool":75,"command":76},"bunx","bunx skills add jmagly\u002Faiwg --skill issue-close",{"tool":78,"command":79},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill issue-close","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fcodex-sdlc\u002Fskills\u002Fissue-close\u002FSKILL.md",true,[],[84,92,97,122,146,152],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":91},"01M78KW7PZJ9YQZQMW84SN2YD4","plugin-search","Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Futils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":93,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":91},"01M78KSEZS9ZNNFESY9ANW22S0","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":104,"publishedAt":47},"01M70QA0BSYJ49EES9V4RE8QH1","host-hardening","Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[103],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[105,106,107,44,108,27,109,110,111,112,113,114,115,42,116,117,118,119,120,121],"hardening","host","host hardening","secrets","request","remediation","recommendations","audit","plan","port","bind","access","only","retention","re","never","firewall",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":132,"publishedAt":47},"01M70PNT2Z4HMZPRBTAF6073NN","exposure-analysis","Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[128,131],{"categoryNo":129,"categoryName":130,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[133,134,135,136,137,138,27,139,114,120,42,140,106,141,117,142,143,121,144,145],"analysis","exposure analysis","collection","reconstruction","operator","write","credentials","unknown","internet","local","scope","ports","ufw",{"skillNo":147,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":151,"publishedAt":47},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[150],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[105,106,107,119,120,121,115,118,111,108,27,109,110,112,113,114,44,42,116,117],{"skillNo":153,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":158,"publishedAt":47},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[156,157],{"categoryNo":129,"categoryName":130,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[133,134,145,144,137,143,142,117,136,138,27,139,114,135,42,140,106,121,120,141]]