codemini-cli 0.3.8 → 0.4.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 +121 -1
- package/deployment.md +6 -6
- package/package.json +6 -1
- package/skills/brainstorm/SKILL.md +49 -29
- package/skills/superpowers-lite/SKILL.md +82 -90
- package/skills/writing-plans/SKILL.md +67 -0
- package/src/commands/chat.js +51 -47
- package/src/commands/doctor.js +27 -7
- package/src/commands/run.js +36 -28
- package/src/core/agent-loop.js +191 -10
- package/src/core/chat-runtime.js +170 -11
- package/src/core/command-evaluator.js +66 -0
- package/src/core/command-policy.js +16 -0
- package/src/core/command-risk.js +148 -0
- package/src/core/config-store.js +7 -0
- package/src/core/constants.js +0 -1
- package/src/core/default-system-prompt.js +27 -0
- package/src/core/dream-audit.js +93 -0
- package/src/core/dream-consolidate.js +157 -0
- package/src/core/dream-evaluator.js +99 -0
- package/src/core/fff-adapter.js +386 -0
- package/src/core/memory-prompt.js +23 -0
- package/src/core/memory-store.js +228 -1
- package/src/core/paths.js +13 -1
- package/src/core/project-index.js +2 -2
- package/src/core/shell-profile.js +5 -1
- package/src/core/tool-output.js +184 -0
- package/src/core/tools.js +425 -110
- package/src/tui/chat-app.js +376 -47
- package/src/tui/tool-activity/presenters/system.js +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ CodeMini CLI is a terminal coding assistant built for teams that want a sharper,
|
|
|
16
16
|
|
|
17
17
|
It is designed around a deliberate idea: most coding workflows do not need a huge default tool surface or unrestricted shell behavior. Instead, CodeMini starts with a compact core, loads advanced tools on demand, and keeps the agent grounded in structured code operations, session todos, lightweight project indexing, and shell-aware safety rules.
|
|
18
18
|
|
|
19
|
-
**Contents** — [Why CodeMini CLI](#why-codemini-cli) · [Installation](#installation) · [Quick Start](#quick-start) · [Commands](#commands) · [Personalities (Souls)](#personalities-souls) · [Tool Model](#how-the-tool-model-works) · [Core Capabilities](#core-capabilities) · [Project Index](#project-index) · [Good Fit](#good-fit) · [Documentation](#documentation) · [Development](#development) · [License](#license)
|
|
19
|
+
**Contents** — [Why CodeMini CLI](#why-codemini-cli) · [Installation](#installation) · [Quick Start](#quick-start) · [Commands](#commands) · [Personalities (Souls)](#personalities-souls) · [Tool Model](#how-the-tool-model-works) · [Core Capabilities](#core-capabilities) · [Dream Loop (Built-in Memory Evolution)](#dream-loop-built-in-memory-evolution) · [Project Index](#project-index) · [Good Fit](#good-fit) · [Documentation](#documentation) · [Development](#development) · [License](#license)
|
|
20
20
|
|
|
21
21
|
### Why CodeMini CLI
|
|
22
22
|
|
|
@@ -58,6 +58,15 @@ codemini doctor
|
|
|
58
58
|
codemini
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
+
### Optional: FFF Search Acceleration
|
|
62
|
+
|
|
63
|
+
CodeMini CLI can optionally use `fff-mcp` as a faster backend for `grep`, `glob`, and part of `list`.
|
|
64
|
+
|
|
65
|
+
- If `fff-mcp` is installed and available in `PATH`, CodeMini will reuse it automatically within the current session.
|
|
66
|
+
- If `fff-mcp` is missing or fails to start, CodeMini falls back to its built-in search implementation automatically.
|
|
67
|
+
- This means `fff-mcp` is an enhancement, not a hard dependency.
|
|
68
|
+
- `codemini doctor` now reports `FFF MCP availability` so you can verify whether it is active.
|
|
69
|
+
|
|
61
70
|
### Commands
|
|
62
71
|
|
|
63
72
|
| Command | Description |
|
|
@@ -65,6 +74,11 @@ codemini
|
|
|
65
74
|
| `codemini [prompt]` | Start an interactive coding session with an optional initial prompt |
|
|
66
75
|
| `codemini chat [prompt]` | Chat mode — single-turn or multi-turn conversation |
|
|
67
76
|
| `codemini run <task>` | Run a task non-interactively (e.g. `codemini run "fix the login bug"`) |
|
|
77
|
+
| `codemini run --harness <role> <task>` | Run a task with a specific sub-agent role (e.g. `coder`, `planner`, `reviewer`) |
|
|
78
|
+
| `codemini run --pipeline <task>` | Run a task through the full planning → coding → review pipeline |
|
|
79
|
+
| `codemini run <task> --max-steps N` | Limit the maximum number of agent steps for a run task |
|
|
80
|
+
| `codemini run <task> --model <name>` | Override the default model for a single run |
|
|
81
|
+
| `codemini [prompt] --plain` | Disable TUI and use plain terminal output |
|
|
68
82
|
| `codemini config set\|get\|list <key> [value]` | Manage configuration (gateway, model, shell, UI, soul, etc.) |
|
|
69
83
|
| `codemini doctor` | Run environment diagnostics and validate configuration |
|
|
70
84
|
| `codemini skill list\|install\|enable\|disable\|inspect\|reindex` | Manage skills — list, install, toggle, or inspect bundled/third-party skills |
|
|
@@ -79,6 +93,23 @@ Built-in souls: `default`, `professional`, `ceo`, `playful`, `anime`, `caveman`,
|
|
|
79
93
|
codemini config set soul.preset playful
|
|
80
94
|
```
|
|
81
95
|
|
|
96
|
+
### Built-in Skills
|
|
97
|
+
|
|
98
|
+
Skills are reusable workflow patterns that guide how the agent approaches different types of tasks. They are loaded automatically when applicable.
|
|
99
|
+
|
|
100
|
+
| Skill | Trigger | Description |
|
|
101
|
+
|-------|---------|-------------|
|
|
102
|
+
| **superpowers-lite** | Default for all coding work | Lightweight operating style: prefer structured tools, keep context tight, use sub-agents, verify before claiming success |
|
|
103
|
+
| **brainstorm** | Multiple reasonable approaches exist | Explores options and tradeoffs before coding; asks one question at a time to resolve uncertainty |
|
|
104
|
+
| **writing-plans** | Non-trivial implementation task | Creates a step-by-step plan with exact file paths, code, and verification steps before touching code |
|
|
105
|
+
|
|
106
|
+
Skills are installed and managed via `codemini skill`:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
codemini skill list # List all available skills
|
|
110
|
+
codemini skill inspect <name> # Inspect a skill's details
|
|
111
|
+
```
|
|
112
|
+
|
|
82
113
|
### How The Tool Model Works
|
|
83
114
|
|
|
84
115
|
CodeMini CLI intentionally separates tools into two layers:
|
|
@@ -108,6 +139,7 @@ Typical flow:
|
|
|
108
139
|
- AST tools: `ast_query`, `read_ast_node`
|
|
109
140
|
- background task management tools
|
|
110
141
|
- persistent memory tools
|
|
142
|
+
- dream loop tools: `capture_memory`, `dream_consolidate`
|
|
111
143
|
- Session-level todo checklists via `update_todos`, rendered natively in the TUI
|
|
112
144
|
- Unified shell execution model:
|
|
113
145
|
- one-off commands via `run`
|
|
@@ -117,6 +149,34 @@ Typical flow:
|
|
|
117
149
|
- Reply language control via `ui.reply_language`
|
|
118
150
|
- Safe mode enabled by default
|
|
119
151
|
|
|
152
|
+
### Dream Loop (Built-in Memory Evolution)
|
|
153
|
+
|
|
154
|
+
Dream loop is built into the runtime as native tools and slash commands (not a skill-only workflow).
|
|
155
|
+
|
|
156
|
+
What goes into inbox vs persistent memory:
|
|
157
|
+
|
|
158
|
+
- Inbox (`memory/inbox/...`) stores raw, recent, event-level signal captured during work.
|
|
159
|
+
- Typical inbox entries: user corrections, repeated failures, stable preferences, workflow wins, capability gaps, and decisions.
|
|
160
|
+
- Inbox is intentionally noisy and temporary; entries are reviewed by consolidation before promotion.
|
|
161
|
+
- User memory stores user-specific stable preferences and habits that should follow the user across repos.
|
|
162
|
+
- Global memory stores stable cross-task learnings and generally reusable rules.
|
|
163
|
+
- Project memory stores repo-specific conventions, workflows, and constraints tied to one codebase.
|
|
164
|
+
- Archive (`memory/archive/...`) keeps rejected/superseded evidence instead of silently deleting it.
|
|
165
|
+
|
|
166
|
+
- Capture signal during active work:
|
|
167
|
+
- Tool: `capture_memory`
|
|
168
|
+
- Slash: `/capture <summary> [--scope global|repo|thread] [--type observation|correction|failure|preference|pattern|win|gap|decision]`
|
|
169
|
+
- Inspect inbox:
|
|
170
|
+
- Slash: `/inbox [since-YYYY-MM-DD]`
|
|
171
|
+
- Consolidate inbox into long-term/project memory:
|
|
172
|
+
- Tool: `dream_consolidate`
|
|
173
|
+
- Slash: `/dream [--dry-run] [--scope=global|repo|thread]`
|
|
174
|
+
|
|
175
|
+
Execution mode behavior:
|
|
176
|
+
|
|
177
|
+
- `execution.mode=auto`: dream tools run normally, and auto-dream can trigger when `memory.auto_dream_threshold` is reached.
|
|
178
|
+
- `execution.mode=plan`: model-planned tool calls are not executed, but slash command `/dream` still executes directly in runtime.
|
|
179
|
+
|
|
120
180
|
### Project Index
|
|
121
181
|
|
|
122
182
|
CodeMini CLI maintains a lightweight project index inside `.codemini-project/`:
|
|
@@ -231,6 +291,15 @@ codemini doctor
|
|
|
231
291
|
codemini
|
|
232
292
|
```
|
|
233
293
|
|
|
294
|
+
### 可选:FFF 搜索加速
|
|
295
|
+
|
|
296
|
+
CodeMini CLI 可以可选地使用 `fff-mcp` 作为 `grep`、`glob` 和部分 `list` 的更快后端。
|
|
297
|
+
|
|
298
|
+
- 如果 `fff-mcp` 已安装并且在 `PATH` 中可用,CodeMini 会在当前会话内自动复用它。
|
|
299
|
+
- 如果 `fff-mcp` 缺失或启动失败,CodeMini 会自动回退到内置搜索实现。
|
|
300
|
+
- 这意味着 `fff-mcp` 是增强项,不是硬依赖。
|
|
301
|
+
- 现在可以通过 `codemini doctor` 里的 `FFF MCP availability` 看到它是否可用。
|
|
302
|
+
|
|
234
303
|
### 命令概览
|
|
235
304
|
|
|
236
305
|
| 命令 | 说明 |
|
|
@@ -238,6 +307,11 @@ codemini
|
|
|
238
307
|
| `codemini [prompt]` | 启动交互式编码会话,可附带初始提示 |
|
|
239
308
|
| `codemini chat [prompt]` | 对话模式——单轮或多轮 |
|
|
240
309
|
| `codemini run <task>` | 非交互式执行任务(如 `codemini run "修复登录 bug"`) |
|
|
310
|
+
| `codemini run --harness <role> <task>` | 以指定 sub-agent 角色执行任务(如 `coder`、`planner`、`reviewer`) |
|
|
311
|
+
| `codemini run --pipeline <task>` | 通过完整计划→编码→审查流水线执行任务 |
|
|
312
|
+
| `codemini run <task> --max-steps N` | 限制单次执行的最大 agent 步数 |
|
|
313
|
+
| `codemini run <task> --model <name>` | 单次执行时覆盖默认模型 |
|
|
314
|
+
| `codemini [prompt] --plain` | 禁用 TUI,使用纯文本终端输出 |
|
|
241
315
|
| `codemini config set\|get\|list <key> [value]` | 管理配置(网关、模型、shell、UI、soul 等) |
|
|
242
316
|
| `codemini doctor` | 运行环境诊断并验证配置 |
|
|
243
317
|
| `codemini skill list\|install\|enable\|disable\|inspect\|reindex` | 管理 skill——列表、安装、启用/禁用、检查 |
|
|
@@ -252,6 +326,23 @@ CodeMini CLI 支持可切换的 "soul" 人格,仅改变语气和表达风格
|
|
|
252
326
|
codemini config set soul.preset playful
|
|
253
327
|
```
|
|
254
328
|
|
|
329
|
+
### 内置 Skills
|
|
330
|
+
|
|
331
|
+
Skill 是可复用的工作流模式,指导 agent 如何处理不同类型的任务。适用时会自动加载。
|
|
332
|
+
|
|
333
|
+
| Skill | 触发条件 | 说明 |
|
|
334
|
+
|-------|----------|------|
|
|
335
|
+
| **superpowers-lite** | 所有编码工作的默认 skill | 轻量操作风格:优先结构化工具、保持上下文精简、使用 sub-agent、验证后再报告完成 |
|
|
336
|
+
| **brainstorm** | 存在多种合理方案时 | 在编码前探索选项和权衡;每次只问一个问题来消除不确定性 |
|
|
337
|
+
| **writing-plans** | 非平凡的实现任务 | 在动手之前创建包含精确文件路径、代码和验证步骤的分步计划 |
|
|
338
|
+
|
|
339
|
+
通过 `codemini skill` 管理技能:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
codemini skill list # 列出所有可用 skill
|
|
343
|
+
codemini skill inspect <name> # 查看某个 skill 的详细信息
|
|
344
|
+
```
|
|
345
|
+
|
|
255
346
|
### 工具模型怎么设计
|
|
256
347
|
|
|
257
348
|
CodeMini CLI 把工具分成两层:
|
|
@@ -281,6 +372,7 @@ CodeMini CLI 把工具分成两层:
|
|
|
281
372
|
- AST 工具:`ast_query`、`read_ast_node`
|
|
282
373
|
- 后台任务管理工具
|
|
283
374
|
- 持久 memory 工具
|
|
375
|
+
- dream loop 工具:`capture_memory`、`dream_consolidate`
|
|
284
376
|
- 通过 `update_todos` 维护复杂单任务的会话级待办清单,并直接渲染在 TUI 中
|
|
285
377
|
- 统一的 shell 执行模型:
|
|
286
378
|
- 一次性命令直接 `run`
|
|
@@ -290,6 +382,34 @@ CodeMini CLI 把工具分成两层:
|
|
|
290
382
|
- 支持通过 `ui.reply_language` 控制回复语言
|
|
291
383
|
- safe mode 默认开启
|
|
292
384
|
|
|
385
|
+
### Dream Loop(内置记忆演化)
|
|
386
|
+
|
|
387
|
+
Dream loop 是运行时内置能力,不依赖 skill 才能使用。
|
|
388
|
+
|
|
389
|
+
Inbox 和持久记忆的区别:
|
|
390
|
+
|
|
391
|
+
- Inbox(`memory/inbox/...`)保存的是工作过程中的原始事件信号,强调“先记下来”。
|
|
392
|
+
- 典型 inbox 条目:用户纠正、重复失败、稳定偏好、流程收益、能力缺口、关键决策。
|
|
393
|
+
- Inbox 本质上是临时且可能带噪的,需经 consolidation 审核后再晋升。
|
|
394
|
+
- User memory 保存“跟这个用户长期相关”的稳定偏好与习惯,可跨仓库复用。
|
|
395
|
+
- Global memory 保存跨任务可复用的稳定经验或规则。
|
|
396
|
+
- Project memory 保存特定仓库的约定、流程和约束。
|
|
397
|
+
- Archive(`memory/archive/...`)用于保留被拒绝/被覆盖证据,而不是静默删除。
|
|
398
|
+
|
|
399
|
+
- 在工作中捕获高信号:
|
|
400
|
+
- 工具:`capture_memory`
|
|
401
|
+
- 斜杠命令:`/capture <summary> [--scope global|repo|thread] [--type observation|correction|failure|preference|pattern|win|gap|decision]`
|
|
402
|
+
- 查看 inbox:
|
|
403
|
+
- 斜杠命令:`/inbox [since-YYYY-MM-DD]`
|
|
404
|
+
- 把 inbox 整理进长期/项目记忆:
|
|
405
|
+
- 工具:`dream_consolidate`
|
|
406
|
+
- 斜杠命令:`/dream [--dry-run] [--scope=global|repo|thread]`
|
|
407
|
+
|
|
408
|
+
执行模式差异:
|
|
409
|
+
|
|
410
|
+
- `execution.mode=auto`:dream 工具可正常执行;当达到 `memory.auto_dream_threshold` 时可自动触发 consolidation。
|
|
411
|
+
- `execution.mode=plan`:模型规划出的工具调用不会执行,但 `/dream` 作为运行时命令仍可直接执行。
|
|
412
|
+
|
|
293
413
|
### 项目索引
|
|
294
414
|
|
|
295
415
|
CodeMini CLI 会在 `.codemini-project/` 下维护一份轻量项目索引:
|
package/deployment.md
CHANGED
|
@@ -13,13 +13,13 @@ npm pack
|
|
|
13
13
|
Expected output:
|
|
14
14
|
|
|
15
15
|
```text
|
|
16
|
-
codemini-cli-0.
|
|
16
|
+
codemini-cli-0.4.0.tgz
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
If you want to verify the package contents:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
tar -tf codemini-cli-0.
|
|
22
|
+
tar -tf codemini-cli-0.4.0.tgz
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## 2. Copy To The Target Machine
|
|
@@ -34,7 +34,7 @@ Copy the generated `.tgz` file to the Win10 machine by one of these methods:
|
|
|
34
34
|
Recommended target path:
|
|
35
35
|
|
|
36
36
|
```powershell
|
|
37
|
-
C:\temp\codemini-cli-0.
|
|
37
|
+
C:\temp\codemini-cli-0.4.0.tgz
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## 3. Environment Requirements
|
|
@@ -42,7 +42,7 @@ C:\temp\codemini-cli-0.1.0.tgz
|
|
|
42
42
|
Target machine requirements:
|
|
43
43
|
|
|
44
44
|
- Windows 10
|
|
45
|
-
- Node.js
|
|
45
|
+
- Node.js 22 or newer
|
|
46
46
|
- npm available
|
|
47
47
|
- PowerShell available
|
|
48
48
|
|
|
@@ -58,7 +58,7 @@ npm -v
|
|
|
58
58
|
Global install:
|
|
59
59
|
|
|
60
60
|
```powershell
|
|
61
|
-
npm install -g C:\temp\codemini-cli-0.
|
|
61
|
+
npm install -g C:\temp\codemini-cli-0.4.0.tgz
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
If global install is blocked by company policy, install in a working directory instead:
|
|
@@ -66,7 +66,7 @@ If global install is blocked by company policy, install in a working directory i
|
|
|
66
66
|
```powershell
|
|
67
67
|
mkdir C:\temp\coder-test
|
|
68
68
|
cd C:\temp\coder-test
|
|
69
|
-
npm install C:\temp\codemini-cli-0.
|
|
69
|
+
npm install C:\temp\codemini-cli-0.4.0.tgz
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
## 5. Confirm Installation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codemini-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Coding CLI optimized for small-model workflows and Windows PowerShell",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -47,8 +47,13 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@cursorless/tree-sitter-wasms": "^0.8.1",
|
|
50
|
+
"cheerio": "^1.1.2",
|
|
51
|
+
"cli-truncate": "^6.0.0",
|
|
52
|
+
"duck-duck-scrape": "^2.2.7",
|
|
50
53
|
"ink": "^7.0.0",
|
|
54
|
+
"playwright": "^1.54.2",
|
|
51
55
|
"react": "^19.2.5",
|
|
56
|
+
"strip-ansi": "^7.2.0",
|
|
52
57
|
"web-tree-sitter": "^0.26.8"
|
|
53
58
|
},
|
|
54
59
|
"license": "MIT"
|
|
@@ -1,50 +1,70 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brainstorm
|
|
3
|
-
description: Lightweight brainstorming skill
|
|
4
|
-
version: 0.
|
|
3
|
+
description: Lightweight brainstorming skill. Use when a feature or behavior request has multiple reasonable approaches and the missing piece is user preference, tradeoff choice, or key constraint.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
Use this skill only when the task needs clarification or option comparison before coding.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- ask one question at a time
|
|
11
|
-
- if a key uncertainty remains, ask the next best question and stop
|
|
12
|
-
- give 2-3 short options only when the blocking constraint is already clear
|
|
13
|
-
- keep options concrete and focused on the main tradeoff
|
|
14
|
-
- present any conclusion as a suggested decision, not a final choice for the user
|
|
15
|
-
- stop at the decision point unless the user clearly asks to continue
|
|
16
|
-
- do not write code, pseudo-code, file edits, or broad repo exploration while direction is still being chosen
|
|
9
|
+
**Announce:** When entering brainstorm, say "Using brainstorm to explore approaches before implementation."
|
|
17
10
|
|
|
18
|
-
|
|
11
|
+
## Anti-Pattern
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
Do NOT skip this skill because "it's simple." Underspecified "simple" tasks cause the most wasted work. Even a few seconds of clarification beats a wrong implementation.
|
|
21
14
|
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
1. **Ask one question at a time.** If a key uncertainty remains, ask the next best question and STOP. Wait for the user's answer.
|
|
18
|
+
2. **Give 2-3 short options** only when the blocking constraint is already clear. Keep options concrete and focused on the main tradeoff.
|
|
19
|
+
3. **Present conclusions as suggested decisions**, not final choices.
|
|
20
|
+
4. **Do NOT write code, pseudo-code, file edits, or broad repo exploration** while direction is still being chosen.
|
|
21
|
+
|
|
22
|
+
## Output Formats
|
|
23
|
+
|
|
24
|
+
### Mode A: key constraint missing
|
|
25
|
+
|
|
26
|
+
```
|
|
22
27
|
Question:
|
|
23
|
-
- ask:
|
|
24
|
-
- why this matters:
|
|
28
|
+
- ask: <one specific question>
|
|
29
|
+
- why this matters: <1-2 sentences on what this decides>
|
|
30
|
+
```
|
|
25
31
|
|
|
26
|
-
Wait for the user's answer.
|
|
32
|
+
Wait for the user's answer. Do NOT proceed with options or code.
|
|
27
33
|
|
|
28
|
-
Mode B: goal is clear but approach choice remains
|
|
34
|
+
### Mode B: goal is clear but approach choice remains
|
|
29
35
|
|
|
36
|
+
```
|
|
30
37
|
Option 1:
|
|
31
|
-
- idea:
|
|
32
|
-
- pros:
|
|
33
|
-
- cons:
|
|
38
|
+
- idea: <concrete approach>
|
|
39
|
+
- pros: <1-2 points>
|
|
40
|
+
- cons: <1-2 points>
|
|
34
41
|
|
|
35
42
|
Option 2:
|
|
36
|
-
- idea:
|
|
37
|
-
- pros:
|
|
38
|
-
- cons:
|
|
43
|
+
- idea: <concrete approach>
|
|
44
|
+
- pros: <1-2 points>
|
|
45
|
+
- cons: <1-2 points>
|
|
39
46
|
|
|
40
47
|
Option 3 (optional):
|
|
41
|
-
- idea:
|
|
42
|
-
- pros:
|
|
43
|
-
- cons:
|
|
48
|
+
- idea: <concrete approach>
|
|
49
|
+
- pros: <1-2 points>
|
|
50
|
+
- cons: <1-2 points>
|
|
44
51
|
|
|
45
52
|
Suggested decision:
|
|
46
|
-
- recommended:
|
|
47
|
-
- reason:
|
|
53
|
+
- recommended: <option N>
|
|
54
|
+
- reason: <why>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Self-Review
|
|
58
|
+
|
|
59
|
+
Before presenting options or a suggested decision, quickly check:
|
|
60
|
+
- Are all options actually different, or are two of them the same idea in different words?
|
|
61
|
+
- Does the recommended option match the user's stated constraints?
|
|
62
|
+
- Did I invent requirements the user never mentioned? Remove them.
|
|
63
|
+
|
|
64
|
+
## Exit
|
|
65
|
+
|
|
66
|
+
After the user approves a direction:
|
|
67
|
+
- If the task is small and clear enough to implement directly → proceed to code.
|
|
68
|
+
- If the task is non-trivial or touches multiple areas → YOU MUST invoke `writing-plans` to create an implementation plan before coding.
|
|
48
69
|
|
|
49
|
-
|
|
50
|
-
- stop after the recommended direction unless the user clearly asks to continue into implementation
|
|
70
|
+
Do NOT stop at the brainstorm conclusion when the natural next step is planning.
|
|
@@ -1,100 +1,92 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: superpowers-lite
|
|
3
3
|
description: Concise workflow skill tuned for 30B-class models: prefer structured code tools first, keep context tight, use sub-agents for narrow tasks, and verify before claiming success.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Use this skill as the default lightweight operating style for coding work.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
7
|
+
Use this skill as the default lightweight operating style for all coding work.
|
|
8
|
+
|
|
9
|
+
**Announce when using a skill:** Before following any route below, say "Using [skill name] to [purpose]" in your response. This signals intent and prevents silent skill skipping.
|
|
10
|
+
|
|
11
|
+
## Mandatory Skill Check
|
|
12
|
+
|
|
13
|
+
Before responding to ANY user message, check whether a skill applies. If there is even a small chance a skill is relevant, YOU MUST invoke it. This is not optional.
|
|
14
|
+
|
|
15
|
+
**Skill check comes BEFORE:**
|
|
16
|
+
- Clarifying questions
|
|
17
|
+
- Code exploration
|
|
18
|
+
- Writing code
|
|
19
|
+
- Anything else
|
|
20
|
+
|
|
21
|
+
## Anti-Rationalization
|
|
22
|
+
|
|
23
|
+
If you catch yourself thinking any of the following, STOP — you are about to skip a skill incorrectly:
|
|
24
|
+
|
|
25
|
+
| Thought | Reality |
|
|
26
|
+
|---|---|
|
|
27
|
+
| "This is too simple for a skill" | Simple tasks derail too. Use the skill. |
|
|
28
|
+
| "I need more context first" | Skills tell you HOW to gather context. Check first. |
|
|
29
|
+
| "The skill is overkill here" | A lightweight pass is cheaper than rework. |
|
|
30
|
+
| "I'll just do this one thing first" | Do the skill check BEFORE anything. |
|
|
31
|
+
| "I already know what to do" | Knowing the concept ≠ following the process. |
|
|
32
|
+
|
|
33
|
+
## Routing
|
|
34
|
+
|
|
35
|
+
Evaluate the user's request and YOU MUST follow exactly one route:
|
|
36
|
+
|
|
37
|
+
1. **Task is clear, small, and obvious path:**
|
|
38
|
+
- Execute directly
|
|
39
|
+
- Do NOT invoke brainstorming
|
|
40
|
+
|
|
41
|
+
2. **Non-trivial implementation that needs codebase exploration, touches multiple areas, or changes shared behavior:**
|
|
42
|
+
- YOU MUST invoke `writing-plans` skill
|
|
43
|
+
- Inspect first, then present an implementation plan for approval
|
|
44
|
+
- Do NOT jump straight into coding
|
|
45
|
+
|
|
46
|
+
3. **Goal is clear but multiple reasonable approaches exist and the missing piece is user preference or tradeoff choice:**
|
|
47
|
+
- YOU MUST invoke `brainstorm` skill
|
|
48
|
+
- Follow brainstorm process — do NOT substitute it with ad-hoc questions
|
|
49
|
+
|
|
50
|
+
4. **Request is missing a key constraint or success condition:**
|
|
51
|
+
- Ask exactly one clarifying question
|
|
52
|
+
- Do NOT give options or write code
|
|
53
|
+
- Stop and wait for the answer
|
|
54
|
+
|
|
55
|
+
5. **Request is greenfield and underspecified** ("build a page", "make a site", "generate an app"):
|
|
56
|
+
- Treat as missing key constraints
|
|
57
|
+
- Ask one high-value question
|
|
58
|
+
- Do NOT assume features, scope, or storage model
|
|
59
|
+
- Stop and wait for the answer
|
|
60
|
+
|
|
61
|
+
**Decision boundary:**
|
|
46
62
|
- Use `brainstorm` when one focused user answer will determine the direction.
|
|
47
|
-
- Use `
|
|
48
|
-
- If both could apply, prefer `brainstorm` first when the core uncertainty is user intent; prefer `
|
|
49
|
-
|
|
50
|
-
Tool
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
Core
|
|
59
|
-
|
|
60
|
-
1. Search first.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
4. Do not code against unclear requirements.
|
|
74
|
-
If the requested behavior, scope, or acceptance is unclear, do not jump into implementation. First decide which of these applies:
|
|
75
|
-
- missing key constraint -> ask one question
|
|
76
|
-
- multiple valid approaches -> use `brainstorm`
|
|
77
|
-
- clear enough to build -> proceed
|
|
78
|
-
|
|
79
|
-
5. Read and write with intent.
|
|
80
|
-
Use `read` before broad reads when possible. Use `edit` for focused edits or when you already have the complete replacement content. Use `generate_diff` and `patch` for larger changes. Use `write` only for creating new files or explicit whole-file writes. Avoid unnecessary tool calls and avoid rereading the same file without a reason.
|
|
81
|
-
|
|
82
|
-
6. Verify before claiming success.
|
|
83
|
-
Run the relevant test, check, or command before saying work is fixed or complete.
|
|
84
|
-
|
|
85
|
-
Default workflow:
|
|
86
|
-
- Search with `grep`
|
|
87
|
-
- Inspect local context with `read`
|
|
88
|
-
- If the request is unclear, first decide: ask one question, brainstorm, auto plan, or proceed
|
|
89
|
-
- Plan the next smallest step
|
|
90
|
-
- Delegate if the work is independent
|
|
91
|
-
- Edit with `edit`
|
|
92
|
-
- Verify
|
|
93
|
-
- Summarize briefly
|
|
94
|
-
|
|
95
|
-
Sub-agent guidance:
|
|
63
|
+
- Use `writing-plans` when the task is implementation-shaped but needs a plan before coding.
|
|
64
|
+
- If both could apply, prefer `brainstorm` first when the core uncertainty is user intent; prefer `writing-plans` first when the core uncertainty is codebase impact.
|
|
65
|
+
|
|
66
|
+
## Tool Order
|
|
67
|
+
|
|
68
|
+
- Prefer `grep` first for content search and candidate discovery
|
|
69
|
+
- Use `read` to inspect the smallest useful code block
|
|
70
|
+
- Use `edit` for minimal focused edits or whole-file rewrites
|
|
71
|
+
- Use `glob` when you need file or directory discovery
|
|
72
|
+
- Use shell search (`rg`) only as a fallback
|
|
73
|
+
|
|
74
|
+
## Core Rules
|
|
75
|
+
|
|
76
|
+
1. **Search first.** Start with `grep`, then `read`. Fall back to shell only when structured tools aren't enough.
|
|
77
|
+
|
|
78
|
+
2. **Keep context tight.** Do not carry full conversation history into every step. Summarize and narrow scope.
|
|
79
|
+
|
|
80
|
+
3. **Prefer narrow sub-agents.** When a task splits cleanly, delegate to sub-agents with: one clear objective, tiny context, concrete expected output.
|
|
81
|
+
|
|
82
|
+
4. **Do not code against unclear requirements.** Missing constraint → ask one question. Multiple approaches → `brainstorm`. Clear enough → proceed.
|
|
83
|
+
|
|
84
|
+
5. **Verify before claiming success.** Run the relevant test or command before saying work is done.
|
|
85
|
+
|
|
86
|
+
## Sub-agent Guidance
|
|
87
|
+
|
|
96
88
|
- `planner`: break work into steps, risks, and checks
|
|
97
89
|
- `coder`: implement one bounded change
|
|
98
90
|
- `reviewer`: look for bugs, regressions, and missing verification
|
|
99
91
|
|
|
100
|
-
If the task is simple, stay lightweight. Do not expand into
|
|
92
|
+
If the task is simple, stay lightweight. Do not expand into ceremony unless the problem needs it.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: writing-plans
|
|
3
|
+
description: Use when you have a clear goal or approved design for a non-trivial task, before touching code. Creates a step-by-step implementation plan with exact file paths, code, and verification steps.
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Use this skill when the task is implementation-shaped but large enough that jumping straight into coding is risky.
|
|
8
|
+
|
|
9
|
+
**Announce:** When entering writing-plans, say "Using writing-plans to create an implementation plan."
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- Task touches 3+ files or multiple areas of the codebase
|
|
14
|
+
- Task changes shared behavior, APIs, or data flow
|
|
15
|
+
- Task has interdependent steps where order matters
|
|
16
|
+
- You need user sign-off before starting work
|
|
17
|
+
|
|
18
|
+
## When NOT to Use
|
|
19
|
+
|
|
20
|
+
- Single-file fix with a clear solution → just do it
|
|
21
|
+
- Task is a direct extension of an existing pattern → just do it
|
|
22
|
+
- User explicitly says to skip planning → respect that
|
|
23
|
+
|
|
24
|
+
## Plan Format
|
|
25
|
+
|
|
26
|
+
Write the plan as a markdown checklist. Each step is one action (2-5 minutes of work).
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
# [Task Name] Plan
|
|
30
|
+
|
|
31
|
+
**Goal:** [one sentence]
|
|
32
|
+
**Files:** [list files that will be created or modified]
|
|
33
|
+
|
|
34
|
+
### Phase 1: [Phase name]
|
|
35
|
+
|
|
36
|
+
- [ ] **Step N: [action verb + what]**
|
|
37
|
+
- File: `exact/path/to/file.ext`
|
|
38
|
+
- What: [specific change]
|
|
39
|
+
- Verify: [how to confirm it works]
|
|
40
|
+
|
|
41
|
+
### Phase 2: [Phase name]
|
|
42
|
+
|
|
43
|
+
- [ ] ...
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Rules
|
|
47
|
+
|
|
48
|
+
1. **Exact file paths always.** No "the relevant file" or "in the component directory".
|
|
49
|
+
2. **Show code in steps that change code.** No "add appropriate error handling" without showing the code.
|
|
50
|
+
3. **No placeholders.** No "TBD", "TODO", "implement later", "similar to step N". If a step needs code, write the code.
|
|
51
|
+
4. **Every step is verifiable.** Include a test command, expected output, or visual check.
|
|
52
|
+
5. **YAGNI.** Only plan what was asked for. Do not add "nice to have" steps.
|
|
53
|
+
6. **DRY.** If two steps share logic, plan the shared piece first.
|
|
54
|
+
|
|
55
|
+
## Self-Review
|
|
56
|
+
|
|
57
|
+
After writing the plan, check:
|
|
58
|
+
- Can you point to a step for every requirement? If not, add the missing step.
|
|
59
|
+
- Any placeholders or vague descriptions? Replace with specifics.
|
|
60
|
+
- Do types and function names match across steps? Fix inconsistencies.
|
|
61
|
+
- Is the order correct? Steps that depend on earlier work must come after.
|
|
62
|
+
|
|
63
|
+
## Exit
|
|
64
|
+
|
|
65
|
+
After the user approves the plan → proceed to implement step by step.
|
|
66
|
+
After each step → verify before moving to the next.
|
|
67
|
+
If a step reveals the plan is wrong → stop, explain, and update the plan before continuing.
|