@ai-content-space/loopx 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +123 -6
  2. package/README.zh-CN.md +143 -10
  3. package/assets/logo.svg +89 -0
  4. package/package.json +4 -2
  5. package/plugins/loopx/.codex-plugin/plugin.json +1 -1
  6. package/plugins/loopx/scripts/plugin-install.test.mjs +13 -0
  7. package/plugins/loopx/skills/archive/SKILL.md +14 -1
  8. package/plugins/loopx/skills/autopilot/SKILL.md +4 -1
  9. package/plugins/loopx/skills/build/SKILL.md +7 -1
  10. package/plugins/loopx/skills/clarify/SKILL.md +13 -9
  11. package/plugins/loopx/skills/debug/SKILL.md +4 -1
  12. package/plugins/loopx/skills/go-style/SKILL.md +4 -1
  13. package/plugins/loopx/skills/kratos/SKILL.md +4 -1
  14. package/plugins/loopx/skills/plan/SKILL.md +8 -4
  15. package/plugins/loopx/skills/review/SKILL.md +7 -1
  16. package/plugins/loopx/skills/tdd/SKILL.md +4 -1
  17. package/plugins/loopx/skills/verify/SKILL.md +4 -1
  18. package/scripts/codex-workflow-hook.mjs +101 -6
  19. package/scripts/verify-skills.mjs +166 -0
  20. package/skills/RESOLVER.md +45 -0
  21. package/skills/archive/SKILL.md +14 -1
  22. package/skills/autopilot/SKILL.md +4 -1
  23. package/skills/build/SKILL.md +7 -1
  24. package/skills/clarify/SKILL.md +13 -9
  25. package/skills/debug/SKILL.md +4 -1
  26. package/skills/go-style/SKILL.md +4 -1
  27. package/skills/kratos/SKILL.md +4 -1
  28. package/skills/plan/SKILL.md +8 -4
  29. package/skills/review/SKILL.md +7 -1
  30. package/skills/tdd/SKILL.md +4 -1
  31. package/skills/verify/SKILL.md +4 -1
  32. package/src/build-runtime.mjs +8 -0
  33. package/src/cli.mjs +10 -0
  34. package/src/context-manifest.mjs +3 -1
  35. package/src/html-views.mjs +316 -0
  36. package/src/plan-runtime.mjs +23 -0
  37. package/src/project-discovery.mjs +163 -0
  38. package/src/review-runtime.mjs +203 -23
  39. package/src/runtime-maintenance.mjs +1 -0
  40. package/src/workflow.mjs +499 -94
@@ -0,0 +1,45 @@
1
+ # loopx Skill Resolver
2
+
3
+ Central routing map for loopx bundled skills. Keep this file in sync with every bundled `skills/<name>/SKILL.md` and `plugins/loopx/skills/<name>/SKILL.md`.
4
+
5
+ Read the selected skill file before acting. If multiple skills match, read every likely candidate and use the disambiguation rules below.
6
+
7
+ ## Public Workflow Skills
8
+
9
+ | Trigger | Skill |
10
+ |---|---|
11
+ | Ambiguous request, unclear scope, non-goals, decision boundaries, requirements interview | `skills/clarify/SKILL.md` |
12
+ | Approved clarify spec, direct requirements artifact, PRD/test/architecture planning, consensus planning | `skills/plan/SKILL.md` |
13
+ | Approved plan execution, implementation persistence, review-requested implementation fixes | `skills/build/SKILL.md` |
14
+ | Independent acceptance, code review, architecture-smell review, go/no-go after build | `skills/review/SKILL.md` |
15
+ | Completed workflow needs long-lived spec sync and ADR candidate | `skills/archive/SKILL.md` |
16
+ | User wants one bounded end-to-end loopx run over clarify/plan/build/review | `skills/autopilot/SKILL.md` |
17
+
18
+ ## Support Skills
19
+
20
+ | Trigger | Skill |
21
+ |---|---|
22
+ | Bug, test failure, build failure, regression, unexpected behavior, root-cause investigation | `skills/debug/SKILL.md` |
23
+ | Feature or bugfix implementation where behavior should be covered by a failing test first | `skills/tdd/SKILL.md` |
24
+ | Completion, fixed, passing, review-ready, commit, or handoff claims need fresh evidence | `skills/verify/SKILL.md` |
25
+ | Editing `.go` files or reviewing Go style inside build/review | `skills/go-style/SKILL.md` |
26
+ | Go-Kratos proto, service, biz, data, middleware, auth, config, or Kratos troubleshooting | `skills/kratos/SKILL.md` |
27
+
28
+ ## Disambiguation
29
+
30
+ 1. If intent, scope, non-goals, or decision boundaries are unresolved, use `clarify` before `plan`.
31
+ 2. If requirements are approved but execution has not started, use `plan` before `build`.
32
+ 3. If implementation is broken or tests fail during build, use `debug` as the diagnostic lens before patching.
33
+ 4. If code is already implemented and needs acceptance, use `review`; do not run new build work from review.
34
+ 5. If review requests implementation-only fixes, route to `build --from-review`; route to `plan` only when the plan itself is wrong.
35
+ 6. If the user asks for autonomous execution, use `autopilot` only when requirements are bounded enough to run without new human decisions.
36
+ 7. Treat `tdd`, `verify`, `go-style`, and `kratos` as support lenses unless the user explicitly invokes them directly.
37
+ 8. `archive` is only valid after `review -> done`.
38
+
39
+ ## Deterministic Guard
40
+
41
+ Run this before release or when changing bundled skills:
42
+
43
+ ```bash
44
+ node scripts/verify-skills.mjs
45
+ ```
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: archive
3
- description: Sync an approved loopx change delta into long-lived specs after review is done.
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.5"
4
7
  argument-hint: "<workflow slug>"
5
8
  ---
6
9
 
@@ -10,6 +13,15 @@ argument-hint: "<workflow slug>"
10
13
 
11
14
  Use `archive` after a loopx workflow has reached `done`. It syncs the accepted change delta into long-lived `.loopx/specs/` files, archives the change staging directory, and writes an advisory ADR candidate.
12
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
+
13
25
  ## Inputs
14
26
 
15
27
  - `<workflow slug>` for a completed loopx workflow
@@ -33,6 +45,7 @@ Then report in Chinese:
33
45
  ## Boundaries
34
46
 
35
47
  - Do not run archive before `review -> done` has been approved.
48
+ - Do not archive malformed requirement deltas. ADDED and MODIFIED entries must use `### Requirement:`, SHALL/MUST language, and at least one `#### Scenario:`.
36
49
  - 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.
37
50
  - Do not edit implementation code.
38
51
  - Do not promote ADR candidates into `docs/adr/` automatically; report the candidate path for human follow-up.
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: autopilot
3
- description: Richer internal-phase loopx autonomous orchestration over the public clarify/plan/build/review flow.
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.5"
4
7
  argument-hint: "<workflow slug>"
5
8
  ---
6
9
 
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: build
3
- description: Ralph-style loopx execution runtime under the public build stage.
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.5"
4
7
  argument-hint: "[--no-deslop] <approved PRD path or workflow slug> | --from-review <review artifact path>"
5
8
  ---
6
9
 
@@ -30,6 +33,7 @@ By default, `build` is not a one-shot draft writer. It is a persistence loop wit
30
33
  - Execution may parallelize internally without exposing a public `team` stage.
31
34
  - `build` does not replace `review`.
32
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.
33
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.
34
38
  - Bug, test-failure, build-failure, and unexpected-behavior work should use `debug` before proposing fixes.
35
39
  - Completion and review-ready claims should use `verify` before they are stated.
@@ -72,6 +76,8 @@ Compatible skill / CLI input:
72
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.
73
77
 
74
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.
75
81
  </Inputs>
76
82
 
77
83
  <Execution_Model>
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: clarify
3
- description: Comprehensive loopx clarify skill for requirements, boundaries, and design-ready specs.
3
+ description: "Clarifies ambiguous loopx work into requirements, non-goals, decision boundaries, and design-ready specs before planning. Not for already-approved plans or concrete implementation tasks."
4
+ when_to_use: "clarify, requirements, ambiguous request, unclear scope, non-goals, decision boundaries, acceptance criteria, 需求澄清, 范围不清"
5
+ metadata:
6
+ version: "0.1.5"
4
7
  ---
5
8
 
6
9
  # loopx Clarify
@@ -23,7 +26,7 @@ Its job is not just to ask questions. Its job is to turn a vague or overloaded r
23
26
  - The request is broad, ambiguous, or mixes problem, solution, and implementation detail.
24
27
  - The user needs help defining scope, non-goals, acceptance criteria, or tradeoffs before planning.
25
28
  - A design direction exists only implicitly and would otherwise be invented during implementation.
26
- - The task will later be handed to `plan`, `build`, or `autopilot`, and you want a high-signal spec first.
29
+ - The task will later be handed to `plan`, and you want a high-signal spec first.
27
30
  </Use_When>
28
31
 
29
32
  <Do_Not_Use_When>
@@ -33,7 +36,7 @@ Its job is not just to ask questions. Its job is to turn a vague or overloaded r
33
36
  </Do_Not_Use_When>
34
37
 
35
38
  <Why_This_Exists>
36
- Most implementation drift happens before coding begins. Teams often think they need “more planning,” when the real problem is weaker intent clarity, hidden assumptions, fuzzy boundaries, or a design shape that was never made explicit. `clarify` exists to solve those upstream failures before `plan` or `build` magnifies them.
39
+ Most implementation drift happens before coding begins. Teams often think they need “more planning,” when the real problem is weaker intent clarity, hidden assumptions, fuzzy boundaries, or a design shape that was never made explicit. `clarify` exists to solve those upstream failures before `plan` turns the clarified intent into an execution contract.
37
40
  </Why_This_Exists>
38
41
 
39
42
  <Core_Principles>
@@ -268,7 +271,7 @@ Before marking a clarify spec handoff-ready, perform a self-review pass:
268
271
 
269
272
  Write the output to the loopx runtime namespace:
270
273
 
271
- - `.loopx/specs/clarify-<slug>-<timestamp>.md`
274
+ - `.loopx/intake/clarify-<slug>-<timestamp>.md`
272
275
 
273
276
  The clarify spec should include:
274
277
 
@@ -299,17 +302,17 @@ The clarify spec should include:
299
302
 
300
303
  After the clarify spec is ready:
301
304
 
302
- - hand off to `plan` by default
303
- - hand off to `build` only if the user explicitly wants direct execution and the task is already concrete enough
304
- - hand off to `autopilot` only when the scope is sufficiently tight for a bounded end-to-end run
305
+ - hand off to `plan`; do not start implementation, TDD, `build`, or `autopilot` from `clarify`
306
+ - if the user asks to execute immediately, explain that loopx requires the `plan` gate first and provide the plan invocation
307
+ - if a task is too small to justify planning, do not use `clarify`; handle that request outside the clarify workflow from the start
305
308
 
306
309
  Preferred explicit handoff contract:
307
310
 
308
311
  - Recommended invocation: `$plan <slug>`
309
- - Artifact-pinned invocation when needed: `$plan --direct .loopx/specs/clarify-<slug>-<timestamp>.md`
312
+ - Artifact-pinned invocation when needed: `$plan --direct .loopx/intake/clarify-<slug>-<timestamp>.md`
310
313
  - Consumer behavior: treat the clarify spec as the source of truth for intent, non-goals, decision boundaries, constraints, and design direction; do not reopen clarification by default
311
314
 
312
- `clarify` itself does not implement the feature.
315
+ `clarify` itself does not implement the feature. The handoff recommendation must name `plan` as the next workflow step.
313
316
 
314
317
  </Process>
315
318
 
@@ -328,6 +331,7 @@ Preferred explicit handoff contract:
328
331
 
329
332
  <Must_Not_Decide_Automatically>
330
333
  - approval to move from clarify into plan
334
+ - skipping `plan` after producing a clarify spec
331
335
  - implementation details that were never clarified or grounded
332
336
  - widening the task because a broader redesign sounds cleaner
333
337
  </Must_Not_Decide_Automatically>
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: debug
3
- description: Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
3
+ description: "Finds root cause for bugs, failing tests, build failures, regressions, and unexpected behavior before fixes. Not for new feature planning or routine code review."
4
+ when_to_use: "debug, bug, test failure, build failure, regression, unexpected behavior, root cause, 报错, 失败, 回归, 排查"
5
+ metadata:
6
+ version: "0.1.5"
4
7
  ---
5
8
 
6
9
  # Systematic Debugging
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: go-style
3
- description: Go language style support for loopx. Use before creating or editing Go (.go) files, especially inside build execution lanes.
3
+ description: "Applies loopx Go coding style for .go edits, tests, errors, context, naming, and interface boundaries. Not for non-Go code or Kratos-specific architecture by itself."
4
+ when_to_use: "go-style, Go, golang, .go files, go tests, gofmt, idiomatic Go, Go style, Go 代码"
5
+ metadata:
6
+ version: "0.1.5"
4
7
  ---
5
8
 
6
9
  # Go Style
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: kratos
3
- description: Go-Kratos framework support for loopx. Use for Kratos microservices, proto/buf API work, service/biz/data layering, Kratos middleware, auth, configuration, and troubleshooting.
3
+ description: "Supports Go-Kratos microservices, proto/buf APIs, service/biz/data layers, middleware, auth, config, and troubleshooting. Not for generic Go style alone."
4
+ when_to_use: "kratos, Go-Kratos, proto, buf, service layer, biz layer, data layer, middleware, auth, config, Kratos 微服务"
5
+ metadata:
6
+ version: "0.1.5"
4
7
  ---
5
8
 
6
9
  # Kratos
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: plan
3
- description: Consensus-first loopx planning skill with Planner, Architect, and Critic review.
3
+ description: "Creates a consensus-first loopx plan package with Planner, Architect, and Critic review from an approved spec. Not for unresolved requirements or direct implementation."
4
+ when_to_use: "plan, planning, consensus planning, PRD, architecture plan, test plan, approved clarify spec, 规划, 方案, 架构评审"
5
+ metadata:
6
+ version: "0.1.5"
4
7
  argument-hint: "[--interactive] [--deliberate] [--direct <spec-path>] <clarified task or spec path>"
5
8
  ---
6
9
 
@@ -40,7 +43,7 @@ By default, `plan` includes the full consensus review loop formerly documented u
40
43
  Accepted inputs:
41
44
 
42
45
  - an approved loopx clarify workflow slug
43
- - `.loopx/specs/clarify-*.md`
46
+ - `.loopx/intake/clarify-*.md`
44
47
  - `.omx/specs/deep-interview-*.md`
45
48
  - a direct task description when enough context is already present
46
49
  - `--direct <spec-path>` to force a specific requirements artifact
@@ -174,7 +177,7 @@ The final plan must include:
174
177
 
175
178
  - ADR: Decision, Drivers, Alternatives considered, Why chosen, Consequences, Follow-ups
176
179
  - concrete implementation steps sized to the actual task
177
- - target long-lived spec domains and the requirements delta for archive
180
+ - target long-lived spec domains and an OpenSpec-style requirements delta for archive
178
181
  - vertical slices sized as independently verifiable tracer bullets, not horizontal layer-only task groups
179
182
  - execution inputs mapped to concrete sources before build starts
180
183
  - available execution lanes and recommended lane
@@ -220,7 +223,8 @@ The plan gate is blocked until:
220
223
 
221
224
  - plan package artifacts exist
222
225
  - change proposal, spec delta, design, tasks, vertical slices, and artifact graph exist
223
- - spec delta declares target domains and added or modified requirements
226
+ - spec delta declares target domains and `## ADDED|MODIFIED|REMOVED|RENAMED Requirements` blocks
227
+ - every ADDED or MODIFIED requirement uses `### Requirement:`, contains SHALL or MUST text, and includes at least one `#### Scenario:`
224
228
  - vertical slices contain at least one `AFK` or `HITL` end-to-end slice with acceptance criteria and verification signal
225
229
  - Architect review is complete
226
230
  - Critic verdict is `approve`
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: review
3
- description: Repo-local acceptance surface for loopx.
3
+ description: "Reviews a loopx build execution record for acceptance, code risks, evidence quality, and architecture smells. Not for doing implementation work or replanning."
4
+ when_to_use: "review, code review, acceptance, go no-go, execution-record, architecture smell, build complete, 审查, 验收"
5
+ metadata:
6
+ version: "0.1.5"
4
7
  argument-hint: "<execution-record path or workflow slug>"
5
8
  ---
6
9
 
@@ -22,6 +25,8 @@ Compatible skill / CLI input:
22
25
 
23
26
  When invoked with an execution record path, derive `<slug>` from the workflow directory and evaluate the matching active run.
24
27
 
28
+ When present, use `.loopx/config.json` as supporting context for project-native verification commands, existing AI rule files, and existing spec sources. Do not treat those external or pre-existing sources as replacements for the loopx execution record and review artifact.
29
+
25
30
  ## Expected Outputs
26
31
 
27
32
  - a review artifact tied to the run being evaluated
@@ -42,6 +47,7 @@ Use stable machine values only where they are commands, file paths, JSON/state f
42
47
  - Use this only after build has produced execution and verification evidence for a specific run.
43
48
  - Stop here if review evidence is incomplete. `review` remains an independent gate and does not auto-complete the workflow.
44
49
  - Review must include code review of the build-owned implementation diff. Do not limit review to artifact/schema checks.
50
+ - Review should compare verification evidence against project-native commands recorded in `.loopx/config.json` when available, while still accepting stronger task-specific verification from the approved plan.
45
51
  - Review must include the architecture-smell lane as part of review evidence. This is not a new workflow stage and must not create extra user steps.
46
52
  - Review must compare the execution scope against the approved workflow scope. If `execution-record.md` declares non-empty `remaining_scope`, `completion_claim` other than `full`, or a mismatch between `planned_scope` and `implemented_scope`, review must return no-go and route to build or plan. A partial slice may be accepted as useful work, but it must not be approved as full workflow completion.
47
53
  - Code review findings should focus on real bugs, regressions, missing tests, broken contracts, security/data-integrity risks, and user-visible behavior gaps.
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: tdd
3
- description: Use when implementing any feature or bugfix, before writing implementation code
3
+ description: "Guides feature and bugfix implementation through a failing test before production code and red-green-refactor discipline. Not for generated files or throwaway prototypes."
4
+ when_to_use: "tdd, failing test first, feature implementation, bugfix, regression test, red green refactor, 测试先行"
5
+ metadata:
6
+ version: "0.1.5"
4
7
  ---
5
8
 
6
9
  # Test-Driven Development (TDD)
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: verify
3
- description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
3
+ description: "Requires fresh verification evidence before claiming work is complete, fixed, passing, review-ready, or ready to commit. Not for speculative confidence or stale results."
4
+ when_to_use: "verify, completion claim, fixed claim, tests pass, review-ready, commit, fresh evidence, 验证, 完成前检查"
5
+ metadata:
6
+ version: "0.1.5"
4
7
  ---
5
8
 
6
9
  # Verification Before Completion
@@ -135,6 +135,7 @@ function buildIterationData({ slug, iteration, noDeslop = false }, scriptEntry =
135
135
  `deslop=${deslopStatus}`,
136
136
  `regression=${regressionStatus}`,
137
137
  ],
138
+ changedFiles: normalizeArray(scriptEntry.changedFiles),
138
139
  delegations: normalizeDelegations(scriptEntry.delegations),
139
140
  architectFindings: scriptEntry.architectFindings || (
140
141
  architectVerdict === 'approve'
@@ -222,6 +223,7 @@ function lanePrompt(context, laneName) {
222
223
  ' "summary": string,',
223
224
  ' "evidence": [{"id": string, "kind": string, "summary": string, "ref": string}],',
224
225
  ' "delegations": [{"id": string, "role": string, "status": "active" | "complete" | "failed" | "blocked" | "pending" | "skipped", "blocking": boolean, "scope": string[], "evidence_path": string | null, "summary": string}],',
226
+ ' "changedFiles": string[],',
225
227
  ' "executionEvidence": string[],',
226
228
  ' "verificationEvidence": string[],',
227
229
  ' "limitations": string[]',
@@ -262,6 +264,7 @@ function deslopPrompt(context, changedEvidence) {
262
264
  ' "status": "complete" | "failed" | "pending" | "skipped",',
263
265
  ' "summary": string,',
264
266
  ' "evidence": [{"id": string, "kind": string, "summary": string, "ref": string}],',
267
+ ' "changedFiles": string[],',
265
268
  ' "limitations": string[]',
266
269
  '}',
267
270
  '',
@@ -396,6 +399,11 @@ export function createRealBuildAdapter({ model, codexExecJson = runCodexExecJson
396
399
  ...normalizeEvidence(regressionReport.evidence).map((item) => `${item.kind}:${item.summary}:${item.ref}`),
397
400
  ],
398
401
  architectFindings: normalizeArray(architectReport.findings, ['Architect gate returned no findings.']),
402
+ changedFiles: normalizeArray([
403
+ ...normalizeArray(executionLane.changedFiles),
404
+ ...normalizeArray(evidenceLane.changedFiles),
405
+ ...normalizeArray(deslopReport.changedFiles),
406
+ ]),
399
407
  delegations: lanes.flatMap((lane) => normalizeDelegations(lane.delegations)),
400
408
  limitations: [
401
409
  ...normalizeArray(executionLane.limitations),
package/src/cli.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { archiveStage, autopilotStage, approveStage, buildStage, clarifyStage, initWorkspace, planStage, reviewStage, statusSummary } from './workflow.mjs';
4
+ import { renderHtmlViews } from './html-views.mjs';
4
5
  import { installBundledSkills } from './install-discovery.mjs';
5
6
  import { nextSkillCommand, withNextSkill } from './next-skill.mjs';
6
7
  import { doctorRuntime, migrateLegacyRuntime } from './runtime-maintenance.mjs';
@@ -18,6 +19,7 @@ function usage() {
18
19
  ' loopx review <slug> [--reviewer <name>]',
19
20
  ' loopx archive <slug>',
20
21
  ' loopx autopilot <slug> [--reviewer <name>]',
22
+ ' loopx render [slug|--all]',
21
23
  ' loopx status [slug] [--json]',
22
24
  ' loopx setup-context',
23
25
  ' loopx doctor',
@@ -202,6 +204,14 @@ async function main() {
202
204
  console.log(JSON.stringify({ ok: true, command, root: result.root, state: result.state, runPath: result.runPath }, null, 2));
203
205
  return;
204
206
  }
207
+ case 'render': {
208
+ const result = await renderHtmlViews(process.cwd(), {
209
+ slug: positionals[0],
210
+ all: Boolean(options.get('--all')),
211
+ });
212
+ console.log(JSON.stringify({ ok: true, command, ...result }, null, 2));
213
+ return;
214
+ }
205
215
  case 'status': {
206
216
  const result = await statusSummary(process.cwd(), positionals[0]);
207
217
  if (options.get('--json')) {
@@ -8,7 +8,7 @@ export const CONTEXT_MANIFEST_SCHEMA_VERSION = 1;
8
8
  const MAX_MANIFEST_ROWS = 80;
9
9
 
10
10
  function normalizePath(cwd, path) {
11
- const resolved = resolve(path);
11
+ const resolved = resolve(cwd, path);
12
12
  const rel = relative(cwd, resolved);
13
13
  return rel && !rel.startsWith('..') ? rel : resolved;
14
14
  }
@@ -138,6 +138,7 @@ export async function generateBuildContextManifest({ cwd, root, state, slug }) {
138
138
  row(cwd, { stage: 'build', kind: 'review-rework', path: reviewReworkPath, reason: 'review_requested_implementation_fixes', priority: 33, required: requiresReviewRework }),
139
139
  row(cwd, { stage: 'build', kind: 'domain-context', path: contextPaths.domainGlossary, reason: 'domain_vocabulary', priority: 34, required: contextSetup.status !== 'missing' }),
140
140
  row(cwd, { stage: 'build', kind: 'agent-domain', path: contextPaths.agentDomain, reason: 'agent_context_rules', priority: 35, required: false }),
141
+ row(cwd, { stage: 'build', kind: 'workspace-config', path: join(cwd, '.loopx', 'config.json'), reason: 'project_rules_spec_sources_and_verification_commands', priority: 36, required: false }),
141
142
  ];
142
143
  const manifestPath = buildContextManifestPath(root);
143
144
  await writeContextManifest(manifestPath, rows);
@@ -157,6 +158,7 @@ export async function generateReviewContextManifest({ cwd, root, state, slug })
157
158
  row(cwd, { stage: 'review', kind: 'residual-risks', path: join(root, 'execution-record.md'), reason: 'residual_risk_reference', priority: 26, required: false }),
158
159
  row(cwd, { stage: 'review', kind: 'build-support', path: join(root, 'build-support'), reason: 'build_gate_evidence', priority: 30, required: false }),
159
160
  row(cwd, { stage: 'review', kind: 'agent-domain', path: contextPaths.agentDomain, reason: 'agent_context_rules', priority: 31, required: false }),
161
+ row(cwd, { stage: 'review', kind: 'workspace-config', path: join(cwd, '.loopx', 'config.json'), reason: 'project_rules_spec_sources_and_verification_commands', priority: 32, required: false }),
160
162
  row(cwd, { stage: 'review', kind: 'state', path: join(root, 'state.json'), reason: 'workflow_state', priority: 40 }),
161
163
  ];
162
164
  const manifestPath = reviewContextManifestPath(root);