specline 1.3.3 → 1.3.4
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/cli.mjs
CHANGED
|
@@ -368,7 +368,6 @@ function cmd_init(targetPath) {
|
|
|
368
368
|
// 创建目录结构
|
|
369
369
|
const dirs = [
|
|
370
370
|
'.cursor/agents',
|
|
371
|
-
'.cursor/commands',
|
|
372
371
|
'.cursor/skills',
|
|
373
372
|
'.cursor/hooks',
|
|
374
373
|
'specline/changes/archive',
|
|
@@ -404,12 +403,11 @@ function cmd_init(targetPath) {
|
|
|
404
403
|
}
|
|
405
404
|
|
|
406
405
|
const agentsCount = countFiles(join(target, '.cursor', 'agents'));
|
|
407
|
-
const commandsCount = countFiles(join(target, '.cursor', 'commands'));
|
|
408
406
|
const skillsCount = countFiles(join(target, '.cursor', 'skills'));
|
|
409
407
|
const hooksCount = countFiles(join(target, '.cursor', 'hooks'));
|
|
410
408
|
|
|
411
409
|
success('Specline 初始化完成');
|
|
412
|
-
log(`📁 文件: ${
|
|
410
|
+
log(`📁 文件: ${skillsCount} skills, ${agentsCount} agents, ${hooksCount} hooks`);
|
|
413
411
|
log('');
|
|
414
412
|
log('🚀 试试在 Cursor 中输入:');
|
|
415
413
|
log(' /specline-pipeline "你的第一个需求"');
|
package/package.json
CHANGED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: /specline-explore
|
|
3
|
-
id: specline-explore
|
|
4
|
-
category: Workflow
|
|
5
|
-
description: "Enter explore mode - think through ideas, investigate problems, clarify requirements"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## ⚠️ 硬边界:探索模式禁止直接写代码
|
|
9
|
-
|
|
10
|
-
**你只能做这些**:读取代码、画图、提问、比较方案、质疑假设、创建 Specline artifacts(proposal/design/specs)
|
|
11
|
-
**你不能做这些**:写入/修改任何实现代码文件(Write、StrReplace、Delete、Shell 等会导致代码变更的操作)
|
|
12
|
-
|
|
13
|
-
如果用户要你写代码 → 提醒退出探索模式,先 `/specline-pipeline` 或 `/specline-quickfix`。
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
|
|
18
|
-
|
|
19
|
-
**IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create Specline artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
|
|
20
|
-
|
|
21
|
-
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
|
|
22
|
-
|
|
23
|
-
**Input**: The argument after `/specline-explore` is whatever the user wants to think about. Could be:
|
|
24
|
-
- A vague idea: "real-time collaboration"
|
|
25
|
-
- A specific problem: "the auth system is getting unwieldy"
|
|
26
|
-
- A change name: "add-dark-mode" (to explore in context of that change)
|
|
27
|
-
- A comparison: "postgres vs sqlite for this"
|
|
28
|
-
- Nothing (just enter explore mode)
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## The Stance
|
|
33
|
-
|
|
34
|
-
- **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
|
|
35
|
-
- **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
|
|
36
|
-
- **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
|
|
37
|
-
- **Adaptive** - Follow interesting threads, pivot when new information emerges
|
|
38
|
-
- **Patient** - Don't rush to conclusions, let the shape of the problem emerge
|
|
39
|
-
- **Grounded** - Explore the actual codebase when relevant, don't just theorize
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## What You Might Do
|
|
44
|
-
|
|
45
|
-
Depending on what the user brings, you might:
|
|
46
|
-
|
|
47
|
-
**Explore the problem space**
|
|
48
|
-
- Ask clarifying questions that emerge from what they said
|
|
49
|
-
- Challenge assumptions
|
|
50
|
-
- Reframe the problem
|
|
51
|
-
- Find analogies
|
|
52
|
-
|
|
53
|
-
**Investigate the codebase**
|
|
54
|
-
- Map existing architecture relevant to the discussion
|
|
55
|
-
- Find integration points
|
|
56
|
-
- Identify patterns already in use
|
|
57
|
-
- Surface hidden complexity
|
|
58
|
-
|
|
59
|
-
**Compare options**
|
|
60
|
-
- Brainstorm multiple approaches
|
|
61
|
-
- Build comparison tables
|
|
62
|
-
- Sketch tradeoffs
|
|
63
|
-
- Recommend a path (if asked)
|
|
64
|
-
|
|
65
|
-
**Visualize**
|
|
66
|
-
```
|
|
67
|
-
┌─────────────────────────────────────────┐
|
|
68
|
-
│ Use ASCII diagrams liberally │
|
|
69
|
-
├─────────────────────────────────────────┤
|
|
70
|
-
│ │
|
|
71
|
-
│ ┌────────┐ ┌────────┐ │
|
|
72
|
-
│ │ State │────────▶│ State │ │
|
|
73
|
-
│ │ A │ │ B │ │
|
|
74
|
-
│ └────────┘ └────────┘ │
|
|
75
|
-
│ │
|
|
76
|
-
│ System diagrams, state machines, │
|
|
77
|
-
│ data flows, architecture sketches, │
|
|
78
|
-
│ dependency graphs, comparison tables │
|
|
79
|
-
│ │
|
|
80
|
-
└─────────────────────────────────────────┘
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
**Surface risks and unknowns**
|
|
84
|
-
- Identify what could go wrong
|
|
85
|
-
- Find gaps in understanding
|
|
86
|
-
- Suggest spikes or investigations
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Specline Awareness
|
|
91
|
-
|
|
92
|
-
You have full context of the Specline system. Use it naturally, don't force it.
|
|
93
|
-
|
|
94
|
-
### Check for context
|
|
95
|
-
|
|
96
|
-
At the start, quickly check what exists:
|
|
97
|
-
```bash
|
|
98
|
-
specline-pipeline-gate.sh list --json
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
This tells you:
|
|
102
|
-
- If there are active changes
|
|
103
|
-
- Their names, schemas, and status
|
|
104
|
-
- What the user might be working on
|
|
105
|
-
|
|
106
|
-
If the user mentioned a specific change name, read its artifacts for context.
|
|
107
|
-
|
|
108
|
-
### When no change exists
|
|
109
|
-
|
|
110
|
-
Think freely. When insights crystallize, you might offer:
|
|
111
|
-
|
|
112
|
-
- "This feels solid enough to start a change. Want me to create a proposal?"
|
|
113
|
-
- Or keep exploring - no pressure to formalize
|
|
114
|
-
|
|
115
|
-
### When a change exists
|
|
116
|
-
|
|
117
|
-
If the user mentions a change or you detect one is relevant:
|
|
118
|
-
|
|
119
|
-
1. **Read existing artifacts for context**
|
|
120
|
-
- `specline/changes/<name>/proposal.md`
|
|
121
|
-
- `specline/changes/<name>/design.md`
|
|
122
|
-
- `specline/changes/<name>/tasks.md`
|
|
123
|
-
- etc.
|
|
124
|
-
|
|
125
|
-
2. **Reference them naturally in conversation**
|
|
126
|
-
- "Your design mentions using Redis, but we just realized SQLite fits better..."
|
|
127
|
-
- "The proposal scopes this to premium users, but we're now thinking everyone..."
|
|
128
|
-
|
|
129
|
-
3. **Offer to capture when decisions are made**
|
|
130
|
-
|
|
131
|
-
| Insight Type | Where to Capture |
|
|
132
|
-
|----------------------------|--------------------------------|
|
|
133
|
-
| New requirement discovered | `specs/<capability>/spec.md` |
|
|
134
|
-
| Requirement changed | `specs/<capability>/spec.md` |
|
|
135
|
-
| Design decision made | `design.md` |
|
|
136
|
-
| Scope changed | `proposal.md` |
|
|
137
|
-
| New work identified | `tasks.md` |
|
|
138
|
-
| Assumption invalidated | Relevant artifact |
|
|
139
|
-
|
|
140
|
-
Example offers:
|
|
141
|
-
- "That's a design decision. Capture it in design.md?"
|
|
142
|
-
- "This is a new requirement. Add it to specs?"
|
|
143
|
-
- "This changes scope. Update the proposal?"
|
|
144
|
-
|
|
145
|
-
4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## What You Don't Have To Do
|
|
150
|
-
|
|
151
|
-
- Follow a script
|
|
152
|
-
- Ask the same questions every time
|
|
153
|
-
- Produce a specific artifact
|
|
154
|
-
- Reach a conclusion
|
|
155
|
-
- Stay on topic if a tangent is valuable
|
|
156
|
-
- Be brief (this is thinking time)
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## Ending Discovery
|
|
161
|
-
|
|
162
|
-
There's no required ending. Discovery might:
|
|
163
|
-
|
|
164
|
-
- **Flow into a proposal**: "Ready to start? I can create a change proposal."
|
|
165
|
-
- **Result in artifact updates**: "Updated design.md with these decisions"
|
|
166
|
-
- **Just provide clarity**: User has what they need, moves on
|
|
167
|
-
- **Continue later**: "We can pick this up anytime"
|
|
168
|
-
|
|
169
|
-
When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Guardrails
|
|
174
|
-
|
|
175
|
-
- **Don't implement** - Never write code or implement features. Creating Specline artifacts is fine, writing application code is not.
|
|
176
|
-
- **Don't fake understanding** - If something is unclear, dig deeper
|
|
177
|
-
- **Don't rush** - Discovery is thinking time, not task time
|
|
178
|
-
- **Don't force structure** - Let patterns emerge naturally
|
|
179
|
-
- **Don't auto-capture** - Offer to save insights, don't just do it
|
|
180
|
-
- **Do visualize** - A good diagram is worth many paragraphs
|
|
181
|
-
- **Do explore the codebase** - Ground discussions in reality
|
|
182
|
-
- **Do question assumptions** - Including the user's and your own
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: /specline-pipeline
|
|
3
|
-
id: specline-pipeline
|
|
4
|
-
category: Workflow
|
|
5
|
-
description: 开发流水线元 Skill —— 编排 Spec → Coding → Review → Test → Archive 全流程
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
开发流水线,自动编排从需求到归档的全流程。
|
|
9
|
-
|
|
10
|
-
**用法:**
|
|
11
|
-
- `/specline-pipeline <自然语言需求>` — 新建流水线
|
|
12
|
-
- `/specline-pipeline --change <change-name>` — 恢复指定流水线
|
|
13
|
-
- `/specline-pipeline` — 列出所有未完成流水线,选择继续
|
|
14
|
-
|
|
15
|
-
**阶段:**
|
|
16
|
-
1. Spec 编写与审核(specline-spec-creator 生成 → specline-spec-reviewer 审核)
|
|
17
|
-
2. Coding 编码(基于 tasks.md 任务依赖分批并发)
|
|
18
|
-
3. Code Review 审查(specline-code-reviewer)
|
|
19
|
-
4. Test 测试链(单元 → 集成 → E2E,测试 Agent 为黑盒)
|
|
20
|
-
5. Archive 归档
|
|
21
|
-
|
|
22
|
-
每个阶段有确定性门禁(exit code 判定,零 LLM 参与),3 个人工检查点(Spec 确认、Review 复核、归档确认)。支持断点续跑。
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: /specline-quickfix
|
|
3
|
-
id: specline-quickfix
|
|
4
|
-
category: Workflow
|
|
5
|
-
description: 轻量修改 Skill —— 小改动用 quickfix,大功能用 pipeline
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
轻量修改流程,在不创建规划文档的情况下快速执行小改动。
|
|
9
|
-
|
|
10
|
-
**用法:**
|
|
11
|
-
- `/specline-quickfix <描述>` — 执行轻量修改流程(修 bug、改配置、文档微调等小改动)
|
|
12
|
-
|
|
13
|
-
**阶段:**
|
|
14
|
-
1. UNDERSTAND — 读取相关代码,理解变更上下文
|
|
15
|
-
2. IMPLEMENT — 直接编辑文件(单 Agent,无子 Agent)
|
|
16
|
-
3. REVIEW — ReadLints 自动校验 + 修复(最多 2 次)+ Agent 自审
|
|
17
|
-
4. TEST — 运行项目已有单元测试(失败修复最多 2 次),无测试则跳过
|
|
18
|
-
5. ARCHIVE — 生成 summary.md + files-changed.json,询问 git commit
|
|
19
|
-
|
|
20
|
-
**适用场景**:1-3 个文件改动、单一关注点、不涉及架构变更、不需要新测试。
|
|
21
|
-
|
|
22
|
-
**不适合的场景**(应使用 `/specline-pipeline`):4+ 个文件改动、新增功能/重构、需要新测试、跨模块/多关注点。
|
|
23
|
-
|
|
24
|
-
0 个人工确认点,全程自动质量保证。
|