@llman-sdd/core 0.3.1 → 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,84 +1,69 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-archive"
|
|
3
|
-
description: "Archive completed
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
- **
|
|
28
|
-
-
|
|
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**:
|
|
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
|
|
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
|
|
40
|
-
- Determine
|
|
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
|
|
46
|
-
- Validate
|
|
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
|
-
|
|
51
|
-
-
|
|
52
|
-
- **
|
|
53
|
-
- **
|
|
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
|
|
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
|
|
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
|
|
64
|
-
- **Fallback: plain `change archive <id>`** — same merge + rename
|
|
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
|
|
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
|
|
72
|
-
- Optional: `git branch -D <feature>` after the merge
|
|
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
|
|
74
|
-
- **Archived `depends_on`**: archive renames the change dir to `archive/YYYY-MM-DD-<id
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
10
|
+
Continue an existing change and create the next missing artifact.
|
|
11
11
|
|
|
12
12
|
## Steps
|
|
13
|
-
1. Identify the change id:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
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
|
|
24
|
-
5) Edit
|
|
25
|
-
4. Create exactly ONE missing artifact (or one
|
|
26
|
-
- Do NOT
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
- `
|
|
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
|
-
|
|
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: "
|
|
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
|
|
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
|
|
17
|
-
propose --> apply["llman-sdd-apply
|
|
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
|
-
> 📍
|
|
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**:
|
|
32
|
-
- **MUST NOT
|
|
33
|
-
- **Scope boundary**: if the description clearly involves MUST/SHALL
|
|
34
|
-
- **Frontmatter has a fixed schema**:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
51
|
-
-
|
|
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** (
|
|
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
|
-
|
|
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") }}
|
|
@@ -1,78 +1,64 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-explore"
|
|
3
|
-
description: "
|
|
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
|
|
10
|
+
Use this skill to think through ideas, investigate problems, or clarify requirements **before** implementation.
|
|
11
11
|
|
|
12
|
-
**
|
|
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
|
|
15
|
-
-
|
|
16
|
-
- You MUST NOT write application code
|
|
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
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
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
|
-
-
|
|
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
|
|
47
|
-
-
|
|
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. **
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
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,
|
|
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
|
|
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
|
|
62
|
-
- Constraints / executable harness → **suggest**
|
|
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
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
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.
|
|
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
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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)
|
|
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
|
-
|
|
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)
|
|
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 #
|
|
41
|
-
llman-sdd graph --scope archived #
|
|
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
|
-
-
|
|
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
|
|
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
|
-
##
|
|
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
|
-
|
|
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") }}
|