@ai-content-space/loopx 0.2.8 → 0.2.10

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 (105) hide show
  1. package/README.md +26 -9
  2. package/README.zh-CN.md +26 -9
  3. package/docs/loopx/design/loopx-skill-suite-v1-design.md +12 -0
  4. package/docs/loopx/plans/2026-06-14-loopx-spec-memory-context-loading.md +948 -0
  5. package/docs/loopx/plans/2026-06-15-support-lens-skills-migration.md +1153 -0
  6. package/package.json +6 -1
  7. package/plugins/loopx/.codex-plugin/plugin.json +1 -1
  8. package/plugins/loopx/skills/api-designer/SKILL.md +232 -0
  9. package/plugins/loopx/skills/api-designer/references/error-handling.md +541 -0
  10. package/plugins/loopx/skills/api-designer/references/openapi.md +824 -0
  11. package/plugins/loopx/skills/api-designer/references/pagination.md +494 -0
  12. package/plugins/loopx/skills/api-designer/references/rest-patterns.md +335 -0
  13. package/plugins/loopx/skills/api-designer/references/versioning.md +391 -0
  14. package/plugins/loopx/skills/architecture-designer/SKILL.md +117 -0
  15. package/plugins/loopx/skills/architecture-designer/references/adr-template.md +116 -0
  16. package/plugins/loopx/skills/architecture-designer/references/architecture-patterns.md +346 -0
  17. package/plugins/loopx/skills/architecture-designer/references/database-selection.md +102 -0
  18. package/plugins/loopx/skills/architecture-designer/references/nfr-checklist.md +212 -0
  19. package/plugins/loopx/skills/architecture-designer/references/system-design.md +313 -0
  20. package/plugins/loopx/skills/clarify/SKILL.md +12 -1
  21. package/plugins/loopx/skills/cli-developer/SKILL.md +124 -0
  22. package/plugins/loopx/skills/cli-developer/references/design-patterns.md +221 -0
  23. package/plugins/loopx/skills/cli-developer/references/go-cli.md +540 -0
  24. package/plugins/loopx/skills/cli-developer/references/node-cli.md +383 -0
  25. package/plugins/loopx/skills/cli-developer/references/python-cli.md +422 -0
  26. package/plugins/loopx/skills/cli-developer/references/ux-patterns.md +448 -0
  27. package/plugins/loopx/skills/debug/SKILL.md +1 -1
  28. package/plugins/loopx/skills/doc-readability/SKILL.md +1 -1
  29. package/plugins/loopx/skills/exec/SKILL.md +1 -1
  30. package/plugins/loopx/skills/final-review/SKILL.md +1 -1
  31. package/plugins/loopx/skills/finish/SKILL.md +1 -1
  32. package/plugins/loopx/skills/fix-review/SKILL.md +1 -1
  33. package/plugins/loopx/skills/go-style/SKILL.md +1 -1
  34. package/plugins/loopx/skills/kratos/SKILL.md +2 -1
  35. package/plugins/loopx/skills/plan-to-exec/SKILL.md +12 -1
  36. package/plugins/loopx/skills/refactor-plan/SKILL.md +1 -1
  37. package/plugins/loopx/skills/requirement-analyzer/SKILL.md +161 -0
  38. package/plugins/loopx/skills/requirement-analyzer/references/example-reports.md +170 -0
  39. package/plugins/loopx/skills/requirement-analyzer/references/prd-gap-checklist.md +167 -0
  40. package/plugins/loopx/skills/requirement-analyzer/references/readiness-rubric.md +70 -0
  41. package/plugins/loopx/skills/requirement-analyzer/references/report-template.md +83 -0
  42. package/plugins/loopx/skills/review/SKILL.md +1 -1
  43. package/plugins/loopx/skills/spec/SKILL.md +12 -1
  44. package/plugins/loopx/skills/sql-style/SKILL.md +108 -0
  45. package/plugins/loopx/skills/sql-style/references/database-design.md +402 -0
  46. package/plugins/loopx/skills/sql-style/references/dialect-differences.md +419 -0
  47. package/plugins/loopx/skills/sql-style/references/optimization.md +384 -0
  48. package/plugins/loopx/skills/sql-style/references/query-patterns.md +285 -0
  49. package/plugins/loopx/skills/sql-style/references/window-functions.md +328 -0
  50. package/plugins/loopx/skills/subagent-exec/SKILL.md +1 -1
  51. package/plugins/loopx/skills/tdd/SKILL.md +1 -1
  52. package/plugins/loopx/skills/verify/SKILL.md +1 -1
  53. package/scripts/verify-skills.mjs +0 -2
  54. package/skills/RESOLVER.md +8 -1
  55. package/skills/api-designer/SKILL.md +232 -0
  56. package/skills/api-designer/references/error-handling.md +541 -0
  57. package/skills/api-designer/references/openapi.md +824 -0
  58. package/skills/api-designer/references/pagination.md +494 -0
  59. package/skills/api-designer/references/rest-patterns.md +335 -0
  60. package/skills/api-designer/references/versioning.md +391 -0
  61. package/skills/architecture-designer/SKILL.md +117 -0
  62. package/skills/architecture-designer/references/adr-template.md +116 -0
  63. package/skills/architecture-designer/references/architecture-patterns.md +346 -0
  64. package/skills/architecture-designer/references/database-selection.md +102 -0
  65. package/skills/architecture-designer/references/nfr-checklist.md +212 -0
  66. package/skills/architecture-designer/references/system-design.md +313 -0
  67. package/skills/clarify/SKILL.md +12 -1
  68. package/skills/cli-developer/SKILL.md +124 -0
  69. package/skills/cli-developer/references/design-patterns.md +221 -0
  70. package/skills/cli-developer/references/go-cli.md +540 -0
  71. package/skills/cli-developer/references/node-cli.md +383 -0
  72. package/skills/cli-developer/references/python-cli.md +422 -0
  73. package/skills/cli-developer/references/ux-patterns.md +448 -0
  74. package/skills/debug/SKILL.md +1 -1
  75. package/skills/doc-readability/SKILL.md +1 -1
  76. package/skills/exec/SKILL.md +1 -1
  77. package/skills/final-review/SKILL.md +1 -1
  78. package/skills/finish/SKILL.md +1 -1
  79. package/skills/fix-review/SKILL.md +1 -1
  80. package/skills/go-style/SKILL.md +1 -1
  81. package/skills/kratos/SKILL.md +2 -1
  82. package/skills/plan-to-exec/SKILL.md +12 -1
  83. package/skills/refactor-plan/SKILL.md +1 -1
  84. package/skills/requirement-analyzer/SKILL.md +161 -0
  85. package/skills/requirement-analyzer/references/example-reports.md +170 -0
  86. package/skills/requirement-analyzer/references/prd-gap-checklist.md +167 -0
  87. package/skills/requirement-analyzer/references/readiness-rubric.md +70 -0
  88. package/skills/requirement-analyzer/references/report-template.md +83 -0
  89. package/skills/review/SKILL.md +1 -1
  90. package/skills/spec/SKILL.md +12 -1
  91. package/skills/sql-style/SKILL.md +108 -0
  92. package/skills/sql-style/references/database-design.md +402 -0
  93. package/skills/sql-style/references/dialect-differences.md +419 -0
  94. package/skills/sql-style/references/optimization.md +384 -0
  95. package/skills/sql-style/references/query-patterns.md +285 -0
  96. package/skills/sql-style/references/window-functions.md +328 -0
  97. package/skills/subagent-exec/SKILL.md +1 -1
  98. package/skills/tdd/SKILL.md +1 -1
  99. package/skills/verify/SKILL.md +1 -1
  100. package/src/cli.mjs +4 -1
  101. package/src/context-manifest.mjs +51 -1
  102. package/src/install-discovery.mjs +114 -0
  103. package/src/loopx-context-artifacts.mjs +114 -0
  104. package/src/project-discovery.mjs +1 -0
  105. package/src/workflow.mjs +47 -3
package/README.md CHANGED
@@ -70,8 +70,16 @@ Support skills:
70
70
  - `tdd`
71
71
  - `debug`
72
72
  - `verify`
73
+ - `doc-readability`
74
+ - `requirement-analyzer`
73
75
  - `go-style`
74
76
  - `kratos`
77
+ - `api-designer`
78
+ - `architecture-designer`
79
+ - `sql-style`
80
+ - `cli-developer`
81
+
82
+ Support skills are lenses, not workflow states. They can be invoked directly by users, or applied by workflow skills when relevant. `requirement-analyzer` and `doc-readability` assess source documents; `api-designer`, `architecture-designer`, `sql-style`, `cli-developer`, `go-style`, and `kratos` add domain discipline during design, execution, and review without changing the core flow.
75
83
 
76
84
  ## Artifacts
77
85
 
@@ -86,6 +94,16 @@ For the v1 skill-suite workflow, human-maintained artifacts live under `docs/loo
86
94
 
87
95
  `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
96
 
97
+ ### Repo Specs And Memory
98
+
99
+ `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.
100
+
101
+ Summary: docs/loopx/specs/ is binding long-lived repo context; .loopx/memory/MEMORY.md is advisory curated memory.
102
+
103
+ `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.
104
+
105
+ `.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.
106
+
89
107
  `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
108
 
91
109
  `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/`.
@@ -94,13 +112,9 @@ Finish runtime commands are advanced agent/runtime plumbing, not the normal user
94
112
 
95
113
  `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.
96
114
 
97
- ### Archive compatibility
98
-
99
- archive is not part of the public v1 finish flow. Older runtime state may still contain archive fields or a hidden `loopx archive <slug>` compatibility command, but normal users should complete work through `finish`.
100
-
101
115
  Generated support state, hook diagnostics, installer metadata, HTML views, manifests, and runtime JSON remain under `.loopx/`.
102
116
 
103
- Local agent memory lives under `.loopx/memory/`:
117
+ Local advisory agent memory lives under `.loopx/memory/`:
104
118
 
105
119
  - `.loopx/memory/MEMORY.md`
106
120
  - `.loopx/memory/index.jsonl`
@@ -159,8 +173,8 @@ loopx doctor
159
173
  Undo installed files when you want to remove loopx-managed user-level artifacts:
160
174
 
161
175
  ```bash
162
- 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}
163
- 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}
176
+ rm -rf ~/.agents/skills/{clarify,spec,plan-to-exec,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,doc-readability,requirement-analyzer,go-style,kratos,api-designer,architecture-designer,sql-style,cli-developer}
177
+ rm -rf ~/.claude/skills/{clarify,spec,plan-to-exec,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,doc-readability,requirement-analyzer,go-style,kratos,api-designer,architecture-designer,sql-style,cli-developer}
164
178
  rm -f ~/.codex/hooks/codex-workflow-hook.mjs ~/.claude/hooks/loopx-workflow-hook.mjs
165
179
  ```
166
180
 
@@ -171,10 +185,13 @@ loopx install-skills
171
185
  loopx install-skills --target codex
172
186
  loopx install-skills --target claude
173
187
  loopx install-skills --target claude --project
188
+ loopx install-skills --target all --add-agent-guidance
174
189
  loopx install-skills --target all --yes
175
190
  ```
176
191
 
177
- Claude project install writes to the current repository's `.claude/skills/` and `.claude/settings.json`.
192
+ 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.
193
+
194
+ Claude project install writes skills and settings to the current repository's `.claude/skills/` and `.claude/settings.json`.
178
195
 
179
196
  ## Codex Plugin
180
197
 
@@ -198,7 +215,7 @@ The CLI supports installation, diagnostics, rendering, and runtime maintenance:
198
215
 
199
216
  ```bash
200
217
  loopx --version
201
- loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--yes] [--dry-run] [--json]
218
+ loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--add-agent-guidance] [--yes] [--dry-run] [--json]
202
219
  loopx init [--slug <slug>] [--enable-agent-delegation] [--auto-agent-delegation] [--agent-delegation-threshold <local|critic-only|parallel-review>] [--json]
203
220
  loopx clarify <slug> [--standard|--deep] [--json]
204
221
  loopx render [slug|--all]
package/README.zh-CN.md CHANGED
@@ -70,8 +70,16 @@ loopx install-skills --target all --json
70
70
  - `tdd`
71
71
  - `debug`
72
72
  - `verify`
73
+ - `doc-readability`
74
+ - `requirement-analyzer`
73
75
  - `go-style`
74
76
  - `kratos`
77
+ - `api-designer`
78
+ - `architecture-designer`
79
+ - `sql-style`
80
+ - `cli-developer`
81
+
82
+ 辅助 skills 是 lens,不是 workflow state。用户可以直接调用它们,workflow skills 也可以在相关场景套用它们。`requirement-analyzer` 和 `doc-readability` 用于评估源文档;`api-designer`、`architecture-designer`、`sql-style`、`cli-developer`、`go-style` 和 `kratos` 在设计、执行、评审阶段提供领域纪律,但不改变核心流程。
75
83
 
76
84
  ## 产物
77
85
 
@@ -86,6 +94,16 @@ v1 skill-suite 工作流的人工维护长期产物放在 `docs/loopx/`:
86
94
 
87
95
  `docs/loopx/memory/` 用于保存纳入 git 的 shared memory,适合需要跟随用户跨机器同步、但还没有稳定到 spec 级别的轻量项目知识。
88
96
 
97
+ ### Repo Specs And Memory
98
+
99
+ `docs/loopx/specs/` 是 binding long-lived repo context。工作流 skills 会在澄清、设计、计划、构建和评审前读取相关 specs。Specs 定义持久 repo rules 和 constraints;它们优先于本地 memory,并应通过经过评审的工作流变更来更新。
100
+
101
+ Summary: docs/loopx/specs/ is binding long-lived repo context; .loopx/memory/MEMORY.md is advisory curated memory.
102
+
103
+ `docs/loopx/specs/index.md` 是可选的。存在时,agent 只把它当作 retrieval 和 prioritization map;即使没有 index,这个目录仍然有效。
104
+
105
+ `.loopx/memory/MEMORY.md` 是 advisory curated memory。它总结有用的项目知识,但不能覆盖当前用户指令、已批准的 source documents 或 binding specs。`.loopx/memory/index.jsonl` 也是可选且 retrieval-only:它帮助 agent 找到相关 active memory cards,不是 append-only log。
106
+
89
107
  当完成的工作产生稳定团队规则时,`finish` 可以在 `docs/loopx/specs/` 生成 spec candidates。这些候选是 repo-tracked,必须保留在 git diff 中供审阅。
90
108
 
91
109
  `finish` 还会在 `.loopx/finish/<audit-id>/` 下写入本地 audit ledger。`none` 表示已经完成审计,但没有产生可持久化的 learning candidate。choice recording 也放在这个本地 finish audit 目录里,而 repo-tracked 的 spec candidates 仍然保留在 `docs/loopx/specs/`。
@@ -94,13 +112,9 @@ Finish runtime 命令是给 agent、hooks 和兼容路径使用的高级 plumbin
94
112
 
95
113
  `finish` 是一次 implementation decision 的终端完成步骤。只有在上次选择保留、PR 迭代、执行选择前中断,或 review feedback 后出现新变更时才重新执行;merge 或 discard 后不要重复执行。
96
114
 
97
- ### Archive 兼容性
98
-
99
- archive 不属于公开 v1 finish 流程。旧 runtime state 仍可能包含 archive 字段,也可能通过隐藏的 `loopx archive <slug>` 兼容命令处理历史状态,但普通用户应通过 `finish` 完成工作。
100
-
101
115
  生成的支撑状态、hook 诊断、安装元数据、HTML views、manifests 和 runtime JSON 仍放在 `.loopx/` 下。
102
116
 
103
- 本地 agent memory 放在 `.loopx/memory/`:
117
+ 本地 advisory agent memory 放在 `.loopx/memory/`:
104
118
 
105
119
  - `.loopx/memory/MEMORY.md`
106
120
  - `.loopx/memory/index.jsonl`
@@ -159,8 +173,8 @@ loopx doctor
159
173
  撤销已安装文件,移除 loopx 管理的用户级 artifacts:
160
174
 
161
175
  ```bash
162
- 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}
163
- 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}
176
+ rm -rf ~/.agents/skills/{clarify,spec,plan-to-exec,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,doc-readability,requirement-analyzer,go-style,kratos,api-designer,architecture-designer,sql-style,cli-developer}
177
+ rm -rf ~/.claude/skills/{clarify,spec,plan-to-exec,subagent-exec,exec,review,final-review,fix-review,finish,refactor-plan,tdd,debug,verify,doc-readability,requirement-analyzer,go-style,kratos,api-designer,architecture-designer,sql-style,cli-developer}
164
178
  rm -f ~/.codex/hooks/codex-workflow-hook.mjs ~/.claude/hooks/loopx-workflow-hook.mjs
165
179
  ```
166
180
 
@@ -171,10 +185,13 @@ loopx install-skills
171
185
  loopx install-skills --target codex
172
186
  loopx install-skills --target claude
173
187
  loopx install-skills --target claude --project
188
+ loopx install-skills --target all --add-agent-guidance
174
189
  loopx install-skills --target all --yes
175
190
  ```
176
191
 
177
- Claude project install 会写入当前仓库的 `.claude/skills/` `.claude/settings.json`。
192
+ 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 之外的用户内容会保留。
193
+
194
+ Claude project install 会把 skills 和 settings 写入当前仓库的 `.claude/skills/` 和 `.claude/settings.json`。
178
195
 
179
196
  ## Codex Plugin
180
197
 
@@ -198,7 +215,7 @@ CLI 用于安装、诊断、渲染和 runtime 维护:
198
215
 
199
216
  ```bash
200
217
  loopx --version
201
- loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--yes] [--dry-run] [--json]
218
+ loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--add-agent-guidance] [--yes] [--dry-run] [--json]
202
219
  loopx init [--slug <slug>] [--enable-agent-delegation] [--auto-agent-delegation] [--agent-delegation-threshold <local|critic-only|parallel-review>] [--json]
203
220
  loopx clarify <slug> [--standard|--deep] [--json]
204
221
  loopx render [slug|--all]
@@ -21,8 +21,14 @@ The v1 product surface is the installed and governed bundled skill suite:
21
21
  - `tdd`
22
22
  - `debug`
23
23
  - `verify`
24
+ - `doc-readability`
25
+ - `requirement-analyzer`
24
26
  - `go-style`
25
27
  - `kratos`
28
+ - `api-designer`
29
+ - `architecture-designer`
30
+ - `sql-style`
31
+ - `cli-developer`
26
32
 
27
33
  Runtime-only skills are not installed as Codex or Claude skills in v1.
28
34
 
@@ -44,6 +50,12 @@ clarify -> spec? -> plan-to-exec -> (subagent-exec | exec) -> final-review -> fi
44
50
 
45
51
  `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.
46
52
 
53
+ ## Support Skills
54
+
55
+ Support skills are installed and governed, but they do not create workflow states. `requirement-analyzer` behaves like `doc-readability`: it can analyze source documents and produce reports without advancing workflow state. `api-designer`, `architecture-designer`, `sql-style`, and `cli-developer` behave like `go-style`: they are discipline lenses applied directly or from workflow skills during design, execution, and review.
56
+
57
+ `sql-style` is the shared bundled SQL/database lens. It fuses selected SQL optimization, schema, migration, index, and dialect guidance with loopx workflow discipline. Related skills should call `sql-style` when SQL/database discipline is relevant; do not delete useful SQL guidance from those skills merely because `sql-style` exists.
58
+
47
59
  ## Artifacts
48
60
 
49
61
  Human-maintained v1 skill-suite artifacts use `docs/loopx/`: