opencode-bonfire 1.4.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/files/agent/writer.md +127 -0
- package/files/command/bonfire-configure.md +49 -4
- package/files/command/bonfire-document.md +61 -134
- package/files/command/bonfire-review-pr.md +45 -91
- package/files/command/bonfire-spec.md +68 -226
- package/files/command/bonfire-strategic.md +166 -0
- package/files/opencode.json +0 -3
- package/package.json +1 -1
- package/files/agent/doc-writer.md +0 -120
- package/files/agent/spec-writer.md +0 -142
- package/files/command/bonfire-git-strategy.md +0 -91
- package/files/command/bonfire-handoff.md +0 -168
- package/files/command/bonfire-poc.md +0 -332
- package/files/command/bonfire-prd.md +0 -332
- package/files/command/bonfire-rfc.md +0 -267
- package/files/skill/handoff-awareness/SKILL.md +0 -64
package/README.md
CHANGED
|
@@ -24,22 +24,24 @@ bunx opencode-bonfire install --global
|
|
|
24
24
|
|
|
25
25
|
| Component | Description |
|
|
26
26
|
|-----------|-------------|
|
|
27
|
-
| **
|
|
28
|
-
| **
|
|
29
|
-
| **
|
|
27
|
+
| **9 Commands** | `/bonfire-start`, `/bonfire-end`, `/bonfire-spec`, `/bonfire-strategic`, `/bonfire-document`, `/bonfire-review`, `/bonfire-review-pr`, `/bonfire-archive`, `/bonfire-configure` |
|
|
28
|
+
| **3 Agents** | `codebase-explorer`, `writer`, `work-reviewer` |
|
|
29
|
+
| **2 Skills** | `bonfire-context`, `archive-bonfire-awareness` |
|
|
30
30
|
| **1 Plugin** | Archive suggestions + compaction context preservation |
|
|
31
31
|
| **1 Tool** | `bonfire` for structured session data |
|
|
32
32
|
|
|
33
33
|
## Usage
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
/bonfire-start
|
|
37
|
-
/bonfire-end
|
|
38
|
-
/bonfire-spec <topic>
|
|
39
|
-
/bonfire-
|
|
40
|
-
/bonfire-
|
|
41
|
-
/bonfire-
|
|
42
|
-
/bonfire-
|
|
36
|
+
/bonfire-start # Start session, scaffold if needed
|
|
37
|
+
/bonfire-end # Update context, commit changes
|
|
38
|
+
/bonfire-spec <topic> # Create implementation spec
|
|
39
|
+
/bonfire-strategic <type> <topic> # Create RFC, PRD, or POC
|
|
40
|
+
/bonfire-document <topic> # Document a codebase topic
|
|
41
|
+
/bonfire-review # Find blindspots and gaps
|
|
42
|
+
/bonfire-review-pr <number> # Review a GitHub PR
|
|
43
|
+
/bonfire-archive # Archive completed work
|
|
44
|
+
/bonfire-configure # Change project settings (git, linear)
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
## How It Works
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: writer
|
|
3
|
+
description: Synthesize research and interview findings into documents
|
|
4
|
+
model: anthropic/claude-sonnet-4-20250514
|
|
5
|
+
hidden: true
|
|
6
|
+
tools: [Read, Write]
|
|
7
|
+
permission:
|
|
8
|
+
task:
|
|
9
|
+
"*": deny
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
You are a technical document writer. Given research findings and (optionally) interview answers, produce clear, actionable documentation.
|
|
13
|
+
|
|
14
|
+
## Input Format
|
|
15
|
+
|
|
16
|
+
You'll receive a structured prompt with:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
## Document Type
|
|
20
|
+
|
|
21
|
+
<spec | doc | rfc | prd | poc>
|
|
22
|
+
|
|
23
|
+
## Research Findings
|
|
24
|
+
|
|
25
|
+
<structured markdown from codebase-explorer>
|
|
26
|
+
|
|
27
|
+
## Interview Q&A (if applicable)
|
|
28
|
+
|
|
29
|
+
### [Round Name]
|
|
30
|
+
**Q**: <question>
|
|
31
|
+
**A**: <user's answer>
|
|
32
|
+
|
|
33
|
+
## Document Metadata
|
|
34
|
+
|
|
35
|
+
- **Topic**: <feature, system, or task name>
|
|
36
|
+
- **Issue**: <issue ID or N/A>
|
|
37
|
+
- **Output Path**: </absolute/path/to/file.md>
|
|
38
|
+
- **Date**: <YYYY-MM-DD>
|
|
39
|
+
- **Author**: <name, if applicable>
|
|
40
|
+
|
|
41
|
+
## Template (optional)
|
|
42
|
+
|
|
43
|
+
<specific template structure to follow>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Write the document to the exact path specified in Output Path.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Document Types
|
|
51
|
+
|
|
52
|
+
### Spec (Implementation Specification)
|
|
53
|
+
|
|
54
|
+
**Purpose**: Actionable implementation plan for a feature or task.
|
|
55
|
+
|
|
56
|
+
**Required sections**:
|
|
57
|
+
- `## Overview` - What we're building and why
|
|
58
|
+
- `## Decisions` - Key choices with rationale
|
|
59
|
+
- `## Implementation Steps` - Ordered, actionable steps
|
|
60
|
+
- `## Edge Cases` - Error handling, boundary conditions
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### Doc (Reference Documentation)
|
|
65
|
+
|
|
66
|
+
**Purpose**: Help developers understand a system, feature, or pattern.
|
|
67
|
+
|
|
68
|
+
**Required sections**:
|
|
69
|
+
- `## Overview` - What this is and why it exists
|
|
70
|
+
- `## Key Files` - Important files with their roles
|
|
71
|
+
- `## How It Works` - Conceptual explanation of flow/behavior
|
|
72
|
+
- `## Gotchas` - Edge cases, pitfalls, things to watch out for
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### RFC (Request for Comments)
|
|
77
|
+
|
|
78
|
+
**Purpose**: Technical decision proposal for team review.
|
|
79
|
+
|
|
80
|
+
**Required sections**:
|
|
81
|
+
- `## Abstract` - 1-3 sentences summarizing proposal
|
|
82
|
+
- `## Problems We Need To Solve` - Concrete problems with evidence
|
|
83
|
+
- `## Proposed Solution` - Overview, pros, cons/tradeoffs
|
|
84
|
+
- `## Alternatives Considered` - Other approaches evaluated
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### PRD (Product Requirements Document)
|
|
89
|
+
|
|
90
|
+
**Purpose**: Product specification for feature development.
|
|
91
|
+
|
|
92
|
+
**Required sections**:
|
|
93
|
+
- `## 2. Problem` - Customer and internal pain points
|
|
94
|
+
- `## 5. Goals & Success Metrics` - Goals and measurable outcomes
|
|
95
|
+
- `## 6. Product Requirements` - Functional and non-functional requirements
|
|
96
|
+
- `## 9. Scope` - In scope and out of scope
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### POC (Proof of Concept Plan)
|
|
101
|
+
|
|
102
|
+
**Purpose**: Customer evaluation plan with clear success criteria.
|
|
103
|
+
|
|
104
|
+
**Required sections**:
|
|
105
|
+
- `## 2. Goals` - What we want to validate
|
|
106
|
+
- `## 3. Success Criteria` - Concrete, measurable exit criteria
|
|
107
|
+
- `## 4. Scope` - In scope and out of scope
|
|
108
|
+
- `## 5. Plan & Timeline` - Phases and milestones
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Rules
|
|
113
|
+
|
|
114
|
+
1. **Ground in research** - Reference actual files and patterns discovered
|
|
115
|
+
2. **Honor interview answers** - Don't override user decisions
|
|
116
|
+
3. **Be specific** - "Update UserService.ts" not "Update the service"
|
|
117
|
+
4. **Don't invent** - If something wasn't discussed/found, don't add it
|
|
118
|
+
5. **Keep it actionable** - Someone should be able to use this document
|
|
119
|
+
|
|
120
|
+
## Quality Checklist
|
|
121
|
+
|
|
122
|
+
Before finishing, verify:
|
|
123
|
+
- [ ] All required sections for document type are present
|
|
124
|
+
- [ ] Content references real files from research (not placeholders)
|
|
125
|
+
- [ ] Interview decisions are captured (if applicable)
|
|
126
|
+
- [ ] No vague or generic content
|
|
127
|
+
- [ ] File written to exact Output Path specified
|
|
@@ -1,18 +1,63 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Change project settings (locations, git strategy, Linear)
|
|
2
|
+
description: Change project settings (locations, git strategy, Linear, hooks)
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Configure Bonfire
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Change project settings. Supports targeted or full configuration.
|
|
8
|
+
|
|
9
|
+
## Argument Handling
|
|
10
|
+
|
|
11
|
+
Based on `$ARGUMENTS`:
|
|
12
|
+
- Empty: Full interactive config (all settings)
|
|
13
|
+
- `git`: Git strategy only (quick mode - replaces /bonfire-git-strategy)
|
|
14
|
+
- `linear`: Linear integration only (quick mode)
|
|
8
15
|
|
|
9
16
|
## Step 1: Find Git Root
|
|
10
17
|
|
|
11
18
|
Run `git rev-parse --show-toplevel` to locate the repository root.
|
|
12
19
|
|
|
13
|
-
## Step 2:
|
|
20
|
+
## Step 2: Ensure Bonfire Directory Exists
|
|
21
|
+
|
|
22
|
+
If `<git-root>/.bonfire/` does not exist, create it.
|
|
23
|
+
|
|
24
|
+
If `<git-root>/.bonfire/index.md` does not exist, create a minimal version:
|
|
25
|
+
|
|
26
|
+
```markdown
|
|
27
|
+
# Session Context: [PROJECT_NAME]
|
|
28
|
+
|
|
29
|
+
**Date**: [CURRENT_DATE]
|
|
30
|
+
**Status**: Active
|
|
31
|
+
**Branch**: [CURRENT_BRANCH]
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Current State
|
|
36
|
+
|
|
37
|
+
[Created via /bonfire-configure - run /bonfire-start for full setup]
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Recent Sessions
|
|
42
|
+
|
|
43
|
+
_No sessions recorded yet._
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Next Session Priorities
|
|
48
|
+
|
|
49
|
+
1. [Define your priorities]
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Notes
|
|
54
|
+
|
|
55
|
+
[Add notes here]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Detect project name from: package.json name → git remote → directory name.
|
|
14
59
|
|
|
15
|
-
|
|
60
|
+
This ensures configure can be run as the first entry point without leaving the project in an incomplete state.
|
|
16
61
|
|
|
17
62
|
## Step 3: Read Current Config
|
|
18
63
|
|
|
@@ -4,175 +4,102 @@ description: Create documentation about a topic in the codebase
|
|
|
4
4
|
|
|
5
5
|
# Document Topic
|
|
6
6
|
|
|
7
|
-
Create reference documentation
|
|
7
|
+
Create reference documentation for **$ARGUMENTS**.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Run `git rev-parse --show-toplevel` to locate the repository root.
|
|
12
|
-
|
|
13
|
-
## Step 2: Check Config
|
|
14
|
-
|
|
15
|
-
Read `<git-root>/.bonfire/config.json` if it exists.
|
|
16
|
-
|
|
17
|
-
**Docs location**: Read `docsLocation` from config. Default to `.bonfire/docs/` if not set.
|
|
18
|
-
|
|
19
|
-
## Step 3: Understand the Topic
|
|
20
|
-
|
|
21
|
-
The topic to document is: $ARGUMENTS
|
|
22
|
-
|
|
23
|
-
If no topic provided, ask the user what they want documented.
|
|
24
|
-
|
|
25
|
-
## Step 4: Explore the Codebase (Subagent)
|
|
26
|
-
|
|
27
|
-
**Progress**: Tell the user "Exploring codebase for [TOPIC]..."
|
|
28
|
-
|
|
29
|
-
Use the task tool to invoke the **codebase-explorer** subagent for research.
|
|
30
|
-
|
|
31
|
-
Provide a research directive:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
Research the codebase to document: [TOPIC]
|
|
35
|
-
|
|
36
|
-
Find:
|
|
37
|
-
1. **Architecture**: How this system/feature is structured, key components
|
|
38
|
-
2. **Key Files**: Important files and their roles
|
|
39
|
-
3. **Flow**: How data/control flows through the system
|
|
40
|
-
4. **Patterns**: Design patterns and conventions used
|
|
41
|
-
5. **Gotchas**: Important details, edge cases, things to watch out for
|
|
42
|
-
|
|
43
|
-
Return structured findings with file paths and brief descriptions.
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**Wait for the subagent to return findings** before proceeding.
|
|
47
|
-
|
|
48
|
-
The subagent runs in isolated context (haiku model, fast), preserving main context for writing.
|
|
9
|
+
---
|
|
49
10
|
|
|
50
|
-
|
|
11
|
+
## Outcome
|
|
51
12
|
|
|
52
|
-
|
|
13
|
+
Complete reference documentation that helps developers understand a system, feature, or pattern in the codebase. The doc should enable someone unfamiliar with the code to:
|
|
14
|
+
- Understand what it does and why it exists
|
|
15
|
+
- Find the relevant files quickly
|
|
16
|
+
- Understand how it works at a conceptual level
|
|
17
|
+
- Avoid common pitfalls
|
|
53
18
|
|
|
54
|
-
|
|
55
|
-
- `## Architecture` or `## Patterns Found` with content
|
|
56
|
-
- `## Key Files` with entries
|
|
57
|
-
- `## Flow` or `## Gotchas` with items
|
|
19
|
+
---
|
|
58
20
|
|
|
59
|
-
|
|
21
|
+
## Acceptance Criteria
|
|
60
22
|
|
|
61
|
-
|
|
62
|
-
1. Warn user: "Codebase exploration returned limited results. I'll research directly."
|
|
63
|
-
2. Fall back to in-context research:
|
|
64
|
-
- `glob("**/*[topic-related]*")` to find relevant files
|
|
65
|
-
- `grep("topic-keywords")` to find implementations
|
|
66
|
-
- Read identified files
|
|
67
|
-
3. Continue to Step 5 with in-context findings.
|
|
23
|
+
The doc file must contain these sections:
|
|
68
24
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
25
|
+
| Section | Purpose |
|
|
26
|
+
|---------|---------|
|
|
27
|
+
| `## Overview` | What this is and why it matters |
|
|
28
|
+
| `## Key Files` | Important files with their roles |
|
|
29
|
+
| `## How It Works` | Conceptual explanation of flow/behavior |
|
|
30
|
+
| `## Gotchas` | Edge cases, pitfalls, things to watch out for |
|
|
73
31
|
|
|
74
|
-
|
|
32
|
+
Additional sections are welcome (Architecture, Examples, Related Topics) but these four are required.
|
|
75
33
|
|
|
76
|
-
|
|
34
|
+
**Quality signals:**
|
|
35
|
+
- File paths are accurate and exist in the codebase
|
|
36
|
+
- Explanations match actual code behavior
|
|
37
|
+
- Gotchas reflect real issues (not hypothetical concerns)
|
|
77
38
|
|
|
78
|
-
|
|
79
|
-
- Subagent returns with "X additional items omitted" notes
|
|
80
|
-
- Findings cover only part of the topic (e.g., found architecture but not flows)
|
|
81
|
-
- User asks for deeper exploration of a specific aspect
|
|
39
|
+
---
|
|
82
40
|
|
|
83
|
-
|
|
84
|
-
1. Tell user: "Exploration found [X] but there's more to document. Continue exploring [specific aspect]?"
|
|
85
|
-
2. If yes, re-invoke codebase-explorer with the `session_id` parameter:
|
|
86
|
-
- Pass the session_id from the previous invocation
|
|
87
|
-
- Provide a refined directive: "Continue exploring: [specific aspect]. Focus on [what to find]."
|
|
88
|
-
3. Merge findings from resumed exploration with previous findings.
|
|
89
|
-
4. Repeat if needed, up to 3 passes maximum.
|
|
41
|
+
## Constraints
|
|
90
42
|
|
|
91
|
-
|
|
92
|
-
- Pass 1: "Document payment system" → finds payment service, stripe integration
|
|
93
|
-
- Pass 2 (resume): "Continue exploring: refund handling" → finds refund logic, webhooks
|
|
94
|
-
- Merge: Combined findings produce more complete documentation
|
|
43
|
+
### Context Isolation
|
|
95
44
|
|
|
96
|
-
|
|
45
|
+
Research happens in an isolated subagent context to preserve main context.
|
|
97
46
|
|
|
98
|
-
|
|
47
|
+
| Phase | Agent | Model | Why |
|
|
48
|
+
|-------|-------|-------|-----|
|
|
49
|
+
| Research | `codebase-explorer` | haiku | Fast exploration without polluting main context |
|
|
50
|
+
| Writing | `doc-writer` | inherit | Synthesis in isolation with full research context |
|
|
99
51
|
|
|
100
|
-
|
|
52
|
+
### No Interview Required
|
|
101
53
|
|
|
102
|
-
|
|
103
|
-
- `inbound-agent-architecture.md`
|
|
104
|
-
- `sampling-strategies.md`
|
|
105
|
-
- `authentication-flow.md`
|
|
54
|
+
Unlike specs, documentation is based purely on codebase research. The code is the source of truth.
|
|
106
55
|
|
|
107
|
-
|
|
56
|
+
### File Locations
|
|
108
57
|
|
|
109
|
-
|
|
58
|
+
- **Config**: `<git-root>/.bonfire/config.json` contains `docsLocation`
|
|
59
|
+
- **Default**: `.bonfire/docs/` if not configured
|
|
60
|
+
- **Naming**: `<topic>.md` (kebab-case, e.g., `authentication-flow.md`)
|
|
110
61
|
|
|
111
|
-
|
|
112
|
-
## Research Findings
|
|
62
|
+
### Verification
|
|
113
63
|
|
|
114
|
-
|
|
64
|
+
After writing, verify the doc contains all 4 required sections. If incomplete:
|
|
65
|
+
- Warn user what's missing
|
|
66
|
+
- Offer: proceed / retry / abort
|
|
115
67
|
|
|
116
|
-
|
|
68
|
+
### Session Context
|
|
117
69
|
|
|
118
|
-
-
|
|
119
|
-
- **Output Path**: <git-root>/<docsLocation>/<topic>.md
|
|
120
|
-
- **Date**: <YYYY-MM-DD>
|
|
121
|
-
```
|
|
70
|
+
After writing, add a reference to the doc in `<git-root>/.bonfire/index.md` under Key Resources.
|
|
122
71
|
|
|
123
|
-
|
|
72
|
+
### Completion
|
|
124
73
|
|
|
125
|
-
|
|
74
|
+
After verification, confirm doc creation and offer options:
|
|
75
|
+
- Add more detail to any section
|
|
76
|
+
- Document related topics
|
|
77
|
+
- Proceed with other work
|
|
126
78
|
|
|
127
|
-
|
|
79
|
+
---
|
|
128
80
|
|
|
129
|
-
|
|
130
|
-
- `## Overview`
|
|
131
|
-
- `## Key Files`
|
|
132
|
-
- `## How It Works`
|
|
133
|
-
- `## Gotchas`
|
|
81
|
+
## Guidance (Not Rules)
|
|
134
82
|
|
|
135
|
-
|
|
83
|
+
These patterns tend to work well, but adapt as needed:
|
|
136
84
|
|
|
137
|
-
|
|
85
|
+
**Research before writing** - Let the codebase inform the structure.
|
|
138
86
|
|
|
139
|
-
|
|
140
|
-
- Warn user: "Doc file wasn't written. Writing directly..."
|
|
141
|
-
- Write the doc yourself using the write tool
|
|
142
|
-
- Run verification again on the written file
|
|
87
|
+
**Show your work** - Tell user what you're doing: "Exploring codebase...", "Writing documentation..."
|
|
143
88
|
|
|
144
|
-
|
|
145
|
-
- Scan content for the 4 section headers above
|
|
146
|
-
- Track which sections are present/missing
|
|
89
|
+
**Fallback gracefully** - If subagent fails, do the work in main context. Warn user but don't stop.
|
|
147
90
|
|
|
148
|
-
|
|
149
|
-
- Tell user: "Doc written and verified (4/4 key sections present)."
|
|
150
|
-
- Proceed to Step 6.
|
|
91
|
+
**Large codebases** - Explorer may need multiple passes. Offer to continue if findings seem incomplete for the topic.
|
|
151
92
|
|
|
152
|
-
|
|
153
|
-
- Warn user: "Doc appears incomplete. Missing sections: [list missing]"
|
|
154
|
-
- Show which sections ARE present
|
|
155
|
-
- Ask: "Proceed with partial doc, retry write, or abort?"
|
|
156
|
-
- **Proceed**: Continue to Step 6
|
|
157
|
-
- **Retry**: Re-invoke doc-writer subagent with same input, then verify again
|
|
158
|
-
- **Abort**: Stop and inform user the incomplete doc file remains at path
|
|
93
|
+
**Follow the code** - Document what the code actually does, not what comments claim or what you assume.
|
|
159
94
|
|
|
160
|
-
|
|
161
|
-
- Treat as invalid format, trigger fallback write
|
|
162
|
-
- Write the doc yourself, then verify the written file
|
|
95
|
+
---
|
|
163
96
|
|
|
164
|
-
|
|
165
|
-
- Warn user: "Doc writer failed. Writing doc directly..."
|
|
166
|
-
- Write the doc yourself using the write tool
|
|
167
|
-
- Run verification on the written file
|
|
97
|
+
## Anti-Patterns
|
|
168
98
|
|
|
169
|
-
|
|
99
|
+
**Don't document assumptions** - If you can't find it in the code, don't write about it.
|
|
170
100
|
|
|
171
|
-
|
|
101
|
+
**Don't over-abstract** - Concrete file paths and function names are more useful than vague descriptions.
|
|
172
102
|
|
|
173
|
-
|
|
103
|
+
**Don't skip verification** - Subagents can produce partial output. Always check.
|
|
174
104
|
|
|
175
|
-
|
|
176
|
-
- More detail on any section
|
|
177
|
-
- Related topics documented
|
|
178
|
-
- To proceed with other work
|
|
105
|
+
**Don't write tutorials** - This is reference documentation (how it works), not a guide (how to use it).
|