add(plugin): bonfire — session-context workflow tooling

Adapted from PR #108 by @vieko (Vercel).
Original: https://github.com/anthropics/claude-plugins-official/pull/108
This commit is contained in:
Tobin South
2026-03-16 12:51:34 -07:00
parent fd805b5e4b
commit 478ea5b46a
16 changed files with 1610 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
---
description: Suggest archiving completed work when PRs are merged or work is completed. Triggers when user asks to merge a PR ("merge it", "merge the PR"), after successful gh pr merge, or mentions completion ("shipped", "done with X", "merged to main"). Does NOT archive automatically - suggests running /bonfire:archive.
allowed-tools: Read, Glob, Bash(gh:*)
---
# Archive Bonfire Awareness
This skill detects when session work may be ready for archiving and suggests the appropriate action.
## When to Use This Skill
Trigger when:
- User asks to merge: "merge it", "merge the PR", "go ahead and merge", "ship it"
- After you successfully run `gh pr merge`
- User mentions completion: "PR merged", "shipped", "done with X", "finished"
- User references merged state: "merged to main", "closed the issue"
## Instructions
1. If user asks to merge a PR:
- Perform the merge as requested
- On success, continue to step 2
- On failure, help resolve the issue (don't suggest archiving)
2. Find git root and check if `.bonfire/index.md` exists
3. If it exists, read it to assess work state
4. If user provided a PR URL/number (or you just merged one), verify status:
```
gh pr view [URL/number] --json state,mergedAt,title
```
5. Assess if work appears complete:
- PR merged?
- Related tasks marked done in session notes?
- No obvious follow-up work mentioned?
6. If work appears complete, suggest archiving:
> "PR merged successfully. This session's work looks complete - want me to archive it?
> Run `/bonfire:archive` to move completed work to the archive."
7. If there's more work in the session:
> "PR merged. I see there's still [X, Y] in the session notes - want to continue
> with those or archive what's done so far?"
## Important
- This skill **suggests** archiving, it does NOT archive automatically
- User must explicitly run `/bonfire:archive` to perform the archive
- Trigger AFTER merge succeeds, not before
- Multiple PRs may be part of one logical session - check context
- If `.bonfire/` doesn't exist, don't suggest archiving

View File

@@ -0,0 +1,51 @@
---
description: Read project session context from .bonfire/index.md to understand ongoing work, previous decisions, blockers, and history. Use when the user asks about project context, previous sessions, what was worked on before, architectural decisions, blockers, or when they reference "last time", "previously", "the session", or "what we decided".
allowed-tools: Read, Glob
---
# Bonfire Context
This project may use the Bonfire pattern to maintain continuity across AI coding sessions. Context is stored in `.bonfire/index.md` rather than relying on conversation memory.
## When to Use This Skill
Read session context when the user:
- Asks about previous work or decisions
- References "last time", "previously", "before"
- Wants to know about blockers or pending issues
- Asks what the project status is
- Starts a significant task that might have prior context
## Instructions
1. Find the git root: `git rev-parse --show-toplevel`
2. Check if `.bonfire/index.md` exists at the git root
3. If it exists, read it to understand:
- Current project status and recent work
- Active decisions and their rationale
- Known blockers or pending issues
- Links to relevant specs or documentation
4. Check `.bonfire/specs/` if the user asks about implementation specs
5. Check `.bonfire/docs/` if the user asks about documented topics
## File Structure
```
.bonfire/
├── index.md # Main session context (read this first)
├── config.json # Project settings
├── archive/ # Completed work history
├── docs/ # Topic documentation
└── specs/ # Implementation specs
```
## Important
- This skill is for **reading** context, not updating it
- Session updates happen via `/bonfire:end` command
- Don't modify `.bonfire/index.md` unless explicitly asked
- If `.bonfire/` doesn't exist, the project may not use this pattern