AgentSkillsCN

bonfire

支持 AI 编码的会话上下文持久化。可启动/结束会话,创建需求规格与文档,回顾工作进展。适用于会话管理,“启动会话”、“结束会话”、实现规格、文档撰写、代码评审,或针对过往工作、决策、阻碍因素、“上次”讨论内容以及“我们当时是怎么决定的”等话题进行答疑。

SKILL.md
--- frontmatter
name: bonfire
description: Session context persistence for AI coding. Start/end sessions, create specs and docs, review work. Use for session management, "start session", "end session", implementation specs, documentation, code review, or questions about previous work, decisions, blockers, "last time", "what we decided".
license: MIT
allowed-tools: Bash(git:*), Bash(gh:*), Bash(mkdir:*), Bash(rm .bonfire/*), Read, Write, Edit, Glob, Grep, Task, AskUserQuestion, Skill(linear-cli:*)
metadata:
  author: vieko
  version: "4.1.0"

Bonfire

Session context persistence for AI coding - save your progress at the bonfire.

Git root: !git rev-parse --show-toplevel

Commands

CommandPurposeDetails
/bonfire startBegin session, load contextcommands/start.md
/bonfire endSave context, archive, health checkcommands/end.md
/bonfire configChange settingscommands/config.md
/bonfire spec <topic>Create implementation speccommands/spec.md
/bonfire doc <topic>Create documentationcommands/doc.md
/bonfire reviewReview current workcommands/review.md

Command Routing

Parse $ARGUMENTS to determine which command to run:

InputAction
startRead commands/start.md and execute
endRead commands/end.md and execute
config or configureRead commands/config.md and execute
spec <topic>Read commands/spec.md and execute
doc <topic> or document <topic>Read commands/doc.md and execute
reviewRead commands/review.md and execute
Empty or context questionRead session context and answer

Quick Reference

Start Session

  • Check/create .bonfire/ directory
  • Read index.md for session context
  • Set up tasks for cross-session persistence
  • Ask what to work on

End Session

  • Update index.md with accomplishments
  • Sync priorities to tasks
  • Run health check (garbage detection)
  • Smart archive detection

Config

  • Set specs/docs locations
  • Choose git strategy (ignore-all, hybrid, commit-all)
  • Enable/disable Linear integration

Spec

  • Research codebase (subagent)
  • Interview user for decisions
  • Write spec (subagent)
  • Verify required sections

Doc

  • Research codebase (subagent)
  • Write documentation (subagent)
  • Verify required sections

Review

  • Gather context (branch diff, session notes)
  • Analyze for blindspots (subagent)
  • Present findings by severity
  • Offer to fix, spec, or create issues

Passive Context

When user asks about previous work, decisions, blockers, or references "last time", "previously", "what we decided":

  1. Read <git-root>/.bonfire/index.md
  2. Summarize relevant context
  3. Answer the user's question

Bootstrap

If .bonfire/index.md doesn't exist when any command runs, create defaults:

  1. Create .bonfire/ with specs/, docs/, archive/
  2. Create config.json with defaults
  3. Create minimal index.md
  4. Create .gitignore

See templates/ for default content.

File Structure

code
.bonfire/
├── index.md          # Session context (main file)
├── config.json       # Settings
├── specs/            # Implementation specs
├── docs/             # Documentation
├── archive/          # Completed sessions
└── .gitignore        # Git strategy