specline 1.0.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/LICENSE +21 -0
- package/README.md +161 -0
- package/cli.mjs +169 -0
- package/package.json +30 -0
- package/templates/.cursor/agents/specline-backend-dev.md +47 -0
- package/templates/.cursor/agents/specline-code-reviewer.md +51 -0
- package/templates/.cursor/agents/specline-frontend-dev.md +47 -0
- package/templates/.cursor/agents/specline-spec-creator.md +216 -0
- package/templates/.cursor/agents/specline-spec-reviewer.md +115 -0
- package/templates/.cursor/agents/specline-test-runner.md +98 -0
- package/templates/.cursor/agents/specline-test-writer.md +119 -0
- package/templates/.cursor/commands/specline-explore.md +173 -0
- package/templates/.cursor/commands/specline-pipeline.md +22 -0
- package/templates/.cursor/hooks/specline-agent-guard.sh +15 -0
- package/templates/.cursor/hooks/specline-auto-format.sh +12 -0
- package/templates/.cursor/hooks/specline-pipeline-gate.sh +682 -0
- package/templates/.cursor/hooks/specline-shell-guard.sh +18 -0
- package/templates/.cursor/hooks.json +25 -0
- package/templates/.cursor/skills/specline-apply-change/SKILL.md +140 -0
- package/templates/.cursor/skills/specline-archive-change/SKILL.md +114 -0
- package/templates/.cursor/skills/specline-explore/SKILL.md +288 -0
- package/templates/.cursor/skills/specline-pipeline/SKILL.md +674 -0
- package/templates/.cursor/skills/specline-propose/SKILL.md +79 -0
- package/templates/.specline-config.yaml +1 -0
- package/templates/specline/config.yaml +20 -0
|
@@ -0,0 +1,173 @@
|
|
|
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
|
+
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
|
|
9
|
+
|
|
10
|
+
**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.
|
|
11
|
+
|
|
12
|
+
**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.
|
|
13
|
+
|
|
14
|
+
**Input**: The argument after `/specline-explore` is whatever the user wants to think about. Could be:
|
|
15
|
+
- A vague idea: "real-time collaboration"
|
|
16
|
+
- A specific problem: "the auth system is getting unwieldy"
|
|
17
|
+
- A change name: "add-dark-mode" (to explore in context of that change)
|
|
18
|
+
- A comparison: "postgres vs sqlite for this"
|
|
19
|
+
- Nothing (just enter explore mode)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## The Stance
|
|
24
|
+
|
|
25
|
+
- **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
|
|
26
|
+
- **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.
|
|
27
|
+
- **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
|
|
28
|
+
- **Adaptive** - Follow interesting threads, pivot when new information emerges
|
|
29
|
+
- **Patient** - Don't rush to conclusions, let the shape of the problem emerge
|
|
30
|
+
- **Grounded** - Explore the actual codebase when relevant, don't just theorize
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## What You Might Do
|
|
35
|
+
|
|
36
|
+
Depending on what the user brings, you might:
|
|
37
|
+
|
|
38
|
+
**Explore the problem space**
|
|
39
|
+
- Ask clarifying questions that emerge from what they said
|
|
40
|
+
- Challenge assumptions
|
|
41
|
+
- Reframe the problem
|
|
42
|
+
- Find analogies
|
|
43
|
+
|
|
44
|
+
**Investigate the codebase**
|
|
45
|
+
- Map existing architecture relevant to the discussion
|
|
46
|
+
- Find integration points
|
|
47
|
+
- Identify patterns already in use
|
|
48
|
+
- Surface hidden complexity
|
|
49
|
+
|
|
50
|
+
**Compare options**
|
|
51
|
+
- Brainstorm multiple approaches
|
|
52
|
+
- Build comparison tables
|
|
53
|
+
- Sketch tradeoffs
|
|
54
|
+
- Recommend a path (if asked)
|
|
55
|
+
|
|
56
|
+
**Visualize**
|
|
57
|
+
```
|
|
58
|
+
┌─────────────────────────────────────────┐
|
|
59
|
+
│ Use ASCII diagrams liberally │
|
|
60
|
+
├─────────────────────────────────────────┤
|
|
61
|
+
│ │
|
|
62
|
+
│ ┌────────┐ ┌────────┐ │
|
|
63
|
+
│ │ State │────────▶│ State │ │
|
|
64
|
+
│ │ A │ │ B │ │
|
|
65
|
+
│ └────────┘ └────────┘ │
|
|
66
|
+
│ │
|
|
67
|
+
│ System diagrams, state machines, │
|
|
68
|
+
│ data flows, architecture sketches, │
|
|
69
|
+
│ dependency graphs, comparison tables │
|
|
70
|
+
│ │
|
|
71
|
+
└─────────────────────────────────────────┘
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Surface risks and unknowns**
|
|
75
|
+
- Identify what could go wrong
|
|
76
|
+
- Find gaps in understanding
|
|
77
|
+
- Suggest spikes or investigations
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Specline Awareness
|
|
82
|
+
|
|
83
|
+
You have full context of the Specline system. Use it naturally, don't force it.
|
|
84
|
+
|
|
85
|
+
### Check for context
|
|
86
|
+
|
|
87
|
+
At the start, quickly check what exists:
|
|
88
|
+
```bash
|
|
89
|
+
specline-pipeline-gate.sh list --json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
This tells you:
|
|
93
|
+
- If there are active changes
|
|
94
|
+
- Their names, schemas, and status
|
|
95
|
+
- What the user might be working on
|
|
96
|
+
|
|
97
|
+
If the user mentioned a specific change name, read its artifacts for context.
|
|
98
|
+
|
|
99
|
+
### When no change exists
|
|
100
|
+
|
|
101
|
+
Think freely. When insights crystallize, you might offer:
|
|
102
|
+
|
|
103
|
+
- "This feels solid enough to start a change. Want me to create a proposal?"
|
|
104
|
+
- Or keep exploring - no pressure to formalize
|
|
105
|
+
|
|
106
|
+
### When a change exists
|
|
107
|
+
|
|
108
|
+
If the user mentions a change or you detect one is relevant:
|
|
109
|
+
|
|
110
|
+
1. **Read existing artifacts for context**
|
|
111
|
+
- `specline/changes/<name>/proposal.md`
|
|
112
|
+
- `specline/changes/<name>/design.md`
|
|
113
|
+
- `specline/changes/<name>/tasks.md`
|
|
114
|
+
- etc.
|
|
115
|
+
|
|
116
|
+
2. **Reference them naturally in conversation**
|
|
117
|
+
- "Your design mentions using Redis, but we just realized SQLite fits better..."
|
|
118
|
+
- "The proposal scopes this to premium users, but we're now thinking everyone..."
|
|
119
|
+
|
|
120
|
+
3. **Offer to capture when decisions are made**
|
|
121
|
+
|
|
122
|
+
| Insight Type | Where to Capture |
|
|
123
|
+
|----------------------------|--------------------------------|
|
|
124
|
+
| New requirement discovered | `specs/<capability>/spec.md` |
|
|
125
|
+
| Requirement changed | `specs/<capability>/spec.md` |
|
|
126
|
+
| Design decision made | `design.md` |
|
|
127
|
+
| Scope changed | `proposal.md` |
|
|
128
|
+
| New work identified | `tasks.md` |
|
|
129
|
+
| Assumption invalidated | Relevant artifact |
|
|
130
|
+
|
|
131
|
+
Example offers:
|
|
132
|
+
- "That's a design decision. Capture it in design.md?"
|
|
133
|
+
- "This is a new requirement. Add it to specs?"
|
|
134
|
+
- "This changes scope. Update the proposal?"
|
|
135
|
+
|
|
136
|
+
4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## What You Don't Have To Do
|
|
141
|
+
|
|
142
|
+
- Follow a script
|
|
143
|
+
- Ask the same questions every time
|
|
144
|
+
- Produce a specific artifact
|
|
145
|
+
- Reach a conclusion
|
|
146
|
+
- Stay on topic if a tangent is valuable
|
|
147
|
+
- Be brief (this is thinking time)
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Ending Discovery
|
|
152
|
+
|
|
153
|
+
There's no required ending. Discovery might:
|
|
154
|
+
|
|
155
|
+
- **Flow into a proposal**: "Ready to start? I can create a change proposal."
|
|
156
|
+
- **Result in artifact updates**: "Updated design.md with these decisions"
|
|
157
|
+
- **Just provide clarity**: User has what they need, moves on
|
|
158
|
+
- **Continue later**: "We can pick this up anytime"
|
|
159
|
+
|
|
160
|
+
When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Guardrails
|
|
165
|
+
|
|
166
|
+
- **Don't implement** - Never write code or implement features. Creating Specline artifacts is fine, writing application code is not.
|
|
167
|
+
- **Don't fake understanding** - If something is unclear, dig deeper
|
|
168
|
+
- **Don't rush** - Discovery is thinking time, not task time
|
|
169
|
+
- **Don't force structure** - Let patterns emerge naturally
|
|
170
|
+
- **Don't auto-capture** - Offer to save insights, don't just do it
|
|
171
|
+
- **Do visualize** - A good diagram is worth many paragraphs
|
|
172
|
+
- **Do explore the codebase** - Ground discussions in reality
|
|
173
|
+
- **Do question assumptions** - Including the user's and your own
|
|
@@ -0,0 +1,22 @@
|
|
|
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 复核、归档确认)。支持断点续跑。
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# agent-guard.sh — subagentStart Hook: 校验子Agent类型
|
|
3
|
+
ALLOWED_AGENTS="specline-spec-creator|specline-spec-reviewer|specline-frontend-dev|specline-backend-dev|specline-code-reviewer|specline-test-writer|specline-test-runner"
|
|
4
|
+
input=$(cat)
|
|
5
|
+
subagent_type=$(echo "$input" | jq -r '.subagent_type // empty')
|
|
6
|
+
if [ -z "$subagent_type" ]; then
|
|
7
|
+
echo '{"permission": "allow"}'
|
|
8
|
+
exit 0
|
|
9
|
+
fi
|
|
10
|
+
if echo "$subagent_type" | grep -qE "^($ALLOWED_AGENTS)$"; then
|
|
11
|
+
echo '{"permission": "allow"}'
|
|
12
|
+
exit 0
|
|
13
|
+
fi
|
|
14
|
+
echo "{\"permission\": \"deny\", \"user_message\": \"子Agent类型 '$subagent_type' 不在允许列表中。\"}"
|
|
15
|
+
exit 0
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# auto-format.sh — afterFileEdit Hook: 自动格式化
|
|
3
|
+
input=$(cat)
|
|
4
|
+
filepath=$(echo "$input" | jq -r '.file // empty')
|
|
5
|
+
if [ -z "$filepath" ]; then exit 0; fi
|
|
6
|
+
if echo "$filepath" | grep -qE "\.py$"; then
|
|
7
|
+
command -v ruff &>/dev/null && ruff format "$filepath" 2>/dev/null || true
|
|
8
|
+
fi
|
|
9
|
+
if echo "$filepath" | grep -qE "\.(ts|tsx|js)$"; then
|
|
10
|
+
command -v npx &>/dev/null && npx prettier --write "$filepath" 2>/dev/null || true
|
|
11
|
+
fi
|
|
12
|
+
exit 0
|