@gordon.gan/specflow 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -59,17 +59,17 @@ npm link
59
59
  在有源码的机器上打包:
60
60
  ```bash
61
61
  npm run build
62
- npm pack # 生成 gordon.gan-specflow-1.0.1.tgz
62
+ npm pack # 生成 gordon.gan-specflow-1.0.2.tgz
63
63
  ```
64
64
  在目标机器上安装:
65
65
  ```bash
66
- npm install -g ./gordon.gan-specflow-1.0.1.tgz
66
+ npm install -g ./gordon.gan-specflow-1.0.2.tgz
67
67
  ```
68
68
 
69
69
  ### 验证安装
70
70
 
71
71
  ```bash
72
- specflow --version # 应输出 1.0.1
72
+ specflow --version # 应输出 1.0.2
73
73
  specflow --help
74
74
  ```
75
75
 
@@ -125,8 +125,6 @@ specflow init
125
125
  **每阶段深度思考 → 多轮迭代精化**:每个阶段一次性产出实质内容(非占位骨架),再通过内部多轮迭代把 artifact 精化到稳态,最后进入执行。
126
126
 
127
127
  ```
128
- /specflow:scan [规划中 · v0.3] 扫描已有代码生成 specs 基线;当前请直接用 /specflow:propose 描述已有行为
129
-
130
128
  /specflow:explore [可选] 需求模糊时:读代码、比方案、定边界 → 产出 explore.md
131
129
 
132
130
  /specflow:propose 一次产出 4 个 artifact:proposal + delta specs + design + tasks(first-iteration 深度思考,非纯骨架)
@@ -231,8 +229,7 @@ cd legacy-project
231
229
  specflow init
232
230
 
233
231
  # 在 Claude Code 里:
234
- # 注意:/specflow:scan 当前规划在 v0.3,未实现。
235
- # v0.2.x 的推荐做法是:需求模糊时先 /specflow:explore;或需求清晰时直接进 plan,
232
+ # 棕地项目:需求模糊时先 /specflow:explore;或需求清晰时直接 /specflow:propose,
236
233
  # 在 proposal Q&A 里描述已有行为 + 新增变更,让 propose 为将要改动的 capability 生成 delta spec 基线。
237
234
  /specflow:explore "描述模糊问题或不确定的改法" # 可选
238
235
  /specflow:propose "描述已有行为 + 你这次要改的新功能"
@@ -277,7 +274,6 @@ specflow init
277
274
 
278
275
  | 命令 | 说明 |
279
276
  |---|---|
280
- | `/specflow:scan` | **[规划中 · v0.3]** 扫描已有代码库生成 specs 基线;v0.2.x 未实现,触发时 skill 会提示替代方案 |
281
277
  | `/specflow:explore` | **需求模糊时** 先探索:读代码、比方案、定边界,产出 `explore.md`,再 handoff 到 propose |
282
278
  | `/specflow:propose` | 需求规划:生成 proposal + delta specs |
283
279
  | `/specflow:refine` | 技术方案探讨(brainstorming + design.md) |
@@ -447,10 +443,6 @@ nvm use 20
447
443
  npm install -g @gordon.gan/specflow
448
444
  ```
449
445
 
450
- ### code-review-graph 安装失败
451
-
452
- `/specflow:scan` 规划在 v0.3 实现时会用到 code-review-graph(当前在 optionalDependencies 里占位)。这个依赖是从 GitHub 安装的,如果网络问题导致失败,**不影响任何 v0.2.x 功能**——scan 本身在 v0.2.x 不可用,其余所有命令与此依赖无关。
453
-
454
446
  ---
455
447
 
456
448
  ## 来源与许可
@@ -1,6 +1,5 @@
1
1
  import { COMMAND_IDS } from './command-catalog.js';
2
2
  const MARKER_RULES = [
3
- { id: 'sub.scan.planned_v03_notice', skill: 'scan', includes: ['[PLANNED v0.3]', 'NOT YET FUNCTIONAL'] },
4
3
  { id: 'sub.explore.conversation_first', skill: 'explore', includes: ['think-before-propose', 'Do NOT write proposal'] },
5
4
  { id: 'sub.explore.handoff_propose', skill: 'explore', includes: ['explore.md', 'handoff'] },
6
5
  { id: 'sub.explore.mid_change_reexplore', skill: 'explore', includes: ['Re-explore Mid-Change', 'stuck during'] },
@@ -17,7 +16,6 @@ const MARKER_RULES = [
17
16
  { id: 'sub.archive.archive_merge', skill: 'archive', includes: ['specflow change archive', 'delta specs into main specs'] },
18
17
  { id: 'sub.fix.urgent_mode', skill: 'fix', includes: ['--urgent', 'skip'] },
19
18
  { id: 'sub.snap.posthoc', skill: 'snap', includes: ['post-hoc', 'archive'] },
20
- { id: 'failure.scan.not_implemented_guard', skill: 'scan', includes: ['do NOT attempt to run `specflow scan`'] },
21
19
  { id: 'failure.explore.proposal_exists_redirect', skill: 'explore', includes: ['explore is too late', 'refine'] },
22
20
  { id: 'failure.propose.explore_draft_gate', skill: 'propose', includes: ['Status: draft', 'REFUSE to proceed'] },
23
21
  { id: 'failure.apply.phase_gate', skill: 'apply', includes: ['HARD GATE (prerequisite)', 'phase is not `refined`, REFUSE'] },
@@ -1,5 +1,4 @@
1
1
  export const COMMAND_CATALOG = [
2
- { id: 'scan', description: 'Brownfield project scanner via code-review-graph' },
3
2
  { id: 'explore', description: 'Think-before-propose exploration when requirements are fuzzy' },
4
3
  { id: 'propose', description: 'Create proposal and spec artifacts for a change' },
5
4
  { id: 'refine', description: 'Refine and iterate on spec artifacts' },
@@ -6,7 +6,6 @@ export const CAPABILITY_MANIFEST = [
6
6
  level: 'command',
7
7
  required: true,
8
8
  })),
9
- { id: 'sub.scan.planned_v03_notice', commandId: 'scan', level: 'sub-capability', required: true },
10
9
  { id: 'sub.explore.conversation_first', commandId: 'explore', level: 'sub-capability', required: true },
11
10
  { id: 'sub.explore.handoff_propose', commandId: 'explore', level: 'sub-capability', required: true },
12
11
  { id: 'sub.explore.mid_change_reexplore', commandId: 'explore', level: 'sub-capability', required: true },
@@ -23,7 +22,6 @@ export const CAPABILITY_MANIFEST = [
23
22
  { id: 'sub.archive.archive_merge', commandId: 'archive', level: 'sub-capability', required: true },
24
23
  { id: 'sub.fix.urgent_mode', commandId: 'fix', level: 'sub-capability', required: true },
25
24
  { id: 'sub.snap.posthoc', commandId: 'snap', level: 'sub-capability', required: true },
26
- { id: 'failure.scan.not_implemented_guard', commandId: 'scan', level: 'failure-path', required: true },
27
25
  { id: 'failure.explore.proposal_exists_redirect', commandId: 'explore', level: 'failure-path', required: true },
28
26
  { id: 'failure.propose.explore_draft_gate', commandId: 'propose', level: 'failure-path', required: true },
29
27
  { id: 'failure.apply.phase_gate', commandId: 'apply', level: 'failure-path', required: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gordon.gan/specflow",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "SpecFlow — unified spec-driven development: OpenSpec planning + Superpowers execution in one CLI and cross-IDE workflow",
6
6
  "keywords": [
@@ -60,9 +60,6 @@
60
60
  "js-yaml": "^4.1.0",
61
61
  "zod": "^3.24.4"
62
62
  },
63
- "optionalDependencies": {
64
- "code-review-graph": "github:tirth8205/code-review-graph"
65
- },
66
63
  "devDependencies": {
67
64
  "@types/js-yaml": "^4.0.9",
68
65
  "@types/node": "^22.15.3",
@@ -216,7 +216,7 @@ my-project/
216
216
 
217
217
  ### D7: Scan via code-review-graph
218
218
 
219
- **Choice**: `/specflow:scan` uses code-review-graph (npm dependency) to analyze codebase structure, then converts the analysis output into OpenSpec specs format.
219
+ **Choice (deferred):** A future `/specflow:scan` may use code-review-graph to analyze codebase structure and convert output into OpenSpec specs format. Scan is **not shipped** in public releases; brownfield onboarding uses `/specflow:explore` or `/specflow:propose` instead.
220
220
 
221
221
  **Why**: Code analysis is a hard problem. Rather than building a custom AST parser for every language, leverage an existing tool that generates structured project knowledge. SpecFlow's value-add is converting that knowledge into actionable specs.
222
222
 
@@ -1,13 +1,8 @@
1
1
  name: specflow
2
2
  version: 3
3
- description: SpecFlow workflow — scan → explore → propose → refine → apply → review → test → verify → archive
3
+ description: SpecFlow workflow — explore → propose → refine → apply → review → test → verify → archive
4
4
 
5
5
  artifacts:
6
- - id: scan
7
- generates: "specflow/specs/**/*.md"
8
- description: Brownfield project scan - generates specs baseline
9
- requires: []
10
-
11
6
  - id: explore
12
7
  generates: "explore.md"
13
8
  description: Pre-plan exploration - problem space, options, and recommended direction
@@ -1,48 +0,0 @@
1
- ---
2
- name: specflow-scan
3
- description: "[PLANNED v0.3] Brownfield project scanner -- not yet functional"
4
- ---
5
-
6
- # SpecFlow: Scan (Planned — v0.3)
7
-
8
- > **NOT YET FUNCTIONAL.** The `specflow scan` CLI subcommand does not exist in v0.2.x. Invoking this skill would immediately fail when it tries to run `specflow scan`. The skill is kept registered so its slot is reserved in the command namespace; the implementation is planned for v0.3.
9
-
10
- ## Behavior in v0.2.x
11
-
12
- If the user triggers `/specflow:scan` or `$specflow-scan`, do NOT attempt to run `specflow scan` (the CLI will return an unknown-command error). Instead respond:
13
-
14
- > "`/specflow:scan` / `$specflow-scan` is planned for v0.3 and not yet implemented in v0.2.x. For a brownfield project that has no `specflow/specs/` baseline yet, the workable alternative today is:
15
- >
16
- > 1. Run `specflow init --ide both` (or `--ide all` / `--ide codex`) if not already done (creates `specflow/` and IDE assets under `.cursor/`, `.claude/`, and/or `.agents/`).
17
- > 2. Identify one capability area you are about to change (e.g. `user-auth`, `billing`).
18
- > 3. Run `/specflow:explore` when requirements are fuzzy, then `/specflow:propose`. Or run `/specflow:propose` directly if you already know exactly what to build. In the proposal Q&A, describe the existing behavior in the affected area — propose will generate both the delta spec for your change and an implicit first pass at the capability's contract. After the first archive, the delta becomes the main spec baseline for that capability.
19
- >
20
- > This is not a perfect substitute for a full code scan, but it keeps the spec-driven flow moving without waiting for v0.3."
21
-
22
- Then stop. Do not proceed to any Stage 1/2/3 behavior below — those describe the planned v0.3 flow.
23
-
24
- ## Planned design (v0.3) — for reference, not currently executable
25
-
26
- ### Planned Stage 1: Execute Scan
27
-
28
- Run `specflow scan` against the target project. If `--module` flag is provided, read the IDE-local prompt file:
29
-
30
- - Cursor: `.cursor/specflow/prompts/shared/dispatching-parallel-agents.md`
31
- - Claude: `.claude/specflow/prompts/shared/dispatching-parallel-agents.md`
32
- - Codex: `.agents/specflow/prompts/shared/dispatching-parallel-agents.md`
33
-
34
- Then scan modules in parallel; otherwise run a single pass.
35
-
36
- ### Planned Stage 2: Present Results
37
-
38
- Scan produces `specflow/SCAN_REPORT.md`. Present a summary highlighting detected modules, identified specs and coverage gaps, and suggested next actions.
39
-
40
- ### Planned Gate: User Confirmation
41
-
42
- Ask the user to confirm the scan results. Do NOT proceed until explicit confirmation. Confirmed results become the Source of Truth for all downstream commands.
43
-
44
- ### Planned Stage 3: Finalize
45
-
46
- Once confirmed, the scan results are locked and the user can run `/specflow:propose` to begin requirements planning.
47
-
48
- The v0.3 design rationale, scope, and risks will be captured in a dedicated `openspec` change at v0.3 planning time.