@llman-sdd/core 0.8.0 → 0.8.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
CHANGED
|
@@ -28,6 +28,7 @@ flowchart LR
|
|
|
28
28
|
|
|
29
29
|
- **Single-source-of-truth driven**: `proposal.md` / `design.md` / `tasks.md` and `llmanspec/specs/**` on the branch; every behavioral-contract requirement in specs must be fulfilled.
|
|
30
30
|
- **Scope-locked**: only implement the current change's scope; never fix "unrelated issues" on the side; keep changes minimal.
|
|
31
|
+
- **Governing scope**: the SDD flow (change branch, proposal, spec-edit gates) governs the behavior-contract surface only — `llmanspec/**` and its artifact alignment (e.g. `.agents/skills` render freshness). Everything else in the repo (build scripts, CI, general docs, test implementations) follows the project's regular engineering flow with direct edits and commits; no change wrapping required. Return to the corresponding skill flow only when a change reaches behavior-contract semantics.
|
|
31
32
|
- **No guessing**: unclear requirements or specs contradicting reality → STOP and report; don't assume.
|
|
32
33
|
- **No legacy compatibility layers**: if the change requires new behavior, upgrade all call sites directly, unless tasks/proposal explicitly require compatibility.
|
|
33
34
|
- **Close-out**: this loop ends by suggesting `llman-sdd-verify`; finalize/archive belongs to `llman-sdd-archive` (do not finalize inside the self-healing loop).
|
|
@@ -44,7 +45,7 @@ flowchart LR
|
|
|
44
45
|
- Read and obey `llmanspec/config.yaml`, `AGENTS.md` (if present).
|
|
45
46
|
- `git status --porcelain`: if the tree is dirty with changes not belonging to this change → `git stash push -u -m "llman-sdd-apply autopilot backup"` first.
|
|
46
47
|
- `llman-sdd validate --all --strict`: if it fails for reasons unrelated to this change → stop and report (inconsistent artifacts prevent source-of-truth-driven implementation).
|
|
47
|
-
- **
|
|
48
|
+
- **Specs list readable**: `llman-sdd list --specs` returns the list without errors; on anomaly → stop and report.
|
|
48
49
|
|
|
49
50
|
### 1) Select the change id and check prerequisites
|
|
50
51
|
- If provided, use it; otherwise infer from context, and if ambiguous run `llman-sdd list --json` and let the user pick. Always announce "Using change: <id>" and how to override.
|
|
@@ -70,14 +71,13 @@ For each unchecked task:
|
|
|
70
71
|
4. Task unclear, blocker hit, or specs/design contradict reality → STOP and report; don't assume.
|
|
71
72
|
|
|
72
73
|
### 5) Verification and self-healing loop (after each task or batch)
|
|
73
|
-
|
|
74
|
-
- Test suite: `just test` or `cargo test --all`; format/lint: `just check` or `just lint` + `just fmt`
|
|
74
|
+
- Tests and static gates: run the verification means this repo has declared — as recorded in repo docs and configuration; for repos with `specs.check_command` configured, use the command reported by `llman-sdd config`. If the repo declares none, ask the user; never assume a specific task runner exists.
|
|
75
75
|
- Edit `llmanspec/specs/<capability>.feature` on the branch as needed (flat or directory main file; canonical native layout: `@req:<id>` on the `规则:` block header, nested `场景:` as executable examples); run `llman-sdd validate --specs` after spec edits; commit on the branch freely.
|
|
76
76
|
- SDD validation: `llman-sdd validate <id> --strict`
|
|
77
77
|
|
|
78
78
|
**Verification ladder (opt-in discipline, escalate by cost)**:
|
|
79
|
-
- L1 minimal unit:
|
|
80
|
-
- L2 targeted behavior:
|
|
79
|
+
- L1 minimal unit: the fastest declared verification means that loads the changed module directly; covers only the current change point.
|
|
80
|
+
- L2 targeted behavior: run the subset of declared verification means matching the current scenario (prefer targeted `specs.check_command` invocation when configured); reproduce the target behavior only.
|
|
81
81
|
- L3 explicit full harness: `llman-sdd validate --check` (with `specs.check_command` configured; plain `validate` no longer runs the harness).
|
|
82
82
|
- L4 close-out backstop: `change finalize` runs the real harness pre-merge — at least one full run per close-out.
|
|
83
83
|
- Self-heal loops default to L1/L2 for fast reproduction; use L3 only when full-acceptance evidence is needed; avoid paying full-suite cost needlessly.
|
|
@@ -47,7 +47,7 @@ If the user just wants to **capture an idea** ("draft a proposal", "note down X"
|
|
|
47
47
|
### 0) Preflight
|
|
48
48
|
- Read `llmanspec/config.yaml` for project context, rules, locale.
|
|
49
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
|
-
- **
|
|
50
|
+
- **Specs list readable**: `llman-sdd list --specs` returns the list without errors; on anomaly, STOP and report.
|
|
51
51
|
|
|
52
52
|
### 1) Assess change scale
|
|
53
53
|
1. Classify:
|
|
@@ -79,9 +79,9 @@ If the user just wants to **capture an idea** ("draft a proposal", "note down X"
|
|
|
79
79
|
|
|
80
80
|
### 4) Validate
|
|
81
81
|
```bash
|
|
82
|
-
llman-sdd validate <change-id>
|
|
82
|
+
llman-sdd validate <change-id>
|
|
83
83
|
```
|
|
84
|
-
|
|
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
85
|
|
|
86
86
|
### 4a) Optional BDD runner (`specs:` block)
|
|
87
87
|
- Read `llmanspec/config.yaml`. Is there a `specs:` block?
|
|
@@ -28,6 +28,7 @@ flowchart LR
|
|
|
28
28
|
|
|
29
29
|
- **唯一事实来源驱动**:`proposal.md` / `design.md` / `tasks.md` 与分支上的 `llmanspec/specs/**`;specs 的行为合约条款逐条落实。
|
|
30
30
|
- **范围锁定**:只做当前 change 范围,不得顺手修无关问题;改动保持最小。
|
|
31
|
+
- **管辖范围**:SDD 流程(change 分支、proposal、specs 编辑门)只约束行为合约面——`llmanspec/**` 及其产物对齐(如 `.agents/skills` 渲染新鲜度)。仓库其余文件(构建脚本、CI、一般文档、测试实现)按项目常规工程流程直改直提交,不经 change 包装;改动触及行为合约语义时,回到对应 skill 流程。
|
|
31
32
|
- **不得猜测**:需求不明或 specs 与现实矛盾 → STOP 报告,不自行假定。
|
|
32
33
|
- **不留旧兼容层**:change 要求改行为就全量升级到新写法,除非 tasks/proposal 明确要兼容。
|
|
33
34
|
- **收尾**:该轮以宜接 `llman-sdd-verify` 收束;finalize/archive 归 `llman-sdd-archive`(不得在自修复循环里 finalize)。
|
|
@@ -44,7 +45,7 @@ flowchart LR
|
|
|
44
45
|
- 读取并遵守 `llmanspec/config.yaml`、`AGENTS.md`(若存在)。
|
|
45
46
|
- `git status --porcelain`:工作区不干净且改动不属于本 change → 先 `git stash push -u -m "llman-sdd-apply autopilot backup"`。
|
|
46
47
|
- `llman-sdd validate --all --strict`:失败且与本 change 无关 → 停下报告(工件不一致则无法以事实来源驱动实现)。
|
|
47
|
-
-
|
|
48
|
+
- **specs 清单可读**:`llman-sdd list --specs` 返回清单且无错误;异常 → 停下报告。
|
|
48
49
|
|
|
49
50
|
### 1) 选定 change id 并查前置
|
|
50
51
|
- 已提供则直接用;否则从上下文推断,不明确就跑 `llman-sdd list --json` 让用户选。始终说明“使用变更:<id>”并告知如何覆盖。
|
|
@@ -70,14 +71,13 @@ flowchart LR
|
|
|
70
71
|
4. task 不明、遇 blocker、或 specs/design 与现实不一致 → STOP 报告,不自行假定。
|
|
71
72
|
|
|
72
73
|
### 5) 验证与自修复循环(每个 task 或每批 task 后跑一次)
|
|
73
|
-
|
|
74
|
-
- 测试集:`just test` 或 `cargo test --all`;格式/lint:`just check` 或 `just lint` + `just fmt`
|
|
74
|
+
- 测试与静态门禁:执行本仓已声明的验证手段——以仓库文档与配置记载为准;已配置 `specs.check_command` 的项目,以 `llman-sdd config` 读得的命令为准。仓库未声明时,询问用户;不假定任何具体任务工具存在。
|
|
75
75
|
- 分支上按需编辑 `llmanspec/specs/<capability>.feature`(扁平或目录主文件;统一原生分层:`@req:<id>` 挂 `规则:` 块头、嵌套 `场景:` 为可执行示例),spec 改动后跑 `llman-sdd validate --specs`;分支上可自由提交。
|
|
76
76
|
- SDD 校验:`llman-sdd validate <id> --strict`
|
|
77
77
|
|
|
78
78
|
**验证阶梯(opt-in 纪律,按成本逐级扩大)**:
|
|
79
|
-
- L1
|
|
80
|
-
- L2
|
|
79
|
+
- L1 最小单元:已声明验证手段中能直接加载被改模块的最快一层,仅覆盖当前改动点。
|
|
80
|
+
- L2 定向行为:定向执行已声明验证手段中匹配当前场景的子集(已配置 `specs.check_command` 时优先),只复现目标行为。
|
|
81
81
|
- L3 显式全量:`llman-sdd validate --check`(配置 `specs.check_command` 时执行全量 harness;缺省 validate 不再执行 harness)。
|
|
82
82
|
- L4 收口兜底:`change finalize` 预合并强制真实 harness——每次收口至少 1 次全量。
|
|
83
83
|
- 自修复循环默认用 L1/L2 快速复现;只有需要全量验收时才 L3;避免无谓白付全量成本。
|
|
@@ -47,7 +47,7 @@ flowchart LR
|
|
|
47
47
|
### 0) 预检
|
|
48
48
|
- 读 `llmanspec/config.yaml` 获取项目上下文、规则、locale。
|
|
49
49
|
- `llman-sdd validate --all --strict` 确认现有工件干净;有错误则 STOP 并报告(脏工件上叠新 change 会级联出错)。
|
|
50
|
-
-
|
|
50
|
+
- **specs 清单可读**:`llman-sdd list --specs` 返回清单且无错误;异常则 STOP 报告。
|
|
51
51
|
|
|
52
52
|
### 1) 判断变更规模
|
|
53
53
|
1. 分类:
|
|
@@ -79,9 +79,9 @@ flowchart LR
|
|
|
79
79
|
|
|
80
80
|
### 4) 校验
|
|
81
81
|
```bash
|
|
82
|
-
llman-sdd validate <change-id>
|
|
82
|
+
llman-sdd validate <change-id>
|
|
83
83
|
```
|
|
84
|
-
|
|
84
|
+
结构门必须 通过才能继续;失败项在 validate 输出的 `items[].issues[]` 逐条指明,按条修复后重跑。`--strict` 会把警告(含未勾 task)一并升级为失败——留到实施收口、task 全勾后作完成判定。
|
|
85
85
|
|
|
86
86
|
### 4a) 可选 BDD runner(`specs:` 段)
|
|
87
87
|
- 读 `llmanspec/config.yaml` 是否含 `specs:` 段:
|