codemini-cli 0.1.15 → 0.1.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codemini-cli",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Coding CLI optimized for small-model workflows and Windows PowerShell",
5
5
  "keywords": [
6
6
  "cli",
@@ -4,35 +4,54 @@ 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 before adding new behavior, new features, or meaningful workflow changes.
7
+ Use this skill only after the controller has decided the task needs clarification or option comparison before coding.
8
8
 
9
9
  Primary purpose:
10
- - stop premature coding when the request is still fuzzy
11
- - narrow the decision to a small number of approaches
12
- - leave with one chosen direction
10
+ - ask one high-value question when a key constraint is missing
11
+ - compare 2-3 short options when the goal is clear but the approach is not
12
+ - stop at a clear decision point
13
13
 
14
14
  Rules:
15
15
 
16
16
  1. Ask one question at a time.
17
17
  Do not dump a long questionnaire. Pick the most important uncertainty and resolve it first.
18
18
 
19
+ 1a. If a key uncertainty remains, stop after one question.
20
+ Do not ask multiple numbered questions in the same reply. Do not continue into options, decisions, code, or file edits until that question is answered.
21
+
19
22
  2. Stay concrete.
20
- Focus on purpose, constraints, success criteria, and what should be intentionally left out.
23
+ Focus only on the uncertainty that blocks execution.
21
24
 
22
- 3. Offer 2-3 approaches.
23
- Keep each option short. Lead with the recommended option and say why.
25
+ 3. Offer 2-3 approaches only when the key constraint is already clear.
26
+ Keep each option short and focused on the main tradeoff.
24
27
 
25
28
  4. Keep the design small.
26
- Write only enough design for the current scope. Do not inflate a simple task into a full spec process unless needed.
29
+ Do not expand a simple task into a long design discussion.
27
30
 
28
31
  5. Confirm before implementation.
29
- Summarize the chosen direction in a few bullets or a short paragraph, then move to execution only after alignment.
32
+ If options were given, wait for the user to choose unless the user explicitly asks for a recommendation.
30
33
 
31
34
  6. No code before convergence.
32
35
  Do not write implementation code, pseudo-code, or file edits while the direction is still being chosen.
33
36
 
37
+ 7. Do not decide for the user when the request is still under-specified.
38
+ If the user has not provided enough information to choose confidently, ask the next best question and wait.
39
+
40
+ 8. Do not inspect the repo unless existing project context is directly relevant.
41
+ For greenfield brainstorming, stay in conversation mode first.
42
+
34
43
  Output format:
35
44
 
45
+ Mode A: key constraint missing
46
+
47
+ Question:
48
+ - ask:
49
+ - why this matters:
50
+
51
+ Wait for the user's answer.
52
+
53
+ Mode B: goal is clear but approach choice remains
54
+
36
55
  Option 1:
37
56
  - idea:
38
57
  - pros:
@@ -57,9 +76,7 @@ After decision:
57
76
 
58
77
  Suggested flow:
59
78
  - 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
79
+ - Choose one mode only: Question or Options
63
80
  - Stop at a clear decision point
64
81
 
65
82
  Avoid:
@@ -12,6 +12,27 @@ 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
+
15
36
  Core rules:
16
37
 
17
38
  1. Search first.
@@ -28,7 +49,10 @@ When a task can be split cleanly, use sub-agents for bounded subtasks so the mai
28
49
  - a concrete expected output
29
50
 
30
51
  4. Do not code against unclear requirements.
31
- If the requested behavior, scope, or acceptance is unclear, do not jump into implementation. Ask the next best question or use `brainstorm` to compare a few small options and converge first.
52
+ If the requested behavior, scope, or acceptance is unclear, do not jump into implementation. First decide which of these applies:
53
+ - missing key constraint -> ask one question
54
+ - multiple valid approaches -> use `brainstorm`
55
+ - clear enough to build -> proceed
32
56
 
33
57
  5. Read and write with intent.
34
58
  Use `read_file` only when shell output is not enough. Use `write_file` for edits. Avoid unnecessary tool calls and avoid rereading the same file without a reason.
@@ -39,7 +63,7 @@ Run the relevant test, check, or command before saying work is fixed or complete
39
63
  Default workflow:
40
64
  - Search with `rg`
41
65
  - Inspect local context
42
- - If the request is unclear, pause for clarification or brainstorm
66
+ - If the request is unclear, first decide: ask one question, brainstorm, or proceed
43
67
  - Plan the next smallest step
44
68
  - Delegate if the work is independent
45
69
  - Edit
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.15';
7
+ const VERSION = '0.1.16';
8
8
 
9
9
  function printHelp() {
10
10
  console.log(`codemini ${VERSION}
@@ -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|要不要|不确定|不明确|先别写|先不要写|先讨论|先想一下|哪个方案|怎么设计|如何设计|取舍|还是)/i.test(
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
- /(新增|增加|实现|支持|设计|重构|改造|调整)/i.test(input);
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
+ '- Do not choose an option on the first reply unless the request is already specific enough or the user explicitly asks you to recommend one.',
2540
2549
  parsedInput.args.length > 0 ? `Current question:\n${parsedInput.args.join(' ')}` : ''
2541
2550
  ]
2542
2551
  .filter(Boolean)