@ai-content-space/loopx 0.2.2 → 0.2.3
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 +6 -1
- package/README.zh-CN.md +6 -1
- package/docs/loopx/design/loopx-skill-suite-v1-design.md +4 -3
- package/package.json +1 -1
- package/plugins/loopx/.codex-plugin/plugin.json +1 -1
- package/plugins/loopx/skills/clarify/SKILL.md +1 -1
- package/plugins/loopx/skills/debug/SKILL.md +1 -1
- package/plugins/loopx/skills/exec/SKILL.md +7 -2
- package/plugins/loopx/skills/final-review/SKILL.md +1 -1
- package/plugins/loopx/skills/finish/SKILL.md +1 -1
- package/plugins/loopx/skills/fix-review/SKILL.md +1 -1
- package/plugins/loopx/skills/go-style/SKILL.md +8 -2
- package/plugins/loopx/skills/kratos/SKILL.md +1 -1
- package/plugins/loopx/skills/plan/SKILL.md +3 -3
- package/plugins/loopx/skills/refactor-plan/SKILL.md +1 -1
- package/plugins/loopx/skills/review/SKILL.md +1 -1
- package/plugins/loopx/skills/spec/SKILL.md +1 -1
- package/plugins/loopx/skills/subagent-exec/SKILL.md +1 -1
- package/plugins/loopx/skills/subagent-exec/agents/openai.yaml +2 -2
- package/plugins/loopx/skills/subagent-exec/codex-subagents.md +1 -1
- package/plugins/loopx/skills/tdd/SKILL.md +1 -1
- package/plugins/loopx/skills/verify/SKILL.md +1 -1
- package/scripts/codex-workflow-hook.mjs +36 -5
- package/skills/clarify/SKILL.md +1 -1
- package/skills/debug/SKILL.md +1 -1
- package/skills/exec/SKILL.md +7 -2
- package/skills/final-review/SKILL.md +1 -1
- package/skills/finish/SKILL.md +1 -1
- package/skills/fix-review/SKILL.md +1 -1
- package/skills/go-style/SKILL.md +8 -2
- package/skills/kratos/SKILL.md +1 -1
- package/skills/plan/SKILL.md +3 -3
- package/skills/refactor-plan/SKILL.md +1 -1
- package/skills/review/SKILL.md +1 -1
- package/skills/spec/SKILL.md +1 -1
- package/skills/subagent-exec/SKILL.md +1 -1
- package/skills/subagent-exec/agents/openai.yaml +2 -2
- package/skills/subagent-exec/codex-subagents.md +1 -1
- package/skills/tdd/SKILL.md +1 -1
- package/skills/verify/SKILL.md +1 -1
- package/src/build-stop-gate.mjs +1 -1
- package/src/cli.mjs +5 -1
- package/src/install-discovery.mjs +0 -28
- package/src/next-skill.mjs +46 -5
- package/src/workflow.mjs +4 -4
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Recommended v1 flow:
|
|
16
16
|
|
|
17
17
|
```text
|
|
18
|
-
clarify -> spec? -> plan -> subagent-exec | exec -> review -> fix-review? -> finish
|
|
18
|
+
clarify -> spec? -> plan -> (subagent-exec | exec) -> final-review -> fix-review? -> finish
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
`spec` is conditional. Use it when API, data, state, permission, migration, compatibility, product behavior, or architecture decisions must be fixed before planning. Skip it when the remaining work is local implementation choice.
|
|
@@ -32,10 +32,13 @@ Core workflow skills:
|
|
|
32
32
|
- `subagent-exec`: execute an approved plan with fresh subagents and staged review.
|
|
33
33
|
- `exec`: execute an approved plan inline when subagents are unavailable or not desired.
|
|
34
34
|
- `review`: request independent code review against a git range and plan or requirements.
|
|
35
|
+
- `final-review`: review the completed feature for runtime, integration, and test-gap risk before finishing.
|
|
35
36
|
- `fix-review`: evaluate and implement code review feedback rigorously.
|
|
36
37
|
- `finish`: verify and choose merge, PR, keep, or discard.
|
|
37
38
|
- `refactor-plan`: interview and write a behavior-preserving refactor plan with tiny commits.
|
|
38
39
|
|
|
40
|
+
`review` and its matching `fix-review` run inside `subagent-exec` or `exec` as task/checkpoint review loops. `final-review` is the top-level whole-feature review before `finish`, and its feedback also goes through `fix-review`.
|
|
41
|
+
|
|
39
42
|
Support skills:
|
|
40
43
|
|
|
41
44
|
- `tdd`
|
|
@@ -56,6 +59,8 @@ For the v1 skill-suite workflow, human-maintained artifacts live under `docs/loo
|
|
|
56
59
|
|
|
57
60
|
`finish` may generate spec candidates in `docs/loopx/specs/` when completed work produces stable team rules. These candidates are repo-tracked and must remain visible in the git diff.
|
|
58
61
|
|
|
62
|
+
`finish` is the terminal completion step for one implementation decision. Rerun it only after keep-as-is, PR iteration, interruption before executing a choice, or new changes after review feedback. Do not rerun it after merge or discard.
|
|
63
|
+
|
|
59
64
|
Generated support state, hook diagnostics, installer metadata, HTML views, manifests, and runtime JSON remain under `.loopx/`.
|
|
60
65
|
|
|
61
66
|
Local agent memory lives under `.loopx/memory/`:
|
package/README.zh-CN.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
推荐 v1 流程:
|
|
16
16
|
|
|
17
17
|
```text
|
|
18
|
-
clarify -> spec? -> plan -> subagent-exec | exec -> review -> fix-review? -> finish
|
|
18
|
+
clarify -> spec? -> plan -> (subagent-exec | exec) -> final-review -> fix-review? -> finish
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
`spec` 是条件设计门。涉及 API、数据、状态、权限、迁移、兼容、产品行为或架构决策时使用;只剩局部实现选择时可以跳过,直接进入 `plan`。
|
|
@@ -32,10 +32,13 @@ clarify -> spec? -> plan -> subagent-exec | exec -> review -> fix-review? -> fin
|
|
|
32
32
|
- `subagent-exec`:用 fresh subagents 和 staged review 执行已批准计划。
|
|
33
33
|
- `exec`:没有 subagent 或用户选择 inline 时顺序执行计划。
|
|
34
34
|
- `review`:基于 git range 和计划/需求发起独立代码评审。
|
|
35
|
+
- `final-review`:在收尾前对完整 feature 做运行时、集成和测试缺口风险评审。
|
|
35
36
|
- `fix-review`:严谨评估并处理 code review feedback。
|
|
36
37
|
- `finish`:验证完成后选择 merge、PR、保留或丢弃。
|
|
37
38
|
- `refactor-plan`:访谈并写行为保持的 tiny-commit 重构计划。
|
|
38
39
|
|
|
40
|
+
`review` 和对应的 `fix-review` 在 `subagent-exec` 或 `exec` 内部作为 task/checkpoint review loop 运行。`final-review` 是 `finish` 前的顶层 whole-feature review,它的反馈也通过 `fix-review` 处理。
|
|
41
|
+
|
|
39
42
|
辅助 skills:
|
|
40
43
|
|
|
41
44
|
- `tdd`
|
|
@@ -56,6 +59,8 @@ v1 skill-suite 工作流的人工维护长期产物放在 `docs/loopx/`:
|
|
|
56
59
|
|
|
57
60
|
当完成的工作产生稳定团队规则时,`finish` 可以在 `docs/loopx/specs/` 生成 spec candidates。这些候选是 repo-tracked,必须保留在 git diff 中供审阅。
|
|
58
61
|
|
|
62
|
+
`finish` 是一次 implementation decision 的终端完成步骤。只有在上次选择保留、PR 迭代、执行选择前中断,或 review feedback 后出现新变更时才重新执行;merge 或 discard 后不要重复执行。
|
|
63
|
+
|
|
59
64
|
生成的支撑状态、hook 诊断、安装元数据、HTML views、manifests 和 runtime JSON 仍放在 `.loopx/` 下。
|
|
60
65
|
|
|
61
66
|
本地 agent memory 放在 `.loopx/memory/`:
|
|
@@ -14,6 +14,7 @@ The v1 product surface is the installed and governed bundled skill suite:
|
|
|
14
14
|
- `subagent-exec`
|
|
15
15
|
- `exec`
|
|
16
16
|
- `review`
|
|
17
|
+
- `final-review`
|
|
17
18
|
- `fix-review`
|
|
18
19
|
- `finish`
|
|
19
20
|
- `refactor-plan`
|
|
@@ -32,16 +33,16 @@ The repository may retain auxiliary or compatibility skill source directories fo
|
|
|
32
33
|
Recommended flow:
|
|
33
34
|
|
|
34
35
|
```text
|
|
35
|
-
clarify -> spec? -> plan -> subagent-exec | exec -> review -> fix-review? -> finish
|
|
36
|
+
clarify -> spec? -> plan -> (subagent-exec | exec) -> final-review -> fix-review? -> finish
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
`spec` is a conditional design gate. `clarify` may route directly to `plan` when the remaining questions are local implementation choices. It routes to `spec` when product behavior, APIs, state, data, permissions, migration, compatibility, or architecture decisions need to be fixed before implementation planning.
|
|
39
40
|
|
|
40
41
|
`plan` is the superpowers `writing-plans` workflow under the loopx name. It writes executable plans and offers two execution options: `subagent-exec` recommended, or `exec` inline.
|
|
41
42
|
|
|
42
|
-
`review` is the
|
|
43
|
+
`review` is the task or checkpoint code review workflow inside `subagent-exec` or `exec`. `final-review` is the top-level whole-feature runtime, integration, and test-gap review before completion. `fix-review` handles feedback from either review layer.
|
|
43
44
|
|
|
44
|
-
`finish` verifies completion, extracts local memory, proposes repo-tracked spec candidates when stable team rules emerged, then presents merge, PR, keep, or discard options.
|
|
45
|
+
`finish` verifies completion, extracts local memory, proposes repo-tracked spec candidates when stable team rules emerged, then presents merge, PR, keep, or discard options. It is the terminal completion step for one implementation decision; rerun it only after keep-as-is, PR iteration, interruption before choice execution, or new changes after review feedback. Do not rerun it after merge or discard.
|
|
45
46
|
|
|
46
47
|
## Artifacts
|
|
47
48
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ name: clarify
|
|
|
3
3
|
description: "Grills ambiguous loopx work until material questions are answered, then routes to spec or plan using a design gate. Not for clear implementation tasks, approved specs, or code changes."
|
|
4
4
|
when_to_use: "clarify, requirements, ambiguous request, unclear scope, non-goals, decision boundaries, acceptance criteria, 需求澄清, 范围不清"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# loopx Clarify
|
|
@@ -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.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Systematic Debugging
|
|
@@ -3,7 +3,7 @@ name: exec
|
|
|
3
3
|
description: "Executes a written loopx implementation plan sequentially with review checkpoints. Not for unclear plans, missing requirements, or subagent-first execution."
|
|
4
4
|
when_to_use: "written implementation plan, inline execution, sequential plan execution, review checkpoints, no subagent lane"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Exec
|
|
@@ -35,9 +35,12 @@ For each task:
|
|
|
35
35
|
### Step 3: Complete Development
|
|
36
36
|
|
|
37
37
|
After all tasks complete and verified:
|
|
38
|
+
- Announce: "I'm using the final-review skill to review the completed feature."
|
|
39
|
+
- **REQUIRED SUB-SKILL:** Use loopx:final-review
|
|
40
|
+
- If final-review finds Critical or Important issues, use loopx:fix-review to handle feedback before proceeding
|
|
38
41
|
- Announce: "I'm using the finish skill to complete this work."
|
|
39
42
|
- **REQUIRED SUB-SKILL:** Use loopx:finish
|
|
40
|
-
- Follow
|
|
43
|
+
- Follow finish to verify tests, present options, execute choice
|
|
41
44
|
|
|
42
45
|
## When to Stop and Ask for Help
|
|
43
46
|
|
|
@@ -68,4 +71,6 @@ After all tasks complete and verified:
|
|
|
68
71
|
|
|
69
72
|
**Required workflow skills:**
|
|
70
73
|
- **loopx:plan** - Creates the plan this skill executes
|
|
74
|
+
- **loopx:final-review** - Final whole-feature runtime and integration risk review
|
|
75
|
+
- **loopx:fix-review** - Handles final-review feedback before finish
|
|
71
76
|
- **loopx:finish** - Complete development after all tasks
|
|
@@ -3,7 +3,7 @@ name: final-review
|
|
|
3
3
|
description: "Performs whole-feature review after implementation and staged task review. Not for per-task review, unresolved scope, implementation, or pure documentation polish."
|
|
4
4
|
when_to_use: "final-review, final code review, whole feature review, integration review, pre-finish review, after subagent-exec, runtime risk review, 最终评审"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Final Review
|
|
@@ -3,7 +3,7 @@ name: finish
|
|
|
3
3
|
description: "Finishes completed loopx development work after tests pass by presenting merge, PR, keep, or discard options. Not for unfinished work or failing verification."
|
|
4
4
|
when_to_use: "implementation complete, tests pass, finish branch, create pull request, merge locally, keep branch, discard work"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Finish
|
|
@@ -3,7 +3,7 @@ name: fix-review
|
|
|
3
3
|
description: "Handles received code review feedback with verification, technical evaluation, pushback, and one-item-at-a-time fixes. Not for requesting a new review or implementing unrelated changes."
|
|
4
4
|
when_to_use: "fix-review, received code review feedback, review comments, reviewer suggestions, requested changes, 处理评审意见"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Fix Review
|
|
@@ -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.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Go Style
|
|
@@ -59,7 +59,13 @@ Choose the one already used in the codebase.
|
|
|
59
59
|
|
|
60
60
|
- Exported symbols should have Go doc comments that start with the symbol name.
|
|
61
61
|
- Short local comments are acceptable when they explain why, not what.
|
|
62
|
-
- Prefer complete sentences for package, exported type, exported function, and non-obvious behavior comments.
|
|
62
|
+
- Prefer complete sentences for package, exported type, exported function, exported method, and non-obvious behavior comments.
|
|
63
|
+
- Match new comments to the user's requested language. If the user asks in Chinese or explicitly requests Chinese comments, write new comments in Chinese while preserving Go doc naming conventions such as `// UserService ...` and `// CreateUser ...`.
|
|
64
|
+
- Do not translate existing comments unless the user explicitly asks for translation; preserve the surrounding file's established comment language when no user preference is stated.
|
|
65
|
+
- Remove comments that only restate syntax, names, or immediately obvious control flow.
|
|
66
|
+
- Add comments for non-obvious business rules, ordering constraints, compatibility behavior, concurrency assumptions, performance tradeoffs, and external API quirks.
|
|
67
|
+
- Check nearby existing comments when behavior changes; stale comments are worse than missing comments.
|
|
68
|
+
- Prefer clearer names, smaller functions, or stronger types over comments that explain avoidable confusion.
|
|
63
69
|
|
|
64
70
|
## Verification
|
|
65
71
|
|
|
@@ -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.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Kratos
|
|
@@ -3,7 +3,7 @@ name: plan
|
|
|
3
3
|
description: "Creates bite-sized implementation plans from approved requirements, clarify output, or design specs with exact files, tests, commands, expected output, and execution handoff. Not for unresolved requirements, design decisions, PRD generation, or code changes."
|
|
4
4
|
when_to_use: "plan, implementation plan, execution plan, task breakdown, approved requirements, approved design spec, docs/loopx/design, 实施计划, 执行计划, 任务拆分"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
argument-hint: "<design spec path or feature name>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -156,13 +156,13 @@ Plan complete and saved to `docs/loopx/plans/<filename>.md`.
|
|
|
156
156
|
|
|
157
157
|
Two execution options:
|
|
158
158
|
|
|
159
|
-
1. Subagent
|
|
159
|
+
1. Subagent Exec (recommended) - dispatch a fresh subagent per task, review between tasks, fast iteration
|
|
160
160
|
2. Inline Execution - execute tasks in this session using exec, batch execution with checkpoints
|
|
161
161
|
|
|
162
162
|
Which approach?
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
If Subagent
|
|
165
|
+
If Subagent Exec is chosen:
|
|
166
166
|
|
|
167
167
|
- REQUIRED SUB-SKILL: Use `loopx:subagent-exec`
|
|
168
168
|
- Fresh subagent per task plus two-stage review
|
|
@@ -3,7 +3,7 @@ name: refactor-plan
|
|
|
3
3
|
description: "Creates a behavior-preserving refactor plan with user interview, repo evidence, tiny commits, scope boundaries, and testing decisions. Not for feature changes or immediate implementation."
|
|
4
4
|
when_to_use: "refactor-plan, refactor request, refactoring RFC, tiny commits, behavior-preserving cleanup, architecture cleanup, 重构计划"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
This skill will be invoked when the user wants to create a refactor request. You should go through the steps below. You may skip steps if you don't consider them necessary.
|
|
@@ -3,7 +3,7 @@ name: review
|
|
|
3
3
|
description: "Dispatches a loopx code reviewer subagent against a concrete git range and requirements. Not for implementation, planning, or unresolved review scope."
|
|
4
4
|
when_to_use: "request code review, completed task review, major feature review, pre-merge review, subagent code quality check"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Review
|
|
@@ -3,7 +3,7 @@ name: spec
|
|
|
3
3
|
description: "Writes software design specs from already-clarified requirements, including solution approach, architecture outline, detailed design, tradeoffs, verification design, and handoff context. Not for unresolved requirements, PRD generation, implementation task planning, or code changes."
|
|
4
4
|
when_to_use: "spec, design spec, technical design, design proposal, detailed design, architecture design, 设计方案, 概要设计, 详细设计, 技术方案"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# loopx Spec
|
|
@@ -3,7 +3,7 @@ name: subagent-exec
|
|
|
3
3
|
description: "Executes approved loopx implementation plans with fresh subagents per independent task and staged review. Not for planning, unclear requirements, or tightly coupled edits."
|
|
4
4
|
when_to_use: "approved implementation plan, independent tasks, subagent execution, staged spec review, code quality review, parallel-capable execution"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Subagent Exec
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
interface:
|
|
2
|
-
display_name: "Subagent
|
|
3
|
-
short_description: "Execute
|
|
2
|
+
display_name: "Subagent Exec"
|
|
3
|
+
short_description: "Execute loopx plans with staged subagent reviews"
|
|
@@ -17,7 +17,7 @@ Use this reference before executing this skill in Codex.
|
|
|
17
17
|
|
|
18
18
|
Subagent dispatch requires Codex multi-agent support. If `spawn_agent`,
|
|
19
19
|
`wait_agent`, or `close_agent` are unavailable, do not pretend this skill ran
|
|
20
|
-
as subagent-
|
|
20
|
+
as subagent-exec. Use `loopx:exec` instead.
|
|
21
21
|
|
|
22
22
|
Codex environments that require explicit feature flags should enable:
|
|
23
23
|
|
|
@@ -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.2.
|
|
6
|
+
version: "0.2.3"
|
|
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.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Verification Before Completion
|
|
@@ -31,7 +31,6 @@ function nextSkill(state) {
|
|
|
31
31
|
if (!state || !state.slug) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
|
-
const reviewBuildCommand = `$build --from-review .loopx/workflows/${state.slug}/review-report.md`;
|
|
35
34
|
if (isClarifyReadyForPlan(state)) {
|
|
36
35
|
return `$plan ${state.slug}`;
|
|
37
36
|
}
|
|
@@ -51,7 +50,7 @@ function nextSkill(state) {
|
|
|
51
50
|
&& state.current_stage === 'plan'
|
|
52
51
|
&& Array.isArray(state.plan_blockers)
|
|
53
52
|
&& state.plan_blockers.length === 0) {
|
|
54
|
-
return `$
|
|
53
|
+
return `$subagent-exec .loopx/plans/requirements-snapshot-${state.slug}.md`;
|
|
55
54
|
}
|
|
56
55
|
if (state.current_stage === 'build'
|
|
57
56
|
&& state.stage_status === 'awaiting-approval'
|
|
@@ -71,13 +70,13 @@ function nextSkill(state) {
|
|
|
71
70
|
|| state.approval?.build === 'requested'
|
|
72
71
|
|| state.approval?.build === 'approved'
|
|
73
72
|
)) {
|
|
74
|
-
return
|
|
73
|
+
return null;
|
|
75
74
|
}
|
|
76
75
|
if (state.current_stage === 'review'
|
|
77
76
|
&& state.review_verdict === 'request-changes'
|
|
78
77
|
&& state.requested_transition === 'review->build'
|
|
79
78
|
&& state.approval?.build === 'approved') {
|
|
80
|
-
return
|
|
79
|
+
return null;
|
|
81
80
|
}
|
|
82
81
|
if (state.current_stage === 'review'
|
|
83
82
|
&& state.review_verdict === 'request-changes'
|
|
@@ -94,6 +93,36 @@ function nextSkill(state) {
|
|
|
94
93
|
return null;
|
|
95
94
|
}
|
|
96
95
|
|
|
96
|
+
function nextCli(state) {
|
|
97
|
+
if (!state || !state.slug) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
if (state.stage_status === 'awaiting-approval'
|
|
101
|
+
&& state.current_stage === 'plan'
|
|
102
|
+
&& Array.isArray(state.plan_blockers)
|
|
103
|
+
&& state.plan_blockers.length === 0) {
|
|
104
|
+
return `loopx build .loopx/plans/requirements-snapshot-${state.slug}.md`;
|
|
105
|
+
}
|
|
106
|
+
if (state.current_stage === 'review'
|
|
107
|
+
&& state.review_verdict === 'request-changes'
|
|
108
|
+
&& state.rollback_target === 'build'
|
|
109
|
+
&& (
|
|
110
|
+
state.pending_user_decision === 'review->build'
|
|
111
|
+
|| state.requested_transition === 'review->build'
|
|
112
|
+
|| state.approval?.build === 'requested'
|
|
113
|
+
|| state.approval?.build === 'approved'
|
|
114
|
+
)) {
|
|
115
|
+
return `loopx build --from-review .loopx/workflows/${state.slug}/review-report.md`;
|
|
116
|
+
}
|
|
117
|
+
if (state.current_stage === 'review'
|
|
118
|
+
&& state.review_verdict === 'request-changes'
|
|
119
|
+
&& state.requested_transition === 'review->build'
|
|
120
|
+
&& state.approval?.build === 'approved') {
|
|
121
|
+
return `loopx build --from-review .loopx/workflows/${state.slug}/review-report.md`;
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
|
|
97
126
|
function blockers(state) {
|
|
98
127
|
const values = [
|
|
99
128
|
...(Array.isArray(state.plan_blockers) ? state.plan_blockers : []),
|
|
@@ -134,7 +163,7 @@ function nextActionLine(state, workflow) {
|
|
|
134
163
|
if (isClarifyReadyForPlan(state) && state.approval?.plan !== 'approved') {
|
|
135
164
|
return `approve clarify -> plan, then $plan ${state.slug || workflow}`;
|
|
136
165
|
}
|
|
137
|
-
return nextSkill(state) || state.recommended_next_action || 'none';
|
|
166
|
+
return nextSkill(state) || nextCli(state) || state.recommended_next_action || 'none';
|
|
138
167
|
}
|
|
139
168
|
|
|
140
169
|
function implementationGateLines(state) {
|
|
@@ -228,6 +257,8 @@ try {
|
|
|
228
257
|
`loopx workflow: ${state.slug || workflow}`,
|
|
229
258
|
`stage: ${stageText(state)}`,
|
|
230
259
|
`next: ${nextActionLine(state, workflow)}`,
|
|
260
|
+
`next skill: ${nextSkill(state) || '(none)'}`,
|
|
261
|
+
`next cli: ${nextCli(state) || '(none)'}`,
|
|
231
262
|
`blockers: ${blockers(state)}`,
|
|
232
263
|
...implementationGateLines(state),
|
|
233
264
|
`approval: ${JSON.stringify(state.approval || {})}`,
|
package/skills/clarify/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: clarify
|
|
|
3
3
|
description: "Grills ambiguous loopx work until material questions are answered, then routes to spec or plan using a design gate. Not for clear implementation tasks, approved specs, or code changes."
|
|
4
4
|
when_to_use: "clarify, requirements, ambiguous request, unclear scope, non-goals, decision boundaries, acceptance criteria, 需求澄清, 范围不清"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# loopx Clarify
|
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.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Systematic Debugging
|
package/skills/exec/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: exec
|
|
|
3
3
|
description: "Executes a written loopx implementation plan sequentially with review checkpoints. Not for unclear plans, missing requirements, or subagent-first execution."
|
|
4
4
|
when_to_use: "written implementation plan, inline execution, sequential plan execution, review checkpoints, no subagent lane"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Exec
|
|
@@ -35,9 +35,12 @@ For each task:
|
|
|
35
35
|
### Step 3: Complete Development
|
|
36
36
|
|
|
37
37
|
After all tasks complete and verified:
|
|
38
|
+
- Announce: "I'm using the final-review skill to review the completed feature."
|
|
39
|
+
- **REQUIRED SUB-SKILL:** Use loopx:final-review
|
|
40
|
+
- If final-review finds Critical or Important issues, use loopx:fix-review to handle feedback before proceeding
|
|
38
41
|
- Announce: "I'm using the finish skill to complete this work."
|
|
39
42
|
- **REQUIRED SUB-SKILL:** Use loopx:finish
|
|
40
|
-
- Follow
|
|
43
|
+
- Follow finish to verify tests, present options, execute choice
|
|
41
44
|
|
|
42
45
|
## When to Stop and Ask for Help
|
|
43
46
|
|
|
@@ -68,4 +71,6 @@ After all tasks complete and verified:
|
|
|
68
71
|
|
|
69
72
|
**Required workflow skills:**
|
|
70
73
|
- **loopx:plan** - Creates the plan this skill executes
|
|
74
|
+
- **loopx:final-review** - Final whole-feature runtime and integration risk review
|
|
75
|
+
- **loopx:fix-review** - Handles final-review feedback before finish
|
|
71
76
|
- **loopx:finish** - Complete development after all tasks
|
|
@@ -3,7 +3,7 @@ name: final-review
|
|
|
3
3
|
description: "Performs whole-feature review after implementation and staged task review. Not for per-task review, unresolved scope, implementation, or pure documentation polish."
|
|
4
4
|
when_to_use: "final-review, final code review, whole feature review, integration review, pre-finish review, after subagent-exec, runtime risk review, 最终评审"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Final Review
|
package/skills/finish/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: finish
|
|
|
3
3
|
description: "Finishes completed loopx development work after tests pass by presenting merge, PR, keep, or discard options. Not for unfinished work or failing verification."
|
|
4
4
|
when_to_use: "implementation complete, tests pass, finish branch, create pull request, merge locally, keep branch, discard work"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Finish
|
|
@@ -3,7 +3,7 @@ name: fix-review
|
|
|
3
3
|
description: "Handles received code review feedback with verification, technical evaluation, pushback, and one-item-at-a-time fixes. Not for requesting a new review or implementing unrelated changes."
|
|
4
4
|
when_to_use: "fix-review, received code review feedback, review comments, reviewer suggestions, requested changes, 处理评审意见"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Fix Review
|
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.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Go Style
|
|
@@ -59,7 +59,13 @@ Choose the one already used in the codebase.
|
|
|
59
59
|
|
|
60
60
|
- Exported symbols should have Go doc comments that start with the symbol name.
|
|
61
61
|
- Short local comments are acceptable when they explain why, not what.
|
|
62
|
-
- Prefer complete sentences for package, exported type, exported function, and non-obvious behavior comments.
|
|
62
|
+
- Prefer complete sentences for package, exported type, exported function, exported method, and non-obvious behavior comments.
|
|
63
|
+
- Match new comments to the user's requested language. If the user asks in Chinese or explicitly requests Chinese comments, write new comments in Chinese while preserving Go doc naming conventions such as `// UserService ...` and `// CreateUser ...`.
|
|
64
|
+
- Do not translate existing comments unless the user explicitly asks for translation; preserve the surrounding file's established comment language when no user preference is stated.
|
|
65
|
+
- Remove comments that only restate syntax, names, or immediately obvious control flow.
|
|
66
|
+
- Add comments for non-obvious business rules, ordering constraints, compatibility behavior, concurrency assumptions, performance tradeoffs, and external API quirks.
|
|
67
|
+
- Check nearby existing comments when behavior changes; stale comments are worse than missing comments.
|
|
68
|
+
- Prefer clearer names, smaller functions, or stronger types over comments that explain avoidable confusion.
|
|
63
69
|
|
|
64
70
|
## Verification
|
|
65
71
|
|
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.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Kratos
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: plan
|
|
|
3
3
|
description: "Creates bite-sized implementation plans from approved requirements, clarify output, or design specs with exact files, tests, commands, expected output, and execution handoff. Not for unresolved requirements, design decisions, PRD generation, or code changes."
|
|
4
4
|
when_to_use: "plan, implementation plan, execution plan, task breakdown, approved requirements, approved design spec, docs/loopx/design, 实施计划, 执行计划, 任务拆分"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
argument-hint: "<design spec path or feature name>"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -156,13 +156,13 @@ Plan complete and saved to `docs/loopx/plans/<filename>.md`.
|
|
|
156
156
|
|
|
157
157
|
Two execution options:
|
|
158
158
|
|
|
159
|
-
1. Subagent
|
|
159
|
+
1. Subagent Exec (recommended) - dispatch a fresh subagent per task, review between tasks, fast iteration
|
|
160
160
|
2. Inline Execution - execute tasks in this session using exec, batch execution with checkpoints
|
|
161
161
|
|
|
162
162
|
Which approach?
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
If Subagent
|
|
165
|
+
If Subagent Exec is chosen:
|
|
166
166
|
|
|
167
167
|
- REQUIRED SUB-SKILL: Use `loopx:subagent-exec`
|
|
168
168
|
- Fresh subagent per task plus two-stage review
|
|
@@ -3,7 +3,7 @@ name: refactor-plan
|
|
|
3
3
|
description: "Creates a behavior-preserving refactor plan with user interview, repo evidence, tiny commits, scope boundaries, and testing decisions. Not for feature changes or immediate implementation."
|
|
4
4
|
when_to_use: "refactor-plan, refactor request, refactoring RFC, tiny commits, behavior-preserving cleanup, architecture cleanup, 重构计划"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
This skill will be invoked when the user wants to create a refactor request. You should go through the steps below. You may skip steps if you don't consider them necessary.
|
package/skills/review/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: review
|
|
|
3
3
|
description: "Dispatches a loopx code reviewer subagent against a concrete git range and requirements. Not for implementation, planning, or unresolved review scope."
|
|
4
4
|
when_to_use: "request code review, completed task review, major feature review, pre-merge review, subagent code quality check"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Review
|
package/skills/spec/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: spec
|
|
|
3
3
|
description: "Writes software design specs from already-clarified requirements, including solution approach, architecture outline, detailed design, tradeoffs, verification design, and handoff context. Not for unresolved requirements, PRD generation, implementation task planning, or code changes."
|
|
4
4
|
when_to_use: "spec, design spec, technical design, design proposal, detailed design, architecture design, 设计方案, 概要设计, 详细设计, 技术方案"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# loopx Spec
|
|
@@ -3,7 +3,7 @@ name: subagent-exec
|
|
|
3
3
|
description: "Executes approved loopx implementation plans with fresh subagents per independent task and staged review. Not for planning, unclear requirements, or tightly coupled edits."
|
|
4
4
|
when_to_use: "approved implementation plan, independent tasks, subagent execution, staged spec review, code quality review, parallel-capable execution"
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Subagent Exec
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
interface:
|
|
2
|
-
display_name: "Subagent
|
|
3
|
-
short_description: "Execute
|
|
2
|
+
display_name: "Subagent Exec"
|
|
3
|
+
short_description: "Execute loopx plans with staged subagent reviews"
|
|
@@ -17,7 +17,7 @@ Use this reference before executing this skill in Codex.
|
|
|
17
17
|
|
|
18
18
|
Subagent dispatch requires Codex multi-agent support. If `spawn_agent`,
|
|
19
19
|
`wait_agent`, or `close_agent` are unavailable, do not pretend this skill ran
|
|
20
|
-
as subagent-
|
|
20
|
+
as subagent-exec. Use `loopx:exec` instead.
|
|
21
21
|
|
|
22
22
|
Codex environments that require explicit feature flags should enable:
|
|
23
23
|
|
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.2.
|
|
6
|
+
version: "0.2.3"
|
|
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.2.
|
|
6
|
+
version: "0.2.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Verification Before Completion
|
package/src/build-stop-gate.mjs
CHANGED
|
@@ -73,7 +73,7 @@ export function evaluateBuildStopGate(state) {
|
|
|
73
73
|
const delegationCount = Number.isFinite(Number(state.active_delegation_count)) ? Number(state.active_delegation_count) : null;
|
|
74
74
|
const delegationText = delegationCount !== null ? ` active delegations=${delegationCount}.` : '';
|
|
75
75
|
const auditText = state.completion_audit_status ? ` completion audit: ${state.completion_audit_status}.` : '';
|
|
76
|
-
const nextAction = state.next_action ? ` next action: ${state.next_action}` : ' next action: continue the contract-covered
|
|
76
|
+
const nextAction = state.next_action ? ` next action: ${state.next_action}` : ' next action: continue the contract-covered loopx build step.';
|
|
77
77
|
const completionSignal = state.completion_signal ? ` completion signal: ${state.completion_signal}` : ' completion signal: review handoff readiness, a real blocker, user stop, or a return to plan/clarify.';
|
|
78
78
|
return {
|
|
79
79
|
allow: false,
|
package/src/cli.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { createInterface } from 'node:readline/promises';
|
|
|
6
6
|
import { archiveStage, autopilotStage, approveStage, buildStage, clarifyStage, initWorkspace, planStage, reviewStage, statusSummary } from './workflow.mjs';
|
|
7
7
|
import { renderHtmlViews } from './html-views.mjs';
|
|
8
8
|
import { installBundledSkills, installSkillsForTargets } from './install-discovery.mjs';
|
|
9
|
-
import { nextSkillCommand, withNextSkill } from './next-skill.mjs';
|
|
9
|
+
import { nextCliCommand, nextSkillCommand, withNextSkill } from './next-skill.mjs';
|
|
10
10
|
import { doctorRuntime, migrateLegacyRuntime } from './runtime-maintenance.mjs';
|
|
11
11
|
import { setupWorkspaceContext } from './workspace-context.mjs';
|
|
12
12
|
|
|
@@ -178,6 +178,10 @@ function printHumanStatus(status) {
|
|
|
178
178
|
if (nextSkill) {
|
|
179
179
|
console.log(`next skill: ${nextSkill}`);
|
|
180
180
|
}
|
|
181
|
+
const nextCli = nextCliCommand(status.state);
|
|
182
|
+
if (nextCli) {
|
|
183
|
+
console.log(`next cli: ${nextCli}`);
|
|
184
|
+
}
|
|
181
185
|
console.log(`next: ${status.next_action}`);
|
|
182
186
|
}
|
|
183
187
|
|
|
@@ -31,18 +31,6 @@ const LOOPX_SKILLS = [
|
|
|
31
31
|
'go-style',
|
|
32
32
|
'kratos',
|
|
33
33
|
];
|
|
34
|
-
const LOOPX_LEGACY_SKILLS = [
|
|
35
|
-
'build',
|
|
36
|
-
'autopilot',
|
|
37
|
-
'archive',
|
|
38
|
-
'writing-plans',
|
|
39
|
-
'executing-plans',
|
|
40
|
-
'subagent-driven-development',
|
|
41
|
-
'requesting-code-review',
|
|
42
|
-
'receiving-code-review',
|
|
43
|
-
'finishing-a-development-branch',
|
|
44
|
-
'request-refactor-plan',
|
|
45
|
-
];
|
|
46
34
|
const LOOPX_INSTALLATION_IDENTITY = 'loopx';
|
|
47
35
|
const LOOPX_MANAGED_SCRIPT_ITEMS = [
|
|
48
36
|
{
|
|
@@ -453,20 +441,6 @@ async function removeStaleOwnedInstall(currentRow) {
|
|
|
453
441
|
await removeInstalledSkill(currentRow.installedPath);
|
|
454
442
|
}
|
|
455
443
|
|
|
456
|
-
async function pruneLegacyLoopxOwnedSkills(nextData, env = process.env) {
|
|
457
|
-
const pruned = [];
|
|
458
|
-
for (const skillName of LOOPX_LEGACY_SKILLS) {
|
|
459
|
-
const row = nextData.skills?.[skillName];
|
|
460
|
-
if (!isLoopxOwnedIdentity(skillName, row, env)) {
|
|
461
|
-
continue;
|
|
462
|
-
}
|
|
463
|
-
await removeStaleOwnedInstall(row);
|
|
464
|
-
delete nextData.skills[skillName];
|
|
465
|
-
pruned.push({ skillName, installedPath: row.installedPath });
|
|
466
|
-
}
|
|
467
|
-
return pruned;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
444
|
async function removeInstalledFile(path) {
|
|
471
445
|
if (!existsSync(path)) {
|
|
472
446
|
return;
|
|
@@ -668,7 +642,6 @@ export async function installBundledSkills(env = process.env, options = {}) {
|
|
|
668
642
|
const nextData = jsonClone(data);
|
|
669
643
|
nextData.version = nextData.version || 3;
|
|
670
644
|
nextData.skills = nextData.skills || {};
|
|
671
|
-
const pruned = await pruneLegacyLoopxOwnedSkills(nextData, env);
|
|
672
645
|
const baselinePath = getTemplateBaselinePath(env);
|
|
673
646
|
const existingBaseline = await readTemplateBaseline(baselinePath);
|
|
674
647
|
const baselineItemsByPath = new Map((existingBaseline?.items || []).map((item) => [templateItemKey(item), item]));
|
|
@@ -767,7 +740,6 @@ export async function installBundledSkills(env = process.env, options = {}) {
|
|
|
767
740
|
installed,
|
|
768
741
|
conflicts,
|
|
769
742
|
skipped,
|
|
770
|
-
pruned,
|
|
771
743
|
templateGovernance,
|
|
772
744
|
inspection: await inspectInstallState(env),
|
|
773
745
|
};
|
package/src/next-skill.mjs
CHANGED
|
@@ -2,7 +2,6 @@ export function nextSkillCommand(state) {
|
|
|
2
2
|
if (!state || !state.slug) {
|
|
3
3
|
return null;
|
|
4
4
|
}
|
|
5
|
-
const reviewBuildCommand = `$build --from-review .loopx/workflows/${state.slug}/review-report.md`;
|
|
6
5
|
if (state.current_stage === 'clarify'
|
|
7
6
|
&& state.clarify_current_round > 0
|
|
8
7
|
&& state.unresolved_ambiguity_count === 0
|
|
@@ -28,7 +27,7 @@ export function nextSkillCommand(state) {
|
|
|
28
27
|
return null;
|
|
29
28
|
}
|
|
30
29
|
if (state.current_stage === 'plan' && Array.isArray(state.plan_blockers) && state.plan_blockers.length === 0) {
|
|
31
|
-
return `$
|
|
30
|
+
return `$subagent-exec .loopx/plans/requirements-snapshot-${state.slug}.md`;
|
|
32
31
|
}
|
|
33
32
|
if (state.current_stage === 'build'
|
|
34
33
|
&& state.stage_status === 'awaiting-approval'
|
|
@@ -48,13 +47,13 @@ export function nextSkillCommand(state) {
|
|
|
48
47
|
|| state.approval?.build === 'requested'
|
|
49
48
|
|| state.approval?.build === 'approved'
|
|
50
49
|
)) {
|
|
51
|
-
return
|
|
50
|
+
return null;
|
|
52
51
|
}
|
|
53
52
|
if (state.current_stage === 'review'
|
|
54
53
|
&& state.review_verdict === 'request-changes'
|
|
55
54
|
&& state.requested_transition === 'review->build'
|
|
56
55
|
&& state.approval?.build === 'approved') {
|
|
57
|
-
return
|
|
56
|
+
return null;
|
|
58
57
|
}
|
|
59
58
|
if (state.current_stage === 'review'
|
|
60
59
|
&& state.review_verdict === 'request-changes'
|
|
@@ -71,20 +70,62 @@ export function nextSkillCommand(state) {
|
|
|
71
70
|
return null;
|
|
72
71
|
}
|
|
73
72
|
|
|
73
|
+
export function nextCliCommand(state) {
|
|
74
|
+
if (!state || !state.slug) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
if (state.stage_status === 'awaiting-approval'
|
|
78
|
+
&& state.current_stage === 'plan'
|
|
79
|
+
&& Array.isArray(state.plan_blockers)
|
|
80
|
+
&& state.plan_blockers.length === 0) {
|
|
81
|
+
return `loopx build .loopx/plans/requirements-snapshot-${state.slug}.md`;
|
|
82
|
+
}
|
|
83
|
+
if (state.current_stage === 'review'
|
|
84
|
+
&& state.review_verdict === 'request-changes'
|
|
85
|
+
&& state.rollback_target === 'build'
|
|
86
|
+
&& (
|
|
87
|
+
state.pending_user_decision === 'review->build'
|
|
88
|
+
|| state.requested_transition === 'review->build'
|
|
89
|
+
|| state.approval?.build === 'requested'
|
|
90
|
+
|| state.approval?.build === 'approved'
|
|
91
|
+
)) {
|
|
92
|
+
return `loopx build --from-review .loopx/workflows/${state.slug}/review-report.md`;
|
|
93
|
+
}
|
|
94
|
+
if (state.current_stage === 'review'
|
|
95
|
+
&& state.review_verdict === 'request-changes'
|
|
96
|
+
&& state.requested_transition === 'review->build'
|
|
97
|
+
&& state.approval?.build === 'approved') {
|
|
98
|
+
return `loopx build --from-review .loopx/workflows/${state.slug}/review-report.md`;
|
|
99
|
+
}
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
74
103
|
export function nextSkillHint(state) {
|
|
75
104
|
const command = nextSkillCommand(state);
|
|
76
105
|
if (!command) {
|
|
77
106
|
return null;
|
|
78
107
|
}
|
|
79
|
-
return `Next: ${command}`;
|
|
108
|
+
return `Next skill: ${command}`;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function nextCliHint(state) {
|
|
112
|
+
const command = nextCliCommand(state);
|
|
113
|
+
if (!command) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
return `Next CLI: ${command}`;
|
|
80
117
|
}
|
|
81
118
|
|
|
82
119
|
export function withNextSkill(payload, state) {
|
|
83
120
|
const nextCommand = nextSkillCommand(state);
|
|
84
121
|
const nextHint = nextSkillHint(state);
|
|
122
|
+
const cliCommand = nextCliCommand(state);
|
|
123
|
+
const cliHint = nextCliHint(state);
|
|
85
124
|
return {
|
|
86
125
|
...payload,
|
|
87
126
|
next_skill_command: nextCommand,
|
|
88
127
|
next_skill_hint: nextHint,
|
|
128
|
+
next_cli_command: cliCommand,
|
|
129
|
+
next_cli_hint: cliHint,
|
|
89
130
|
};
|
|
90
131
|
}
|
package/src/workflow.mjs
CHANGED
|
@@ -118,7 +118,7 @@ function reviewReportArtifactPath(slug) {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
function reviewReworkBuildCommand(slug) {
|
|
121
|
-
return
|
|
121
|
+
return `loopx build --from-review ${reviewReportArtifactPath(slug)}`;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
function nowIso() {
|
|
@@ -4203,7 +4203,7 @@ export async function buildStage(cwd, slug, options = {}) {
|
|
|
4203
4203
|
active_delegation_count: delegationLedger?.active_blocking_count || 0,
|
|
4204
4204
|
completion_audit_path: displayPath(cwd, completionAuditPath),
|
|
4205
4205
|
completion_audit_status: completionAudit?.status || 'pending',
|
|
4206
|
-
next_action: 'Continue
|
|
4206
|
+
next_action: 'Continue loopx build execution and gather fresh implementation evidence.',
|
|
4207
4207
|
completion_signal: 'Build may stop only after execution-record.md is complete and build -> review handoff readiness is reached, or after a real blocker is recorded.',
|
|
4208
4208
|
});
|
|
4209
4209
|
current = await adapter.executeLanes({
|
|
@@ -4271,7 +4271,7 @@ export async function buildStage(cwd, slug, options = {}) {
|
|
|
4271
4271
|
completion_audit_status: completionAudit.status,
|
|
4272
4272
|
next_action: blockers.length === 0
|
|
4273
4273
|
? 'Verify execution evidence and prepare build -> review handoff.'
|
|
4274
|
-
: 'Continue
|
|
4274
|
+
: 'Continue loopx build to resolve blockers before review handoff.',
|
|
4275
4275
|
completion_signal: 'Build may stop only after execution-record.md is complete and build -> review handoff readiness is reached, or after a real blocker is recorded.',
|
|
4276
4276
|
});
|
|
4277
4277
|
const writtenSupportPaths = await writeBuildSupportArtifacts(root, current, noDeslop, {
|
|
@@ -4373,7 +4373,7 @@ export async function buildStage(cwd, slug, options = {}) {
|
|
|
4373
4373
|
active_delegation_count: delegationLedger?.active_blocking_count || 0,
|
|
4374
4374
|
completion_audit_path: displayPath(cwd, completionAuditPath),
|
|
4375
4375
|
completion_audit_status: completionAudit?.status || (finalBlocked ? 'blocked' : 'passed'),
|
|
4376
|
-
next_action: finalBlocked ? 'Run
|
|
4376
|
+
next_action: finalBlocked ? 'Run loopx build again after resolving recorded blockers.' : 'Approve build -> review and run $review.',
|
|
4377
4377
|
completion_signal: finalBlocked ? 'Build is stopped because real blockers remain recorded.' : 'execution-record.md is complete and build -> review handoff is ready.',
|
|
4378
4378
|
execution_record_status: next.execution_record_status,
|
|
4379
4379
|
execution_record_path: artifactPath(root, 'execution-record.md'),
|