@llman-sdd/core 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/archive/freeze.ts +86 -18
- package/src/archive/frozenCard.ts +105 -0
- package/src/archive/sevenzip.ts +15 -13
- package/src/change/closeOutHarness.ts +29 -0
- package/src/change/collect.ts +140 -0
- package/src/change/frontmatter.ts +48 -6
- package/src/change/id.ts +2 -6
- package/src/change/lifecycle.ts +285 -86
- package/src/change/nextId.ts +63 -2
- package/src/change/resolve.ts +2 -2
- package/src/change/tasks.ts +59 -0
- package/src/config/changeId.ts +14 -12
- package/src/config/load.ts +14 -0
- package/src/config/schema.ts +4 -41
- package/src/config/surface.ts +6 -36
- package/src/context/indexStore.ts +7 -3
- package/src/context/retrieve.ts +8 -10
- package/src/context/tree.ts +28 -24
- package/src/git/spawnGit.ts +90 -2
- package/src/index.ts +67 -59
- package/src/init/defaultConfig.ts +1 -5
- package/src/init/init.ts +19 -4
- package/src/ports.ts +1 -7
- package/src/project/migrateNotes.ts +104 -0
- package/src/render/machine.ts +30 -0
- package/src/report/collect.ts +11 -127
- package/src/report/graph/analysis.ts +152 -0
- package/src/report/graph/deps.ts +30 -0
- package/src/report/graph/graphData.ts +53 -0
- package/src/report/graph/nodes.ts +130 -0
- package/src/report/graph/render.ts +83 -0
- package/src/report/graph/types.ts +47 -0
- package/src/report/graph.ts +9 -381
- package/src/report/show.ts +20 -22
- package/src/report/specHelpers.ts +42 -21
- package/src/report/specs.ts +23 -25
- package/src/review/review.ts +45 -30
- package/src/spec/authoring.ts +91 -63
- package/src/spec/ir.ts +43 -15
- package/src/spec/migrateNative.ts +167 -0
- package/src/spec/parser.ts +73 -77
- package/src/spec/reqRegistry.ts +8 -9
- package/src/templates/embedded.ts +10 -16
- package/src/templates/engine.ts +10 -5
- package/src/templates/locale.ts +1 -1
- package/src/templates/skills.ts +4 -5
- package/src/validation/changeCheck.ts +128 -105
- package/src/validation/harness.ts +161 -0
- package/src/validation/staleness.ts +9 -5
- package/src/validation/validate.ts +60 -88
- package/templates/en/skills/llman-sdd-apply-cycle.md +20 -28
- package/templates/en/skills/llman-sdd-apply.md +58 -76
- package/templates/en/skills/llman-sdd-arch-review.md +12 -19
- package/templates/en/skills/llman-sdd-archive.md +27 -42
- package/templates/en/skills/llman-sdd-continue.md +17 -24
- package/templates/en/skills/llman-sdd-draft.md +17 -28
- package/templates/en/skills/llman-sdd-explore.md +29 -43
- package/templates/en/skills/llman-sdd-ff.md +12 -17
- package/templates/en/skills/llman-sdd-graph.md +14 -32
- package/templates/en/skills/llman-sdd-propose.md +48 -63
- package/templates/en/skills/llman-sdd-quick.md +12 -27
- package/templates/en/skills/llman-sdd-research.md +13 -24
- package/templates/en/skills/llman-sdd-specs-compact.md +14 -39
- package/templates/en/skills/llman-sdd-validate.md +11 -15
- package/templates/en/skills/llman-sdd-verify.md +23 -44
- package/templates/en/skills/llman-sdd-wayfinder.md +18 -22
- package/templates/en/units/skills/cli-footer.md +2 -0
- package/templates/en/units/skills/git-native-flow-brief.md +7 -6
- package/templates/en/units/skills/git-native-flow.md +21 -11
- package/templates/en/units/skills/human-readable-summary.md +2 -3
- package/templates/en/units/skills/stage-guard.md +7 -7
- package/templates/en/units/skills/structured-protocol.md +5 -8
- package/templates/en/units/skills/validation-hints.md +10 -14
- package/templates/en/units/spec/feature-contract.md +27 -16
- package/templates/en/units/workflow/archive-freeze-guidance.md +6 -3
- package/templates/zh-Hans/skills/llman-sdd-apply-cycle.md +23 -31
- package/templates/zh-Hans/skills/llman-sdd-apply.md +63 -81
- package/templates/zh-Hans/skills/llman-sdd-arch-review.md +21 -28
- package/templates/zh-Hans/skills/llman-sdd-archive.md +29 -44
- package/templates/zh-Hans/skills/llman-sdd-continue.md +17 -24
- package/templates/zh-Hans/skills/llman-sdd-draft.md +18 -29
- package/templates/zh-Hans/skills/llman-sdd-explore.md +34 -48
- package/templates/zh-Hans/skills/llman-sdd-ff.md +13 -18
- package/templates/zh-Hans/skills/llman-sdd-graph.md +16 -34
- package/templates/zh-Hans/skills/llman-sdd-propose.md +51 -65
- package/templates/zh-Hans/skills/llman-sdd-quick.md +15 -30
- package/templates/zh-Hans/skills/llman-sdd-research.md +17 -28
- package/templates/zh-Hans/skills/llman-sdd-specs-compact.md +15 -40
- package/templates/zh-Hans/skills/llman-sdd-validate.md +11 -15
- package/templates/zh-Hans/skills/llman-sdd-verify.md +26 -47
- package/templates/zh-Hans/skills/llman-sdd-wayfinder.md +25 -29
- package/templates/zh-Hans/units/skills/cli-footer.md +2 -0
- package/templates/zh-Hans/units/skills/git-native-flow-brief.md +7 -6
- package/templates/zh-Hans/units/skills/git-native-flow.md +22 -12
- package/templates/zh-Hans/units/skills/human-readable-summary.md +4 -5
- package/templates/zh-Hans/units/skills/stage-guard.md +9 -9
- package/templates/zh-Hans/units/skills/structured-protocol.md +5 -8
- package/templates/zh-Hans/units/skills/validation-hints.md +10 -14
- package/templates/zh-Hans/units/spec/feature-contract.md +25 -16
- package/templates/zh-Hans/units/workflow/archive-freeze-guidance.md +6 -2
- package/templates/en/skills/llman-sdd-onboard.md +0 -34
- package/templates/en/skills/llman-sdd-show.md +0 -24
- package/templates/en/units/migrate-prompt.md +0 -28
- package/templates/zh-Hans/skills/llman-sdd-onboard.md +0 -34
- package/templates/zh-Hans/skills/llman-sdd-show.md +0 -24
- package/templates/zh-Hans/units/migrate-prompt.md +0 -28
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-wayfinder"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Break huge, foggy work (beyond one agent session) into a decision map, resolving decisions one at a time. Manual trigger only."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
|
+
disable-model-invocation: true
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# LLMAN SDD Wayfinder
|
|
9
10
|
|
|
10
|
-
A loose, large idea has arrived — too big for a single agent session,
|
|
11
|
-
|
|
12
|
-
It charts the path as an llman SDD **change dependency graph** (`llman-sdd graph`): each sub-work (ticket) resolves a **decision** rather than delivering a slice, worked one at a time until the way is clear.
|
|
11
|
+
A loose, large idea has arrived — too big for a single agent session, and the way from here to the **destination** isn't visible yet. This skill finds that way rather than charging ahead: it charts the path as a change dependency graph (`llman-sdd graph`), where each sub-work item (ticket) resolves a **decision** rather than delivering code, worked one at a time until the way is clear.
|
|
13
12
|
|
|
14
13
|
## Pipeline position
|
|
15
14
|
|
|
16
|
-
Auxiliary tool
|
|
17
|
-
|
|
18
|
-
> 📍 Standalone optional skill; when the map clears → `llman-sdd-propose` (collapse decisions into a buildable plan).
|
|
15
|
+
Auxiliary tool for **pre-planning large work** before the main pipeline. When the map clears → `llman-sdd-propose` to collapse decisions into an implementable plan.
|
|
19
16
|
|
|
20
17
|
## Core principles
|
|
21
18
|
|
|
22
19
|
- **Plan, don't do**: each ticket resolves a decision; the map is done when "the way is clear, no decisions left". The urge to just do the work is usually the signal you've reached the map's edge and should hand off.
|
|
23
|
-
- **Refer by name**: in
|
|
24
|
-
- **One session, one ticket
|
|
20
|
+
- **Refer by name**: in human-readable narration, refer to a ticket by its title; MUST NOT use bare ids/numbers.
|
|
21
|
+
- **One session, one ticket** (research tickets excepted).
|
|
25
22
|
|
|
26
23
|
## Map structure
|
|
27
24
|
|
|
@@ -34,7 +31,7 @@ The map's `proposal.md` structure:
|
|
|
34
31
|
<what reaching the end looks like — spec/decision/change. One or two lines.>
|
|
35
32
|
|
|
36
33
|
## Notes
|
|
37
|
-
<domain; skills each session should consult; standing preferences
|
|
34
|
+
<domain; skills each session should consult; standing preferences>
|
|
38
35
|
|
|
39
36
|
## Decisions so far
|
|
40
37
|
<!-- index: one line per closed ticket, gist + link -->
|
|
@@ -52,36 +49,35 @@ Each ticket is a child change carrying a `wayfinder:<type>` tag (in the proposal
|
|
|
52
49
|
|
|
53
50
|
- **Research (agent-driven)**: read docs/APIs/local resources to surface a fact a decision waits on. Delegate to `llman-sdd-research` in the background.
|
|
54
51
|
- **Prototype (human-in-the-loop)**: raise fidelity with a cheap, rough runnable (throwaway terminal app or UI variant).
|
|
55
|
-
- **
|
|
52
|
+
- **Deep-dive Q&A (human-in-the-loop)**: via `llman-sdd-explore`'s deep-dive branch, one question at a time. **Default type**.
|
|
56
53
|
- **Task (human or agent)**: manual work that must happen before a decision can be made (sign up for a service, move data so its shape is visible).
|
|
57
54
|
|
|
58
55
|
## Fog of war
|
|
59
56
|
|
|
60
57
|
The map is **deliberately** incomplete. The test for ticket-vs-fog: **can you state the question precisely now** (not whether you can answer it).
|
|
61
58
|
- Can state precisely → ticket (even if blocked).
|
|
62
|
-
- Cannot yet
|
|
59
|
+
- Cannot yet → **Not yet specified** (coarser than a ticket; one fog patch may graduate into several tickets or none).
|
|
63
60
|
|
|
64
61
|
## Steps
|
|
65
62
|
|
|
66
63
|
### Chart the map
|
|
67
|
-
1. **Name the destination**: use
|
|
68
|
-
2. **Breadth-first scan**:
|
|
64
|
+
1. **Name the destination**: use the deep-dive Q&A branch to pin down what this map is finding its way to.
|
|
65
|
+
2. **Breadth-first scan**: deep-dive again, fanning out rather than drilling one thread, surfacing open decisions and the first takeable steps. If **no fog surfaces** — the way is already clear, the whole effort fits one session — you don't need a map; stop and ask the user how to proceed.
|
|
69
66
|
3. **Create the map** (overview change): `llman-sdd change new <map-id>`, fill Destination/Notes, leave Decisions-so-far empty, write fog into Not yet specified.
|
|
70
|
-
4. **Create the tickets you can specify now** as child changes, then wire blocking edges with `llman-sdd graph` (
|
|
67
|
+
4. **Create the tickets you can specify now** as child changes, then wire blocking edges with `llman-sdd graph` (ids needed before cross-referencing).
|
|
71
68
|
5. Spin up `llman-sdd-research` background subagents for each research ticket.
|
|
72
69
|
6. Stop — charting is one session's work; resolve nothing by hand.
|
|
73
70
|
|
|
74
71
|
### Work through the map
|
|
75
|
-
1. Load the map (low-resolution view).
|
|
76
|
-
2. Pick a ticket (user-named or first frontier item); claim it
|
|
77
|
-
3. Resolve it — zoom as needed (read related ticket bodies, invoke skills the Notes block names). In doubt, use
|
|
72
|
+
1. Load the map (low-resolution view; don't read every ticket in full).
|
|
73
|
+
2. Pick a ticket (user-named or first frontier item); claim it by binding the branch (`change start`, or `change attach` if the branch exists). Planning docs may briefly live on the default branch; if the ticket must edit specs, land them on the bound branch.
|
|
74
|
+
3. Resolve it — zoom as needed (read related ticket bodies, invoke the skills the Notes block names). In doubt, use the deep-dive Q&A. **Do not** edit `llmanspec/specs/**` before binding.
|
|
78
75
|
4. Record the resolution: write the answer into the ticket's proposal, close it, append a one-line gist + pointer to the map's Decisions-so-far.
|
|
79
|
-
5. Add newly-surfaced tickets (create-then-wire); graduate fog
|
|
76
|
+
5. Add newly-surfaced tickets (create-then-wire); graduate fog the answer made specifiable out of Not yet specified; if the answer reveals a ticket sits beyond the destination, rule it out of scope rather than resolving it on the route.
|
|
80
77
|
|
|
81
78
|
## Output
|
|
82
|
-
Map change + child decision changes' dependency graph (`llman-sdd graph`). When the way is clear, proceed to `llman-sdd-propose`
|
|
79
|
+
Map change + child decision changes' dependency graph (`llman-sdd graph`). When the way is clear, proceed to `llman-sdd-propose` to collapse decisions into an implementable plan.
|
|
83
80
|
|
|
84
|
-
|
|
85
|
-
> "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
|
|
81
|
+
{{ unit("skills/cli-footer") }}
|
|
86
82
|
|
|
87
83
|
{{ unit("skills/structured-protocol") }}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Branch lifecycle (brief)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Skill navigation** ≠ **branch lifecycle**. Full diagram: root `AGENTS.md` or the one inside `llman-sdd-propose`.
|
|
4
4
|
|
|
5
5
|
Hard rules:
|
|
6
|
-
1. **First**
|
|
7
|
-
2. No
|
|
8
|
-
3. Close-out: `change finalize` (auto commit `archive(sdd): <id>`; `--no-commit` to skip).
|
|
9
|
-
4. **Do not** commit
|
|
6
|
+
1. **First** bind the branch (`change start` / `attach`) → full; **then** land specs (edit and commit `llmanspec/specs/**` on the bound branch).
|
|
7
|
+
2. No contract edits → `needs_specs_change: false`. Enter apply when `stage=full` and the specs-landed gate passes; `readyToImplement=true` (all gates green) is the completion signal gating verify/finalize.
|
|
8
|
+
3. Close-out: `change finalize` (auto commit `archive(sdd): <id>`; `--no-commit` to skip).
|
|
9
|
+
4. **Do not** commit specs on the default branch; if already attached, do not re-run `start`.
|
|
10
|
+
5. Worktree (optional): `change start --worktree` creates the branch in a dedicated worktree without hijacking the current checkout (`--base <branch>` records a non-default fork source); finalize runs in place when the target is held by another worktree (location annotated in output).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Branch lifecycle (full diagram)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Two layers, don't conflate them: the **branch lifecycle** (bind branch → land specs → `readyToImplement`) vs **skill navigation** (explore→propose→apply→verify→archive). Landing specs is **not** a separate skill.
|
|
4
4
|
|
|
5
5
|
```mermaid
|
|
6
6
|
flowchart TB
|
|
@@ -10,21 +10,21 @@ flowchart TB
|
|
|
10
10
|
B2["add tasks.md → planned"]
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
subgraph
|
|
13
|
+
subgraph bind["Bind branch"]
|
|
14
14
|
C{"Clean tree<br/>and on default branch?"}
|
|
15
15
|
D["change start<br/>create sdd/<id> + write branch/base_branch/base_sha"]
|
|
16
16
|
E["or manual checkout -b<br/>then change attach"]
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
subgraph specs_only["Only on this change branch"]
|
|
20
|
-
F["Edit
|
|
21
|
-
G["commit →
|
|
20
|
+
F["Edit llmanspec/specs/** (.feature)"]
|
|
21
|
+
G["commit → land specs<br/>live merge-base...HEAD includes specs paths"]
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
subgraph implement["Implement"]
|
|
24
|
+
subgraph implement["Implement & close"]
|
|
25
25
|
H["apply: code per tasks<br/>may keep editing specs"]
|
|
26
26
|
I["verify"]
|
|
27
|
-
J["finalize
|
|
27
|
+
J["finalize: merge (squash default) → rename → auto commit archive(sdd): <id><br/>specs first hit the target branch"]
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
A --> B1 --> B2 --> C
|
|
@@ -34,7 +34,17 @@ flowchart TB
|
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Hard rules:
|
|
37
|
-
1. **First** `change start` / `attach`
|
|
38
|
-
2.
|
|
39
|
-
3.
|
|
40
|
-
4. **Do not** commit
|
|
37
|
+
1. **First** `change start` / `attach` to bind the branch (enter full); **then** edit `llmanspec/specs/**` on the bound non-default branch and commit (land specs).
|
|
38
|
+
2. No contract edits → set frontmatter `needs_specs_change: false`. Enter apply when `stage=full` and the specs-landed gate passes (specsLanded ∨ needs_specs_change=false); `readyToImplement=true` (every gateChecks item green, incl. tasks-done) is the completion signal gating verify/finalize. Diff ranges are always live merge-bases; the stored `base_sha` is audit-only.
|
|
39
|
+
3. Close-out is `llman-sdd change finalize <id>`: it auto-commits `archive(sdd): <id>` (impl diff + rename in one commit); `--no-commit` skips the auto commit. Commits on the change branch are free (segmented or finalize single-shot).
|
|
40
|
+
4. **Do not** commit specs to the default branch just to satisfy the clean-tree gate; if already attached, do not re-run `start`.
|
|
41
|
+
|
|
42
|
+
Worktree decision table:
|
|
43
|
+
|
|
44
|
+
| Working style | Command | Criteria |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| Single checkout | `llman-sdd change start <id>` | On the default branch with a clean tree; switches this checkout to the new branch |
|
|
47
|
+
| Keep current checkout / parallel changes | `llman-sdd change start <id> --worktree` | Branch lives in a dedicated worktree (`sdd.worktree_root` / `sdd.worktree_naming` config; default sibling of the repo root), current checkout untouched, output includes the worktree path; pair with `--base <branch>` for a non-default fork source |
|
|
48
|
+
| Already on a feature branch (incl. manual wt/git-worktree) | `llman-sdd change attach <id>` | Branch already exists; `--base <branch>` records the fork source explicitly |
|
|
49
|
+
|
|
50
|
+
finalize target location: when the target branch is held by another worktree, `llman-sdd change finalize <id>` / `llman-sdd change archive <id>` run the merge, rename and commit inside that worktree (output includes `executed in target worktree <path>`); a dirty holding worktree aborts with disposal options and zero writes.
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# Human-Readable Summary (mandatory)
|
|
2
2
|
|
|
3
|
-
Every report, handoff, or gate output
|
|
4
|
-
with a short human-readable summary block before any machine detail:
|
|
3
|
+
Every report, handoff, or gate output MUST open with a short human-readable summary before any machine detail:
|
|
5
4
|
|
|
6
5
|
- **Verdict** — one line (e.g. "all gates green" / "2 CRITICAL found").
|
|
7
6
|
- **Risks** — up to three bullets, highest impact first.
|
|
8
7
|
- **Decisions needed** — explicit asks, or "none".
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Under ten lines; details below the fold.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
## Stage guard (`stage` / `readyToImplement`)
|
|
2
2
|
|
|
3
|
-
Decide from authoritative JSON (never from
|
|
3
|
+
Decide from authoritative JSON (never from "artifacts look complete"):
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
llman-sdd show <id> --json --type change
|
|
6
|
+
llman-sdd show <id> --output json --type change
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Read: `stage`, `specsLanded`, `needsSpecsChange`, `readyToImplement`, `gateChecks` (per-item `pass` + one-line `hint` when failing).
|
|
10
10
|
|
|
11
11
|
| Condition | Action |
|
|
12
12
|
|-----------|--------|
|
|
13
|
-
| `stage=draft` (proposal.md only) | STOP. Grow
|
|
14
|
-
| `stage=designed` (proposal + design) | Next: add tasks.md → `planned`.
|
|
15
|
-
| `stage=planned` (proposal + design + tasks) | STOP until
|
|
16
|
-
| `stage=full` and `readyToImplement=false` |
|
|
17
|
-
| `readyToImplement=true` |
|
|
13
|
+
| `stage=draft` (proposal.md only) | STOP. Grow: add design.md → designed, add tasks.md → planned, then bind the branch and land specs. Draft cannot apply/verify. If proposal+tasks exist but stage is still `draft` (tasks-without-design — design.md gates the stage): add design.md first. **Do not** create `changes/<id>/specs/`; **do not** edit specs on the default branch first. |
|
|
14
|
+
| `stage=designed` (proposal + design) | Next: add tasks.md → `planned`. Bind (`change start` / `attach`) only after planning docs are complete. |
|
|
15
|
+
| `stage=planned` (proposal + design + tasks) | STOP until bound: `change start` / `attach` → `full`. |
|
|
16
|
+
| `stage=full` and `readyToImplement=false` | Read the failing `gateChecks` items. specs-landed gate failing → land specs on the **bound branch** (edit `llmanspec/specs/**` and commit), or set `needs_specs_change: false`; **do not** re-run `change start` (lost bound-branch specs → checkout/recreate + `attach --force` if needed). specs-landed gate green but tasks-done/validate/clean-tree failing → normal mid-implementation state: proceed with apply (check off tasks); do not treat it as a landing failure. |
|
|
17
|
+
| `readyToImplement=true` | Completion signal: every gateChecks item green (tasks done + validate passed) — verify/finalize prerequisites met. `changes/<id>/specs/` is expected to be **absent** — do not treat as missing. |
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
## Context
|
|
2
|
-
- Check state before acting: change/spec status comes from `llman-sdd show/list/validate`
|
|
3
|
-
- Locate relevant specs with `llman-sdd context --task --paths` before reading spec files.
|
|
2
|
+
- Check state before acting: change/spec status comes from `llman-sdd show/list/validate`; locate relevant specs with `llman-sdd context --task --paths` before reading spec files.
|
|
4
3
|
|
|
5
4
|
## Goal
|
|
6
|
-
- Reach one verifiable outcome
|
|
5
|
+
- Reach one verifiable outcome; report result paths and validation state.
|
|
7
6
|
|
|
8
7
|
## Constraints
|
|
9
|
-
- Follow the hard rules
|
|
10
|
-
- Keep changes minimal; never force past a known validation failure.
|
|
8
|
+
- Follow the skill body's hard rules (not repeated here). Classify first: behavior-contract changes take the full SDD path, implementation-only changes take quick; when unsure choose full SDD. Keep changes minimal; never force past a known validation failure.
|
|
11
9
|
|
|
12
10
|
## Workflow
|
|
13
|
-
- Treat `llman-sdd` command output as the source of truth at every step; run `llman-sdd validate` after touching artifacts.
|
|
14
|
-
- Command details: the generated command reference below, or `llman-sdd <cmd> --help`.
|
|
11
|
+
- Treat `llman-sdd` command output as the source of truth at every step; run `llman-sdd validate` after touching artifacts. Command details: `llman-sdd <cmd> --help`.
|
|
15
12
|
|
|
16
13
|
## Decision Policy
|
|
17
14
|
- Clarify high-impact ambiguity before proceeding; verify facts yourself, ask the user only for decisions.
|
|
18
15
|
|
|
19
16
|
## Output Contract
|
|
20
|
-
- Human-readable summary first (
|
|
17
|
+
- Human-readable summary first (verdict / risks / decisions needed), machine detail after.
|
|
21
18
|
|
|
22
19
|
## Ethics Governance
|
|
23
20
|
- `ethics.risk_level`: low — reads/writes this repo and `llmanspec/` only, no outward-facing actions; a skill body may override.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Validation fixes (single-track feature-as-spec):
|
|
2
2
|
|
|
3
|
-
1) Missing header comments (`missing
|
|
4
|
-
Every capability `.feature` (`llmanspec/specs/<capability>.feature` or `llmanspec/specs/<capability>/<capability>.feature`) MUST start with:
|
|
3
|
+
1) Missing header comments (`missing # capability: header comment`): every capability `.feature` (`llmanspec/specs/<capability>.feature` or the same-named main file in a directory) MUST start with:
|
|
5
4
|
```
|
|
6
5
|
# language: zh-CN
|
|
7
6
|
# capability: <capability>
|
|
@@ -9,16 +8,13 @@ Every capability `.feature` (`llmanspec/specs/<capability>.feature` or `llmanspe
|
|
|
9
8
|
# scope: src/
|
|
10
9
|
```
|
|
11
10
|
|
|
12
|
-
2)
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
11
|
+
2) Native layout (`rule must carry an @req:<req_id> tag on the rule header`):
|
|
12
|
+
- One canonical style: `@req:<id>` on the `规则:` block header, nested `场景:` (Given/When/Then) as executable examples — the default preferred shape.
|
|
13
|
+
- Only keep a `规则:` block with no nested scenario (bare rule) for requirements that cannot be expressed programmatically or are not yet converted: free-text description, no MUST/SHALL enforcement; validate reports an aggregate count, the review `pending` signal measures it, specs-compact keeps reducing it.
|
|
14
|
+
- Legacy tags `@executable`/`@rule`/`@human`/`@manual` are gone and parse inert; when old files hit structural problems run `llman-sdd spec migrate-native`.
|
|
15
|
+
- Top-level `场景:` outside any `规则:` are plain feature-level examples: no rule handle, no warning, not part of rule accounting (native Gherkin).
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- **Branch binding** → **Specs landing**: first `change start` / `attach`, then edit live `.feature` files on the bound non-default branch and commit.
|
|
22
|
-
- Locked rules (report-only): editing/removing an existing `@human` scenario yields a WARNING and never blocks validate / change finalize / change diff; the report names the edited rule by `@req:<id>`. Control points: git branch diff plus `llman-sdd review` / `change diff` output. Legacy lock-ack metadata (frontmatter `rules_touched` / `agent_acked`, the `@agent` tag, the `--yes` ack semantics) is fully removed — no aliases, no compat layer (locked rules are report-only: a warning, never a block).
|
|
23
|
-
- Apply requires `readyToImplement=true` (or `needs_specs_change: false`). Close-out prefers `change finalize`.
|
|
24
|
-
- Do not use `change delta` / solidify / `*.feature.delta.toon`.
|
|
17
|
+
Branch guardrail:
|
|
18
|
+
- First `change start` / `attach` to bind the branch, then edit `.feature` on the bound non-default branch and commit (land specs).
|
|
19
|
+
- Locked rules (report-only): editing/removing an existing `规则:` block yields a WARNING and never blocks validate / finalize / `change diff`; the report names the rule by `@req:<id>`. Control points: git branch diff plus `llman-sdd review` / `change diff`. Legacy lock-ack metadata (frontmatter `rules_touched` / `agent_acked`, the `@agent` tag, the `--yes` ack semantics) is fully removed — no aliases, no compat layer.
|
|
20
|
+
- Enter apply when `stage=full` and the specs-landed gate passes (specsLanded ∨ `needs_specs_change: false`); verify/finalize require `readyToImplement=true` (completion signal). Close-out prefers `change finalize`.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
## Canonical Single-Track Feature Contract
|
|
1
|
+
## Canonical Single-Track Feature Contract (native Gherkin layout)
|
|
2
2
|
|
|
3
|
-
Each capability is ONE Gherkin file: flat `llmanspec/specs/<capability>.feature` (default) or directory `llmanspec/specs/<capability>/` with a same-named main file — pick one layout
|
|
4
|
-
|
|
3
|
+
Each capability is ONE Gherkin file: flat `llmanspec/specs/<capability>.feature` (default) or directory `llmanspec/specs/<capability>/` with a same-named main file — pick one layout; both at once is a conflict. It is the only spec artifact (there is no `spec.toon`).
|
|
4
|
+
|
|
5
|
+
The format is the **native Gherkin hierarchy**: `功能:` → `规则:` (the requirement: title + free-form description + `@req:<id>` handle) → nested `场景:` (executable GWT examples). This is the only canonical style; legacy tags (`@executable`/`@rule`/`@human`/`@manual`) are gone — migrate old files with `spec migrate-native`.
|
|
5
6
|
|
|
6
7
|
```gherkin
|
|
7
8
|
# language: zh-CN
|
|
@@ -11,19 +12,29 @@ It is the only spec artifact — there is no `spec.toon`.
|
|
|
11
12
|
|
|
12
13
|
功能: sample
|
|
13
14
|
|
|
14
|
-
@req:r1
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
@req:r1
|
|
16
|
+
规则: A requirement point
|
|
17
|
+
Free-text requirement (no MUST/SHALL enforcement); wrap long text across
|
|
18
|
+
lines for human/agent readability. A description line must not begin with
|
|
19
|
+
a step keyword (would be parsed as a step).
|
|
20
|
+
|
|
21
|
+
场景: An executable example
|
|
22
|
+
假如 a precondition
|
|
23
|
+
当 a trigger happens
|
|
24
|
+
那么 the outcome is observed
|
|
17
25
|
|
|
18
|
-
@req:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
@req:r2
|
|
27
|
+
规则: Not-yet-converted requirement (bare rule — counted by the aggregate nudges)
|
|
28
|
+
This description is the only carrier of the requirement today. Rules with
|
|
29
|
+
no nested scenario are counted as bare; specs-compact keeps driving them
|
|
30
|
+
down or converting them.
|
|
23
31
|
```
|
|
24
32
|
|
|
25
|
-
- Header comments (`# capability:` / `# purpose:` / `# scope:`) are REQUIRED; `scope` drives staleness.
|
|
26
|
-
-
|
|
27
|
-
- `@
|
|
28
|
-
-
|
|
29
|
-
-
|
|
33
|
+
- Header comments (`# capability:` / `# purpose:` / `# scope:`) are REQUIRED; `scope` drives staleness checks.
|
|
34
|
+
- **Executable scenarios preferred**: express behavior as nested `场景:` (`Given/When/Then`) bound to BDD step code and executed by the runner — the default. Only use a `规则:` block without executable scenarios for requirements that cannot be expressed programmatically (abstract goals, architecture decisions, governance/human judgment) or are not yet converted; record the rationale in proposal/design.
|
|
35
|
+
- `@req:<id>` lives on the `规则:` block header: the global unique requirement handle (shared by resolve-req/next-req-id/citation). Missing or duplicate ids are validate ERRORs.
|
|
36
|
+
- Rule description is free text: no MUST/SHALL enforcement; wrap long text across lines for reviewability, with no `- ` list marker (it would enter the description verbatim).
|
|
37
|
+
- Top-level `场景:` outside any `规则:` are plain feature-level examples (native Gherkin allows them; no rule handle, no warning, not part of rule accounting); rules with no nested scenario are bare rules (aggregate INFO via `--include-info`; the review `pending` signal measures them).
|
|
38
|
+
- Editing/removing an existing `规则:` block yields a WARNING only (report-only, never blocks a gate) — compare via git branch diff; the legacy lock-ack metadata `rules_touched` / `agent_acked` / `@agent` is removed with no aliases and no compat layer.
|
|
39
|
+
- Coverage tiers: enforced (has nested scenarios) / pending (bare) — `list --specs` reports both.
|
|
40
|
+
- `规则:` blocks are containers: nested `场景:` are executed by the runner; two-space indent tiers (`规则:` 2, nested `场景:` 4, steps 6).
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
## Archive Cold Backup Guidance
|
|
2
|
-
-
|
|
2
|
+
- When archived directories grow too large, use cold backup maintenance (freeze moves bodies into the 7z cold backup and replaces the dir with a flat `<YYYY-MM-DD>-<id>.yaml` index card carrying only `title` and `depends_on`):
|
|
3
3
|
- Preview freeze candidates: `llman-sdd archive freeze --dry-run`
|
|
4
4
|
- Freeze old archives: `llman-sdd archive freeze --before <YYYY-MM-DD> --keep-recent <N>`
|
|
5
|
-
-
|
|
6
|
-
-
|
|
5
|
+
- List frozen entries: `llman-sdd archive freeze --list`
|
|
6
|
+
- Restore when needed: `llman-sdd archive thaw --change <YYYY-MM-DD-id>` (extracts bodies back and removes the card)
|
|
7
|
+
- Apply freeze/thaw only to dated archive directories (`YYYY-MM-DD-*`); keep a small recent window unfrozen.
|
|
8
|
+
- The flat index card stays on disk: `title` (from the proposal H1) and `depends_on` (seed for graph dependency edges) are grep-able and traceable; the id and date are implied by the file name — the purpose and dependencies of a frozen change are inspectable without thawing, while bodies live in the 7z cold backup and are fetched on demand.
|
|
9
|
+
- Running outside the main checkout (a worktree not holding the default branch) prints a warning (never blocks) — continue there only intentionally.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-apply-cycle"
|
|
3
|
-
description: "
|
|
3
|
+
description: "单 change 端到端闭环:实施→测试→校验→verify→归档提交。仅手动触发,agent 禁止自动调用。"
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
6
|
disable-model-invocation: true
|
|
@@ -8,7 +8,7 @@ disable-model-invocation: true
|
|
|
8
8
|
|
|
9
9
|
# LLMAN SDD Apply Cycle
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
单 change 端到端闭环(手动)。须已绑定分支且 specs-landed 门通过(`specsLanded ∨ needsSpecsChange=false`);`readyToImplement=true`(完成信号)收拢闭环。
|
|
12
12
|
|
|
13
13
|
**仅手动触发**:`/skill:llman-sdd-apply-cycle <change-id>`
|
|
14
14
|
|
|
@@ -16,60 +16,52 @@ disable-model-invocation: true
|
|
|
16
16
|
|
|
17
17
|
### 0) 门禁 + 状态
|
|
18
18
|
```bash
|
|
19
|
-
llman-sdd show <change-id> --json --type change
|
|
19
|
+
llman-sdd show <change-id> --output json --type change
|
|
20
20
|
```
|
|
21
|
-
>
|
|
21
|
+
> 阶段判定用 `stage` / `readyToImplement` 字段;完整判定表见 llman-sdd-apply。
|
|
22
22
|
|
|
23
23
|
- 须在绑定的非默认分支上。
|
|
24
|
-
-
|
|
25
|
-
- 进度以 `tasks.md` checkbox 为准(或 `llman-sdd list`
|
|
24
|
+
- specs-landed 门未过 → STOP(先落地 specs 或 `needs_specs_change: false`)。已绿但 `readyToImplement=false` → 正常:tasks 待完成,继续实施;**仅当 `readyToImplement=true` 才 finalize**。
|
|
25
|
+
- 进度以 `tasks.md` checkbox 为准(或 `llman-sdd list` 任务计数);实现时仍须读 `tasks.md`、proposal/design 与绑定分支上的 `llmanspec/specs/**`(唯一事实来源)。
|
|
26
26
|
|
|
27
27
|
### 1) 循环:实施 → 测试
|
|
28
28
|
对每个未完成 task:
|
|
29
|
-
1. 按 task +
|
|
30
|
-
2.
|
|
31
|
-
3.
|
|
29
|
+
1. 按 task + specs 实现(最小改动)
|
|
30
|
+
2. task 文本写明验证命令时运行之
|
|
31
|
+
3. 失败修复重试(自修复预算同 `llman-sdd-apply`:上限 8 轮)
|
|
32
32
|
4. 勾选 `tasks.md` 为 `[x]`
|
|
33
33
|
|
|
34
34
|
### 2) 校验
|
|
35
35
|
```bash
|
|
36
|
-
llman-sdd validate <change-id> --strict
|
|
36
|
+
llman-sdd validate <change-id> --strict
|
|
37
37
|
```
|
|
38
|
-
|
|
38
|
+
失败修复重试(上限 8 轮)。
|
|
39
39
|
|
|
40
40
|
### 3) Verify(推荐)
|
|
41
41
|
优先跑 `llman-sdd-verify`(或等效双轴自检)。有 CRITICAL → STOP,勿归档。
|
|
42
42
|
|
|
43
|
-
### 4) 归档
|
|
43
|
+
### 4) 归档 + 提交
|
|
44
44
|
```bash
|
|
45
45
|
llman-sdd change finalize <change-id>
|
|
46
46
|
```
|
|
47
|
-
|
|
47
|
+
工作区可脏;自动合并(默认 squash)+ 改名 + **自动提交** `archive(sdd): <change-id>` 单进程完成。`--no-commit` 跳过自动提交(手动/CI 历史)——此时自行 `git add -A && git commit -m "archive(sdd): <change-id>"`。普通 `change archive` 保留为 fallback。
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### 5) 提交(见步骤 4)
|
|
52
|
-
finalize 已自动提交,除非传了 `--no-commit`。
|
|
53
|
-
|
|
54
|
-
### 6) 可选清理
|
|
49
|
+
### 5) 可选清理
|
|
55
50
|
```bash
|
|
56
|
-
git branch -D <feature-branch> # squash 后分支不再是 main 祖先,-d
|
|
51
|
+
git branch -D <feature-branch> # squash 后分支不再是 main 祖先,-d 会被拒
|
|
57
52
|
```
|
|
58
|
-
push /
|
|
53
|
+
push / PR 仅当用户明确要求。
|
|
59
54
|
|
|
60
55
|
## 硬约束
|
|
61
|
-
-
|
|
62
|
-
- **禁止切换**其他 change,直到本 change
|
|
63
|
-
-
|
|
64
|
-
- **禁止**写 `changes/<id>/specs/` 或 `change delta`。
|
|
65
|
-
- **禁止默认 push/PR**。
|
|
56
|
+
- **禁止问**「要不要继续」——除非 blocker,一路到底。
|
|
57
|
+
- **禁止切换**其他 change,直到本 change 归档并提交。
|
|
58
|
+
- **禁止**写 `changes/<id>/specs/`;**禁止默认 push/PR**。
|
|
66
59
|
|
|
67
60
|
## Ethics Governance
|
|
68
61
|
- `ethics.risk_level`: medium
|
|
69
|
-
- `ethics.prohibited_actions`:
|
|
62
|
+
- `ethics.prohibited_actions`: 未绑定分支 / specs-landed 门未过就实施、未 `readyToImplement=true` 就归档、中途切换 change、写 `changes/<id>/specs/`、未校验就提交、默认 push/PR
|
|
70
63
|
- `ethics.required_evidence`: `readyToImplement=true`、validate --strict 通过、tasks 全勾、finalize/archive 成功
|
|
71
|
-
- `ethics.refusal_contract`:
|
|
72
|
-
- `ethics.escalation_policy`:
|
|
64
|
+
- `ethics.refusal_contract`: 自修复 8 轮仍失败 → 报告 blocker,禁止强行归档
|
|
65
|
+
- `ethics.escalation_policy`: 改动 SDD 工作流 spec/模板时,归档前暂停请用户确认
|
|
73
66
|
|
|
74
|
-
|
|
75
|
-
> 文中「规约」= 本项目 `llmanspec/specs/` 下的 `.feature` 文件;用 `llman-sdd list --specs` / `llman-sdd show <capability>` 查全文。
|
|
67
|
+
{{ unit("skills/cli-footer") }}
|