codemini-cli 0.4.1 → 0.4.3

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/OPERATIONS.md CHANGED
@@ -202,8 +202,10 @@ or revise/discard before execution:
202
202
  ```powershell
203
203
  codemini skill list
204
204
  codemini skill inspect superpowers-lite
205
- codemini skill enable brainstorm
206
- codemini skill disable brainstorm
205
+ codemini skill install .\my-skill
206
+ codemini skill install --scope=global .\my-skill
207
+ codemini skill enable my-skill
208
+ codemini skill disable my-skill
207
209
  codemini skill reindex
208
210
  ```
209
211
 
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) · [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)
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) · [Reflect Skills](#reflect-skills) · [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
 
@@ -67,6 +67,17 @@ CodeMini CLI can optionally use `fff-mcp` as a faster backend for `grep`, `glob`
67
67
  - This means `fff-mcp` is an enhancement, not a hard dependency.
68
68
  - `codemini doctor` now reports `FFF MCP availability` so you can verify whether it is active.
69
69
 
70
+ ### Optional: Playwright Web Rendering
71
+
72
+ `web_fetch` uses a lightweight `fetch` + HTML parser path by default, so Playwright is not installed as a default dependency.
73
+
74
+ For JavaScript-rendered pages, install Playwright separately to enable richer browser-rendered fallback:
75
+
76
+ ```bash
77
+ npm install -g playwright
78
+ playwright install chromium
79
+ ```
80
+
70
81
  ### Commands
71
82
 
72
83
  | Command | Description |
@@ -99,17 +110,22 @@ Skills are reusable workflow patterns that guide how the agent approaches differ
99
110
 
100
111
  | Skill | Trigger | Description |
101
112
  |-------|---------|-------------|
102
- | **superpowers-lite** | Default for all coding work | Lightweight operating style: prefer structured tools, keep context tight, use sub-agents, verify before claiming success |
113
+ | **superpowers-lite** | Default for all coding work | Lightweight operating style: prefer structured tools, keep context tight, use sub-agents, verify before claiming success; asks 1-3 sharp questions only for high-risk decisions |
114
+ | **grill-me** | Explicit pressure-test requests | Optional scrutiny mode for plans, PRs, launches, and ideas; challenges assumptions without changing the default workflow |
103
115
  | **brainstorm** | Multiple reasonable approaches exist | Explores options and tradeoffs before coding; asks one question at a time to resolve uncertainty |
104
116
  | **writing-plans** | Non-trivial implementation task | Creates a step-by-step plan with exact file paths, code, and verification steps before touching code |
105
117
 
106
118
  Skills are installed and managed via `codemini skill`:
107
119
 
108
120
  ```bash
109
- codemini skill list # List all available skills
110
- codemini skill inspect <name> # Inspect a skill's details
121
+ codemini skill list # List builtin, project, and global skills
122
+ codemini skill install <path> # Install to .codemini/skills by default
123
+ codemini skill install --scope=global <path> # Install to the global skills directory
124
+ codemini skill inspect <name> # Inspect a skill's details
111
125
  ```
112
126
 
127
+ Bundled skills are built in, always enabled, and cannot be disabled or overwritten. Third-party skills live either in the project at `.codemini/skills/<name>/SKILL.md` or globally at `<base-config-dir>/skills/<name>/SKILL.md`, matching `/reflect`.
128
+
113
129
  ### How The Tool Model Works
114
130
 
115
131
  CodeMini CLI intentionally separates tools into two layers:
@@ -149,6 +165,30 @@ Typical flow:
149
165
  - Reply language control via `ui.reply_language`
150
166
  - Safe mode enabled by default
151
167
 
168
+ ### Reflect Skills
169
+
170
+ `/reflect` turns a successful workflow from the current session into a reviewed, reusable `SKILL.md` draft.
171
+
172
+ It is separate from the dream loop: reflect creates a skill draft, waits for review, and writes only after approval. It does not write inbox memories or run dream consolidation.
173
+
174
+ Common forms:
175
+
176
+ ```text
177
+ /reflect
178
+ /reflect <what to preserve>
179
+ /reflect --scope=global <what to preserve>
180
+ ```
181
+
182
+ - `/reflect` is exploratory. CodeMini reviews recent context and proposes a skill only when there is a reusable pattern worth saving.
183
+ - `/reflect <what to preserve>` is directed. Use it when you already know which successful chain should become a skill, such as `/reflect preserve the provider tool-call recovery workflow`.
184
+ - `/reflect --scope=global <request>` writes the approved draft to the global skills directory instead of the current project.
185
+ - The draft is previewed first. Use `/yes` to write it, `/edit <feedback>` to revise it, or `/no` to discard it.
186
+
187
+ Approved skills are written to the same locations used by third-party skill install:
188
+
189
+ - Project scope: `.codemini/skills/<skill-name>/SKILL.md`
190
+ - Global scope: `<base-config-dir>/skills/<skill-name>/SKILL.md`
191
+
152
192
  ### Dream Loop (Built-in Memory Evolution)
153
193
 
154
194
  Dream loop is built into the runtime as native tools and slash commands (not a skill-only workflow).
@@ -300,6 +340,17 @@ CodeMini CLI 可以可选地使用 `fff-mcp` 作为 `grep`、`glob` 和部分 `l
300
340
  - 这意味着 `fff-mcp` 是增强项,不是硬依赖。
301
341
  - 现在可以通过 `codemini doctor` 里的 `FFF MCP availability` 看到它是否可用。
302
342
 
343
+ ### 可选:Playwright 网页渲染
344
+
345
+ `web_fetch` 默认使用轻量的 `fetch` + HTML 解析路径,因此 Playwright 不再作为默认依赖安装。
346
+
347
+ 如果经常读取 JavaScript 渲染页面,可以单独安装 Playwright,让 `web_fetch` 在需要时回退到浏览器渲染:
348
+
349
+ ```bash
350
+ npm install -g playwright
351
+ playwright install chromium
352
+ ```
353
+
303
354
  ### 命令概览
304
355
 
305
356
  | 命令 | 说明 |
@@ -332,17 +383,22 @@ Skill 是可复用的工作流模式,指导 agent 如何处理不同类型的
332
383
 
333
384
  | Skill | 触发条件 | 说明 |
334
385
  |-------|----------|------|
335
- | **superpowers-lite** | 所有编码工作的默认 skill | 轻量操作风格:优先结构化工具、保持上下文精简、使用 sub-agent、验证后再报告完成 |
386
+ | **superpowers-lite** | 所有编码工作的默认 skill | 轻量操作风格:优先结构化工具、保持上下文精简、使用 sub-agent、验证后再报告完成;仅在高风险决策中提出 1-3 个尖锐问题 |
387
+ | **grill-me** | 明确要求压力测试或拷问时 | 可选审查模式,用于方案、PR、发布和想法;挑战假设但不改变默认协作流程 |
336
388
  | **brainstorm** | 存在多种合理方案时 | 在编码前探索选项和权衡;每次只问一个问题来消除不确定性 |
337
389
  | **writing-plans** | 非平凡的实现任务 | 在动手之前创建包含精确文件路径、代码和验证步骤的分步计划 |
338
390
 
339
391
  通过 `codemini skill` 管理技能:
340
392
 
341
393
  ```bash
342
- codemini skill list # 列出所有可用 skill
343
- codemini skill inspect <name> # 查看某个 skill 的详细信息
394
+ codemini skill list # 列出内置、项目级、全局 skill
395
+ codemini skill install <path> # 默认安装到 .codemini/skills
396
+ codemini skill install --scope=global <path> # 安装到全局 skills 目录
397
+ codemini skill inspect <name> # 查看某个 skill 的详细信息
344
398
  ```
345
399
 
400
+ 内置 skill 是运行时能力,默认启用,不能禁用或被同名第三方 skill 覆盖。第三方 skill 分为项目级 `.codemini/skills/<name>/SKILL.md` 和全局 `<base-config-dir>/skills/<name>/SKILL.md`,与 `/reflect` 的写入位置一致。
401
+
346
402
  ### 工具模型怎么设计
347
403
 
348
404
  CodeMini CLI 把工具分成两层:
@@ -382,6 +438,30 @@ CodeMini CLI 把工具分成两层:
382
438
  - 支持通过 `ui.reply_language` 控制回复语言
383
439
  - safe mode 默认开启
384
440
 
441
+ ### Reflect Skills(复盘沉淀 Skill)
442
+
443
+ `/reflect` 可以把当前会话中已经跑通的成功链路沉淀成一个可审阅、可复用的 `SKILL.md` 草稿。
444
+
445
+ 它和 dream loop 是分开的:reflect 只生成 skill 草稿,先让用户审阅,确认后才写文件;不会写入 inbox,也不会触发 dream consolidation。
446
+
447
+ 常用形式:
448
+
449
+ ```text
450
+ /reflect
451
+ /reflect <要沉淀的用户要求>
452
+ /reflect --scope=global <要沉淀的用户要求>
453
+ ```
454
+
455
+ - `/reflect` 是探索模式。CodeMini 会查看近期上下文,只有在确实有可复用模式时才提出 skill 草稿。
456
+ - `/reflect <用户要求>` 是定向模式。适合你已经知道要沉淀哪条成功链路,例如 `/reflect 把刚才 provider tool_call 恢复链路沉淀成 skill`。
457
+ - `/reflect --scope=global <用户要求>` 会把确认后的草稿写到全局 skill 目录,而不是当前项目。
458
+ - 草稿会先预览。用 `/yes` 写入,用 `/edit <反馈>` 修改,用 `/no` 放弃。
459
+
460
+ 确认后的 skill 写入位置和第三方 skill 安装保持一致:
461
+
462
+ - 项目级:`.codemini/skills/<skill-name>/SKILL.md`
463
+ - 全局级:`<base-config-dir>/skills/<skill-name>/SKILL.md`
464
+
385
465
  ### Dream Loop(内置记忆演化)
386
466
 
387
467
  Dream loop 是运行时内置能力,不依赖 skill 才能使用。
package/deployment.md CHANGED
@@ -13,13 +13,13 @@ npm pack
13
13
  Expected output:
14
14
 
15
15
  ```text
16
- codemini-cli-0.4.1.tgz
16
+ codemini-cli-0.4.3.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.4.1.tgz
22
+ tar -tf codemini-cli-0.4.3.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.4.1.tgz
37
+ C:\temp\codemini-cli-0.4.3.tgz
38
38
  ```
39
39
 
40
40
  ## 3. Environment Requirements
@@ -58,7 +58,7 @@ npm -v
58
58
  Global install:
59
59
 
60
60
  ```powershell
61
- npm install -g C:\temp\codemini-cli-0.4.1.tgz
61
+ npm install -g C:\temp\codemini-cli-0.4.3.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.4.1.tgz
69
+ npm install C:\temp\codemini-cli-0.4.3.tgz
70
70
  ```
71
71
 
72
72
  ## 5. Confirm Installation
@@ -158,6 +158,7 @@ Typical contents:
158
158
  - `config.json`
159
159
  - `sessions\`
160
160
  - `skills\`
161
+ - project skills are stored per workspace under `.codemini\skills\`
161
162
  - `input-history.json`
162
163
 
163
164
  ## 9. Skills
@@ -168,13 +169,19 @@ List installed skills:
168
169
  codemini skill list
169
170
  ```
170
171
 
171
- Install a local skill:
172
+ Install a local skill into the current project:
172
173
 
173
174
  ```powershell
174
175
  codemini skill install C:\path\to\skill-folder
175
176
  ```
176
177
 
177
- Rebuild the local registry:
178
+ Install a local skill globally:
179
+
180
+ ```powershell
181
+ codemini skill install --scope=global C:\path\to\skill-folder
182
+ ```
183
+
184
+ Rebuild the global registry:
178
185
 
179
186
  ```powershell
180
187
  codemini skill reindex
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codemini-cli",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Coding CLI optimized for small-model workflows and Windows PowerShell",
5
5
  "keywords": [
6
6
  "cli",
@@ -49,9 +49,7 @@
49
49
  "@cursorless/tree-sitter-wasms": "^0.8.1",
50
50
  "cheerio": "^1.1.2",
51
51
  "cli-truncate": "^6.0.0",
52
- "duck-duck-scrape": "^2.2.7",
53
52
  "ink": "^7.0.0",
54
- "playwright": "^1.54.2",
55
53
  "react": "^19.2.5",
56
54
  "strip-ansi": "^7.2.0",
57
55
  "web-tree-sitter": "^0.26.8"
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: grill-me
3
+ description: Optional pressure-test mode for plans, architecture choices, PRs, launches, and product ideas: challenge assumptions without changing the default collaborative workflow.
4
+ version: 0.1.0
5
+ ---
6
+
7
+ Use this skill only when the user explicitly asks to be grilled, challenged, pressure-tested, stress-tested, or reviewed with unusually direct scrutiny.
8
+
9
+ ## Stance
10
+
11
+ Be direct, but keep the target clear: challenge the work, not the person. The goal is better judgment, not dominance or theater.
12
+
13
+ ## Process
14
+
15
+ 1. Identify the claim, plan, design, PR, launch, or decision under review.
16
+ 2. State the highest-risk assumption first.
17
+ 3. Ask 3-7 pointed questions, ordered by risk.
18
+ 4. Call out missing evidence, weak verification, unclear ownership, rollback gaps, and hidden dependencies.
19
+ 5. End with a short verdict:
20
+ - `Ship`: risks are understood and verification is credible.
21
+ - `Revise`: the direction is good, but one or more issues should be fixed first.
22
+ - `Stop`: a core assumption is unproven or the blast radius is too high.
23
+
24
+ ## Boundaries
25
+
26
+ - Do not insult, mock, or psychoanalyze the user.
27
+ - Do not turn every normal coding task into a cross-examination.
28
+ - Do not invent requirements. If context is missing, ask for the missing artifact or state the assumption.
29
+ - Prefer concrete tests, rollback paths, and observable acceptance criteria over vague caution.
30
+
@@ -0,0 +1,245 @@
1
+ ---
2
+ name: project-requirements
3
+ description: Generate an interactive project requirements report from an existing codebase. Use when the user asks for a PRD, requirements document, API-by-API breakdown, business flow, architecture map, dependency graph, flowchart, product requirements reverse-engineering, or detailed project demand analysis.
4
+ version: 0.1.0
5
+ ---
6
+
7
+ Use this skill to reverse-engineer a project into a requirements document that product, engineering, and QA can navigate.
8
+
9
+ Default to an HTML report with lightweight interactions. Produce Markdown only when the user asks for a text-first artifact, a PR-friendly source document, or an additional companion file.
10
+
11
+ User request:
12
+
13
+ ```text
14
+ {{args}}
15
+ ```
16
+
17
+ Honor any concrete user request above, such as output format, report path, focus area, API subset, diagram style, or language. If it is empty, generate the default HTML requirements report for the current workspace.
18
+
19
+ ## Output
20
+
21
+ Create the primary report at:
22
+
23
+ ```text
24
+ docs/requirements/YYYY-MM-DD-project-requirements.html
25
+ ```
26
+
27
+ If a companion Markdown file is useful, create:
28
+
29
+ ```text
30
+ docs/requirements/YYYY-MM-DD-project-requirements.md
31
+ ```
32
+
33
+ The HTML should be self-contained: inline CSS, inline JavaScript, no build step, no required external assets.
34
+
35
+ Diagrams must be visible when the HTML is opened directly from disk:
36
+
37
+ - Prefer inline SVG for architecture maps, dependency graphs, sequence summaries, and state diagrams.
38
+ - Use semantic SVG groups, `<title>`/`<desc>`, readable labels, arrow markers, and stable element ids so sections can link to diagram nodes.
39
+ - For simple hierarchy diagrams, CSS grid/flex boxes with connector lines are also acceptable.
40
+ - Do not rely on Mermaid rendering as the only visible diagram. Mermaid source may be included in a collapsible `<details>` block as an editable source-of-truth companion.
41
+ - Use Mermaid CDN rendering only as optional progressive enhancement when the user accepts network access. The static inline SVG or CSS diagram must remain the fallback and primary offline view.
42
+ - Avoid showing only raw Mermaid code blocks in the final HTML unless the user explicitly asks for source-only diagrams.
43
+
44
+ For medium or large projects, do not generate the entire HTML document in one model response or one huge `write` call. Create the report incrementally:
45
+
46
+ 1. Write a complete HTML shell first: `doctype`, `<head>`, inline CSS, navigation container, empty main sections, inline script, and closing tags.
47
+ 2. Add each major section with smaller `edit` insertions before a stable marker such as `<!-- REQUIREMENTS_SECTIONS -->`.
48
+ 3. Keep each write/edit chunk focused: one section, one API group, or one diagram at a time.
49
+ 4. After each chunk, preserve valid HTML and keep the marker in place until the final cleanup.
50
+ 5. In the final pass, remove unused markers and verify the file can be opened directly from disk.
51
+
52
+ This chunked approach is required for HTML reports because inline CSS, JavaScript, diagrams, and API cards can become much larger than Markdown. It also gives the user immediate visible tool progress instead of waiting for one giant generated tool call.
53
+
54
+ ## Process
55
+
56
+ 1. Inspect the project before writing:
57
+ - Read top-level docs such as `README.md`, `OPERATIONS.md`, `docs/`, and deployment notes.
58
+ - Identify the stack from package manifests, route files, command handlers, API clients, database modules, schemas, and tests.
59
+ - Search with `rg` for routes, handlers, controllers, commands, schemas, migrations, HTTP verbs, RPC methods, queue handlers, and CLI subcommands.
60
+ 2. Build an evidence map:
61
+ - `EXTRACTED`: behavior directly supported by source code, docs, tests, config, or schemas.
62
+ - `INFERRED`: reasonable product requirement inferred from code relationships.
63
+ - `UNKNOWN`: requirement, owner, actor, edge case, or business rule that needs user confirmation.
64
+ 3. Decompose by API or interface first:
65
+ - HTTP API endpoints.
66
+ - CLI commands and subcommands.
67
+ - Tool calls, MCP handlers, RPC methods, queue jobs, scheduled tasks, or exported SDK functions.
68
+ - UI flows only after the backend/interface layer is mapped, unless the project is frontend-only.
69
+ 4. Connect each API/interface to requirements:
70
+ - User goal and actor.
71
+ - Trigger and entry point.
72
+ - Request/input shape.
73
+ - Response/output shape.
74
+ - Validation and permission rules.
75
+ - Data read/write behavior.
76
+ - Internal modules called.
77
+ - External services or files touched.
78
+ - Error cases and retry/rollback behavior.
79
+ - Observability, audit, and security notes.
80
+ - Acceptance criteria.
81
+ 5. Generate diagrams:
82
+ - Product flowchart for the main user journey.
83
+ - API dependency graph linking endpoints/commands to modules, data stores, and external services.
84
+ - Sequence diagram for at least one high-value flow.
85
+ - State or lifecycle diagram when the domain has clear states.
86
+ - Render each diagram as static inline SVG or CSS boxes in the HTML, with optional Mermaid source hidden in a collapsible details block.
87
+ 6. Write the report and preserve traceability:
88
+ - Link sections with stable anchors.
89
+ - Include code file paths for evidence.
90
+ - Mark inferred or unknown content visibly.
91
+ - Avoid pretending uncertain requirements are confirmed.
92
+ - For HTML output, write the shell first, then append/insert sections incrementally instead of producing one large complete file in a single tool call.
93
+
94
+ ## HTML Structure
95
+
96
+ Use this structure unless the project suggests a better one:
97
+
98
+ 1. Executive summary.
99
+ 2. System map with a high-level static SVG or CSS architecture diagram.
100
+ 3. API/interface inventory with filters or grouped navigation.
101
+ 4. Per-API requirement cards.
102
+ 5. Core user flows with diagrams.
103
+ 6. Domain model and data ownership.
104
+ 7. Permissions, security, and compliance notes.
105
+ 8. Error handling and edge cases.
106
+ 9. Non-functional requirements.
107
+ 10. Open questions and `UNKNOWN` items.
108
+ 11. Source evidence index.
109
+
110
+ ## Interaction Guidelines
111
+
112
+ Implement useful interactions with plain JavaScript:
113
+
114
+ - Sticky table of contents.
115
+ - Search/filter input for APIs, modules, and tags.
116
+ - Expand/collapse details for each API.
117
+ - Anchor links for every API and flow.
118
+ - Evidence tags: `EXTRACTED`, `INFERRED`, `UNKNOWN`.
119
+ - Back-to-top links for long reports.
120
+ - Optional "show only open questions" toggle.
121
+
122
+ Keep interactions accessible:
123
+
124
+ - Use semantic headings, buttons, tables, and lists.
125
+ - Make controls keyboard reachable.
126
+ - Do not hide critical content behind JavaScript-only rendering.
127
+ - Ensure the document remains readable if JavaScript is disabled.
128
+
129
+ ## API Section Template
130
+
131
+ For each API, command, handler, or externally visible interface, include:
132
+
133
+ ```text
134
+ Name:
135
+ Type:
136
+ Route/command/function:
137
+ Evidence:
138
+ Actor:
139
+ Goal:
140
+ Inputs:
141
+ Outputs:
142
+ Preconditions:
143
+ Main flow:
144
+ Alternative flows:
145
+ Validation:
146
+ Permissions:
147
+ Data reads:
148
+ Data writes:
149
+ Internal dependencies:
150
+ External dependencies:
151
+ Errors:
152
+ Observability:
153
+ Acceptance criteria:
154
+ Open questions:
155
+ ```
156
+
157
+ ## Diagram Patterns
158
+
159
+ Use static diagrams when diagrams help compress complexity. In HTML output, render the visible diagram as inline SVG or CSS boxes. Include Mermaid only as optional source text when it helps future editing.
160
+
161
+ Inline SVG architecture map:
162
+
163
+ ```html
164
+ <figure class="diagram" id="system-architecture">
165
+ <figcaption>System architecture</figcaption>
166
+ <svg viewBox="0 0 960 520" role="img" aria-labelledby="arch-title arch-desc">
167
+ <title id="arch-title">System architecture</title>
168
+ <desc id="arch-desc">CLI commands call runtime services, which use tools and data stores.</desc>
169
+ <defs>
170
+ <marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto">
171
+ <path d="M0,0 L0,6 L9,3 z"></path>
172
+ </marker>
173
+ </defs>
174
+ <g id="cli-layer">
175
+ <rect x="40" y="40" width="220" height="90" rx="8"></rect>
176
+ <text x="60" y="90">CLI Entry</text>
177
+ </g>
178
+ <g id="runtime-layer">
179
+ <rect x="370" y="40" width="240" height="90" rx="8"></rect>
180
+ <text x="390" y="90">Runtime</text>
181
+ </g>
182
+ <line x1="260" y1="85" x2="370" y2="85" marker-end="url(#arrow)"></line>
183
+ </svg>
184
+ </figure>
185
+ ```
186
+
187
+ CSS box architecture map:
188
+
189
+ ```html
190
+ <section class="arch-map" aria-label="System architecture">
191
+ <a class="arch-node" href="#api-chat">Chat command</a>
192
+ <span class="arch-edge" aria-hidden="true">-></span>
193
+ <a class="arch-node" href="#runtime-agent-loop">Agent loop</a>
194
+ <span class="arch-edge" aria-hidden="true">-></span>
195
+ <a class="arch-node" href="#tools-write">Tools</a>
196
+ </section>
197
+ ```
198
+
199
+ Optional Mermaid companion:
200
+
201
+ Product flow:
202
+
203
+ ```mermaid
204
+ flowchart TD
205
+ A[User starts task] --> B[System validates input]
206
+ B --> C[System performs core action]
207
+ C --> D[User receives result]
208
+ ```
209
+
210
+ API dependency map:
211
+
212
+ ```mermaid
213
+ graph LR
214
+ API[API or command] --> Handler[Handler]
215
+ Handler --> Service[Service]
216
+ Service --> Store[(Data store)]
217
+ Service --> External[External service]
218
+ ```
219
+
220
+ Sequence flow:
221
+
222
+ ```mermaid
223
+ sequenceDiagram
224
+ participant User
225
+ participant API
226
+ participant Service
227
+ participant Store
228
+ User->>API: Request
229
+ API->>Service: Validate and execute
230
+ Service->>Store: Read/write data
231
+ Store-->>Service: Result
232
+ Service-->>API: Domain result
233
+ API-->>User: Response
234
+ ```
235
+
236
+ ## Quality Bar
237
+
238
+ The report is complete when:
239
+
240
+ - A reader can find every major API or user-facing interface from the navigation.
241
+ - Each interface has at least one source evidence path.
242
+ - Main flows and dependencies are represented both in text and diagrams.
243
+ - Inferred requirements are labeled instead of stated as facts.
244
+ - Open questions are grouped so the user can resolve them later.
245
+ - The HTML can be opened directly from disk in a browser.
@@ -1,11 +1,13 @@
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.2.0
4
+ version: 0.3.0
5
5
  ---
6
6
 
7
7
  Use this skill as the default lightweight operating style for all coding work.
8
8
 
9
+ This is the default, not an interrogation mode. Keep help calm and direct. For high-risk decisions only, add a light Grill Me pass: ask 1-3 sharp questions about assumptions, failure modes, or verification before proceeding. Challenge the plan, not the person.
10
+
9
11
  **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
12
 
11
13
  ## Mandatory Skill Check
@@ -83,6 +85,8 @@ Evaluate the user's request and YOU MUST follow exactly one route:
83
85
 
84
86
  5. **Verify before claiming success.** Run the relevant test or command before saying work is done.
85
87
 
88
+ 6. **Use sharp questions sparingly.** For high-risk work, ask 1-3 sharp questions that expose assumptions or likely failure modes. For ordinary tasks, stay lightweight and keep moving.
89
+
86
90
  ## Sub-agent Guidance
87
91
 
88
92
  - `planner`: break work into steps, risks, and checks
package/src/cli.js CHANGED
@@ -17,7 +17,7 @@ Usage:
17
17
  codemini run --pipeline <task> [--model <name>]
18
18
  codemini config set|get|list <key> [value]
19
19
  codemini doctor
20
- codemini skill list|install|enable|disable|inspect|reindex
20
+ codemini skill list|install|enable|disable|inspect|reindex [--scope=project|global]
21
21
  codemini --version
22
22
  codemini --help`);
23
23
  }
@@ -11,6 +11,7 @@ import path from 'node:path';
11
11
 
12
12
  const ROLE_TOOL_POLICY = {
13
13
  planner: ['read', 'grep', 'list', 'query_project_index', 'tool_search', 'glob', 'ast_query', 'read_ast_node', 'read_plan', 'update_plan'],
14
+ advisor: ['read', 'grep', 'list', 'query_project_index', 'tool_search', 'read_plan'],
14
15
  coder: ['read', 'grep', 'list', 'edit', 'write', 'run', 'ast_query', 'read_ast_node', 'glob', 'tool_search', 'update_todos', 'read_plan', 'update_plan'],
15
16
  reviewer: ['read', 'grep', 'list', 'glob', 'tool_search', 'ast_query', 'read_ast_node', 'read_plan'],
16
17
  tester: ['read', 'grep', 'list', 'run', 'glob', 'tool_search', 'read_plan']
@@ -70,7 +71,7 @@ function makeCompletionFn(config) {
70
71
  model,
71
72
  messages,
72
73
  tools,
73
- timeoutMs: config.gateway.timeout_ms || 90000,
74
+ timeoutMs: config.gateway.timeout_ms || 1800000,
74
75
  maxRetries: config.gateway.max_retries ?? 2
75
76
  });
76
77
  }
@@ -142,11 +143,11 @@ function normalizePlan(parsed, goal) {
142
143
  async function planPipeline({ goal, config, systemPrompt, model }) {
143
144
  const plannerPrompt = [
144
145
  'Create an execution plan and assign the best sub-agent role for each step.',
145
- 'Return strict JSON only with shape {"summary":"...","steps":[{"title":"...","role":"planner|coder|reviewer|tester","task":"..."}]}. No markdown.',
146
+ 'Return strict JSON only with shape {"summary":"...","steps":[{"title":"...","role":"planner|advisor|coder|reviewer|tester","task":"..."}]}. No markdown.',
146
147
  `Available roles: ${HARNESS_ROLES.join(', ')}.`,
147
148
  'Prefer 3-5 steps total. The first step should usually inspect the target area.',
148
149
  'For implementation goals, include a reviewer or tester step near the end.',
149
- 'For advisory/analysis goals, keep it lean with planner/coder only.'
150
+ 'For advisory/analysis goals, keep it lean with planner/advisor only; do not use coder unless code or files will be modified.'
150
151
  ].join('\n');
151
152
 
152
153
  const planning = await createChatCompletion({
@@ -158,7 +159,7 @@ async function planPipeline({ goal, config, systemPrompt, model }) {
158
159
  { role: 'system', content: `${systemPrompt}\n${plannerPrompt}` },
159
160
  { role: 'user', content: `Plan the following task:\n${goal}` }
160
161
  ],
161
- timeoutMs: config.gateway.timeout_ms || 90000,
162
+ timeoutMs: config.gateway.timeout_ms || 1800000,
162
163
  maxRetries: config.gateway.max_retries ?? 2
163
164
  });
164
165