@ai-content-space/loopx 0.1.5 → 0.1.6
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/README.md +16 -6
- package/README.zh-CN.md +16 -6
- package/package.json +1 -1
- package/plugins/loopx/.codex-plugin/plugin.json +1 -1
- package/plugins/loopx/skills/archive/SKILL.md +7 -4
- package/plugins/loopx/skills/autopilot/SKILL.md +1 -1
- package/plugins/loopx/skills/build/SKILL.md +3 -1
- package/plugins/loopx/skills/clarify/SKILL.md +6 -3
- package/plugins/loopx/skills/debug/SKILL.md +1 -1
- package/plugins/loopx/skills/go-style/SKILL.md +1 -1
- package/plugins/loopx/skills/kratos/SKILL.md +1 -1
- package/plugins/loopx/skills/plan/SKILL.md +28 -1
- package/plugins/loopx/skills/review/SKILL.md +3 -1
- package/plugins/loopx/skills/tdd/SKILL.md +1 -1
- package/plugins/loopx/skills/verify/SKILL.md +1 -1
- package/skills/archive/SKILL.md +7 -4
- package/skills/autopilot/SKILL.md +1 -1
- package/skills/build/SKILL.md +3 -1
- package/skills/clarify/SKILL.md +6 -3
- package/skills/debug/SKILL.md +1 -1
- package/skills/go-style/SKILL.md +1 -1
- package/skills/kratos/SKILL.md +1 -1
- package/skills/plan/SKILL.md +28 -1
- package/skills/review/SKILL.md +3 -1
- package/skills/tdd/SKILL.md +1 -1
- package/skills/verify/SKILL.md +1 -1
- package/src/workflow.mjs +83 -3
package/README.md
CHANGED
|
@@ -140,7 +140,15 @@ loopx status my-task
|
|
|
140
140
|
loopx status my-task --json
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
Planning also writes derived HTML reading views so the plan can be reviewed without another command:
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
.loopx/workflows/my-task/view/index.html
|
|
147
|
+
.loopx/workflows/my-task/view/plan.html
|
|
148
|
+
.loopx/views/index.html
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Regenerate derived HTML reading views at any time:
|
|
144
152
|
|
|
145
153
|
```bash
|
|
146
154
|
loopx render my-task
|
|
@@ -174,7 +182,7 @@ loopx repair-install
|
|
|
174
182
|
|
|
175
183
|
The CLI is primarily for runtime, debugging, status inspection, and maintenance. The normal Codex-facing product surface is the bundled skill set, for example `$clarify`, `$plan`, `$build`, `$review`, `$archive`, `$autopilot`, `$debug`, `$tdd`, `$verify`, `$go-style`, and `$kratos`.
|
|
176
184
|
|
|
177
|
-
`loopx status` remains a CLI/runtime diagnostic command rather than a Codex skill. `loopx
|
|
185
|
+
`loopx status` remains a CLI/runtime diagnostic command rather than a Codex skill. `loopx plan` automatically writes human-readable HTML views for the planned workflow and workspace index. `loopx render` regenerates those views from existing runtime artifacts; without a slug it renders every non-legacy workflow plus the workspace index. Markdown and JSON remain the canonical machine-readable and editable sources.
|
|
178
186
|
|
|
179
187
|
## Skill Routing and Governance
|
|
180
188
|
|
|
@@ -224,6 +232,8 @@ Main artifacts:
|
|
|
224
232
|
- `.loopx/workflows/<slug>/development-plan.md`
|
|
225
233
|
- `.loopx/workflows/<slug>/test-plan.md`
|
|
226
234
|
|
|
235
|
+
After a successful plan run, loopx also writes derived reading views at `.loopx/workflows/<slug>/view/index.html`, `.loopx/workflows/<slug>/view/plan.html`, and `.loopx/views/index.html`. Use these for human review; keep Markdown and JSON as the editable sources of truth.
|
|
236
|
+
|
|
227
237
|
`spec-delta.md` uses requirement deltas: `## ADDED Requirements`, `## MODIFIED Requirements`, `## REMOVED Requirements`, and `## RENAMED Requirements`. ADDED and MODIFIED entries are full `### Requirement:` blocks with SHALL/MUST language and `#### Scenario:` examples, so archive can merge them into the current long-lived spec state.
|
|
228
238
|
|
|
229
239
|
### build
|
|
@@ -367,7 +377,7 @@ loopx writes runtime state under `.loopx/` in the current project:
|
|
|
367
377
|
|
|
368
378
|
`intake` contains immutable clarify snapshots for a specific request. `workflows` contains the active runtime working set. `changes` contains the proposed change delta for the current request. `specs` contains accepted long-lived behavior after archive.
|
|
369
379
|
|
|
370
|
-
`views/` and `workflows/<slug>/view/` are derived HTML reading views
|
|
380
|
+
`views/` and `workflows/<slug>/view/` are derived HTML reading views written after `plan` and regenerated by `loopx render`. They are for human review only and are safe to regenerate; agents and tooling should continue to read and update the Markdown and JSON artifacts.
|
|
371
381
|
|
|
372
382
|
### Document Boundaries
|
|
373
383
|
|
|
@@ -377,7 +387,7 @@ Documents users normally need to watch:
|
|
|
377
387
|
- `.loopx/workflows/<slug>/spec.md`: the current requirement working copy.
|
|
378
388
|
- `.loopx/workflows/<slug>/plan.md`, `architecture.md`, `development-plan.md`, and `test-plan.md`: the current task's plan, architecture, execution, and verification contract.
|
|
379
389
|
- `.loopx/workflows/<slug>/execution-record.md` and `review-report.md`: execution evidence and review result.
|
|
380
|
-
- `.loopx/views/index.html` and `.loopx/workflows/<slug>/view/index.html`: reading entrypoints
|
|
390
|
+
- `.loopx/views/index.html` and `.loopx/workflows/<slug>/view/index.html`: reading entrypoints written after `plan` and regenerated by `loopx render`.
|
|
381
391
|
|
|
382
392
|
Documents users may read and modify as workflow fact sources:
|
|
383
393
|
|
|
@@ -394,7 +404,7 @@ Documents and data the tools depend on, or generate as derived evidence:
|
|
|
394
404
|
- `.loopx/intake/clarify-*.md`: immutable clarify snapshots for audit and traceability; do not treat them as long-lived specs.
|
|
395
405
|
- `.loopx/changes/active/<change-id>/slices.json` and `artifact-graph.json`: structured planning data consumed by build/review/archive.
|
|
396
406
|
- `.loopx/autopilot/<slug>/run.json` and `.loopx/build-active.json`: orchestration and stop-hook runtime state.
|
|
397
|
-
- `.loopx/views/` and `.loopx/workflows/<slug>/view/`: derived HTML views; they can be deleted and regenerated with `loopx render`, and should not be edited as fact sources.
|
|
407
|
+
- `.loopx/views/` and `.loopx/workflows/<slug>/view/`: derived HTML views; they are written after `plan`, can be deleted and regenerated with `loopx render`, and should not be edited as fact sources.
|
|
398
408
|
|
|
399
409
|
## Diagnostics and Repair
|
|
400
410
|
|
|
@@ -511,4 +521,4 @@ node src/cli.mjs status --json
|
|
|
511
521
|
|
|
512
522
|
## Version
|
|
513
523
|
|
|
514
|
-
Current npm package version: `0.1.
|
|
524
|
+
Current npm package version: `0.1.6`.
|
package/README.zh-CN.md
CHANGED
|
@@ -142,7 +142,15 @@ loopx status my-task
|
|
|
142
142
|
loopx status my-task --json
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
plan 完成后会自动写入派生 HTML 阅读视图,方便直接审阅计划:
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
.loopx/workflows/my-task/view/index.html
|
|
149
|
+
.loopx/workflows/my-task/view/plan.html
|
|
150
|
+
.loopx/views/index.html
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
需要时也可以重新生成派生 HTML 阅读视图:
|
|
146
154
|
|
|
147
155
|
```bash
|
|
148
156
|
loopx render my-task
|
|
@@ -176,7 +184,7 @@ loopx repair-install
|
|
|
176
184
|
|
|
177
185
|
CLI 主要用于运行时、调试、状态观察和维护。日常面向 Codex 的主入口是同名 skills,例如 `$clarify`、`$plan`、`$build`、`$review`、`$archive`、`$autopilot`、`$debug`、`$tdd`、`$verify`、`$go-style`、`$kratos`。
|
|
178
186
|
|
|
179
|
-
`loopx status` 仍然是 CLI/runtime 诊断命令,不作为单独 Codex skill 暴露。`loopx
|
|
187
|
+
`loopx status` 仍然是 CLI/runtime 诊断命令,不作为单独 Codex skill 暴露。`loopx plan` 会自动为当前计划 workflow 和工作区首页写入给人阅读的 HTML 视图。`loopx render` 会基于现有运行时产物重新生成这些视图;不传 slug 时会渲染所有非 legacy workflow 和工作区首页。Markdown 和 JSON 仍然是机器可读、可编辑的事实源。
|
|
180
188
|
|
|
181
189
|
## Skill 路由与治理
|
|
182
190
|
|
|
@@ -226,6 +234,8 @@ node scripts/verify-skills.mjs
|
|
|
226
234
|
- `.loopx/workflows/<slug>/development-plan.md`
|
|
227
235
|
- `.loopx/workflows/<slug>/test-plan.md`
|
|
228
236
|
|
|
237
|
+
plan 成功后,loopx 还会写入派生阅读视图:`.loopx/workflows/<slug>/view/index.html`、`.loopx/workflows/<slug>/view/plan.html` 和 `.loopx/views/index.html`。这些视图用于人工审阅;Markdown 和 JSON 仍然是可编辑事实源。
|
|
238
|
+
|
|
229
239
|
`spec-delta.md` 使用 requirement delta:`## ADDED Requirements`、`## MODIFIED Requirements`、`## REMOVED Requirements` 和 `## RENAMED Requirements`。ADDED / MODIFIED 必须是完整的 `### Requirement:` 块,包含 SHALL/MUST 约束和 `#### Scenario:` 场景,archive 才能把它们合并进长期 spec 当前状态。
|
|
230
240
|
|
|
231
241
|
### build
|
|
@@ -378,7 +388,7 @@ loopx 在当前项目下写入 `.loopx/`:
|
|
|
378
388
|
|
|
379
389
|
`intake` 保存一次需求的 clarify 快照;`workflows` 保存当前任务的运行时工作副本;`changes` 保存本次需求对长期行为的 change delta;`specs` 只保存 archive 后的长期领域行为契约。
|
|
380
390
|
|
|
381
|
-
`views/` 和 `workflows/<slug>/view/` 是 `loopx render`
|
|
391
|
+
`views/` 和 `workflows/<slug>/view/` 是 plan 后写入、也可由 `loopx render` 重新生成的派生 HTML 阅读视图,只服务于人的浏览和评审;agent 和工具仍应读取、修改 Markdown 与 JSON 产物。
|
|
382
392
|
|
|
383
393
|
### 文档关注边界
|
|
384
394
|
|
|
@@ -388,7 +398,7 @@ loopx 在当前项目下写入 `.loopx/`:
|
|
|
388
398
|
- `.loopx/workflows/<slug>/spec.md`:当前需求工作副本。
|
|
389
399
|
- `.loopx/workflows/<slug>/plan.md`、`architecture.md`、`development-plan.md`、`test-plan.md`:当前任务的计划、架构和验证约定。
|
|
390
400
|
- `.loopx/workflows/<slug>/execution-record.md`、`review-report.md`:执行证据和评审结论。
|
|
391
|
-
- `.loopx/views/index.html` 与 `.loopx/workflows/<slug>/view/index.html
|
|
401
|
+
- `.loopx/views/index.html` 与 `.loopx/workflows/<slug>/view/index.html`:plan 后写入、也可由 `loopx render` 重新生成的阅读入口。
|
|
392
402
|
|
|
393
403
|
用户可以阅读和按流程修改的事实源文档:
|
|
394
404
|
|
|
@@ -405,7 +415,7 @@ loopx 在当前项目下写入 `.loopx/`:
|
|
|
405
415
|
- `.loopx/intake/clarify-*.md`:clarify 快照,用于审计和追溯;不要当作长期 specs 修改。
|
|
406
416
|
- `.loopx/changes/active/<change-id>/slices.json`、`artifact-graph.json`:计划结构化数据,build/review/archive 会消费。
|
|
407
417
|
- `.loopx/autopilot/<slug>/run.json`、`.loopx/build-active.json`:编排和 stop-hook 运行态。
|
|
408
|
-
- `.loopx/views/` 和 `.loopx/workflows/<slug>/view/`:HTML
|
|
418
|
+
- `.loopx/views/` 和 `.loopx/workflows/<slug>/view/`:HTML 派生视图,plan 后自动写入,可删除后用 `loopx render` 重新生成,不应作为事实源编辑。
|
|
409
419
|
|
|
410
420
|
## 安装诊断与修复
|
|
411
421
|
|
|
@@ -522,4 +532,4 @@ node src/cli.mjs status --json
|
|
|
522
532
|
|
|
523
533
|
## 版本
|
|
524
534
|
|
|
525
|
-
当前 npm 包版本:`0.1.
|
|
535
|
+
当前 npm 包版本:`0.1.6`。
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ name: archive
|
|
|
3
3
|
description: "Archives an approved loopx change delta into long-lived specs and writes an ADR candidate after done approval. Not for active builds or unapproved reviews."
|
|
4
4
|
when_to_use: "archive, done workflow, spec delta, long-lived specs, ADR candidate, review approved, 归档, 同步规格"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
argument-hint: "<workflow slug>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ argument-hint: "<workflow slug>"
|
|
|
11
11
|
|
|
12
12
|
## Purpose
|
|
13
13
|
|
|
14
|
-
Use `archive` after a loopx workflow has reached `done
|
|
14
|
+
Use `archive` after a loopx workflow has reached `done`, or immediately after an approved review that is waiting for `review -> done` completion. It syncs the accepted change delta into long-lived `.loopx/specs/` files, archives the change staging directory, and writes an advisory ADR candidate.
|
|
15
15
|
|
|
16
16
|
The accepted delta is requirement-based, not a changelog block. Archive applies:
|
|
17
17
|
|
|
@@ -24,7 +24,7 @@ into the current long-lived `## Requirements` state for each target domain.
|
|
|
24
24
|
|
|
25
25
|
## Inputs
|
|
26
26
|
|
|
27
|
-
- `<workflow slug>` for a completed loopx workflow
|
|
27
|
+
- `<workflow slug>` for a completed loopx workflow, or for a review-approved workflow whose next route is `done`
|
|
28
28
|
|
|
29
29
|
## Behavior
|
|
30
30
|
|
|
@@ -34,9 +34,12 @@ Run:
|
|
|
34
34
|
loopx archive <slug>
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
If review already approved the workflow and the only pending transition is `review -> done`, this command consumes that completion transition before archiving. Do not ask the user to run a separate `loopx approve <slug> --from review --to done` command in that case.
|
|
38
|
+
|
|
37
39
|
Then report in Chinese:
|
|
38
40
|
|
|
39
41
|
- whether the change was archived
|
|
42
|
+
- whether `review -> done` was consumed by archive
|
|
40
43
|
- which long-lived spec files were updated
|
|
41
44
|
- the archived change path
|
|
42
45
|
- the ADR candidate path, if written
|
|
@@ -44,7 +47,7 @@ Then report in Chinese:
|
|
|
44
47
|
|
|
45
48
|
## Boundaries
|
|
46
49
|
|
|
47
|
-
- Do not run archive before
|
|
50
|
+
- Do not run archive before review has approved the workflow and routed it to `done`.
|
|
48
51
|
- Do not archive malformed requirement deltas. ADDED and MODIFIED entries must use `### Requirement:`, SHALL/MUST language, and at least one `#### Scenario:`.
|
|
49
52
|
- Do not archive when `execution-record.md` declares non-empty `remaining_scope`, `completion_claim` other than `full`, or a mismatch between `planned_scope` and `implemented_scope`; route back to build/plan instead.
|
|
50
53
|
- Do not edit implementation code.
|
|
@@ -3,7 +3,7 @@ name: autopilot
|
|
|
3
3
|
description: "Runs one bounded autonomous loopx orchestration over clarify, plan, build, and review while preserving canonical artifacts. Not for manual gate-by-gate control."
|
|
4
4
|
when_to_use: "autopilot, autonomous loopx run, end-to-end workflow, run all stages, bounded orchestration, 自动执行, 全流程"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
argument-hint: "<workflow slug>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ name: build
|
|
|
3
3
|
description: "Executes an approved loopx plan or review rework contract with evidence, verification, deslop, and regression gates. Not for unclear requirements or independent review."
|
|
4
4
|
when_to_use: "build, implement approved plan, execute PRD, --from-review, review rework, implementation fixes, 执行, 实现, 修改"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
argument-hint: "[--no-deslop] <approved PRD path or workflow slug> | --from-review <review artifact path>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -200,6 +200,8 @@ These support artifacts are runtime aids only. They must not become new canonica
|
|
|
200
200
|
<Final_Response_Contract>
|
|
201
201
|
When `build` reaches review handoff readiness, the final response must include an explicit next skill command using the execution record path:
|
|
202
202
|
|
|
203
|
+
Default review handoff after build readiness:
|
|
204
|
+
|
|
203
205
|
```text
|
|
204
206
|
Next:
|
|
205
207
|
$review .loopx/workflows/<slug>/execution-record.md
|
|
@@ -3,7 +3,7 @@ name: clarify
|
|
|
3
3
|
description: "Clarifies ambiguous loopx work into requirements, non-goals, decision boundaries, and design-ready specs before planning. Not for already-approved plans or concrete implementation tasks."
|
|
4
4
|
when_to_use: "clarify, requirements, ambiguous request, unclear scope, non-goals, decision boundaries, acceptance criteria, 需求澄清, 范围不清"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# loopx Clarify
|
|
@@ -308,8 +308,11 @@ After the clarify spec is ready:
|
|
|
308
308
|
|
|
309
309
|
Preferred explicit handoff contract:
|
|
310
310
|
|
|
311
|
-
-
|
|
312
|
-
-
|
|
311
|
+
- Default handoff after normal loopx clarify: `$plan <slug>`
|
|
312
|
+
- Conditional artifact-pinned handoff: `$plan --direct <spec-path>`
|
|
313
|
+
- Recommend `$plan --direct <spec-path>` when the user explicitly wants to plan from a specific requirements artifact, when the source is external/manual/legacy, or when multiple plausible spec files exist and the user has chosen one as the planning source of truth.
|
|
314
|
+
- Do not use `$plan --direct` to work around unclear workflow state, missing approvals, or an uncertain slug; inspect or repair the loopx runtime state instead.
|
|
315
|
+
- For the normal loopx clarify happy path, prefer `$plan <slug>` because the active workflow slug already anchors the clarify artifact and runtime state.
|
|
313
316
|
- Consumer behavior: treat the clarify spec as the source of truth for intent, non-goals, decision boundaries, constraints, and design direction; do not reopen clarification by default
|
|
314
317
|
|
|
315
318
|
`clarify` itself does not implement the feature. The handoff recommendation must name `plan` as the next workflow step.
|
|
@@ -3,7 +3,7 @@ name: debug
|
|
|
3
3
|
description: "Finds root cause for bugs, failing tests, build failures, regressions, and unexpected behavior before fixes. Not for new feature planning or routine code review."
|
|
4
4
|
when_to_use: "debug, bug, test failure, build failure, regression, unexpected behavior, root cause, 报错, 失败, 回归, 排查"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Systematic Debugging
|
|
@@ -3,7 +3,7 @@ name: go-style
|
|
|
3
3
|
description: "Applies loopx Go coding style for .go edits, tests, errors, context, naming, and interface boundaries. Not for non-Go code or Kratos-specific architecture by itself."
|
|
4
4
|
when_to_use: "go-style, Go, golang, .go files, go tests, gofmt, idiomatic Go, Go style, Go 代码"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Go Style
|
|
@@ -3,7 +3,7 @@ name: kratos
|
|
|
3
3
|
description: "Supports Go-Kratos microservices, proto/buf APIs, service/biz/data layers, middleware, auth, config, and troubleshooting. Not for generic Go style alone."
|
|
4
4
|
when_to_use: "kratos, Go-Kratos, proto, buf, service layer, biz layer, data layer, middleware, auth, config, Kratos 微服务"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Kratos
|
|
@@ -3,7 +3,7 @@ name: plan
|
|
|
3
3
|
description: "Creates a consensus-first loopx plan package with Planner, Architect, and Critic review from an approved spec. Not for unresolved requirements or direct implementation."
|
|
4
4
|
when_to_use: "plan, planning, consensus planning, PRD, architecture plan, test plan, approved clarify spec, 规划, 方案, 架构评审"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
argument-hint: "[--interactive] [--deliberate] [--direct <spec-path>] <clarified task or spec path>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -173,6 +173,14 @@ On approval, write canonical planning artifacts:
|
|
|
173
173
|
- `.loopx/changes/active/<change-id>/slices.json`
|
|
174
174
|
- `.loopx/changes/active/<change-id>/artifact-graph.json`
|
|
175
175
|
|
|
176
|
+
Also generate derived HTML reading views:
|
|
177
|
+
|
|
178
|
+
- `.loopx/workflows/<slug>/view/index.html`
|
|
179
|
+
- `.loopx/workflows/<slug>/view/plan.html`
|
|
180
|
+
- `.loopx/views/index.html`
|
|
181
|
+
|
|
182
|
+
The HTML files are derived reading views for human plan review. They are not canonical fact sources; Markdown and JSON remain authoritative.
|
|
183
|
+
|
|
176
184
|
The final plan must include:
|
|
177
185
|
|
|
178
186
|
- ADR: Decision, Drivers, Alternatives considered, Why chosen, Consequences, Follow-ups
|
|
@@ -199,6 +207,24 @@ In `--interactive` mode, ask for the next lane:
|
|
|
199
207
|
Without `--interactive`, report the approved plan and recommended next command, but do not launch execution.
|
|
200
208
|
</Consensus_Workflow>
|
|
201
209
|
|
|
210
|
+
<Final_Response_Contract>
|
|
211
|
+
Default build handoff after an approved plan package:
|
|
212
|
+
|
|
213
|
+
```text
|
|
214
|
+
Next:
|
|
215
|
+
$build .loopx/plans/prd-<slug>.md
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Use the artifact-first PRD path because it pins build to the approved plan package. Do not emit `$build <slug>` as the primary handoff when `.loopx/plans/prd-<slug>.md` is known. If execution is not approved or plan gates remain blocked, state the blocker instead of emitting a build handoff.
|
|
219
|
+
|
|
220
|
+
Also report the generated HTML reading entrypoint so the user can review the plan without running another command:
|
|
221
|
+
|
|
222
|
+
```text
|
|
223
|
+
HTML:
|
|
224
|
+
.loopx/workflows/<slug>/view/index.html
|
|
225
|
+
```
|
|
226
|
+
</Final_Response_Contract>
|
|
227
|
+
|
|
202
228
|
<Runtime_State_Machine>
|
|
203
229
|
`plan` must keep the planning gate machine-checkable. Runtime state should track:
|
|
204
230
|
|
|
@@ -249,6 +275,7 @@ Primary outputs:
|
|
|
249
275
|
- approved plan package under `.loopx/workflows/<slug>/`
|
|
250
276
|
- canonical PRD and test spec under `.loopx/plans/`
|
|
251
277
|
- change artifacts under `.loopx/changes/active/<change-id>/`
|
|
278
|
+
- derived HTML reading views under `.loopx/workflows/<slug>/view/` and `.loopx/views/`
|
|
252
279
|
- consensus review summary with Planner / Architect / Critic evidence
|
|
253
280
|
- next-step recommendation
|
|
254
281
|
|
|
@@ -3,7 +3,7 @@ name: review
|
|
|
3
3
|
description: "Reviews a loopx build execution record for acceptance, code risks, evidence quality, and architecture smells. Not for doing implementation work or replanning."
|
|
4
4
|
when_to_use: "review, code review, acceptance, go no-go, execution-record, architecture smell, build complete, 审查, 验收"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
argument-hint: "<execution-record path or workflow slug>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -65,6 +65,8 @@ Every no-go review result must end with a concrete next command block.
|
|
|
65
65
|
|
|
66
66
|
For implementation fixes:
|
|
67
67
|
|
|
68
|
+
Default implementation-fix handoff:
|
|
69
|
+
|
|
68
70
|
```text
|
|
69
71
|
Next:
|
|
70
72
|
$build --from-review .loopx/workflows/<slug>/review-report.md
|
|
@@ -3,7 +3,7 @@ name: tdd
|
|
|
3
3
|
description: "Guides feature and bugfix implementation through a failing test before production code and red-green-refactor discipline. Not for generated files or throwaway prototypes."
|
|
4
4
|
when_to_use: "tdd, failing test first, feature implementation, bugfix, regression test, red green refactor, 测试先行"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Test-Driven Development (TDD)
|
|
@@ -3,7 +3,7 @@ name: verify
|
|
|
3
3
|
description: "Requires fresh verification evidence before claiming work is complete, fixed, passing, review-ready, or ready to commit. Not for speculative confidence or stale results."
|
|
4
4
|
when_to_use: "verify, completion claim, fixed claim, tests pass, review-ready, commit, fresh evidence, 验证, 完成前检查"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Verification Before Completion
|
package/skills/archive/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: archive
|
|
|
3
3
|
description: "Archives an approved loopx change delta into long-lived specs and writes an ADR candidate after done approval. Not for active builds or unapproved reviews."
|
|
4
4
|
when_to_use: "archive, done workflow, spec delta, long-lived specs, ADR candidate, review approved, 归档, 同步规格"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
argument-hint: "<workflow slug>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ argument-hint: "<workflow slug>"
|
|
|
11
11
|
|
|
12
12
|
## Purpose
|
|
13
13
|
|
|
14
|
-
Use `archive` after a loopx workflow has reached `done
|
|
14
|
+
Use `archive` after a loopx workflow has reached `done`, or immediately after an approved review that is waiting for `review -> done` completion. It syncs the accepted change delta into long-lived `.loopx/specs/` files, archives the change staging directory, and writes an advisory ADR candidate.
|
|
15
15
|
|
|
16
16
|
The accepted delta is requirement-based, not a changelog block. Archive applies:
|
|
17
17
|
|
|
@@ -24,7 +24,7 @@ into the current long-lived `## Requirements` state for each target domain.
|
|
|
24
24
|
|
|
25
25
|
## Inputs
|
|
26
26
|
|
|
27
|
-
- `<workflow slug>` for a completed loopx workflow
|
|
27
|
+
- `<workflow slug>` for a completed loopx workflow, or for a review-approved workflow whose next route is `done`
|
|
28
28
|
|
|
29
29
|
## Behavior
|
|
30
30
|
|
|
@@ -34,9 +34,12 @@ Run:
|
|
|
34
34
|
loopx archive <slug>
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
If review already approved the workflow and the only pending transition is `review -> done`, this command consumes that completion transition before archiving. Do not ask the user to run a separate `loopx approve <slug> --from review --to done` command in that case.
|
|
38
|
+
|
|
37
39
|
Then report in Chinese:
|
|
38
40
|
|
|
39
41
|
- whether the change was archived
|
|
42
|
+
- whether `review -> done` was consumed by archive
|
|
40
43
|
- which long-lived spec files were updated
|
|
41
44
|
- the archived change path
|
|
42
45
|
- the ADR candidate path, if written
|
|
@@ -44,7 +47,7 @@ Then report in Chinese:
|
|
|
44
47
|
|
|
45
48
|
## Boundaries
|
|
46
49
|
|
|
47
|
-
- Do not run archive before
|
|
50
|
+
- Do not run archive before review has approved the workflow and routed it to `done`.
|
|
48
51
|
- Do not archive malformed requirement deltas. ADDED and MODIFIED entries must use `### Requirement:`, SHALL/MUST language, and at least one `#### Scenario:`.
|
|
49
52
|
- Do not archive when `execution-record.md` declares non-empty `remaining_scope`, `completion_claim` other than `full`, or a mismatch between `planned_scope` and `implemented_scope`; route back to build/plan instead.
|
|
50
53
|
- Do not edit implementation code.
|
|
@@ -3,7 +3,7 @@ name: autopilot
|
|
|
3
3
|
description: "Runs one bounded autonomous loopx orchestration over clarify, plan, build, and review while preserving canonical artifacts. Not for manual gate-by-gate control."
|
|
4
4
|
when_to_use: "autopilot, autonomous loopx run, end-to-end workflow, run all stages, bounded orchestration, 自动执行, 全流程"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
argument-hint: "<workflow slug>"
|
|
8
8
|
---
|
|
9
9
|
|
package/skills/build/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: build
|
|
|
3
3
|
description: "Executes an approved loopx plan or review rework contract with evidence, verification, deslop, and regression gates. Not for unclear requirements or independent review."
|
|
4
4
|
when_to_use: "build, implement approved plan, execute PRD, --from-review, review rework, implementation fixes, 执行, 实现, 修改"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
argument-hint: "[--no-deslop] <approved PRD path or workflow slug> | --from-review <review artifact path>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -200,6 +200,8 @@ These support artifacts are runtime aids only. They must not become new canonica
|
|
|
200
200
|
<Final_Response_Contract>
|
|
201
201
|
When `build` reaches review handoff readiness, the final response must include an explicit next skill command using the execution record path:
|
|
202
202
|
|
|
203
|
+
Default review handoff after build readiness:
|
|
204
|
+
|
|
203
205
|
```text
|
|
204
206
|
Next:
|
|
205
207
|
$review .loopx/workflows/<slug>/execution-record.md
|
package/skills/clarify/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: clarify
|
|
|
3
3
|
description: "Clarifies ambiguous loopx work into requirements, non-goals, decision boundaries, and design-ready specs before planning. Not for already-approved plans or concrete implementation tasks."
|
|
4
4
|
when_to_use: "clarify, requirements, ambiguous request, unclear scope, non-goals, decision boundaries, acceptance criteria, 需求澄清, 范围不清"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# loopx Clarify
|
|
@@ -308,8 +308,11 @@ After the clarify spec is ready:
|
|
|
308
308
|
|
|
309
309
|
Preferred explicit handoff contract:
|
|
310
310
|
|
|
311
|
-
-
|
|
312
|
-
-
|
|
311
|
+
- Default handoff after normal loopx clarify: `$plan <slug>`
|
|
312
|
+
- Conditional artifact-pinned handoff: `$plan --direct <spec-path>`
|
|
313
|
+
- Recommend `$plan --direct <spec-path>` when the user explicitly wants to plan from a specific requirements artifact, when the source is external/manual/legacy, or when multiple plausible spec files exist and the user has chosen one as the planning source of truth.
|
|
314
|
+
- Do not use `$plan --direct` to work around unclear workflow state, missing approvals, or an uncertain slug; inspect or repair the loopx runtime state instead.
|
|
315
|
+
- For the normal loopx clarify happy path, prefer `$plan <slug>` because the active workflow slug already anchors the clarify artifact and runtime state.
|
|
313
316
|
- Consumer behavior: treat the clarify spec as the source of truth for intent, non-goals, decision boundaries, constraints, and design direction; do not reopen clarification by default
|
|
314
317
|
|
|
315
318
|
`clarify` itself does not implement the feature. The handoff recommendation must name `plan` as the next workflow step.
|
package/skills/debug/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: debug
|
|
|
3
3
|
description: "Finds root cause for bugs, failing tests, build failures, regressions, and unexpected behavior before fixes. Not for new feature planning or routine code review."
|
|
4
4
|
when_to_use: "debug, bug, test failure, build failure, regression, unexpected behavior, root cause, 报错, 失败, 回归, 排查"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Systematic Debugging
|
package/skills/go-style/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: go-style
|
|
|
3
3
|
description: "Applies loopx Go coding style for .go edits, tests, errors, context, naming, and interface boundaries. Not for non-Go code or Kratos-specific architecture by itself."
|
|
4
4
|
when_to_use: "go-style, Go, golang, .go files, go tests, gofmt, idiomatic Go, Go style, Go 代码"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Go Style
|
package/skills/kratos/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: kratos
|
|
|
3
3
|
description: "Supports Go-Kratos microservices, proto/buf APIs, service/biz/data layers, middleware, auth, config, and troubleshooting. Not for generic Go style alone."
|
|
4
4
|
when_to_use: "kratos, Go-Kratos, proto, buf, service layer, biz layer, data layer, middleware, auth, config, Kratos 微服务"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Kratos
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: plan
|
|
|
3
3
|
description: "Creates a consensus-first loopx plan package with Planner, Architect, and Critic review from an approved spec. Not for unresolved requirements or direct implementation."
|
|
4
4
|
when_to_use: "plan, planning, consensus planning, PRD, architecture plan, test plan, approved clarify spec, 规划, 方案, 架构评审"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
argument-hint: "[--interactive] [--deliberate] [--direct <spec-path>] <clarified task or spec path>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -173,6 +173,14 @@ On approval, write canonical planning artifacts:
|
|
|
173
173
|
- `.loopx/changes/active/<change-id>/slices.json`
|
|
174
174
|
- `.loopx/changes/active/<change-id>/artifact-graph.json`
|
|
175
175
|
|
|
176
|
+
Also generate derived HTML reading views:
|
|
177
|
+
|
|
178
|
+
- `.loopx/workflows/<slug>/view/index.html`
|
|
179
|
+
- `.loopx/workflows/<slug>/view/plan.html`
|
|
180
|
+
- `.loopx/views/index.html`
|
|
181
|
+
|
|
182
|
+
The HTML files are derived reading views for human plan review. They are not canonical fact sources; Markdown and JSON remain authoritative.
|
|
183
|
+
|
|
176
184
|
The final plan must include:
|
|
177
185
|
|
|
178
186
|
- ADR: Decision, Drivers, Alternatives considered, Why chosen, Consequences, Follow-ups
|
|
@@ -199,6 +207,24 @@ In `--interactive` mode, ask for the next lane:
|
|
|
199
207
|
Without `--interactive`, report the approved plan and recommended next command, but do not launch execution.
|
|
200
208
|
</Consensus_Workflow>
|
|
201
209
|
|
|
210
|
+
<Final_Response_Contract>
|
|
211
|
+
Default build handoff after an approved plan package:
|
|
212
|
+
|
|
213
|
+
```text
|
|
214
|
+
Next:
|
|
215
|
+
$build .loopx/plans/prd-<slug>.md
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Use the artifact-first PRD path because it pins build to the approved plan package. Do not emit `$build <slug>` as the primary handoff when `.loopx/plans/prd-<slug>.md` is known. If execution is not approved or plan gates remain blocked, state the blocker instead of emitting a build handoff.
|
|
219
|
+
|
|
220
|
+
Also report the generated HTML reading entrypoint so the user can review the plan without running another command:
|
|
221
|
+
|
|
222
|
+
```text
|
|
223
|
+
HTML:
|
|
224
|
+
.loopx/workflows/<slug>/view/index.html
|
|
225
|
+
```
|
|
226
|
+
</Final_Response_Contract>
|
|
227
|
+
|
|
202
228
|
<Runtime_State_Machine>
|
|
203
229
|
`plan` must keep the planning gate machine-checkable. Runtime state should track:
|
|
204
230
|
|
|
@@ -249,6 +275,7 @@ Primary outputs:
|
|
|
249
275
|
- approved plan package under `.loopx/workflows/<slug>/`
|
|
250
276
|
- canonical PRD and test spec under `.loopx/plans/`
|
|
251
277
|
- change artifacts under `.loopx/changes/active/<change-id>/`
|
|
278
|
+
- derived HTML reading views under `.loopx/workflows/<slug>/view/` and `.loopx/views/`
|
|
252
279
|
- consensus review summary with Planner / Architect / Critic evidence
|
|
253
280
|
- next-step recommendation
|
|
254
281
|
|
package/skills/review/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: review
|
|
|
3
3
|
description: "Reviews a loopx build execution record for acceptance, code risks, evidence quality, and architecture smells. Not for doing implementation work or replanning."
|
|
4
4
|
when_to_use: "review, code review, acceptance, go no-go, execution-record, architecture smell, build complete, 审查, 验收"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
argument-hint: "<execution-record path or workflow slug>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -65,6 +65,8 @@ Every no-go review result must end with a concrete next command block.
|
|
|
65
65
|
|
|
66
66
|
For implementation fixes:
|
|
67
67
|
|
|
68
|
+
Default implementation-fix handoff:
|
|
69
|
+
|
|
68
70
|
```text
|
|
69
71
|
Next:
|
|
70
72
|
$build --from-review .loopx/workflows/<slug>/review-report.md
|
package/skills/tdd/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: tdd
|
|
|
3
3
|
description: "Guides feature and bugfix implementation through a failing test before production code and red-green-refactor discipline. Not for generated files or throwaway prototypes."
|
|
4
4
|
when_to_use: "tdd, failing test first, feature implementation, bugfix, regression test, red green refactor, 测试先行"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Test-Driven Development (TDD)
|
package/skills/verify/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: verify
|
|
|
3
3
|
description: "Requires fresh verification evidence before claiming work is complete, fixed, passing, review-ready, or ready to commit. Not for speculative confidence or stale results."
|
|
4
4
|
when_to_use: "verify, completion claim, fixed claim, tests pass, review-ready, commit, fresh evidence, 验证, 完成前检查"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Verification Before Completion
|
package/src/workflow.mjs
CHANGED
|
@@ -357,7 +357,7 @@ function buildWorkspaceReadme() {
|
|
|
357
357
|
'- `workflows/<slug>/spec.md`',
|
|
358
358
|
'- `workflows/<slug>/plan.md`, `architecture.md`, `development-plan.md`, and `test-plan.md`',
|
|
359
359
|
'- `workflows/<slug>/execution-record.md` and `review-report.md`',
|
|
360
|
-
'- `views/index.html` and `workflows/<slug>/view/index.html` after `loopx render`',
|
|
360
|
+
'- `views/index.html` and `workflows/<slug>/view/index.html` after `loopx plan` or `loopx render`',
|
|
361
361
|
'',
|
|
362
362
|
'Documents users may read and edit as workflow fact sources:',
|
|
363
363
|
'',
|
|
@@ -2508,6 +2508,28 @@ async function refreshExecutionStatus(root, state) {
|
|
|
2508
2508
|
};
|
|
2509
2509
|
}
|
|
2510
2510
|
|
|
2511
|
+
async function renderPlanReadingViews(cwd, root, state, slug) {
|
|
2512
|
+
try {
|
|
2513
|
+
const { renderHtmlViews } = await import('./html-views.mjs');
|
|
2514
|
+
const rendered = await renderHtmlViews(cwd, { slug });
|
|
2515
|
+
return {
|
|
2516
|
+
...state,
|
|
2517
|
+
html_view_status: 'written',
|
|
2518
|
+
html_view_path: rendered.workflowViewPath,
|
|
2519
|
+
workspace_view_path: rendered.workspaceViewPath,
|
|
2520
|
+
html_view_error: null,
|
|
2521
|
+
};
|
|
2522
|
+
} catch (error) {
|
|
2523
|
+
return {
|
|
2524
|
+
...state,
|
|
2525
|
+
html_view_status: 'failed',
|
|
2526
|
+
html_view_path: join(root, 'view', 'index.html'),
|
|
2527
|
+
workspace_view_path: join(resolveWorkspaceRoot(cwd), 'views', 'index.html'),
|
|
2528
|
+
html_view_error: error instanceof Error ? error.message : String(error),
|
|
2529
|
+
};
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2511
2533
|
export async function initWorkspace(cwd, { slug } = {}) {
|
|
2512
2534
|
const workspaceRoot = resolveWorkspaceRoot(cwd);
|
|
2513
2535
|
const projectConventions = await inspectProjectConventions(cwd);
|
|
@@ -2785,8 +2807,64 @@ export async function approveStage(cwd, slug, { from, to }) {
|
|
|
2785
2807
|
return { root, state: next };
|
|
2786
2808
|
}
|
|
2787
2809
|
|
|
2810
|
+
function isDoneRoute(value) {
|
|
2811
|
+
return value === TRANSITIONS.REVIEW_TO_DONE || value === STAGES.DONE;
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2814
|
+
function canArchiveConsumePendingDoneApproval(state) {
|
|
2815
|
+
if (state.current_stage !== STAGES.REVIEW) {
|
|
2816
|
+
return false;
|
|
2817
|
+
}
|
|
2818
|
+
const reviewVerdict = String(state.review_verdict || '').trim().toLowerCase();
|
|
2819
|
+
const reviewApproved = reviewVerdict === 'approve' || reviewVerdict === 'go';
|
|
2820
|
+
const routesToDone = [
|
|
2821
|
+
state.pending_user_decision,
|
|
2822
|
+
state.requested_transition,
|
|
2823
|
+
state.review_route,
|
|
2824
|
+
state.requested_transition_after_review,
|
|
2825
|
+
].some(isDoneRoute);
|
|
2826
|
+
const completionRequested = [
|
|
2827
|
+
APPROVAL_STATES.REQUESTED,
|
|
2828
|
+
APPROVAL_STATES.APPROVED,
|
|
2829
|
+
].includes(state.approval?.complete) || state.execution_approved === true || state.execution_approved_for_review === true;
|
|
2830
|
+
return reviewApproved && routesToDone && completionRequested;
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2833
|
+
async function consumePendingDoneApprovalForArchive(cwd, root, state, slug) {
|
|
2834
|
+
if (!canArchiveConsumePendingDoneApproval(state)) {
|
|
2835
|
+
return { root, state, consumed: false };
|
|
2836
|
+
}
|
|
2837
|
+
const normalized = withRecommendedAction({
|
|
2838
|
+
...state,
|
|
2839
|
+
review_verdict: 'approve',
|
|
2840
|
+
pending_user_decision: TRANSITIONS.REVIEW_TO_DONE,
|
|
2841
|
+
requested_transition: TRANSITIONS.NONE,
|
|
2842
|
+
approval: {
|
|
2843
|
+
...state.approval,
|
|
2844
|
+
review: APPROVAL_STATES.APPROVED,
|
|
2845
|
+
complete: state.approval?.complete || APPROVAL_STATES.REQUESTED,
|
|
2846
|
+
},
|
|
2847
|
+
});
|
|
2848
|
+
await writeState(root, normalized);
|
|
2849
|
+
const done = await approveStage(cwd, slug, { from: STAGES.REVIEW, to: STAGES.DONE });
|
|
2850
|
+
return {
|
|
2851
|
+
root: done.root,
|
|
2852
|
+
state: {
|
|
2853
|
+
...done.state,
|
|
2854
|
+
archive_consumed_pending_done_approval: true,
|
|
2855
|
+
},
|
|
2856
|
+
consumed: true,
|
|
2857
|
+
};
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2788
2860
|
export async function archiveStage(cwd, slug) {
|
|
2789
|
-
const
|
|
2861
|
+
const loaded = await loadWorkflowState(cwd, slug, { allowLegacy: false });
|
|
2862
|
+
const normalized = loaded.slug;
|
|
2863
|
+
let root = loaded.root;
|
|
2864
|
+
let state = loaded.state;
|
|
2865
|
+
const doneApproval = await consumePendingDoneApprovalForArchive(cwd, root, state, normalized);
|
|
2866
|
+
root = doneApproval.root;
|
|
2867
|
+
state = doneApproval.state;
|
|
2790
2868
|
if (state.current_stage !== STAGES.DONE || !state.completion_confirmed) {
|
|
2791
2869
|
throw new Error('archive_requires_done_workflow');
|
|
2792
2870
|
}
|
|
@@ -3004,7 +3082,9 @@ export async function planStage(cwd, slug, options = {}) {
|
|
|
3004
3082
|
build_context_manifest_path: buildManifest?.path || buildContextManifestPath(root),
|
|
3005
3083
|
});
|
|
3006
3084
|
await writeState(root, next);
|
|
3007
|
-
|
|
3085
|
+
const renderedNext = await renderPlanReadingViews(cwd, root, next, normalized);
|
|
3086
|
+
await writeState(root, renderedNext);
|
|
3087
|
+
return { root, state: renderedNext, architectReview, criticReview };
|
|
3008
3088
|
}
|
|
3009
3089
|
|
|
3010
3090
|
export async function buildStage(cwd, slug, options = {}) {
|