@llman-sdd/core 0.3.1 → 0.5.1

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 (108) 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 +81 -54
  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 +45 -22
  37. package/src/report/specs.ts +23 -25
  38. package/src/review/review.ts +45 -30
  39. package/src/spec/authoring.ts +147 -71
  40. package/src/spec/ir.ts +43 -15
  41. package/src/spec/keywords.ts +147 -0
  42. package/src/spec/migrateNative.ts +201 -0
  43. package/src/spec/parser.ts +95 -83
  44. package/src/spec/reqRegistry.ts +31 -15
  45. package/src/templates/embedded.ts +10 -16
  46. package/src/templates/engine.ts +10 -5
  47. package/src/templates/locale.ts +1 -1
  48. package/src/templates/skills.ts +4 -5
  49. package/src/validation/changeCheck.ts +128 -105
  50. package/src/validation/harness.ts +161 -0
  51. package/src/validation/staleness.ts +9 -5
  52. package/src/validation/validate.ts +60 -88
  53. package/templates/en/skills/llman-sdd-apply-cycle.md +20 -28
  54. package/templates/en/skills/llman-sdd-apply.md +58 -76
  55. package/templates/en/skills/llman-sdd-arch-review.md +12 -19
  56. package/templates/en/skills/llman-sdd-archive.md +27 -42
  57. package/templates/en/skills/llman-sdd-continue.md +17 -24
  58. package/templates/en/skills/llman-sdd-draft.md +17 -28
  59. package/templates/en/skills/llman-sdd-explore.md +29 -43
  60. package/templates/en/skills/llman-sdd-ff.md +12 -17
  61. package/templates/en/skills/llman-sdd-graph.md +14 -32
  62. package/templates/en/skills/llman-sdd-propose.md +48 -63
  63. package/templates/en/skills/llman-sdd-quick.md +12 -27
  64. package/templates/en/skills/llman-sdd-research.md +13 -24
  65. package/templates/en/skills/llman-sdd-specs-compact.md +14 -39
  66. package/templates/en/skills/llman-sdd-validate.md +11 -15
  67. package/templates/en/skills/llman-sdd-verify.md +23 -44
  68. package/templates/en/skills/llman-sdd-wayfinder.md +18 -22
  69. package/templates/en/units/skills/cli-footer.md +2 -0
  70. package/templates/en/units/skills/git-native-flow-brief.md +7 -6
  71. package/templates/en/units/skills/git-native-flow.md +21 -11
  72. package/templates/en/units/skills/human-readable-summary.md +2 -3
  73. package/templates/en/units/skills/stage-guard.md +7 -7
  74. package/templates/en/units/skills/structured-protocol.md +5 -8
  75. package/templates/en/units/skills/validation-hints.md +10 -14
  76. package/templates/en/units/spec/feature-contract.md +27 -16
  77. package/templates/en/units/workflow/archive-freeze-guidance.md +6 -3
  78. package/templates/zh-Hans/skills/llman-sdd-apply-cycle.md +23 -31
  79. package/templates/zh-Hans/skills/llman-sdd-apply.md +63 -81
  80. package/templates/zh-Hans/skills/llman-sdd-arch-review.md +21 -28
  81. package/templates/zh-Hans/skills/llman-sdd-archive.md +29 -44
  82. package/templates/zh-Hans/skills/llman-sdd-continue.md +17 -24
  83. package/templates/zh-Hans/skills/llman-sdd-draft.md +18 -29
  84. package/templates/zh-Hans/skills/llman-sdd-explore.md +34 -48
  85. package/templates/zh-Hans/skills/llman-sdd-ff.md +13 -18
  86. package/templates/zh-Hans/skills/llman-sdd-graph.md +16 -34
  87. package/templates/zh-Hans/skills/llman-sdd-propose.md +51 -65
  88. package/templates/zh-Hans/skills/llman-sdd-quick.md +15 -30
  89. package/templates/zh-Hans/skills/llman-sdd-research.md +17 -28
  90. package/templates/zh-Hans/skills/llman-sdd-specs-compact.md +15 -40
  91. package/templates/zh-Hans/skills/llman-sdd-validate.md +11 -15
  92. package/templates/zh-Hans/skills/llman-sdd-verify.md +26 -47
  93. package/templates/zh-Hans/skills/llman-sdd-wayfinder.md +25 -29
  94. package/templates/zh-Hans/units/skills/cli-footer.md +2 -0
  95. package/templates/zh-Hans/units/skills/git-native-flow-brief.md +7 -6
  96. package/templates/zh-Hans/units/skills/git-native-flow.md +22 -12
  97. package/templates/zh-Hans/units/skills/human-readable-summary.md +4 -5
  98. package/templates/zh-Hans/units/skills/stage-guard.md +9 -9
  99. package/templates/zh-Hans/units/skills/structured-protocol.md +5 -8
  100. package/templates/zh-Hans/units/skills/validation-hints.md +10 -14
  101. package/templates/zh-Hans/units/spec/feature-contract.md +25 -16
  102. package/templates/zh-Hans/units/workflow/archive-freeze-guidance.md +6 -2
  103. package/templates/en/skills/llman-sdd-onboard.md +0 -34
  104. package/templates/en/skills/llman-sdd-show.md +0 -24
  105. package/templates/en/units/migrate-prompt.md +0 -28
  106. package/templates/zh-Hans/skills/llman-sdd-onboard.md +0 -34
  107. package/templates/zh-Hans/skills/llman-sdd-show.md +0 -24
  108. package/templates/zh-Hans/units/migrate-prompt.md +0 -28
@@ -1,125 +1,107 @@
1
1
  ---
2
2
  name: "llman-sdd-apply"
3
- description: "Implement tasks from an llman SDD change in a closed loop — write code, run tests, self-heal on failures until all gates pass. Use when a change is proposed and ready to implement. Updates tasks.md checkboxes and runs validation."
3
+ description: "Implement a proposed change's tasks in a closed loop: code → test → self-heal → all gates green. Enter after propose, once specs are landed."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Apply
9
9
 
10
- Implement all tasks in `llmanspec/changes/<id>/tasks.md` **in one closed loop**:
11
- Implement code → Add tests/acceptance → Run gates → Self-heal on failures → Report results when all pass.
12
- Unless there is a clear blocker, **DO NOT stop halfway to ask "should I continue?"**
10
+ Implement all tasks in `llmanspec/changes/<id>/tasks.md` **in one closed loop**: implement → add tests/acceptance → run gates → self-heal and re-run on failure → report when all pass. Unless there is a clear blocker, **do not stop halfway to ask "should I continue?"**
13
11
 
14
12
  ## Pipeline Position
15
13
 
16
14
  {{ unit("skills/git-native-flow-brief") }}
17
15
 
18
- ### Skill navigation (not the lifecycle; shows current skill only)
19
-
20
16
  ```mermaid
21
17
  flowchart LR
22
- propose["llman-sdd-propose<br/>Propose"] --> apply
23
- apply["★ llman-sdd-apply ★<br/>Implement (readyToImplement)"]
24
- apply --> verify["llman-sdd-verify<br/>Verify"]
25
- verify --> archive["llman-sdd-archive<br/>Archive"]
18
+ propose["llman-sdd-propose"] --> apply["★ llman-sdd-apply"]
19
+ apply --> verify["llman-sdd-verify"]
20
+ verify --> archive["llman-sdd-archive"]
26
21
 
27
22
  style apply fill:#fff3cd,stroke:#ffc107,stroke-width:3px
28
23
  ```
29
24
 
30
- > 📍 You are at Git-native **H (apply)** in the full lifecycle diagram: Specs-landed (or `needs_specs_change: false`) and `readyToImplement=true` required first → next: `llman-sdd-verify`
25
+ > 📍 Entry requires the specs-landed gate green (or `needs_specs_change: false`); `readyToImplement=true` (all gates green) is the completion signal that closes this loop → next `llman-sdd-verify`.
31
26
 
32
27
  ## Hard Constraints
33
28
 
34
- - **SSOT-driven**: `proposal.md` / `design.md` / `tasks.md` and live `llmanspec/specs/**` on the feature branch are the single source of truth; every MUST/SHALL in specs must be fulfilled.
35
- - **Scope-locked**: Only implement what's in the current change; don't fix "unrelated issues" on the side.
36
- - **Minimal changes**: Keep changes minimal and strictly scoped to current tasks.
37
- - **No guessing**: If requirements are unclear, or specs contradict reality, STOP and report — don't assume behavior.
38
- - **No legacy compatibility layers**: If a change requires new behavior, upgrade all call sites directly, unless tasks/proposal explicitly require compatibility.
39
- - **Don't ask "should I continue?"**: Execute to loop closure unless you hit an unresolvable blocker.
40
- - **Close-out**: this skill's closed loop ends by suggesting `llman-sdd-verify`; finalize/archive is handled by `llman-sdd-archive` (do not finalize inside the self-healing loop).
29
+ - **Single-source-of-truth driven**: `proposal.md` / `design.md` / `tasks.md` and `llmanspec/specs/**` on the branch; every MUST/SHALL in specs must be fulfilled.
30
+ - **Scope-locked**: only implement the current change's scope; never fix "unrelated issues" on the side; keep changes minimal.
31
+ - **No guessing**: unclear requirements or specs contradicting reality → STOP and report; don't assume.
32
+ - **No legacy compatibility layers**: if the change requires new behavior, upgrade all call sites directly, unless tasks/proposal explicitly require compatibility.
33
+ - **Close-out**: this loop ends by suggesting `llman-sdd-verify`; finalize/archive belongs to `llman-sdd-archive` (do not finalize inside the self-healing loop).
41
34
 
42
35
  ## Commit Policy
43
36
 
44
- - **Commits on the change branch are free** (no mid-flight archive point; `change finalize` needs no clean tree): segment by task or milestone when it helps review, or keep the working tree dirty and let finalize make ONE close commit — both are first-class. `change checkpoint` no longer exists (calling it exits non-zero and points to finalize), so there is no mid-flight "archive point" to maintain; `change finalize` handles both shapes (it does NOT require a clean tree).
45
- - **Default close-out**: after all tasks pass gates and verify is green, `llman-sdd change finalize <id>` auto-commits `archive(sdd): <change-id>` (uncommitted impl diff + frontmatter + archive rename in one commit). Do not run finalize inside the apply loop. `--no-commit` skips the auto commit (manual/CI histories; pre-commit-hook conflicts).
46
- - **Blocker interrupt**: when you must STOP on a blocker, make ONE work-in-progress commit (e.g. `wip(sdd): <change-id> <summary>`) to preserve the state, then report.
37
+ - **Commits on the change branch are free** (`change finalize` needs no clean tree): segment by task/milestone, or keep the tree dirty and let finalize make one close commit — both are first-class.
38
+ - **Default close-out**: after all tasks pass gates and verify is green, `llman-sdd change finalize <id>` auto-commits `archive(sdd): <change-id>` (uncommitted diff + frontmatter + rename in one commit). Do not run finalize inside the apply loop. `--no-commit` skips the auto commit (manual/CI histories; pre-commit-hook conflicts).
39
+ - **Blocker interrupt**: when you must STOP on a blocker, make ONE WIP commit (e.g. `wip(sdd): <change-id> <summary>`) to preserve the state, then report.
47
40
 
48
41
  ## Steps
49
42
 
50
43
  ### 0) Preflight (required)
51
- - Read and obey: `llmanspec/config.yaml`, `AGENTS.md` (if present).
52
- - `git status --porcelain`:
53
- - If working tree is dirty and changes don't belong to the current change: `git stash push -u -m "llman-sdd-apply autopilot backup"`.
54
- - Run `llman-sdd validate --all --strict --no-interactive`:
55
- - If it fails for reasons unrelated to the current change, stop and report (inconsistent artifacts prevent SSOT-driven implementation).
56
- - **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`).
57
-
58
- ### 1) Select change id and check prerequisites
59
- - If a change id is provided, use it directly.
60
- - Otherwise infer from context; if ambiguous, run `llman-sdd list --json` and let user pick.
61
- - Always announce: "Using change: <id>" and how to override.
62
- - Confirm you are on the non-default feature branch bound via `llman-sdd change start <id>` or `change attach <id>` (`--force` only to rebind). Specs/features on the branch are SSOT — do not author under `changes/<id>/specs/`.
44
+ - Read and obey `llmanspec/config.yaml`, `AGENTS.md` (if present).
45
+ - `git status --porcelain`: if the tree is dirty with changes not belonging to this change → `git stash push -u -m "llman-sdd-apply autopilot backup"` first.
46
+ - `llman-sdd validate --all --strict`: if it fails for reasons unrelated to this change → stop and report (inconsistent artifacts prevent source-of-truth-driven implementation).
47
+ - **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).
48
+
49
+ ### 1) Select the change id and check prerequisites
50
+ - If provided, use it; otherwise infer from context, and if ambiguous run `llman-sdd list --json` and let the user pick. Always announce "Using change: <id>" and how to override.
51
+ - Confirm you are on the non-default branch bound via `llman-sdd change start <id>` or `change attach <id>` (`--force` only to rebind). Specs on the branch are the single source of truth — do not author under `changes/<id>/specs/`.
63
52
  {{ unit("skills/stage-guard") }}
64
53
  - Use `llman-sdd context --task "<goal from proposal>" --paths "<scope from specs>"` to get relevant specs.
65
- - If context is unavailable, run `llman-sdd index rebuild` and retry.
54
+ - Context unavailable → run `llman-sdd index check` first: stale/missing → `llman-sdd index rebuild` 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.
66
55
 
67
- ### 2) Read SSOT artifacts
68
- You must read through:
69
- - `llmanspec/changes/<id>/proposal.md`
70
- - `llmanspec/changes/<id>/design.md` (if present)
71
- - `llmanspec/changes/<id>/tasks.md`
72
- - Live specs on the feature branch: `llmanspec/specs/**` (`<capability>.feature`) — this is SSOT
56
+ ### 2) Read the source-of-truth artifacts
57
+ - `llmanspec/changes/<id>/proposal.md`, `design.md` (if present), `tasks.md`
58
+ - `llmanspec/specs/**` (`<capability>.feature`) on the branch
73
59
 
74
- Extract hard constraints from proposal.md and design.md decisions. Convert tasks.md into a minimal executable step sequence (preserving original order).
60
+ Distill proposal/design decisions into a list of inviolable hard constraints; convert tasks.md into a minimal executable step sequence (preserving original order).
75
61
 
76
62
  ### 3) Show status
77
- - Progress: "N/M tasks complete"
78
- - Next 1–3 unchecked tasks (brief overview)
63
+ - Progress "N/M tasks complete" + a brief look at the next 1–3 unchecked tasks.
79
64
 
80
- ### 4) Implement tasks one by one (closed-loop execution)
65
+ ### 4) Implement tasks one by one (closed loop)
81
66
  For each unchecked task:
82
- 1. **Implement**: strictly per task description + specs requirements, keep changes minimal.
83
- 2. **Update checkbox immediately** after completion: `- [ ]` → `- [x]`.
84
- 3. If task is unclear, you hit a blocker, or specs/design don't match reality → STOP and report the blocker, don't assume.
85
-
86
- > 💡 Previous phase `llman-sdd-propose` (generated tasks); after this phase → `llman-sdd-verify` (verify)
87
-
88
- ### 5) Verification and self-healing loop (run after each task or batch)
89
- Run project gate commands (adapt to the actual project):
90
- - Relevant test suite: `just test` or `cargo test --all`
91
- - Format/lint: `just check` or `just lint` + `just fmt`
92
- - Git-native: stay on the bound feature branch; edit live `llmanspec/specs/<capability>.feature` (flat, or directory `llmanspec/specs/<capability>/` main file; rules `@human`, acceptance `@executable`) as needed; run `llman-sdd validate --specs` after spec edits; commit on the branch freely (segmented or leave dirty for finalize). Do not use `change delta` / solidify / feature_delta; `change checkpoint` is removed.
93
- - SDD validation: `llman-sdd validate <id> --strict --no-interactive`
94
-
95
- **On failure → enter self-healing loop (don't ask "should I continue?"):**
96
- 1. Parse failure cause (test failure / lint / format / validation error).
97
- 2. **Decide if it's a hard-to-locate bug** (cause unclear / intermittent flake / regression not obvious at a glance):
98
- - **Not hard-to-locate** (clear lint/format/compile/validation error): apply a minimum fix (don't expand scope); re-run the "minimum failure repro command" first, then re-run all gates.
99
- - **Hard-to-locate bug → escalate to the diagnose sub-flow**:
67
+ 1. **Implement**: strictly per task description + specs, minimal changes.
68
+ 2. **Check the box immediately** after completion: `- [ ]` → `- [x]`. **Close-out is not a task**: `change finalize` / `change archive` are pipeline steps and MUST NOT appear in tasks.md — if one is listed (e.g. "close-out — finalize"), remove it (the close-out task gate requires every task checked).
69
+ 3. **Edit, then verify — serially**: verification MUST run after edits land on disk; MUST NOT put edits and tests/validation in the same parallel tool-call batch (the check may read stale files and report a false failure or a false pass).
70
+ 4. Task unclear, blocker hit, or specs/design contradict reality → STOP and report; don't assume.
71
+
72
+ ### 5) Verification and self-healing loop (after each task or batch)
73
+ Run the project gates as appropriate:
74
+ - Test suite: `just test` or `cargo test --all`; format/lint: `just check` or `just lint` + `just fmt`
75
+ - Edit `llmanspec/specs/<capability>.feature` on the branch as needed (flat or directory main file; canonical native layout: `@req:<id>` on the `规则:` block header, nested `场景:` as executable examples); run `llman-sdd validate --specs` after spec edits; commit on the branch freely.
76
+ - SDD validation: `llman-sdd validate <id> --strict`
77
+
78
+ **Gate evidence**:
79
+ - 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.
80
+ - Gate verdicts MUST come from the real harness: MUST NOT obtain a "pass" via `--no-check`; on harness failure, find the root cause first (leaked env vars, nested-invocation guards, wrong cwd …) — MUST NOT label it an "inherent/self-referential property" and bypass it.
81
+ - Before/after criteria (counts, baselines) 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.
82
+ - Refactors and bulk replacements: MUST compare the test count before and after; all-green gates with fewer tests is a failure.
83
+
84
+ **On failure → self-heal (don't ask "should I continue?"):**
85
+ 1. Parse the failure cause (test / lint / format / validation).
86
+ 2. Decide if it's a hard-to-locate bug (cause unclear / intermittent flake / regression not obvious at a glance):
87
+ - **Not hard-to-locate** (clear lint/format/compile/validation error): apply a minimal fix (don't expand scope); re-run the minimum failure-repro command first, then all gates.
88
+ - **Hard-to-locate → escalate to the diagnose sub-flow**:
100
89
  1. **First build a command that reproduces the failure** (fast, deterministic, agent-runnable, and goes red on *this* bug) — one that drives the real bug path and asserts the user's exact symptom. **MUST NOT start hypothesizing before such a command exists** (staring at code and guessing is the failure this prevents).
101
90
  2. Run it, confirm red → minimize the repro (cut inputs/calls/config/data one at a time, keep only what's load-bearing).
102
91
  3. Generate **3–5 ranked hypotheses**, each falsifiable ("if X is the cause, changing Y makes the bug disappear").
103
92
  4. Verify one variable at a time; fix once the root cause is found.
104
- 5. If there's no correct seam for a regression test, note the architectural gap (hand off to `llman-sdd-arch-review`; when that skill is not enabled via `extra_skills`, write the gap into this change's `proposal.md` Further Notes section or `design.md`, and MUST NOT break the loop over it).
105
- 3. Re-run the "minimum failure repro command" first, then re-run all gates.
106
- 4. Log as one self-healing round: `Round N: failure → fix → re-run → pass/fail`.
107
-
108
- **Self-healing cap: 8 rounds**; exceeding this is a blocker: stop and output a blocker report (last failing command + output summary + what you tried).
93
+ 5. If there's no correct seam for a regression test, note the architectural gap (hand off to `llman-sdd-arch-review`; when not enabled, write the gap into this change's `proposal.md` Further Notes section or `design.md`, and MUST NOT break the loop over it).
94
+ 3. Re-run the minimum failure-repro command first, then all gates.
95
+ 4. Log one self-healing round: `Round N: failure → fix → re-run → pass/fail`.
109
96
 
110
- **Human review checkpoint (after each task batch passes the gates)**: once a batch is green, before starting the next batch or producing the completion report, run `llman-sdd review`:
97
+ **Self-healing cap: 8 rounds**; exceeding it is a blocker: stop and output a blocker report (last failing command + output summary + what you tried).
111
98
 
112
- - Exit code zero → continue.
113
- - Non-zero exit = CRITICAL findings: STOP, fix, re-run review; MUST NOT enter the next batch or emit the completion report with CRITICAL findings open.
99
+ **Human review gate (after each task batch passes the gates)**: before starting the next batch or emitting the completion report, run `llman-sdd review`: exit code zero → continue; non-zero = CRITICAL findings → STOP, fix, re-run review; MUST NOT enter the next batch or emit the completion report with CRITICAL findings open.
114
100
 
115
101
  ### 6) Completion report
116
- After all tasks complete + all gates green, output a structured report (see Output Contract below).
117
- Then suggest running `llman-sdd-verify` for the verification phase.
118
-
119
- > 💡 Implementation done → next: `llman-sdd-verify` (verify)
102
+ After all tasks complete + all gates green, output a structured report (see Output Contract), then suggest `llman-sdd-verify`.
120
103
 
121
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
122
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
104
+ {{ unit("skills/cli-footer") }}
123
105
 
124
106
  {{ unit("skills/validation-hints") }}
125
107
 
@@ -1,27 +1,21 @@
1
1
  ---
2
2
  name: "llman-sdd-arch-review"
3
- description: "Scan codebase for shallow modules (interface nearly equals implementation) and surface deepening candidates. Use when the user wants an architecture review, seeks module deepening opportunities, or wants to improve testability and AI-navigability."
3
+ description: "Architecture review: scan for shallow modules (interface ≈ implementation) and surface deepening candidates to improve testability and AI-navigability."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Architecture Review
9
9
 
10
- Scan the codebase for architectural friction and surface **deepening opportunities** — refactors that turn shallow modules (interface nearly equals implementation) into deep ones (lots of behaviour behind a small interface). The aim is testability and AI-navigability.
11
-
12
- ## Pipeline position
13
-
14
- Auxiliary tool, not part of the main pipeline (explore→propose→apply→verify→archive). Usable at any stage; commonly triggered during explore to surface improvement candidates.
15
-
16
- > 📍 Standalone optional skill; does not replace any pipeline stage.
10
+ Scan the codebase for architectural friction and surface **deepening opportunities** — turning shallow modules (interface ≈ implementation) into deep ones (lots of behavior behind a small interface). The aim is testability and AI-navigability. Auxiliary tool, not part of the main pipeline; usable at any stage, commonly triggered during explore.
17
11
 
18
12
  ## Design vocabulary
19
13
 
20
- A set of words about module shape, used to articulate "where it's worth changing". MUST NOT substitute "component" / "service" / "API" / "boundary" (they are broader, less precise):
14
+ Words about module shape; MUST NOT substitute "component" / "service" / "API" / "boundary" (broader, less precise):
21
15
 
22
16
  - **Module** — anything with an interface and an implementation (function/class/package/cross-layer slice).
23
17
  - **Interface** — everything a caller must know to use it correctly: type signature, plus invariants, ordering constraints, error modes, performance characteristics.
24
- - **Depth** — the amount of behaviour behind the interface. **Deep** = lots of behaviour behind a small interface; **shallow** = interface nearly as complex as the implementation (the caller saves nothing).
18
+ - **Depth** — the amount of behavior behind the interface. **Deep** = lots of behavior behind a small interface; **shallow** = interface nearly as complex as the implementation (the caller saves nothing). This skill turns shallow into deep.
25
19
  - **Seam** — a place where you can swap the implementation without editing call sites (where the interface lives). In llman, seam = the public boundary driven by `*.feature` GWT steps.
26
20
  - **Leverage** — what callers get from depth: more capability per unit of interface learned.
27
21
  - **Locality** — what maintainers get from depth: changes/bugs/knowledge/verification concentrate in one place.
@@ -31,10 +25,10 @@ A set of words about module shape, used to articulate "where it's worth changing
31
25
  ### 1. Explore (scope first, YAGNI)
32
26
  - If the user named a direction (module/subsystem/pain point), accept it; skip inference.
33
27
  - Otherwise walk `git log --oneline` for hot spots (files/areas that keep coming up).
34
- - Prefer reading live `<capability>.feature` (single-track SSOT) and `design.md` (existing ADRs); MUST NOT create a `CONTEXT.md`.
28
+ - Prefer reading `<capability>.feature` (the single source of truth) and `design.md` (existing ADRs); MUST NOT create a `CONTEXT.md`.
35
29
  - Use the Agent tool (`subagent_type=Explore`) to walk the codebase, noting friction:
36
30
  - Does understanding one concept require bouncing between many small modules?
37
- - Where are modules **shallow** (interface nearly as complex as the implementation)?
31
+ - Where are modules **shallow** (interface ≈ implementation complexity, callers save nothing)?
38
32
  - Where are pure functions extracted only for testability, but real bugs hide in how they're called (no locality)?
39
33
  - Which parts are untested or hard to test through their current interface?
40
34
 
@@ -46,20 +40,19 @@ For each candidate:
46
40
  - **Benefits** — locality and leverage improvements; how tests get better.
47
41
  - **Recommendation strength** — `Strong` / `Worth exploring` / `Speculative`.
48
42
 
49
- **Deletion test**: for any suspected-shallow module, imagine deleting it — does complexity vanish (it's just a pass-through, no value) or reappear across N call sites (it's actually earning its keep)? "Reappears" is the signal you want.
43
+ **Deletion test**: for any suspected-shallow module, imagine deleting it — does complexity vanish (it's just a pass-through) or reappear across N call sites (it's actually earning its keep)? "Reappears" is the signal you want.
50
44
 
51
45
  **ADR conflicts**: if a candidate contradicts an existing `design.md` decision, surface it only when the friction is real enough to warrant reopening, and mark it in the candidate.
52
46
 
53
- ### 3. Grilling (after the user picks a candidate)
54
- Run `llman-sdd-explore`'s **grilling branch** (trigger "deep-dig") to walk the decision tree — constraints, dependencies, the deepened module's shape, what sits behind the seam, which tests survive.
47
+ ### 3. Deep-dive Q&A (after the user picks a candidate)
48
+ Run `llman-sdd-explore`'s **deep-dive Q&A branch** (trigger "deep-dig") to walk the decision tree — constraints, dependencies, the deepened module's shape, what sits behind the seam, which tests survive.
55
49
 
56
- - A deepened module uses a concept not in the capability `.feature`? → update live `.feature` **only** if the change already has Branch binding and you are on the bound branch (Specs landing); otherwise STOP and route to `llman-sdd-propose` / `change start` — **never** edit live specs on the default branch.
50
+ - The deepened module uses a concept not in the `.feature`? → update the `.feature` **only** if the change is branch-bound and you are on the bound branch; otherwise STOP and route to `llman-sdd-propose` / `change start` — **never** edit specs on the default branch.
57
51
  - User rejects the candidate with a load-bearing reason? → offer an ADR only when "hard to reverse + surprising without context + real trade-off" all hold; record in `design.md`.
58
52
 
59
53
  ## Output
60
- Candidate list (text; optional HTML report written to OS temp dir, not the repo) + the grilling decision record after the user picks one (write back to proposal; contract edits only via Specs landing into live `.feature`).
54
+ Candidate list (text; optional HTML report written to the OS temp dir, not the repo) + the deep-dive decision record after the user picks one (write back to the proposal; contract edits only after landing on the bound branch into the `.feature`).
61
55
 
62
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
63
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
56
+ {{ unit("skills/cli-footer") }}
64
57
 
65
58
  {{ unit("skills/structured-protocol") }}
@@ -1,84 +1,69 @@
1
1
  ---
2
2
  name: "llman-sdd-archive"
3
- description: "Archive completed llman SDD changes. Auto-merge back into the fork-point branch (squash by default), then rename change docs to archive/. Use after verify reports all-clear."
3
+ description: "Archive a completed change: merge back (squash default), rename docs into archive/, auto-commit the close-out. Run after verify is green."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Archive
9
9
 
10
- Use this skill to archive completed changes. Prerequisites: verify all-green, and the change already has Branch binding plus Specs landing (or `needs_specs_change: false`; live specs are on the bound branch). `change finalize` **auto-merges** into the fork-point branch (target: `--into` > binding `base_branch` > default branch; method: `--method` > config `sdd.merge_method`, squash by default — feature diff + rename collapse into ONE close-out commit on the target), **renames** change docs to `changes/archive/`, then **auto-commits** `archive(sdd): <change-id>` (impl diff + rename in one commit; `--no-commit` skips). `change checkpoint` is removed (no mid-flight archive point; `change finalize` does not require a clean tree). `git push` / hosting PR are optional.
10
+ Archive completed changes. Prerequisites: verify all-green, and the change is branch-bound with specs landed (or `needs_specs_change: false`). `change finalize` **auto-merges** into the base branch (target: `--into` > binding `base_branch` > default branch; method: `--method` > config `sdd.merge_method`, squash by default — feature diff + rename collapse into ONE commit on the target), **renames** change docs into `changes/archive/`, then **auto-commits** `archive(sdd): <change-id>` (`--no-commit` skips). `git push` / PR are optional.
11
11
 
12
12
  ## Pipeline Position
13
13
 
14
14
  ```mermaid
15
15
  flowchart LR
16
- verify["llman-sdd-verify<br/>Verify"] --> archive
17
- archive["★ llman-sdd-archive ★<br/>Archive (you are here)"]
16
+ verify["llman-sdd-verify"] --> archive["★ llman-sdd-archive"]
18
17
 
19
18
  style archive fill:#fff3cd,stroke:#ffc107,stroke-width:3px
20
19
  ```
21
20
 
22
- > 📍 You are in the archive phase: the last stop in the Git-native lifecycle.
23
- > 📎 If specs get too large, run `llman-sdd-specs-compact` to compress.
21
+ > 📍 You are in archive: the last stop of the branch lifecycle. If specs grow too large, run `llman-sdd-specs-compact`.
24
22
 
25
23
  ## Hard Constraints
26
24
 
27
- - **Must pass verify phase all-green first**: don't archive changes that haven't passed verification.
28
- - **Must already have Branch binding**: `change start` / `attach` done; otherwise STOP.
29
- - **SSOT validation**: every change must pass `llman-sdd validate <id> --strict --no-interactive` before archiving.
25
+ - **Verify must be all-green first**; **the change must be branch-bound** (`change start` / `attach`) — otherwise STOP.
26
+ - Every change must pass `llman-sdd validate <id> --strict` before archiving.
30
27
  - **Don't ask "should I continue?"**: execute the full batch to completion unless you hit an unresolvable error.
31
- - **Close-out MUST NOT default to PR/push**: finalize performs a local merge (squash by default) + rename + one close-out commit (`archive(sdd): <id>`). `git push` / hosting PR are optional — only when the user or project explicitly requires remote review. **Agent MUST NOT** push or open a PR by default on this skill's account.
28
+ - **Close-out MUST NOT default to PR/push**: the CLI merges locally (squash default) + one close-out commit. Push / PR only when the user or project explicitly requires remote review — **Agent MUST NOT** push or open a PR by default.
32
29
 
33
30
  ## Steps
34
31
 
35
32
  ### 0) Preflight
36
- - `git status --porcelain`: confirm working tree changes belong to completed changes.
37
- - If unexpected changes exist, handle them (stash or report).
33
+ - `git status --porcelain`: confirm working-tree changes belong to completed changes; handle unexpected ones first (stash or report).
38
34
 
39
- ### 1) Confirm target changes
40
- - Determine target IDs: single or batch (from user input or `llman-sdd list --json`).
41
- - Always announce: "Archiving IDs: <id1>, <id2>, ...".
42
- - Confirm each change has passed verify phase all-green.
35
+ ### 1) Confirm targets
36
+ - Determine IDs (single or batch, from user input or `llman-sdd list --json`); always announce "Archiving IDs: <id1>, <id2>, ..." and confirm each change is verify all-green.
43
37
 
44
38
  ### 2) Archive one by one
45
- - **Human review checkpoint (before each id is archived, including batches)**: run `llman-sdd review --capability <id>`. Exit code zero → continue; non-zero = CRITICAL findings: STOP, fix, re-run; MUST NOT archive with CRITICAL findings open.
46
- - Validate each first: `llman-sdd validate <id> --strict --no-interactive`.
47
- - Validation failure → STOP and report; don't skip validation and force archive.
39
+ - **Human review gate (before each id, including batches)**: run `llman-sdd review` (plain; `--capability` takes a spec id only). Exit code zero → continue; non-zero = CRITICAL → STOP, fix, re-run; MUST NOT archive with CRITICAL findings open.
40
+ - Validate first: `llman-sdd validate <id> --strict`; failure → STOP and report, never force-archive.
48
41
  - Optional preview: `llman-sdd change archive <id> --dry-run`.
49
- - Execute archive:
50
- - default: `llman-sdd change archive <id>`
51
- - tooling-only: `llman-sdd change archive <id> --skip-specs`
52
- - **stop immediately on first failure**, report remaining unprocessed IDs.
53
- - **Git-native close-out**:
54
- - Prerequisites: Branch binding done (`change start` / `attach`); still on the bound branch (or the target branch after the auto merge).
55
- - `change archive` / `change finalize` run the **auto merge** (target `--into` > binding `base_branch` > default branch; method squash by default or `ff`; if the target is held by another worktree the merge is skipped with an explicit manual command), **then** rename change docs into `changes/archive/` — rename is never rolled back on merge failure and degradation is reported explicitly.
56
- - Legacy `*.feature.delta.toon` or `spec.toon` under specs is a migration blocker — run `llman-sdd project migrate --kind toon2features`.
57
- - **Default: `change finalize` (one-command close)** — gates → auto merge → docs rename → **auto commit** `archive(sdd): <change-id>` (squash default: impl diff + rename collapse into ONE commit on the target; no manual `git commit` needed; locked-rule edits are a report-only WARNING — warn, never block):
42
+ - Execute: `llman-sdd change archive <id>`; **stop immediately on first failure** and report the remaining IDs.
43
+ - **Branch close-out**:
44
+ - Prerequisites: branch bound; still on the bound branch (or on the target branch after the auto merge).
45
+ - `change archive` / `change finalize` run the **auto merge** (target `--into` > `base_branch` > default branch; method squash by default or `ff`; when the target is held by another worktree the merge and commit run in place inside it, with `executed in target worktree <path>` in the output; a dirty holding worktree aborts with disposal options and zero writes), **then** rename into `changes/archive/` — the rename is never rolled back on merge failure and degradation is reported explicitly.
46
+ - **Default: `change finalize` (one-command close)** — gates → merge → rename → **auto commit** `archive(sdd): <change-id>` (no manual `git commit` needed; locked-rule edits are a report-only WARNING — warn, never block):
58
47
  ```text
59
- 1. Implement live specs + code (working tree may stay dirty; commits on the branch are free — segmented or none)
48
+ 1. Implement specs + code (working tree may stay dirty; commits on the branch are free)
60
49
  2. llman-sdd change finalize <id> # gates + merge (squash default) + rename + auto commit
61
- 3. optional: git commit --amend # adjust the message; git branch -D <feature> # after squash the branch is no longer an ancestor; -d gets refused
50
+ 3. optional: git commit --amend to adjust the message; git branch -D <feature> # after squash the branch is no longer an ancestor; -d gets refused
62
51
  ```
63
- `--no-commit` skips the auto commit (CI / pre-commit-hook conflicts): finalize then leaves the tree dirty and prints the manual `git commit` command. Idempotent retry: a rerun after a failed auto commit detects the already-archived rename and finishes the commit.
64
- - **Fallback: plain `change archive <id>`** — same merge + rename, no auto commit; requires a clean tree. `checkpointed`/`checkpoint_sha` fields went away with checkpoint (no mid-flight archive point; `change finalize` needs no clean tree) — nothing to write beforehand, and nothing to review for the snapshot (use `change diff` instead).
52
+ `--no-commit` skips the auto commit (CI / pre-commit-hook conflicts): finalize leaves the tree dirty and prints the manual commit command. Idempotent retry: a rerun after a failed auto commit detects the already-archived rename and finishes the commit.
53
+ - **Fallback: plain `change archive <id>`** — same auto merge + rename + close-out commit as finalize (no `--no-commit` here); gates: tasks all checked + clean tree + on the bound non-default branch (`--force` skips the gates). Snapshot review: `change diff`.
65
54
 
66
55
  ### 3) Full validation
67
- - After all archives complete: `llman-sdd validate --all --strict --no-interactive`.
68
- - Confirm post-archive spec artifacts are consistent.
56
+ - After all archives: `llman-sdd validate --all --strict`; confirm spec artifacts are consistent.
69
57
 
70
58
  ### 4) Commit guidance
71
- - Finalize auto-committed (`archive(sdd): <id>`); with `--no-commit`, commit manually: `git add -A && git commit -m "archive(sdd): <id1>, <id2>"` (or the archive skill's suggested format).
72
- - Optional: `git branch -D <feature>` after the merge (squash leaves the branch outside main's ancestry). push / hosting PR only when the user or project explicitly requires remote review.
73
- - **Breaking contract changes** (removed/renamed frontmatter field, command, tag, or stage value) MUST ship an upgrade path under `migrations/v<from>-v<to>/` (README prompt + one-shot script, shipped in-repo) — verify it exists before closing the change.
74
- - **Archived `depends_on`**: archive renames the change dir to `archive/YYYY-MM-DD-<id>`, but validate recognizes `depends_on` pointing to archived/frozen ids as INFO (not ERROR), so you do **not** need to manually update other changes' `depends_on` frontmatter after archive.
75
-
76
- > 💡 Previous phase `llman-sdd-verify` (passed verification) → this phase completes the loop. If specs grow too large, run `llman-sdd-specs-compact`.
59
+ - Finalize already auto-committed; with `--no-commit`, commit manually: `git add -A && git commit -m "archive(sdd): <id1>, <id2>"`.
60
+ - Optional: `git branch -D <feature>` after the merge. Push / PR only when explicitly required.
61
+ - **Breaking contract changes** (removed/renamed frontmatter field, command, tag, or stage value) MUST ship an upgrade path under `migrations/v<from>-v<to>/` (README + one-shot script, shipped in-repo) — verify it exists before closing.
62
+ - **Archived `depends_on`**: archive renames the change dir to `archive/YYYY-MM-DD-<id>`; validate treats `depends_on` pointing to archived/frozen ids as INFO (not ERROR), so you do **not** need to update other changes' frontmatter after archive.
77
63
 
78
64
  {{ unit("workflow/archive-freeze-guidance") }}
79
65
 
80
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
81
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
66
+ {{ unit("skills/cli-footer") }}
82
67
 
83
68
  {{ unit("skills/validation-hints") }}
84
69
 
@@ -1,41 +1,34 @@
1
1
  ---
2
2
  name: "llman-sdd-continue"
3
- description: "Continue an existing llman SDD change by creating the next artifact."
3
+ description: "Continue an existing change: create the next missing artifact."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Continue
9
9
 
10
- Use this skill to continue an existing change and create the next missing artifact.
10
+ Continue an existing change and create the next missing artifact.
11
11
 
12
12
  ## Steps
13
- 1. Identify the change id:
14
- - If provided by the user, use it.
15
- - Otherwise run `llman-sdd list --json` and ask which change to continue.
16
- - Always announce: "Using change: <id>".
17
- 2. Read the change directory: `llmanspec/changes/<id>/`.
18
- > Stage gate: decide from `stage` / `readyToImplement` in `llman-sdd show <id> --json --type change`; full decision table lives in llman-sdd-apply.
19
- 3. Determine the next artifact to create (in order):
13
+ 1. Identify the change id: use it if provided; otherwise run `llman-sdd list --json` and ask which change to continue. Always announce "Using change: <id>".
14
+ 2. Read `llmanspec/changes/<id>/`.
15
+ > Stage decisions use `stage` / `readyToImplement` from `llman-sdd show <id> --output json --type change`; the full decision table lives in llman-sdd-apply.
16
+ 3. Determine the next missing artifact, in order:
20
17
  1) `proposal.md`
21
- 2) `design.md` (only if design tradeoffs matter)
18
+ 2) `design.md` (only when design tradeoffs matter)
22
19
  3) `tasks.md`
23
- 4) `llman-sdd change start <id>` (or `change attach <id>` if the branch already exists) — Branch binding
24
- 5) Edit live `llmanspec/specs/<capability>.feature` (flat, or directory main file) on the **bound branch** and commit — Specs landing (or set `needs_specs_change: false` when there is no contract edit)
25
- 4. Create exactly ONE missing artifact (or one live spec/feature edit on the bound branch).
26
- - Do NOT implement application code in continue mode.
27
- - Do NOT create `*.feature.delta.toon`, `spec.toon`, or files under `changes/<id>/specs/`.
28
- - Do NOT edit shared `llmanspec/specs/**` before start/attach.
29
- 5. If all artifacts already exist, suggest next actions from `llman-sdd show <id> --json`:
30
- - `readyToImplement=false` → finish Specs landing (or `needs_specs_change: false`); do **not** suggest apply yet
31
- - `readyToImplement=true` → Implement: `llman-sdd-apply`
32
- - After verify → Archive: `llman-sdd-archive`
33
- - Validate: `llman-sdd validate <id> --strict --no-interactive`
34
- - Review: `llman-sdd change diff <id>` (read-only)
20
+ 4) `llman-sdd change start <id>` (or `change attach <id>` if the branch exists) — bind the branch
21
+ 5) Edit `llmanspec/specs/<capability>.feature` (flat, or directory main file) on the **bound branch** and commit — land specs (or set `needs_specs_change: false` when there is no contract edit)
22
+ 4. Create exactly ONE missing artifact (or one spec edit on the bound branch).
23
+ - Do NOT write application code; do NOT create `changes/<id>/specs/`; do NOT edit `llmanspec/specs/**` before start/attach.
24
+ 5. If all artifacts exist, suggest next steps from `llman-sdd show <id> --output json`:
25
+ - specs-landed gate failing → land specs first (or `needs_specs_change: false`); do **not** suggest apply yet
26
+ - specs-landed gate green (even mid-implementation with `readyToImplement=false` while tasks remain) → `llman-sdd-apply`
27
+ - After verify → `llman-sdd-archive`
28
+ - Validate: `llman-sdd validate <id> --strict`; review: `llman-sdd change diff <id>` (read-only)
35
29
 
36
30
  {{ unit("skills/git-native-flow") }}
37
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
38
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
31
+ {{ unit("skills/cli-footer") }}
39
32
  {{ unit("skills/validation-hints") }}
40
33
 
41
34
  {{ unit("skills/structured-protocol") }}
@@ -1,64 +1,53 @@
1
1
  ---
2
2
  name: "llman-sdd-draft"
3
- description: "Quickly capture a change idea as a draft proposal (proposal.md only, via `change new --from`). No tasks/design/specs/attach. Use to jot down ideas or future requirements; promote to full propose when ready."
3
+ description: "Capture a change idea as a draft (proposal.md only, no id asked). For jotting ideas/future needs; formalize with propose when ready."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Draft
9
9
 
10
- Capture a change idea as a **draft proposal** (a `proposal.md` skeleton only). This is the lightweight entry point for "just record this idea / future need" — no triage, no tasks, no live specs, no attach. Promote to a formal change with `llman-sdd-propose` when the idea is ready to act on.
10
+ Capture a change idea as a **draft** (a `proposal.md` skeleton only) — the lightweight "just record it" entry: no scale assessment, no tasks, no specs edits, no attach. Formalize with `llman-sdd-propose` when ready to act.
11
11
 
12
12
  ## Pipeline Position
13
13
 
14
14
  ```mermaid
15
15
  flowchart LR
16
- draft["★ llman-sdd-draft ★<br/>Draft (you are here)"] -.->|"promote"| propose["llman-sdd-propose<br/>Propose"]
17
- propose --> apply["llman-sdd-apply<br/>Implement"]
18
- apply --> verify["llman-sdd-verify<br/>Verify"]
19
- verify --> archive["llman-sdd-archive<br/>Archive"]
16
+ draft["★ llman-sdd-draft"] -.->|"formalize"| propose["llman-sdd-propose"]
17
+ propose --> apply["llman-sdd-apply"] --> verify["llman-sdd-verify"] --> archive["llman-sdd-archive"]
20
18
 
21
19
  style draft fill:#fff3cd,stroke:#ffc107,stroke-width:3px
22
20
  ```
23
21
 
24
- > 📍 You are at the draft stage → next: flesh out `proposal.md`, then run `llman-sdd-propose` to formalize
25
- > 📎 This skill creates a **draft** change (proposal.md only). Full propose follows Git-native: tasks → Branch binding → Specs landing (see propose lifecycle diagram)
26
- > 🗺️ Skill navigation ≠ Git-native lifecycle; Branch binding / Specs landing are not separate skills
22
+ > 📍 Draft stage → next: flesh out `proposal.md`, then `llman-sdd-propose` to formalize.
27
23
 
28
24
  ## Hard Constraints
29
25
 
30
26
  - **MUST NOT ask the user for a change id**: derive it from the description via `change new --from` and announce it.
31
- - **MUST NOT create tasks/design/specs/attach**: this skill creates only the `proposal.md` draft shell. Full planning artifacts belong to `llman-sdd-propose`.
32
- - **MUST NOT run triage or assess change scale**: that is propose's job. If the user wants to start implementing, suggest `llman-sdd-propose`.
33
- - **Scope boundary**: if the description clearly involves MUST/SHALL behavioral contract changes or multi-file impact, suggest `llman-sdd-propose` instead of stopping at a draft — but still create the draft shell first so the idea isn't lost.
34
- - **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 it via `llman-sdd show`/`list`, never store it in frontmatter. Do not re-declare frontmatter fields in the prose body (no `## Status` block); the body H1 is a human-readable title, not a repeat of the change id.
27
+ - **MUST NOT create tasks/design/specs/attach**: only the `proposal.md` draft; full planning belongs to `llman-sdd-propose`.
28
+ - **MUST NOT assess change scale**: that is propose's job. If the user wants to start implementing → suggest `llman-sdd-propose`.
29
+ - **Scope boundary**: if the description clearly involves MUST/SHALL contract changes or multi-file impact, suggest `llman-sdd-propose` — but still create the draft first so the idea isn't lost.
30
+ - **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 (no `## Status` block); the H1 is a human-readable title, not a repeat of the change id.
35
31
 
36
32
  ## Steps
37
33
 
38
34
  ### 0) Preflight
39
- - Read `llmanspec/config.yaml` for project context, rules, locale.
40
- - `llmanspec/` must exist; if missing, tell the user to run `llman-sdd init`, then STOP.
35
+ - Read `llmanspec/config.yaml`; if `llmanspec/` is missing, tell the user to run `llman-sdd init`, then STOP.
41
36
 
42
37
  ### 1) Capture the description
43
- - Take the user's description as-is (e.g. "draft: add a export-to-json command", "note down: we should support worktrees for sdd changes").
44
- - **MUST NOT ask for a change id.** Derive it from the description.
38
+ - Take the user's description as-is (e.g. "draft: add an export-to-json command", "note: sdd changes should support worktrees"). **MUST NOT ask for a change id.**
45
39
 
46
- ### 2) Create the draft shell
40
+ ### 2) Create the draft
47
41
  ```bash
48
42
  llman-sdd change new --from "<user description>"
49
43
  ```
50
- - The CLI generates a legal kebab-case id (sanitized + validated), creates `llmanspec/changes/<derived id>/proposal.md` (a skeleton with `## Why` / `## What Changes` TODO sections), and prints the final id + path.
51
- - If the derived id collides with an existing change, the CLI fails non-zero; suggest rephrasing the description or using `--force` to overwrite (rare for drafts).
44
+ - The CLI generates a legal kebab-case id, creates `llmanspec/changes/<id>/proposal.md` (a skeleton with `## Why` / `## What Changes` TODO sections), and prints the id + path.
45
+ - On id collision the CLI fails non-zero; suggest rephrasing or `--force` to overwrite (rare for drafts).
52
46
 
53
47
  ### 3) Announce and hand off
54
- - **MUST tell the user the derived id** (e.g. "Created draft change `<id>` at `llmanspec/changes/<id>/proposal.md`").
55
- - Suggest next steps:
56
- - Flesh out `proposal.md` (Why / What Changes / Capabilities / Impact) now or later.
57
- - When ready to act on it, run `llman-sdd-propose` to formalize (triage + tasks → `change start`/`attach` → Specs landing).
48
+ - **MUST tell the user the derived id** ("Created draft change `<id>` at `llmanspec/changes/<id>/proposal.md`").
49
+ - Suggest next steps: flesh out `proposal.md` (Why / What Changes / Capabilities / Impact); formalize with `llman-sdd-propose` when ready.
58
50
 
59
- > 💡 Draft captured → next: edit `proposal.md`, then `llman-sdd-propose` to formalize.
60
-
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>`.
51
+ {{ unit("skills/cli-footer") }}
63
52
 
64
53
  {{ unit("skills/ethics-governance") }}