@ai-content-space/loopx 0.1.10 → 0.2.1
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 +49 -0
- package/README.md +69 -448
- package/README.zh-CN.md +69 -459
- package/docs/loopx/design/loopx-skill-suite-v1-design.md +80 -0
- package/docs/loopx/plans/loopx-skill-suite-v1-implementation.md +81 -0
- package/package.json +7 -3
- package/plugins/loopx/.codex-plugin/plugin.json +4 -4
- 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 +349 -0
- package/plugins/loopx/skills/fix-review/SKILL.md +216 -0
- package/plugins/loopx/skills/go-style/SKILL.md +2 -2
- package/plugins/loopx/skills/kratos/SKILL.md +1 -1
- package/plugins/loopx/skills/plan/SKILL.md +138 -271
- 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 +34 -2
- package/skills/RESOLVER.md +22 -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 +349 -0
- package/skills/fix-review/SKILL.md +216 -0
- package/skills/go-style/SKILL.md +2 -2
- package/skills/kratos/SKILL.md +1 -1
- package/skills/plan/SKILL.md +138 -271
- 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 +78 -7
- package/src/context-manifest.mjs +2 -2
- package/src/html-views.mjs +129 -195
- package/src/install-discovery.mjs +210 -6
- package/src/next-skill.mjs +2 -4
- package/src/plan-runtime.mjs +219 -93
- package/src/runtime-maintenance.mjs +5 -2
- package/src/workflow.mjs +749 -71
- package/templates/architecture.md +58 -16
- package/templates/development-plan.md +42 -12
- package/plugins/loopx/scripts/plugin-install.test.mjs +0 -125
- 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/ai-slop-cleaner/SKILL.md +0 -114
- package/skills/archive/SKILL.md +0 -55
- package/skills/autopilot/SKILL.md +0 -93
- package/skills/autoresearch/SKILL.md +0 -68
- package/skills/build/SKILL.md +0 -228
- package/skills/deep-interview/SKILL.md +0 -461
- package/skills/ralph/SKILL.md +0 -271
- package/skills/ralplan/SKILL.md +0 -49
package/AGENTS.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Repository Guidelines
|
|
2
|
+
|
|
3
|
+
## Iron Law
|
|
4
|
+
|
|
5
|
+
**Skill frontmatter descriptions are required for discovery, but skill bodies should stay operational, clear, and bounded. Avoid vague narrative, broad promises, and ambiguous handoffs. Keep each skill focused: versatile enough to be useful, not a universal key.**
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Project Structure & Module Organization
|
|
10
|
+
|
|
11
|
+
This repository is a Node.js ESM CLI package for loopx, a skill-first workflow harness for Codex and Claude-style agentic coding assistants.
|
|
12
|
+
|
|
13
|
+
- `src/` contains runtime modules and the `src/cli.mjs` executable.
|
|
14
|
+
- `test/` contains Node test suites, mainly `workflow.test.mjs` and `trellis-hardening.test.mjs`.
|
|
15
|
+
- `skills/` contains canonical skill source files. The v1 installed set is controlled by `LOOPX_BUNDLED_SKILLS` in `src/install-discovery.mjs`; not every local skill source is installed or governed as part of v1.
|
|
16
|
+
- `plugins/loopx/` mirrors the bundled plugin-ready v1 skills and plugin install scripts.
|
|
17
|
+
- `templates/` stores canonical workflow artifact templates.
|
|
18
|
+
- `scripts/` contains postinstall and hook scripts.
|
|
19
|
+
- `assets/` and `docs/` hold static assets, release notes, and design/planning documents.
|
|
20
|
+
|
|
21
|
+
Keep source changes close to the owning module. When changing workflow behavior, update matching tests and any affected bundled skill docs in both `skills/` and `plugins/loopx/skills/` when they are intentionally mirrored.
|
|
22
|
+
|
|
23
|
+
## Build, Test, and Development Commands
|
|
24
|
+
|
|
25
|
+
- `npm test` runs all repository tests with `node --test test/*.test.mjs`.
|
|
26
|
+
- `node --test test/workflow.test.mjs` runs the main workflow contract suite.
|
|
27
|
+
- `node --test test/trellis-hardening.test.mjs` runs context, hook, and review hardening tests.
|
|
28
|
+
- `node src/cli.mjs <command>` runs the local CLI without installing globally.
|
|
29
|
+
- `npm install` triggers `postinstall`, which runs `scripts/install-skills.mjs`.
|
|
30
|
+
|
|
31
|
+
There is no separate build step; published files are controlled by the `files` list in `package.json`.
|
|
32
|
+
|
|
33
|
+
## Coding Style & Naming Conventions
|
|
34
|
+
|
|
35
|
+
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.
|
|
36
|
+
|
|
37
|
+
## Testing Guidelines
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
## Commit & Pull Request Guidelines
|
|
42
|
+
|
|
43
|
+
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`.
|
|
44
|
+
|
|
45
|
+
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.
|
|
46
|
+
|
|
47
|
+
## Agent-Specific Instructions
|
|
48
|
+
|
|
49
|
+
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,172 +1,129 @@
|
|
|
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` installs a pragmatic v1 skill suite 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
|
|
23
|
+
## Skills
|
|
44
24
|
|
|
45
|
-
|
|
46
|
-
npm install -g @ai-content-space/loopx
|
|
47
|
-
```
|
|
25
|
+
The installed and governed v1 skill surface is the list below. The repository may keep auxiliary or compatibility skill sources under `skills/`, but they are not installed by `loopx install-skills` unless they are in the bundled v1 set.
|
|
48
26
|
|
|
49
|
-
|
|
27
|
+
Core workflow skills:
|
|
50
28
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
29
|
+
- `clarify`: interview until scope, non-goals, constraints, and decision boundaries are clear.
|
|
30
|
+
- `spec`: write a design document or lightweight design note when design decisions are required.
|
|
31
|
+
- `plan`: write a bite-sized implementation plan in the superpowers `writing-plans` style.
|
|
32
|
+
- `subagent-exec`: execute an approved plan with fresh subagents and staged review.
|
|
33
|
+
- `exec`: execute an approved plan inline when subagents are unavailable or not desired.
|
|
34
|
+
- `review`: request independent code review against a git range and plan or requirements.
|
|
35
|
+
- `fix-review`: evaluate and implement code review feedback rigorously.
|
|
36
|
+
- `finish`: verify and choose merge, PR, keep, or discard.
|
|
37
|
+
- `refactor-plan`: interview and write a behavior-preserving refactor plan with tiny commits.
|
|
54
38
|
|
|
55
|
-
|
|
39
|
+
Support skills:
|
|
56
40
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
41
|
+
- `tdd`
|
|
42
|
+
- `debug`
|
|
43
|
+
- `verify`
|
|
44
|
+
- `go-style`
|
|
45
|
+
- `kratos`
|
|
60
46
|
|
|
61
|
-
|
|
47
|
+
## Artifacts
|
|
62
48
|
|
|
63
|
-
|
|
64
|
-
~/.codex/hooks/codex-workflow-hook.mjs
|
|
65
|
-
```
|
|
49
|
+
For the v1 skill-suite workflow, human-maintained artifacts live under `docs/loopx/`:
|
|
66
50
|
|
|
67
|
-
|
|
51
|
+
- `docs/loopx/design/`
|
|
52
|
+
- `docs/loopx/plans/`
|
|
53
|
+
- `docs/loopx/reviews/`
|
|
54
|
+
- `docs/loopx/refactors/`
|
|
55
|
+
- `docs/loopx/specs/`
|
|
68
56
|
|
|
69
|
-
|
|
70
|
-
~/.agents/.skill-lock.json
|
|
71
|
-
```
|
|
57
|
+
`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.
|
|
72
58
|
|
|
73
|
-
|
|
59
|
+
Generated support state, hook diagnostics, installer metadata, HTML views, manifests, and runtime JSON remain under `.loopx/`.
|
|
74
60
|
|
|
75
|
-
|
|
61
|
+
Local agent memory lives under `.loopx/memory/`:
|
|
76
62
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
63
|
+
- `.loopx/memory/MEMORY.md`
|
|
64
|
+
- `.loopx/memory/index.jsonl`
|
|
65
|
+
- `.loopx/memory/entries/`
|
|
66
|
+
- `.loopx/memory/archive/`
|
|
80
67
|
|
|
81
|
-
|
|
68
|
+
`MEMORY.md` is a bounded curated project memory summary. `index.jsonl` is a curated active index for agent file-search, not an append-only log.
|
|
82
69
|
|
|
83
|
-
|
|
84
|
-
node plugins/loopx/scripts/plugin-install.mjs
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
npm and plugin installs converge on the same `installationIdentity=loopx`, so Codex should expose one loopx skill set rather than duplicates.
|
|
88
|
-
|
|
89
|
-
## Quick Start
|
|
90
|
-
|
|
91
|
-
Initialize a workflow:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
loopx init --slug my-task
|
|
95
|
-
```
|
|
70
|
+
## Installation
|
|
96
71
|
|
|
97
|
-
|
|
72
|
+
Install globally:
|
|
98
73
|
|
|
99
74
|
```bash
|
|
100
|
-
|
|
75
|
+
npm install -g @ai-content-space/loopx
|
|
101
76
|
```
|
|
102
77
|
|
|
103
|
-
|
|
78
|
+
Postinstall installs user-level skills and hooks for Codex and Claude:
|
|
104
79
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
80
|
+
- Codex skills: `~/.agents/skills/`
|
|
81
|
+
- Claude skills: `~/.claude/skills/`
|
|
82
|
+
- Codex hook: `~/.codex/hooks/codex-workflow-hook.mjs`
|
|
83
|
+
- Claude hook: `~/.claude/hooks/loopx-workflow-hook.mjs`
|
|
109
84
|
|
|
110
|
-
|
|
85
|
+
Run the installer manually or choose targets interactively:
|
|
111
86
|
|
|
112
87
|
```bash
|
|
113
|
-
loopx
|
|
114
|
-
loopx
|
|
88
|
+
loopx install-skills
|
|
89
|
+
loopx install-skills --target codex
|
|
90
|
+
loopx install-skills --target claude
|
|
91
|
+
loopx install-skills --target claude --project
|
|
92
|
+
loopx install-skills --target all --yes
|
|
115
93
|
```
|
|
116
94
|
|
|
117
|
-
|
|
95
|
+
Claude project install writes to the current repository's `.claude/skills/` and `.claude/settings.json`.
|
|
118
96
|
|
|
119
|
-
|
|
120
|
-
loopx approve my-task --from build --to review
|
|
121
|
-
loopx review my-task
|
|
122
|
-
```
|
|
97
|
+
## Codex Plugin
|
|
123
98
|
|
|
124
|
-
|
|
99
|
+
The Codex plugin shell lives at:
|
|
125
100
|
|
|
126
101
|
```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
|
|
102
|
+
plugins/loopx/
|
|
145
103
|
```
|
|
146
104
|
|
|
147
|
-
|
|
105
|
+
Plugin install script:
|
|
148
106
|
|
|
149
107
|
```bash
|
|
150
|
-
loopx
|
|
108
|
+
node plugins/loopx/scripts/plugin-install.mjs
|
|
151
109
|
```
|
|
152
110
|
|
|
153
|
-
|
|
111
|
+
The plugin mirrors the canonical bundled v1 skills from `skills/` and uses the same install/discovery core.
|
|
154
112
|
|
|
155
|
-
|
|
156
|
-
loopx plan --direct ./path/to/spec.md
|
|
157
|
-
```
|
|
113
|
+
## CLI
|
|
158
114
|
|
|
159
|
-
|
|
115
|
+
The CLI supports installation, diagnostics, rendering, and runtime maintenance:
|
|
160
116
|
|
|
161
117
|
```bash
|
|
162
|
-
loopx
|
|
118
|
+
loopx --version
|
|
119
|
+
loopx install-skills [--target <codex|claude|all>] [--project] [--mode <copy|symlink>] [--dir <path>] [--yes]
|
|
120
|
+
loopx init [--slug <slug>] [--enable-agent-delegation] [--auto-agent-delegation] [--agent-delegation-threshold <local|critic-only|parallel-review>]
|
|
163
121
|
loopx clarify <slug> [--standard|--deep]
|
|
164
122
|
loopx approve <slug> --from <stage> --to <stage>
|
|
165
|
-
loopx plan [slug] [--
|
|
123
|
+
loopx plan [slug] [--interactive] [--deliberate]
|
|
166
124
|
loopx build <slug> [--no-deslop]
|
|
167
125
|
loopx build --from-review <review-report-path> [--no-deslop]
|
|
168
126
|
loopx review <slug> [--reviewer <name>]
|
|
169
|
-
loopx archive <slug>
|
|
170
127
|
loopx autopilot <slug> [--reviewer <name>]
|
|
171
128
|
loopx render [slug|--all]
|
|
172
129
|
loopx status [slug] [--json]
|
|
@@ -176,11 +133,7 @@ loopx migrate
|
|
|
176
133
|
loopx repair-install
|
|
177
134
|
```
|
|
178
135
|
|
|
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.
|
|
182
|
-
|
|
183
|
-
## Skill Routing and Governance
|
|
136
|
+
## Governance
|
|
184
137
|
|
|
185
138
|
The bundled skill resolver lives at:
|
|
186
139
|
|
|
@@ -188,342 +141,10 @@ The bundled skill resolver lives at:
|
|
|
188
141
|
skills/RESOLVER.md
|
|
189
142
|
```
|
|
190
143
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
Skill governance is enforced by:
|
|
144
|
+
Run deterministic governance checks before release or when changing bundled skills:
|
|
194
145
|
|
|
195
146
|
```bash
|
|
196
147
|
node scripts/verify-skills.mjs
|
|
197
148
|
```
|
|
198
149
|
|
|
199
|
-
The verifier checks
|
|
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
|
-
- `.loopx/workflows/<slug>/plan-delegation-decision.md`
|
|
232
|
-
|
|
233
|
-
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.
|
|
234
|
-
|
|
235
|
-
`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.
|
|
236
|
-
|
|
237
|
-
`plan-delegation-decision.md` records whether planning should stay local or use stronger critic/parallel-review depth. The decision uses risk, scope, state/data integrity, verification complexity, and architecture tradeoffs as triggers; missing delegation rationale blocks build handoff.
|
|
238
|
-
|
|
239
|
-
`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.
|
|
240
|
-
|
|
241
|
-
### build
|
|
242
|
-
|
|
243
|
-
`build` executes an approved plan and records changes, evidence, and limitations in the canonical artifact:
|
|
244
|
-
|
|
245
|
-
```text
|
|
246
|
-
.loopx/workflows/<slug>/execution-record.md
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
Deslop cleanup is enabled by default. To skip it explicitly:
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
loopx build <slug> --no-deslop
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
When review requests implementation changes, the normal Codex-facing handoff uses the review artifact as the direct rework contract:
|
|
256
|
-
|
|
257
|
-
```text
|
|
258
|
-
$build --from-review .loopx/workflows/<slug>/review-report.md
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
The approved PRD, test spec, previous execution record, and workflow-local plan package remain supporting context.
|
|
262
|
-
|
|
263
|
-
### review
|
|
264
|
-
|
|
265
|
-
`review` consumes the build `execution-record.md`, runs independent acceptance, code review, and a lightweight architecture-smell lane, and generates:
|
|
266
|
-
|
|
267
|
-
```text
|
|
268
|
-
.loopx/workflows/<slug>/review-report.md
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
The user-facing review result is expected to be written in Chinese.
|
|
272
|
-
|
|
273
|
-
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.
|
|
274
|
-
|
|
275
|
-
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.
|
|
276
|
-
|
|
277
|
-
### archive
|
|
278
|
-
|
|
279
|
-
`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:
|
|
280
|
-
|
|
281
|
-
```text
|
|
282
|
-
.loopx/changes/archive/<change-id>/
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
Archive also writes an advisory ADR candidate under `.loopx/decisions/adr-candidates/<change-id>.md`. It is not promoted to `docs/adr/` automatically.
|
|
286
|
-
|
|
287
|
-
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.
|
|
288
|
-
|
|
289
|
-
### autopilot
|
|
290
|
-
|
|
291
|
-
`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.
|
|
292
|
-
|
|
293
|
-
The orchestration ledger is written to:
|
|
294
|
-
|
|
295
|
-
```text
|
|
296
|
-
.loopx/autopilot/<slug>/run.json
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
### debug
|
|
300
|
-
|
|
301
|
-
`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.
|
|
302
|
-
|
|
303
|
-
### tdd
|
|
304
|
-
|
|
305
|
-
`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.
|
|
306
|
-
|
|
307
|
-
### verify
|
|
308
|
-
|
|
309
|
-
`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.
|
|
310
|
-
|
|
311
|
-
### go-style
|
|
312
|
-
|
|
313
|
-
`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.
|
|
314
|
-
|
|
315
|
-
### kratos
|
|
316
|
-
|
|
317
|
-
`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.
|
|
318
|
-
|
|
319
|
-
## Runtime Layout
|
|
320
|
-
|
|
321
|
-
loopx writes runtime state under `.loopx/` in the current project:
|
|
322
|
-
|
|
323
|
-
```text
|
|
324
|
-
.loopx/
|
|
325
|
-
README.md
|
|
326
|
-
config.json
|
|
327
|
-
intake/
|
|
328
|
-
clarify-<slug>-<timestamp>.md
|
|
329
|
-
views/
|
|
330
|
-
index.html
|
|
331
|
-
specs/
|
|
332
|
-
<domain>/
|
|
333
|
-
spec.md
|
|
334
|
-
changes/
|
|
335
|
-
active/
|
|
336
|
-
<change-id>/
|
|
337
|
-
proposal.md
|
|
338
|
-
spec-delta.md
|
|
339
|
-
design.md
|
|
340
|
-
tasks.md
|
|
341
|
-
slices.json
|
|
342
|
-
artifact-graph.json
|
|
343
|
-
archive/
|
|
344
|
-
<change-id>/
|
|
345
|
-
decisions/
|
|
346
|
-
adr-candidates/
|
|
347
|
-
plans/
|
|
348
|
-
agents/
|
|
349
|
-
issue-tracker.md
|
|
350
|
-
domain.md
|
|
351
|
-
triage-labels.md
|
|
352
|
-
context/
|
|
353
|
-
domain.md
|
|
354
|
-
workflows/
|
|
355
|
-
<slug>/
|
|
356
|
-
state.json
|
|
357
|
-
spec.md
|
|
358
|
-
plan.md
|
|
359
|
-
architecture.md
|
|
360
|
-
development-plan.md
|
|
361
|
-
test-plan.md
|
|
362
|
-
execution-record.md
|
|
363
|
-
review-report.md
|
|
364
|
-
view/
|
|
365
|
-
index.html
|
|
366
|
-
intake.html
|
|
367
|
-
plan.html
|
|
368
|
-
build.html
|
|
369
|
-
review.html
|
|
370
|
-
plan-reviews/
|
|
371
|
-
build-support/
|
|
372
|
-
review-support/
|
|
373
|
-
autopilot/
|
|
374
|
-
<slug>/
|
|
375
|
-
run.json
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
`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.
|
|
379
|
-
|
|
380
|
-
`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.
|
|
381
|
-
|
|
382
|
-
`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.
|
|
383
|
-
|
|
384
|
-
### Document Boundaries
|
|
385
|
-
|
|
386
|
-
Documents users normally need to watch:
|
|
387
|
-
|
|
388
|
-
- `README.md` / `README.zh-CN.md`: product usage, commands, and runtime layout.
|
|
389
|
-
- `.loopx/workflows/<slug>/spec.md`: the current requirement working copy.
|
|
390
|
-
- `.loopx/workflows/<slug>/plan.md`, `architecture.md`, `development-plan.md`, and `test-plan.md`: the current task's plan, architecture, execution, and verification contract.
|
|
391
|
-
- `.loopx/workflows/<slug>/requirement-traceability.md`: original requirement coverage gate used by plan, build, and review.
|
|
392
|
-
- `.loopx/workflows/<slug>/plan-delegation-decision.md`: recorded local/critic/parallel-review planning delegation rationale.
|
|
393
|
-
- `.loopx/workflows/<slug>/execution-record.md` and `review-report.md`: execution evidence and review result.
|
|
394
|
-
- `.loopx/views/index.html` and `.loopx/workflows/<slug>/view/index.html`: reading entrypoints written after `plan` and regenerated by `loopx render`.
|
|
395
|
-
|
|
396
|
-
Documents users may read and modify as workflow fact sources:
|
|
397
|
-
|
|
398
|
-
- `.loopx/workflows/<slug>/*.md`: editable working-copy artifacts for the active workflow; changes still need to pass the relevant stage gates.
|
|
399
|
-
- `.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.
|
|
400
|
-
- `.loopx/context/domain.md` and `.loopx/agents/*.md`: project context, domain vocabulary, and agent collaboration guidance.
|
|
401
|
-
- `.loopx/changes/active/<change-id>/*.md`: plan-generated change proposal, design, tasks, and spec delta; edits should be followed by plan/build/review validation.
|
|
402
|
-
- `.loopx/specs/<domain>/spec.md`: long-lived archived behavior specs; normally synced by `archive`, and manual edits should stay consistent with later change deltas.
|
|
403
|
-
|
|
404
|
-
Documents and data the tools depend on, or generate as derived evidence:
|
|
405
|
-
|
|
406
|
-
- `.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.
|
|
407
|
-
- `.loopx/workflows/<slug>/plan-reviews/`, `build-support/`, and `review-support/`: stage evidence and internal review outputs for diagnostics and review.
|
|
408
|
-
- `.loopx/intake/clarify-*.md`: immutable clarify snapshots for audit and traceability; do not treat them as long-lived specs.
|
|
409
|
-
- `.loopx/changes/active/<change-id>/slices.json` and `artifact-graph.json`: structured planning data consumed by build/review/archive.
|
|
410
|
-
- `.loopx/autopilot/<slug>/run.json` and `.loopx/build-active.json`: orchestration and stop-hook runtime state.
|
|
411
|
-
- `.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.
|
|
412
|
-
|
|
413
|
-
## Diagnostics and Repair
|
|
414
|
-
|
|
415
|
-
Inspect runtime and skill installation state:
|
|
416
|
-
|
|
417
|
-
```bash
|
|
418
|
-
loopx doctor
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
Repair loopx-owned skill installation:
|
|
422
|
-
|
|
423
|
-
```bash
|
|
424
|
-
loopx repair-install
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
Check skill discovery state only:
|
|
428
|
-
|
|
429
|
-
```bash
|
|
430
|
-
node scripts/install-skills.mjs --check
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
Verify bundled skill governance:
|
|
434
|
-
|
|
435
|
-
```bash
|
|
436
|
-
node scripts/verify-skills.mjs
|
|
437
|
-
```
|
|
438
|
-
|
|
439
|
-
## Codex Workflow Hook
|
|
440
|
-
|
|
441
|
-
`install-skills.mjs` and the Codex plugin installer automatically install `scripts/codex-workflow-hook.mjs` to:
|
|
442
|
-
|
|
443
|
-
```text
|
|
444
|
-
~/.codex/hooks/codex-workflow-hook.mjs
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
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.
|
|
448
|
-
|
|
449
|
-
Set `LOOPX_HOOKS=0` to disable the workflow hook output.
|
|
450
|
-
|
|
451
|
-
## Codex Stop Hook
|
|
452
|
-
|
|
453
|
-
loopx includes a Codex stop-hook helper that prevents an active build from stopping before review handoff readiness:
|
|
454
|
-
|
|
455
|
-
```bash
|
|
456
|
-
node scripts/codex-stop-hook.mjs
|
|
457
|
-
```
|
|
458
|
-
|
|
459
|
-
During `loopx build`, runtime state is written to:
|
|
460
|
-
|
|
461
|
-
```text
|
|
462
|
-
.loopx/build-active.json
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
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.
|
|
466
|
-
|
|
467
|
-
## Environment Variables
|
|
468
|
-
|
|
469
|
-
Install and discovery logic supports these environment variables:
|
|
470
|
-
|
|
471
|
-
- `LOOPX_HOME`: override the default home directory.
|
|
472
|
-
- `LOOPX_AGENTS_ROOT`: override the `.agents` root.
|
|
473
|
-
- `LOOPX_SKILLS_ROOT`: override the installed skills directory.
|
|
474
|
-
- `LOOPX_SKILL_LOCK_PATH`: override the skill lock path.
|
|
475
|
-
- `LOOPX_PROJECT_ROOT`: override the loopx project root.
|
|
476
|
-
- `LOOPX_SKILL_SOURCE_ROOT`: override the skill source directory.
|
|
477
|
-
- `LOOPX_DISTRIBUTION_CHANNEL`: set the install channel, default `npm`.
|
|
478
|
-
- `LOOPX_INSTALLATION_IDENTITY`: set the install identity, default `loopx`.
|
|
479
|
-
- `LOOPX_SOURCE_URL`: set the install source.
|
|
480
|
-
- `LOOPX_HOOKS`: set to `0` to disable workflow hook output.
|
|
481
|
-
|
|
482
|
-
## Development
|
|
483
|
-
|
|
484
|
-
Run tests:
|
|
485
|
-
|
|
486
|
-
```bash
|
|
487
|
-
npm test
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
`npm test` runs bundled skill governance first, then the Node test suites:
|
|
491
|
-
|
|
492
|
-
```bash
|
|
493
|
-
node scripts/verify-skills.mjs
|
|
494
|
-
node --test test/*.test.mjs
|
|
495
|
-
```
|
|
496
|
-
|
|
497
|
-
Useful verification commands:
|
|
498
|
-
|
|
499
|
-
```bash
|
|
500
|
-
node scripts/verify-skills.mjs
|
|
501
|
-
node --test test/*.test.mjs
|
|
502
|
-
node scripts/install-skills.mjs --check
|
|
503
|
-
node --test plugins/loopx/scripts/plugin-install.test.mjs
|
|
504
|
-
node src/cli.mjs --help
|
|
505
|
-
node src/cli.mjs --version
|
|
506
|
-
node src/cli.mjs doctor
|
|
507
|
-
node src/cli.mjs status --json
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
## Published Files
|
|
511
|
-
|
|
512
|
-
`package.json` publishes:
|
|
513
|
-
|
|
514
|
-
- `README.md`
|
|
515
|
-
- `README.zh-CN.md`
|
|
516
|
-
- `package.json`
|
|
517
|
-
- `scripts/install-skills.mjs`
|
|
518
|
-
- `scripts/verify-skills.mjs`
|
|
519
|
-
- `scripts/codex-stop-hook.mjs`
|
|
520
|
-
- `scripts/codex-workflow-hook.mjs`
|
|
521
|
-
- `assets/logo.svg`
|
|
522
|
-
- `src/`
|
|
523
|
-
- `skills/`, including public loopx skills plus compatibility/internal skill sources shipped with the package
|
|
524
|
-
- `templates/`
|
|
525
|
-
- `plugins/loopx/`
|
|
526
|
-
|
|
527
|
-
## Version
|
|
528
|
-
|
|
529
|
-
Current npm package version: `0.1.10`.
|
|
150
|
+
The verifier checks the bundled v1 skill frontmatter, plugin mirrors, resolver coverage, local references, package inclusion, version alignment, and public docs. It intentionally verifies the installed v1 skill set, not every auxiliary source directory that may exist under `skills/`.
|