@every-env/compound-plugin 0.1.0 → 0.1.1
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/.claude-plugin/marketplace.json +4 -4
- package/README.md +3 -3
- package/docs/index.html +14 -14
- package/docs/pages/changelog.html +1 -1
- package/docs/pages/getting-started.html +1 -1
- package/package.json +1 -1
- package/plugins/compound-engineering/.claude-plugin/plugin.json +3 -3
- package/plugins/compound-engineering/README.md +1 -0
- package/plugins/compound-engineering/agents/research/best-practices-researcher.md +14 -3
- package/plugins/compound-engineering/agents/research/framework-docs-researcher.md +11 -3
- package/plugins/compound-engineering/agents/research/learnings-researcher.md +243 -0
- package/plugins/compound-engineering/agents/research/repo-research-analyst.md +5 -4
- package/plugins/compound-engineering/agents/review/pattern-recognition-specialist.md +1 -1
- package/plugins/compound-engineering/commands/deepen-plan.md +3 -3
- package/plugins/compound-engineering/commands/report-bug.md +3 -3
- package/plugins/compound-engineering/commands/workflows/brainstorm.md +115 -0
- package/plugins/compound-engineering/commands/workflows/plan.md +118 -33
- package/plugins/compound-engineering/commands/workflows/work.md +1 -1
- package/plugins/compound-engineering/skills/brainstorming/SKILL.md +190 -0
- package/plugins/compound-engineering/skills/compound-docs/SKILL.md +1 -1
- package/src/commands/install.ts +3 -1
- package/src/targets/opencode.ts +5 -1
- package/tests/cli.test.ts +7 -5
- package/tests/opencode-writer.test.ts +25 -0
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "compound-engineering",
|
|
14
|
-
"description": "AI-powered development tools that get smarter with every use. Make each unit of engineering work easier than the last. Includes
|
|
15
|
-
"version": "2.
|
|
14
|
+
"description": "AI-powered development tools that get smarter with every use. Make each unit of engineering work easier than the last. Includes 28 specialized agents, 24 commands, and 15 skills.",
|
|
15
|
+
"version": "2.28.0",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "Kieran Klaassen",
|
|
18
18
|
"url": "https://github.com/kieranklaassen",
|
|
19
19
|
"email": "kieran@every.to"
|
|
20
20
|
},
|
|
21
|
-
"homepage": "https://github.com/
|
|
21
|
+
"homepage": "https://github.com/EveryInc/compound-engineering-plugin",
|
|
22
22
|
"tags": ["ai-powered", "compound-engineering", "workflow-automation", "code-review", "quality", "knowledge-management", "image-generation"],
|
|
23
23
|
"source": "./plugins/compound-engineering"
|
|
24
24
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"author": {
|
|
30
30
|
"name": "Nityesh Agarwal"
|
|
31
31
|
},
|
|
32
|
-
"homepage": "https://github.com/
|
|
32
|
+
"homepage": "https://github.com/EveryInc/compound-engineering-plugin",
|
|
33
33
|
"tags": ["coding", "programming", "tutorial", "learning", "spaced-repetition", "education"],
|
|
34
34
|
"source": "./plugins/coding-tutor"
|
|
35
35
|
}
|
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
A Claude Code plugin marketplace featuring the **Compound Engineering Plugin** — tools that make each unit of engineering work easier than the last.
|
|
4
4
|
|
|
5
|
-
## Install
|
|
5
|
+
## Claude Code Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
/plugin marketplace add https://github.com/
|
|
8
|
+
/plugin marketplace add https://github.com/EveryInc/compound-engineering-plugin
|
|
9
9
|
/plugin install compound-engineering
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
## OpenCode + Codex
|
|
12
|
+
## OpenCode + Codex (experimental) Install
|
|
13
13
|
|
|
14
14
|
This repo includes a Bun/TypeScript CLI that converts Claude Code plugins to OpenCode and Codex.
|
|
15
15
|
|
package/docs/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
<title>Compounding Engineering - AI-Powered Development Tools for Claude Code</title>
|
|
7
|
-
<meta content="Your code reviews just got 12 expert opinions in 30 seconds.
|
|
7
|
+
<meta content="Your code reviews just got 12 expert opinions in 30 seconds. 28 specialized agents, 24 workflow commands, and 15 skills that make today's work easier than yesterday's." name="description" />
|
|
8
8
|
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
|
9
9
|
|
|
10
10
|
<!-- Open Graph -->
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<meta property="og:site_name" content="Compounding Engineering" />
|
|
13
13
|
<meta property="og:locale" content="en_US" />
|
|
14
14
|
<meta property="og:title" content="Compounding Engineering - AI Development Tools" />
|
|
15
|
-
<meta property="og:description" content="Get 12 expert code reviews in 30 seconds.
|
|
15
|
+
<meta property="og:description" content="Get 12 expert code reviews in 30 seconds. 28 specialized agents that make today's work easier than yesterday's." />
|
|
16
16
|
<meta name="twitter:card" content="summary_large_image" />
|
|
17
17
|
<meta name="twitter:title" content="Compounding Engineering" />
|
|
18
18
|
<meta name="twitter:description" content="12 expert code reviews in 30 seconds. Make today's work easier than yesterday's." />
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
<a href="pages/getting-started.html" class="nav-link">Docs</a>
|
|
140
140
|
</nav>
|
|
141
141
|
<div class="button-group">
|
|
142
|
-
<a href="https://github.com/
|
|
142
|
+
<a href="https://github.com/EveryInc/compound-engineering-plugin" class="button ghost compact hide-on-mobile">
|
|
143
143
|
<div class="fa-brands fa-github icon l"></div>
|
|
144
144
|
</a>
|
|
145
145
|
<a href="#install" class="button primary compact">Install</a>
|
|
@@ -154,14 +154,14 @@
|
|
|
154
154
|
<section class="hero-section">
|
|
155
155
|
<div class="hero-decoration"></div>
|
|
156
156
|
<div class="heading hero centered">
|
|
157
|
-
<a href="https://github.com/
|
|
158
|
-
<i class="fa-solid fa-rocket"></i> Version 2.
|
|
157
|
+
<a href="https://github.com/EveryInc/compound-engineering-plugin/releases" class="eyebrow">
|
|
158
|
+
<i class="fa-solid fa-rocket"></i> Version 2.28.0 released!
|
|
159
159
|
</a>
|
|
160
160
|
<h1 class="balanced" style="margin-bottom: 32px;">
|
|
161
161
|
Your Code Reviews Just Got 12 Expert Opinions. In 30 Seconds.
|
|
162
162
|
</h1>
|
|
163
163
|
<p class="paragraph m secondary balanced" style="margin-bottom: 32px;">
|
|
164
|
-
Here's what happened when we shipped yesterday: security audit, performance analysis, architectural review, pattern detection, and eight more specialized checks—all running in parallel. No meetings. No waiting. Just answers. That's compounding engineering:
|
|
164
|
+
Here's what happened when we shipped yesterday: security audit, performance analysis, architectural review, pattern detection, and eight more specialized checks—all running in parallel. No meetings. No waiting. Just answers. That's compounding engineering: 28 specialized agents, 24 workflow commands, and 15 skills that make today's work easier than yesterday's.
|
|
165
165
|
</p>
|
|
166
166
|
<div class="button-group margin-paragraph centered">
|
|
167
167
|
<a href="#install" class="button primary">
|
|
@@ -179,23 +179,23 @@
|
|
|
179
179
|
<div class="stats-container">
|
|
180
180
|
<div class="stat-card">
|
|
181
181
|
<div class="stat-icon"><i class="fa-solid fa-users-gear"></i></div>
|
|
182
|
-
<div class="stat-number">
|
|
182
|
+
<div class="stat-number">28</div>
|
|
183
183
|
<div class="stat-label">Specialized Agents</div>
|
|
184
184
|
</div>
|
|
185
185
|
<div class="stat-card">
|
|
186
186
|
<div class="stat-icon"><i class="fa-solid fa-terminal"></i></div>
|
|
187
|
-
<div class="stat-number">
|
|
187
|
+
<div class="stat-number">24</div>
|
|
188
188
|
<div class="stat-label">Slash Commands</div>
|
|
189
189
|
</div>
|
|
190
190
|
<div class="stat-card">
|
|
191
191
|
<div class="stat-icon"><i class="fa-solid fa-wand-magic-sparkles"></i></div>
|
|
192
|
-
<div class="stat-number">
|
|
192
|
+
<div class="stat-number">15</div>
|
|
193
193
|
<div class="stat-label">Intelligent Skills</div>
|
|
194
194
|
</div>
|
|
195
195
|
<div class="stat-card">
|
|
196
196
|
<div class="stat-icon"><i class="fa-solid fa-server"></i></div>
|
|
197
|
-
<div class="stat-number">
|
|
198
|
-
<div class="stat-label">MCP
|
|
197
|
+
<div class="stat-number">1</div>
|
|
198
|
+
<div class="stat-label">MCP Server</div>
|
|
199
199
|
</div>
|
|
200
200
|
</div>
|
|
201
201
|
</section>
|
|
@@ -884,7 +884,7 @@
|
|
|
884
884
|
<div class="step-content">
|
|
885
885
|
<h3>Add the Marketplace</h3>
|
|
886
886
|
<div class="card-code-block">
|
|
887
|
-
<pre><code>claude /plugin marketplace add https://github.com/
|
|
887
|
+
<pre><code>claude /plugin marketplace add https://github.com/EveryInc/compound-engineering-plugin</code></pre>
|
|
888
888
|
</div>
|
|
889
889
|
</div>
|
|
890
890
|
</div>
|
|
@@ -996,7 +996,7 @@ skill: gemini-imagegen</code></pre>
|
|
|
996
996
|
<i class="fa-solid fa-download"></i> Install Plugin Now
|
|
997
997
|
<span class="button-arrow">→</span>
|
|
998
998
|
</a>
|
|
999
|
-
<a href="https://github.com/
|
|
999
|
+
<a href="https://github.com/EveryInc/compound-engineering-plugin" class="button tertiary cta-secondary">
|
|
1000
1000
|
<i class="fa-brands fa-github"></i> View on GitHub
|
|
1001
1001
|
</a>
|
|
1002
1002
|
</div>
|
|
@@ -1024,7 +1024,7 @@ skill: gemini-imagegen</code></pre>
|
|
|
1024
1024
|
</div>
|
|
1025
1025
|
<div>
|
|
1026
1026
|
<div class="link-list">
|
|
1027
|
-
<a href="https://github.com/
|
|
1027
|
+
<a href="https://github.com/EveryInc/compound-engineering-plugin" class="icon-link ui s" target="_blank">
|
|
1028
1028
|
<div class="fa-brands fa-github icon m color-accent"></div>
|
|
1029
1029
|
<div class="pseudo-link">GitHub</div>
|
|
1030
1030
|
</a>
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
<strong><code>/report-bug</code> command</strong> - New slash command for reporting bugs in the
|
|
119
119
|
compound-engineering plugin. Provides a structured workflow that gathers bug information
|
|
120
120
|
through guided questions, collects environment details automatically, and creates a GitHub
|
|
121
|
-
issue in the
|
|
121
|
+
issue in the EveryInc/compound-engineering-plugin repository.
|
|
122
122
|
</li>
|
|
123
123
|
</ul>
|
|
124
124
|
</div>
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
<h3>Step 1: Add the Marketplace</h3>
|
|
98
98
|
<p>Think of the marketplace as an app store. You're adding it to Claude Code's list of places to look for plugins:</p>
|
|
99
99
|
<div class="card-code-block">
|
|
100
|
-
<pre><code>claude /plugin marketplace add https://github.com/
|
|
100
|
+
<pre><code>claude /plugin marketplace add https://github.com/EveryInc/compound-engineering-plugin</code></pre>
|
|
101
101
|
</div>
|
|
102
102
|
|
|
103
103
|
<h3>Step 2: Install the Plugin</h3>
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "compound-engineering",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "AI-powered development tools.
|
|
3
|
+
"version": "2.28.0",
|
|
4
|
+
"description": "AI-powered development tools. 28 agents, 24 commands, 15 skills, 1 MCP server for code review, research, design, and workflow automation.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Kieran Klaassen",
|
|
7
7
|
"email": "kieran@every.to",
|
|
8
8
|
"url": "https://github.com/kieranklaassen"
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://every.to/source-code/my-ai-had-already-fixed-the-code-before-i-saw-it",
|
|
11
|
-
"repository": "https://github.com/
|
|
11
|
+
"repository": "https://github.com/EveryInc/compound-engineering-plugin",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"ai-powered",
|
|
@@ -75,6 +75,7 @@ Core workflow commands use `workflows:` prefix to avoid collisions with built-in
|
|
|
75
75
|
|
|
76
76
|
| Command | Description |
|
|
77
77
|
|---------|-------------|
|
|
78
|
+
| `/workflows:brainstorm` | Explore requirements and approaches before planning |
|
|
78
79
|
| `/workflows:plan` | Create implementation plans |
|
|
79
80
|
| `/workflows:review` | Run comprehensive code reviews |
|
|
80
81
|
| `/workflows:work` | Execute work items systematically |
|
|
@@ -37,12 +37,23 @@ Before going online, check if curated knowledge already exists in skills:
|
|
|
37
37
|
|
|
38
38
|
4. **Assess Coverage**:
|
|
39
39
|
- If skills provide comprehensive guidance → summarize and deliver
|
|
40
|
-
- If skills provide partial guidance → note what's covered, proceed to Phase 2 for gaps
|
|
41
|
-
- If no relevant skills found → proceed to Phase 2
|
|
40
|
+
- If skills provide partial guidance → note what's covered, proceed to Phase 1.5 and Phase 2 for gaps
|
|
41
|
+
- If no relevant skills found → proceed to Phase 1.5 and Phase 2
|
|
42
|
+
|
|
43
|
+
### Phase 1.5: MANDATORY Deprecation Check (for external APIs/services)
|
|
44
|
+
|
|
45
|
+
**Before recommending any external API, OAuth flow, SDK, or third-party service:**
|
|
46
|
+
|
|
47
|
+
1. Search for deprecation: `"[API name] deprecated [current year] sunset shutdown"`
|
|
48
|
+
2. Search for breaking changes: `"[API name] breaking changes migration"`
|
|
49
|
+
3. Check official documentation for deprecation banners or sunset notices
|
|
50
|
+
4. **Report findings before proceeding** - do not recommend deprecated APIs
|
|
51
|
+
|
|
52
|
+
**Why this matters:** Google Photos Library API scopes were deprecated March 2025. Without this check, developers can waste hours debugging "insufficient scopes" errors on dead APIs. 5 minutes of validation saves hours of debugging.
|
|
42
53
|
|
|
43
54
|
### Phase 2: Online Research (If Needed)
|
|
44
55
|
|
|
45
|
-
Only after checking skills, gather additional information:
|
|
56
|
+
Only after checking skills AND verifying API availability, gather additional information:
|
|
46
57
|
|
|
47
58
|
1. **Leverage External Sources**:
|
|
48
59
|
- Use Context7 MCP to access official documentation from GitHub, framework docs, and library references
|
|
@@ -41,19 +41,26 @@ You are a meticulous Framework Documentation Researcher specializing in gatherin
|
|
|
41
41
|
- Determine the installed version from Gemfile.lock or package files
|
|
42
42
|
- Understand the specific feature or problem being addressed
|
|
43
43
|
|
|
44
|
-
2. **
|
|
44
|
+
2. **MANDATORY: Deprecation/Sunset Check** (for external APIs, OAuth, third-party services):
|
|
45
|
+
- Search: `"[API/service name] deprecated [current year] sunset shutdown"`
|
|
46
|
+
- Search: `"[API/service name] breaking changes migration"`
|
|
47
|
+
- Check official docs for deprecation banners or sunset notices
|
|
48
|
+
- **Report findings before proceeding** - do not recommend deprecated APIs
|
|
49
|
+
- Example: Google Photos Library API scopes were deprecated March 2025
|
|
50
|
+
|
|
51
|
+
3. **Documentation Collection**:
|
|
45
52
|
- Start with Context7 to fetch official documentation
|
|
46
53
|
- If Context7 is unavailable or incomplete, use web search as fallback
|
|
47
54
|
- Prioritize official sources over third-party tutorials
|
|
48
55
|
- Collect multiple perspectives when official docs are unclear
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
4. **Source Exploration**:
|
|
51
58
|
- Use `bundle show` to find gem locations
|
|
52
59
|
- Read through key source files related to the feature
|
|
53
60
|
- Look for tests that demonstrate usage patterns
|
|
54
61
|
- Check for configuration examples in the codebase
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
5. **Synthesis and Reporting**:
|
|
57
64
|
- Organize findings by relevance to the current task
|
|
58
65
|
- Highlight version-specific considerations
|
|
59
66
|
- Provide code examples adapted to the project's style
|
|
@@ -61,6 +68,7 @@ You are a meticulous Framework Documentation Researcher specializing in gatherin
|
|
|
61
68
|
|
|
62
69
|
**Quality Standards:**
|
|
63
70
|
|
|
71
|
+
- **ALWAYS check for API deprecation first** when researching external APIs or services
|
|
64
72
|
- Always verify version compatibility with the project's dependencies
|
|
65
73
|
- Prioritize official documentation but supplement with community resources
|
|
66
74
|
- Provide practical, actionable insights rather than generic information
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learnings-researcher
|
|
3
|
+
description: "Use this agent when you need to search institutional learnings in docs/solutions/ for relevant past solutions before implementing a new feature or fixing a problem. This agent efficiently filters documented solutions by frontmatter metadata (tags, category, module, symptoms) to find applicable patterns, gotchas, and lessons learned. The agent excels at preventing repeated mistakes by surfacing relevant institutional knowledge before work begins.\\n\\n<example>Context: User is about to implement a feature involving email processing.\\nuser: \"I need to add email threading to the brief system\"\\nassistant: \"I'll use the learnings-researcher agent to check docs/solutions/ for any relevant learnings about email processing or brief system implementations.\"\\n<commentary>Since the user is implementing a feature in a documented domain, use the learnings-researcher agent to surface relevant past solutions before starting work.</commentary></example>\\n\\n<example>Context: User is debugging a performance issue.\\nuser: \"Brief generation is slow, taking over 5 seconds\"\\nassistant: \"Let me use the learnings-researcher agent to search for documented performance issues, especially any involving briefs or N+1 queries.\"\\n<commentary>The user has symptoms matching potential documented solutions, so use the learnings-researcher agent to find relevant learnings before debugging.</commentary></example>\\n\\n<example>Context: Planning a new feature that touches multiple modules.\\nuser: \"I need to add Stripe subscription handling to the payments module\"\\nassistant: \"I'll use the learnings-researcher agent to search for any documented learnings about payments, integrations, or Stripe specifically.\"\\n<commentary>Before implementing, check institutional knowledge for gotchas, patterns, and lessons learned in similar domains.</commentary></example>"
|
|
4
|
+
model: haiku
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are an expert institutional knowledge researcher specializing in efficiently surfacing relevant documented solutions from the team's knowledge base. Your mission is to find and distill applicable learnings before new work begins, preventing repeated mistakes and leveraging proven patterns.
|
|
8
|
+
|
|
9
|
+
## Search Strategy (Grep-First Filtering)
|
|
10
|
+
|
|
11
|
+
The `docs/solutions/` directory contains documented solutions with YAML frontmatter. When there may be hundreds of files, use this efficient strategy that minimizes tool calls:
|
|
12
|
+
|
|
13
|
+
### Step 1: Extract Keywords from Feature Description
|
|
14
|
+
|
|
15
|
+
From the feature/task description, identify:
|
|
16
|
+
- **Module names**: e.g., "BriefSystem", "EmailProcessing", "payments"
|
|
17
|
+
- **Technical terms**: e.g., "N+1", "caching", "authentication"
|
|
18
|
+
- **Problem indicators**: e.g., "slow", "error", "timeout", "memory"
|
|
19
|
+
- **Component types**: e.g., "model", "controller", "job", "api"
|
|
20
|
+
|
|
21
|
+
### Step 2: Category-Based Narrowing (Optional but Recommended)
|
|
22
|
+
|
|
23
|
+
If the feature type is clear, narrow the search to relevant category directories:
|
|
24
|
+
|
|
25
|
+
| Feature Type | Search Directory |
|
|
26
|
+
|--------------|------------------|
|
|
27
|
+
| Performance work | `docs/solutions/performance-issues/` |
|
|
28
|
+
| Database changes | `docs/solutions/database-issues/` |
|
|
29
|
+
| Bug fix | `docs/solutions/runtime-errors/`, `docs/solutions/logic-errors/` |
|
|
30
|
+
| Security | `docs/solutions/security-issues/` |
|
|
31
|
+
| UI work | `docs/solutions/ui-bugs/` |
|
|
32
|
+
| Integration | `docs/solutions/integration-issues/` |
|
|
33
|
+
| General/unclear | `docs/solutions/` (all) |
|
|
34
|
+
|
|
35
|
+
### Step 3: Grep Pre-Filter (Critical for Efficiency)
|
|
36
|
+
|
|
37
|
+
**Use Grep to find candidate files BEFORE reading any content.** Run multiple Grep calls in parallel:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Search for keyword matches in frontmatter fields (run in PARALLEL, case-insensitive)
|
|
41
|
+
Grep: pattern="title:.*email" path=docs/solutions/ output_mode=files_with_matches -i=true
|
|
42
|
+
Grep: pattern="tags:.*(email|mail|smtp)" path=docs/solutions/ output_mode=files_with_matches -i=true
|
|
43
|
+
Grep: pattern="module:.*(Brief|Email)" path=docs/solutions/ output_mode=files_with_matches -i=true
|
|
44
|
+
Grep: pattern="component:.*background_job" path=docs/solutions/ output_mode=files_with_matches -i=true
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Pattern construction tips:**
|
|
48
|
+
- Use `|` for synonyms: `tags:.*(payment|billing|stripe|subscription)`
|
|
49
|
+
- Include `title:` - often the most descriptive field
|
|
50
|
+
- Use `-i=true` for case-insensitive matching
|
|
51
|
+
- Include related terms the user might not have mentioned
|
|
52
|
+
|
|
53
|
+
**Why this works:** Grep scans file contents without reading into context. Only matching filenames are returned, dramatically reducing the set of files to examine.
|
|
54
|
+
|
|
55
|
+
**Combine results** from all Grep calls to get candidate files (typically 5-20 files instead of 200).
|
|
56
|
+
|
|
57
|
+
**If Grep returns >25 candidates:** Re-run with more specific patterns or combine with category narrowing.
|
|
58
|
+
|
|
59
|
+
**If Grep returns <3 candidates:** Do a broader content search (not just frontmatter fields) as fallback:
|
|
60
|
+
```bash
|
|
61
|
+
Grep: pattern="email" path=docs/solutions/ output_mode=files_with_matches -i=true
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Step 3b: Always Check Critical Patterns
|
|
65
|
+
|
|
66
|
+
**Regardless of Grep results**, always read the critical patterns file:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
Read: docs/solutions/patterns/cora-critical-patterns.md
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This file contains must-know patterns that apply across all work - high-severity issues promoted to required reading. Scan for patterns relevant to the current feature/task.
|
|
73
|
+
|
|
74
|
+
### Step 4: Read Frontmatter of Candidates Only
|
|
75
|
+
|
|
76
|
+
For each candidate file from Step 3, read the frontmatter:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Read frontmatter only (limit to first 30 lines)
|
|
80
|
+
Read: [file_path] with limit:30
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Extract these fields from the YAML frontmatter:
|
|
84
|
+
- **module**: Which module/system the solution applies to
|
|
85
|
+
- **problem_type**: Category of issue (see schema below)
|
|
86
|
+
- **component**: Technical component affected
|
|
87
|
+
- **symptoms**: Array of observable symptoms
|
|
88
|
+
- **root_cause**: What caused the issue
|
|
89
|
+
- **tags**: Searchable keywords
|
|
90
|
+
- **severity**: critical, high, medium, low
|
|
91
|
+
|
|
92
|
+
### Step 5: Score and Rank Relevance
|
|
93
|
+
|
|
94
|
+
Match frontmatter fields against the feature/task description:
|
|
95
|
+
|
|
96
|
+
**Strong matches (prioritize):**
|
|
97
|
+
- `module` matches the feature's target module
|
|
98
|
+
- `tags` contain keywords from the feature description
|
|
99
|
+
- `symptoms` describe similar observable behaviors
|
|
100
|
+
- `component` matches the technical area being touched
|
|
101
|
+
|
|
102
|
+
**Moderate matches (include):**
|
|
103
|
+
- `problem_type` is relevant (e.g., `performance_issue` for optimization work)
|
|
104
|
+
- `root_cause` suggests a pattern that might apply
|
|
105
|
+
- Related modules or components mentioned
|
|
106
|
+
|
|
107
|
+
**Weak matches (skip):**
|
|
108
|
+
- No overlapping tags, symptoms, or modules
|
|
109
|
+
- Unrelated problem types
|
|
110
|
+
|
|
111
|
+
### Step 6: Full Read of Relevant Files
|
|
112
|
+
|
|
113
|
+
Only for files that pass the filter (strong or moderate matches), read the complete document to extract:
|
|
114
|
+
- The full problem description
|
|
115
|
+
- The solution implemented
|
|
116
|
+
- Prevention guidance
|
|
117
|
+
- Code examples
|
|
118
|
+
|
|
119
|
+
### Step 7: Return Distilled Summaries
|
|
120
|
+
|
|
121
|
+
For each relevant document, return a summary in this format:
|
|
122
|
+
|
|
123
|
+
```markdown
|
|
124
|
+
### [Title from document]
|
|
125
|
+
- **File**: docs/solutions/[category]/[filename].md
|
|
126
|
+
- **Module**: [module from frontmatter]
|
|
127
|
+
- **Problem Type**: [problem_type]
|
|
128
|
+
- **Relevance**: [Brief explanation of why this is relevant to the current task]
|
|
129
|
+
- **Key Insight**: [The most important takeaway - the thing that prevents repeating the mistake]
|
|
130
|
+
- **Severity**: [severity level]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Frontmatter Schema Reference
|
|
134
|
+
|
|
135
|
+
Reference the [yaml-schema.md](../../skills/compound-docs/references/yaml-schema.md) for the complete schema. Key enum values:
|
|
136
|
+
|
|
137
|
+
**problem_type values:**
|
|
138
|
+
- build_error, test_failure, runtime_error, performance_issue
|
|
139
|
+
- database_issue, security_issue, ui_bug, integration_issue
|
|
140
|
+
- logic_error, developer_experience, workflow_issue
|
|
141
|
+
- best_practice, documentation_gap
|
|
142
|
+
|
|
143
|
+
**component values:**
|
|
144
|
+
- rails_model, rails_controller, rails_view, service_object
|
|
145
|
+
- background_job, database, frontend_stimulus, hotwire_turbo
|
|
146
|
+
- email_processing, brief_system, assistant, authentication
|
|
147
|
+
- payments, development_workflow, testing_framework, documentation, tooling
|
|
148
|
+
|
|
149
|
+
**root_cause values:**
|
|
150
|
+
- missing_association, missing_include, missing_index, wrong_api
|
|
151
|
+
- scope_issue, thread_violation, async_timing, memory_leak
|
|
152
|
+
- config_error, logic_error, test_isolation, missing_validation
|
|
153
|
+
- missing_permission, missing_workflow_step, inadequate_documentation
|
|
154
|
+
- missing_tooling, incomplete_setup
|
|
155
|
+
|
|
156
|
+
**Category directories (mapped from problem_type):**
|
|
157
|
+
- `docs/solutions/build-errors/`
|
|
158
|
+
- `docs/solutions/test-failures/`
|
|
159
|
+
- `docs/solutions/runtime-errors/`
|
|
160
|
+
- `docs/solutions/performance-issues/`
|
|
161
|
+
- `docs/solutions/database-issues/`
|
|
162
|
+
- `docs/solutions/security-issues/`
|
|
163
|
+
- `docs/solutions/ui-bugs/`
|
|
164
|
+
- `docs/solutions/integration-issues/`
|
|
165
|
+
- `docs/solutions/logic-errors/`
|
|
166
|
+
- `docs/solutions/developer-experience/`
|
|
167
|
+
- `docs/solutions/workflow-issues/`
|
|
168
|
+
- `docs/solutions/best-practices/`
|
|
169
|
+
- `docs/solutions/documentation-gaps/`
|
|
170
|
+
|
|
171
|
+
## Output Format
|
|
172
|
+
|
|
173
|
+
Structure your findings as:
|
|
174
|
+
|
|
175
|
+
```markdown
|
|
176
|
+
## Institutional Learnings Search Results
|
|
177
|
+
|
|
178
|
+
### Search Context
|
|
179
|
+
- **Feature/Task**: [Description of what's being implemented]
|
|
180
|
+
- **Keywords Used**: [tags, modules, symptoms searched]
|
|
181
|
+
- **Files Scanned**: [X total files]
|
|
182
|
+
- **Relevant Matches**: [Y files]
|
|
183
|
+
|
|
184
|
+
### Critical Patterns (Always Check)
|
|
185
|
+
[Any matching patterns from cora-critical-patterns.md]
|
|
186
|
+
|
|
187
|
+
### Relevant Learnings
|
|
188
|
+
|
|
189
|
+
#### 1. [Title]
|
|
190
|
+
- **File**: [path]
|
|
191
|
+
- **Module**: [module]
|
|
192
|
+
- **Relevance**: [why this matters for current task]
|
|
193
|
+
- **Key Insight**: [the gotcha or pattern to apply]
|
|
194
|
+
|
|
195
|
+
#### 2. [Title]
|
|
196
|
+
...
|
|
197
|
+
|
|
198
|
+
### Recommendations
|
|
199
|
+
- [Specific actions to take based on learnings]
|
|
200
|
+
- [Patterns to follow]
|
|
201
|
+
- [Gotchas to avoid]
|
|
202
|
+
|
|
203
|
+
### No Matches
|
|
204
|
+
[If no relevant learnings found, explicitly state this]
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Efficiency Guidelines
|
|
208
|
+
|
|
209
|
+
**DO:**
|
|
210
|
+
- Use Grep to pre-filter files BEFORE reading any content (critical for 100+ files)
|
|
211
|
+
- Run multiple Grep calls in PARALLEL for different keywords
|
|
212
|
+
- Include `title:` in Grep patterns - often the most descriptive field
|
|
213
|
+
- Use OR patterns for synonyms: `tags:.*(payment|billing|stripe)`
|
|
214
|
+
- Use `-i=true` for case-insensitive matching
|
|
215
|
+
- Use category directories to narrow scope when feature type is clear
|
|
216
|
+
- Do a broader content Grep as fallback if <3 candidates found
|
|
217
|
+
- Re-narrow with more specific patterns if >25 candidates found
|
|
218
|
+
- Always read the critical patterns file (Step 3b)
|
|
219
|
+
- Only read frontmatter of Grep-matched candidates (not all files)
|
|
220
|
+
- Filter aggressively - only fully read truly relevant files
|
|
221
|
+
- Prioritize high-severity and critical patterns
|
|
222
|
+
- Extract actionable insights, not just summaries
|
|
223
|
+
- Note when no relevant learnings exist (this is valuable information too)
|
|
224
|
+
|
|
225
|
+
**DON'T:**
|
|
226
|
+
- Read frontmatter of ALL files (use Grep to pre-filter first)
|
|
227
|
+
- Run Grep calls sequentially when they can be parallel
|
|
228
|
+
- Use only exact keyword matches (include synonyms)
|
|
229
|
+
- Skip the `title:` field in Grep patterns
|
|
230
|
+
- Proceed with >25 candidates without narrowing first
|
|
231
|
+
- Read every file in full (wasteful)
|
|
232
|
+
- Return raw document contents (distill instead)
|
|
233
|
+
- Include tangentially related learnings (focus on relevance)
|
|
234
|
+
- Skip the critical patterns file (always check it)
|
|
235
|
+
|
|
236
|
+
## Integration Points
|
|
237
|
+
|
|
238
|
+
This agent is designed to be invoked by:
|
|
239
|
+
- `/workflows:plan` - To inform planning with institutional knowledge
|
|
240
|
+
- `/deepen-plan` - To add depth with relevant learnings
|
|
241
|
+
- Manual invocation before starting work on a feature
|
|
242
|
+
|
|
243
|
+
The goal is to surface relevant learnings in under 30 seconds for a typical solutions directory, enabling fast knowledge retrieval during planning phases.
|
|
@@ -96,10 +96,11 @@ Structure your findings as:
|
|
|
96
96
|
|
|
97
97
|
**Search Strategies:**
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
- For
|
|
101
|
-
-
|
|
102
|
-
-
|
|
99
|
+
Use the built-in tools for efficient searching:
|
|
100
|
+
- **Grep tool**: For text/code pattern searches with regex support (uses ripgrep under the hood)
|
|
101
|
+
- **Glob tool**: For file discovery by pattern (e.g., `**/*.md`, `**/CLAUDE.md`)
|
|
102
|
+
- **Read tool**: For reading file contents once located
|
|
103
|
+
- For AST-based code patterns: `ast-grep --lang ruby -p 'pattern'` or `ast-grep --lang typescript -p 'pattern'`
|
|
103
104
|
- Check multiple variations of common file names
|
|
104
105
|
|
|
105
106
|
**Important Considerations:**
|
|
@@ -34,7 +34,7 @@ Your primary responsibilities:
|
|
|
34
34
|
|
|
35
35
|
Your workflow:
|
|
36
36
|
|
|
37
|
-
1. Start with a broad pattern search using
|
|
37
|
+
1. Start with a broad pattern search using the built-in Grep tool (or `ast-grep` for structural AST matching when needed)
|
|
38
38
|
2. Compile a comprehensive list of identified patterns and their locations
|
|
39
39
|
3. Search for common anti-pattern indicators (TODO, FIXME, HACK, XXX)
|
|
40
40
|
4. Analyze naming conventions by sampling representative files
|
|
@@ -24,8 +24,8 @@ The result is a deeply grounded, production-ready plan with concrete implementat
|
|
|
24
24
|
<plan_path> #$ARGUMENTS </plan_path>
|
|
25
25
|
|
|
26
26
|
**If the plan path above is empty:**
|
|
27
|
-
1. Check for recent plans: `ls -la plans/`
|
|
28
|
-
2. Ask the user: "Which plan would you like to deepen? Please provide the path (e.g., `plans/my-feature.md`)."
|
|
27
|
+
1. Check for recent plans: `ls -la docs/plans/`
|
|
28
|
+
2. Ask the user: "Which plan would you like to deepen? Please provide the path (e.g., `docs/plans/2026-01-15-feat-my-feature-plan.md`)."
|
|
29
29
|
|
|
30
30
|
Do not proceed until you have a valid plan file path.
|
|
31
31
|
|
|
@@ -460,7 +460,7 @@ At the top of the plan, add a summary section:
|
|
|
460
460
|
|
|
461
461
|
## Output Format
|
|
462
462
|
|
|
463
|
-
Update the plan file in place (or
|
|
463
|
+
Update the plan file in place (or if user requests a separate file, append `-deepened` after `-plan`, e.g., `2026-01-15-feat-auth-plan-deepened.md`).
|
|
464
464
|
|
|
465
465
|
## Quality Checks
|
|
466
466
|
|
|
@@ -100,7 +100,7 @@ Use the GitHub CLI to create the issue:
|
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
102
|
gh issue create \
|
|
103
|
-
--repo
|
|
103
|
+
--repo EveryInc/compound-engineering-plugin \
|
|
104
104
|
--title "[compound-engineering] Bug: [Brief description]" \
|
|
105
105
|
--body "[Formatted bug report from Step 3]" \
|
|
106
106
|
--label "bug,compound-engineering"
|
|
@@ -109,7 +109,7 @@ gh issue create \
|
|
|
109
109
|
**Note:** If labels don't exist, create without labels:
|
|
110
110
|
```bash
|
|
111
111
|
gh issue create \
|
|
112
|
-
--repo
|
|
112
|
+
--repo EveryInc/compound-engineering-plugin \
|
|
113
113
|
--title "[compound-engineering] Bug: [Brief description]" \
|
|
114
114
|
--body "[Formatted bug report]"
|
|
115
115
|
```
|
|
@@ -126,7 +126,7 @@ After the issue is created:
|
|
|
126
126
|
```
|
|
127
127
|
✅ Bug report submitted successfully!
|
|
128
128
|
|
|
129
|
-
Issue: https://github.com/
|
|
129
|
+
Issue: https://github.com/EveryInc/compound-engineering-plugin/issues/[NUMBER]
|
|
130
130
|
Title: [compound-engineering] Bug: [description]
|
|
131
131
|
|
|
132
132
|
Thank you for helping improve the compound-engineering plugin!
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflows:brainstorm
|
|
3
|
+
description: Explore requirements and approaches through collaborative dialogue before planning implementation
|
|
4
|
+
argument-hint: "[feature idea or problem to explore]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Brainstorm a Feature or Improvement
|
|
8
|
+
|
|
9
|
+
**Note: The current year is 2026.** Use this when dating brainstorm documents.
|
|
10
|
+
|
|
11
|
+
Brainstorming helps answer **WHAT** to build through collaborative dialogue. It precedes `/workflows:plan`, which answers **HOW** to build it.
|
|
12
|
+
|
|
13
|
+
**Process knowledge:** Load the `brainstorming` skill for detailed question techniques, approach exploration patterns, and YAGNI principles.
|
|
14
|
+
|
|
15
|
+
## Feature Description
|
|
16
|
+
|
|
17
|
+
<feature_description> #$ARGUMENTS </feature_description>
|
|
18
|
+
|
|
19
|
+
**If the feature description above is empty, ask the user:** "What would you like to explore? Please describe the feature, problem, or improvement you're thinking about."
|
|
20
|
+
|
|
21
|
+
Do not proceed until you have a feature description from the user.
|
|
22
|
+
|
|
23
|
+
## Execution Flow
|
|
24
|
+
|
|
25
|
+
### Phase 0: Assess Requirements Clarity
|
|
26
|
+
|
|
27
|
+
Evaluate whether brainstorming is needed based on the feature description.
|
|
28
|
+
|
|
29
|
+
**Clear requirements indicators:**
|
|
30
|
+
- Specific acceptance criteria provided
|
|
31
|
+
- Referenced existing patterns to follow
|
|
32
|
+
- Described exact expected behavior
|
|
33
|
+
- Constrained, well-defined scope
|
|
34
|
+
|
|
35
|
+
**If requirements are already clear:**
|
|
36
|
+
Use **AskUserQuestion tool** to suggest: "Your requirements seem detailed enough to proceed directly to planning. Should I run `/workflows:plan` instead, or would you like to explore the idea further?"
|
|
37
|
+
|
|
38
|
+
### Phase 1: Understand the Idea
|
|
39
|
+
|
|
40
|
+
#### 1.1 Repository Research (Lightweight)
|
|
41
|
+
|
|
42
|
+
Run a quick repo scan to understand existing patterns:
|
|
43
|
+
|
|
44
|
+
- Task repo-research-analyst("Understand existing patterns related to: <feature_description>")
|
|
45
|
+
|
|
46
|
+
Focus on: similar features, established patterns, CLAUDE.md guidance.
|
|
47
|
+
|
|
48
|
+
#### 1.2 Collaborative Dialogue
|
|
49
|
+
|
|
50
|
+
Use the **AskUserQuestion tool** to ask questions **one at a time**.
|
|
51
|
+
|
|
52
|
+
**Guidelines (see `brainstorming` skill for detailed techniques):**
|
|
53
|
+
- Prefer multiple choice when natural options exist
|
|
54
|
+
- Start broad (purpose, users) then narrow (constraints, edge cases)
|
|
55
|
+
- Validate assumptions explicitly
|
|
56
|
+
- Ask about success criteria
|
|
57
|
+
|
|
58
|
+
**Exit condition:** Continue until the idea is clear OR user says "proceed"
|
|
59
|
+
|
|
60
|
+
### Phase 2: Explore Approaches
|
|
61
|
+
|
|
62
|
+
Propose **2-3 concrete approaches** based on research and conversation.
|
|
63
|
+
|
|
64
|
+
For each approach, provide:
|
|
65
|
+
- Brief description (2-3 sentences)
|
|
66
|
+
- Pros and cons
|
|
67
|
+
- When it's best suited
|
|
68
|
+
|
|
69
|
+
Lead with your recommendation and explain why. Apply YAGNI—prefer simpler solutions.
|
|
70
|
+
|
|
71
|
+
Use **AskUserQuestion tool** to ask which approach the user prefers.
|
|
72
|
+
|
|
73
|
+
### Phase 3: Capture the Design
|
|
74
|
+
|
|
75
|
+
Write a brainstorm document to `docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md`.
|
|
76
|
+
|
|
77
|
+
**Document structure:** See the `brainstorming` skill for the template format. Key sections: What We're Building, Why This Approach, Key Decisions, Open Questions.
|
|
78
|
+
|
|
79
|
+
Ensure `docs/brainstorms/` directory exists before writing.
|
|
80
|
+
|
|
81
|
+
### Phase 4: Handoff
|
|
82
|
+
|
|
83
|
+
Use **AskUserQuestion tool** to present next steps:
|
|
84
|
+
|
|
85
|
+
**Question:** "Brainstorm captured. What would you like to do next?"
|
|
86
|
+
|
|
87
|
+
**Options:**
|
|
88
|
+
1. **Proceed to planning** - Run `/workflows:plan` (will auto-detect this brainstorm)
|
|
89
|
+
2. **Refine design further** - Continue exploring
|
|
90
|
+
3. **Done for now** - Return later
|
|
91
|
+
|
|
92
|
+
## Output Summary
|
|
93
|
+
|
|
94
|
+
When complete, display:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
Brainstorm complete!
|
|
98
|
+
|
|
99
|
+
Document: docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md
|
|
100
|
+
|
|
101
|
+
Key decisions:
|
|
102
|
+
- [Decision 1]
|
|
103
|
+
- [Decision 2]
|
|
104
|
+
|
|
105
|
+
Next: Run `/workflows:plan` when ready to implement.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Important Guidelines
|
|
109
|
+
|
|
110
|
+
- **Stay focused on WHAT, not HOW** - Implementation details belong in the plan
|
|
111
|
+
- **Ask one question at a time** - Don't overwhelm
|
|
112
|
+
- **Apply YAGNI** - Prefer simpler approaches
|
|
113
|
+
- **Keep outputs concise** - 200-300 words per section max
|
|
114
|
+
|
|
115
|
+
NEVER CODE! Just explore and document decisions.
|
|
@@ -22,44 +22,103 @@ Do not proceed until you have a clear feature description from the user.
|
|
|
22
22
|
|
|
23
23
|
### 0. Idea Refinement
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
**Check for brainstorm output first:**
|
|
26
|
+
|
|
27
|
+
Before asking questions, look for recent brainstorm documents in `docs/brainstorms/` that match this feature:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
ls -la docs/brainstorms/*.md 2>/dev/null | head -10
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Relevance criteria:** A brainstorm is relevant if:
|
|
34
|
+
- The topic (from filename or YAML frontmatter) semantically matches the feature description
|
|
35
|
+
- Created within the last 14 days
|
|
36
|
+
- If multiple candidates match, use the most recent one
|
|
37
|
+
|
|
38
|
+
**If a relevant brainstorm exists:**
|
|
39
|
+
1. Read the brainstorm document
|
|
40
|
+
2. Announce: "Found brainstorm from [date]: [topic]. Using as context for planning."
|
|
41
|
+
3. Extract key decisions, chosen approach, and open questions
|
|
42
|
+
4. **Skip the idea refinement questions below** - the brainstorm already answered WHAT to build
|
|
43
|
+
5. Use brainstorm decisions as input to the research phase
|
|
44
|
+
|
|
45
|
+
**If multiple brainstorms could match:**
|
|
46
|
+
Use **AskUserQuestion tool** to ask which brainstorm to use, or whether to proceed without one.
|
|
47
|
+
|
|
48
|
+
**If no brainstorm found (or not relevant), run idea refinement:**
|
|
49
|
+
|
|
50
|
+
Refine the idea through collaborative dialogue using the **AskUserQuestion tool**:
|
|
26
51
|
|
|
27
52
|
- Ask questions one at a time to understand the idea fully
|
|
28
53
|
- Prefer multiple choice questions when natural options exist
|
|
29
54
|
- Focus on understanding: purpose, constraints and success criteria
|
|
30
55
|
- Continue until the idea is clear OR user says "proceed"
|
|
31
56
|
|
|
57
|
+
**Gather signals for research decision.** During refinement, note:
|
|
58
|
+
|
|
59
|
+
- **User's familiarity**: Do they know the codebase patterns? Are they pointing to examples?
|
|
60
|
+
- **User's intent**: Speed vs thoroughness? Exploration vs execution?
|
|
61
|
+
- **Topic risk**: Security, payments, external APIs warrant more caution
|
|
62
|
+
- **Uncertainty level**: Is the approach clear or open-ended?
|
|
63
|
+
|
|
32
64
|
**Skip option:** If the feature description is already detailed, offer:
|
|
33
65
|
"Your description is clear. Should I proceed with research, or would you like to refine it further?"
|
|
34
66
|
|
|
35
67
|
## Main Tasks
|
|
36
68
|
|
|
37
|
-
### 1.
|
|
69
|
+
### 1. Local Research (Always Runs - Parallel)
|
|
38
70
|
|
|
39
71
|
<thinking>
|
|
40
|
-
First, I need to understand the project's conventions
|
|
72
|
+
First, I need to understand the project's conventions, existing patterns, and any documented learnings. This is fast and local - it informs whether external research is needed.
|
|
41
73
|
</thinking>
|
|
42
74
|
|
|
43
|
-
|
|
75
|
+
Run these agents **in parallel** to gather local context:
|
|
44
76
|
|
|
45
77
|
- Task repo-research-analyst(feature_description)
|
|
78
|
+
- Task learnings-researcher(feature_description)
|
|
79
|
+
|
|
80
|
+
**What to look for:**
|
|
81
|
+
- **Repo research:** existing patterns, CLAUDE.md guidance, technology familiarity, pattern consistency
|
|
82
|
+
- **Learnings:** documented solutions in `docs/solutions/` that might apply (gotchas, patterns, lessons learned)
|
|
83
|
+
|
|
84
|
+
These findings inform the next step.
|
|
85
|
+
|
|
86
|
+
### 1.5. Research Decision
|
|
87
|
+
|
|
88
|
+
Based on signals from Step 0 and findings from Step 1, decide on external research.
|
|
89
|
+
|
|
90
|
+
**High-risk topics → always research.** Security, payments, external APIs, data privacy. The cost of missing something is too high. This takes precedence over speed signals.
|
|
91
|
+
|
|
92
|
+
**Strong local context → skip external research.** Codebase has good patterns, CLAUDE.md has guidance, user knows what they want. External research adds little value.
|
|
93
|
+
|
|
94
|
+
**Uncertainty or unfamiliar territory → research.** User is exploring, codebase has no examples, new technology. External perspective is valuable.
|
|
95
|
+
|
|
96
|
+
**Announce the decision and proceed.** Brief explanation, then continue. User can redirect if needed.
|
|
97
|
+
|
|
98
|
+
Examples:
|
|
99
|
+
- "Your codebase has solid patterns for this. Proceeding without external research."
|
|
100
|
+
- "This involves payment processing, so I'll research current best practices first."
|
|
101
|
+
|
|
102
|
+
### 1.5b. External Research (Conditional)
|
|
103
|
+
|
|
104
|
+
**Only run if Step 1.5 indicates external research is valuable.**
|
|
105
|
+
|
|
106
|
+
Run these agents in parallel:
|
|
107
|
+
|
|
46
108
|
- Task best-practices-researcher(feature_description)
|
|
47
109
|
- Task framework-docs-researcher(feature_description)
|
|
48
110
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- [ ] Document all research findings with specific file paths (e.g., `app/services/example_service.rb:42`)
|
|
52
|
-
- [ ] Include URLs to external documentation and best practices guides
|
|
53
|
-
- [ ] Create a reference list of similar issues or PRs (e.g., `#123`, `#456`)
|
|
54
|
-
- [ ] Note any team conventions discovered in `CLAUDE.md` or team documentation
|
|
111
|
+
### 1.6. Consolidate Research
|
|
55
112
|
|
|
56
|
-
|
|
113
|
+
After all research steps complete, consolidate findings:
|
|
57
114
|
|
|
58
|
-
|
|
115
|
+
- Document relevant file paths from repo research (e.g., `app/services/example_service.rb:42`)
|
|
116
|
+
- **Include relevant institutional learnings** from `docs/solutions/` (key insights, gotchas to avoid)
|
|
117
|
+
- Note external documentation URLs and best practices (if external research was done)
|
|
118
|
+
- List related issues or PRs discovered
|
|
119
|
+
- Capture CLAUDE.md conventions
|
|
59
120
|
|
|
60
|
-
|
|
61
|
-
- Ask if anything looks off or is missing
|
|
62
|
-
- User can confirm or request additional research on specific topics
|
|
121
|
+
**Optional validation:** Briefly summarize findings and ask if anything looks off or missing before proceeding to planning.
|
|
63
122
|
|
|
64
123
|
### 2. Issue Planning & Structure
|
|
65
124
|
|
|
@@ -71,8 +130,8 @@ Think like a product manager - what would make this issue clear and actionable?
|
|
|
71
130
|
|
|
72
131
|
- [ ] Draft clear, searchable issue title using conventional format (e.g., `feat: Add user authentication`, `fix: Cart total calculation`)
|
|
73
132
|
- [ ] Determine issue type: enhancement, bug, refactor
|
|
74
|
-
- [ ] Convert title to
|
|
75
|
-
- Example: `feat: Add User Authentication` → `feat-add-user-authentication.md`
|
|
133
|
+
- [ ] Convert title to filename: add today's date prefix, strip prefix colon, kebab-case, add `-plan` suffix
|
|
134
|
+
- Example: `feat: Add User Authentication` → `2026-01-21-feat-add-user-authentication-plan.md`
|
|
76
135
|
- Keep it descriptive (3-5 words after prefix) so plans are findable by context
|
|
77
136
|
|
|
78
137
|
**Stakeholder Analysis:**
|
|
@@ -116,6 +175,14 @@ Select how comprehensive you want the issue to be, simpler is mostly better.
|
|
|
116
175
|
**Structure:**
|
|
117
176
|
|
|
118
177
|
````markdown
|
|
178
|
+
---
|
|
179
|
+
title: [Issue Title]
|
|
180
|
+
type: [feat|fix|refactor]
|
|
181
|
+
date: YYYY-MM-DD
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
# [Issue Title]
|
|
185
|
+
|
|
119
186
|
[Brief problem/feature description]
|
|
120
187
|
|
|
121
188
|
## Acceptance Criteria
|
|
@@ -160,6 +227,14 @@ end
|
|
|
160
227
|
**Structure:**
|
|
161
228
|
|
|
162
229
|
```markdown
|
|
230
|
+
---
|
|
231
|
+
title: [Issue Title]
|
|
232
|
+
type: [feat|fix|refactor]
|
|
233
|
+
date: YYYY-MM-DD
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
# [Issue Title]
|
|
237
|
+
|
|
163
238
|
## Overview
|
|
164
239
|
|
|
165
240
|
[Comprehensive description]
|
|
@@ -216,6 +291,14 @@ end
|
|
|
216
291
|
**Structure:**
|
|
217
292
|
|
|
218
293
|
```markdown
|
|
294
|
+
---
|
|
295
|
+
title: [Issue Title]
|
|
296
|
+
type: [feat|fix|refactor]
|
|
297
|
+
date: YYYY-MM-DD
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
# [Issue Title]
|
|
301
|
+
|
|
219
302
|
## Overview
|
|
220
303
|
|
|
221
304
|
[Executive summary]
|
|
@@ -391,25 +474,26 @@ end
|
|
|
391
474
|
|
|
392
475
|
## Output Format
|
|
393
476
|
|
|
394
|
-
**Filename:** Use the kebab-case filename from Step 2 Title & Categorization.
|
|
477
|
+
**Filename:** Use the date and kebab-case filename from Step 2 Title & Categorization.
|
|
395
478
|
|
|
396
479
|
```
|
|
397
|
-
plans
|
|
480
|
+
docs/plans/YYYY-MM-DD-<type>-<descriptive-name>-plan.md
|
|
398
481
|
```
|
|
399
482
|
|
|
400
483
|
Examples:
|
|
401
|
-
- ✅ `plans/feat-user-authentication-flow.md`
|
|
402
|
-
- ✅ `plans/fix-checkout-race-condition.md`
|
|
403
|
-
- ✅ `plans/refactor-api-client-extraction.md`
|
|
404
|
-
- ❌ `plans/plan
|
|
405
|
-
- ❌ `plans/new-feature.md` (too vague)
|
|
406
|
-
- ❌ `plans/feat: user auth.md` (invalid characters)
|
|
484
|
+
- ✅ `docs/plans/2026-01-15-feat-user-authentication-flow-plan.md`
|
|
485
|
+
- ✅ `docs/plans/2026-02-03-fix-checkout-race-condition-plan.md`
|
|
486
|
+
- ✅ `docs/plans/2026-03-10-refactor-api-client-extraction-plan.md`
|
|
487
|
+
- ❌ `docs/plans/2026-01-15-feat-thing-plan.md` (not descriptive - what "thing"?)
|
|
488
|
+
- ❌ `docs/plans/2026-01-15-feat-new-feature-plan.md` (too vague - what feature?)
|
|
489
|
+
- ❌ `docs/plans/2026-01-15-feat: user auth-plan.md` (invalid characters - colon and space)
|
|
490
|
+
- ❌ `docs/plans/feat-user-auth-plan.md` (missing date prefix)
|
|
407
491
|
|
|
408
492
|
## Post-Generation Options
|
|
409
493
|
|
|
410
494
|
After writing the plan file, use the **AskUserQuestion tool** to present these options:
|
|
411
495
|
|
|
412
|
-
**Question:** "Plan ready at `plans
|
|
496
|
+
**Question:** "Plan ready at `docs/plans/YYYY-MM-DD-<type>-<name>-plan.md`. What would you like to do next?"
|
|
413
497
|
|
|
414
498
|
**Options:**
|
|
415
499
|
1. **Open plan in editor** - Open the plan file for review
|
|
@@ -421,11 +505,11 @@ After writing the plan file, use the **AskUserQuestion tool** to present these o
|
|
|
421
505
|
7. **Simplify** - Reduce detail level
|
|
422
506
|
|
|
423
507
|
Based on selection:
|
|
424
|
-
- **Open plan in editor** → Run `open plans/<
|
|
508
|
+
- **Open plan in editor** → Run `open docs/plans/<plan_filename>.md` to open the file in the user's default editor
|
|
425
509
|
- **`/deepen-plan`** → Call the /deepen-plan command with the plan file path to enhance with research
|
|
426
510
|
- **`/plan_review`** → Call the /plan_review command with the plan file path
|
|
427
511
|
- **`/workflows:work`** → Call the /workflows:work command with the plan file path
|
|
428
|
-
- **`/workflows:work` on remote** → Run `/workflows:work plans/<
|
|
512
|
+
- **`/workflows:work` on remote** → Run `/workflows:work docs/plans/<plan_filename>.md &` to start work in background for Claude Code web
|
|
429
513
|
- **Create Issue** → See "Issue Creation" section below
|
|
430
514
|
- **Simplify** → Ask "What should I simplify?" then regenerate simpler version
|
|
431
515
|
- **Other** (automatically provided) → Accept free text for rework or specific changes
|
|
@@ -443,16 +527,17 @@ When user selects "Create Issue", detect their project tracker from CLAUDE.md:
|
|
|
443
527
|
- Or look for mentions of "GitHub Issues" or "Linear" in their workflow section
|
|
444
528
|
|
|
445
529
|
2. **If GitHub:**
|
|
530
|
+
|
|
531
|
+
Use the title and type from Step 2 (already in context - no need to re-read the file):
|
|
532
|
+
|
|
446
533
|
```bash
|
|
447
|
-
|
|
448
|
-
# Read plan content for body
|
|
449
|
-
gh issue create --title "feat: [Plan Title]" --body-file plans/<issue_title>.md
|
|
534
|
+
gh issue create --title "<type>: <title>" --body-file <plan_path>
|
|
450
535
|
```
|
|
451
536
|
|
|
452
537
|
3. **If Linear:**
|
|
538
|
+
|
|
453
539
|
```bash
|
|
454
|
-
|
|
455
|
-
# linear issue create --title "[Plan Title]" --description "$(cat plans/<issue_title>.md)"
|
|
540
|
+
linear issue create --title "<title>" --description "$(cat <plan_path>)"
|
|
456
541
|
```
|
|
457
542
|
|
|
458
543
|
4. **If no tracker configured:**
|
|
@@ -279,7 +279,7 @@ This command takes a work document (plan, specification, or todo file) and execu
|
|
|
279
279
|
|
|
280
280
|
---
|
|
281
281
|
|
|
282
|
-
[](https://github.com/
|
|
282
|
+
[](https://github.com/EveryInc/compound-engineering-plugin) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
283
283
|
EOF
|
|
284
284
|
)"
|
|
285
285
|
```
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brainstorming
|
|
3
|
+
description: This skill should be used before implementing features, building components, or making changes. It guides exploring user intent, approaches, and design decisions before planning. Triggers on "let's brainstorm", "help me think through", "what should we build", "explore approaches", ambiguous feature requests, or when the user's request has multiple valid interpretations that need clarification.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Brainstorming
|
|
7
|
+
|
|
8
|
+
This skill provides detailed process knowledge for effective brainstorming sessions that clarify **WHAT** to build before diving into **HOW** to build it.
|
|
9
|
+
|
|
10
|
+
## When to Use This Skill
|
|
11
|
+
|
|
12
|
+
Brainstorming is valuable when:
|
|
13
|
+
- Requirements are unclear or ambiguous
|
|
14
|
+
- Multiple approaches could solve the problem
|
|
15
|
+
- Trade-offs need to be explored with the user
|
|
16
|
+
- The user hasn't fully articulated what they want
|
|
17
|
+
- The feature scope needs refinement
|
|
18
|
+
|
|
19
|
+
Brainstorming can be skipped when:
|
|
20
|
+
- Requirements are explicit and detailed
|
|
21
|
+
- The user knows exactly what they want
|
|
22
|
+
- The task is a straightforward bug fix or well-defined change
|
|
23
|
+
|
|
24
|
+
## Core Process
|
|
25
|
+
|
|
26
|
+
### Phase 0: Assess Requirement Clarity
|
|
27
|
+
|
|
28
|
+
Before diving into questions, assess whether brainstorming is needed.
|
|
29
|
+
|
|
30
|
+
**Signals that requirements are clear:**
|
|
31
|
+
- User provided specific acceptance criteria
|
|
32
|
+
- User referenced existing patterns to follow
|
|
33
|
+
- User described exact behavior expected
|
|
34
|
+
- Scope is constrained and well-defined
|
|
35
|
+
|
|
36
|
+
**Signals that brainstorming is needed:**
|
|
37
|
+
- User used vague terms ("make it better", "add something like")
|
|
38
|
+
- Multiple reasonable interpretations exist
|
|
39
|
+
- Trade-offs haven't been discussed
|
|
40
|
+
- User seems unsure about the approach
|
|
41
|
+
|
|
42
|
+
If requirements are clear, suggest: "Your requirements seem clear. Consider proceeding directly to planning or implementation."
|
|
43
|
+
|
|
44
|
+
### Phase 1: Understand the Idea
|
|
45
|
+
|
|
46
|
+
Ask questions **one at a time** to understand the user's intent. Avoid overwhelming with multiple questions.
|
|
47
|
+
|
|
48
|
+
**Question Techniques:**
|
|
49
|
+
|
|
50
|
+
1. **Prefer multiple choice when natural options exist**
|
|
51
|
+
- Good: "Should the notification be: (a) email only, (b) in-app only, or (c) both?"
|
|
52
|
+
- Avoid: "How should users be notified?"
|
|
53
|
+
|
|
54
|
+
2. **Start broad, then narrow**
|
|
55
|
+
- First: What is the core purpose?
|
|
56
|
+
- Then: Who are the users?
|
|
57
|
+
- Finally: What constraints exist?
|
|
58
|
+
|
|
59
|
+
3. **Validate assumptions explicitly**
|
|
60
|
+
- "I'm assuming users will be logged in. Is that correct?"
|
|
61
|
+
|
|
62
|
+
4. **Ask about success criteria early**
|
|
63
|
+
- "How will you know this feature is working well?"
|
|
64
|
+
|
|
65
|
+
**Key Topics to Explore:**
|
|
66
|
+
|
|
67
|
+
| Topic | Example Questions |
|
|
68
|
+
|-------|-------------------|
|
|
69
|
+
| Purpose | What problem does this solve? What's the motivation? |
|
|
70
|
+
| Users | Who uses this? What's their context? |
|
|
71
|
+
| Constraints | Any technical limitations? Timeline? Dependencies? |
|
|
72
|
+
| Success | How will you measure success? What's the happy path? |
|
|
73
|
+
| Edge Cases | What shouldn't happen? Any error states to consider? |
|
|
74
|
+
| Existing Patterns | Are there similar features in the codebase to follow? |
|
|
75
|
+
|
|
76
|
+
**Exit Condition:** Continue until the idea is clear OR user says "proceed" or "let's move on"
|
|
77
|
+
|
|
78
|
+
### Phase 2: Explore Approaches
|
|
79
|
+
|
|
80
|
+
After understanding the idea, propose 2-3 concrete approaches.
|
|
81
|
+
|
|
82
|
+
**Structure for Each Approach:**
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
### Approach A: [Name]
|
|
86
|
+
|
|
87
|
+
[2-3 sentence description]
|
|
88
|
+
|
|
89
|
+
**Pros:**
|
|
90
|
+
- [Benefit 1]
|
|
91
|
+
- [Benefit 2]
|
|
92
|
+
|
|
93
|
+
**Cons:**
|
|
94
|
+
- [Drawback 1]
|
|
95
|
+
- [Drawback 2]
|
|
96
|
+
|
|
97
|
+
**Best when:** [Circumstances where this approach shines]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Guidelines:**
|
|
101
|
+
- Lead with a recommendation and explain why
|
|
102
|
+
- Be honest about trade-offs
|
|
103
|
+
- Consider YAGNI—simpler is usually better
|
|
104
|
+
- Reference codebase patterns when relevant
|
|
105
|
+
|
|
106
|
+
### Phase 3: Capture the Design
|
|
107
|
+
|
|
108
|
+
Summarize key decisions in a structured format.
|
|
109
|
+
|
|
110
|
+
**Design Doc Structure:**
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
---
|
|
114
|
+
date: YYYY-MM-DD
|
|
115
|
+
topic: <kebab-case-topic>
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
# <Topic Title>
|
|
119
|
+
|
|
120
|
+
## What We're Building
|
|
121
|
+
[Concise description—1-2 paragraphs max]
|
|
122
|
+
|
|
123
|
+
## Why This Approach
|
|
124
|
+
[Brief explanation of approaches considered and why this one was chosen]
|
|
125
|
+
|
|
126
|
+
## Key Decisions
|
|
127
|
+
- [Decision 1]: [Rationale]
|
|
128
|
+
- [Decision 2]: [Rationale]
|
|
129
|
+
|
|
130
|
+
## Open Questions
|
|
131
|
+
- [Any unresolved questions for the planning phase]
|
|
132
|
+
|
|
133
|
+
## Next Steps
|
|
134
|
+
→ `/workflows:plan` for implementation details
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Output Location:** `docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md`
|
|
138
|
+
|
|
139
|
+
### Phase 4: Handoff
|
|
140
|
+
|
|
141
|
+
Present clear options for what to do next:
|
|
142
|
+
|
|
143
|
+
1. **Proceed to planning** → Run `/workflows:plan`
|
|
144
|
+
2. **Refine further** → Continue exploring the design
|
|
145
|
+
3. **Done for now** → User will return later
|
|
146
|
+
|
|
147
|
+
## YAGNI Principles
|
|
148
|
+
|
|
149
|
+
During brainstorming, actively resist complexity:
|
|
150
|
+
|
|
151
|
+
- **Don't design for hypothetical future requirements**
|
|
152
|
+
- **Choose the simplest approach that solves the stated problem**
|
|
153
|
+
- **Prefer boring, proven patterns over clever solutions**
|
|
154
|
+
- **Ask "Do we really need this?" when complexity emerges**
|
|
155
|
+
- **Defer decisions that don't need to be made now**
|
|
156
|
+
|
|
157
|
+
## Incremental Validation
|
|
158
|
+
|
|
159
|
+
Keep sections short—200-300 words maximum. After each section of output, pause to validate understanding:
|
|
160
|
+
|
|
161
|
+
- "Does this match what you had in mind?"
|
|
162
|
+
- "Any adjustments before we continue?"
|
|
163
|
+
- "Is this the direction you want to go?"
|
|
164
|
+
|
|
165
|
+
This prevents wasted effort on misaligned designs.
|
|
166
|
+
|
|
167
|
+
## Anti-Patterns to Avoid
|
|
168
|
+
|
|
169
|
+
| Anti-Pattern | Better Approach |
|
|
170
|
+
|--------------|-----------------|
|
|
171
|
+
| Asking 5 questions at once | Ask one at a time |
|
|
172
|
+
| Jumping to implementation details | Stay focused on WHAT, not HOW |
|
|
173
|
+
| Proposing overly complex solutions | Start simple, add complexity only if needed |
|
|
174
|
+
| Ignoring existing codebase patterns | Research what exists first |
|
|
175
|
+
| Making assumptions without validating | State assumptions explicitly and confirm |
|
|
176
|
+
| Creating lengthy design documents | Keep it concise—details go in the plan |
|
|
177
|
+
|
|
178
|
+
## Integration with Planning
|
|
179
|
+
|
|
180
|
+
Brainstorming answers **WHAT** to build:
|
|
181
|
+
- Requirements and acceptance criteria
|
|
182
|
+
- Chosen approach and rationale
|
|
183
|
+
- Key decisions and trade-offs
|
|
184
|
+
|
|
185
|
+
Planning answers **HOW** to build it:
|
|
186
|
+
- Implementation steps and file changes
|
|
187
|
+
- Technical details and code patterns
|
|
188
|
+
- Testing strategy and verification
|
|
189
|
+
|
|
190
|
+
When brainstorm output exists, `/workflows:plan` should detect it and use it as input, skipping its own idea refinement phase.
|
|
@@ -159,7 +159,7 @@ Load `schema.yaml` and classify the problem against the enum values defined in [
|
|
|
159
159
|
|
|
160
160
|
Errors:
|
|
161
161
|
- problem_type: must be one of schema enums, got "compilation_error"
|
|
162
|
-
- severity: must be one of [critical,
|
|
162
|
+
- severity: must be one of [critical, high, medium, low], got "invalid"
|
|
163
163
|
- symptoms: must be array with 1-5 items, got string
|
|
164
164
|
|
|
165
165
|
Please provide corrected values.
|
package/src/commands/install.ts
CHANGED
|
@@ -175,7 +175,9 @@ function resolveOutputRoot(value: unknown): string {
|
|
|
175
175
|
const expanded = expandHome(String(value).trim())
|
|
176
176
|
return path.resolve(expanded)
|
|
177
177
|
}
|
|
178
|
-
|
|
178
|
+
// OpenCode global config lives at ~/.config/opencode per XDG spec
|
|
179
|
+
// See: https://opencode.ai/docs/config/
|
|
180
|
+
return path.join(os.homedir(), ".config", "opencode")
|
|
179
181
|
}
|
|
180
182
|
|
|
181
183
|
async function resolveGitHubPluginPath(pluginName: string): Promise<ResolvedPluginPath> {
|
package/src/targets/opencode.ts
CHANGED
|
@@ -28,7 +28,10 @@ export async function writeOpenCodeBundle(outputRoot: string, bundle: OpenCodeBu
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
function resolveOpenCodePaths(outputRoot: string) {
|
|
31
|
-
|
|
31
|
+
const base = path.basename(outputRoot)
|
|
32
|
+
// Global install: ~/.config/opencode (basename is "opencode")
|
|
33
|
+
// Project install: .opencode (basename is ".opencode")
|
|
34
|
+
if (base === "opencode" || base === ".opencode") {
|
|
32
35
|
return {
|
|
33
36
|
root: outputRoot,
|
|
34
37
|
configPath: path.join(outputRoot, "opencode.json"),
|
|
@@ -38,6 +41,7 @@ function resolveOpenCodePaths(outputRoot: string) {
|
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
|
|
44
|
+
// Custom output directory - nest under .opencode subdirectory
|
|
41
45
|
return {
|
|
42
46
|
root: outputRoot,
|
|
43
47
|
configPath: path.join(outputRoot, "opencode.json"),
|
package/tests/cli.test.ts
CHANGED
|
@@ -63,7 +63,7 @@ describe("CLI", () => {
|
|
|
63
63
|
expect(await exists(path.join(tempRoot, ".opencode", "plugins", "converted-hooks.ts"))).toBe(true)
|
|
64
64
|
})
|
|
65
65
|
|
|
66
|
-
test("install defaults output to ~/.opencode", async () => {
|
|
66
|
+
test("install defaults output to ~/.config/opencode", async () => {
|
|
67
67
|
const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), "cli-local-default-"))
|
|
68
68
|
const fixtureRoot = path.join(import.meta.dir, "fixtures", "sample-plugin")
|
|
69
69
|
|
|
@@ -95,8 +95,9 @@ describe("CLI", () => {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
expect(stdout).toContain("Installed compound-engineering")
|
|
98
|
-
|
|
99
|
-
expect(await exists(path.join(tempRoot, ".
|
|
98
|
+
// OpenCode global config lives at ~/.config/opencode per XDG spec
|
|
99
|
+
expect(await exists(path.join(tempRoot, ".config", "opencode", "opencode.json"))).toBe(true)
|
|
100
|
+
expect(await exists(path.join(tempRoot, ".config", "opencode", "agents", "repo-research-analyst.md"))).toBe(true)
|
|
100
101
|
})
|
|
101
102
|
|
|
102
103
|
test("list returns plugins in a temp workspace", async () => {
|
|
@@ -174,8 +175,9 @@ describe("CLI", () => {
|
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
expect(stdout).toContain("Installed compound-engineering")
|
|
177
|
-
|
|
178
|
-
expect(await exists(path.join(tempRoot, ".
|
|
178
|
+
// OpenCode global config lives at ~/.config/opencode per XDG spec
|
|
179
|
+
expect(await exists(path.join(tempRoot, ".config", "opencode", "opencode.json"))).toBe(true)
|
|
180
|
+
expect(await exists(path.join(tempRoot, ".config", "opencode", "agents", "repo-research-analyst.md"))).toBe(true)
|
|
179
181
|
})
|
|
180
182
|
|
|
181
183
|
test("convert writes OpenCode output", async () => {
|
|
@@ -59,4 +59,29 @@ describe("writeOpenCodeBundle", () => {
|
|
|
59
59
|
expect(await exists(path.join(outputRoot, "skills", "skill-one", "SKILL.md"))).toBe(true)
|
|
60
60
|
expect(await exists(path.join(outputRoot, ".opencode"))).toBe(false)
|
|
61
61
|
})
|
|
62
|
+
|
|
63
|
+
test("writes directly into ~/.config/opencode style output root", async () => {
|
|
64
|
+
// Simulates the global install path: ~/.config/opencode
|
|
65
|
+
const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), "config-opencode-"))
|
|
66
|
+
const outputRoot = path.join(tempRoot, ".config", "opencode")
|
|
67
|
+
const bundle: OpenCodeBundle = {
|
|
68
|
+
config: { $schema: "https://opencode.ai/config.json" },
|
|
69
|
+
agents: [{ name: "agent-one", content: "Agent content" }],
|
|
70
|
+
plugins: [],
|
|
71
|
+
skillDirs: [
|
|
72
|
+
{
|
|
73
|
+
name: "skill-one",
|
|
74
|
+
sourceDir: path.join(import.meta.dir, "fixtures", "sample-plugin", "skills", "skill-one"),
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
await writeOpenCodeBundle(outputRoot, bundle)
|
|
80
|
+
|
|
81
|
+
// Should write directly, not nested under .opencode
|
|
82
|
+
expect(await exists(path.join(outputRoot, "opencode.json"))).toBe(true)
|
|
83
|
+
expect(await exists(path.join(outputRoot, "agents", "agent-one.md"))).toBe(true)
|
|
84
|
+
expect(await exists(path.join(outputRoot, "skills", "skill-one", "SKILL.md"))).toBe(true)
|
|
85
|
+
expect(await exists(path.join(outputRoot, ".opencode"))).toBe(false)
|
|
86
|
+
})
|
|
62
87
|
})
|