Skip to content

Commit adedfb8

Browse files
committed
feat(opencode+squad): add opencode detection, fix stale ck ai refs, improve squad PO clarification (0.13.1)
1 parent 450ee2e commit adedfb8

7 files changed

Lines changed: 70 additions & 30 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## [0.13.1] - 2026-03-07
4+
5+
### Fixed
6+
- **`ck ai` stale reference** — removed leftover `ck ai <cmd>` line from post-install Quick Reference output (command was removed in 0.13.0)
7+
- **Install "In CLI" example** — replaced `ck ai "..."` example with generic slash command guidance
8+
9+
### Added
10+
- **OpenCode auto-detection**`ck install` now detects the `opencode` binary in PATH and suggests the OpenCode integration automatically, consistent with how `claude`, `codex`, and `gemini` CLI tools are detected
11+
12+
### Changed
13+
- **`/squad` vague task handling** — PO now pushes back with up to 5 clarifying questions when a task description is too ambiguous to spec. Sets `status: po-clarify`, writes questions to the handoff, and pauses the pipeline. Running `/squad` again (no args) with answers resumes and writes the full spec.
14+
- **`/squad` Clarification Mode** — split into two paths: kickoff clarification (questions in PO Spec block → write spec, advance to architect) and downstream clarification (questions from Architect/Reviewer → existing behavior)
15+
16+
---
17+
318
## [0.13.0] - 2026-03-07
419

520
### Removed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This project uses [ContextKit](https://github.com/nolrm/contextkit) for AI development standards.
55

66
## ContextKit
7-
Version: 0.12.22
7+
Version: 0.13.1
88

99
## Project Standards
1010

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ ContextKit installs reusable slash commands for supported platforms:
143143
| `/test` | Generate comprehensive tests |
144144
| `/doc` | Add documentation |
145145
| `/spec` | Write a component spec (MD-first) before any code is created |
146-
| `/squad` | Kick off a squad task — one task or many (auto-detects batch mode) |
146+
| `/squad` | Kick off a squad task — one task or many (auto-detects batch mode). Pushes back with clarifying questions if the task is vague. |
147147
| `/squad-architect` | Design the technical plan from the PO spec |
148148
| `/squad-dev` | Implement code following the architect plan |
149149
| `/squad-test` | Write and run tests against acceptance criteria |
@@ -168,7 +168,7 @@ The squad workflow turns a single AI session into a structured multi-role pipeli
168168

169169
| Step | Role | Command | What it does |
170170
|------|------|---------|-------------|
171-
| 1 | Product Owner | `/squad` | Writes a user story, acceptance criteria, edge cases, and scope. Optionally captures screenshots/images as visual assets. |
171+
| 1 | Product Owner | `/squad` | Writes a user story, acceptance criteria, edge cases, and scope. If the task is ambiguous, asks up to 5 clarifying questions before writing the spec. Optionally captures screenshots/images as visual assets. |
172172
| 2 | Architect | `/squad-architect` | Designs the technical approach, files to change, and implementation steps |
173173
| 3 | Developer | `/squad-dev` | Implements the code following the architect's plan |
174174
| 4 | Tester | `/squad-test` | Writes and runs tests against the PO's acceptance criteria |

commands/squad.md

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,13 @@ model_routing: false
8181
- Is scope clear enough to write testable acceptance criteria?
8282
- Are there decisions the user needs to make first?
8383

84-
**If clarification needed:** Ask the user up to 5 focused, numbered questions. Wait for answers. Capture Q&A under `### User Clarifications`.
84+
**If clarification needed:**
85+
- Write up to 5 focused, numbered questions under `### Questions for PO` in the handoff's PO Spec block
86+
- Set `## 1. PO Spec``status: po-clarify`
87+
- Set top-level `status:``po-clarify`
88+
- Tell the user: "I need some clarification before writing the spec. Please answer these questions and run `/squad` again (no args)."
89+
- **Stop here.** Do not write the spec yet.
90+
8591
**If clear:** Continue.
8692

8793
4. Read the codebase to understand the project.
@@ -175,32 +181,48 @@ created: [TIMESTAMP]
175181
### Single-task clarification (`handoff.md`)
176182

177183
1. Read `handoff.md`.
178-
2. Find `### Questions for PO` in any role's block (Architect Plan, Review, etc.).
179-
3. **Check for a split recommendation**: Look for `### Recommended Split` in the Architect Plan block.
180-
181-
**If `### Recommended Split` exists** (Architect flagged task as too complex):
182-
- Read the recommended sub-tasks and reason.
183-
- Present the two options to the user:
184-
- **Option A — Approve split**: Run `/squad "sub-task A" "sub-task B" ...` with the proposed sub-tasks. The current handoff will be superseded by the new batch.
185-
- **Option B — Proceed as-is**: Add a note in the PO Spec `### Answers` block: `- Split recommendation from Architect → "Proceed as one task"`. Set the top-level `status:` back to `architect`. Tell the user: "Noted. Run `/squad-architect` to continue — the Architect will write the full plan."
186-
- **Stop here** — do not run the standard Q&A answer flow below.
187-
188-
**If no `### Recommended Split`**: Continue to step 4.
189-
190-
4. Update the PO Spec to address the questions (update User Story, Acceptance Criteria, Edge Cases, Out of Scope as needed).
191-
5. Add answers under `### Answers` in the PO Spec block:
192-
```
193-
- Q1 from [Role]: "[question]" → "[answer]"
194-
- Q2 from [Role]: "[question]" → "[answer]"
195-
```
196-
6. Set top-level `status:` back to the asking role:
197-
- Questions from Architect → `architect`
198-
- Questions from Reviewer → `review`
199-
7. Tell the user which command to run next.
184+
2. Find `### Questions for PO` — note **which block** it appears in:
185+
- **In `## 1. PO Spec`** → kickoff clarification (PO needs more info before writing the spec). Continue to step 3a.
186+
- **In `## 2. Architect Plan` or `## 6. Review`** → downstream clarification (Architect or Reviewer raised questions). Skip to step 3b.
187+
188+
3a. **Kickoff clarification path** (questions in PO Spec block):
189+
- Read the questions from `### Questions for PO` and the user's answers (from their message or from `### User Clarifications`).
190+
- Write the full PO Spec using the answers: User Story, Acceptance Criteria, Edge Cases, Out of Scope.
191+
- Capture Q&A under `### User Clarifications`:
192+
```
193+
- Q: "[question]" → A: "[answer]"
194+
```
195+
- Set `## 1. PO Spec` → `status: done`
196+
- Set top-level `status:` → `architect`
197+
- Tell the user: "Spec written. Run `/squad-auto` to continue the pipeline."
198+
- **Stop here.**
199+
200+
3b. **Downstream clarification path** (questions in Architect Plan or Review block):
201+
- **Check for a split recommendation**: Look for `### Recommended Split` in the Architect Plan block.
202+
203+
**If `### Recommended Split` exists** (Architect flagged task as too complex):
204+
- Read the recommended sub-tasks and reason.
205+
- Present the two options to the user:
206+
- **Option A — Approve split**: Run `/squad "sub-task A" "sub-task B" ...` with the proposed sub-tasks. The current handoff will be superseded by the new batch.
207+
- **Option B — Proceed as-is**: Add a note in the PO Spec `### Answers` block: `- Split recommendation from Architect → "Proceed as one task"`. Set the top-level `status:` back to `architect`. Tell the user: "Noted. Run `/squad-architect` to continue — the Architect will write the full plan."
208+
- **Stop here** — do not run the Q&A answer flow below.
209+
210+
**If no `### Recommended Split`**: Continue.
211+
212+
- Update the PO Spec to address the questions (update User Story, Acceptance Criteria, Edge Cases, Out of Scope as needed).
213+
- Add answers under `### Answers` in the PO Spec block:
214+
```
215+
- Q1 from [Role]: "[question]" → "[answer]"
216+
- Q2 from [Role]: "[question]" → "[answer]"
217+
```
218+
- Set top-level `status:` back to the asking role:
219+
- Questions from Architect → `architect`
220+
- Questions from Reviewer → `review`
221+
- Tell the user which command to run next.
200222
201223
### Batch clarification (`handoff-[N].md`)
202224
203-
Follow the same steps above, but target the specific `handoff-[N].md` file that has `status: po-clarify`.
225+
Follow the same steps above, targeting the specific `handoff-[N].md` that has `status: po-clarify`. Apply the kickoff path (3a) or downstream path (3b) based on which block the questions appear in.
204226
205227
---
206228
@@ -228,6 +250,8 @@ status: pending
228250
229251
### Visual Assets
230252
253+
### Questions for PO
254+
231255
### User Clarifications
232256
233257
### Answers

lib/commands/install.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,6 @@ enforcement:
16221622
console.log(chalk.bold('📖 Quick Reference'));
16231623
console.log(''.padEnd(48, '─'));
16241624
console.log(`ck status → Check installation & integrations`);
1625-
console.log(`ck ai <cmd> → Use AI with project context`);
16261625
console.log(`ck <platform> → Add platform (claude, cursor, copilot, codex, opencode, gemini, aider, continue, windsurf)`);
16271626
console.log('');
16281627
console.log(`Docs → ${chalk.blue('https://contextkit-docs.vercel.app')}`);
@@ -1668,7 +1667,7 @@ enforcement:
16681667
}
16691668

16701669
console.log(chalk.bold('In CLI'));
1671-
console.log(`ck ai "create a Button component for customer checkout"`);
1670+
console.log(chalk.dim('Use your AI tool\'s slash command, e.g. /analyze or @.contextkit/commands/create-component.md'));
16721671
console.log('');
16731672

16741673
if (platform === 'claude' || platform === 'gemini') {

lib/utils/tool-detector.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class ToolDetector {
2929
claude_cli: await this.detectCLITool('claude'),
3030
gemini_cli: await this.detectCLITool('gemini'),
3131
codex_cli: await this.detectCLITool('codex'),
32+
opencode_cli: await this.detectCLITool('opencode'),
3233
};
3334

3435
return this.detectedTools;
@@ -120,6 +121,7 @@ class ToolDetector {
120121
'claude_cli', // Good CLI
121122
'gemini_cli', // Alternative CLI
122123
'codex_cli', // OpenAI Codex CLI
124+
'opencode_cli', // OpenCode CLI
123125
];
124126

125127
return priority.filter(tool => detected[tool]);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nolrm/contextkit",
3-
"version": "0.13.0",
3+
"version": "0.13.1",
44
"description": "ContextKit - Context Engineering for AI Development. Provide rich context to AI through structured MD files with standards, code guides, and documentation. Works with Cursor, Claude, Aider, VS Code Copilot, and more.",
55
"main": "lib/index.js",
66
"bin": {

0 commit comments

Comments
 (0)