@llman-sdd/core 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/archive/freeze.ts +45 -22
- package/src/archive/frozenCard.ts +3 -2
- package/src/archive/ignoreChain.ts +167 -0
- package/src/archive/sevenzip.ts +17 -8
- package/src/change/collect.ts +17 -14
- package/src/change/deps.ts +54 -0
- package/src/change/frontmatter.ts +36 -5
- package/src/change/lifecycle.ts +124 -20
- package/src/change/nextId.ts +14 -6
- package/src/config/changeId.ts +0 -6
- package/src/config/load.ts +2 -2
- package/src/config/schema.ts +3 -1
- package/src/context/indexStore.ts +14 -14
- package/src/context/sddState.ts +1 -13
- package/src/context/tree.ts +9 -19
- package/src/index.ts +33 -9
- package/src/init/defaultConfig.ts +14 -31
- package/src/init/init.ts +25 -27
- package/src/locale.ts +33 -0
- package/src/project/migrations.ts +79 -9
- package/src/report/graph/deps.ts +3 -38
- package/src/report/graph/nodes.ts +13 -19
- package/src/report/graph/types.ts +2 -6
- package/src/report/show.ts +16 -8
- package/src/report/specHelpers.ts +22 -28
- package/src/review/review.ts +18 -30
- package/src/self/completion.ts +206 -0
- package/src/spec/assignSpecIds.ts +9 -1
- package/src/spec/authoring.ts +11 -11
- package/src/spec/parser.ts +3 -1
- package/src/templates/skills.ts +3 -23
- package/src/util/datedId.ts +18 -0
- package/src/util/fsPort.ts +24 -0
- package/src/util/nextNumber.ts +30 -0
- package/src/util/semver.ts +21 -0
- package/src/validation/changeCheck.ts +133 -67
- package/src/validation/crossRoot.ts +86 -0
- package/src/validation/discover.ts +22 -13
- package/src/validation/roots.ts +2 -5
- package/src/validation/validate.ts +4 -9
- package/src/validation/xstateTransitions.ts +0 -32
- package/templates/zh-Hans/skills/llman-sdd-apply-cycle.md +9 -7
- package/templates/zh-Hans/skills/llman-sdd-apply.md +5 -5
- package/templates/zh-Hans/skills/llman-sdd-archive.md +11 -2
- package/templates/zh-Hans/skills/llman-sdd-continue.md +1 -1
- package/templates/zh-Hans/skills/llman-sdd-draft.md +1 -1
- package/templates/zh-Hans/skills/llman-sdd-explore.md +2 -2
- package/templates/zh-Hans/skills/llman-sdd-ff.md +1 -1
- package/templates/zh-Hans/skills/llman-sdd-propose.md +8 -6
- package/templates/zh-Hans/skills/llman-sdd-quick.md +1 -1
- package/templates/zh-Hans/skills/llman-sdd-validate.md +1 -1
- package/templates/zh-Hans/skills/llman-sdd-verify.md +2 -2
- package/templates/zh-Hans/skills/llman-sdd-wayfinder.md +1 -1
- package/templates/zh-Hans/units/skills/git-native-flow.md +12 -6
- package/templates/zh-Hans/units/skills/index-fallback.md +1 -0
- package/templates/zh-Hans/units/skills/structured-protocol.md +1 -6
- package/templates/zh-Hans/units/spec/feature-contract.md +5 -33
- package/src/templates/locale.ts +0 -24
- package/templates/en/agents-root-stub.md +0 -9
- package/templates/en/llmanspec-agents-stub.md +0 -6
- package/templates/en/skills/llman-sdd-apply-cycle.md +0 -67
- package/templates/en/skills/llman-sdd-apply.md +0 -117
- package/templates/en/skills/llman-sdd-arch-review.md +0 -58
- package/templates/en/skills/llman-sdd-archive.md +0 -70
- package/templates/en/skills/llman-sdd-continue.md +0 -34
- package/templates/en/skills/llman-sdd-draft.md +0 -53
- package/templates/en/skills/llman-sdd-explore.md +0 -64
- package/templates/en/skills/llman-sdd-ff.md +0 -33
- package/templates/en/skills/llman-sdd-graph.md +0 -56
- package/templates/en/skills/llman-sdd-propose.md +0 -105
- package/templates/en/skills/llman-sdd-quick.md +0 -41
- package/templates/en/skills/llman-sdd-research.md +0 -35
- package/templates/en/skills/llman-sdd-specs-compact.md +0 -41
- package/templates/en/skills/llman-sdd-validate.md +0 -28
- package/templates/en/skills/llman-sdd-verify.md +0 -77
- package/templates/en/skills/llman-sdd-wayfinder.md +0 -83
- package/templates/en/units/skills/cli-footer.md +0 -2
- package/templates/en/units/skills/ethics-governance.md +0 -6
- package/templates/en/units/skills/git-native-flow-brief.md +0 -10
- package/templates/en/units/skills/git-native-flow.md +0 -50
- package/templates/en/units/skills/human-readable-summary.md +0 -9
- package/templates/en/units/skills/stage-guard.md +0 -17
- package/templates/en/units/skills/structured-protocol.md +0 -24
- package/templates/en/units/skills/validation-hints.md +0 -20
- package/templates/en/units/skills/version-drift.md +0 -3
- package/templates/en/units/spec/feature-contract.md +0 -38
- package/templates/en/units/workflow/archive-freeze-guidance.md +0 -9
- package/templates/zh-Hans/units/skills/git-native-flow-brief.md +0 -10
- package/templates/zh-Hans/units/workflow/archive-freeze-guidance.md +0 -10
|
@@ -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,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/<id> + 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): <id><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).
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
## Archive Cold Backup Guidance
|
|
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 — single-document plain YAML carrying only `title` and `depends_on`):
|
|
3
|
-
- Preview freeze candidates: `llman-sdd archive freeze --dry-run`
|
|
4
|
-
- Freeze old archives: `llman-sdd archive freeze --before <YYYY-MM-DD> --keep-recent <N>`
|
|
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` (the frontmatter `title` when non-empty, else 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,10 +0,0 @@
|
|
|
1
|
-
## Git 分支生命周期(摘要)
|
|
2
|
-
|
|
3
|
-
**Skill 导航** ≠ **分支生命周期**。全图见根 `AGENTS.md` 或 `llman-sdd-propose` 内嵌图。
|
|
4
|
-
|
|
5
|
-
硬规则:
|
|
6
|
-
1. **先**绑定分支(`change start` / `attach`)→ full;**再**提交 specs(绑定分支上编辑并 commit `llmanspec/specs/**`)。
|
|
7
|
-
2. 无合约编辑 → `needs_specs_change: false`。`stage=full` 且 specs-landed 门通过即可进 apply;`readyToImplement=true`(全门绿)是 verify/finalize 前的完成信号。
|
|
8
|
-
3. 收口用 `change finalize`(自动提交 `archive(sdd): <id>`;`--no-commit` 跳过)。
|
|
9
|
-
4. **不得**在默认分支 commit specs;已 attach 不得重复 `start`。
|
|
10
|
-
5. worktree(可选):`change start --worktree` 在独立 worktree 建分支、不动当前检出(`--base <branch>` 仅本地分支)记录分叉源;attach 缺省按运行时信号推导分叉源、偏离默认分支时输出 WARNING;finalize 目标即绑定分支时跳过合并就地收口,目标被其他 worktree 持有时自动在该 worktree 内执行(输出标注位置)。
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
## Archive 冷备引导
|
|
2
|
-
- archive 目录过大时用冷备维护(冻结 = 正文入 7z 冷备 + 以 `<YYYY-MM-DD>-<id>.yaml` 平铺索引卡替代目录,卡为单文档纯 YAML、仅含 title 与 depends_on):
|
|
3
|
-
- 预览冻结候选:`llman-sdd archive freeze --dry-run`
|
|
4
|
-
- 冻结旧归档:`llman-sdd archive freeze --before <YYYY-MM-DD> --keep-recent <N>`
|
|
5
|
-
- 列出已冻结条目:`llman-sdd archive freeze --list`
|
|
6
|
-
- 需要恢复时:`llman-sdd archive thaw --change <YYYY-MM-DD-id>`(正文解回目录并移除平铺卡)
|
|
7
|
-
- freeze/thaw 仅用于日期归档目录(`YYYY-MM-DD-*`);宜保留最近 2 个目录不冻结。
|
|
8
|
-
- 平铺索引卡常驻磁盘:title(frontmatter `title` 非空时优先,否则取 proposal H1)与 depends_on(graph 依赖边种子)可 grep、可追溯;
|
|
9
|
-
id 与日期由文件名隐含——冻结 change 的用途与依赖关系无需解冻即可查阅,正文在 7z 冷备按需取用。
|
|
10
|
-
- 在非主检出(不持有默认分支的 worktree)运行时打印警告(仅提示、不阻断)——有意为之才在该处继续。
|