codemini-cli 0.1.15 → 0.1.17
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 +1 -0
- package/README.md +2 -0
- package/package.json +1 -1
- package/skills/brainstorm/SKILL.md +20 -39
- package/skills/superpowers-lite/SKILL.md +39 -8
- package/souls/caveman.md +3 -0
- package/souls/ceo.md +3 -0
- package/souls/pirate.md +3 -0
- package/src/cli.js +1 -1
- package/src/core/chat-runtime.js +13 -4
- package/src/core/command-policy.js +4 -4
package/OPERATIONS.md
CHANGED
package/README.md
CHANGED
|
@@ -28,6 +28,7 @@ It is designed for teams that want a coding assistant that feels practical, cont
|
|
|
28
28
|
- Structured code tools for small models: `locate`, `open_target`, `edit_target`
|
|
29
29
|
- More conservative `plan auto` acceptance checks with reviewer/tester goal checklists
|
|
30
30
|
- Tone presets through `soul`, without changing plans or code behavior
|
|
31
|
+
- Example soul presets include `professional`, `playful`, `anime`, `pirate`, `caveman`, and `ceo`
|
|
31
32
|
- Sub-agents for planning, coding, review, and testing
|
|
32
33
|
|
|
33
34
|
### Quick Start
|
|
@@ -142,6 +143,7 @@ CodeMini CLI 是一个为小模型工作流优化过的代码助手 CLI,重点
|
|
|
142
143
|
- 为小模型补了结构化代码工具:`locate`、`open_target`、`edit_target`
|
|
143
144
|
- `plan auto` 会基于原始目标生成验收清单,并更保守地处理 reviewer/tester 结果
|
|
144
145
|
- `soul` 只影响语气,不影响计划和代码行为
|
|
146
|
+
- 可用的 `soul` 示例包括 `professional`、`playful`、`anime`、`pirate`、`caveman`、`ceo`
|
|
145
147
|
- 支持 planner、coder、reviewer、tester 多角色 sub-agent
|
|
146
148
|
|
|
147
149
|
### 快速开始
|
package/package.json
CHANGED
|
@@ -4,34 +4,28 @@ description: Lightweight brainstorming skill for 30B-class models. Use when a fe
|
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Use this skill
|
|
7
|
+
Use this skill only when the task needs clarification or option comparison before coding.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
9
|
+
Core rules:
|
|
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
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
1. Ask one question at a time.
|
|
17
|
-
Do not dump a long questionnaire. Pick the most important uncertainty and resolve it first.
|
|
18
|
-
|
|
19
|
-
2. Stay concrete.
|
|
20
|
-
Focus on purpose, constraints, success criteria, and what should be intentionally left out.
|
|
18
|
+
Output format:
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
Keep each option short. Lead with the recommended option and say why.
|
|
20
|
+
Mode A: key constraint missing
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
Question:
|
|
23
|
+
- ask:
|
|
24
|
+
- why this matters:
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
Summarize the chosen direction in a few bullets or a short paragraph, then move to execution only after alignment.
|
|
26
|
+
Wait for the user's answer.
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
Do not write implementation code, pseudo-code, or file edits while the direction is still being chosen.
|
|
33
|
-
|
|
34
|
-
Output format:
|
|
28
|
+
Mode B: goal is clear but approach choice remains
|
|
35
29
|
|
|
36
30
|
Option 1:
|
|
37
31
|
- idea:
|
|
@@ -48,22 +42,9 @@ Option 3 (optional):
|
|
|
48
42
|
- pros:
|
|
49
43
|
- cons:
|
|
50
44
|
|
|
51
|
-
|
|
52
|
-
-
|
|
45
|
+
Suggested decision:
|
|
46
|
+
- recommended:
|
|
53
47
|
- reason:
|
|
54
48
|
|
|
55
|
-
After decision:
|
|
56
|
-
- stop after the
|
|
57
|
-
|
|
58
|
-
Suggested flow:
|
|
59
|
-
- Restate the task briefly
|
|
60
|
-
- Ask the next best question when a key uncertainty blocks implementation
|
|
61
|
-
- Propose options with tradeoffs
|
|
62
|
-
- Confirm the chosen approach
|
|
63
|
-
- Stop at a clear decision point
|
|
64
|
-
|
|
65
|
-
Avoid:
|
|
66
|
-
- large ceremonies
|
|
67
|
-
- repeating the full conversation
|
|
68
|
-
- asking multiple independent questions in one turn
|
|
69
|
-
- proposing implementation details before the problem is clear
|
|
49
|
+
After suggested decision:
|
|
50
|
+
- stop after the recommended direction unless the user clearly asks to continue into implementation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: superpowers-lite
|
|
3
|
-
description: Concise workflow skill tuned for 30B-class models:
|
|
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
4
|
version: 0.1.0
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -12,10 +12,38 @@ Primary behavior:
|
|
|
12
12
|
- keep edits local
|
|
13
13
|
- verify before claiming success
|
|
14
14
|
|
|
15
|
+
Routing:
|
|
16
|
+
|
|
17
|
+
1. If the task is clear, small, and the implementation path is obvious:
|
|
18
|
+
- execute directly
|
|
19
|
+
- do not force brainstorming
|
|
20
|
+
|
|
21
|
+
2. If the goal is clear but there are multiple reasonable implementation paths:
|
|
22
|
+
- use `brainstorm`
|
|
23
|
+
- give 2-3 short options
|
|
24
|
+
- do not choose for the user unless the user explicitly asks for a recommendation
|
|
25
|
+
|
|
26
|
+
3. If the request is still missing a key constraint or success condition:
|
|
27
|
+
- ask exactly one clarifying question
|
|
28
|
+
- do not give options yet
|
|
29
|
+
- do not write code yet
|
|
30
|
+
|
|
31
|
+
4. If the request is greenfield and underspecified, such as "build a page", "make a site", "generate an app", or similar:
|
|
32
|
+
- treat it as missing key constraints by default
|
|
33
|
+
- ask one high-value question before coding
|
|
34
|
+
- do not assume features, storage model, or scope unless the user already gave them
|
|
35
|
+
|
|
36
|
+
Tool order:
|
|
37
|
+
- prefer `locate` first for repo search and candidate discovery
|
|
38
|
+
- use `open_target` to inspect the smallest useful code block with edit metadata
|
|
39
|
+
- use `edit_target` for minimal validated edits
|
|
40
|
+
- use `search_code`, `read_block`, and `read_symbol_context` when lower-level structured context is needed
|
|
41
|
+
- use shell search such as `rg` only as a fallback when structured tools are not enough
|
|
42
|
+
|
|
15
43
|
Core rules:
|
|
16
44
|
|
|
17
45
|
1. Search first.
|
|
18
|
-
|
|
46
|
+
Prefer structured search before broad file reads. Start with `locate`, then inspect with `open_target`, and only fall back to shell search such as `rg` when the structured tools are not enough.
|
|
19
47
|
|
|
20
48
|
2. Keep context tight.
|
|
21
49
|
Do not carry full conversation history into every step. Summarize, narrow scope, and work from the most recent relevant evidence.
|
|
@@ -28,21 +56,24 @@ When a task can be split cleanly, use sub-agents for bounded subtasks so the mai
|
|
|
28
56
|
- a concrete expected output
|
|
29
57
|
|
|
30
58
|
4. Do not code against unclear requirements.
|
|
31
|
-
If the requested behavior, scope, or acceptance is unclear, do not jump into implementation.
|
|
59
|
+
If the requested behavior, scope, or acceptance is unclear, do not jump into implementation. First decide which of these applies:
|
|
60
|
+
- missing key constraint -> ask one question
|
|
61
|
+
- multiple valid approaches -> use `brainstorm`
|
|
62
|
+
- clear enough to build -> proceed
|
|
32
63
|
|
|
33
64
|
5. Read and write with intent.
|
|
34
|
-
Use `read_file`
|
|
65
|
+
Use `open_target`, `read_block`, and `read_symbol_context` before `read_file` when possible. Use `edit_target` for focused edits. Use `write_file` only for full-file writes. Avoid unnecessary tool calls and avoid rereading the same file without a reason.
|
|
35
66
|
|
|
36
67
|
6. Verify before claiming success.
|
|
37
68
|
Run the relevant test, check, or command before saying work is fixed or complete.
|
|
38
69
|
|
|
39
70
|
Default workflow:
|
|
40
|
-
- Search with `
|
|
41
|
-
- Inspect local context
|
|
42
|
-
- If the request is unclear,
|
|
71
|
+
- Search with `locate`
|
|
72
|
+
- Inspect local context with `open_target`
|
|
73
|
+
- If the request is unclear, first decide: ask one question, brainstorm, or proceed
|
|
43
74
|
- Plan the next smallest step
|
|
44
75
|
- Delegate if the work is independent
|
|
45
|
-
- Edit
|
|
76
|
+
- Edit with `edit_target`
|
|
46
77
|
- Verify
|
|
47
78
|
- Summarize briefly
|
|
48
79
|
|
package/souls/caveman.md
ADDED
package/souls/ceo.md
ADDED
package/souls/pirate.md
ADDED
package/src/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import { handleConfig } from './commands/config.js';
|
|
|
4
4
|
import { handleDoctor } from './commands/doctor.js';
|
|
5
5
|
import { handleSkill } from './commands/skill.js';
|
|
6
6
|
|
|
7
|
-
const VERSION = '0.1.
|
|
7
|
+
const VERSION = '0.1.17';
|
|
8
8
|
|
|
9
9
|
function printHelp() {
|
|
10
10
|
console.log(`codemini ${VERSION}
|
package/src/core/chat-runtime.js
CHANGED
|
@@ -572,14 +572,19 @@ function selectAutoSkillNames(text = '') {
|
|
|
572
572
|
const explicitBrainstorm =
|
|
573
573
|
/(brainstorm|头脑风暴|方案|思路|设计一下|设计方案|怎么做|如何做|approach|options?)/i.test(input);
|
|
574
574
|
const ambiguitySignals =
|
|
575
|
-
/(not sure|unsure|unclear|help me think|let'?s think|should we|which (?:approach|option|way)|best way|trade-?off|vs\b|versus|or should
|
|
575
|
+
/(not sure|unsure|unclear|help me think|let'?s think|should we|which (?:approach|option|way)|best way|trade-?off|vs\b|versus|or should|maybe|roughly|just something simple|要不要|不确定|不明确|先别写|先不要写|先讨论|先想一下|哪个方案|怎么设计|如何设计|取舍|还是|大概|先做个|做一个简单的|先来个)/i.test(
|
|
576
576
|
input
|
|
577
577
|
);
|
|
578
578
|
const featureRequest =
|
|
579
|
-
/\b(add|build|create|implement|support|introduce|design|refactor|change|update)\b/i.test(input) ||
|
|
580
|
-
/(
|
|
579
|
+
/\b(add|build|create|generate|make|implement|support|introduce|design|refactor|change|update)\b/i.test(input) ||
|
|
580
|
+
/(新增|增加|实现|支持|设计|重构|改造|调整|生成|做一个|做个|创建)/i.test(input);
|
|
581
|
+
const greenfieldBuildRequest =
|
|
582
|
+
(/\b(build|create|generate|make)\b/i.test(input) || /(生成|做一个|做个|创建)/i.test(input)) &&
|
|
583
|
+
/(\b(project|app|site|website|page|dashboard|tool|component|landing page|html page)\b|项目|应用|网页|页面|网站|工具|组件|看板)/i.test(
|
|
584
|
+
input
|
|
585
|
+
);
|
|
581
586
|
|
|
582
|
-
if (explicitBrainstorm || (ambiguitySignals && featureRequest)) {
|
|
587
|
+
if (explicitBrainstorm || (ambiguitySignals && featureRequest) || greenfieldBuildRequest) {
|
|
583
588
|
selected.push('brainstorm');
|
|
584
589
|
}
|
|
585
590
|
return selected;
|
|
@@ -2537,6 +2542,10 @@ export async function createChatRuntime({
|
|
|
2537
2542
|
custom.name === 'brainstorm'
|
|
2538
2543
|
? [
|
|
2539
2544
|
renderCommandPrompt(custom, []),
|
|
2545
|
+
'Explicit brainstorm mode:',
|
|
2546
|
+
'- Ask exactly one clarifying question first if any important uncertainty remains.',
|
|
2547
|
+
'- Do not inspect the repo or generate code unless the user explicitly asks for that.',
|
|
2548
|
+
'- If you recommend an option, present it as a suggested decision rather than a final choice for the user.',
|
|
2540
2549
|
parsedInput.args.length > 0 ? `Current question:\n${parsedInput.args.join(' ')}` : ''
|
|
2541
2550
|
]
|
|
2542
2551
|
.filter(Boolean)
|
|
@@ -16,13 +16,13 @@ function suggestionForToken(token, config) {
|
|
|
16
16
|
const shell = String(config?.shell?.default || '').toLowerCase();
|
|
17
17
|
if (token === 'find' || token === 'grep') {
|
|
18
18
|
return shell === 'powershell'
|
|
19
|
-
? '
|
|
20
|
-
: '
|
|
19
|
+
? 'Prefer structured tools like locate and open_target first. If you need shell fallback, use allowed search and context commands such as Get-ChildItem, Select-String, Get-Content, or rg when available.'
|
|
20
|
+
: 'Prefer structured tools like locate and open_target first. If you need shell fallback, use allowed search and context commands such as rg, find, grep, sed, cat, or ls.';
|
|
21
21
|
}
|
|
22
22
|
if (shell === 'powershell') {
|
|
23
|
-
return '
|
|
23
|
+
return 'Prefer structured tools like locate, open_target, and edit_target first. If you need shell fallback, use allowed shell commands for search and local context such as Get-ChildItem, Get-Content, Select-String, or rg when available.';
|
|
24
24
|
}
|
|
25
|
-
return '
|
|
25
|
+
return 'Prefer structured tools like locate, open_target, and edit_target first. If you need shell fallback, use allowed shell commands for search and local context such as rg, find, grep, sed, cat, or ls.';
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export function evaluateCommandPolicy(command, config, workspaceRoot = process.cwd()) {
|