@llman-sdd/core 0.8.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/package.json +1 -1
  2. package/src/archive/freeze.ts +15 -15
  3. package/src/archive/frozenCard.ts +3 -2
  4. package/src/change/collect.ts +17 -14
  5. package/src/change/deps.ts +54 -0
  6. package/src/change/frontmatter.ts +36 -5
  7. package/src/change/lifecycle.ts +124 -20
  8. package/src/change/nextId.ts +21 -7
  9. package/src/config/changeId.ts +0 -6
  10. package/src/config/load.ts +36 -2
  11. package/src/config/schema.ts +3 -7
  12. package/src/context/indexStore.ts +14 -14
  13. package/src/context/sddState.ts +1 -13
  14. package/src/context/tree.ts +9 -19
  15. package/src/git/spawnGit.ts +5 -1
  16. package/src/index.ts +37 -12
  17. package/src/init/defaultConfig.ts +14 -31
  18. package/src/init/init.ts +92 -30
  19. package/src/locale.ts +33 -0
  20. package/src/project/migrations.ts +196 -60
  21. package/src/report/graph/deps.ts +3 -38
  22. package/src/report/graph/nodes.ts +13 -19
  23. package/src/report/graph/types.ts +2 -6
  24. package/src/report/show.ts +16 -8
  25. package/src/report/specHelpers.ts +22 -28
  26. package/src/review/review.ts +18 -31
  27. package/src/self/completion.ts +206 -0
  28. package/src/spec/assignSpecIds.ts +9 -1
  29. package/src/spec/authoring.ts +11 -11
  30. package/src/spec/parser.ts +3 -1
  31. package/src/templates/skills.ts +3 -23
  32. package/src/util/datedId.ts +18 -0
  33. package/src/util/fsPort.ts +24 -0
  34. package/src/util/nextNumber.ts +30 -0
  35. package/src/util/semver.ts +21 -0
  36. package/src/validation/changeCheck.ts +133 -67
  37. package/src/validation/crossRoot.ts +86 -0
  38. package/src/validation/discover.ts +22 -13
  39. package/src/validation/roots.ts +2 -5
  40. package/src/validation/validate.ts +10 -19
  41. package/src/validation/{transitions.ts → xstateTransitions.ts} +81 -69
  42. package/templates/zh-Hans/skills/llman-sdd-apply-cycle.md +9 -7
  43. package/templates/zh-Hans/skills/llman-sdd-apply.md +5 -5
  44. package/templates/zh-Hans/skills/llman-sdd-archive.md +11 -2
  45. package/templates/zh-Hans/skills/llman-sdd-continue.md +1 -1
  46. package/templates/zh-Hans/skills/llman-sdd-draft.md +1 -1
  47. package/templates/zh-Hans/skills/llman-sdd-explore.md +2 -2
  48. package/templates/zh-Hans/skills/llman-sdd-ff.md +1 -1
  49. package/templates/zh-Hans/skills/llman-sdd-propose.md +8 -6
  50. package/templates/zh-Hans/skills/llman-sdd-quick.md +1 -1
  51. package/templates/zh-Hans/skills/llman-sdd-validate.md +1 -1
  52. package/templates/zh-Hans/skills/llman-sdd-verify.md +2 -2
  53. package/templates/zh-Hans/skills/llman-sdd-wayfinder.md +1 -1
  54. package/templates/zh-Hans/units/skills/git-native-flow.md +12 -6
  55. package/templates/zh-Hans/units/skills/index-fallback.md +1 -0
  56. package/templates/zh-Hans/units/skills/structured-protocol.md +1 -6
  57. package/templates/zh-Hans/units/spec/feature-contract.md +5 -33
  58. package/src/templates/locale.ts +0 -24
  59. package/templates/en/agents-root-stub.md +0 -9
  60. package/templates/en/llmanspec-agents-stub.md +0 -6
  61. package/templates/en/skills/llman-sdd-apply-cycle.md +0 -67
  62. package/templates/en/skills/llman-sdd-apply.md +0 -117
  63. package/templates/en/skills/llman-sdd-arch-review.md +0 -58
  64. package/templates/en/skills/llman-sdd-archive.md +0 -70
  65. package/templates/en/skills/llman-sdd-continue.md +0 -34
  66. package/templates/en/skills/llman-sdd-draft.md +0 -53
  67. package/templates/en/skills/llman-sdd-explore.md +0 -64
  68. package/templates/en/skills/llman-sdd-ff.md +0 -33
  69. package/templates/en/skills/llman-sdd-graph.md +0 -56
  70. package/templates/en/skills/llman-sdd-propose.md +0 -105
  71. package/templates/en/skills/llman-sdd-quick.md +0 -41
  72. package/templates/en/skills/llman-sdd-research.md +0 -35
  73. package/templates/en/skills/llman-sdd-specs-compact.md +0 -41
  74. package/templates/en/skills/llman-sdd-validate.md +0 -28
  75. package/templates/en/skills/llman-sdd-verify.md +0 -77
  76. package/templates/en/skills/llman-sdd-wayfinder.md +0 -83
  77. package/templates/en/units/skills/cli-footer.md +0 -2
  78. package/templates/en/units/skills/ethics-governance.md +0 -6
  79. package/templates/en/units/skills/git-native-flow-brief.md +0 -10
  80. package/templates/en/units/skills/git-native-flow.md +0 -50
  81. package/templates/en/units/skills/human-readable-summary.md +0 -9
  82. package/templates/en/units/skills/stage-guard.md +0 -17
  83. package/templates/en/units/skills/structured-protocol.md +0 -24
  84. package/templates/en/units/skills/validation-hints.md +0 -20
  85. package/templates/en/units/skills/version-drift.md +0 -3
  86. package/templates/en/units/spec/feature-contract.md +0 -38
  87. package/templates/en/units/workflow/archive-freeze-guidance.md +0 -9
  88. package/templates/zh-Hans/units/skills/git-native-flow-brief.md +0 -10
  89. package/templates/zh-Hans/units/workflow/archive-freeze-guidance.md +0 -10
@@ -1,105 +0,0 @@
1
- ---
2
- name: "llman-sdd-propose"
3
- description: "Create a proposal for behavioral-contract (requirement semantics) changes (proposal/tasks → bind branch → land specs). Small changes → quick; ideas → draft."
4
- metadata:
5
- version: "{{ llman_version }}"
6
- ---
7
-
8
- # LLMAN SDD Propose
9
-
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
-
12
- ## Pipeline Position
13
-
14
- {{ unit("skills/git-native-flow") }}
15
- {{ unit("skills/human-readable-summary") }}
16
-
17
- ```mermaid
18
- flowchart LR
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"]
23
-
24
- style propose fill:#fff3cd,stroke:#ffc107,stroke-width:3px
25
- ```
26
-
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`.
28
-
29
- ## Hard Constraints
30
-
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.
33
- - **Don't ask "should I continue?"**: execute the full propose phase in one pass, generate artifacts and validate.
34
- {% if extra_skill_continue %}
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.
36
- {% else %}
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]`).
38
- {% endif %}
39
- - **Frontmatter has a fixed schema**: `proposal.md` accepts only the allowed fields in `llmanspec/AGENTS.md` "Change Proposal Frontmatter SSOT" (`depends_on`, `title`, `blocks`, `branch`, `base_sha`, `needs_specs_change`, etc.); `title` MUST be a non-empty one-sentence concept title and MUST NOT repeat the change id — missing or empty values are rejected by `llman-sdd validate` as ERROR, and so are out-of-set fields like `status`/`priority`/`author`. 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 MAY keep a human-readable title (freeze prefers the frontmatter `title`, falling back to the H1), not a repeat of the change id.
40
-
41
- ## Quick-capture routing
42
-
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.
44
-
45
- ## Steps
46
-
47
- ### 0) Preflight
48
- - Read `llmanspec/config.yaml` for project context, rules, locale.
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
- - **Specs list readable**: `llman-sdd list --specs` returns the list without errors; on anomaly, STOP and report.
51
-
52
- ### 1) Assess change scale
53
- 1. Classify:
54
- - **Behavioral contract change** (modify requirement semantics, change external behavior) → full SDD
55
- - **Implementation change** (refactor, typo, perf) → `llman-sdd-quick`
56
- - **Meta-spec change** (SDD templates/process) → full SDD
57
- - When uncertain, choose full SDD (conservative).
58
- 2. Use `llman-sdd context --task "<goal>" --paths "<scope>"` to find relevant specs.
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>`).
61
-
62
- ### 2) Ensure the project is initialized
63
- - `llmanspec/` must exist; if missing, tell the user to run `llman-sdd init`, then STOP.
64
-
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).
67
- {% if extra_skill_continue %}
68
- - If the change already exists, STOP and suggest `llman-sdd-continue`.
69
- {% else %}
70
- - If the change already exists, STOP and suggest filling missing artifacts or `llman-sdd-apply` (optionally enable continue via `extra_skills`).
71
- {% endif %}
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>` (local branches only) for a non-default fork source) or manually create a branch then `change attach <change-id>` (attach derives the fork source from runtime signals by default and warns on deviation).
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.
79
-
80
- ### 4) Validate
81
- ```bash
82
- llman-sdd validate <change-id>
83
- ```
84
- The structure gate MUST pass before proceeding; failing items are listed one by one in the validate output's `items[].issues[]` — fix each and re-run. `--strict` promotes warnings (including unchecked tasks) to failures — reserve it for the post-implementation completion check, once every task is checked.
85
-
86
- ### 4a) Optional BDD runner (`specs:` block)
87
- - Read `llmanspec/config.yaml`. Is there a `specs:` block?
88
- - **Yes**: `specs.check_command` declares the project's BDD execution entry; validate runs it only via explicit `--check` (default skips — structure-only). 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 `specs:` verification runner block (adds a `specs:` block to `config.yaml` — runner only, does not change the lifecycle). If **yes**: show the exact `specs:` block to add (pick a `check_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 `specs:` block** — always ask first. Adding it declares the project-wide BDD execution entry.
91
-
92
- ### 4b) Single-track feature authoring
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.
98
-
99
- ### 5) Summarize and suggest next step
100
- - Enter implementation: `llman-sdd-apply`. Need more thinking: `llman-sdd-explore`.
101
-
102
- {{ unit("skills/cli-footer") }}
103
- {{ unit("skills/validation-hints") }}
104
-
105
- {{ unit("skills/structured-protocol") }}
@@ -1,41 +0,0 @@
1
- ---
2
- name: "llman-sdd-quick"
3
- description: "Quick path for small changes that don't touch behavioral contracts (refactor/typo/perf). If a behavioral-contract (requirement semantics) change emerges, stop and switch to propose."
4
- metadata:
5
- version: "{{ llman_version }}"
6
- ---
7
-
8
- # LLMAN SDD Quick Path
9
-
10
- Use this path for small changes that don't modify behavioral contracts.
11
-
12
- ## Pipeline Position
13
-
14
- ```mermaid
15
- flowchart LR
16
- quick["★ llman-sdd-quick"] --> commit["git commit"]
17
- explore["llman-sdd-explore"] --> propose["Full path: propose → apply → verify → archive"]
18
-
19
- style quick fill:#d4edda,stroke:#28a745,stroke-width:3px
20
- ```
21
-
22
- > 📍 Quick path: edit code and commit directly. If you find a contract change is needed → STOP, switch to `llman-sdd-propose`.
23
-
24
- ## Conditions (all must hold)
25
- - Does not change any requirement-semantics-defined externally observable behavior
26
- - Does not cross capability boundaries; no migration/compatibility concerns; not an SDD meta-spec change
27
-
28
- ## Steps
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.
31
- 2. Modify the code directly.
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.
34
-
35
- ## Boundary handling
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.
38
-
39
- {{ unit("skills/cli-footer") }}
40
-
41
- {{ unit("skills/ethics-governance") }}
@@ -1,35 +0,0 @@
1
- ---
2
- name: "llman-sdd-research"
3
- description: "Delegate fact-finding to a background agent: primary sources only (official docs/API/source), cited findings."
4
- metadata:
5
- version: "{{ llman_version }}"
6
- ---
7
-
8
- # LLMAN SDD Research
9
-
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
-
12
- ## The background agent's job
13
-
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.
15
- 2. Write findings to a single Markdown file, citing each claim's source.
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 requirement semantics must change → suggest `llman-sdd-propose` (bind branch → land specs).
18
-
19
- ## Steps
20
-
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`);
25
- - A word limit (suggested: focus on facts, prose narrative < 1500 words).
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.
28
-
29
- ## Cooperation with wayfinder
30
-
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.
32
-
33
- {{ unit("skills/cli-footer") }}
34
-
35
- {{ unit("skills/structured-protocol") }}
@@ -1,41 +0,0 @@
1
- ---
2
- name: "llman-sdd-specs-compact"
3
- description: "Compact and dedupe specs: merge redundant requirements/scenarios without changing normative behavior. Manual run only, when the user explicitly asks."
4
- metadata:
5
- version: "{{ llman_version }}"
6
- ---
7
-
8
- # LLMAN SDD Specs Compact
9
-
10
- Compact specs without changing normative behavior. Maintenance tool, not part of the daily pipeline; typically run after many archived changes.
11
-
12
- ## Context
13
- - Specs bloat with duplicate requirements/scenarios as changes accumulate; compaction must stay verifiable and regressible.
14
- - An oversized archive history interferes with compaction review and navigation.
15
-
16
- ## Goal
17
- - Merge redundant requirements/scenarios into a more compact, maintainable spec structure.
18
-
19
- ## Constraints
20
- - Don't delete normative behavior without explicit replacement; keep requirement titles stable where possible; every retained requirement keeps at least one valid scenario.
21
- - **Editing `llmanspec/specs/**` requires a change**: bind the branch first (`change start` / `attach`), then edit and commit on the bound branch; **never** compact-rewrite specs on the default branch.
22
-
23
- ## Workflow
24
- 1. Inventory specs (`llman-sdd list --specs`).
25
- 2. If archived history is large, freeze first: preview `llman-sdd archive freeze --dry-run`; execute `llman-sdd archive freeze --before <YYYY-MM-DD> --keep-recent <N>`.
26
- 3. Identify cross-capability overlap (duplicate req ids across specs: `llman-sdd project dedupe-req-ids --dry-run` reports the remap plan).
27
- 4. Produce a compaction plan (canonical requirements + keep/merge/remove decisions + migration notes).
28
- 5. Execute and validate (`llman-sdd validate --specs --strict`).
29
-
30
- ## Decision Policy
31
- - Prefer merging semantically equivalent requirements; extract shared text only when references are clear; freeze first when the archive is noisy.
32
- - If compaction would change external behavior, pause and ask the user first.
33
-
34
- ## Output Contract
35
- - Compaction plan grouped by capability: keep/merge/remove decisions with rationale + validation commands and expected results.
36
-
37
- {{ unit("skills/cli-footer") }}
38
-
39
- {{ unit("skills/validation-hints") }}
40
-
41
- {{ unit("skills/ethics-governance") }}
@@ -1,28 +0,0 @@
1
- ---
2
- name: "llman-sdd-validate"
3
- description: "Validate changes and specs; suggest actionable fixes."
4
- metadata:
5
- version: "{{ llman_version }}"
6
- ---
7
-
8
- # LLMAN SDD Validate
9
-
10
- Validate change/spec format.
11
-
12
- ## Steps
13
- 1. Single item: `llman-sdd validate <id>`; batch: `llman-sdd validate --all` (or `--changes` / `--specs`); use `--strict` in CI/automation.
14
- 2. On failure, summarize the errors and propose minimal, concrete fixes.
15
- {% if specs_enabled %}
16
- 3. **BDD checks**:
17
- - Validate `.feature` Gherkin and `@req` / dual-write gates on the **bound branch**; `.feature` is the harness authority — executable GWT lives only there.
18
- - Lifecycle gates: `change start` / `attach` (bind branch), `finalize` (close-out; auto commit `archive(sdd): <id>`, `--no-commit` to skip) / `diff` (read-only).
19
- - `llman-sdd validate --specs` enforces structural and contract gates; when `specs.check_command` is configured the full harness runs only with explicit `--check` (default skips — structure-only); a placeholder-free command runs at most once per invocation.
20
- - `list --specs --json` shows `morphology` (requirementCount / requirementBoundCount / requirementUnboundCount / acceptanceCount / featureScenarioCount).
21
- - Change JSON status fields: `stage` (draft/designed/planned/full) / `specsLanded` / `needsSpecsChange` / `readyToImplement` (`show --output json`).
22
- {% endif %}
23
-
24
- {{ unit("skills/cli-footer") }}
25
-
26
- {{ unit("skills/validation-hints") }}
27
-
28
- {{ unit("skills/ethics-governance") }}
@@ -1,77 +0,0 @@
1
- ---
2
- name: "llman-sdd-verify"
3
- description: "Verify an implemented change against its specs/design/tasks; report CRITICAL/WARNING/SUGGESTION. Run after apply; if clean, ready to archive."
4
- metadata:
5
- version: "{{ llman_version }}"
6
- ---
7
-
8
- # LLMAN SDD Verify
9
-
10
- Verify that the implementation matches the change's artifacts.
11
-
12
- ## Pipeline Position
13
-
14
- ```mermaid
15
- flowchart LR
16
- apply["llman-sdd-apply"] --> verify["★ llman-sdd-verify"]
17
- verify --> archive["llman-sdd-archive"]
18
-
19
- style verify fill:#fff3cd,stroke:#ffc107,stroke-width:3px
20
- ```
21
-
22
- > 📍 You are in verify → pass leads to `llman-sdd-archive`, failure goes back to `llman-sdd-apply`. The change should already have landed specs with `readyToImplement=true` (all gates green — the completion signal).
23
-
24
- ## Hard Constraints
25
-
26
- - **Apply must be all-green first**: don't verify unimplemented changes.
27
- - **CRITICAL must be fixed**: zero CRITICAL before archive.
28
- - **Rerun the gates yourself**: MUST rerun `llman-sdd validate <id> --check --strict` (real harness evidence) and the project gates; MUST NOT trust gate verdicts in the implementer's report — a mismatch is CRITICAL.
29
- - **Harness evidence requires `--check`**: plain `validate` does not run the harness; claiming full-harness evidence MUST use explicit `--check` — the default structural gate is not a pass. Close-out runs the configured `specs.check_command`, so do not run it again just before close-out.
30
- - **Don't ask "should I continue?"**: run the full verification flow and output a complete report.
31
-
32
- {{ unit("skills/stage-guard") }}
33
-
34
- ## Steps
35
- 1. Select the change id (or ask the user to pick from `llman-sdd list --json`).
36
- 2. Fast validation gate: `llman-sdd validate <id> --strict`.
37
- - When diagnosing structural issues (Gherkin parse / `@req` linkage / dual-write / req_id uniqueness), run the structural validation first (the full harness only runs via explicit `--check`; plain `validate` no longer runs it by default; a harness failure lands as an ERROR on its spec item). Failing items are listed one by one in the default TOON output's `items[].issues[]` (`--output human` prints `FAIL <item_type>/<id>` lines above the `Totals` line).
38
- 3. Read: `llmanspec/specs/**` (`<capability>.feature`, the single source of truth) on the branch, `proposal.md` and `design.md` (if present), `tasks.md`; ignore residual old docs under `changes/<id>/specs/`.
39
- 4. **Dual-axis review (kept separate so neither masks the other)** — diff against `git diff <merge-base>...HEAD` (merge-base is COMPUTED via `git merge-base <local-default> HEAD`; the stored base_sha is audit-only and MUST NOT feed range math):
40
- - **Spec axis**: does the implementation satisfy the `规则:` block requirement statement (free-text description, judged by its semantics) and the nested `场景:` GWT steps? Missing/partial behaviors, wrong implementations, and scope creep not asked for by the spec → suggest minimal fixes or artifact updates. Check where before/after evidence (counts, baselines) was taken: it MUST be measured on the change branch (against the freshly computed merge-base); a value measured on the default branch is usually trivially the baseline and proves nothing.
41
- - **Standards axis**: does the code follow `AGENTS.md` + the smell baseline? Authority priority: `AGENTS.md` > smell baseline; skip anything tooling already enforces. Smells are **judgement heuristics** ("possible Feature Envy"), not hard violations:
42
-
43
- | Smell | Fix |
44
- |-------|-----|
45
- | Mysterious Name (name hides intent) | rename it |
46
- | Duplicated Code (same logic shape) | extract the shared part |
47
- | Feature Envy (method uses another's data more) | move the method over |
48
- | Data Clumps (same fields travel together) | bundle into a type |
49
- | Primitive Obsession (primitive stands in for a domain concept) | give it a dedicated type |
50
- | Repeated Switches (same switch recurs) | polymorphism or a shared map |
51
- | Shotgun Surgery (one change scatters edits) | gather into one module |
52
- | Divergent Change (one file changes for unrelated reasons) | split it |
53
- | Speculative Generality (abstraction for unseen needs) | delete it |
54
- | Message Chains (long a.b().c()) | hide the chain behind one method |
55
- | Middle Man (just delegates) | cut it, call direct |
56
- | Refused Bequest (subclass rejects most inheritance) | use composition |
57
- - The two axes may be reviewed in parallel (sub-agents); the report MUST present them separately, MUST NOT merge or cross-rerank (one axis passing must not mask the other failing).
58
- 5. **BDD verification** — only when `config.yaml` has a `specs:` block:
59
- - Confirm the change is branch-bound and you are on that branch.
60
- - `llman-sdd validate --specs`: Gherkin + `@req`/dual-write gates; the full harness only runs via explicit `--check` (default skips) and a failure maps to an ERROR on the matching spec item.
61
- - Optional read-only review: `llman-sdd change diff <id>` (or `--export-patch <path>`) — review/export only, never an apply step.
62
- - Next step after verify passes: `llman-sdd-archive` (not inline finalize here).
63
- {% if specs_verify_prompt %}
64
- - Extra requirement: {{ specs_verify_prompt }}
65
- {% endif %}
66
- 6. Produce a short report: **CRITICAL** (must fix before archive) / **WARNING** (should fix) / **SUGGESTION** (nice to have).
67
- 7. **Human review gate**: once the report has no CRITICAL findings and before suggesting archive, run `llman-sdd review`: exit code zero → suggest `llman-sdd-archive`; non-zero = CRITICAL → fix via `llman-sdd-apply`, then re-run review; MUST NOT enter finalize/archive with CRITICAL findings open.
68
-
69
- {{ unit("skills/git-native-flow-brief") }}
70
- {{ unit("skills/human-readable-summary") }}
71
- {{ unit("skills/cli-footer") }}
72
-
73
- {{ unit("skills/version-drift") }}
74
-
75
- {{ unit("skills/validation-hints") }}
76
-
77
- {{ unit("skills/structured-protocol") }}
@@ -1,83 +0,0 @@
1
- ---
2
- name: "llman-sdd-wayfinder"
3
- description: "Break huge, foggy work (beyond one agent session) into a decision map, resolving decisions one at a time. Manual trigger only."
4
- metadata:
5
- version: "{{ llman_version }}"
6
- disable-model-invocation: true
7
- ---
8
-
9
- # LLMAN SDD Wayfinder
10
-
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.
12
-
13
- ## Pipeline position
14
-
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.
16
-
17
- ## Core principles
18
-
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.
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).
22
-
23
- ## Map structure
24
-
25
- The map is a change (overview proposal); its sub-decisions are `depends_on` child changes. Use `llman-sdd graph <map-id> --scope active` to visualize the **frontier** (takeable items).
26
-
27
- The map's `proposal.md` structure:
28
-
29
- ```markdown
30
- ## Destination
31
- <what reaching the end looks like — spec/decision/change. One or two lines.>
32
-
33
- ## Notes
34
- <domain; skills each session should consult; standing preferences>
35
-
36
- ## Decisions so far
37
- <!-- index: one line per closed ticket, gist + link -->
38
-
39
- ## Not yet specified
40
- <!-- fog: foreseeable but not yet sharp enough to ticket; graduates as the frontier advances -->
41
-
42
- ## Out of scope
43
- <!-- beyond the destination; closed tickets, never graduate -->
44
- ```
45
-
46
- ## Ticket types
47
-
48
- Each ticket is a child change carrying a `wayfinder:<type>` tag (in the proposal title or frontmatter):
49
-
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.
51
- - **Prototype (human-in-the-loop)**: raise fidelity with a cheap, rough runnable (throwaway terminal app or UI variant).
52
- - **Deep-dive Q&A (human-in-the-loop)**: via `llman-sdd-explore`'s deep-dive branch, one question at a time. **Default type**.
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).
54
-
55
- ## Fog of war
56
-
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).
58
- - Can state precisely → ticket (even if blocked).
59
- - Cannot yet → **Not yet specified** (coarser than a ticket; one fog patch may graduate into several tickets or none).
60
-
61
- ## Steps
62
-
63
- ### Chart the map
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.
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.
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).
68
- 5. Spin up `llman-sdd-research` background subagents for each research ticket.
69
- 6. Stop — charting is one session's work; resolve nothing by hand.
70
-
71
- ### Work through the map
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.
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.
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.
77
-
78
- ## Output
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.
80
-
81
- {{ unit("skills/cli-footer") }}
82
-
83
- {{ unit("skills/structured-protocol") }}
@@ -1,2 +0,0 @@
1
- > For command details run `llman-sdd <cmd> --help`; the CLI is the command reference — skills embed no command tables.
2
- > "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
@@ -1,6 +0,0 @@
1
- ## Ethics Governance
2
- - `ethics.risk_level`: low — reads/writes this repo and `llmanspec/` only, no outward-facing actions; a skill body may override.
3
- - `ethics.prohibited_actions`: actions violating the skill body's hard rules; push / PR / external upload without an explicit user request.
4
- - `ethics.required_evidence`: conclusions backed by command output or file paths; gate state per `llman-sdd validate`.
5
- - `ethics.refusal_contract`: gate CRITICAL not cleared → refuse to advance; self-repair cap reached → report a blocker.
6
- - `ethics.escalation_policy`: pause and ask the user before changing SDD contracts/templates or irreversible actions.
@@ -1,10 +0,0 @@
1
- ## Branch lifecycle (brief)
2
-
3
- **Skill navigation** ≠ **branch lifecycle**. Full diagram: root `AGENTS.md` or the one inside `llman-sdd-propose`.
4
-
5
- Hard rules:
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>`, local branches only) records a non-default fork source; attach derives the fork source from runtime signals by default and warns on deviation from the default branch; finalize skips the merge for an in-place close-out when the target is the bound branch, and runs in place when the target is held by another worktree (location annotated in output).
@@ -1,50 +0,0 @@
1
- ## Branch lifecycle (full diagram)
2
-
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
-
5
- ```mermaid
6
- flowchart TB
7
- subgraph main_ok["OK briefly on default branch"]
8
- A["change new → draft<br/>proposal.md only"]
9
- B1["add design.md → designed"]
10
- B2["add tasks.md → planned"]
11
- end
12
-
13
- subgraph bind["Bind branch"]
14
- C{"Clean tree<br/>and on default branch?"}
15
- D["change start<br/>create sdd/&lt;id&gt; + write branch/base_branch/base_sha"]
16
- E["or manual checkout -b<br/>then change attach"]
17
- end
18
-
19
- subgraph specs_only["Only on this change branch"]
20
- F["Edit llmanspec/specs/** (.feature)"]
21
- G["commit → land specs<br/>live merge-base...HEAD includes specs paths"]
22
- end
23
-
24
- subgraph implement["Implement & close"]
25
- H["apply: code per tasks<br/>may keep editing specs"]
26
- I["verify"]
27
- J["finalize: merge (squash default) → rename → auto commit archive(sdd): &lt;id&gt;<br/>specs first hit the target branch"]
28
- end
29
-
30
- A --> B1 --> B2 --> C
31
- C -->|yes| D --> F
32
- C -->|already on feature| E --> F
33
- F --> G --> H --> I --> J
34
- ```
35
-
36
- Hard rules:
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>` (local branches only) 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; fork source resolves as `--base` > `branch.<name>.base` / local upstream probe > default branch, with a WARNING when it deviates from the default; `--base` accepts local branches only |
49
-
50
- finalize target location: when the target is the bound branch itself the merge is skipped for an in-place close-out (output carries an in-place close-out notice); 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,9 +0,0 @@
1
- # Human-Readable Summary (mandatory)
2
-
3
- Every report, handoff, or gate output MUST open with a short human-readable summary before any machine detail:
4
-
5
- - **Verdict** — one line (e.g. "all gates green" / "2 CRITICAL found").
6
- - **Risks** — up to three bullets, highest impact first.
7
- - **Decisions needed** — explicit asks, or "none".
8
-
9
- Under ten lines; details below the fold.
@@ -1,17 +0,0 @@
1
- ## Stage guard (`stage` / `readyToImplement`)
2
-
3
- Decide from authoritative JSON (never from "artifacts look complete"):
4
-
5
- ```bash
6
- llman-sdd show <id> --output json --type change
7
- ```
8
-
9
- Read: `stage`, `specsLanded`, `needsSpecsChange`, `readyToImplement`, `gateChecks` (per-item `pass` + one-line `hint` when failing).
10
-
11
- | Condition | Action |
12
- |-----------|--------|
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,24 +0,0 @@
1
- ## Context
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.
3
-
4
- ## Goal
5
- - Reach one verifiable outcome; report result paths and validation state.
6
-
7
- ## Constraints
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.
9
-
10
- ## Workflow
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`.
12
-
13
- ## Decision Policy
14
- - Clarify high-impact ambiguity before proceeding; verify facts yourself, ask the user only for decisions.
15
-
16
- ## Output Contract
17
- - Human-readable summary first (verdict / risks / decisions needed), machine detail after.
18
-
19
- ## Ethics Governance
20
- - `ethics.risk_level`: low — reads/writes this repo and `llmanspec/` only, no outward-facing actions; a skill body may override.
21
- - `ethics.prohibited_actions`: actions violating the skill body's hard rules; push / PR / external upload without an explicit user request.
22
- - `ethics.required_evidence`: conclusions backed by command output or file paths; gate state per `llman-sdd validate`.
23
- - `ethics.refusal_contract`: gate CRITICAL not cleared → refuse to advance; self-repair cap reached → report a blocker.
24
- - `ethics.escalation_policy`: pause and ask the user before changing SDD contracts/templates or irreversible actions.
@@ -1,20 +0,0 @@
1
- Validation fixes (single-track feature-as-spec):
2
-
3
- 1) Missing `# purpose:` header: every capability `.feature` MUST carry a non-empty `# purpose:`; the Feature title MUST equal the assigned spec id (`llman-sdd list --specs` for ids).
4
- ```
5
- # language: zh-CN
6
- # purpose: One-line overview.
7
-
8
- Feature: <spec-id>
9
- ```
10
-
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 modal-verb 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
-
17
- Branch guardrails:
18
- - Bind with `change start` / `attach` first, then edit `.feature` on the bound branch and commit (land specs).
19
- - Locked rules (report-only): editing/deleting existing `规则:` blocks emits WARNING only — does not block validate / finalize / `change diff`; reports name the changed rule via `@req:<id>`. Control points: git branch diff + `llman-sdd review` / `change diff`. Legacy lock metadata (`rules_touched` / `agent_acked` / `@agent` tag / `--yes` confirm semantics) is fully removed — no aliases, no compatibility layer.
20
- - `stage=full` with specs-landed gate green (`specsLanded` ∨ `needs_specs_change: false`) is enough to enter apply; verify/finalize requires `readyToImplement=true` (completion signal). Prefer `change finalize` for close-out.
@@ -1,3 +0,0 @@
1
- ## Version-drift notice (`[NOTE] ... scaffolded with llman-sdd X; installed CLI is Y`)
2
-
3
- When you see this stderr line: **relay** it to the user and suggest `llman-sdd init --update` (refreshes managed blocks and skills to the installed CLI). Until updated, **keep following the current skill** — the notice is informational, never a stop condition. At most once per process.
@@ -1,38 +0,0 @@
1
- ## Canonical Single-Track Feature Contract (native Gherkin layout)
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; 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`.
6
-
7
- ```gherkin
8
- # language: zh-CN
9
- # purpose: One-line overview.
10
-
11
- 功能: sample
12
-
13
- @req:r1
14
- 规则: A requirement point
15
- Free-text requirement (no MUST/SHALL enforcement); wrap long text across
16
- lines for human/agent readability. A description line must not begin with
17
- a step keyword (would be parsed as a step).
18
-
19
- 场景: An executable example
20
- 假如 a precondition
21
- 当 a trigger happens
22
- 那么 the outcome is observed
23
-
24
- @req:r2
25
- 规则: Not-yet-converted requirement (bare rule — counted by the aggregate nudges)
26
- This description is the only carrier of the requirement today. Rules with
27
- no nested scenario are counted as bare; specs-compact keeps driving them
28
- down or converting them.
29
- ```
30
-
31
- - Header comments: `# language:` (dialect) and `# purpose:` (one-line overview) are REQUIRED. The capability / spec id is assigned per instance from file paths after discover (flat and directory layouts may mix); the `功能:` title MUST equal that id.
32
- - **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.
33
- - `@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.
34
- - 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).
35
- - 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).
36
- - 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.
37
- - Coverage tiers: enforced (has nested scenarios) / pending (bare) — `list --specs` reports both.
38
- - `规则:` blocks are containers: nested `场景:` are executed by the runner; two-space indent tiers (`规则:` 2, nested `场景:` 4, steps 6).