@llman-sdd/core 0.3.0 → 0.5.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.
Files changed (107) hide show
  1. package/package.json +2 -1
  2. package/src/archive/freeze.ts +86 -18
  3. package/src/archive/frozenCard.ts +105 -0
  4. package/src/archive/sevenzip.ts +15 -13
  5. package/src/change/closeOutHarness.ts +29 -0
  6. package/src/change/collect.ts +140 -0
  7. package/src/change/frontmatter.ts +48 -6
  8. package/src/change/id.ts +2 -6
  9. package/src/change/lifecycle.ts +285 -86
  10. package/src/change/nextId.ts +63 -2
  11. package/src/change/resolve.ts +2 -2
  12. package/src/change/tasks.ts +59 -0
  13. package/src/config/changeId.ts +14 -12
  14. package/src/config/load.ts +14 -0
  15. package/src/config/schema.ts +4 -41
  16. package/src/config/surface.ts +6 -36
  17. package/src/context/indexStore.ts +7 -3
  18. package/src/context/retrieve.ts +8 -10
  19. package/src/context/tree.ts +28 -24
  20. package/src/git/spawnGit.ts +90 -2
  21. package/src/index.ts +67 -59
  22. package/src/init/defaultConfig.ts +1 -5
  23. package/src/init/init.ts +19 -4
  24. package/src/ports.ts +1 -7
  25. package/src/project/migrateNotes.ts +104 -0
  26. package/src/render/machine.ts +30 -0
  27. package/src/report/collect.ts +11 -127
  28. package/src/report/graph/analysis.ts +152 -0
  29. package/src/report/graph/deps.ts +30 -0
  30. package/src/report/graph/graphData.ts +53 -0
  31. package/src/report/graph/nodes.ts +130 -0
  32. package/src/report/graph/render.ts +83 -0
  33. package/src/report/graph/types.ts +47 -0
  34. package/src/report/graph.ts +9 -381
  35. package/src/report/show.ts +20 -22
  36. package/src/report/specHelpers.ts +42 -21
  37. package/src/report/specs.ts +23 -25
  38. package/src/review/review.ts +45 -30
  39. package/src/spec/authoring.ts +91 -63
  40. package/src/spec/ir.ts +43 -15
  41. package/src/spec/migrateNative.ts +167 -0
  42. package/src/spec/parser.ts +73 -77
  43. package/src/spec/reqRegistry.ts +8 -9
  44. package/src/templates/embedded.ts +10 -16
  45. package/src/templates/engine.ts +10 -5
  46. package/src/templates/locale.ts +1 -1
  47. package/src/templates/skills.ts +4 -5
  48. package/src/validation/changeCheck.ts +128 -105
  49. package/src/validation/harness.ts +161 -0
  50. package/src/validation/staleness.ts +9 -5
  51. package/src/validation/validate.ts +60 -88
  52. package/templates/en/skills/llman-sdd-apply-cycle.md +20 -28
  53. package/templates/en/skills/llman-sdd-apply.md +58 -76
  54. package/templates/en/skills/llman-sdd-arch-review.md +12 -19
  55. package/templates/en/skills/llman-sdd-archive.md +27 -42
  56. package/templates/en/skills/llman-sdd-continue.md +17 -24
  57. package/templates/en/skills/llman-sdd-draft.md +17 -28
  58. package/templates/en/skills/llman-sdd-explore.md +29 -43
  59. package/templates/en/skills/llman-sdd-ff.md +12 -17
  60. package/templates/en/skills/llman-sdd-graph.md +14 -32
  61. package/templates/en/skills/llman-sdd-propose.md +48 -63
  62. package/templates/en/skills/llman-sdd-quick.md +12 -27
  63. package/templates/en/skills/llman-sdd-research.md +13 -24
  64. package/templates/en/skills/llman-sdd-specs-compact.md +14 -39
  65. package/templates/en/skills/llman-sdd-validate.md +11 -15
  66. package/templates/en/skills/llman-sdd-verify.md +23 -44
  67. package/templates/en/skills/llman-sdd-wayfinder.md +18 -22
  68. package/templates/en/units/skills/cli-footer.md +2 -0
  69. package/templates/en/units/skills/git-native-flow-brief.md +7 -6
  70. package/templates/en/units/skills/git-native-flow.md +21 -11
  71. package/templates/en/units/skills/human-readable-summary.md +2 -3
  72. package/templates/en/units/skills/stage-guard.md +7 -7
  73. package/templates/en/units/skills/structured-protocol.md +5 -8
  74. package/templates/en/units/skills/validation-hints.md +10 -14
  75. package/templates/en/units/spec/feature-contract.md +27 -16
  76. package/templates/en/units/workflow/archive-freeze-guidance.md +6 -3
  77. package/templates/zh-Hans/skills/llman-sdd-apply-cycle.md +23 -31
  78. package/templates/zh-Hans/skills/llman-sdd-apply.md +63 -81
  79. package/templates/zh-Hans/skills/llman-sdd-arch-review.md +21 -28
  80. package/templates/zh-Hans/skills/llman-sdd-archive.md +29 -44
  81. package/templates/zh-Hans/skills/llman-sdd-continue.md +17 -24
  82. package/templates/zh-Hans/skills/llman-sdd-draft.md +18 -29
  83. package/templates/zh-Hans/skills/llman-sdd-explore.md +34 -48
  84. package/templates/zh-Hans/skills/llman-sdd-ff.md +13 -18
  85. package/templates/zh-Hans/skills/llman-sdd-graph.md +16 -34
  86. package/templates/zh-Hans/skills/llman-sdd-propose.md +51 -65
  87. package/templates/zh-Hans/skills/llman-sdd-quick.md +15 -30
  88. package/templates/zh-Hans/skills/llman-sdd-research.md +17 -28
  89. package/templates/zh-Hans/skills/llman-sdd-specs-compact.md +15 -40
  90. package/templates/zh-Hans/skills/llman-sdd-validate.md +11 -15
  91. package/templates/zh-Hans/skills/llman-sdd-verify.md +26 -47
  92. package/templates/zh-Hans/skills/llman-sdd-wayfinder.md +25 -29
  93. package/templates/zh-Hans/units/skills/cli-footer.md +2 -0
  94. package/templates/zh-Hans/units/skills/git-native-flow-brief.md +7 -6
  95. package/templates/zh-Hans/units/skills/git-native-flow.md +22 -12
  96. package/templates/zh-Hans/units/skills/human-readable-summary.md +4 -5
  97. package/templates/zh-Hans/units/skills/stage-guard.md +9 -9
  98. package/templates/zh-Hans/units/skills/structured-protocol.md +5 -8
  99. package/templates/zh-Hans/units/skills/validation-hints.md +10 -14
  100. package/templates/zh-Hans/units/spec/feature-contract.md +25 -16
  101. package/templates/zh-Hans/units/workflow/archive-freeze-guidance.md +6 -2
  102. package/templates/en/skills/llman-sdd-onboard.md +0 -34
  103. package/templates/en/skills/llman-sdd-show.md +0 -24
  104. package/templates/en/units/migrate-prompt.md +0 -28
  105. package/templates/zh-Hans/skills/llman-sdd-onboard.md +0 -34
  106. package/templates/zh-Hans/skills/llman-sdd-show.md +0 -24
  107. package/templates/zh-Hans/units/migrate-prompt.md +0 -28
@@ -1,120 +1,105 @@
1
1
  ---
2
2
  name: "llman-sdd-propose"
3
- description: "Create an llman SDD change proposal with planning artifacts (proposal/tasks; `change start`/`attach` first, then edit live specs/features on the bound branch). Use for MUST/SHALL behavioral contract changes."
3
+ description: "Create a proposal for MUST/SHALL behavioral contract changes (proposal/tasks → bind branch → land specs). Small changes → quick; ideas → draft."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Propose
9
9
 
10
- Create a new change with planning artifacts (proposal + tasks; design optional), **first** `change start` (or `attach`) for Branch binding, **then** edit live `llmanspec/specs/<capability>.feature` (flat, or directory main file) on the bound branch (Specs landing), validate, and suggest next actions.
10
+ Create a new change with planning docs (proposal + tasks; design optional): **first** `change start` (or `attach`) to bind the branch, **then** edit `llmanspec/specs/<capability>.feature` (flat, or directory main file) on the bound branch to land specs, validate, and suggest next steps.
11
11
 
12
12
  ## Pipeline Position
13
13
 
14
14
  {{ unit("skills/git-native-flow") }}
15
15
  {{ unit("skills/human-readable-summary") }}
16
16
 
17
- ### Skill navigation (not the lifecycle; shows current skill only)
18
-
19
17
  ```mermaid
20
18
  flowchart LR
21
- explore["llman-sdd-explore<br/>Explore"] --> propose
22
- propose["★ llman-sdd-propose ★<br/>Propose (Branch binding + Specs landing)"]
23
- propose --> apply["llman-sdd-apply<br/>Implement"]
24
- apply --> verify["llman-sdd-verify<br/>Verify"]
25
- verify --> archive["llman-sdd-archive<br/>Archive"]
19
+ explore["llman-sdd-explore"] --> propose["★ llman-sdd-propose"]
20
+ propose --> apply["llman-sdd-apply"]
21
+ apply --> verify["llman-sdd-verify"]
22
+ verify --> archive["llman-sdd-archive"]
26
23
 
27
24
  style propose fill:#fff3cd,stroke:#ffc107,stroke-width:3px
28
25
  ```
29
26
 
30
- > 📍 You are in propose: the Git-native path above is **planning shell (draft → designed → planned) → Branch binding → Specs landing** (until `readyToImplement=true`) → next: `llman-sdd-apply`
31
- > 📎 For small changes (no behavioral contract changes), use `llman-sdd-quick` (quick path)
27
+ > 📍 You are in propose: planning docs (draft → designed → planned) → bind branch → land specs (through the specs-landed gate) → next `llman-sdd-apply`. Small changes go via `llman-sdd-quick`.
32
28
 
33
29
  ## Hard Constraints
34
30
 
35
- - **Non-blocking change id**: if the user supplied an id, use it; otherwise derive a valid kebab-case id from the task description (verb prefix, passes the CLI id check, follows the naming convention declared in `llmanspec/AGENTS.md`), announce the chosen id and how to override, and continue — MUST NOT wait for confirmation (ids are cheap to change before Branch binding). Only route to `llman-sdd-draft` when the user wants to capture an idea (draft, no id).
36
- - **Live specs are SSOT**: edit `llmanspec/specs/**` only **after** Branch binding, on the **bound non-default branch** (Specs landing). **Do not** edit live specs on the default branch; **do not** author under `changes/<id>/specs/` or use `change delta` (removed). The planning shell may briefly live on the default branch.
31
+ - **Non-blocking change id**: if the user supplied an id, use it; otherwise derive a valid kebab-case id from the task description (verb prefix, passes the CLI id check, follows the naming convention in `llmanspec/AGENTS.md`), announce the chosen id and how to override, and continue — MUST NOT wait for confirmation (ids are cheap to change before binding). Route to `llman-sdd-draft` only when the user wants to capture an idea (no id).
32
+ - **Specs are the single source of truth**: edit `llmanspec/specs/**` only **after** binding, on the **bound non-default branch**. **Do not** edit specs on the default branch. Planning docs may briefly live on the default branch.
37
33
  - **Don't ask "should I continue?"**: execute the full propose phase in one pass, generate artifacts and validate.
38
34
  {% if extra_skill_continue %}
39
- - **If change already exists**: STOP. If `readyToImplement=true`, suggest `llman-sdd-apply`; otherwise use `llman-sdd-continue` to finish Branch binding / Specs landing, or fill the planning shell.
35
+ - **If the change already exists**: STOP. If the specs-landed gate is green, suggest `llman-sdd-apply`; otherwise use `llman-sdd-continue` to finish binding / landing specs or the planning docs.
40
36
  {% else %}
41
- - **If change already exists**: STOP. If `readyToImplement=true`, suggest `llman-sdd-apply`; otherwise finish the planning shell / Branch binding / Specs landing (edit `llmanspec/changes/<id>/`, or enable `extra_skills: [llman-sdd-continue]`).
37
+ - **If the change already exists**: STOP. If the specs-landed gate is green, suggest `llman-sdd-apply`; otherwise finish the planning docs / binding / landing specs (edit `llmanspec/changes/<id>/`, or enable `extra_skills: [llman-sdd-continue]`).
42
38
  {% endif %}
43
- - **Frontmatter has a fixed schema**: when fleshing out `proposal.md`, only the allowed fields in `llmanspec/AGENTS.md` "Change Proposal Frontmatter SSOT" are accepted (including `depends_on`, `blocks`, `branch`, `base_sha`, `needs_specs_change`). `status`/`title`/`priority`/`author` etc. are rejected by `llman-sdd validate` as ERROR; lifecycle stage is inferred (query via `llman-sdd show`/`list`), never stored in frontmatter. Do not re-declare frontmatter fields in the prose body; the body H1 is a human-readable title, not a repeat of the change id.
39
+ - **Frontmatter has a fixed schema**: `proposal.md` accepts only the allowed fields in `llmanspec/AGENTS.md` "Change Proposal Frontmatter SSOT" (`depends_on`, `blocks`, `branch`, `base_sha`, `needs_specs_change`, etc.); `status`/`title`/`priority`/`author` are rejected by `llman-sdd validate` as ERROR. Lifecycle stage is inferred (query via `llman-sdd show`/`list`), never stored in frontmatter. Do not re-declare frontmatter fields in the prose body; the H1 is a human-readable title, not a repeat of the change id.
44
40
 
45
41
  ## Quick-capture routing
46
42
 
47
- If the user just wants to **capture an idea** (e.g. "draft a proposal", "note down X", "remember to do Y later") without full planning, route them to the `llman-sdd-draft` skill — it creates a `proposal.md`-only draft shell via `change new --from` (no id asked, no tasks/specs/attach). Full propose (triage + tasks → `change start`/`attach` → Specs landing) starts here.
43
+ If the user just wants to **capture an idea** ("draft a proposal", "note down X", "remember Y later") → `llman-sdd-draft`: it creates a `proposal.md`-only draft via `change new --from` (no id asked, no tasks/specs/attach). Full propose starts here.
48
44
 
49
45
  ## Steps
50
46
 
51
47
  ### 0) Preflight
52
48
  - Read `llmanspec/config.yaml` for project context, rules, locale.
53
- - `llman-sdd validate --all --strict --no-interactive`: ensure current artifacts are clean.
54
- - If pre-existing errors, stop and report (stacking new changes on dirty artifacts causes cascading errors).
55
- - **Check spec valid_scope integrity**: use `llman-sdd list --specs --json` to list all specs, then for each spec verify every path in its `valid_scope` exists on disk. If any scope file/directory is missing, stop and suggest updating the spec (remove the deleted path from `valid_scope`).
49
+ - `llman-sdd validate --all --strict` to ensure current artifacts are clean; on pre-existing errors, STOP and report (stacking a new change on dirty artifacts causes cascading errors).
50
+ - **Check spec valid_scope integrity**: `llman-sdd list --specs --json` lists all specs; for each, verify every `valid_scope` path exists on disk. On missing paths, STOP and suggest updating the spec (remove the deleted path).
56
51
 
57
- ### 1) Assess change scale (triage)
52
+ ### 1) Assess change scale
58
53
  1. Classify:
59
- - **Behavioral contract change** (modify MUST/SHALL, change external behavior) → full SDD workflow
60
- - **Implementation change** (refactor, typo, perf) → quick path via `llman-sdd-quick`
61
- - **Meta-spec change** (SDD templates/process) → full SDD workflow
54
+ - **Behavioral contract change** (modify MUST/SHALL, change external behavior) → full SDD
55
+ - **Implementation change** (refactor, typo, perf) → `llman-sdd-quick`
56
+ - **Meta-spec change** (SDD templates/process) → full SDD
62
57
  - When uncertain, choose full SDD (conservative).
63
58
  2. Use `llman-sdd context --task "<goal>" --paths "<scope>"` to find relevant specs.
64
- - If context unavailable, rebuild with `llman-sdd index rebuild` (default `pageindex`, no model needed) and continue.
65
- 3. Gather input:
66
- - A short description of the change
67
- - A change id (user-supplied if given; otherwise derive it with the non-blocking rule above and announce it)
68
- - The impacted capability/capabilities (to name `specs/<capability>`)
59
+ - Context unavailable → run `llman-sdd index check` first: stale/missing → `llman-sdd index rebuild` (default `pageindex`, no model needed) and retry; still unavailable on a fresh index (`LLMAN_SDD_INDEX_CHAT_MODEL` unset) → fall back to `llman-sdd list --specs` + reading `.feature` files directly — do not loop on rebuild.
60
+ 3. Gather input: a short change description; a change id (user-supplied, else derive per the non-blocking rule and announce); the impacted capability (to name `specs/<capability>`).
69
61
 
70
- ### 2) Ensure project is initialized
71
- - `llmanspec/` must exist; if missing, tell the user to run `llman-sdd init`, then STOP.
62
+ ### 2) Ensure the project is initialized
63
+ - `llmanspec/` must exist; if missing, tell the user to run `llman-sdd init`, then STOP.
72
64
 
73
- ### 3) Create change directory and artifacts
74
- - Prefer `llman-sdd change new <change-id>` for the draft `proposal.md` shell (or create `llmanspec/changes/<change-id>/` manually).
65
+ ### 3) Create the change directory and artifacts
66
+ - Prefer `llman-sdd change new <change-id>` for the `proposal.md` draft shell (or create `llmanspec/changes/<change-id>/` manually).
75
67
  {% if extra_skill_continue %}
76
- - If the change already exists, STOP and suggest `llman-sdd-continue`.
68
+ - If the change already exists, STOP and suggest `llman-sdd-continue`.
77
69
  {% else %}
78
- - If the change already exists, STOP and suggest filling missing artifacts or `llman-sdd-apply` (optionally enable continue via `extra_skills`).
70
+ - If the change already exists, STOP and suggest filling missing artifacts or `llman-sdd-apply` (optionally enable continue via `extra_skills`).
79
71
  {% endif %}
80
- - Flesh out `proposal.md` (Why / What Changes / Capabilities / Impact)
81
- - `design.md` only when tradeoffs/migrations matter
82
- - **Confirm seams before writing tasks.md**: list the seams to be tested and confirm with the user. A seam = the public boundary driven by `*.feature` GWT steps (CLI subprocess or public interface) — MUST reuse existing harness seams, MUST NOT invent seams detached from `.feature`. Without `.feature`, seam = the CLI subcommand or public function boundary under test.
83
- - `tasks.md`: split into **vertical slices** (each task cuts a narrow but complete path through schema→API→UI→tests, independently verifiable), with `[blocked-by: <task-id>]` dependency markers. **Wide-refactor exception** (one mechanical change sweeping the codebase, single edit breaks many call sites): sequence as expand-contract (add new beside old → migrate call sites in batches → delete old), don't force into a vertical slice.
84
- - **First** `llman-sdd change start <change-id>` (recommended; clean tree on the default branch) or manually create a branch then `change attach <change-id>` to reach Full (bound).
85
- - **Then** edit live `llmanspec/specs/<capability>.feature` (flat, or directory `llmanspec/specs/<capability>/` main file) on the bound non-default branch and commit (Specs landing). **Do not** edit live specs before start; **do not** commit live specs to the default branch just to satisfy the clean-tree gate. If already attached, do not re-run `start` (recover lost specs by checkout/recreate + `attach --force` if needed).
86
- - For changes with no live contract edits, set frontmatter `needs_specs_change: false`. Enter apply only when `llman-sdd show <id> --json` has `readyToImplement=true`.
87
- - **Breaking contract changes** (removed/renamed fields, commands, tags, or stage values) MUST plan the upgrade path: `migrations/v<from>-v<to>/` with README prompt + one-shot script (ship the upgrade dir + one-shot script in the same repo) — include it in the proposal's What Changes.
72
+ - Flesh out `proposal.md` (Why / What Changes / Capabilities / Impact); write `design.md` only when tradeoffs/migrations matter.
73
+ - **Confirm seams before writing tasks.md**: list the seams to be tested and confirm with the user. A seam = the public boundary driven by `*.feature` GWT steps (CLI subprocess or public interface) — MUST reuse existing harness seams, MUST NOT invent seams detached from `.feature`; without `.feature`, the seam is the CLI subcommand or public function boundary under test.
74
+ - `tasks.md`: split into **vertical slices** (each task cuts a narrow but complete path through schema→API→UI→tests, independently verifiable), with `[blocked-by: <task-id>]` dependency markers. **Wide-refactor exception** (one mechanical change sweeping the codebase, a single edit breaking many call sites): sequence as expand-contract (add new beside old → migrate call sites in batches → delete old); don't force vertical slices. **tasks.md lists implementation and verification tasks only**: close-out (`change finalize` / `change archive`) is a pipeline step and MUST NOT be listed as a task — its task gate requires every task checked, so a close-out task is self-contradictory (checking it lies, leaving it blocks close-out, and `validate --strict` stays red during implementation). Before/after completion criteria (counts, baselines) MUST state they are measured on the change branch (against merge-base) — a value taken on the default branch is usually trivially the baseline.
75
+ - **First** `llman-sdd change start <change-id>` (recommended; clean tree on the default branch; `--worktree` to keep the current checkout, `--base <branch>` for a non-default fork source) or manually create a branch then `change attach <change-id>`.
76
+ - **Then** edit `llmanspec/specs/<capability>.feature` (flat, or directory `llmanspec/specs/<capability>/` main file) on the bound non-default branch and commit (land specs). **Do not** edit specs before start; **do not** commit specs to the default branch just to satisfy the clean-tree gate. If already attached, do not re-run `start` (recover lost specs by checkout/recreate + `attach --force`).
77
+ - For changes with no contract edits, set frontmatter `needs_specs_change: false`. Enter apply when `llman-sdd show <id> --output json` shows `stage=full` with the specs-landed gate green; `readyToImplement=true` (all gates) is the completion signal gating verify/finalize.
78
+ - **Breaking contract changes** (removed/renamed fields, commands, tags, or stage values) MUST plan the upgrade path: write a `migrations/v<from>-v<to>/README` (upgrade guidance; a one-shot script SHALL ship with the repo when feasible) — include it in the proposal's What Changes.
88
79
 
89
80
  ### 4) Validate
90
- ```bash
91
- llman-sdd validate <change-id> --strict --no-interactive
92
- ```
93
- This MUST pass before proceeding. If TOON parse errors appear, fix quoting:
94
- values containing commas/colons/brackets must be double-quoted in tabular rows.
81
+ ```bash
82
+ llman-sdd validate <change-id> --strict
83
+ ```
84
+ This MUST pass before proceeding; failing items are listed one by one in the validate output's `items[].issues[]` — fix each and re-run.
95
85
 
96
86
  ### 4a) Optional BDD runner (`bdd:` block)
97
87
  - Read `llmanspec/config.yaml`. Is there a `bdd:` block?
98
- - **Yes**: `validate --check` runs the harness; authoring follows 4b regardless.
99
- - **No**: if this change involves executable behavior scenarios (Given/When/Then the user will want to run), ask **once, up front**: "This change looks like it has executable behavior. Enable a `bdd:` runner block so scenarios can be validated as `.feature` files? (adds a `bdd:` block to `config.yaml` — runner only, does not change the lifecycle.)"
100
- - If **yes**: show the exact `bdd:` block to add (pick a `run_command` matching the project's test framework — `cargo test --features bdd` for rstest-bdd, `pytest {feature_dir} -k {feature_name} -v` for pytest-bdd). Let the user confirm or edit it, write it to `config.yaml`, then proceed with 4b rules.
101
- - If **no**: features still validate structurally; only runner execution is skipped.
102
- - **Do NOT silently add the `bdd:` block** — always ask first. Adding it changes how `validate --check` behaves project-wide.
88
+ - **Yes**: `bdd.run_command` declares the project's BDD execution entry; validate executes it by default when its target set includes specs (`--no-check` skips). Authoring follows 4b regardless.
89
+ - **No**: if this change involves executable behavior scenarios (Given/When/Then the user will want to run), ask **once, up front** whether to enable a `bdd:` runner block (adds a `bdd:` block to `config.yaml` — runner only, does not change the lifecycle). If **yes**: show the exact `bdd:` block to add (pick a `run_command` matching the project's test framework — `cargo test --features bdd` for rstest-bdd, `pytest {feature_dir} -k {feature_name} -v` for pytest-bdd), let the user confirm or edit, write it to `config.yaml`, then proceed with 4b. If **no**: features still validate structurally; BDD execution responsibility stays with the project test suite.
90
+ - **Do NOT silently add the `bdd:` block** — always ask first. Adding it declares the project-wide BDD execution entry.
103
91
 
104
92
  ### 4b) Single-track feature authoring
105
- - Planning shell (proposal/design/tasks) may briefly live on the default branch; **do not** edit live `llmanspec/specs/**` on the default branch. After Branch binding, Specs landing and implementation happen on the bound branch.
106
- - **Single-track**: each capability is ONE `<capability>.feature`. Constraint rules are `@req:<id> @human` scenarios (statement verbatim in the description); executable acceptance scenarios carry `@executable` and link back via `@req:<req_id>`. Never nest scenarios in `Rule:` blocks (the runner skips them).
107
- - Change shell: `llman-sdd change new <change-id>` → fill proposal/design/tasks → `llman-sdd change start <change-id>` (or `change attach`) → **then** edit live specs on the bound branch and commit (Specs landing).
108
- - Do **not** use `change delta` / solidify / `*.feature.delta.toon`; if an active `*.feature.delta.toon` or a legacy `spec.toon` exists, run `llman-sdd project migrate --kind toon2features` first.
93
+ - Planning docs may briefly live on the default branch; **do not** edit `llmanspec/specs/**` on the default branch. After binding, landing specs and implementation happen on the bound branch.
94
+ - **Single-track**: each capability is ONE `<capability>.feature`. The canonical style is the native Gherkin hierarchy: `@req:<id>` on the `规则:` block header, nested `场景:` (`Given/When/Then` steps bound to runner step code and executed — **the default, preferred shape**); only when a requirement cannot be expressed programmatically (abstract goals, architecture decisions, governance/human judgment) or is not yet converted, leave a `规则:` block with no nested scenario (bare rule, free-text description) and record the rationale in proposal/design. Legacy tags (@executable/@rule/@human/@manual) are gone.
95
+ - **Description readability**: split long `规则:` descriptions across multiple lines for reviewability (the official parser preserves lines); description lines must not carry a `- ` list marker (it becomes part of the description) and must not begin with a step keyword (`假如/当/那么/而且` / `Given/When/Then/And/But` — Gherkin would parse it as a step).
96
+ - **Structured adds preferred**: to append rules/scenarios to an existing capability, prefer `llman-sdd spec next-req-id` (global rN allocation) + `spec add-req` (appends a `规则:` block) + `spec add-scenario` (inserts a nested `场景:` under the rule). New capability → `spec skeleton <capability>`; id lookup → `spec resolve-req <rN>`. Legacy tag-based files: run `spec migrate-native` first. Hand-editing the `.feature` stays the escape hatch (best for editing existing clauses).
97
+ - **Executable-scenario-first triage** (decide before writing any new clause): any behavior expressible as GWT (Given/When/Then) and bound to step code MUST land as a nested `场景:` — prose-only rules guard nothing. Examples: programmatically decidable behavior (e.g. "when validate runs then stdout is TOON and exit code is 0") → nested `场景:`; abstract goals/architecture decisions not decidable by program → a bare `规则:` block (no nested scenario; aggregate count nudges it; specs-compact reduces it), recording the rationale in proposal/design.
109
98
 
110
99
  ### 5) Summarize and suggest next step
111
- - Enter implementation phase: `llman-sdd-apply`.
112
- - If you need to think more: `llman-sdd-explore`.
113
-
114
- > 💡 Proposal done → next: `llman-sdd-apply` (implement)
100
+ - Enter implementation: `llman-sdd-apply`. Need more thinking: `llman-sdd-explore`.
115
101
 
116
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
117
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
102
+ {{ unit("skills/cli-footer") }}
118
103
  {{ unit("skills/validation-hints") }}
119
104
 
120
105
  {{ unit("skills/structured-protocol") }}
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "llman-sdd-quick"
3
- description: "Handle small code changes that do NOT modify behavioral contracts — no MUST/SHALL changes, no spec modifications. Use for refactors, typo fixes, or perf tweaks. Switch to propose for anything affecting externally observable behavior."
3
+ description: "Quick path for small changes that don't touch behavioral contracts (refactor/typo/perf). If a MUST/SHALL change emerges, stop and switch to propose."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
@@ -13,44 +13,29 @@ Use this path for small changes that don't modify behavioral contracts.
13
13
 
14
14
  ```mermaid
15
15
  flowchart LR
16
- explore["llman-sdd-explore<br/>Explore"] --> quick
17
-
18
- quick["★ llman-sdd-quick ★<br/>Quick path (you are here)"]
19
- quick --> commit["git commit<br/>Done"]
20
-
21
- explore --> propose["Full path:<br/>propose (Branch binding + Specs landing) → apply → verify → archive"]
22
- propose --> apply["..."]
23
- apply --> verify["..."]
24
- verify --> archive["..."]
16
+ quick["★ llman-sdd-quick"] --> commit["git commit"]
17
+ explore["llman-sdd-explore"] --> propose["Full path: propose → apply → verify → archive"]
25
18
 
26
19
  style quick fill:#d4edda,stroke:#28a745,stroke-width:3px
27
20
  ```
28
21
 
29
- > 📍 Quick path: no behavioral contract changes, modify code and commit directly. If you find you need to change a contract → STOP, switch to full path `llman-sdd-propose`
30
- > 🗺️ Full path includes Git-native Branch binding + Specs landing (Specs landing is not a separate skill)
22
+ > 📍 Quick path: edit code and commit directly. If you find a contract change is needed → STOP, switch to `llman-sdd-propose`.
31
23
 
32
24
  ## Conditions (all must hold)
33
25
  - Does not change any MUST/SHALL-defined externally observable behavior
34
- - Does not cross capability boundaries
35
- - Does not involve migration or compatibility concerns
36
- - Is not a meta-spec change (SDD templates/process)
26
+ - Does not cross capability boundaries; no migration/compatibility concerns; not an SDD meta-spec change
37
27
 
38
28
  ## Steps
39
- 1. Use `llman-sdd context --task "..." --paths "..."` to confirm no spec changes needed.
40
- - If context returns `quality: "unavailable"`, rebuild with `llman-sdd index rebuild` (default `pageindex`, no model needed).
41
- - Use `llman-sdd list --specs --json` for keyword-level spec metadata.
29
+ 1. Use `llman-sdd context --task "..." --paths "..."` to confirm no spec changes are needed.
30
+ - If context returns `quality: "unavailable"` → run `llman-sdd index check` first: stale/missing → `llman-sdd index rebuild` (default `pageindex`, no model needed) and retry; still unavailable on a fresh index (`LLMAN_SDD_INDEX_CHAT_MODEL` unset) → fall back to `llman-sdd list --specs` + reading `.feature` files directly — do not loop on rebuild.
42
31
  2. Modify the code directly.
43
- 3. If you need to touch `llmanspec/specs/**`, STOP unless you are on a bound non-default change branch (mini change: `change start`/`attach` → edit → commit). Never commit live specs on the default branch — not even for typo or scope-only fixes. Prefer routing live-spec maintenance to `llman-sdd-propose`, or require an existing bound branch.
44
- 4. git commit (message must explain why).
45
- 5. No change directory, no archive needed.
32
+ 3. If you need to touch `llmanspec/specs/**`, STOP — unless you are on a bound non-default change branch (mini change: `change start`/`attach` → edit → commit). Never commit specs on the default branch, not even for typo or scope-only fixes. Prefer routing specs maintenance to `llman-sdd-propose`.
33
+ 4. git commit (message explains why). No change directory, no archive.
46
34
 
47
35
  ## Boundary handling
48
- - If during modification you find a behavioral contract change → STOP, switch to `llman-sdd-propose` (full path).
49
- - If multiple files are involved and scope is unclear → verify with `llman-sdd context` first.
50
-
51
- > 💡 Quick path done → git commit. If you need the full path → `llman-sdd-propose` → `llman-sdd-apply` → `llman-sdd-verify` → `llman-sdd-archive`
36
+ - A behavioral contract change emerges mid-edit → STOP, switch to `llman-sdd-propose`.
37
+ - Multiple files involved and scope unclear → confirm with `llman-sdd context` first.
52
38
 
53
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
54
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
39
+ {{ unit("skills/cli-footer") }}
55
40
 
56
41
  {{ unit("skills/ethics-governance") }}
@@ -1,46 +1,35 @@
1
1
  ---
2
2
  name: "llman-sdd-research"
3
- description: "Delegate external research to a background agent. Use when the user needs official docs/API/source facts gathered, or wants the reading legwork delegated so they can keep working."
3
+ description: "Delegate fact-finding to a background agent: primary sources only (official docs/API/source), cited findings."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Research
9
9
 
10
- Spin up a **background agent** to do the research, so you keep working while it reads.
10
+ Spin up a **background agent** to do the research while you keep working. Auxiliary tool, usable at any stage (common in explore/wayfinder); output is written back to the change's proposal "Further Notes" section.
11
11
 
12
- ## Pipeline position
12
+ ## The background agent's job
13
13
 
14
- Auxiliary tool, usable at any stage. Common in explore/wayfinder to provide factual input for decisions. Output is written back to the change's proposal "Further Notes" section for later stages to consume.
15
-
16
- > 📍 Standalone optional skill; research output feeds the main flow's explore/propose.
17
-
18
- ## Responsibilities
19
-
20
- The background agent's job:
21
-
22
- 1. Investigate the question against **primary sources** — official docs, source code, specs, first-party APIs — not secondary write-ups. Follow every claim back to the source that owns it.
14
+ 1. Investigate against **primary sources** — official docs, source code, specs, first-party APIs, not secondary write-ups; trace every claim back to the source that owns it.
23
15
  2. Write findings to a single Markdown file, citing each claim's source.
24
- 3. Save location (follow the repo's own convention if it has one): **default** to `llmanspec/changes/<current-change>/research/<topic>.md` (change docs, **not** live specs). Write to `docs/research/` only when the topic spans multiple changes and will still be referenced after archiving; **never** put single-change decisions or decaying deep-dives into `docs/research/`.
25
- 4. **MUST NOT** edit `llmanspec/specs/**` in this skill. If research shows MUST/SHALL must change → suggest `llman-sdd-propose` (Branch binding → Specs landing).
16
+ 3. Save location (repo convention wins if it has one): **default** `llmanspec/changes/<current-change>/research/<topic>.md` (change docs, **not** specs). Write to `docs/research/` only when the topic spans multiple changes and will still be referenced after archiving; **never** put single-change decisions or decaying deep-dives into `docs/research/`.
17
+ 4. **MUST NOT** edit `llmanspec/specs/**` in this skill. If research shows MUST/SHALL must change → suggest `llman-sdd-propose` (bind branch → land specs).
26
18
 
27
19
  ## Steps
28
20
 
29
- 1. Clarify the research question (confirm with the user; if fuzzy, sharpen to a falsifiable one).
30
- 2. Use the Agent tool `subagent_type=general-purpose` + `run_in_background: true` to launch the background research, with a prompt containing:
31
- - The question statement.
32
- - A requirement to cite only primary sources, with source URL/path per claim.
33
- - The output file path (default `llmanspec/changes/<id>/research/<topic>.md`).
21
+ 1. Clarify the research question (confirm with the user; sharpen a fuzzy one into a falsifiable one).
22
+ 2. Launch via the Agent tool with `subagent_type=general-purpose` + `run_in_background: true`, prompt containing:
23
+ - The question statement; a requirement to cite only primary sources, with source URL/path per claim;
24
+ - The output file path (default `llmanspec/changes/<id>/research/<topic>.md`);
34
25
  - A word limit (suggested: focus on facts, prose narrative < 1500 words).
35
- 3. Continue main-flow work while it runs in the background; receive a notification when done.
36
- 4. Read the output, summarize key conclusions back into the current change's `proposal.md` "Further Notes" section (with a file pointer).
37
- 5. If the research reveals a decision is needed, suggest entering `llman-sdd-explore`'s grilling branch.
26
+ 3. Continue main-flow work while it runs; when done, read the output and summarize key conclusions into the current change's `proposal.md` "Further Notes" section (with a file pointer).
27
+ 4. If the research reveals a decision is needed, suggest entering `llman-sdd-explore`'s deep-dive Q&A branch.
38
28
 
39
29
  ## Cooperation with wayfinder
40
30
 
41
31
  `llman-sdd-wayfinder`'s research tickets delegate to this skill for background resolution; on completion, write back to the ticket proposal and record a one-line gist in the map's Decisions-so-far.
42
32
 
43
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
44
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
33
+ {{ unit("skills/cli-footer") }}
45
34
 
46
35
  {{ unit("skills/structured-protocol") }}
@@ -1,65 +1,40 @@
1
1
  ---
2
2
  name: "llman-sdd-specs-compact"
3
- description: "Human-triggered maintenance tool. Compacts and deduplicates llman SDD specs after many archived changes — merges redundant requirements and scenarios while preserving all normative behavior. NOT part of the regular pipeline: only run when the user explicitly asks to compact specs."
3
+ description: "Compact and dedupe specs: merge redundant requirements/scenarios without changing normative behavior. Manual run only, when the user explicitly asks."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Specs Compact
9
9
 
10
- Use this skill to compact specs without changing normative behavior.
11
-
12
- ## Pipeline Position
13
-
14
- ```mermaid
15
- flowchart LR
16
- archive["llman-sdd-archive<br/>After archiving"] --> compact
17
- compact["📎 llman-sdd-specs-compact<br/>Compact specs (maintenance)"]
18
-
19
- style compact fill:#e8f4e8,stroke:#28a745,stroke-width:2px
20
- ```
21
-
22
- > 📎 Maintenance tool, typically run after accumulating many archives. For daily development → `llman-sdd-propose` (Branch binding + Specs landing) / `llman-sdd-apply` (requires `readyToImplement`).
10
+ Compact specs without changing normative behavior. Maintenance tool, not part of the daily pipeline; typically run after many archived changes.
23
11
 
24
12
  ## Context
25
- - Specs grow bloated with duplicate requirements/scenarios as changes accumulate.
26
- - Compaction must remain verifiable and regressible.
27
- - When archive history is too large, it interferes with compaction review and navigation.
13
+ - Specs bloat with duplicate requirements/scenarios as changes accumulate; compaction must stay verifiable and regressible.
14
+ - An oversized archive history interferes with compaction review and navigation.
28
15
 
29
16
  ## Goal
30
- - Identify and merge redundant requirements/scenarios.
31
- - Form a more compact and maintainable spec structure.
17
+ - Merge redundant requirements/scenarios into a more compact, maintainable spec structure.
32
18
 
33
19
  ## Constraints
34
- - Don't delete normative behavior without explicit replacement.
35
- - Try to keep requirement titles stable.
36
- - Each retained requirement must have at least one valid scenario.
37
- - **Editing live `llmanspec/specs/**` requires a change**: Branch binding first (`change start` / `attach`), then commit on the bound branch (Specs landing style); **never** compact-rewrite live specs on the default branch.
20
+ - Don't delete normative behavior without explicit replacement; keep requirement titles stable where possible; every retained requirement keeps at least one valid scenario.
21
+ - **Editing `llmanspec/specs/**` requires a change**: bind the branch first (`change start` / `attach`), then edit and commit on the bound branch; **never** compact-rewrite specs on the default branch.
38
22
 
39
23
  ## Workflow
40
- 1. Inventory current specs (`llman-sdd list --specs`).
41
- 2. If archived history is large, run archive freeze first:
42
- - Preview: `llman-sdd archive freeze --dry-run`
43
- - Execute: `llman-sdd archive freeze --before <YYYY-MM-DD> --keep-recent <N>`
44
- 3. Identify overlapping items across capabilities.
24
+ 1. Inventory specs (`llman-sdd list --specs`).
25
+ 2. If archived history is large, freeze first: preview `llman-sdd archive freeze --dry-run`; execute `llman-sdd archive freeze --before <YYYY-MM-DD> --keep-recent <N>`.
26
+ 3. Identify cross-capability overlap (duplicate req ids across specs: `llman-sdd project dedupe-req-ids --dry-run` reports the remap plan).
45
27
  4. Produce a compaction plan (canonical requirements + keep/merge/remove decisions + migration notes).
46
- 5. Execute and validate (`llman-sdd validate --specs --strict --no-interactive`).
28
+ 5. Execute and validate (`llman-sdd validate --specs --strict`).
47
29
 
48
30
  ## Decision Policy
49
- - Prefer merging when two requirements are semantically equivalent.
50
- - Only extract shared spec text when reference relationships are clear.
51
- - When archive directory is noisy, suggest freezing first before compacting.
31
+ - Prefer merging semantically equivalent requirements; extract shared text only when references are clear; freeze first when the archive is noisy.
52
32
  - If compaction would change external behavior, pause and ask the user first.
53
33
 
54
34
  ## Output Contract
55
- - Output compaction plan grouped by capability.
56
- - Include: keep/merge/remove decisions with rationale.
57
- - Include validation commands and expected results.
58
-
59
- > 💡 After maintenance, new work goes through the normal pipeline: `llman-sdd-propose` (Branch binding + Specs landing) → `llman-sdd-apply` (requires `readyToImplement`) → `llman-sdd-verify` → `llman-sdd-archive`.
35
+ - Compaction plan grouped by capability: keep/merge/remove decisions with rationale + validation commands and expected results.
60
36
 
61
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
62
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
37
+ {{ unit("skills/cli-footer") }}
63
38
 
64
39
  {{ unit("skills/validation-hints") }}
65
40
 
@@ -1,31 +1,27 @@
1
1
  ---
2
2
  name: "llman-sdd-validate"
3
- description: "Validate llmanspec changes and specs with actionable fixes."
3
+ description: "Validate changes and specs; suggest actionable fixes."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Validate
9
9
 
10
- Use this skill to validate change/spec format and staleness.
10
+ Validate change/spec format and staleness.
11
11
 
12
12
  ## Steps
13
- 1. Validate one item: `llman-sdd validate <id>`.
14
- 2. Validate all: `llman-sdd validate --all` (or `--changes` / `--specs`).
15
- 3. Use `--strict` and `--no-interactive` for CI-like checks.
16
- 4. If validation fails, summarize the errors and propose minimal, concrete fixes.
13
+ 1. Single item: `llman-sdd validate <id>`; batch: `llman-sdd validate --all` (or `--changes` / `--specs`); use `--strict` in CI/automation.
14
+ 2. On failure, summarize the errors and propose minimal, concrete fixes.
17
15
  {% if bdd_enabled %}
18
- 5. **BDD checks (Git-native Partitioned SSOT)**:
19
- - Validate live `.feature` Gherkin and `@req` / dual-write gates on the **bound branch** (Branch binding required).
20
- - `.feature` is the harness authority — executable GWT lives only in live `.feature` (no solidify; no `feature_delta` / `change delta`).
21
- - Change lifecycle gates: `change start` / `attach` (Branch binding), `finalize` (close-out; auto commit `archive(sdd): <id>`, `--no-commit` to skip) / `diff` (read-only). `change checkpoint` is removed (no mid-flight archive point; `change finalize` does not require a clean tree).
22
- - `llman-sdd validate --specs` runs `bdd.run_command` by default.
23
- - Use `list --specs --json` for `morphology` (includes `dualWriteCount`).
24
- - Change JSON status fields: `stage` (draft/designed/planned/full) / `specsLanded` / `needsSpecsChange` / `readyToImplement` (`show --json`).
16
+ 3. **BDD checks**:
17
+ - Validate `.feature` Gherkin and `@req` / dual-write gates on the **bound branch**; `.feature` is the harness authority — executable GWT lives only there.
18
+ - Lifecycle gates: `change start` / `attach` (bind branch), `finalize` (close-out; auto commit `archive(sdd): <id>`, `--no-commit` to skip) / `diff` (read-only).
19
+ - `llman-sdd validate --specs` enforces structural and contract gates; when `bdd.run_command` is configured it also executes that harness by default (`--no-check` skips it, `--check` is a compat alias); a placeholder-free command runs at most once per invocation.
20
+ - `list --specs --json` shows `morphology` (ruleCount / ruleEnforcedCount / rulePendingCount / acceptanceCount / featureScenarioCount).
21
+ - Change JSON status fields: `stage` (draft/designed/planned/full) / `specsLanded` / `needsSpecsChange` / `readyToImplement` (`show --output json`).
25
22
  {% endif %}
26
23
 
27
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
28
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
24
+ {{ unit("skills/cli-footer") }}
29
25
 
30
26
  {{ unit("skills/validation-hints") }}
31
27
 
@@ -1,56 +1,44 @@
1
1
  ---
2
2
  name: "llman-sdd-verify"
3
- description: "Verify that an implemented llman SDD change matches its specs, design, and tasks. Produces a report (CRITICAL / WARNING / SUGGESTION) comparing code to artifacts. Run after apply completes. If clean, the change is ready to archive."
3
+ description: "Verify an implemented change against its specs/design/tasks; report CRITICAL/WARNING/SUGGESTION. Run after apply; if clean, ready to archive."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Verify
9
9
 
10
- Use this skill to verify that the implementation matches the change's artifacts.
10
+ Verify that the implementation matches the change's artifacts.
11
11
 
12
12
  ## Pipeline Position
13
13
 
14
- ### Skill navigation (not the lifecycle; shows current skill only)
15
-
16
14
  ```mermaid
17
15
  flowchart LR
18
- apply["llman-sdd-apply<br/>Implement"] --> verify
19
- verify["★ llman-sdd-verify ★<br/>Verify (you are here)"]
20
- verify --> archive["llman-sdd-archive<br/>Archive"]
16
+ apply["llman-sdd-apply"] --> verify["★ llman-sdd-verify"]
17
+ verify --> archive["llman-sdd-archive"]
21
18
 
22
19
  style verify fill:#fff3cd,stroke:#ffc107,stroke-width:3px
23
20
  ```
24
21
 
25
- > 📍 You are in the verify phase → if pass: next `llman-sdd-archive` (archive); if fail: go back to `llman-sdd-apply` (fix). This is Git-native **I (verify)**; the change should already be Specs-landed (`readyToImplement=true`).
26
- > 🗺️ Skill navigation ≠ Git-native lifecycle; see brief lifecycle unit at the bottom.
22
+ > 📍 You are in verify → pass leads to `llman-sdd-archive`, failure goes back to `llman-sdd-apply`. The change should already have landed specs with `readyToImplement=true` (all gates green — the completion signal).
27
23
 
28
24
  ## Hard Constraints
29
25
 
30
- - **Must pass apply phase all-green first**: don't skip to verify on changes that haven't been implemented.
31
- - **CRITICAL issues must be fixed**: CRITICAL problems must be resolved before archive.
32
- - **Don't ask "should I continue?"**: run the full verification flow, output a complete report.
26
+ - **Apply must be all-green first**: don't verify unimplemented changes.
27
+ - **CRITICAL must be fixed**: zero CRITICAL before archive.
28
+ - **Rerun the gates yourself**: MUST rerun `llman-sdd validate <id> --strict` (real harness) and the project gates; MUST NOT trust gate verdicts in the implementer's report — a mismatch is CRITICAL.
29
+ - **`--no-check` is not evidence**: gate evidence obtained with `--no-check` → CRITICAL. Close-out runs the configured `bdd.run_command`, so do not run that command again just before close-out; the skip line printed by `--no-check` is not a pass.
30
+ - **Don't ask "should I continue?"**: run the full verification flow and output a complete report.
33
31
 
34
32
  {{ unit("skills/stage-guard") }}
35
33
 
36
34
  ## Steps
37
35
  1. Select the change id (or ask the user to pick from `llman-sdd list --json`).
38
- 2. Run a fast validation gate:
39
- - `llman-sdd validate <id> --strict --no-interactive`
40
- - **When diagnosing structural issues (Gherkin parse / `@req` linkage / dual-write / global req_id uniqueness), prefer adding `--no-check`** (skips the potentially slow `bdd.run_command` under BDD-on); run the full `--check` (full mode) only after structural gates are green. Each `FAIL <item_type>/<id>` line lists a failing item (above the Totals line).
41
- 3. Read:
42
- - Live specs on the feature branch: `llmanspec/specs/**` (`<capability>.feature`) — SSOT
43
- - `proposal.md` and `design.md` if present
44
- - `tasks.md` to understand what was implemented
45
- - `llmanspec/changes/<id>/specs/` only if residual old docs exist — ignore; SSOT is live specs
46
- 4. **Dual-axis review (Standards + Spec, kept separate so neither masks the other)** — diff against `git diff <merge-base>...HEAD` (merge-base is COMPUTED via `git merge-base <local-default> HEAD`; the stored base_sha is audit-only and MUST NOT feed range math) on two axes:
47
- - **Spec axis**: does the implementation satisfy the `@human` rule MUST/SHALL and the `@executable` GWT?
48
- - Missing/partial behaviors, wrong implementations, and scope creep in the diff not asked for by the spec.
49
- - Suggest minimal fixes or artifact updates.
50
- - **Standards axis**: does the code follow `AGENTS.md` coding style + the Fowler smell baseline?
51
- - **Authority priority**: `AGENTS.md` documented standard > smell baseline (repo overrides); skip anything tooling already enforces.
52
- - Smells are **judgement heuristics** ("possible Feature Envy"), not hard violations.
53
- - Smell baseline (each "what → fix"):
36
+ 2. Fast validation gate: `llman-sdd validate <id> --strict`.
37
+ - When diagnosing structural issues (Gherkin parse / `@req` linkage / dual-write / req_id uniqueness), run the structural validation first (when `bdd.run_command` is configured, validate executes that harness by default — `--no-check` skips it; a harness failure lands as an ERROR on its spec item). Failing items are listed one by one in the default TOON output's `items[].issues[]` (`--output human` prints `FAIL <item_type>/<id>` lines above the `Totals` line).
38
+ 3. Read: `llmanspec/specs/**` (`<capability>.feature`, the single source of truth) on the branch, `proposal.md` and `design.md` (if present), `tasks.md`; ignore residual old docs under `changes/<id>/specs/`.
39
+ 4. **Dual-axis review (kept separate so neither masks the other)** — diff against `git diff <merge-base>...HEAD` (merge-base is COMPUTED via `git merge-base <local-default> HEAD`; the stored base_sha is audit-only and MUST NOT feed range math):
40
+ - **Spec axis**: does the implementation satisfy the `规则:` block requirement statement (free-text description, judged by its semantics) and the nested `场景:` GWT steps? Missing/partial behaviors, wrong implementations, and scope creep not asked for by the spec → suggest minimal fixes or artifact updates. Check where before/after evidence (counts, baselines) was taken: it MUST be measured on the change branch (against the freshly computed merge-base); a value measured on the default branch is usually trivially the baseline and proves nothing.
41
+ - **Standards axis**: does the code follow `AGENTS.md` + the smell baseline? Authority priority: `AGENTS.md` > smell baseline; skip anything tooling already enforces. Smells are **judgement heuristics** ("possible Feature Envy"), not hard violations:
54
42
 
55
43
  | Smell | Fix |
56
44
  |-------|-----|
@@ -67,29 +55,20 @@ flowchart LR
67
55
  | Middle Man (just delegates) | cut it, call direct |
68
56
  | Refused Bequest (subclass rejects most inheritance) | use composition |
69
57
  - The two axes may be reviewed in parallel (sub-agents); the report MUST present them separately, MUST NOT merge or cross-rerank (one axis passing must not mask the other failing).
70
- 5. **BDD-on verification (Git-native Partitioned SSOT)** — only when `config.yaml` has a `bdd:` block:
71
- - Confirm the change is attached and you are on that feature branch.
72
- - `llman-sdd validate --specs`: Gherkin + `@req`/dual-write gates; runs `bdd.run_command` by default (`--no-check` to skip).
73
- - Optional read-only review: `llman-sdd change diff <id>` (or `--export-patch <path>`). Diff is review/export only — never treat it as an apply step.
74
- - Check: legacy `spec.toon` / `*.feature.delta.toon` absent; if present, run toon2features first (do not invent a solidify / repair hunt).
58
+ 5. **BDD verification** — only when `config.yaml` has a `bdd:` block:
59
+ - Confirm the change is branch-bound and you are on that branch.
60
+ - `llman-sdd validate --specs`: Gherkin + `@req`/dual-write gates; when `bdd.run_command` is configured the harness runs by default (`--no-check` skips it) and a failure maps to an ERROR on the matching spec item.
61
+ - Optional read-only review: `llman-sdd change diff <id>` (or `--export-patch <path>`) — review/export only, never an apply step.
75
62
  - Next step after verify passes: `llman-sdd-archive` (not inline finalize here).
76
63
  {% if bdd_verify_prompt %}
77
64
  - Extra requirement: {{ bdd_verify_prompt }}
78
65
  {% endif %}
79
- 6. Produce a short report:
80
- - **CRITICAL** (must fix before archive)
81
- - **WARNING** (should fix)
82
- - **SUGGESTION** (nice to have)
83
- 7. **Human review checkpoint**: once the report has no CRITICAL findings and before suggesting archive, run `llman-sdd review`:
84
- - Exit code zero → suggest `llman-sdd-archive` for finalize/archive.
85
- - Non-zero exit = CRITICAL findings: fix via `llman-sdd-apply`, then re-run review; MUST NOT enter finalize/archive with CRITICAL findings open.
86
-
87
- > 💡 Verify pass → next: `llman-sdd-archive` (archive); CRITICAL issues → go back to `llman-sdd-apply` (fix)
66
+ 6. Produce a short report: **CRITICAL** (must fix before archive) / **WARNING** (should fix) / **SUGGESTION** (nice to have).
67
+ 7. **Human review gate**: once the report has no CRITICAL findings and before suggesting archive, run `llman-sdd review`: exit code zero → suggest `llman-sdd-archive`; non-zero = CRITICAL → fix via `llman-sdd-apply`, then re-run review; MUST NOT enter finalize/archive with CRITICAL findings open.
88
68
 
89
69
  {{ unit("skills/git-native-flow-brief") }}
90
70
  {{ unit("skills/human-readable-summary") }}
91
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
92
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
71
+ {{ unit("skills/cli-footer") }}
93
72
 
94
73
  {{ unit("skills/validation-hints") }}
95
74