@ai-content-space/loopx 0.2.7 → 0.2.9

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.
Files changed (52) hide show
  1. package/README.md +21 -8
  2. package/README.zh-CN.md +22 -9
  3. package/docs/loopx/design/finish/345/255/246/344/271/240/345/256/241/350/256/241/351/234/200/346/261/202/350/256/276/350/256/241/346/226/207/346/241/243.md +1 -1
  4. package/docs/loopx/design/loopx-skill-suite-v1-design.md +4 -4
  5. package/docs/loopx/plans/2026-06-14-loopx-spec-memory-context-loading.md +948 -0
  6. package/docs/loopx/plans/loopx-skill-suite-v1-implementation.md +1 -1
  7. package/package.json +2 -2
  8. package/plugins/loopx/.codex-plugin/plugin.json +1 -1
  9. package/plugins/loopx/skills/clarify/SKILL.md +14 -3
  10. package/plugins/loopx/skills/debug/SKILL.md +1 -1
  11. package/plugins/loopx/skills/doc-readability/SKILL.md +1 -1
  12. package/plugins/loopx/skills/exec/SKILL.md +2 -2
  13. package/plugins/loopx/skills/final-review/SKILL.md +1 -1
  14. package/plugins/loopx/skills/finish/SKILL.md +1 -1
  15. package/plugins/loopx/skills/fix-review/SKILL.md +1 -1
  16. package/plugins/loopx/skills/go-style/SKILL.md +1 -1
  17. package/plugins/loopx/skills/kratos/SKILL.md +1 -1
  18. package/plugins/loopx/skills/{plan → plan-to-exec}/SKILL.md +16 -5
  19. package/plugins/loopx/skills/refactor-plan/SKILL.md +1 -1
  20. package/plugins/loopx/skills/review/SKILL.md +1 -1
  21. package/plugins/loopx/skills/spec/DESIGN_SPEC_TEMPLATE.md +2 -2
  22. package/plugins/loopx/skills/spec/SKILL.md +15 -4
  23. package/plugins/loopx/skills/subagent-exec/SKILL.md +2 -2
  24. package/plugins/loopx/skills/tdd/SKILL.md +1 -1
  25. package/plugins/loopx/skills/verify/SKILL.md +1 -1
  26. package/scripts/claude-workflow-hook.mjs +2 -2
  27. package/scripts/codex-workflow-hook.mjs +4 -4
  28. package/skills/RESOLVER.md +4 -4
  29. package/skills/clarify/SKILL.md +14 -3
  30. package/skills/debug/SKILL.md +1 -1
  31. package/skills/doc-readability/SKILL.md +1 -1
  32. package/skills/exec/SKILL.md +2 -2
  33. package/skills/final-review/SKILL.md +1 -1
  34. package/skills/finish/SKILL.md +1 -1
  35. package/skills/fix-review/SKILL.md +1 -1
  36. package/skills/go-style/SKILL.md +1 -1
  37. package/skills/kratos/SKILL.md +1 -1
  38. package/skills/{plan → plan-to-exec}/SKILL.md +16 -5
  39. package/skills/refactor-plan/SKILL.md +1 -1
  40. package/skills/review/SKILL.md +1 -1
  41. package/skills/spec/DESIGN_SPEC_TEMPLATE.md +2 -2
  42. package/skills/spec/SKILL.md +15 -4
  43. package/skills/subagent-exec/SKILL.md +2 -2
  44. package/skills/tdd/SKILL.md +1 -1
  45. package/skills/verify/SKILL.md +1 -1
  46. package/src/cli.mjs +7 -4
  47. package/src/context-manifest.mjs +51 -1
  48. package/src/install-discovery.mjs +110 -1
  49. package/src/loopx-context-artifacts.mjs +114 -0
  50. package/src/next-skill.mjs +2 -2
  51. package/src/project-discovery.mjs +1 -0
  52. package/src/workflow.mjs +51 -7
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) -> final-review -> fix-review? -> finish
18
+ clarify -> spec? -> plan-to-exec -> (subagent-exec | exec) -> final-review -> fix-review? -> finish
19
19
  ```
20
20
 
21
21
  ## Quick start
@@ -54,7 +54,7 @@ Core workflow skills:
54
54
 
55
55
  - `clarify`: interview until scope, non-goals, constraints, and decision boundaries are clear.
56
56
  - `spec`: write a design document or lightweight design note when design decisions are required.
57
- - `plan`: write a bite-sized implementation plan in the superpowers `writing-plans` style.
57
+ - `plan-to-exec`: write a bite-sized implementation plan in the superpowers `writing-plans` style.
58
58
  - `subagent-exec`: execute an approved plan with fresh subagents and staged review.
59
59
  - `exec`: execute an approved plan inline when subagents are unavailable or not desired.
60
60
  - `review`: request independent code review against a git range and plan or requirements.
@@ -86,6 +86,16 @@ For the v1 skill-suite workflow, human-maintained artifacts live under `docs/loo
86
86
 
87
87
  `docs/loopx/memory/` stores git-tracked shared memory for lightweight project knowledge that should follow a user across machines but is not stable enough to become a spec.
88
88
 
89
+ ### Repo Specs And Memory
90
+
91
+ `docs/loopx/specs/` is binding long-lived repo context. Workflow skills read relevant specs before clarification, design, planning, build, and review work. Specs define durable repo rules and constraints; they are stronger than local memory and should be updated through reviewed workflow changes.
92
+
93
+ Summary: docs/loopx/specs/ is binding long-lived repo context; .loopx/memory/MEMORY.md is advisory curated memory.
94
+
95
+ `docs/loopx/specs/index.md` is optional. When present, agents use it only as a map for retrieval and prioritization; the directory remains valid without an index.
96
+
97
+ `.loopx/memory/MEMORY.md` is advisory curated memory. It summarizes useful project knowledge, but must not override current user instructions, approved source documents, or binding specs. `.loopx/memory/index.jsonl` is optional and retrieval-only: it helps agents find relevant active memory cards and is not an append-only log.
98
+
89
99
  `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.
90
100
 
91
101
  `finish` also writes a local audit ledger under `.loopx/finish/<audit-id>/`. `none` means the work was audited, but it did not produce a durable learning candidate. Choice recording lives in that local finish audit directory, while repo-tracked spec candidates stay in `docs/loopx/specs/`.
@@ -100,7 +110,7 @@ archive is not part of the public v1 finish flow. Older runtime state may still
100
110
 
101
111
  Generated support state, hook diagnostics, installer metadata, HTML views, manifests, and runtime JSON remain under `.loopx/`.
102
112
 
103
- Local agent memory lives under `.loopx/memory/`:
113
+ Local advisory agent memory lives under `.loopx/memory/`:
104
114
 
105
115
  - `.loopx/memory/MEMORY.md`
106
116
  - `.loopx/memory/index.jsonl`
@@ -159,8 +169,8 @@ loopx doctor
159
169
  Undo installed files when you want to remove loopx-managed user-level artifacts:
160
170
 
161
171
  ```bash
162
- rm -rf ~/.agents/skills/{clarify,spec,plan,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,go-style,kratos}
163
- rm -rf ~/.claude/skills/{clarify,spec,plan,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,go-style,kratos}
172
+ rm -rf ~/.agents/skills/{clarify,spec,plan-to-exec,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,go-style,kratos}
173
+ rm -rf ~/.claude/skills/{clarify,spec,plan-to-exec,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,go-style,kratos}
164
174
  rm -f ~/.codex/hooks/codex-workflow-hook.mjs ~/.claude/hooks/loopx-workflow-hook.mjs
165
175
  ```
166
176
 
@@ -171,10 +181,13 @@ loopx install-skills
171
181
  loopx install-skills --target codex
172
182
  loopx install-skills --target claude
173
183
  loopx install-skills --target claude --project
184
+ loopx install-skills --target all --add-agent-guidance
174
185
  loopx install-skills --target all --yes
175
186
  ```
176
187
 
177
- Claude project install writes to the current repository's `.claude/skills/` and `.claude/settings.json`.
188
+ Agent guidance is opt-in. `--add-agent-guidance` writes a loopx managed block that tells agents to read Repo Specs And Memory context. For Codex user installs it writes to `~/.codex/AGENTS.md`; for Claude user installs it writes to `~/.claude/CLAUDE.md`; for Claude project installs it writes to the current repo's `CLAUDE.md`. User content outside the managed block is preserved.
189
+
190
+ Claude project install writes skills and settings to the current repository's `.claude/skills/` and `.claude/settings.json`.
178
191
 
179
192
  ## Codex Plugin
180
193
 
@@ -198,7 +211,7 @@ The CLI supports installation, diagnostics, rendering, and runtime maintenance:
198
211
 
199
212
  ```bash
200
213
  loopx --version
201
- loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--yes] [--dry-run] [--json]
214
+ loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--add-agent-guidance] [--yes] [--dry-run] [--json]
202
215
  loopx init [--slug <slug>] [--enable-agent-delegation] [--auto-agent-delegation] [--agent-delegation-threshold <local|critic-only|parallel-review>] [--json]
203
216
  loopx clarify <slug> [--standard|--deep] [--json]
204
217
  loopx render [slug|--all]
@@ -232,7 +245,7 @@ loopx status my-feature
232
245
  loopx next my-feature
233
246
  ```
234
247
 
235
- After `clarify`, hand control to the suggested skill command, usually `$plan <slug>`. Continue following `loopx status <slug>` or `loopx next <slug>` until `final-review` and `$finish` complete the work.
248
+ After `clarify`, hand control to the suggested skill command, usually `$plan-to-exec <slug>`. Continue following `loopx status <slug>` or `loopx next <slug>` until `final-review` and `$finish` complete the work.
236
249
 
237
250
  ## Governance
238
251
 
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) -> final-review -> fix-review? -> finish
18
+ clarify -> spec? -> plan-to-exec -> (subagent-exec | exec) -> final-review -> fix-review? -> finish
19
19
  ```
20
20
 
21
21
  ## 快速开始
@@ -44,7 +44,7 @@ loopx install-skills --target all --json
44
44
 
45
45
  默认 init 路径也可以使用 JSON 输出:`loopx init --json`。
46
46
 
47
- `spec` 是条件设计门。涉及 API、数据、状态、权限、迁移、兼容、产品行为或架构决策时使用;只剩局部实现选择时可以跳过,直接进入 `plan`。
47
+ `spec` 是条件设计门。涉及 API、数据、状态、权限、迁移、兼容、产品行为或架构决策时使用;只剩局部实现选择时可以跳过,直接进入 `plan-to-exec`。
48
48
 
49
49
  ## Skills
50
50
 
@@ -54,7 +54,7 @@ loopx install-skills --target all --json
54
54
 
55
55
  - `clarify`:持续追问直到范围、非目标、约束和决策边界清楚。
56
56
  - `spec`:在需要设计决策时写设计文档或轻量 design note。
57
- - `plan`:按 superpowers `writing-plans` 风格写小步实施计划。
57
+ - `plan-to-exec`:按 superpowers `writing-plans` 风格写小步实施计划。
58
58
  - `subagent-exec`:用 fresh subagents 和 staged review 执行已批准计划。
59
59
  - `exec`:没有 subagent 或用户选择 inline 时顺序执行计划。
60
60
  - `review`:基于 git range 和计划/需求发起独立代码评审。
@@ -86,6 +86,16 @@ v1 skill-suite 工作流的人工维护长期产物放在 `docs/loopx/`:
86
86
 
87
87
  `docs/loopx/memory/` 用于保存纳入 git 的 shared memory,适合需要跟随用户跨机器同步、但还没有稳定到 spec 级别的轻量项目知识。
88
88
 
89
+ ### Repo Specs And Memory
90
+
91
+ `docs/loopx/specs/` 是 binding long-lived repo context。工作流 skills 会在澄清、设计、计划、构建和评审前读取相关 specs。Specs 定义持久 repo rules 和 constraints;它们优先于本地 memory,并应通过经过评审的工作流变更来更新。
92
+
93
+ Summary: docs/loopx/specs/ is binding long-lived repo context; .loopx/memory/MEMORY.md is advisory curated memory.
94
+
95
+ `docs/loopx/specs/index.md` 是可选的。存在时,agent 只把它当作 retrieval 和 prioritization map;即使没有 index,这个目录仍然有效。
96
+
97
+ `.loopx/memory/MEMORY.md` 是 advisory curated memory。它总结有用的项目知识,但不能覆盖当前用户指令、已批准的 source documents 或 binding specs。`.loopx/memory/index.jsonl` 也是可选且 retrieval-only:它帮助 agent 找到相关 active memory cards,不是 append-only log。
98
+
89
99
  当完成的工作产生稳定团队规则时,`finish` 可以在 `docs/loopx/specs/` 生成 spec candidates。这些候选是 repo-tracked,必须保留在 git diff 中供审阅。
90
100
 
91
101
  `finish` 还会在 `.loopx/finish/<audit-id>/` 下写入本地 audit ledger。`none` 表示已经完成审计,但没有产生可持久化的 learning candidate。choice recording 也放在这个本地 finish audit 目录里,而 repo-tracked 的 spec candidates 仍然保留在 `docs/loopx/specs/`。
@@ -100,7 +110,7 @@ archive 不属于公开 v1 finish 流程。旧 runtime state 仍可能包含 arc
100
110
 
101
111
  生成的支撑状态、hook 诊断、安装元数据、HTML views、manifests 和 runtime JSON 仍放在 `.loopx/` 下。
102
112
 
103
- 本地 agent memory 放在 `.loopx/memory/`:
113
+ 本地 advisory agent memory 放在 `.loopx/memory/`:
104
114
 
105
115
  - `.loopx/memory/MEMORY.md`
106
116
  - `.loopx/memory/index.jsonl`
@@ -159,8 +169,8 @@ loopx doctor
159
169
  撤销已安装文件,移除 loopx 管理的用户级 artifacts:
160
170
 
161
171
  ```bash
162
- rm -rf ~/.agents/skills/{clarify,spec,plan,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,go-style,kratos}
163
- rm -rf ~/.claude/skills/{clarify,spec,plan,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,go-style,kratos}
172
+ rm -rf ~/.agents/skills/{clarify,spec,plan-to-exec,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,go-style,kratos}
173
+ rm -rf ~/.claude/skills/{clarify,spec,plan-to-exec,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,go-style,kratos}
164
174
  rm -f ~/.codex/hooks/codex-workflow-hook.mjs ~/.claude/hooks/loopx-workflow-hook.mjs
165
175
  ```
166
176
 
@@ -171,10 +181,13 @@ loopx install-skills
171
181
  loopx install-skills --target codex
172
182
  loopx install-skills --target claude
173
183
  loopx install-skills --target claude --project
184
+ loopx install-skills --target all --add-agent-guidance
174
185
  loopx install-skills --target all --yes
175
186
  ```
176
187
 
177
- Claude project install 会写入当前仓库的 `.claude/skills/` `.claude/settings.json`。
188
+ Agent guidance 是 opt-in。`--add-agent-guidance` 会写入 loopx managed block,提示 agent 读取 Repo Specs And Memory context。Codex user install 写入 `~/.codex/AGENTS.md`;Claude user install 写入 `~/.claude/CLAUDE.md`;Claude project install 写入当前 repo 的 `CLAUDE.md`。Managed block 之外的用户内容会保留。
189
+
190
+ Claude project install 会把 skills 和 settings 写入当前仓库的 `.claude/skills/` 和 `.claude/settings.json`。
178
191
 
179
192
  ## Codex Plugin
180
193
 
@@ -198,7 +211,7 @@ CLI 用于安装、诊断、渲染和 runtime 维护:
198
211
 
199
212
  ```bash
200
213
  loopx --version
201
- loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--yes] [--dry-run] [--json]
214
+ loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--add-agent-guidance] [--yes] [--dry-run] [--json]
202
215
  loopx init [--slug <slug>] [--enable-agent-delegation] [--auto-agent-delegation] [--agent-delegation-threshold <local|critic-only|parallel-review>] [--json]
203
216
  loopx clarify <slug> [--standard|--deep] [--json]
204
217
  loopx render [slug|--all]
@@ -232,7 +245,7 @@ loopx status my-feature
232
245
  loopx next my-feature
233
246
  ```
234
247
 
235
- `clarify` 之后,把控制权交给提示的 skill 命令,通常是 `$plan <slug>`。后续继续跟随 `loopx status <slug>` 或 `loopx next <slug>`,直到 `final-review` 和 `$finish` 完成收尾。
248
+ `clarify` 之后,把控制权交给提示的 skill 命令,通常是 `$plan-to-exec <slug>`。后续继续跟随 `loopx status <slug>` 或 `loopx next <slug>`,直到 `final-review` 和 `$finish` 完成收尾。
236
249
 
237
250
  ## 治理
238
251
 
@@ -687,7 +687,7 @@ erDiagram
687
687
  - 推荐下一步:
688
688
 
689
689
  ```text
690
- $plan docs/loopx/design/finish学习审计需求设计文档.md
690
+ $plan-to-exec docs/loopx/design/finish学习审计需求设计文档.md
691
691
  ```
692
692
 
693
693
  ## 十一、QA
@@ -10,7 +10,7 @@ The v1 product surface is the installed and governed bundled skill suite:
10
10
 
11
11
  - `clarify`
12
12
  - `spec`
13
- - `plan`
13
+ - `plan-to-exec`
14
14
  - `subagent-exec`
15
15
  - `exec`
16
16
  - `review`
@@ -33,12 +33,12 @@ The repository may retain auxiliary or compatibility skill source directories fo
33
33
  Recommended flow:
34
34
 
35
35
  ```text
36
- clarify -> spec? -> plan -> (subagent-exec | exec) -> final-review -> fix-review? -> finish
36
+ clarify -> spec? -> plan-to-exec -> (subagent-exec | exec) -> final-review -> fix-review? -> finish
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
+ `spec` is a conditional design gate. `clarify` may route directly to `plan-to-exec` 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.
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
+ `plan-to-exec` 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.
42
42
 
43
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.
44
44