@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,78 +1,64 @@
1
1
  ---
2
2
  name: "llman-sdd-explore"
3
- description: "Enter llman SDD explore mode when the user wants to investigate, understand requirements, or think through a problem before implementing. Prohibits code writing. Use this when intent is unclear or the user wants analysis before action."
3
+ description: "Explore mode: investigate, clarify requirements, think through problems before acting. No code writing. Use when intent is unclear or analysis comes first."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Explore
9
9
 
10
- Use this skill when the user wants to think through ideas, investigate problems, or clarify requirements **before** starting implementation.
10
+ Use this skill to think through ideas, investigate problems, or clarify requirements **before** implementation.
11
11
 
12
- **IMPORTANT: Explore mode is for thinking, not implementing.**
12
+ **Explore mode is for thinking, not implementing:**
13
13
  - You MAY read files, search code, and investigate the codebase.
14
- - You MAY create or update planning shell artifacts (proposal/design/tasks).
15
- - Live specs: **READ-ONLY** unless the change is already Branch-bound and you are on that branch; otherwise STOP and suggest `llman-sdd-propose` / `change start`.
16
- - You MUST NOT write application code or implement features in explore mode.
14
+ - You MAY create or update planning docs (proposal/design/tasks).
15
+ - `llmanspec/specs/**` is **READ-ONLY** — unless the change is already bound to a branch and you are on it; otherwise STOP and suggest `llman-sdd-propose` / `change start`.
16
+ - You MUST NOT write application code.
17
17
 
18
18
  ## Pipeline Position
19
19
 
20
20
  {{ unit("skills/git-native-flow-brief") }}
21
21
 
22
- ### Skill navigation (not the lifecycle; shows current skill only)
23
-
24
22
  ```mermaid
25
23
  flowchart LR
26
- explore["★ llman-sdd-explore ★<br/>Explore (you are here)"]
27
- explore --> propose["llman-sdd-propose<br/>Propose (Branch binding + Specs landing)"]
28
- propose --> apply["llman-sdd-apply<br/>Implement"]
29
- apply --> verify["llman-sdd-verify<br/>Verify"]
30
- verify --> archive["llman-sdd-archive<br/>Archive"]
24
+ explore["★ llman-sdd-explore"] --> propose["llman-sdd-propose"]
25
+ propose --> apply["llman-sdd-apply"]
26
+ apply --> verify["llman-sdd-verify"]
27
+ verify --> archive["llman-sdd-archive"]
31
28
 
32
29
  style explore fill:#fff3cd,stroke:#ffc107,stroke-width:3px
33
30
  ```
34
31
 
35
- > 📍 You are in the explore phase (thinking only) → standard path next: `llman-sdd-propose` (propose)
36
- > 📎 For small changes (no behavioral contract changes), go directly to `llman-sdd-quick` (quick path)
37
- > 🗺️ Skill navigation ≠ Git-native lifecycle
32
+ > 📍 You are in explore → next is usually `llman-sdd-propose`; small changes (no contract edits) go via `llman-sdd-quick`.
38
33
 
39
34
  ## Stance
40
- - Curious, not prescriptive
41
- - Grounded in the actual codebase
42
- - Visual when helpful (ASCII diagrams)
43
- - Willing to hold multiple options and tradeoffs
35
+ - Curious, not prescriptive; grounded in the actual codebase.
36
+ - Visual when helpful (ASCII diagrams); hold multiple options and tradeoffs.
44
37
 
45
38
  ## Suggested moves
46
- 1. Use `llman-sdd context --task "<task>" --paths "<files>"` to quickly locate relevant specs.
47
- - Read the `direct` spec files (these are the contracts you must understand).
48
- - If context is unavailable, rebuild with `llman-sdd index rebuild` (default `pageindex`, no model needed) and retry.
39
+ 1. Use `llman-sdd context --task "<task>" --paths "<files>"` to locate relevant specs; read the full text of the specs in its `direct` list (these are the contracts you must understand).
40
+ - 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.
49
41
  2. Clarify the goal and constraints (ask 1–3 questions).
50
- 3. **Grilling branch (optional, only when the user explicitly triggers)**: triggers on "deep-dig" / "grill" / "one at a time" / "nail it down". Walks the decision tree one question at a time:
51
- - **Ask one question at a time**, with your recommended answer, waiting for feedback before the next.
52
- - **Facts vs decisions**: look up anything verifiable by reading the capability `.feature`/code/running commands yourself — **don't ask** the user; only **decisions** (tradeoffs, preferences, scope boundaries) go to the user.
53
- - **Terminology sharpening**: when a term conflicts or is fuzzy, call it out immediately ("your spec defines 'X' as A, but you just said B — which is it?"); on resolution: if the change already has Branch binding and you are on the bound branch, update live `.feature` (Specs landing); otherwise record only in `proposal.md` — **never** edit live specs on the default branch. MUST NOT create a `CONTEXT.md` glossary as a second authority.
54
- - **Write decisions back**: resolved decisions go into the change's `proposal.md` "Open Questions" section (planning shell; OK briefly on the default branch).
55
- - **Completion criterion**: every pending decision is resolved or explicitly deferred. When not triggered, the default (ask 1–3 questions) behavior is unchanged.
42
+ 3. **Deep-dive Q&A branch (optional, only on explicit user trigger)**: triggers on "deep-dig" / "grill" / "one at a time" / "nail it down". Walk the decision tree one question at a time:
43
+ - Ask one question at a time, with your recommended answer; wait for feedback before the next.
44
+ - Facts vs decisions: verify anything checkable by reading the `.feature`/code/running commands yourself — **don't ask** the user; only decisions (tradeoffs, preferences, scope boundaries) go to the user.
45
+ - Terminology sharpening: when a term conflicts or is fuzzy, call it out immediately ("your spec defines 'X' as A, but you just said B — which is it?"); on resolution: if the change is branch-bound and you are on the bound branch, update the `.feature`; otherwise record only in `proposal.md` — never edit specs on the default branch. MUST NOT create a `CONTEXT.md` glossary as a second authority.
46
+ - Write decisions back: resolved decisions go into the change's `proposal.md` "Open Questions" section.
47
+ - Completion criterion: every pending decision is resolved or explicitly deferred. When not triggered, the default (ask 1–3 questions) behavior is unchanged.
56
48
  4. If a change id is relevant, read its artifacts under `llmanspec/changes/<id>/`.
57
- - When diagnosing validation errors, prefer `llman-sdd validate <spec> --strict --no-check` (fast mode, skips the potentially slow `bdd.run_command`); resolve structural gates first (Gherkin / `@req` linkage / dual-write / req_id uniqueness), then run full mode (`--check` or `cargo test --features bdd`). The `FAIL <item_type>/<id>` lines in the output pin down each failing item.
49
+ - When diagnosing validation errors, run `llman-sdd validate <spec> --strict` first for the structural gates (Gherkin / `@req` linkage / dual-write / req_id uniqueness); when `bdd.run_command` is configured, validate executes that harness by default (`--no-check` skips it). Failing items are pinned down in the default TOON output's `items[].issues[]`; `--output human` prints `FAIL <item_type>/<id>` lines.
58
50
  5. Explore options and tradeoffs (2–3 options).
59
- 6. Assess change scale (triage) to determine if full SDD is needed.
51
+ 6. Assess change scale to determine if full SDD is needed.
60
52
  7. When something crystallizes, offer to capture it (don't auto-write):
61
- - Scope / design / work items → planning shell (`proposal.md` / `design.md` / `tasks.md`)
62
- - Constraints / executable harness → **suggest** live `llmanspec/specs/**` (one `.feature` per capability); actual edits require Branch binding then Specs landing. If not bound yet in explore, record only in proposal — do not edit live specs.
63
-
64
- > Git-native: first `change start`/`attach` (Branch binding) to enter Full, then edit live `.feature` on the bound branch (Specs landing); no `change delta` / solidify / feature_delta.
53
+ - Scope / design / work items → planning docs (`proposal.md` / `design.md` / `tasks.md`)
54
+ - Constraints / executable harness → **suggest** `llmanspec/specs/**`; actual edits require a bound branch. If not bound yet, record only in proposal.
65
55
 
66
56
  ## Exiting explore mode
67
- When the user is ready to implement, choose based on change scale:
68
- - Behavioral contract change → `llman-sdd-propose` (create proposal artifacts)
69
- - Small change / no contract change → `llman-sdd-quick` (quick path)
70
- - `readyToImplement=true` → `llman-sdd-apply` (implement tasks)
57
+ - Behavioral contract change → `llman-sdd-propose`
58
+ - Small change / no contract change → `llman-sdd-quick`
59
+ - change already landed specs (`stage=full`, specs-landed gate green) → `llman-sdd-apply`
71
60
  If the user asks you to implement while in explore mode, STOP and remind them to exit explore mode first.
72
61
 
73
- > 💡 Explore done → next: `llman-sdd-propose` (propose) or `llman-sdd-quick` (quick path)
74
-
75
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
76
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
62
+ {{ unit("skills/cli-footer") }}
77
63
 
78
64
  {{ unit("skills/structured-protocol") }}
@@ -1,38 +1,33 @@
1
1
  ---
2
2
  name: "llman-sdd-ff"
3
- description: "Fast-forward: create the planning shell then Branch binding + Specs landing in one pass. Never author under changes/<id>/specs/."
3
+ description: "Fast-forward the propose path in one pass: planning docs → bind branch → land specs."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Fast-Forward (FF)
9
9
 
10
- Run the propose-equivalent path quickly: planning shell → Branch binding → Specs landing (through `readyToImplement=true`). This is **not** the old `changes/<id>/specs/` delta model.
10
+ Run the propose-equivalent path quickly: planning docs → bind branch → land specs (through the specs-landed gate). This is **not** the old `changes/<id>/specs/` delta model.
11
11
 
12
12
  ## Hard constraints
13
13
 
14
- - **Planning shell** only under `llmanspec/changes/<id>/` (proposal/design/tasks).
15
- - Live contracts only under bound-branch `llmanspec/specs/**` (Specs landing).
16
- - **Do not** create `llmanspec/changes/<id>/specs/` or `*.feature.delta.toon`.
17
- - Enter apply only when `readyToImplement=true`.
14
+ - Planning docs only under `llmanspec/changes/<id>/` (proposal/design/tasks); specs only under bound-branch `llmanspec/specs/**`.
15
+ - **Do not** create `llmanspec/changes/<id>/specs/`.
16
+ - Enter apply when `stage=full` and the specs-landed gate passes (or `needs_specs_change: false`); verify/finalize require `readyToImplement=true`.
18
17
 
19
18
  ## Steps
20
19
 
21
- 1. Ask the user for a short description, change id (or derive), impacted capability, and confirm the final id.
20
+ 1. Take a one-line description; derive the change id when not supplied and announce it (non-blocking, same rule as propose); identify the impacted capability.
22
21
  2. Ensure `llman-sdd init` has been run (`llmanspec/` exists).
23
22
  3. If `llmanspec/changes/<id>/` exists: ask fill-missing vs new id; do not overwrite without confirmation.
24
- 4. Create the **planning shell** (OK briefly on the default branch):
25
- - `llman-sdd change new <id>` (or hand-write) → flesh out `proposal.md`
26
- - `design.md` (if needed)
27
- - `tasks.md`
28
- 5. **Branch binding**: `llman-sdd change start <id>` (clean tree on default branch) or create a branch then `change attach <id>`.
29
- 6. **Specs landing**: on the bound branch, edit live `llmanspec/specs/<capability>.feature` (flat, or directory main file) and commit; or set `needs_specs_change: false` when there is no contract edit.
30
- 7. Validate: `llman-sdd validate <id> --strict --no-interactive`.
31
- 8. Confirm `readyToImplement=true` via `llman-sdd show <id> --json`, then suggest `llman-sdd-apply` (do not suggest apply before ready).
23
+ 4. Create the planning docs (OK briefly on the default branch): `llman-sdd change new <id>` (or hand-write) → flesh out `proposal.md` → `design.md` (if needed) → `tasks.md`.
24
+ 5. **Bind the branch**: `llman-sdd change start <id>` (clean tree on the default branch) or create a branch then `change attach <id>`.
25
+ 6. **Land specs**: on the bound branch, edit `llmanspec/specs/<capability>.feature` (flat, or directory main file) and commit; or set `needs_specs_change: false` when there is no contract edit.
26
+ 7. Validate: `llman-sdd validate <id> --strict`.
27
+ 8. Confirm the specs-landed gate is green via `llman-sdd show <id> --output json` (`specsLanded` / `needsSpecsChange`), then suggest `llman-sdd-apply` (do not suggest apply before landing).
32
28
 
33
29
  {{ unit("skills/git-native-flow-brief") }}
34
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
35
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
30
+ {{ unit("skills/cli-footer") }}
36
31
  {{ unit("skills/validation-hints") }}
37
32
 
38
33
  {{ unit("skills/ethics-governance") }}
@@ -1,30 +1,17 @@
1
1
  ---
2
2
  name: "llman-sdd-graph"
3
- description: "Visualize llman SDD change dependency relationships as a mermaid graph. Use to understand blocking and depends_on relationships for planning or inspection. Auxiliary tool — not part of the main implementation pipeline."
3
+ description: "Visualize change dependencies (depends_on/blocks) as a mermaid graph. Auxiliary tool, usable at any stage."
4
4
  metadata:
5
5
  version: "{{ llman_version }}"
6
6
  ---
7
7
 
8
8
  # LLMAN SDD Dependency Graph
9
9
 
10
- Use this skill to visualize dependencies between changes.
11
-
12
- ## Pipeline Position
13
-
14
- ```mermaid
15
- flowchart LR
16
- pipeline["Main pipeline:<br/>propose → apply → verify → archive"]
17
- graph["📎 llman-sdd-graph<br/>Dependency visualization (utility)"]
18
- graph -.->|available at any stage| pipeline
19
-
20
- style graph fill:#e8f4e8,stroke:#28a745,stroke-width:2px
21
- ```
22
-
23
- > 📎 Utility tool, available at any pipeline stage. To propose → `llman-sdd-propose`. To implement → `llman-sdd-apply` only when `readyToImplement=true`.
10
+ Visualize dependencies between changes. Auxiliary tool, not part of the main pipeline (propose → apply → verify → archive); usable at any stage.
24
11
 
25
12
  ## Usage
26
13
 
27
- **Focus view (seed mode):** Show a specific change and its relationship neighborhood.
14
+ **Focus view (seed mode)** — a specific change and its neighborhood:
28
15
 
29
16
  ```bash
30
17
  llman-sdd graph <change-id> # the change + direct relationships (depth 1)
@@ -32,27 +19,28 @@ llman-sdd graph <change-id> --depth 3 # recurse 3 levels
32
19
  llman-sdd graph <change-id> --depth 0 # just the change itself
33
20
  ```
34
21
 
35
- Seed mode traverses three directions: upstream (depends_on), downstream (depended by), and blocks, automatically discovering active and archived changes.
22
+ Traverses three directions: upstream (depends_on), downstream (depended by), and blocks; auto-discovers active and archived changes.
36
23
 
37
- **Global view (scope mode):** Show all changes by scope.
24
+ **Global view (scope mode)** — scope nodes are roots expanded one level along `depends_on` (depth 1, default; avoids unbounded dependency chains); `--depth` constrains this mode too:
38
25
 
39
26
  ```bash
40
- llman-sdd graph # all active changes (default)
41
- llman-sdd graph --scope archived # all archived (completed) changes
42
- llman-sdd graph --scope all # everything
27
+ llman-sdd graph # active changes + direct deps (depth 1 default)
28
+ llman-sdd graph --scope archived # archived + direct deps
29
+ llman-sdd graph --scope all # everything + direct deps
30
+ llman-sdd graph --depth 0 # scope nodes only (no dependency targets)
31
+ llman-sdd graph --depth 3 # recurse 3 levels along dependency chains
43
32
  ```
44
33
 
45
34
  ## Output
46
35
 
47
- - Output is a mermaid flowchart to stdout, pipeable to a file or renderer:
36
+ - Mermaid flowchart to stdout, pipeable to a file or renderer:
48
37
  ```
49
38
  llman-sdd graph c50 > deps.mmd
50
39
  llman-sdd graph c50 --depth 2 | mmdc -i - -o deps.png
51
40
  ```
52
- - Archived (completed) changes are shown with "✓ done" suffix and green highlight.
53
- - When the graph contains disconnected groups, each group renders as an independent subgraph labeled "Active", "Done", or "Mixed".
41
+ - Archived changes show a "✓ done" suffix and green highlight; disconnected groups render as independent subgraphs labeled "Active" / "Done" / "Mixed".
54
42
 
55
- ## Proposal frontmatter format
43
+ ## Declaring dependencies (proposal frontmatter)
56
44
 
57
45
  ```yaml
58
46
  ---
@@ -61,14 +49,8 @@ depends_on:
61
49
  blocks:
62
50
  - blocked-change-id
63
51
  ---
64
-
65
- ## Why
66
- ...
67
52
  ```
68
53
 
69
- > 💡 This is just a utility — main flow: `llman-sdd-propose` (Branch binding + Specs landing) → `llman-sdd-apply` (requires `readyToImplement`) → `llman-sdd-verify` → `llman-sdd-archive`.
70
-
71
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
72
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
54
+ {{ unit("skills/cli-footer") }}
73
55
 
74
56
  {{ unit("skills/ethics-governance") }}
@@ -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") }}