@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
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-slop-cleaner
|
|
3
|
-
description: Run an anti-slop cleanup/refactor/deslop workflow
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# AI Slop Cleaner Skill
|
|
7
|
-
|
|
8
|
-
Reduce AI-generated slop with a regression-tests-first, smell-by-smell cleanup workflow that preserves behavior and raises signal quality.
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
Use this skill when:
|
|
13
|
-
- A code path works but feels bloated, noisy, repetitive, or over-abstracted
|
|
14
|
-
- A user asks to “cleanup”, “refactor”, or “deslop” AI-generated output
|
|
15
|
-
- Follow-up implementation left duplicate code, dead code, weak boundaries, missing tests, or unnecessary wrapper layers
|
|
16
|
-
- You need a disciplined cleanup workflow without broad rewrites
|
|
17
|
-
|
|
18
|
-
## GPT-5.4 Guidance Alignment
|
|
19
|
-
|
|
20
|
-
- Keep outputs concise and evidence-dense unless risk or the user requests more detail.
|
|
21
|
-
- Treat newer user instructions as local workflow updates without discarding earlier non-conflicting constraints.
|
|
22
|
-
- Keep using inspection, tests, diagnostics, and verification until the cleanup is grounded.
|
|
23
|
-
- Proceed automatically through clear, reversible cleanup steps; ask only when a choice materially changes scope or behavior.
|
|
24
|
-
|
|
25
|
-
## Scoped File Lists and Ralph Workflow
|
|
26
|
-
|
|
27
|
-
- This skill can accept a **file list scope** instead of a whole feature area.
|
|
28
|
-
- When the caller provides a changed-files list (for example, Ralph session-owned edits), keep the cleanup strictly bounded to those files.
|
|
29
|
-
- In the **Ralph workflow**, the mandatory deslop pass should run this skill on Ralph's changed files only, in standard mode unless the caller explicitly requests otherwise.
|
|
30
|
-
|
|
31
|
-
## Procedure
|
|
32
|
-
|
|
33
|
-
1. **Lock behavior with regression tests first**
|
|
34
|
-
- Identify the behavior that must not change
|
|
35
|
-
- Add or run targeted regression tests before editing cleanup candidates
|
|
36
|
-
- If behavior is currently untested, create the narrowest test coverage needed first
|
|
37
|
-
|
|
38
|
-
2. **Create a cleanup plan before code**
|
|
39
|
-
- List the specific smells to remove
|
|
40
|
-
- Bound the pass to the requested files/scope
|
|
41
|
-
- If a file list scope is provided, keep the pass restricted to that changed-files list
|
|
42
|
-
- Order fixes from safest/highest-signal to riskiest
|
|
43
|
-
- Do not start coding until the cleanup plan is explicit
|
|
44
|
-
|
|
45
|
-
3. **Categorize issues before editing**
|
|
46
|
-
- **Duplication** — repeated logic, copy-paste branches, redundant helpers
|
|
47
|
-
- **Dead code** — unused code, unreachable branches, stale flags, debug leftovers
|
|
48
|
-
- **Needless abstraction** — pass-through wrappers, speculative indirection, single-use helper layers
|
|
49
|
-
- **Boundary violations** — hidden coupling, leaky responsibilities, wrong-layer imports or side effects
|
|
50
|
-
- **Missing tests** — behavior not locked, weak regression coverage, gaps around edge cases
|
|
51
|
-
|
|
52
|
-
4. **Execute passes one smell at a time**
|
|
53
|
-
- **Pass 1: Dead code deletion**
|
|
54
|
-
- **Pass 2: Duplicate removal**
|
|
55
|
-
- **Pass 3: Naming/error handling cleanup**
|
|
56
|
-
- **Pass 4: Test reinforcement**
|
|
57
|
-
- Re-run targeted verification after each pass
|
|
58
|
-
- Avoid bundling unrelated refactors into the same edit set
|
|
59
|
-
|
|
60
|
-
5. **Run quality gates**
|
|
61
|
-
- Regression tests stay green
|
|
62
|
-
- Lint passes
|
|
63
|
-
- Typecheck passes
|
|
64
|
-
- Relevant unit/integration tests pass
|
|
65
|
-
- Static/security scan passes when available
|
|
66
|
-
- Diff stays minimal and scoped
|
|
67
|
-
- No new abstractions or dependencies unless explicitly required
|
|
68
|
-
|
|
69
|
-
6. **Finish with an evidence-dense report**
|
|
70
|
-
- Changed files
|
|
71
|
-
- Simplifications made
|
|
72
|
-
- Tests/diagnostics/build checks run
|
|
73
|
-
- Remaining risks
|
|
74
|
-
- Residual follow-ups or consciously deferred cleanup
|
|
75
|
-
|
|
76
|
-
## Output Format
|
|
77
|
-
|
|
78
|
-
```text
|
|
79
|
-
AI SLOP CLEANUP REPORT
|
|
80
|
-
======================
|
|
81
|
-
|
|
82
|
-
Scope: [files or feature area]
|
|
83
|
-
Behavior Lock: [targeted regression tests added/run]
|
|
84
|
-
Cleanup Plan: [bounded smells and order]
|
|
85
|
-
|
|
86
|
-
Passes Completed:
|
|
87
|
-
1. Pass 1: Dead code deletion - [concise fix]
|
|
88
|
-
2. Pass 2: Duplicate removal - [concise fix]
|
|
89
|
-
3. Pass 3: Naming/error handling cleanup - [concise fix]
|
|
90
|
-
4. Pass 4: Test reinforcement - [concise fix]
|
|
91
|
-
|
|
92
|
-
Quality Gates:
|
|
93
|
-
- Regression tests: PASS/FAIL
|
|
94
|
-
- Lint: PASS/FAIL
|
|
95
|
-
- Typecheck: PASS/FAIL
|
|
96
|
-
- Tests: PASS/FAIL
|
|
97
|
-
- Static/security scan: PASS/FAIL or N/A
|
|
98
|
-
|
|
99
|
-
Changed Files:
|
|
100
|
-
- [path] - [simplification]
|
|
101
|
-
|
|
102
|
-
Remaining Risks:
|
|
103
|
-
- [none or short deferred item]
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Scenario Examples
|
|
107
|
-
|
|
108
|
-
**Good:** The user says `continue` after tests already lock behavior and the next smell pass is clear. Continue with the next bounded cleanup pass.
|
|
109
|
-
|
|
110
|
-
**Good:** The user narrows the scope to a specific file after planning. Keep the regression-tests-first workflow, but apply the new scope locally.
|
|
111
|
-
|
|
112
|
-
**Bad:** Start rewriting architecture before protecting behavior with tests.
|
|
113
|
-
|
|
114
|
-
**Bad:** Collapse multiple smell categories into one large refactor with no intermediate verification.
|
package/skills/archive/SKILL.md
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: archive
|
|
3
|
-
description: "Archives an approved loopx change delta into long-lived specs and writes an ADR candidate after done approval. Not for active builds or unapproved reviews."
|
|
4
|
-
when_to_use: "archive, done workflow, spec delta, long-lived specs, ADR candidate, review approved, 归档, 同步规格"
|
|
5
|
-
metadata:
|
|
6
|
-
version: "0.1.10"
|
|
7
|
-
argument-hint: "<workflow slug>"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# loopx Archive
|
|
11
|
-
|
|
12
|
-
## Purpose
|
|
13
|
-
|
|
14
|
-
Use `archive` after a loopx workflow has reached `done`, or immediately after an approved review that is waiting for `review -> done` completion. It syncs the accepted change delta into long-lived `.loopx/specs/` files, archives the change staging directory, and writes an advisory ADR candidate.
|
|
15
|
-
|
|
16
|
-
The accepted delta is requirement-based, not a changelog block. Archive applies:
|
|
17
|
-
|
|
18
|
-
- `## ADDED Requirements`
|
|
19
|
-
- `## MODIFIED Requirements`
|
|
20
|
-
- `## REMOVED Requirements`
|
|
21
|
-
- `## RENAMED Requirements`
|
|
22
|
-
|
|
23
|
-
into the current long-lived `## Requirements` state for each target domain.
|
|
24
|
-
|
|
25
|
-
## Inputs
|
|
26
|
-
|
|
27
|
-
- `<workflow slug>` for a completed loopx workflow, or for a review-approved workflow whose next route is `done`
|
|
28
|
-
|
|
29
|
-
## Behavior
|
|
30
|
-
|
|
31
|
-
Run:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
loopx archive <slug>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
If review already approved the workflow and the only pending transition is `review -> done`, this command consumes that completion transition before archiving. Do not ask the user to run a separate `loopx approve <slug> --from review --to done` command in that case.
|
|
38
|
-
|
|
39
|
-
Then report in Chinese:
|
|
40
|
-
|
|
41
|
-
- whether the change was archived
|
|
42
|
-
- whether `review -> done` was consumed by archive
|
|
43
|
-
- which long-lived spec files were updated
|
|
44
|
-
- the archived change path
|
|
45
|
-
- the ADR candidate path, if written
|
|
46
|
-
- any blocker if the workflow is not done, the spec delta is incomplete, or the execution record still declares partial scope
|
|
47
|
-
|
|
48
|
-
## Boundaries
|
|
49
|
-
|
|
50
|
-
- Do not run archive before review has approved the workflow and routed it to `done`.
|
|
51
|
-
- Do not archive malformed requirement deltas. ADDED and MODIFIED entries must use `### Requirement:`, SHALL/MUST language, and at least one `#### Scenario:`.
|
|
52
|
-
- Do not archive when `execution-record.md` declares non-empty `remaining_scope`, `completion_claim` other than `full`, or a mismatch between `planned_scope` and `implemented_scope`; route back to build/plan instead.
|
|
53
|
-
- Do not edit implementation code.
|
|
54
|
-
- Do not promote ADR candidates into `docs/adr/` automatically; report the candidate path for human follow-up.
|
|
55
|
-
- Do not treat `loopx status` as a user-facing skill. Use status only as a runtime diagnostic when needed.
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: autopilot
|
|
3
|
-
description: "Runs one bounded autonomous loopx orchestration over clarify, plan, build, and review while preserving canonical artifacts. Not for manual gate-by-gate control."
|
|
4
|
-
when_to_use: "autopilot, autonomous loopx run, end-to-end workflow, run all stages, bounded orchestration, 自动执行, 全流程"
|
|
5
|
-
metadata:
|
|
6
|
-
version: "0.1.10"
|
|
7
|
-
argument-hint: "<workflow slug>"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# loopx Autopilot
|
|
11
|
-
|
|
12
|
-
<Purpose>
|
|
13
|
-
`autopilot` is loopx's autonomous orchestration surface. It upgrades the current bounded composition model by adding richer internal phases while keeping loopx's public stage model authoritative.
|
|
14
|
-
|
|
15
|
-
Externally, the user still reasons about:
|
|
16
|
-
|
|
17
|
-
- `clarify`
|
|
18
|
-
- `plan`
|
|
19
|
-
- `build`
|
|
20
|
-
- `review`
|
|
21
|
-
|
|
22
|
-
Internally, `autopilot` may orchestrate richer phases such as expansion, planning, execution, QA, and validation.
|
|
23
|
-
</Purpose>
|
|
24
|
-
|
|
25
|
-
<Use_When>
|
|
26
|
-
- One owner wants loopx to run end-to-end with internal autonomous orchestration.
|
|
27
|
-
- A clarified or workflow-local spec already exists, or the workflow is ready to begin from loopx stages.
|
|
28
|
-
- The task benefits from richer internal planning/execution/QA/validation behavior without exposing a more complex public stage surface.
|
|
29
|
-
</Use_When>
|
|
30
|
-
|
|
31
|
-
<Do_Not_Use_When>
|
|
32
|
-
- The user wants manual control over each stage gate.
|
|
33
|
-
- The task should stop after planning or execution rather than run end-to-end.
|
|
34
|
-
- Requirements are too ambiguous for bounded autonomous orchestration.
|
|
35
|
-
</Do_Not_Use_When>
|
|
36
|
-
|
|
37
|
-
<Core_Principles>
|
|
38
|
-
- loopx public stage truth remains authoritative.
|
|
39
|
-
- Richer internal phases are allowed, but they stay internal.
|
|
40
|
-
- Internal stage approvals may be auto-consumed and must be recorded as control events.
|
|
41
|
-
- Canonical loopx artifacts remain the source of truth; `run.json` is an orchestration ledger.
|
|
42
|
-
- Reuse strengthened loopx stage runtimes rather than re-implementing contradictory truths.
|
|
43
|
-
</Core_Principles>
|
|
44
|
-
|
|
45
|
-
<Internal_Phases>
|
|
46
|
-
Suggested internal phase model:
|
|
47
|
-
|
|
48
|
-
- `expansion`
|
|
49
|
-
- `planning`
|
|
50
|
-
- `execution`
|
|
51
|
-
- `qa`
|
|
52
|
-
- `validation`
|
|
53
|
-
|
|
54
|
-
Phase-to-stage alignment:
|
|
55
|
-
|
|
56
|
-
- `expansion` -> clarified-spec reuse or clarify preparation
|
|
57
|
-
- `planning` -> loopx `plan`
|
|
58
|
-
- `execution` + `qa` -> loopx `build`
|
|
59
|
-
- `validation` -> pre-review validation plus loopx `review`
|
|
60
|
-
</Internal_Phases>
|
|
61
|
-
|
|
62
|
-
<Control_Plane>
|
|
63
|
-
- one autopilot invocation authorizes one bounded autopilot run
|
|
64
|
-
- autopilot may internally consume stage approvals for:
|
|
65
|
-
- `clarify -> plan`
|
|
66
|
-
- `plan -> build`
|
|
67
|
-
- `build -> review`
|
|
68
|
-
- `review -> done`
|
|
69
|
-
- these decisions must be recorded as internal control events
|
|
70
|
-
</Control_Plane>
|
|
71
|
-
|
|
72
|
-
<Artifact_Contract>
|
|
73
|
-
Canonical stage artifacts remain authoritative:
|
|
74
|
-
|
|
75
|
-
- clarify spec artifacts
|
|
76
|
-
- `.loopx/plans/prd-<slug>.md`
|
|
77
|
-
- `.loopx/plans/test-spec-<slug>.md`
|
|
78
|
-
- canonical build `execution-record.md`
|
|
79
|
-
- canonical review `review-report.md`
|
|
80
|
-
|
|
81
|
-
Autopilot also writes an orchestration ledger:
|
|
82
|
-
|
|
83
|
-
- `.loopx/autopilot/<slug>/run.json`
|
|
84
|
-
|
|
85
|
-
`run.json` may include internal phase progression, blockers, and control events, but it must not replace canonical stage artifacts as the source of truth.
|
|
86
|
-
</Artifact_Contract>
|
|
87
|
-
|
|
88
|
-
<Must_Not_Decide_Automatically>
|
|
89
|
-
- do not create a new public stage family
|
|
90
|
-
- do not bypass loopx canonical artifacts
|
|
91
|
-
- do not fork a second workflow truth that contradicts loopx stages
|
|
92
|
-
- do not literally port the parent autopilot where it conflicts with loopx runtime contracts
|
|
93
|
-
</Must_Not_Decide_Automatically>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: autoresearch
|
|
3
|
-
description: Stateful validator-gated research loop with native-hook persistence
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Autoresearch
|
|
7
|
-
|
|
8
|
-
Autoresearch is the skill-first replacement for the deprecated `omx autoresearch` command.
|
|
9
|
-
It keeps the useful measured-research loop, but it now runs as a native-hook stateful workflow instead of a direct CLI or tmux launch surface.
|
|
10
|
-
|
|
11
|
-
## Use when
|
|
12
|
-
- You want a Ralph-ish persistent research loop
|
|
13
|
-
- The task should keep nudging until explicit validation evidence exists
|
|
14
|
-
- You want init-time choice between script validation and prompt+architect validation
|
|
15
|
-
|
|
16
|
-
## Do not use when
|
|
17
|
-
- You want the old `omx autoresearch` command surface (hard-deprecated)
|
|
18
|
-
- You want detached tmux or split-pane launch parity
|
|
19
|
-
- You have not decided the validation regime yet
|
|
20
|
-
|
|
21
|
-
## Core contract
|
|
22
|
-
1. **Init chooses validation mode.** Pick exactly one:
|
|
23
|
-
- `mission-validator-script`
|
|
24
|
-
- `prompt-architect-artifact`
|
|
25
|
-
2. **Persist mode state** in `.omx/state/.../autoresearch-state.json` including:
|
|
26
|
-
- `validation_mode`
|
|
27
|
-
- `completion_artifact_path`
|
|
28
|
-
- `mission_validator_command` **or** `validator_prompt`
|
|
29
|
-
- optional `output_artifact_path`
|
|
30
|
-
3. **Completion is artifact-gated.** The loop does not stop because the model says “done”, because a stop hook fired once, or because several turns were no-ops.
|
|
31
|
-
4. **Direct CLI launch is gone.** Use `$deep-interview --autoresearch` for intake and `$autoresearch` for execution.
|
|
32
|
-
|
|
33
|
-
## Completion artifact contract
|
|
34
|
-
|
|
35
|
-
### `mission-validator-script`
|
|
36
|
-
The completion artifact must exist and record a passing validator result, for example:
|
|
37
|
-
|
|
38
|
-
```json
|
|
39
|
-
{
|
|
40
|
-
"status": "passed",
|
|
41
|
-
"passed": true,
|
|
42
|
-
"summary": "metric improved beyond baseline"
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### `prompt-architect-artifact`
|
|
47
|
-
The completion artifact must include both an architect approval verdict and an output artifact path, for example:
|
|
48
|
-
|
|
49
|
-
```json
|
|
50
|
-
{
|
|
51
|
-
"validator_prompt": "Review the research output against the mission.",
|
|
52
|
-
"architect_review": { "verdict": "approved" },
|
|
53
|
-
"output_artifact_path": ".omx/specs/autoresearch-demo/report.md"
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Recommended flow
|
|
58
|
-
1. Run `$deep-interview --autoresearch` to clarify mission + evaluator.
|
|
59
|
-
2. Materialize `.omx/specs/autoresearch-{slug}/mission.md`, `sandbox.md`, and `result.json`.
|
|
60
|
-
3. Start `$autoresearch` with the chosen validation mode stored in mode state.
|
|
61
|
-
4. Let stop-hook / auto-nudge continue until the completion artifact satisfies the chosen validation mode.
|
|
62
|
-
5. Finish only after the validator artifact is complete.
|
|
63
|
-
|
|
64
|
-
## Migration note
|
|
65
|
-
- `omx autoresearch` is hard-deprecated.
|
|
66
|
-
- No direct CLI launch.
|
|
67
|
-
- No tmux split-pane launch.
|
|
68
|
-
- No noop-count completion gate.
|
package/skills/build/SKILL.md
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: build
|
|
3
|
-
description: "Executes an approved loopx plan or review rework contract with evidence, verification, deslop, and regression gates. Not for unclear requirements or independent review."
|
|
4
|
-
when_to_use: "build, implement approved plan, execute PRD, --from-review, review rework, implementation fixes, 执行, 实现, 修改"
|
|
5
|
-
metadata:
|
|
6
|
-
version: "0.1.10"
|
|
7
|
-
argument-hint: "[--no-deslop] <approved PRD path or workflow slug> | --from-review <review artifact path>"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# loopx Build
|
|
11
|
-
|
|
12
|
-
<Purpose>
|
|
13
|
-
`build` is loopx's canonical execution lane. It executes an approved plan with Ralph-style rigor while keeping the public loopx stage surface unchanged.
|
|
14
|
-
|
|
15
|
-
By default, `build` is not a one-shot draft writer. It is a persistence loop with internal parallel lanes, fresh verification, architect gating, deslop, and regression re-verification before `review` can start.
|
|
16
|
-
</Purpose>
|
|
17
|
-
|
|
18
|
-
<Use_When>
|
|
19
|
-
- `plan -> build` has already been explicitly approved.
|
|
20
|
-
- `review -> build` was requested for implementation fixes and a review artifact is supplied with `--from-review`.
|
|
21
|
-
- Canonical plan artifacts already exist and execution should now proceed.
|
|
22
|
-
- The task needs execution persistence, verification evidence, and explicit pre-review quality gates.
|
|
23
|
-
</Use_When>
|
|
24
|
-
|
|
25
|
-
<Do_Not_Use_When>
|
|
26
|
-
- Requirements or planning are still incomplete.
|
|
27
|
-
- The user wants to skip execution and only review or inspect the plan.
|
|
28
|
-
- A valid build run is already review-ready and the next action is `review`.
|
|
29
|
-
</Do_Not_Use_When>
|
|
30
|
-
|
|
31
|
-
<Core_Principles>
|
|
32
|
-
- Public surface stays `build`; internal strength can still match Ralph-style execution.
|
|
33
|
-
- Execution may parallelize internally without exposing a public `team` stage.
|
|
34
|
-
- `build` does not replace `review`.
|
|
35
|
-
- `execution-record.md` remains the sole canonical execution and verification artifact.
|
|
36
|
-
- `.loopx/config.json` is supporting context for existing project AI rules, existing spec sources, and discovered verification commands; use it to preserve local sources of truth, not to skip loopx stages.
|
|
37
|
-
- Feature work and bug fixes should use `tdd`: write a failing test, confirm it fails for the intended reason, then implement the smallest passing change.
|
|
38
|
-
- Bug, test-failure, build-failure, and unexpected-behavior work should use `debug` before proposing fixes.
|
|
39
|
-
- Completion and review-ready claims should use `verify` before they are stated.
|
|
40
|
-
- Go edits should use `go-style` and preserve local repository conventions.
|
|
41
|
-
- Go-Kratos work should use `kratos` when Kratos project signals or Kratos-specific tasks are present.
|
|
42
|
-
- Fresh evidence is required before review handoff.
|
|
43
|
-
- Deslop and regression re-verification are part of the default build path.
|
|
44
|
-
- `build` has one owner for persistence. Delegation may run in parallel, but the owner remains accountable for draining delegated work and proving completion before review handoff.
|
|
45
|
-
</Core_Principles>
|
|
46
|
-
|
|
47
|
-
<Preconditions>
|
|
48
|
-
For initial execution, `build` starts only when all of the following are true:
|
|
49
|
-
|
|
50
|
-
- approved `plan -> build` transition exists
|
|
51
|
-
- `.loopx/plans/prd-<slug>.md` exists
|
|
52
|
-
- `.loopx/plans/test-spec-<slug>.md` exists
|
|
53
|
-
- workflow-local planning artifacts required by the execution lane exist
|
|
54
|
-
|
|
55
|
-
For review-requested implementation fixes, `build` may instead start from:
|
|
56
|
-
|
|
57
|
-
- `$build --from-review .loopx/workflows/<slug>/review-report.md`
|
|
58
|
-
- or `$build --from-review .loopx/workflows/<slug>/review.md`
|
|
59
|
-
|
|
60
|
-
In that mode, the review artifact is the direct rework contract. The approved PRD, test spec, previous execution record, and workflow-local plan package remain required context, but they are not the primary user-facing argument.
|
|
61
|
-
</Preconditions>
|
|
62
|
-
|
|
63
|
-
<Inputs>
|
|
64
|
-
Preferred skill input:
|
|
65
|
-
|
|
66
|
-
- `.loopx/plans/prd-<slug>.md`
|
|
67
|
-
|
|
68
|
-
Preferred review rework input:
|
|
69
|
-
|
|
70
|
-
- `--from-review .loopx/workflows/<slug>/review-report.md`
|
|
71
|
-
|
|
72
|
-
Compatible skill / CLI input:
|
|
73
|
-
|
|
74
|
-
- `<slug>`
|
|
75
|
-
|
|
76
|
-
When invoked with a PRD path, derive `<slug>` from `prd-<slug>.md` and still use the matching workflow-local plan package and test spec.
|
|
77
|
-
|
|
78
|
-
When invoked with `--from-review`, derive `<slug>` from the workflow directory, treat the review artifact as the implementation-fix contract, and load the matching PRD, test spec, previous `execution-record.md`, and workflow-local plan package as supporting context. This Codex skill invocation consumes the `review -> build` rework intent; users should not need a separate bash `loopx approve ... --from review --to build` step for the normal Codex-facing flow.
|
|
79
|
-
|
|
80
|
-
Also load `.loopx/config.json` when present. Its `project_conventions` entries identify existing project rule/spec files that should be preserved, and its `verification_commands` entries are the first project-native commands to consider for fresh evidence.
|
|
81
|
-
</Inputs>
|
|
82
|
-
|
|
83
|
-
<Execution_Model>
|
|
84
|
-
`build` should behave like a Ralph-style execution runtime:
|
|
85
|
-
|
|
86
|
-
1. Initialize or resume build iteration state.
|
|
87
|
-
2. If running from `--from-review`, load the review artifact first and constrain implementation work to the requested implementation fixes unless the review artifact exposes a real plan or clarify blocker.
|
|
88
|
-
3. Run internal execution / evidence / verification lanes in parallel.
|
|
89
|
-
4. For implementation work, apply `tdd` unless the approved plan explicitly classifies the change as non-behavioral or test-inapplicable.
|
|
90
|
-
5. For failures discovered during execution or verification, apply `debug` before attempting fixes.
|
|
91
|
-
6. For `.go` edits, apply `go-style`; for Kratos API/service/biz/data work, apply `kratos` before changing framework structure.
|
|
92
|
-
7. Aggregate lane results into canonical `execution-record.md`.
|
|
93
|
-
8. Run fresh verification and read actual output using `verify` discipline.
|
|
94
|
-
9. Run architect verification as a hard pre-review gate.
|
|
95
|
-
10. Run deslop on build-owned changes.
|
|
96
|
-
11. Re-run regression verification after deslop.
|
|
97
|
-
12. Write/update the build delegation ledger and ensure blocking delegated work is drained.
|
|
98
|
-
13. Write/update the completion audit mapping approved plan, slices, and review rework inputs to evidence.
|
|
99
|
-
14. Stop only when review handoff gates are satisfied or a real blocker remains.
|
|
100
|
-
|
|
101
|
-
`build` may persist support artifacts for runtime inspection, but they must not replace `execution-record.md`.
|
|
102
|
-
</Execution_Model>
|
|
103
|
-
|
|
104
|
-
<Continuation_Discipline>
|
|
105
|
-
`build` is a persistence loop, not a "one phase per invocation" runner.
|
|
106
|
-
|
|
107
|
-
If approved plan work remains, continue executing within the same `$build` invocation until either review handoff gates are satisfied or a real blocker prevents further progress.
|
|
108
|
-
|
|
109
|
-
The following are **not** real blockers by themselves:
|
|
110
|
-
|
|
111
|
-
- a planned phase is unfinished
|
|
112
|
-
- a runtime adapter is not fully migrated yet
|
|
113
|
-
- store-layer branches still need to be moved to the new service/client path
|
|
114
|
-
- more files remain in the approved implementation scope
|
|
115
|
-
- verification has not been rerun after the latest edits
|
|
116
|
-
|
|
117
|
-
Those are remaining execution work. Keep working them down.
|
|
118
|
-
|
|
119
|
-
A real blocker must identify why execution cannot safely continue now, such as:
|
|
120
|
-
|
|
121
|
-
- missing human product/architecture decision that is not specified by the approved plan
|
|
122
|
-
- unavailable credential, service, fixture, dependency, or environment that cannot be mocked or bypassed responsibly
|
|
123
|
-
- verification failure caused by a pre-existing repository condition that blocks evaluating this change and cannot be isolated
|
|
124
|
-
- repeated implementation failure after the build iteration budget is exhausted
|
|
125
|
-
- a conflict between the approved plan and current repository facts that requires re-planning
|
|
126
|
-
|
|
127
|
-
Do not end a build response with "continue in the next build" for unfinished approved work. If work remains and no real blocker exists, keep executing. If a real blocker exists, name the concrete blocker and record it in `execution-record.md`.
|
|
128
|
-
</Continuation_Discipline>
|
|
129
|
-
|
|
130
|
-
<Runtime_State_Machine>
|
|
131
|
-
`build` should track at minimum:
|
|
132
|
-
|
|
133
|
-
- `build_run_id`
|
|
134
|
-
- `build_current_iteration`
|
|
135
|
-
- `build_max_iterations` (default `10`)
|
|
136
|
-
- `build_parallel_mode`
|
|
137
|
-
- `build_lane_statuses`
|
|
138
|
-
- `build_verification_status`
|
|
139
|
-
- `build_architect_verification_status`
|
|
140
|
-
- `build_deslop_status`
|
|
141
|
-
- `build_regression_status`
|
|
142
|
-
- `build_blockers`
|
|
143
|
-
- `build_progress_artifact_paths`
|
|
144
|
-
- `build_support_evidence_paths`
|
|
145
|
-
- `build_owner_id`
|
|
146
|
-
- `build_owner_session_id`
|
|
147
|
-
- `build_owner_status`
|
|
148
|
-
- `build_delegation_status`
|
|
149
|
-
- `build_delegation_ledger_path`
|
|
150
|
-
- `build_active_delegation_count`
|
|
151
|
-
- `build_completion_audit_status`
|
|
152
|
-
- `build_completion_audit_path`
|
|
153
|
-
- `execution_record_status`
|
|
154
|
-
|
|
155
|
-
`build -> review` is blocked until:
|
|
156
|
-
|
|
157
|
-
- all internal lanes are complete
|
|
158
|
-
- fresh verification passes
|
|
159
|
-
- architect verification is approved
|
|
160
|
-
- deslop is complete, unless explicitly skipped
|
|
161
|
-
- post-deslop regression passes
|
|
162
|
-
- blocking delegated build work is drained
|
|
163
|
-
- completion audit passes
|
|
164
|
-
- `execution-record.md` is complete
|
|
165
|
-
</Runtime_State_Machine>
|
|
166
|
-
|
|
167
|
-
<Artifact_Contract>
|
|
168
|
-
Canonical artifact:
|
|
169
|
-
|
|
170
|
-
- `execution-record.md`
|
|
171
|
-
|
|
172
|
-
`execution-record.md` must make the completion scope explicit when a plan is larger than the current implementation slice:
|
|
173
|
-
|
|
174
|
-
- `planned_scope`: the approved PRD/workflow scope being measured.
|
|
175
|
-
- `implemented_scope`: the scope actually completed in this build run.
|
|
176
|
-
- `remaining_scope`: empty only when the approved workflow scope is fully implemented.
|
|
177
|
-
- `completion_claim`: use `full` only when the whole approved workflow is complete; use `slice` or another non-full value for partial implementation.
|
|
178
|
-
|
|
179
|
-
If `remaining_scope` is non-empty or `completion_claim` is not `full`, build may still hand off for slice review, but review/archive must not treat that as full workflow completion.
|
|
180
|
-
|
|
181
|
-
Support artifacts may exist for:
|
|
182
|
-
|
|
183
|
-
- iteration progress
|
|
184
|
-
- lane evidence summaries
|
|
185
|
-
- architect gate summaries
|
|
186
|
-
- deslop summaries
|
|
187
|
-
- regression summaries
|
|
188
|
-
- `build-support/delegation-ledger.json`
|
|
189
|
-
- `build-support/completion-audit.json`
|
|
190
|
-
|
|
191
|
-
These support artifacts are runtime aids only. They must not become new canonical review inputs.
|
|
192
|
-
</Artifact_Contract>
|
|
193
|
-
|
|
194
|
-
<Review_Boundary>
|
|
195
|
-
- build-internal architect verification is an execution-quality gate
|
|
196
|
-
- review remains the final independent stage
|
|
197
|
-
- review continues to own provenance checks, evidence completeness checks, completion/rollback decisions, and code-review
|
|
198
|
-
</Review_Boundary>
|
|
199
|
-
|
|
200
|
-
<Final_Response_Contract>
|
|
201
|
-
When `build` reaches review handoff readiness, the final response must include an explicit next skill command using the execution record path:
|
|
202
|
-
|
|
203
|
-
Default review handoff after build readiness:
|
|
204
|
-
|
|
205
|
-
```text
|
|
206
|
-
Next:
|
|
207
|
-
$review .loopx/workflows/<slug>/execution-record.md
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
If the user needs the CLI/runtime-debug form, use:
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
loopx review <slug>
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
Do not end with prose-only guidance such as "next step should enter review" when the workflow is ready for review. Do not emit `$review <slug>` as the primary skill handoff when the execution record path is known. If review handoff is blocked, state the blocker instead of emitting a `$review` command.
|
|
217
|
-
</Final_Response_Contract>
|
|
218
|
-
|
|
219
|
-
<Flags>
|
|
220
|
-
- `--no-deslop`: skip the deslop pass and the post-deslop regression loop, while still requiring the latest successful pre-deslop verification evidence
|
|
221
|
-
</Flags>
|
|
222
|
-
|
|
223
|
-
<Must_Not_Decide_Automatically>
|
|
224
|
-
- do not self-approve review
|
|
225
|
-
- do not mark the workflow complete
|
|
226
|
-
- do not replace `execution-record.md` with support artifacts
|
|
227
|
-
- do not widen execution into public `team`, `ultrawork`, or `ralph` command surfaces
|
|
228
|
-
</Must_Not_Decide_Automatically>
|