@llman-sdd/core 0.3.1 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +81 -54
- 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 +45 -22
- package/src/report/specs.ts +23 -25
- package/src/review/review.ts +45 -30
- package/src/spec/authoring.ts +147 -71
- package/src/spec/ir.ts +43 -15
- package/src/spec/keywords.ts +147 -0
- package/src/spec/migrateNative.ts +201 -0
- package/src/spec/parser.ts +95 -83
- package/src/spec/reqRegistry.ts +31 -15
- 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,65 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-specs-compact"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Compact and dedupe specs: merge redundant requirements/scenarios without changing normative behavior. Manual run only, when the user explicitly asks."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# LLMAN SDD Specs Compact
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Pipeline Position
|
|
13
|
-
|
|
14
|
-
```mermaid
|
|
15
|
-
flowchart LR
|
|
16
|
-
archive["llman-sdd-archive<br/>After archiving"] --> compact
|
|
17
|
-
compact["📎 llman-sdd-specs-compact<br/>Compact specs (maintenance)"]
|
|
18
|
-
|
|
19
|
-
style compact fill:#e8f4e8,stroke:#28a745,stroke-width:2px
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
> 📎 Maintenance tool, typically run after accumulating many archives. For daily development → `llman-sdd-propose` (Branch binding + Specs landing) / `llman-sdd-apply` (requires `readyToImplement`).
|
|
10
|
+
Compact specs without changing normative behavior. Maintenance tool, not part of the daily pipeline; typically run after many archived changes.
|
|
23
11
|
|
|
24
12
|
## Context
|
|
25
|
-
- Specs
|
|
26
|
-
-
|
|
27
|
-
- When archive history is too large, it interferes with compaction review and navigation.
|
|
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.
|
|
28
15
|
|
|
29
16
|
## Goal
|
|
30
|
-
-
|
|
31
|
-
- Form a more compact and maintainable spec structure.
|
|
17
|
+
- Merge redundant requirements/scenarios into a more compact, maintainable spec structure.
|
|
32
18
|
|
|
33
19
|
## Constraints
|
|
34
|
-
- Don't delete normative behavior without explicit replacement.
|
|
35
|
-
-
|
|
36
|
-
- Each retained requirement must have at least one valid scenario.
|
|
37
|
-
- **Editing live `llmanspec/specs/**` requires a change**: Branch binding first (`change start` / `attach`), then commit on the bound branch (Specs landing style); **never** compact-rewrite live specs on the default branch.
|
|
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.
|
|
38
22
|
|
|
39
23
|
## Workflow
|
|
40
|
-
1. Inventory
|
|
41
|
-
2. If archived history is large, run archive freeze
|
|
42
|
-
|
|
43
|
-
- Execute: `llman-sdd archive freeze --before <YYYY-MM-DD> --keep-recent <N>`
|
|
44
|
-
3. Identify overlapping items across capabilities.
|
|
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).
|
|
45
27
|
4. Produce a compaction plan (canonical requirements + keep/merge/remove decisions + migration notes).
|
|
46
|
-
5. Execute and validate (`llman-sdd validate --specs --strict
|
|
28
|
+
5. Execute and validate (`llman-sdd validate --specs --strict`).
|
|
47
29
|
|
|
48
30
|
## Decision Policy
|
|
49
|
-
- Prefer merging
|
|
50
|
-
- Only extract shared spec text when reference relationships are clear.
|
|
51
|
-
- When archive directory is noisy, suggest freezing first before compacting.
|
|
31
|
+
- Prefer merging semantically equivalent requirements; extract shared text only when references are clear; freeze first when the archive is noisy.
|
|
52
32
|
- If compaction would change external behavior, pause and ask the user first.
|
|
53
33
|
|
|
54
34
|
## Output Contract
|
|
55
|
-
-
|
|
56
|
-
- Include: keep/merge/remove decisions with rationale.
|
|
57
|
-
- Include validation commands and expected results.
|
|
58
|
-
|
|
59
|
-
> 💡 After maintenance, new work goes through the normal pipeline: `llman-sdd-propose` (Branch binding + Specs landing) → `llman-sdd-apply` (requires `readyToImplement`) → `llman-sdd-verify` → `llman-sdd-archive`.
|
|
35
|
+
- Compaction plan grouped by capability: keep/merge/remove decisions with rationale + validation commands and expected results.
|
|
60
36
|
|
|
61
|
-
|
|
62
|
-
> "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
|
|
37
|
+
{{ unit("skills/cli-footer") }}
|
|
63
38
|
|
|
64
39
|
{{ unit("skills/validation-hints") }}
|
|
65
40
|
|
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-validate"
|
|
3
|
-
description: "Validate
|
|
3
|
+
description: "Validate changes and specs; suggest actionable fixes."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# LLMAN SDD Validate
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Validate change/spec format and staleness.
|
|
11
11
|
|
|
12
12
|
## Steps
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
15
|
-
3. Use `--strict` and `--no-interactive` for CI-like checks.
|
|
16
|
-
4. If validation fails, summarize the errors and propose minimal, concrete fixes.
|
|
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.
|
|
17
15
|
{% if bdd_enabled %}
|
|
18
|
-
|
|
19
|
-
- Validate
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
- `
|
|
23
|
-
-
|
|
24
|
-
- Change JSON status fields: `stage` (draft/designed/planned/full) / `specsLanded` / `needsSpecsChange` / `readyToImplement` (`show --json`).
|
|
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 `bdd.run_command` is configured it also executes that harness by default (`--no-check` skips it, `--check` is a compat alias); a placeholder-free command runs at most once per invocation.
|
|
20
|
+
- `list --specs --json` shows `morphology` (ruleCount / ruleEnforcedCount / rulePendingCount / acceptanceCount / featureScenarioCount).
|
|
21
|
+
- Change JSON status fields: `stage` (draft/designed/planned/full) / `specsLanded` / `needsSpecsChange` / `readyToImplement` (`show --output json`).
|
|
25
22
|
{% endif %}
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
> "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
|
|
24
|
+
{{ unit("skills/cli-footer") }}
|
|
29
25
|
|
|
30
26
|
{{ unit("skills/validation-hints") }}
|
|
31
27
|
|
|
@@ -1,56 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-verify"
|
|
3
|
-
description: "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
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# LLMAN SDD Verify
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Verify that the implementation matches the change's artifacts.
|
|
11
11
|
|
|
12
12
|
## Pipeline Position
|
|
13
13
|
|
|
14
|
-
### Skill navigation (not the lifecycle; shows current skill only)
|
|
15
|
-
|
|
16
14
|
```mermaid
|
|
17
15
|
flowchart LR
|
|
18
|
-
apply["llman-sdd-apply
|
|
19
|
-
verify["
|
|
20
|
-
verify --> archive["llman-sdd-archive<br/>Archive"]
|
|
16
|
+
apply["llman-sdd-apply"] --> verify["★ llman-sdd-verify"]
|
|
17
|
+
verify --> archive["llman-sdd-archive"]
|
|
21
18
|
|
|
22
19
|
style verify fill:#fff3cd,stroke:#ffc107,stroke-width:3px
|
|
23
20
|
```
|
|
24
21
|
|
|
25
|
-
> 📍 You are in
|
|
26
|
-
> 🗺️ Skill navigation ≠ Git-native lifecycle; see brief lifecycle unit at the bottom.
|
|
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).
|
|
27
23
|
|
|
28
24
|
## Hard Constraints
|
|
29
25
|
|
|
30
|
-
- **
|
|
31
|
-
- **CRITICAL
|
|
32
|
-
- **
|
|
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> --strict` (real harness) and the project gates; MUST NOT trust gate verdicts in the implementer's report — a mismatch is CRITICAL.
|
|
29
|
+
- **`--no-check` is not evidence**: gate evidence obtained with `--no-check` → CRITICAL. Close-out runs the configured `bdd.run_command`, so do not run that command again just before close-out; the skip line printed by `--no-check` is not a pass.
|
|
30
|
+
- **Don't ask "should I continue?"**: run the full verification flow and output a complete report.
|
|
33
31
|
|
|
34
32
|
{{ unit("skills/stage-guard") }}
|
|
35
33
|
|
|
36
34
|
## Steps
|
|
37
35
|
1. Select the change id (or ask the user to pick from `llman-sdd list --json`).
|
|
38
|
-
2.
|
|
39
|
-
- `
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
- `
|
|
44
|
-
- `tasks.md` to understand what was implemented
|
|
45
|
-
- `llmanspec/changes/<id>/specs/` only if residual old docs exist — ignore; SSOT is live specs
|
|
46
|
-
4. **Dual-axis review (Standards + Spec, 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) on two axes:
|
|
47
|
-
- **Spec axis**: does the implementation satisfy the `@human` rule MUST/SHALL and the `@executable` GWT?
|
|
48
|
-
- Missing/partial behaviors, wrong implementations, and scope creep in the diff not asked for by the spec.
|
|
49
|
-
- Suggest minimal fixes or artifact updates.
|
|
50
|
-
- **Standards axis**: does the code follow `AGENTS.md` coding style + the Fowler smell baseline?
|
|
51
|
-
- **Authority priority**: `AGENTS.md` documented standard > smell baseline (repo overrides); skip anything tooling already enforces.
|
|
52
|
-
- Smells are **judgement heuristics** ("possible Feature Envy"), not hard violations.
|
|
53
|
-
- Smell baseline (each "what → fix"):
|
|
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 (when `bdd.run_command` is configured, validate executes that harness by default — `--no-check` skips it; 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:
|
|
54
42
|
|
|
55
43
|
| Smell | Fix |
|
|
56
44
|
|-------|-----|
|
|
@@ -67,29 +55,20 @@ flowchart LR
|
|
|
67
55
|
| Middle Man (just delegates) | cut it, call direct |
|
|
68
56
|
| Refused Bequest (subclass rejects most inheritance) | use composition |
|
|
69
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).
|
|
70
|
-
5. **BDD
|
|
71
|
-
- Confirm the change is
|
|
72
|
-
- `llman-sdd validate --specs`: Gherkin + `@req`/dual-write gates;
|
|
73
|
-
- Optional read-only review: `llman-sdd change diff <id>` (or `--export-patch <path>`)
|
|
74
|
-
- Check: legacy `spec.toon` / `*.feature.delta.toon` absent; if present, run toon2features first (do not invent a solidify / repair hunt).
|
|
58
|
+
5. **BDD verification** — only when `config.yaml` has a `bdd:` block:
|
|
59
|
+
- Confirm the change is branch-bound and you are on that branch.
|
|
60
|
+
- `llman-sdd validate --specs`: Gherkin + `@req`/dual-write gates; when `bdd.run_command` is configured the harness runs by default (`--no-check` skips it) 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.
|
|
75
62
|
- Next step after verify passes: `llman-sdd-archive` (not inline finalize here).
|
|
76
63
|
{% if bdd_verify_prompt %}
|
|
77
64
|
- Extra requirement: {{ bdd_verify_prompt }}
|
|
78
65
|
{% endif %}
|
|
79
|
-
6. Produce a short report:
|
|
80
|
-
|
|
81
|
-
- **WARNING** (should fix)
|
|
82
|
-
- **SUGGESTION** (nice to have)
|
|
83
|
-
7. **Human review checkpoint**: once the report has no CRITICAL findings and before suggesting archive, run `llman-sdd review`:
|
|
84
|
-
- Exit code zero → suggest `llman-sdd-archive` for finalize/archive.
|
|
85
|
-
- Non-zero exit = CRITICAL findings: fix via `llman-sdd-apply`, then re-run review; MUST NOT enter finalize/archive with CRITICAL findings open.
|
|
86
|
-
|
|
87
|
-
> 💡 Verify pass → next: `llman-sdd-archive` (archive); CRITICAL issues → go back to `llman-sdd-apply` (fix)
|
|
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.
|
|
88
68
|
|
|
89
69
|
{{ unit("skills/git-native-flow-brief") }}
|
|
90
70
|
{{ unit("skills/human-readable-summary") }}
|
|
91
|
-
|
|
92
|
-
> "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
|
|
71
|
+
{{ unit("skills/cli-footer") }}
|
|
93
72
|
|
|
94
73
|
{{ unit("skills/validation-hints") }}
|
|
95
74
|
|
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-wayfinder"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Break huge, foggy work (beyond one agent session) into a decision map, resolving decisions one at a time. Manual trigger only."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
|
+
disable-model-invocation: true
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# LLMAN SDD Wayfinder
|
|
9
10
|
|
|
10
|
-
A loose, large idea has arrived — too big for a single agent session,
|
|
11
|
-
|
|
12
|
-
It charts the path as an llman SDD **change dependency graph** (`llman-sdd graph`): each sub-work (ticket) resolves a **decision** rather than delivering a slice, worked one at a time until the way is clear.
|
|
11
|
+
A loose, large idea has arrived — too big for a single agent session, and the way from here to the **destination** isn't visible yet. This skill finds that way rather than charging ahead: it charts the path as a change dependency graph (`llman-sdd graph`), where each sub-work item (ticket) resolves a **decision** rather than delivering code, worked one at a time until the way is clear.
|
|
13
12
|
|
|
14
13
|
## Pipeline position
|
|
15
14
|
|
|
16
|
-
Auxiliary tool
|
|
17
|
-
|
|
18
|
-
> 📍 Standalone optional skill; when the map clears → `llman-sdd-propose` (collapse decisions into a buildable plan).
|
|
15
|
+
Auxiliary tool for **pre-planning large work** before the main pipeline. When the map clears → `llman-sdd-propose` to collapse decisions into an implementable plan.
|
|
19
16
|
|
|
20
17
|
## Core principles
|
|
21
18
|
|
|
22
19
|
- **Plan, don't do**: each ticket resolves a decision; the map is done when "the way is clear, no decisions left". The urge to just do the work is usually the signal you've reached the map's edge and should hand off.
|
|
23
|
-
- **Refer by name**: in
|
|
24
|
-
- **One session, one ticket
|
|
20
|
+
- **Refer by name**: in human-readable narration, refer to a ticket by its title; MUST NOT use bare ids/numbers.
|
|
21
|
+
- **One session, one ticket** (research tickets excepted).
|
|
25
22
|
|
|
26
23
|
## Map structure
|
|
27
24
|
|
|
@@ -34,7 +31,7 @@ The map's `proposal.md` structure:
|
|
|
34
31
|
<what reaching the end looks like — spec/decision/change. One or two lines.>
|
|
35
32
|
|
|
36
33
|
## Notes
|
|
37
|
-
<domain; skills each session should consult; standing preferences
|
|
34
|
+
<domain; skills each session should consult; standing preferences>
|
|
38
35
|
|
|
39
36
|
## Decisions so far
|
|
40
37
|
<!-- index: one line per closed ticket, gist + link -->
|
|
@@ -52,36 +49,35 @@ Each ticket is a child change carrying a `wayfinder:<type>` tag (in the proposal
|
|
|
52
49
|
|
|
53
50
|
- **Research (agent-driven)**: read docs/APIs/local resources to surface a fact a decision waits on. Delegate to `llman-sdd-research` in the background.
|
|
54
51
|
- **Prototype (human-in-the-loop)**: raise fidelity with a cheap, rough runnable (throwaway terminal app or UI variant).
|
|
55
|
-
- **
|
|
52
|
+
- **Deep-dive Q&A (human-in-the-loop)**: via `llman-sdd-explore`'s deep-dive branch, one question at a time. **Default type**.
|
|
56
53
|
- **Task (human or agent)**: manual work that must happen before a decision can be made (sign up for a service, move data so its shape is visible).
|
|
57
54
|
|
|
58
55
|
## Fog of war
|
|
59
56
|
|
|
60
57
|
The map is **deliberately** incomplete. The test for ticket-vs-fog: **can you state the question precisely now** (not whether you can answer it).
|
|
61
58
|
- Can state precisely → ticket (even if blocked).
|
|
62
|
-
- Cannot yet
|
|
59
|
+
- Cannot yet → **Not yet specified** (coarser than a ticket; one fog patch may graduate into several tickets or none).
|
|
63
60
|
|
|
64
61
|
## Steps
|
|
65
62
|
|
|
66
63
|
### Chart the map
|
|
67
|
-
1. **Name the destination**: use
|
|
68
|
-
2. **Breadth-first scan**:
|
|
64
|
+
1. **Name the destination**: use the deep-dive Q&A branch to pin down what this map is finding its way to.
|
|
65
|
+
2. **Breadth-first scan**: deep-dive again, fanning out rather than drilling one thread, surfacing open decisions and the first takeable steps. If **no fog surfaces** — the way is already clear, the whole effort fits one session — you don't need a map; stop and ask the user how to proceed.
|
|
69
66
|
3. **Create the map** (overview change): `llman-sdd change new <map-id>`, fill Destination/Notes, leave Decisions-so-far empty, write fog into Not yet specified.
|
|
70
|
-
4. **Create the tickets you can specify now** as child changes, then wire blocking edges with `llman-sdd graph` (
|
|
67
|
+
4. **Create the tickets you can specify now** as child changes, then wire blocking edges with `llman-sdd graph` (ids needed before cross-referencing).
|
|
71
68
|
5. Spin up `llman-sdd-research` background subagents for each research ticket.
|
|
72
69
|
6. Stop — charting is one session's work; resolve nothing by hand.
|
|
73
70
|
|
|
74
71
|
### Work through the map
|
|
75
|
-
1. Load the map (low-resolution view).
|
|
76
|
-
2. Pick a ticket (user-named or first frontier item); claim it
|
|
77
|
-
3. Resolve it — zoom as needed (read related ticket bodies, invoke skills the Notes block names). In doubt, use
|
|
72
|
+
1. Load the map (low-resolution view; don't read every ticket in full).
|
|
73
|
+
2. Pick a ticket (user-named or first frontier item); claim it by binding the branch (`change start`, or `change attach` if the branch exists). Planning docs may briefly live on the default branch; if the ticket must edit specs, land them on the bound branch.
|
|
74
|
+
3. Resolve it — zoom as needed (read related ticket bodies, invoke the skills the Notes block names). In doubt, use the deep-dive Q&A. **Do not** edit `llmanspec/specs/**` before binding.
|
|
78
75
|
4. Record the resolution: write the answer into the ticket's proposal, close it, append a one-line gist + pointer to the map's Decisions-so-far.
|
|
79
|
-
5. Add newly-surfaced tickets (create-then-wire); graduate fog
|
|
76
|
+
5. Add newly-surfaced tickets (create-then-wire); graduate fog the answer made specifiable out of Not yet specified; if the answer reveals a ticket sits beyond the destination, rule it out of scope rather than resolving it on the route.
|
|
80
77
|
|
|
81
78
|
## Output
|
|
82
|
-
Map change + child decision changes' dependency graph (`llman-sdd graph`). When the way is clear, proceed to `llman-sdd-propose`
|
|
79
|
+
Map change + child decision changes' dependency graph (`llman-sdd graph`). When the way is clear, proceed to `llman-sdd-propose` to collapse decisions into an implementable plan.
|
|
83
80
|
|
|
84
|
-
|
|
85
|
-
> "Spec" here = a `.feature` file under this project's `llmanspec/specs/`; run `llman-sdd list --specs` or `llman-sdd show <capability>`.
|
|
81
|
+
{{ unit("skills/cli-footer") }}
|
|
86
82
|
|
|
87
83
|
{{ unit("skills/structured-protocol") }}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Branch lifecycle (brief)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Skill navigation** ≠ **branch lifecycle**. Full diagram: root `AGENTS.md` or the one inside `llman-sdd-propose`.
|
|
4
4
|
|
|
5
5
|
Hard rules:
|
|
6
|
-
1. **First**
|
|
7
|
-
2. No
|
|
8
|
-
3. Close-out: `change finalize` (auto commit `archive(sdd): <id>`; `--no-commit` to skip).
|
|
9
|
-
4. **Do not** commit
|
|
6
|
+
1. **First** bind the branch (`change start` / `attach`) → full; **then** land specs (edit and commit `llmanspec/specs/**` on the bound branch).
|
|
7
|
+
2. No contract edits → `needs_specs_change: false`. Enter apply when `stage=full` and the specs-landed gate passes; `readyToImplement=true` (all gates green) is the completion signal gating verify/finalize.
|
|
8
|
+
3. Close-out: `change finalize` (auto commit `archive(sdd): <id>`; `--no-commit` to skip).
|
|
9
|
+
4. **Do not** commit specs on the default branch; if already attached, do not re-run `start`.
|
|
10
|
+
5. Worktree (optional): `change start --worktree` creates the branch in a dedicated worktree without hijacking the current checkout (`--base <branch>` records a non-default fork source); finalize runs in place when the target is held by another worktree (location annotated in output).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Branch lifecycle (full diagram)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Two layers, don't conflate them: the **branch lifecycle** (bind branch → land specs → `readyToImplement`) vs **skill navigation** (explore→propose→apply→verify→archive). Landing specs is **not** a separate skill.
|
|
4
4
|
|
|
5
5
|
```mermaid
|
|
6
6
|
flowchart TB
|
|
@@ -10,21 +10,21 @@ flowchart TB
|
|
|
10
10
|
B2["add tasks.md → planned"]
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
subgraph
|
|
13
|
+
subgraph bind["Bind branch"]
|
|
14
14
|
C{"Clean tree<br/>and on default branch?"}
|
|
15
15
|
D["change start<br/>create sdd/<id> + write branch/base_branch/base_sha"]
|
|
16
16
|
E["or manual checkout -b<br/>then change attach"]
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
subgraph specs_only["Only on this change branch"]
|
|
20
|
-
F["Edit
|
|
21
|
-
G["commit →
|
|
20
|
+
F["Edit llmanspec/specs/** (.feature)"]
|
|
21
|
+
G["commit → land specs<br/>live merge-base...HEAD includes specs paths"]
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
subgraph implement["Implement"]
|
|
24
|
+
subgraph implement["Implement & close"]
|
|
25
25
|
H["apply: code per tasks<br/>may keep editing specs"]
|
|
26
26
|
I["verify"]
|
|
27
|
-
J["finalize
|
|
27
|
+
J["finalize: merge (squash default) → rename → auto commit archive(sdd): <id><br/>specs first hit the target branch"]
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
A --> B1 --> B2 --> C
|
|
@@ -34,7 +34,17 @@ flowchart TB
|
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Hard rules:
|
|
37
|
-
1. **First** `change start` / `attach`
|
|
38
|
-
2.
|
|
39
|
-
3.
|
|
40
|
-
4. **Do not** commit
|
|
37
|
+
1. **First** `change start` / `attach` to bind the branch (enter full); **then** edit `llmanspec/specs/**` on the bound non-default branch and commit (land specs).
|
|
38
|
+
2. No contract edits → set frontmatter `needs_specs_change: false`. Enter apply when `stage=full` and the specs-landed gate passes (specsLanded ∨ needs_specs_change=false); `readyToImplement=true` (every gateChecks item green, incl. tasks-done) is the completion signal gating verify/finalize. Diff ranges are always live merge-bases; the stored `base_sha` is audit-only.
|
|
39
|
+
3. Close-out is `llman-sdd change finalize <id>`: it auto-commits `archive(sdd): <id>` (impl diff + rename in one commit); `--no-commit` skips the auto commit. Commits on the change branch are free (segmented or finalize single-shot).
|
|
40
|
+
4. **Do not** commit specs to the default branch just to satisfy the clean-tree gate; if already attached, do not re-run `start`.
|
|
41
|
+
|
|
42
|
+
Worktree decision table:
|
|
43
|
+
|
|
44
|
+
| Working style | Command | Criteria |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| Single checkout | `llman-sdd change start <id>` | On the default branch with a clean tree; switches this checkout to the new branch |
|
|
47
|
+
| Keep current checkout / parallel changes | `llman-sdd change start <id> --worktree` | Branch lives in a dedicated worktree (`sdd.worktree_root` / `sdd.worktree_naming` config; default sibling of the repo root), current checkout untouched, output includes the worktree path; pair with `--base <branch>` for a non-default fork source |
|
|
48
|
+
| Already on a feature branch (incl. manual wt/git-worktree) | `llman-sdd change attach <id>` | Branch already exists; `--base <branch>` records the fork source explicitly |
|
|
49
|
+
|
|
50
|
+
finalize target location: when the target branch is held by another worktree, `llman-sdd change finalize <id>` / `llman-sdd change archive <id>` run the merge, rename and commit inside that worktree (output includes `executed in target worktree <path>`); a dirty holding worktree aborts with disposal options and zero writes.
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# Human-Readable Summary (mandatory)
|
|
2
2
|
|
|
3
|
-
Every report, handoff, or gate output
|
|
4
|
-
with a short human-readable summary block before any machine detail:
|
|
3
|
+
Every report, handoff, or gate output MUST open with a short human-readable summary before any machine detail:
|
|
5
4
|
|
|
6
5
|
- **Verdict** — one line (e.g. "all gates green" / "2 CRITICAL found").
|
|
7
6
|
- **Risks** — up to three bullets, highest impact first.
|
|
8
7
|
- **Decisions needed** — explicit asks, or "none".
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Under ten lines; details below the fold.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
## Stage guard (`stage` / `readyToImplement`)
|
|
2
2
|
|
|
3
|
-
Decide from authoritative JSON (never from
|
|
3
|
+
Decide from authoritative JSON (never from "artifacts look complete"):
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
llman-sdd show <id> --json --type change
|
|
6
|
+
llman-sdd show <id> --output json --type change
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Read: `stage`, `specsLanded`, `needsSpecsChange`, `readyToImplement`, `gateChecks` (per-item `pass` + one-line `hint` when failing).
|
|
10
10
|
|
|
11
11
|
| Condition | Action |
|
|
12
12
|
|-----------|--------|
|
|
13
|
-
| `stage=draft` (proposal.md only) | STOP. Grow
|
|
14
|
-
| `stage=designed` (proposal + design) | Next: add tasks.md → `planned`.
|
|
15
|
-
| `stage=planned` (proposal + design + tasks) | STOP until
|
|
16
|
-
| `stage=full` and `readyToImplement=false` |
|
|
17
|
-
| `readyToImplement=true` |
|
|
13
|
+
| `stage=draft` (proposal.md only) | STOP. Grow: add design.md → designed, add tasks.md → planned, then bind the branch and land specs. Draft cannot apply/verify. If proposal+tasks exist but stage is still `draft` (tasks-without-design — design.md gates the stage): add design.md first. **Do not** create `changes/<id>/specs/`; **do not** edit specs on the default branch first. |
|
|
14
|
+
| `stage=designed` (proposal + design) | Next: add tasks.md → `planned`. Bind (`change start` / `attach`) only after planning docs are complete. |
|
|
15
|
+
| `stage=planned` (proposal + design + tasks) | STOP until bound: `change start` / `attach` → `full`. |
|
|
16
|
+
| `stage=full` and `readyToImplement=false` | Read the failing `gateChecks` items. specs-landed gate failing → land specs on the **bound branch** (edit `llmanspec/specs/**` and commit), or set `needs_specs_change: false`; **do not** re-run `change start` (lost bound-branch specs → checkout/recreate + `attach --force` if needed). specs-landed gate green but tasks-done/validate/clean-tree failing → normal mid-implementation state: proceed with apply (check off tasks); do not treat it as a landing failure. |
|
|
17
|
+
| `readyToImplement=true` | Completion signal: every gateChecks item green (tasks done + validate passed) — verify/finalize prerequisites met. `changes/<id>/specs/` is expected to be **absent** — do not treat as missing. |
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
## Context
|
|
2
|
-
- Check state before acting: change/spec status comes from `llman-sdd show/list/validate`
|
|
3
|
-
- Locate relevant specs with `llman-sdd context --task --paths` before reading spec files.
|
|
2
|
+
- Check state before acting: change/spec status comes from `llman-sdd show/list/validate`; locate relevant specs with `llman-sdd context --task --paths` before reading spec files.
|
|
4
3
|
|
|
5
4
|
## Goal
|
|
6
|
-
- Reach one verifiable outcome
|
|
5
|
+
- Reach one verifiable outcome; report result paths and validation state.
|
|
7
6
|
|
|
8
7
|
## Constraints
|
|
9
|
-
- Follow the hard rules
|
|
10
|
-
- Keep changes minimal; never force past a known validation failure.
|
|
8
|
+
- Follow the skill body's hard rules (not repeated here). Classify first: behavior-contract changes take the full SDD path, implementation-only changes take quick; when unsure choose full SDD. Keep changes minimal; never force past a known validation failure.
|
|
11
9
|
|
|
12
10
|
## Workflow
|
|
13
|
-
- Treat `llman-sdd` command output as the source of truth at every step; run `llman-sdd validate` after touching artifacts.
|
|
14
|
-
- Command details: the generated command reference below, or `llman-sdd <cmd> --help`.
|
|
11
|
+
- Treat `llman-sdd` command output as the source of truth at every step; run `llman-sdd validate` after touching artifacts. Command details: `llman-sdd <cmd> --help`.
|
|
15
12
|
|
|
16
13
|
## Decision Policy
|
|
17
14
|
- Clarify high-impact ambiguity before proceeding; verify facts yourself, ask the user only for decisions.
|
|
18
15
|
|
|
19
16
|
## Output Contract
|
|
20
|
-
- Human-readable summary first (
|
|
17
|
+
- Human-readable summary first (verdict / risks / decisions needed), machine detail after.
|
|
21
18
|
|
|
22
19
|
## Ethics Governance
|
|
23
20
|
- `ethics.risk_level`: low — reads/writes this repo and `llmanspec/` only, no outward-facing actions; a skill body may override.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Validation fixes (single-track feature-as-spec):
|
|
2
2
|
|
|
3
|
-
1) Missing header comments (`missing
|
|
4
|
-
Every capability `.feature` (`llmanspec/specs/<capability>.feature` or `llmanspec/specs/<capability>/<capability>.feature`) MUST start with:
|
|
3
|
+
1) Missing header comments (`missing # capability: header comment`): every capability `.feature` (`llmanspec/specs/<capability>.feature` or the same-named main file in a directory) MUST start with:
|
|
5
4
|
```
|
|
6
5
|
# language: zh-CN
|
|
7
6
|
# capability: <capability>
|
|
@@ -9,16 +8,13 @@ Every capability `.feature` (`llmanspec/specs/<capability>.feature` or `llmanspe
|
|
|
9
8
|
# scope: src/
|
|
10
9
|
```
|
|
11
10
|
|
|
12
|
-
2)
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
11
|
+
2) Native layout (`rule must carry an @req:<req_id> tag on the rule header`):
|
|
12
|
+
- One canonical style: `@req:<id>` on the `规则:` block header, nested `场景:` (Given/When/Then) as executable examples — the default preferred shape.
|
|
13
|
+
- Only keep a `规则:` block with no nested scenario (bare rule) for requirements that cannot be expressed programmatically or are not yet converted: free-text description, no MUST/SHALL enforcement; validate reports an aggregate count, the review `pending` signal measures it, specs-compact keeps reducing it.
|
|
14
|
+
- Legacy tags `@executable`/`@rule`/`@human`/`@manual` are gone and parse inert; when old files hit structural problems run `llman-sdd spec migrate-native`.
|
|
15
|
+
- Top-level `场景:` outside any `规则:` are plain feature-level examples: no rule handle, no warning, not part of rule accounting (native Gherkin).
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- **Branch binding** → **Specs landing**: first `change start` / `attach`, then edit live `.feature` files on the bound non-default branch and commit.
|
|
22
|
-
- Locked rules (report-only): editing/removing an existing `@human` scenario yields a WARNING and never blocks validate / change finalize / change diff; the report names the edited rule by `@req:<id>`. Control points: git branch diff plus `llman-sdd review` / `change diff` output. Legacy lock-ack metadata (frontmatter `rules_touched` / `agent_acked`, the `@agent` tag, the `--yes` ack semantics) is fully removed — no aliases, no compat layer (locked rules are report-only: a warning, never a block).
|
|
23
|
-
- Apply requires `readyToImplement=true` (or `needs_specs_change: false`). Close-out prefers `change finalize`.
|
|
24
|
-
- Do not use `change delta` / solidify / `*.feature.delta.toon`.
|
|
17
|
+
Branch guardrail:
|
|
18
|
+
- First `change start` / `attach` to bind the branch, then edit `.feature` on the bound non-default branch and commit (land specs).
|
|
19
|
+
- Locked rules (report-only): editing/removing an existing `规则:` block yields a WARNING and never blocks validate / finalize / `change diff`; the report names the rule by `@req:<id>`. Control points: git branch diff plus `llman-sdd review` / `change diff`. Legacy lock-ack metadata (frontmatter `rules_touched` / `agent_acked`, the `@agent` tag, the `--yes` ack semantics) is fully removed — no aliases, no compat layer.
|
|
20
|
+
- Enter apply when `stage=full` and the specs-landed gate passes (specsLanded ∨ `needs_specs_change: false`); verify/finalize require `readyToImplement=true` (completion signal). Close-out prefers `change finalize`.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
## Canonical Single-Track Feature Contract
|
|
1
|
+
## Canonical Single-Track Feature Contract (native Gherkin layout)
|
|
2
2
|
|
|
3
|
-
Each capability is ONE Gherkin file: flat `llmanspec/specs/<capability>.feature` (default) or directory `llmanspec/specs/<capability>/` with a same-named main file — pick one layout
|
|
4
|
-
|
|
3
|
+
Each capability is ONE Gherkin file: flat `llmanspec/specs/<capability>.feature` (default) or directory `llmanspec/specs/<capability>/` with a same-named main file — pick one layout; both at once is a conflict. It is the only spec artifact (there is no `spec.toon`).
|
|
4
|
+
|
|
5
|
+
The format is the **native Gherkin hierarchy**: `功能:` → `规则:` (the requirement: title + free-form description + `@req:<id>` handle) → nested `场景:` (executable GWT examples). This is the only canonical style; legacy tags (`@executable`/`@rule`/`@human`/`@manual`) are gone — migrate old files with `spec migrate-native`.
|
|
5
6
|
|
|
6
7
|
```gherkin
|
|
7
8
|
# language: zh-CN
|
|
@@ -11,19 +12,29 @@ It is the only spec artifact — there is no `spec.toon`.
|
|
|
11
12
|
|
|
12
13
|
功能: sample
|
|
13
14
|
|
|
14
|
-
@req:r1
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
@req:r1
|
|
16
|
+
规则: A requirement point
|
|
17
|
+
Free-text requirement (no MUST/SHALL enforcement); wrap long text across
|
|
18
|
+
lines for human/agent readability. A description line must not begin with
|
|
19
|
+
a step keyword (would be parsed as a step).
|
|
20
|
+
|
|
21
|
+
场景: An executable example
|
|
22
|
+
假如 a precondition
|
|
23
|
+
当 a trigger happens
|
|
24
|
+
那么 the outcome is observed
|
|
17
25
|
|
|
18
|
-
@req:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
@req:r2
|
|
27
|
+
规则: Not-yet-converted requirement (bare rule — counted by the aggregate nudges)
|
|
28
|
+
This description is the only carrier of the requirement today. Rules with
|
|
29
|
+
no nested scenario are counted as bare; specs-compact keeps driving them
|
|
30
|
+
down or converting them.
|
|
23
31
|
```
|
|
24
32
|
|
|
25
|
-
- Header comments (`# capability:` / `# purpose:` / `# scope:`) are REQUIRED; `scope` drives staleness.
|
|
26
|
-
-
|
|
27
|
-
- `@
|
|
28
|
-
-
|
|
29
|
-
-
|
|
33
|
+
- Header comments (`# capability:` / `# purpose:` / `# scope:`) are REQUIRED; `scope` drives staleness checks.
|
|
34
|
+
- **Executable scenarios preferred**: express behavior as nested `场景:` (`Given/When/Then`) bound to BDD step code and executed by the runner — the default. Only use a `规则:` block without executable scenarios for requirements that cannot be expressed programmatically (abstract goals, architecture decisions, governance/human judgment) or are not yet converted; record the rationale in proposal/design.
|
|
35
|
+
- `@req:<id>` lives on the `规则:` block header: the global unique requirement handle (shared by resolve-req/next-req-id/citation). Missing or duplicate ids are validate ERRORs.
|
|
36
|
+
- Rule description is free text: no MUST/SHALL enforcement; wrap long text across lines for reviewability, with no `- ` list marker (it would enter the description verbatim).
|
|
37
|
+
- Top-level `场景:` outside any `规则:` are plain feature-level examples (native Gherkin allows them; no rule handle, no warning, not part of rule accounting); rules with no nested scenario are bare rules (aggregate INFO via `--include-info`; the review `pending` signal measures them).
|
|
38
|
+
- Editing/removing an existing `规则:` block yields a WARNING only (report-only, never blocks a gate) — compare via git branch diff; the legacy lock-ack metadata `rules_touched` / `agent_acked` / `@agent` is removed with no aliases and no compat layer.
|
|
39
|
+
- Coverage tiers: enforced (has nested scenarios) / pending (bare) — `list --specs` reports both.
|
|
40
|
+
- `规则:` blocks are containers: nested `场景:` are executed by the runner; two-space indent tiers (`规则:` 2, nested `场景:` 4, steps 6).
|