@ai-content-space/loopx 0.1.9 → 0.2.0
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/AGENTS.md +50 -0
- package/README.md +59 -446
- package/README.zh-CN.md +59 -457
- package/docs/loopx/design/loopx-skill-suite-v1-design.md +73 -0
- package/docs/loopx/plans/loopx-skill-suite-v1-implementation.md +77 -0
- package/package.json +5 -2
- package/plugins/loopx/.codex-plugin/plugin.json +4 -4
- package/plugins/loopx/scripts/plugin-install.test.mjs +20 -20
- package/plugins/loopx/skills/clarify/SKILL.md +38 -311
- package/plugins/loopx/skills/debug/SKILL.md +1 -1
- package/plugins/loopx/skills/exec/SKILL.md +71 -0
- package/plugins/loopx/skills/finish/SKILL.md +254 -0
- package/plugins/loopx/skills/fix-review/SKILL.md +216 -0
- 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 +136 -258
- package/plugins/loopx/skills/refactor-plan/SKILL.md +71 -0
- package/plugins/loopx/skills/review/SKILL.md +72 -105
- package/plugins/loopx/skills/review/code-reviewer.md +168 -0
- package/plugins/loopx/skills/spec/DESIGN_SPEC_TEMPLATE.md +323 -0
- package/plugins/loopx/skills/spec/SKILL.md +76 -0
- package/plugins/loopx/skills/subagent-exec/SKILL.md +282 -0
- package/plugins/loopx/skills/subagent-exec/agents/openai.yaml +3 -0
- package/plugins/loopx/skills/subagent-exec/code-quality-reviewer-prompt.md +25 -0
- package/plugins/loopx/skills/subagent-exec/codex-subagents.md +37 -0
- package/plugins/loopx/skills/subagent-exec/implementer-prompt.md +113 -0
- package/plugins/loopx/skills/subagent-exec/spec-reviewer-prompt.md +61 -0
- package/plugins/loopx/skills/tdd/SKILL.md +1 -1
- package/plugins/loopx/skills/verify/SKILL.md +1 -1
- package/scripts/claude-workflow-hook.mjs +109 -0
- package/scripts/codex-workflow-hook.mjs +2 -5
- package/scripts/install-skills.mjs +3 -3
- package/scripts/verify-skills.mjs +32 -1
- package/skills/RESOLVER.md +26 -17
- package/skills/clarify/SKILL.md +38 -311
- package/skills/debug/SKILL.md +1 -1
- package/skills/exec/SKILL.md +71 -0
- package/skills/finish/SKILL.md +254 -0
- package/skills/fix-review/SKILL.md +216 -0
- package/skills/go-style/SKILL.md +1 -1
- package/skills/kratos/SKILL.md +1 -1
- package/skills/plan/SKILL.md +136 -258
- package/skills/refactor-plan/SKILL.md +71 -0
- package/skills/review/SKILL.md +72 -105
- package/skills/review/code-reviewer.md +168 -0
- package/skills/spec/DESIGN_SPEC_TEMPLATE.md +323 -0
- package/skills/spec/SKILL.md +76 -0
- package/skills/subagent-exec/SKILL.md +282 -0
- package/skills/subagent-exec/agents/openai.yaml +3 -0
- package/skills/subagent-exec/code-quality-reviewer-prompt.md +25 -0
- package/skills/subagent-exec/codex-subagents.md +37 -0
- package/skills/subagent-exec/implementer-prompt.md +113 -0
- package/skills/subagent-exec/spec-reviewer-prompt.md +61 -0
- package/skills/tdd/SKILL.md +1 -1
- package/skills/verify/SKILL.md +1 -1
- package/src/autopilot-runtime.mjs +1 -1
- package/src/cli.mjs +79 -5
- package/src/context-manifest.mjs +2 -2
- package/src/html-views.mjs +457 -95
- package/src/install-discovery.mjs +210 -6
- package/src/next-skill.mjs +2 -4
- package/src/plan-runtime.mjs +572 -93
- package/src/runtime-maintenance.mjs +60 -16
- package/src/workflow.mjs +989 -65
- package/templates/architecture.md +58 -16
- package/templates/development-plan.md +42 -12
- package/plugins/loopx/skills/archive/SKILL.md +0 -55
- package/plugins/loopx/skills/autopilot/SKILL.md +0 -93
- package/plugins/loopx/skills/build/SKILL.md +0 -228
- package/skills/archive/SKILL.md +0 -55
- package/skills/autopilot/SKILL.md +0 -93
- package/skills/build/SKILL.md +0 -228
package/AGENTS.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Repository Guidelines
|
|
2
|
+
|
|
3
|
+
## Iron Law:
|
|
4
|
+
|
|
5
|
+
**All skills must do not have descriptive content. The content of skills should be clear and unambiguous, and must not be ambiguous.
|
|
6
|
+
Skills should be kept as simple as possible. It is like a Swiss Army knife - versatile but not a universal key.**
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Project Structure & Module Organization
|
|
11
|
+
|
|
12
|
+
This repository is a Node.js ESM CLI package for loopx, a skill-first workflow harness for Codex-style agents.
|
|
13
|
+
|
|
14
|
+
- `src/` contains runtime modules and the `src/cli.mjs` executable.
|
|
15
|
+
- `test/` contains Node test suites, mainly `workflow.test.mjs` and `trellis-hardening.test.mjs`.
|
|
16
|
+
- `skills/` contains bundled agent skills installed by the package.
|
|
17
|
+
- `plugins/loopx/` mirrors plugin-ready skills and plugin install scripts.
|
|
18
|
+
- `templates/` stores canonical workflow artifact templates.
|
|
19
|
+
- `scripts/` contains postinstall and hook scripts.
|
|
20
|
+
- `assets/`, `docs/`, and `examples/` hold static assets, release notes, and demos.
|
|
21
|
+
|
|
22
|
+
Keep source changes close to the owning module. When changing workflow behavior, update matching tests and any affected skill docs in both `skills/` and `plugins/loopx/skills/` when they are intentionally mirrored.
|
|
23
|
+
|
|
24
|
+
## Build, Test, and Development Commands
|
|
25
|
+
|
|
26
|
+
- `npm test` runs all repository tests with `node --test test/*.test.mjs`.
|
|
27
|
+
- `node --test test/workflow.test.mjs` runs the main workflow contract suite.
|
|
28
|
+
- `node --test test/trellis-hardening.test.mjs` runs context, hook, and review hardening tests.
|
|
29
|
+
- `node src/cli.mjs <command>` runs the local CLI without installing globally.
|
|
30
|
+
- `npm install` triggers `postinstall`, which runs `scripts/install-skills.mjs`.
|
|
31
|
+
|
|
32
|
+
There is no separate build step; published files are controlled by the `files` list in `package.json`.
|
|
33
|
+
|
|
34
|
+
## Coding Style & Naming Conventions
|
|
35
|
+
|
|
36
|
+
Use modern JavaScript ESM with `.mjs` files. Match the existing style: two-space indentation, semicolons, single quotes, named helper functions, and explicit async filesystem calls from `node:fs/promises`. Prefer small pure helpers near related workflow logic. Use kebab-case for workflow slugs, skill names, and generated artifact directories.
|
|
37
|
+
|
|
38
|
+
## Testing Guidelines
|
|
39
|
+
|
|
40
|
+
Tests use Node’s built-in `node:test` plus `node:assert/strict`. Name tests by behavior, for example `blocks build approval when ...`. For workflow changes, cover the transition gate and persisted state, not only helper output. Run `npm test` before committing.
|
|
41
|
+
|
|
42
|
+
## Commit & Pull Request Guidelines
|
|
43
|
+
|
|
44
|
+
Recent history uses short imperative commit messages, sometimes with a conventional prefix, for example `Add semantic spec delta archiving`, `fix plan rerun feedback loop`, or `docs: document codex workflow hook install`.
|
|
45
|
+
|
|
46
|
+
Pull requests should include a concise behavior summary, tests run, and any user-visible workflow or skill changes. Link issues when available. Include screenshots only for rendered HTML or visual asset changes.
|
|
47
|
+
|
|
48
|
+
## Agent-Specific Instructions
|
|
49
|
+
|
|
50
|
+
Do not commit generated local runtime state such as `.loopx/`, or ad hoc demo output unless the change explicitly requires it. Preserve user edits in skill files and avoid overwriting installed local skill copies outside this repository.
|
package/README.md
CHANGED
|
@@ -1,165 +1,108 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="./assets/logo.svg" alt="loopx
|
|
2
|
+
<img src="./assets/logo.svg" alt="loopx logo" width="128" height="128">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">loopx</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
Skill-first workflow
|
|
8
|
+
Skill-first workflow suite for agentic coding assistants.
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
[中文文档](./README.zh-CN.md)
|
|
12
12
|
|
|
13
|
-
`loopx`
|
|
13
|
+
`loopx` bundles a pragmatic set of skills for Codex and Claude-style coding agents. It combines grill-me style clarification with superpowers-style planning, execution, review, and finishing workflows.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Recommended v1 flow:
|
|
16
16
|
|
|
17
17
|
```text
|
|
18
|
-
clarify -> plan ->
|
|
18
|
+
clarify -> spec? -> plan -> subagent-exec | exec -> 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.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## Features
|
|
26
|
-
|
|
27
|
-
- Installs and exposes eleven bundled loopx Codex skills: workflow skills `clarify`, `plan`, `build`, `review`, `archive`, and `autopilot`; quality support skills `debug`, `tdd`, and `verify`; and Go support skills `go-style` and `kratos`.
|
|
28
|
-
- Keeps bundled skill routing explicit in `skills/RESOLVER.md`, with deterministic governance checks for frontmatter, plugin mirrors, resolver coverage, local references, package inclusion, and version alignment.
|
|
29
|
-
- Supports npm global install and Codex plugin install through the same install/discovery core.
|
|
30
|
-
- Installs a managed Codex workflow hook that surfaces loopx workflow state and safe next-action hints inside Codex.
|
|
31
|
-
- Stores runtime state and stage artifacts locally under `.loopx/` for auditability, recovery, and migration.
|
|
32
|
-
- Stores clarify intake snapshots under `.loopx/intake/` so `.loopx/specs/` stays reserved for long-lived domain specs.
|
|
33
|
-
- Records existing project AI rule files, existing spec sources, and detected verification commands in `.loopx/config.json` during init so loopx can preserve local sources of truth while still running the full workflow.
|
|
34
|
-
- Runs `plan` with a Planner -> Architect -> Critic consensus loop by default.
|
|
35
|
-
- Writes OpenSpec-inspired change artifacts during `plan`: proposal, spec delta, design, vertical slices, tasks, and an artifact dependency graph.
|
|
36
|
-
- Provides per-repo agent context under `.loopx/agents/` and `.loopx/context/domain.md`, consumed by build/review context manifests.
|
|
37
|
-
- Runs `build` with execution records, verification evidence, architect validation, deslop cleanup, and regression re-verification.
|
|
38
|
-
- Keeps `review` as an independent acceptance surface with code review plus an internal architecture-smell lane.
|
|
39
|
-
- Supports `archive` to sync approved change deltas into long-lived `.loopx/specs/` source-of-truth files and emit ADR candidates.
|
|
40
|
-
|
|
41
|
-
## Installation
|
|
42
|
-
|
|
43
|
-
### npm Global Install
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npm install -g @ai-content-space/loopx
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Installation automatically runs:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
node scripts/install-skills.mjs
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
The script materializes loopx-owned skills under:
|
|
56
|
-
|
|
57
|
-
```text
|
|
58
|
-
~/.agents/skills/
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
It also installs the loopx-managed Codex workflow hook at:
|
|
62
|
-
|
|
63
|
-
```text
|
|
64
|
-
~/.codex/hooks/codex-workflow-hook.mjs
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
and updates:
|
|
68
|
-
|
|
69
|
-
```text
|
|
70
|
-
~/.agents/.skill-lock.json
|
|
71
|
-
```
|
|
23
|
+
## Skills
|
|
72
24
|
|
|
73
|
-
|
|
25
|
+
Core workflow skills:
|
|
74
26
|
|
|
75
|
-
|
|
27
|
+
- `clarify`: interview until scope, non-goals, constraints, and decision boundaries are clear.
|
|
28
|
+
- `spec`: write a design document or lightweight design note when design decisions are required.
|
|
29
|
+
- `plan`: write a bite-sized implementation plan in the superpowers `writing-plans` style.
|
|
30
|
+
- `subagent-exec`: execute an approved plan with fresh subagents and staged review.
|
|
31
|
+
- `exec`: execute an approved plan inline when subagents are unavailable or not desired.
|
|
32
|
+
- `review`: request independent code review against a git range and plan or requirements.
|
|
33
|
+
- `fix-review`: evaluate and implement code review feedback rigorously.
|
|
34
|
+
- `finish`: verify and choose merge, PR, keep, or discard.
|
|
35
|
+
- `refactor-plan`: interview and write a behavior-preserving refactor plan with tiny commits.
|
|
76
36
|
|
|
77
|
-
|
|
78
|
-
plugins/loopx/
|
|
79
|
-
```
|
|
37
|
+
Support skills:
|
|
80
38
|
|
|
81
|
-
|
|
39
|
+
- `tdd`
|
|
40
|
+
- `debug`
|
|
41
|
+
- `verify`
|
|
42
|
+
- `go-style`
|
|
43
|
+
- `kratos`
|
|
82
44
|
|
|
83
|
-
|
|
84
|
-
node plugins/loopx/scripts/plugin-install.mjs
|
|
85
|
-
```
|
|
45
|
+
## Artifacts
|
|
86
46
|
|
|
87
|
-
|
|
47
|
+
Human-maintained artifacts live under `docs/loopx/`:
|
|
88
48
|
|
|
89
|
-
|
|
49
|
+
- `docs/loopx/design/`
|
|
50
|
+
- `docs/loopx/plans/`
|
|
51
|
+
- `docs/loopx/reviews/`
|
|
52
|
+
- `docs/loopx/refactors/`
|
|
90
53
|
|
|
91
|
-
|
|
54
|
+
`.loopx/` is for local support state, hook diagnostics, installer metadata, and legacy runtime workflows.
|
|
92
55
|
|
|
93
|
-
|
|
94
|
-
loopx init --slug my-task
|
|
95
|
-
```
|
|
56
|
+
## Installation
|
|
96
57
|
|
|
97
|
-
|
|
58
|
+
Install globally:
|
|
98
59
|
|
|
99
60
|
```bash
|
|
100
|
-
|
|
61
|
+
npm install -g @ai-content-space/loopx
|
|
101
62
|
```
|
|
102
63
|
|
|
103
|
-
|
|
64
|
+
Postinstall installs user-level skills and hooks for Codex and Claude:
|
|
104
65
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
66
|
+
- Codex skills: `~/.agents/skills/`
|
|
67
|
+
- Claude skills: `~/.claude/skills/`
|
|
68
|
+
- Codex hook: `~/.codex/hooks/codex-workflow-hook.mjs`
|
|
69
|
+
- Claude hook: `~/.claude/hooks/loopx-workflow-hook.mjs`
|
|
109
70
|
|
|
110
|
-
|
|
71
|
+
Run the installer manually or choose targets interactively:
|
|
111
72
|
|
|
112
73
|
```bash
|
|
113
|
-
loopx
|
|
114
|
-
loopx
|
|
74
|
+
loopx install-skills
|
|
75
|
+
loopx install-skills --target codex
|
|
76
|
+
loopx install-skills --target claude
|
|
77
|
+
loopx install-skills --target claude --project
|
|
78
|
+
loopx install-skills --target all --yes
|
|
115
79
|
```
|
|
116
80
|
|
|
117
|
-
|
|
81
|
+
Claude project install writes to the current repository's `.claude/skills/` and `.claude/settings.json`.
|
|
118
82
|
|
|
119
|
-
|
|
120
|
-
loopx approve my-task --from build --to review
|
|
121
|
-
loopx review my-task
|
|
122
|
-
```
|
|
83
|
+
## Codex Plugin
|
|
123
84
|
|
|
124
|
-
|
|
85
|
+
The Codex plugin shell lives at:
|
|
125
86
|
|
|
126
87
|
```text
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
When review has approved the workflow and routed it to `done`, `$archive` consumes the pending `review -> done` completion transition before syncing specs. CLI-only operators can still run `loopx approve my-task --from review --to done` followed by `loopx archive my-task` explicitly.
|
|
131
|
-
|
|
132
|
-
Check status:
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
loopx status my-task
|
|
136
|
-
loopx status my-task --json
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Planning also writes derived HTML reading views so the plan can be reviewed without another command:
|
|
140
|
-
|
|
141
|
-
```text
|
|
142
|
-
.loopx/workflows/my-task/view/index.html
|
|
143
|
-
.loopx/workflows/my-task/view/plan.html
|
|
144
|
-
.loopx/views/index.html
|
|
88
|
+
plugins/loopx/
|
|
145
89
|
```
|
|
146
90
|
|
|
147
|
-
|
|
91
|
+
Plugin install script:
|
|
148
92
|
|
|
149
93
|
```bash
|
|
150
|
-
loopx
|
|
94
|
+
node plugins/loopx/scripts/plugin-install.mjs
|
|
151
95
|
```
|
|
152
96
|
|
|
153
|
-
|
|
97
|
+
The plugin mirrors the canonical `skills/` directory and uses the same install/discovery core.
|
|
154
98
|
|
|
155
|
-
|
|
156
|
-
loopx plan --direct ./path/to/spec.md
|
|
157
|
-
```
|
|
99
|
+
## CLI
|
|
158
100
|
|
|
159
|
-
|
|
101
|
+
The CLI supports installation, diagnostics, rendering, and legacy runtime compatibility:
|
|
160
102
|
|
|
161
103
|
```bash
|
|
162
|
-
loopx
|
|
104
|
+
loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--yes]
|
|
105
|
+
loopx init [--slug <slug>] [--enable-agent-delegation] [--auto-agent-delegation] [--agent-delegation-threshold <local|critic-only|parallel-review>]
|
|
163
106
|
loopx clarify <slug> [--standard|--deep]
|
|
164
107
|
loopx approve <slug> --from <stage> --to <stage>
|
|
165
108
|
loopx plan [slug] [--direct <spec-path>] [--interactive] [--deliberate]
|
|
@@ -176,11 +119,9 @@ loopx migrate
|
|
|
176
119
|
loopx repair-install
|
|
177
120
|
```
|
|
178
121
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
`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.
|
|
122
|
+
Legacy `.loopx/workflows/` commands remain available for compatibility. They are not the v1 skill-suite workflow.
|
|
182
123
|
|
|
183
|
-
##
|
|
124
|
+
## Governance
|
|
184
125
|
|
|
185
126
|
The bundled skill resolver lives at:
|
|
186
127
|
|
|
@@ -188,338 +129,10 @@ The bundled skill resolver lives at:
|
|
|
188
129
|
skills/RESOLVER.md
|
|
189
130
|
```
|
|
190
131
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
Skill governance is enforced by:
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
node scripts/verify-skills.mjs
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
The verifier checks that bundled skill frontmatter is triggerable and bounded, `metadata.version` matches `package.json`, plugin skill mirrors match the canonical skills, `skills/RESOLVER.md` covers every bundled skill without stale bundled-skill references, local skill references exist, the plugin manifest version matches the package version, and the verifier itself is included in the npm package.
|
|
200
|
-
|
|
201
|
-
## Skills
|
|
202
|
-
|
|
203
|
-
### clarify
|
|
204
|
-
|
|
205
|
-
`clarify` turns an ambiguous request into an execution-ready spec. It tracks ambiguity score, non-goals, decision boundaries, and pressure-pass completion. It only recommends handoff to `plan` after the runtime gates are satisfied.
|
|
206
|
-
|
|
207
|
-
Profiles:
|
|
208
|
-
|
|
209
|
-
- `--standard`: target ambiguity score `<= 0.20`, up to `15` rounds.
|
|
210
|
-
- `--deep`: target ambiguity score `<= 0.10`, up to `25` rounds.
|
|
211
|
-
|
|
212
|
-
### plan
|
|
213
|
-
|
|
214
|
-
`plan` turns an approved clarify spec, or a directly supplied spec, into a reviewed plan package. By default it runs the Planner, Architect, and Critic review loop until approval or the iteration cap is reached.
|
|
215
|
-
|
|
216
|
-
Main artifacts:
|
|
217
|
-
|
|
218
|
-
- `.loopx/plans/prd-<slug>.md`
|
|
219
|
-
- `.loopx/plans/test-spec-<slug>.md`
|
|
220
|
-
- `.loopx/changes/active/<change-id>/proposal.md`
|
|
221
|
-
- `.loopx/changes/active/<change-id>/spec-delta.md`
|
|
222
|
-
- `.loopx/changes/active/<change-id>/design.md`
|
|
223
|
-
- `.loopx/changes/active/<change-id>/tasks.md`
|
|
224
|
-
- `.loopx/changes/active/<change-id>/slices.json`
|
|
225
|
-
- `.loopx/changes/active/<change-id>/artifact-graph.json`
|
|
226
|
-
- `.loopx/workflows/<slug>/plan.md`
|
|
227
|
-
- `.loopx/workflows/<slug>/architecture.md`
|
|
228
|
-
- `.loopx/workflows/<slug>/development-plan.md`
|
|
229
|
-
- `.loopx/workflows/<slug>/test-plan.md`
|
|
230
|
-
- `.loopx/workflows/<slug>/requirement-traceability.md`
|
|
231
|
-
|
|
232
|
-
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.
|
|
233
|
-
|
|
234
|
-
`requirement-traceability.md` maps the original source requirements or PRD to the generated plan package, change delta, vertical slices, and tests. If explicit source coverage items or source requirement tables are not covered by the plan package, `plan` stays blocked before build approval.
|
|
235
|
-
|
|
236
|
-
`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.
|
|
237
|
-
|
|
238
|
-
### build
|
|
239
|
-
|
|
240
|
-
`build` executes an approved plan and records changes, evidence, and limitations in the canonical artifact:
|
|
241
|
-
|
|
242
|
-
```text
|
|
243
|
-
.loopx/workflows/<slug>/execution-record.md
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
Deslop cleanup is enabled by default. To skip it explicitly:
|
|
247
|
-
|
|
248
|
-
```bash
|
|
249
|
-
loopx build <slug> --no-deslop
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
When review requests implementation changes, the normal Codex-facing handoff uses the review artifact as the direct rework contract:
|
|
253
|
-
|
|
254
|
-
```text
|
|
255
|
-
$build --from-review .loopx/workflows/<slug>/review-report.md
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
The approved PRD, test spec, previous execution record, and workflow-local plan package remain supporting context.
|
|
259
|
-
|
|
260
|
-
### review
|
|
261
|
-
|
|
262
|
-
`review` consumes the build `execution-record.md`, runs independent acceptance, code review, and a lightweight architecture-smell lane, and generates:
|
|
263
|
-
|
|
264
|
-
```text
|
|
265
|
-
.loopx/workflows/<slug>/review-report.md
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
The user-facing review result is expected to be written in Chinese.
|
|
269
|
-
|
|
270
|
-
If review approves the run and routes it to `done`, the normal Codex-facing next step is `$archive <slug>`; archive consumes the pending completion transition and then syncs specs. CLI-only operators may still explicitly run `loopx approve <slug> --from review --to done` before `loopx archive <slug>`. If review requests implementation changes, run `$build --from-review .loopx/workflows/<slug>/review-report.md`. Plan and clarify rollbacks still use `$plan <slug>` or `$clarify <slug>` when the review finding says the plan or requirements are wrong.
|
|
271
|
-
|
|
272
|
-
The architecture-smell lane is part of review; it does not add a new stage. It records findings under `review-support/architecture-smell.json` and only blocks when module seams, testability, domain vocabulary, or plan architecture assumptions are materially wrong.
|
|
273
|
-
|
|
274
|
-
### archive
|
|
275
|
-
|
|
276
|
-
`archive` consumes a completed workflow, or a review-approved workflow whose only pending route is `done`, and syncs the approved `.loopx/changes/active/<change-id>/spec-delta.md` into long-lived domain specs under `.loopx/specs/`. The change folder is moved to:
|
|
277
|
-
|
|
278
|
-
```text
|
|
279
|
-
.loopx/changes/archive/<change-id>/
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
Archive also writes an advisory ADR candidate under `.loopx/decisions/adr-candidates/<change-id>.md`. It is not promoted to `docs/adr/` automatically.
|
|
283
|
-
|
|
284
|
-
Archive applies requirement deltas semantically instead of appending per-change history blocks. ADDED creates requirements, MODIFIED replaces a full existing requirement block, REMOVED deletes a requirement, and RENAMED changes the requirement title while preserving its body.
|
|
285
|
-
|
|
286
|
-
### autopilot
|
|
287
|
-
|
|
288
|
-
`autopilot` is the end-to-end orchestration entrypoint. It may run internal phases such as expansion, planning, execution, QA, and validation, but canonical artifacts still come from the public `clarify -> plan -> build -> review` flow.
|
|
289
|
-
|
|
290
|
-
The orchestration ledger is written to:
|
|
291
|
-
|
|
292
|
-
```text
|
|
293
|
-
.loopx/autopilot/<slug>/run.json
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### debug
|
|
297
|
-
|
|
298
|
-
`debug` is a quality support skill for bugs, failures, regressions, and unexpected behavior. It requires root-cause investigation before proposing fixes, then moves through pattern analysis, hypothesis testing, and implementation.
|
|
299
|
-
|
|
300
|
-
### tdd
|
|
301
|
-
|
|
302
|
-
`tdd` is a quality support skill for feature work and bug fixes. It requires writing a failing test first, confirming the failure is meaningful, then implementing the smallest change needed to pass.
|
|
303
|
-
|
|
304
|
-
### verify
|
|
305
|
-
|
|
306
|
-
`verify` is a quality support skill for final claims. It requires fresh verification evidence before saying work is complete, fixed, passing, ready to commit, or ready for review.
|
|
307
|
-
|
|
308
|
-
### go-style
|
|
309
|
-
|
|
310
|
-
`go-style` is a Go language support skill. It guides `.go` edits toward idiomatic structure, local project conventions, clear error handling, small interfaces, table-driven tests, and `gofmt`/Go verification.
|
|
311
|
-
|
|
312
|
-
### kratos
|
|
313
|
-
|
|
314
|
-
`kratos` is a Go-Kratos framework support skill. It applies when a project uses Kratos signals such as `buf.yaml`, proto APIs, `internal/service`, `internal/biz`, `internal/data`, or `github.com/go-kratos/kratos/v2`, and includes focused references for proto design, layered architecture, config, middleware, auth, HTTP customization, and troubleshooting.
|
|
315
|
-
|
|
316
|
-
## Runtime Layout
|
|
317
|
-
|
|
318
|
-
loopx writes runtime state under `.loopx/` in the current project:
|
|
319
|
-
|
|
320
|
-
```text
|
|
321
|
-
.loopx/
|
|
322
|
-
README.md
|
|
323
|
-
config.json
|
|
324
|
-
intake/
|
|
325
|
-
clarify-<slug>-<timestamp>.md
|
|
326
|
-
views/
|
|
327
|
-
index.html
|
|
328
|
-
specs/
|
|
329
|
-
<domain>/
|
|
330
|
-
spec.md
|
|
331
|
-
changes/
|
|
332
|
-
active/
|
|
333
|
-
<change-id>/
|
|
334
|
-
proposal.md
|
|
335
|
-
spec-delta.md
|
|
336
|
-
design.md
|
|
337
|
-
tasks.md
|
|
338
|
-
slices.json
|
|
339
|
-
artifact-graph.json
|
|
340
|
-
archive/
|
|
341
|
-
<change-id>/
|
|
342
|
-
decisions/
|
|
343
|
-
adr-candidates/
|
|
344
|
-
plans/
|
|
345
|
-
agents/
|
|
346
|
-
issue-tracker.md
|
|
347
|
-
domain.md
|
|
348
|
-
triage-labels.md
|
|
349
|
-
context/
|
|
350
|
-
domain.md
|
|
351
|
-
workflows/
|
|
352
|
-
<slug>/
|
|
353
|
-
state.json
|
|
354
|
-
spec.md
|
|
355
|
-
plan.md
|
|
356
|
-
architecture.md
|
|
357
|
-
development-plan.md
|
|
358
|
-
test-plan.md
|
|
359
|
-
execution-record.md
|
|
360
|
-
review-report.md
|
|
361
|
-
view/
|
|
362
|
-
index.html
|
|
363
|
-
intake.html
|
|
364
|
-
plan.html
|
|
365
|
-
build.html
|
|
366
|
-
review.html
|
|
367
|
-
plan-reviews/
|
|
368
|
-
build-support/
|
|
369
|
-
review-support/
|
|
370
|
-
autopilot/
|
|
371
|
-
<slug>/
|
|
372
|
-
run.json
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
`config.json` records the loopx product contract plus init-time project discovery: existing AI rules such as `AGENTS.md` / `CLAUDE.md` / Cursor / Copilot files, existing spec sources such as `docs/changes` or ADR/RFC folders, and detected install/test/lint/typecheck/build/E2E commands. This does not create a lighter loopx mode; it keeps project facts available to `plan`, `build`, and `review` while preserving loopx's full closed workflow.
|
|
376
|
-
|
|
377
|
-
`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.
|
|
378
|
-
|
|
379
|
-
`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.
|
|
380
|
-
|
|
381
|
-
### Document Boundaries
|
|
382
|
-
|
|
383
|
-
Documents users normally need to watch:
|
|
384
|
-
|
|
385
|
-
- `README.md` / `README.zh-CN.md`: product usage, commands, and runtime layout.
|
|
386
|
-
- `.loopx/workflows/<slug>/spec.md`: the current requirement working copy.
|
|
387
|
-
- `.loopx/workflows/<slug>/plan.md`, `architecture.md`, `development-plan.md`, and `test-plan.md`: the current task's plan, architecture, execution, and verification contract.
|
|
388
|
-
- `.loopx/workflows/<slug>/requirement-traceability.md`: original requirement coverage gate used by plan, build, and review.
|
|
389
|
-
- `.loopx/workflows/<slug>/execution-record.md` and `review-report.md`: execution evidence and review result.
|
|
390
|
-
- `.loopx/views/index.html` and `.loopx/workflows/<slug>/view/index.html`: reading entrypoints written after `plan` and regenerated by `loopx render`.
|
|
391
|
-
|
|
392
|
-
Documents users may read and modify as workflow fact sources:
|
|
393
|
-
|
|
394
|
-
- `.loopx/workflows/<slug>/*.md`: editable working-copy artifacts for the active workflow; changes still need to pass the relevant stage gates.
|
|
395
|
-
- `.loopx/config.json`: workspace configuration, project-rule/spec-source discovery, and default verification commands; update it if the repository's canonical commands or project-rule files change.
|
|
396
|
-
- `.loopx/context/domain.md` and `.loopx/agents/*.md`: project context, domain vocabulary, and agent collaboration guidance.
|
|
397
|
-
- `.loopx/changes/active/<change-id>/*.md`: plan-generated change proposal, design, tasks, and spec delta; edits should be followed by plan/build/review validation.
|
|
398
|
-
- `.loopx/specs/<domain>/spec.md`: long-lived archived behavior specs; normally synced by `archive`, and manual edits should stay consistent with later change deltas.
|
|
399
|
-
|
|
400
|
-
Documents and data the tools depend on, or generate as derived evidence:
|
|
401
|
-
|
|
402
|
-
- `.loopx/workflows/<slug>/state.json`, `build-context.jsonl`, and `review-context.jsonl`: runtime state and context manifests; tools depend on these and manual edits are discouraged.
|
|
403
|
-
- `.loopx/workflows/<slug>/plan-reviews/`, `build-support/`, and `review-support/`: stage evidence and internal review outputs for diagnostics and review.
|
|
404
|
-
- `.loopx/intake/clarify-*.md`: immutable clarify snapshots for audit and traceability; do not treat them as long-lived specs.
|
|
405
|
-
- `.loopx/changes/active/<change-id>/slices.json` and `artifact-graph.json`: structured planning data consumed by build/review/archive.
|
|
406
|
-
- `.loopx/autopilot/<slug>/run.json` and `.loopx/build-active.json`: orchestration and stop-hook runtime state.
|
|
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.
|
|
408
|
-
|
|
409
|
-
## Diagnostics and Repair
|
|
410
|
-
|
|
411
|
-
Inspect runtime and skill installation state:
|
|
412
|
-
|
|
413
|
-
```bash
|
|
414
|
-
loopx doctor
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
Repair loopx-owned skill installation:
|
|
418
|
-
|
|
419
|
-
```bash
|
|
420
|
-
loopx repair-install
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
Check skill discovery state only:
|
|
424
|
-
|
|
425
|
-
```bash
|
|
426
|
-
node scripts/install-skills.mjs --check
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
Verify bundled skill governance:
|
|
132
|
+
Run deterministic governance checks before release or when changing bundled skills:
|
|
430
133
|
|
|
431
134
|
```bash
|
|
432
135
|
node scripts/verify-skills.mjs
|
|
433
136
|
```
|
|
434
137
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
`install-skills.mjs` and the Codex plugin installer automatically install `scripts/codex-workflow-hook.mjs` to:
|
|
438
|
-
|
|
439
|
-
```text
|
|
440
|
-
~/.codex/hooks/codex-workflow-hook.mjs
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
The hook reads the nearest `.loopx/workflows/<slug>/state.json` and emits advisory context for the active workflow: current stage, blockers, readiness, authorization, evidence, and the next safe loopx action. It is advisory only; runtime gates remain authoritative.
|
|
444
|
-
|
|
445
|
-
Set `LOOPX_HOOKS=0` to disable the workflow hook output.
|
|
446
|
-
|
|
447
|
-
## Codex Stop Hook
|
|
448
|
-
|
|
449
|
-
loopx includes a Codex stop-hook helper that prevents an active build from stopping before review handoff readiness:
|
|
450
|
-
|
|
451
|
-
```bash
|
|
452
|
-
node scripts/codex-stop-hook.mjs
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
During `loopx build`, runtime state is written to:
|
|
456
|
-
|
|
457
|
-
```text
|
|
458
|
-
.loopx/build-active.json
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
If that state says build is still `starting`, `executing`, `verifying`, or `fixing`, the hook returns `allow: false` and a continuation message. Once build is `review-ready`, blocked by a real blocker, failed, cancelled, or inactive, the hook allows the stop.
|
|
462
|
-
|
|
463
|
-
## Environment Variables
|
|
464
|
-
|
|
465
|
-
Install and discovery logic supports these environment variables:
|
|
466
|
-
|
|
467
|
-
- `LOOPX_HOME`: override the default home directory.
|
|
468
|
-
- `LOOPX_AGENTS_ROOT`: override the `.agents` root.
|
|
469
|
-
- `LOOPX_SKILLS_ROOT`: override the installed skills directory.
|
|
470
|
-
- `LOOPX_SKILL_LOCK_PATH`: override the skill lock path.
|
|
471
|
-
- `LOOPX_PROJECT_ROOT`: override the loopx project root.
|
|
472
|
-
- `LOOPX_SKILL_SOURCE_ROOT`: override the skill source directory.
|
|
473
|
-
- `LOOPX_DISTRIBUTION_CHANNEL`: set the install channel, default `npm`.
|
|
474
|
-
- `LOOPX_INSTALLATION_IDENTITY`: set the install identity, default `loopx`.
|
|
475
|
-
- `LOOPX_SOURCE_URL`: set the install source.
|
|
476
|
-
- `LOOPX_HOOKS`: set to `0` to disable workflow hook output.
|
|
477
|
-
|
|
478
|
-
## Development
|
|
479
|
-
|
|
480
|
-
Run tests:
|
|
481
|
-
|
|
482
|
-
```bash
|
|
483
|
-
npm test
|
|
484
|
-
```
|
|
485
|
-
|
|
486
|
-
`npm test` runs bundled skill governance first, then the Node test suites:
|
|
487
|
-
|
|
488
|
-
```bash
|
|
489
|
-
node scripts/verify-skills.mjs
|
|
490
|
-
node --test test/*.test.mjs
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
Useful verification commands:
|
|
494
|
-
|
|
495
|
-
```bash
|
|
496
|
-
node scripts/verify-skills.mjs
|
|
497
|
-
node --test test/*.test.mjs
|
|
498
|
-
node scripts/install-skills.mjs --check
|
|
499
|
-
node --test plugins/loopx/scripts/plugin-install.test.mjs
|
|
500
|
-
node src/cli.mjs --help
|
|
501
|
-
node src/cli.mjs --version
|
|
502
|
-
node src/cli.mjs doctor
|
|
503
|
-
node src/cli.mjs status --json
|
|
504
|
-
```
|
|
505
|
-
|
|
506
|
-
## Published Files
|
|
507
|
-
|
|
508
|
-
`package.json` publishes:
|
|
509
|
-
|
|
510
|
-
- `README.md`
|
|
511
|
-
- `README.zh-CN.md`
|
|
512
|
-
- `package.json`
|
|
513
|
-
- `scripts/install-skills.mjs`
|
|
514
|
-
- `scripts/verify-skills.mjs`
|
|
515
|
-
- `scripts/codex-stop-hook.mjs`
|
|
516
|
-
- `scripts/codex-workflow-hook.mjs`
|
|
517
|
-
- `assets/logo.svg`
|
|
518
|
-
- `src/`
|
|
519
|
-
- `skills/`, including public loopx skills plus compatibility/internal skill sources shipped with the package
|
|
520
|
-
- `templates/`
|
|
521
|
-
- `plugins/loopx/`
|
|
522
|
-
|
|
523
|
-
## Version
|
|
524
|
-
|
|
525
|
-
Current npm package version: `0.1.9`.
|
|
138
|
+
The verifier checks bundled skill frontmatter, plugin mirrors, resolver coverage, local references, package inclusion, version alignment, and public docs.
|