theslopmachine 0.9.9 → 0.9.12

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 (55) hide show
  1. package/MANUAL.md +2 -0
  2. package/README.md +2 -0
  3. package/assets/agents/developer.md +1 -1
  4. package/assets/agents/slopmachine-claude.md +34 -29
  5. package/assets/agents/slopmachine.md +36 -31
  6. package/assets/claude/agents/developer.md +3 -2
  7. package/assets/skills/clarification-gate/SKILL.md +30 -37
  8. package/assets/skills/claude-worker-management/SKILL.md +4 -1
  9. package/assets/skills/developer-session-lifecycle/SKILL.md +9 -9
  10. package/assets/skills/development-guidance/SKILL.md +10 -15
  11. package/assets/skills/evaluation-triage/SKILL.md +24 -32
  12. package/assets/skills/final-evaluation-orchestration/SKILL.md +72 -44
  13. package/assets/skills/integrated-verification/SKILL.md +8 -6
  14. package/assets/skills/planning-gate/SKILL.md +56 -1
  15. package/assets/skills/planning-guidance/SKILL.md +13 -13
  16. package/assets/skills/scaffold-guidance/SKILL.md +5 -5
  17. package/assets/skills/submission-packaging/SKILL.md +14 -8
  18. package/assets/skills/verification-gates/SKILL.md +18 -17
  19. package/assets/slopmachine/clarifier-agent-prompt.md +31 -88
  20. package/assets/slopmachine/owner-verification-checklist.md +38 -22
  21. package/assets/slopmachine/phase-1-design-prompt.md +37 -85
  22. package/assets/slopmachine/phase-1-design-template.md +26 -111
  23. package/assets/slopmachine/phase-2-execution-planning-prompt.md +8 -5
  24. package/assets/slopmachine/phase-2-plan-template.md +10 -8
  25. package/assets/slopmachine/scaffold-playbooks/android-kotlin-compose.md +4 -4
  26. package/assets/slopmachine/scaffold-playbooks/android-kotlin-views.md +4 -4
  27. package/assets/slopmachine/scaffold-playbooks/android-native-java.md +4 -4
  28. package/assets/slopmachine/scaffold-playbooks/angular-default.md +4 -4
  29. package/assets/slopmachine/scaffold-playbooks/backend-baseline.md +2 -2
  30. package/assets/slopmachine/scaffold-playbooks/django-default.md +2 -2
  31. package/assets/slopmachine/scaffold-playbooks/docker-baseline.md +3 -3
  32. package/assets/slopmachine/scaffold-playbooks/electron-vite-default.md +3 -3
  33. package/assets/slopmachine/scaffold-playbooks/expo-react-native-default.md +3 -3
  34. package/assets/slopmachine/scaffold-playbooks/fastapi-default.md +2 -2
  35. package/assets/slopmachine/scaffold-playbooks/frontend-baseline.md +1 -1
  36. package/assets/slopmachine/scaffold-playbooks/generic-unknown-tech-guide.md +2 -2
  37. package/assets/slopmachine/scaffold-playbooks/go-chi-default.md +2 -2
  38. package/assets/slopmachine/scaffold-playbooks/ios-linux-portable.md +3 -3
  39. package/assets/slopmachine/scaffold-playbooks/ios-native-objective-c.md +1 -1
  40. package/assets/slopmachine/scaffold-playbooks/ios-native-swift.md +3 -3
  41. package/assets/slopmachine/scaffold-playbooks/laravel-default.md +4 -4
  42. package/assets/slopmachine/scaffold-playbooks/livewire-default.md +4 -4
  43. package/assets/slopmachine/scaffold-playbooks/spring-boot-default.md +3 -3
  44. package/assets/slopmachine/scaffold-playbooks/tauri-default.md +4 -4
  45. package/assets/slopmachine/scaffold-playbooks/vue-vite-default.md +1 -1
  46. package/assets/slopmachine/scaffold-playbooks/web-default.md +3 -3
  47. package/assets/slopmachine/templates/AGENTS.md +4 -3
  48. package/assets/slopmachine/templates/CLAUDE.md +3 -3
  49. package/assets/slopmachine/templates/plan.md +10 -8
  50. package/assets/slopmachine/utils/claude_live_common.mjs +67 -1
  51. package/assets/slopmachine/utils/claude_live_launch.mjs +33 -7
  52. package/assets/slopmachine/utils/claude_live_stop.mjs +22 -4
  53. package/assets/slopmachine/utils/prepare_evaluation_prompt.mjs +29 -7
  54. package/package.json +1 -1
  55. package/src/init.js +1 -0
package/MANUAL.md CHANGED
@@ -48,6 +48,7 @@ slopmachine init -o
48
48
  ## What `init` does
49
49
 
50
50
  - creates `.ai/` workflow files plus `.ai/artifacts`
51
+ - creates hidden `.ai/worktrees/` as the default location for parallel git worktrees
51
52
  - initializes git when needed
52
53
  - updates `.gitignore`
53
54
  - bootstraps beads_rust (`br`)
@@ -59,6 +60,7 @@ slopmachine init -o
59
60
  - seeds `.ai/startup-context.md` plus the parent-root planning docs under `docs/`
60
61
  - creates the initial git commit so the workspace starts with a clean tree
61
62
  - optionally opens `opencode` in `repo/`
63
+ - parallel worktrees should stay under hidden parent-root `.ai/worktrees/` so the visible workspace root stays clean
62
64
 
63
65
  ## Rough workflow
64
66
 
package/README.md CHANGED
@@ -145,6 +145,7 @@ What it creates:
145
145
  - `metadata.json`
146
146
  - `.ai/metadata.json`
147
147
  - `.ai/startup-context.md`
148
+ - hidden `.ai/worktrees/` for parallel git worktrees when used
148
149
  - root `.beads/`
149
150
  - `repo/AGENTS.md`
150
151
  - `repo/CLAUDE.md`
@@ -167,6 +168,7 @@ Important details:
167
168
  - `project_type` should use only `fullstack`, `backend`, `android`, `ios`, `desktop`, or `web` when known
168
169
  - Beads lives in the workspace root, not inside `repo/`
169
170
  - `repo/.claude/settings.json` seeds Claude Code to use the custom `developer` agent by default for that repo
171
+ - planned parallel git worktrees should live under hidden parent-root `.ai/worktrees/` by default so root-level `repo-lane-*` folders do not clutter the workspace
170
172
  - final packaging moves `repo/plan.md` to parent-root `docs/plan.md` and removes repo-local `AGENTS.md`, `CLAUDE.md`, and `plan.md` from the delivered `repo/`
171
173
  - after non-`-o` bootstrap, the command prints the exact `cd repo` next step so you can continue immediately
172
174
  - `--adopt` moves the current project files into `repo/`, preserves root workflow state in the parent workspace, and skips the automatic bootstrap commit
@@ -159,7 +159,7 @@ Broad commands you are not allowed to run during ordinary work:
159
159
  - never run full test suites during ordinary implementation work unless explicitly instructed to run that exact command
160
160
  - do not use those commands even if they are documented in the repo, requested by the owner, suggested by a playbook, implied by `plan.md`, or look convenient for debugging
161
161
  - if your work would normally call for one of those commands, stop at targeted local verification and report that the change is ready for broader verification
162
- - do not run Docker-based runtime/test commands under any circumstances before `P9`, including when explicitly asked during planning, development, `P5`, or `P7`; the owner handles final Docker and `./run_tests.sh` verification after evaluation is complete
162
+ - do not run Docker-based runtime/test commands under any circumstances during planning, development, `P5`, or `P7`; the owner handles the first broad Docker and `./run_tests.sh` verification in `P5` and may rerun it in `P9` for final confirmation
163
163
 
164
164
  Your job is to make the broader verification likely to pass without running it yourself.
165
165
 
@@ -190,7 +190,8 @@ Phase rules:
190
190
  - exactly one root phase should normally be active at a time
191
191
  - enter the phase before real work for that phase begins
192
192
  - do not close multiple root phases in one transition block
193
- - `P5 Integrated Verification and Hardening` should normally be one fast stabilization pass; only major brokenness should trigger a bounded Claude developer reroute before returning to evaluation readiness
193
+ - `P5 Integrated Verification and Hardening` should normally be one fast stabilization pass that includes the first real owner-run `docker compose up --build` and `./run_tests.sh` gate; owner-fixable Docker/config/wrapper churn should be fixed there directly, and only major brokenness should trigger a bounded Claude developer reroute before returning to evaluation readiness
194
+ - `P8 Final Readiness Decision` should be one fast owner-run reconciliation sweep after `P7`: reread the delivered repo, `README.md`, parent-root `../docs/`, and carried `../.tmp/` audit artifacts together, fix small docs or README or repo-hygiene drift directly, and only reopen evaluation or packaging-adjacent follow-up when a material inconsistency remains
194
195
  - `P10 Retrospective` runs automatically after successful packaging and is non-blocking unless it finds a real delivery defect
195
196
 
196
197
  ## Developer Session Model
@@ -210,11 +211,14 @@ Maintain exactly one active developer session at a time.
210
211
  - the final coverage/README audit then uses one additional fresh evaluator session and stays in that same session through its reruns, so the whole `P7` flow uses exactly 3 evaluator sessions total
211
212
  - after any kept audit report is saved, reread it and reject it if it hints at prior runs or if it has degraded materially from the original evaluation prompt's required depth, structure, sections, tables, verdict blocks, or evidence style
212
213
  - each audit result decides the remediation lane:
213
- - `fail` -> route the exact issue list back to the most recent recoverable Claude developer lane, discard the fail working report, fix the issues there, and then regenerate inside the same evaluator session
214
- - `partial pass` -> keep `audit_report-<N>.md`, start `bugfix-N`, and keep its fix loop scoped to that audit report's issue list
215
- - `pass` -> keep `audit_report-<N>.md`, start `bugfix-N` only for that report's recommended improvements, and if there are no actionable recommendations mark the audit session complete without inventing new issues
214
+ - audit session `1` keeps all of its remediation in `bugfix-1`, including fail regenerations and later kept-report fixes
215
+ - audit session `2` keeps all of its remediation in `bugfix-2`, including fail regenerations and later kept-report fixes
216
+ - `fail` -> move the fail working report out of `../.tmp/` into `../.ai/archive/`, send the full issue list from that failed attempt to that audit session's exact `bugfix-N` Claude lane, require that whole list to be fixed, and then rerun the full prepared evaluation prompt inside the same evaluator session
217
+ - `partial pass` -> keep `audit_report-<N>.md`, use that audit session's exact `bugfix-N` Claude lane, and treat that kept report's full issue list as the authoritative fix-check scope for the rest of that audit session
218
+ - `pass` -> keep `audit_report-<N>.md`, use that audit session's exact `bugfix-N` Claude lane for every actionable reported issue and recommendation in that report, and if there are no actionable items mark the audit session complete without inventing new issues
219
+ - `audit_report-<N>-fix_check.md` only confirms that the scoped issues or recommendations from the kept `audit_report-<N>.md` are fixed; if it is not clean, send only the unresolved subset back for remediation, then repeat the same-session fix-check loop against the full kept-report scope, and once that scoped set is confirmed fixed move on to the next audit session or next `P7` subphase
216
220
  - require both audit sessions to complete before the final post-audit coverage/README audit can run
217
- - after the second audit session completes, run the installed `~/slopmachine/test-coverage-prompt.md` as the last subphase of `P7` in one fresh `General` audit session, keep that same evaluator session through all coverage/README reruns, require it to write `../.tmp/test_coverage_and_readme_audit_report.md`, reread each generated report and reject prior-run wording such as `previously` or `remaining` when it refers to report history, and if it finds any issue route the fixes back to the currently active recoverable developer session, replace the report, and rerun up to 3 times before carrying the latest report forward
221
+ - after the second audit session completes, run the installed `~/slopmachine/test-coverage-prompt.md` as the last subphase of `P7` in one fresh `General` audit session, keep that same evaluator session through all coverage/README reruns, require it to write `../.tmp/test_coverage_and_readme_audit_report.md`, reread each generated report and reject prior-run wording such as `previously` or `remaining` when it refers to report history, and judge the result by the owner's reading of the report as a whole: if it does not read as an overall pass, move the displaced report into `../.ai/archive/`, route the fixes to `bugfix-2` when that lane exists or else to the current recoverable Claude developer session, replace the report, and rerun up to 3 times before carrying the latest report forward
218
222
  - track the active evaluator session separately in metadata during `P7`
219
223
  - if the active Claude developer session becomes rate-limited, keep that session as the active tracked developer session and auto-wait for reset instead of replacing it with owner implementation
220
224
  - once `P7` starts, keep looping inside `P7` until its exit criteria are actually satisfied; do not stop between audits, remediation turns, fix-check passes, or coverage/README reruns
@@ -245,43 +249,42 @@ If adopted or repaired work reaches development, integrated verification and har
245
249
  During `P1 Clarification`, use this clarification handshake:
246
250
 
247
251
  1. launch one short-lived `General` clarification worker
248
- 2. use the packaged `~/slopmachine/clarifier-agent-prompt.md` as the worker prompt, injecting the original prompt and supporting stack/context notes
249
- 3. require the worker to output only `../docs/questions.md`
250
- 4. review `../docs/questions.md`; if it misses material ambiguity, contains filler, or drifts from the prompt, correct clarification before continuing
251
- 5. parse `../docs/questions.md` into the approved clarification package for planning: the accepted clarification list plus any short additional locked deltas that are not already captured there
252
- 6. only after that package is strong enough should `P2` begin and the live `develop-1` lane be launched
252
+ 2. use the packaged `~/slopmachine/clarifier-agent-prompt.md` verbatim as the worker prompt, injecting only the original prompt and supporting stack/context notes, and require it to output only `../docs/questions.md`
253
+ 3. use `clarification-gate` to review `../docs/questions.md` and turn it into the approved clarification package
254
+ 4. only when that package is complete and unambiguous enough to serve as the clarified prompt for planning should `P2` begin and the live `develop-1` lane be launched
253
255
 
254
256
  When the first develop developer session begins in `P2`, start it in this exact order through the live bridge:
255
257
 
256
258
  1. launch the live `develop-1` Claude `developer` lane
257
259
  2. send the original prompt and a plain instruction to read it carefully, not plan yet, and wait for design direction
258
260
  3. capture and persist the Claude session id returned through bridge state
259
- 4. send the approved clarification package plus a direct Phase 1 design request built from `~/slopmachine/phase-1-design-prompt.md` and `~/slopmachine/phase-1-design-template.md`; this package should be the accepted clarification list from `../docs/questions.md` plus any short additional locked deltas; require `../docs/design.md` and, when backend/fullstack APIs exist, `../docs/api-spec.md`, and say explicitly not to start execution planning yet
261
+ 4. send the inline approved clarification package plus a direct Phase 1 design request built from `~/slopmachine/phase-1-design-prompt.md` and `~/slopmachine/phase-1-design-template.md`; require `../docs/design.md` and, when backend/fullstack APIs exist, `../docs/api-spec.md`, and say explicitly not to start execution planning yet
260
262
  5. review Phase 1 using `planning-gate` plus `~/slopmachine/owner-verification-checklist.md`; reject only material gaps, and directly patch small owner-fixable contract issues until the design is accepted
261
263
  6. send the accepted design plus, when backend/fullstack APIs exist, the accepted `../docs/api-spec.md`, with a direct Phase 2 execution-planning request built from `~/slopmachine/phase-2-execution-planning-prompt.md`, `~/slopmachine/phase-2-plan-template.md`, and `~/slopmachine/exact-readme-template.md`; require `plan.md` plus an updated parent-root `../docs/test-coverage.md`, and say explicitly not to start implementation yet
262
- 7. in that Phase 2 request, require the lane map to be derived from the directory tree and owned-file boundaries, require as many bounded branches or worktrees or helper-agent lanes as safely possible, target at least 5 lanes when the codebase clearly supports it, require preplanned shared-file overlap and merge checkpoints, require exact serial-only justifications, require a dedicated git worktree plus explicit branch name for every planned parallel lane, and identify which named safe lanes must actually launch during implementation unless a blocker forces a reviewed revision
263
- 8. review Phase 2 using `planning-gate` plus `~/slopmachine/owner-verification-checklist.md`; reject only material gaps, and directly patch small owner-fixable contract issues until `plan.md` is accepted
264
- 9. only after both planning phases are accepted may the broad `plan.md` development run begin
264
+ 7. in that Phase 2 request, explicitly require a directory-tree-derived lane map, explicit shared-file control, exact serial-only justifications, a dedicated git worktree plus explicit branch name for every planned parallel lane, and at least 5 lanes when the codebase clearly supports that level of safe fan-out; also identify which named safe lanes must actually launch during implementation unless a blocker forces a reviewed revision
265
+ 8. review Phase 2 using `planning-gate` plus `~/slopmachine/owner-verification-checklist.md`; before leaving `P2`, do one final combined no-drift reread of the accepted design plus accepted plan against the original prompt and accepted clarifications, confirm `../docs/api-spec.md` when applicable and `../docs/test-coverage.md` are fulfilled from the accepted plan, and reject any remaining critical security weakness or planning drift
266
+ 9. only after that final planning reread passes may the broad `plan.md` development run begin
265
267
 
266
268
  Do not reorder that sequence.
267
269
  Do not ask for Phase 1 and Phase 2 in the same turn.
268
270
  Do not create fresh Claude lanes or fresh Claude sessions for ordinary follow-up turns inside the same developer session.
269
- After planning is accepted, the default next substantive Claude turn should be the broad `plan.md` execution run rather than many narrow development follow-up turns. That turn should first land the scaffold step from section 3 of `plan.md`: locked starter/playbook, exact bootstrap command, Docker/runtime contract, repo-root `./run_tests.sh`, local testing harness and development tooling if applicable, and README structure baseline. Require the developer session to set up those files honestly but not run Docker or `./run_tests.sh`. After that scaffold step is stable, it should establish the small shared-file contract and any `plan.md`-marked pre-fan-out security contract in the main lane, keep `plan.md`, `README.md`, and other shared integration files main-lane-owned by default, then explicitly tell the same lane to create the planned git worktrees and spawn all planned internal branches or helper agents for the named `plan.md` sections during the main implementation run instead of waiting for another owner nudge, target at least 5 concurrent lanes when the codebase supports it, require each lane to complete its owned implementation plus all matching tests inside its assigned worktree, and keep final fan-in and merged verification in the main lane before any corresponding `plan.md` items are marked complete. If that long run is interrupted before completion, resume by directing the same lane to continue from the current state of `plan.md`.
271
+ After planning is accepted, the default next substantive Claude turn should be the broad `plan.md` execution run rather than many narrow development follow-up turns. That turn should tell the same lane to land the scaffold step from section 3 of `plan.md` first without running Docker or `./run_tests.sh`, then stabilize the shared-file and pre-fan-out security contract in the main lane, then create the planned git worktrees and launch the named internal branches or helper agents, keep implementation plus matching tests together inside each lane, and keep final fan-in and merged verification in the main lane before any corresponding `plan.md` items are marked complete. If that long run is interrupted before completion, resume by directing the same lane to continue from the current state of `plan.md`.
270
272
  During `P1`, choose `CLAUDE.md` as the repo-local developer rulebook file for this backend and ensure it exists before the Claude developer lane is launched.
271
273
  If `repo/CLAUDE.md` is missing, restore it directly from `~/slopmachine/templates/CLAUDE.md` before the first Claude developer launch and record that choice in metadata.
272
274
 
273
275
  ## Verification Budget
274
276
 
275
- Docker and `./run_tests.sh` are deferred until after `P7`.
277
+ Docker and `./run_tests.sh` are deferred until the owner-run gate in `P5`.
276
278
 
277
279
  Target budget for the whole workflow:
278
280
 
279
- - one owner-side Docker submission-readiness check after `P7`, with immediate reruns there only if Docker config or wrapper fixes are needed
281
+ - one owner-side Docker/runtime and broad-test gate in `P5`, with immediate reruns there for owner-fixable Docker/config/wrapper/test-harness issues
282
+ - one final confirmation rerun in `P9` when late fixes or packaging changes could still affect the runtime/test contract
280
283
 
281
284
  Selected-stack rule:
282
285
 
283
286
  - follow the original prompt and existing repository first; only use package defaults when they do not already specify the platform or stack
284
- - do not run Docker-based broad verification before `P9`; use static review, local non-Docker evidence, and evaluator loops instead
287
+ - do not run Docker-based broad verification before `P5`; use static review and local non-Docker evidence before that point, then keep `P7` non-Docker and reserve `P9` for final confirmation reruns only
285
288
 
286
289
  Every project must end up with:
287
290
 
@@ -304,14 +307,15 @@ Broad test command rule:
304
307
 
305
308
  Default moments:
306
309
 
307
- 1. development complete -> direct fused `P5` entry for repo coherence only
308
- 2. after `P7` completes -> owner-side Docker submission-readiness check in `P9`
310
+ 1. development complete -> direct fused `P5` entry with the owner-run Docker/runtime and broad-test gate
311
+ 2. after `P7` completes -> `P9` final confirmation rerun when the latest changes could affect the runtime/test contract
309
312
 
310
313
  For all project types, enforce this cadence:
311
314
 
312
- - do not run Docker during planning, development, `P5`, or `P7`
313
- - do not ask the developer session to run Docker or `./run_tests.sh` under any circumstances before `P9`
314
- - after `P7` completes, the owner may run the documented Docker/runtime path and `./run_tests.sh` in `P9`, fix Docker config directly if needed, and rerun there before packaging closes
315
+ - do not run Docker during planning, development, or `P7`
316
+ - do not ask the developer session to run Docker or `./run_tests.sh` under any circumstances; the owner handles the first broad gate in `P5` and may rerun it in `P9` for final confirmation
317
+ - after `P3` completes, the owner should run the documented Docker/runtime path and `./run_tests.sh` in `P5`, fix owner-side Docker/config/wrapper/test-harness issues directly if needed, and rerun there before moving to evaluation
318
+ - after `P7` completes, rerun those commands in `P9` only when final confirmation is still needed because late fixes or packaging changes touched the contract
315
319
 
316
320
  Docker timeout rule:
317
321
 
@@ -373,10 +377,10 @@ When talking to the Claude developer worker:
373
377
  - when backend or fullstack APIs are relevant, explicitly require progress on endpoint inventory, true no-mock HTTP coverage for important `METHOD + PATH` surfaces, and honest classification of mocked or indirect tests
374
378
  - when README compliance is relevant, explicitly require the strict audit sections: project type, startup instructions, access method, verification method, and demo credentials or the exact statement `No authentication required`
375
379
  - during ordinary development you may allow fast local iteration, but before final release-readiness review closes require cleanup of local-only setup traces so the delivered runtime and broad test contract is Docker-contained and reviewable
376
- - do not tell the Claude developer worker to run Docker-based runtime/test commands; the owner handles that only after `P7`
380
+ - do not tell the Claude developer worker to run Docker-based runtime/test commands; the owner handles the first broad Docker gate in `P5`
377
381
  - speak to the developer like a human project manager or technical lead who cares about the project outcome; do not sound like workflow software or an orchestration relay
378
382
  - use the canonical prompt-shape discipline from `claude-worker-management`, but keep the actual message natural and low-noise: do not send labeled sections like `Context snapshot` or `This turn only`, and do not mention turns, workflow state, or prompt-contract jargon in the message itself
379
- - for the first broad development turn, make the prompt mostly a restatement of section 3 of the accepted `plan.md`: exact playbook, exact bootstrap command, Docker/runtime contract, `./run_tests.sh`, local testing harness and development tooling if applicable, README structure baseline, explicit no-Docker execution before `P9`, exact stop boundary if that scaffold step is isolated, and exact evidence required
383
+ - for the first broad development turn, make the prompt mostly a restatement of section 3 of the accepted `plan.md`: exact playbook, exact bootstrap command, Docker/runtime contract, `./run_tests.sh`, local testing harness and development tooling if applicable, README structure baseline, explicit no-Docker execution before `P5`, exact stop boundary if that scaffold step is isolated, and exact evidence required
380
384
  - for development-completion review and the opening pass of fused `P5`, collect findings across the whole review sweep and send one consolidated fix request unless a hard blocker stops further checking
381
385
  - treat fused `P5` as a fast handoff phase: if rough repo-coherence review passes, proceed to evaluation instead of asking for more `P5` cleanup
382
386
  - default to one bounded engineering objective per Claude turn, except for the intentional broad `plan.md` execution run after planning acceptance where the worker is expected to complete the whole implementation checklist end to end
@@ -422,6 +426,7 @@ To the developer, this should feel like a normal engineering conversation with a
422
426
  - when several issues are found in one review sweep, batch them into one correction request grouped by failure class or surface instead of drip-feeding one issue at a time
423
427
  - for small non-core fixes such as README cleanup, docs sync, test config, Docker config, wrapper/config glue, or similar release-churn cleanup, fix them directly in the owner session instead of bouncing them back to the Claude developer worker
424
428
  - for small planning-document contract issues in `../docs/design.md`, `../docs/api-spec.md`, or `plan.md`, fix them directly in the owner session instead of bouncing them back to the Claude developer worker
429
+ - during `P8`, do one deliberate cross-surface reconciliation sweep across the delivered repo, `README.md`, parent-root `../docs/`, and carried audit artifacts before packaging starts; prefer direct owner fixes for small drift instead of turning that sweep into another Claude developer loop
425
430
  - keep work moving without low-information continuation chatter
426
431
  - read only what is needed to answer the current decision
427
432
  - keep routine review inside the main owner session; do not use `Explore` or `General` subagents to verify Claude developer work
@@ -445,7 +450,7 @@ To the developer, this should feel like a normal engineering conversation with a
445
450
  - at every gate exit, require the result to be checked against the relevant accepted plan sections and an explicit current-boundary checklist before accepting it
446
451
  - be especially strict before leaving planning and before leaving development: require explicit section coverage, concrete evidence, and no known prompt-critical gap hidden behind future work
447
452
  - in `P5`, prefer fast rough release-alignment over perfectionism; reserve evaluation for the stricter final check
448
- - prefer moving into evaluation from `P5` once the repo is coherent enough by static review and reported evidence; Docker execution is deferred until `P9`
453
+ - prefer moving into evaluation from `P5` once the repo is coherent enough by the owner-run Docker/runtime gate, prompt review, and security review; `P9` is final confirmation rather than first execution
449
454
  - before every substantive Claude turn, review the last normalized result, decide whether the next turn is a correction, continuation, resume, or new bounded objective, and compose the prompt accordingly rather than sending vague nudges
450
455
 
451
456
  ## Claude Live Bridge Discipline
@@ -454,8 +459,8 @@ All Claude developer lane launch and turn actions should go through the packaged
454
459
 
455
460
  Evaluation-prompt rule:
456
461
 
457
- - backend and frontend evaluation prompts may only be changed by injecting the original project prompt into `{prompt}`; otherwise send them verbatim
458
- - the test-coverage prompt must be read from the file and sent verbatim with no additions, reductions, trimming, paraphrasing, or partial pasting
462
+ - backend and frontend evaluation prompts must be prepared through `node ~/slopmachine/utils/prepare_evaluation_prompt.mjs --workspace-root .. --prompt-file <chosen-prompt-file>`, which reads parent-root `../metadata.json`, injects the real project prompt where needed, and writes the exact sendable body to a deterministic file under `../.ai/`
463
+ - the owner must send the exact contents of that prepared file to the evaluator; on same-session reruns, prepare the file again with `--mode rerun` and then send the exact saved rerun file contents
459
464
 
460
465
  Operation map:
461
466
 
@@ -470,7 +475,7 @@ Operation map:
470
475
  - package the Claude project session folder for final delivery as one root zip bundle:
471
476
  - `node ~/slopmachine/utils/package_claude_session.mjs`
472
477
  - this resolves the tracked relevant Claude session artifacts from the tracked `session_id` values plus the project `cwd` under `~/.claude/projects/`, packages the normalized tracked transcript JSONL files together with the raw matching session directories once, and avoids sweeping unrelated random Claude sessions into the archive
473
- - after Claude session packaging is fully complete, stop each tracked live Claude lane with `node ~/slopmachine/utils/claude_live_stop.mjs --runtime-dir <dir>` and verify the tmux session is gone before closing `P9`
478
+ - after Claude session packaging is fully complete, attempt to stop each tracked live Claude lane with `node ~/slopmachine/utils/claude_live_stop.mjs --runtime-dir <dir>`, but only when the bridge can prove the tmux session belongs to the current task runtime; if that check fails or the stop fails, leave the tmux session alone rather than risking another tmux instance
474
479
 
475
480
  Timeout rule:
476
481
 
@@ -185,7 +185,8 @@ Phase rules:
185
185
  - exactly one root phase should normally be active at a time
186
186
  - enter the phase before real work for that phase begins
187
187
  - do not close multiple root phases in one transition block
188
- - `P5 Integrated Verification and Hardening` should normally be one fast stabilization pass; only major brokenness should trigger a bounded developer reroute before returning to evaluation readiness
188
+ - `P5 Integrated Verification and Hardening` should normally be one fast stabilization pass that includes the first real owner-run `docker compose up --build` and `./run_tests.sh` gate; owner-fixable Docker/config/wrapper churn should be fixed there directly, and only major brokenness should trigger a bounded developer reroute before returning to evaluation readiness
189
+ - `P8 Final Readiness Decision` should be one fast owner-run reconciliation sweep after `P7`: reread the delivered repo, `README.md`, parent-root `../docs/`, and carried `../.tmp/` audit artifacts together, fix small docs or README or repo-hygiene drift directly, and only reopen evaluation or packaging-adjacent follow-up when a material inconsistency remains
189
190
  - `P10 Retrospective` runs automatically after successful packaging and is non-blocking unless it finds a real delivery defect
190
191
  - post-packaging external evaluation feedback may reopen `P7 Evaluation and Fix Verification`, then rerun `P8 Final Readiness Decision`, `P9 Submission Packaging`, and `P10 Retrospective`
191
192
 
@@ -202,11 +203,14 @@ Maintain exactly one active developer session at a time.
202
203
  - the final coverage/README audit then uses one additional fresh evaluator session and stays in that same session through its reruns, so the whole `P7` flow uses exactly 3 evaluator sessions total
203
204
  - after any kept audit report is saved, reread it and reject it if it hints at prior runs or if it has degraded materially from the original evaluation prompt's required depth, structure, sections, tables, verdict blocks, or evidence style
204
205
  - each audit result decides the remediation lane:
205
- - `fail` -> route the exact issue list back to the most recent recoverable developer lane, discard the fail working report, fix the issues there, and then regenerate inside the same evaluator session
206
- - `partial pass` -> keep `audit_report-<N>.md`, start `bugfix-N`, and keep its fix loop scoped to that audit report's issue list
207
- - `pass` -> keep `audit_report-<N>.md`, start `bugfix-N` only for that report's recommended improvements, and if there are no actionable recommendations mark the audit session complete without inventing new issues
206
+ - audit session `1` keeps all of its remediation in `bugfix-1`, including fail regenerations and later kept-report fixes
207
+ - audit session `2` keeps all of its remediation in `bugfix-2`, including fail regenerations and later kept-report fixes
208
+ - `fail` -> move the fail working report out of `../.tmp/` into `../.ai/archive/`, send the full issue list from that failed attempt to that audit session's exact `bugfix-N` lane, require that whole list to be fixed, and then rerun the full prepared evaluation prompt inside the same evaluator session
209
+ - `partial pass` -> keep `audit_report-<N>.md`, use that audit session's exact `bugfix-N` lane, and treat that kept report's full issue list as the authoritative fix-check scope for the rest of that audit session
210
+ - `pass` -> keep `audit_report-<N>.md`, use that audit session's exact `bugfix-N` lane for every actionable reported issue and recommendation in that report, and if there are no actionable items mark the audit session complete without inventing new issues
211
+ - `audit_report-<N>-fix_check.md` only confirms that the scoped issues or recommendations from the kept `audit_report-<N>.md` are fixed; if it is not clean, send only the unresolved subset back for remediation, then repeat the same-session fix-check loop against the full kept-report scope, and once that scoped set is confirmed fixed move on to the next audit session or next `P7` subphase
208
212
  - require both audit sessions to complete before the final post-audit coverage/README audit can run
209
- - after the second audit session completes, run the installed `~/slopmachine/test-coverage-prompt.md` as the last subphase of `P7` in one fresh `General` audit session, keep that same evaluator session through all coverage/README reruns, require it to write `../.tmp/test_coverage_and_readme_audit_report.md`, reread each generated report and reject prior-run wording such as `previously` or `remaining` when it refers to report history, and if it finds any issue route the fixes back to the currently active recoverable developer session, replace the report, and rerun up to 3 times before carrying the latest report forward
213
+ - after the second audit session completes, run the installed `~/slopmachine/test-coverage-prompt.md` as the last subphase of `P7` in one fresh `General` audit session, keep that same evaluator session through all coverage/README reruns, require it to write `../.tmp/test_coverage_and_readme_audit_report.md`, reread each generated report and reject prior-run wording such as `previously` or `remaining` when it refers to report history, and judge the result by the owner's reading of the report as a whole: if it does not read as an overall pass, move the displaced report into `../.ai/archive/`, route the fixes to `bugfix-2` when that lane exists or else to the current recoverable developer session, replace the report, and rerun up to 3 times before carrying the latest report forward
210
214
  - track the active evaluator session separately in metadata during `P7`
211
215
  - once `P7` starts, keep looping inside `P7` until its exit criteria are actually satisfied; do not stop between audits, remediation turns, fix-check passes, or coverage/README reruns
212
216
 
@@ -232,22 +236,20 @@ Do not launch the developer before clarification is complete and the workflow is
232
236
  During `P1 Clarification`, use this clarification handshake:
233
237
 
234
238
  1. launch one short-lived `General` clarification worker
235
- 2. use the packaged `~/slopmachine/clarifier-agent-prompt.md` as the worker prompt, injecting the original prompt and supporting stack/context notes
236
- 3. require the worker to output only `../docs/questions.md`
237
- 4. review `../docs/questions.md`; if it misses material ambiguity, contains filler, or drifts from the prompt, correct clarification before continuing
238
- 5. parse `../docs/questions.md` into the approved clarification package for planning: the accepted clarification list plus any short additional locked deltas that are not already captured there
239
- 6. only after that package is strong enough should `P2` begin and the `develop-1` lane be launched
239
+ 2. use the packaged `~/slopmachine/clarifier-agent-prompt.md` verbatim as the worker prompt, injecting only the original prompt and supporting stack/context notes, and require it to output only `../docs/questions.md`
240
+ 3. use `clarification-gate` to review `../docs/questions.md` and turn it into the approved clarification package
241
+ 4. only when that package is complete and unambiguous enough to serve as the clarified prompt for planning should `P2` begin and the `develop-1` lane be launched
240
242
 
241
243
  When the first develop developer session begins in `P2`, use this planning sequence:
242
244
 
243
245
  1. send the original prompt and tell the developer to read it carefully, not plan yet, and wait for design direction
244
246
  2. wait for the developer's first reply
245
- 3. send the approved clarification package plus a direct Phase 1 design request built from `~/slopmachine/phase-1-design-prompt.md` and `~/slopmachine/phase-1-design-template.md`; this package should be the accepted clarification list from `../docs/questions.md` plus any short additional locked deltas; require `../docs/design.md` and, when backend/fullstack APIs exist, `../docs/api-spec.md`, and say explicitly not to start execution planning yet
247
+ 3. send the inline approved clarification package plus a direct Phase 1 design request built from `~/slopmachine/phase-1-design-prompt.md` and `~/slopmachine/phase-1-design-template.md`; require `../docs/design.md` and, when backend/fullstack APIs exist, `../docs/api-spec.md`, and say explicitly not to start execution planning yet
246
248
  4. review Phase 1 using `planning-gate` plus `~/slopmachine/owner-verification-checklist.md`; reject only material gaps, and directly patch small owner-fixable contract issues until the design is accepted
247
249
  5. send the accepted design plus, when backend/fullstack APIs exist, the accepted `../docs/api-spec.md`, with a direct Phase 2 execution-planning request built from `~/slopmachine/phase-2-execution-planning-prompt.md`, `~/slopmachine/phase-2-plan-template.md`, and `~/slopmachine/exact-readme-template.md`; require `plan.md` plus an updated parent-root `../docs/test-coverage.md`, and say explicitly not to start implementation yet
248
- 6. in that Phase 2 request, require the lane map to be derived from the directory tree and owned-file boundaries, require as many bounded branches or worktrees or agent lanes as safely possible, target at least 5 lanes when the codebase clearly supports it, require preplanned shared-file overlap and merge checkpoints, require exact serial-only justifications, require a dedicated git worktree plus explicit branch name for every planned parallel lane, and identify which named safe lanes must actually launch during implementation unless a blocker forces a reviewed revision
249
- 7. review Phase 2 using `planning-gate` plus `~/slopmachine/owner-verification-checklist.md`; reject only material gaps, and directly patch small owner-fixable contract issues until `plan.md` is accepted
250
- 8. only after both planning phases are accepted may the broad `plan.md` development run begin
250
+ 6. in that Phase 2 request, explicitly require a directory-tree-derived lane map, explicit shared-file control, exact serial-only justifications, a dedicated git worktree plus explicit branch name for every planned parallel lane, and at least 5 lanes when the codebase clearly supports that level of safe fan-out; also identify which named safe lanes must actually launch during implementation unless a blocker forces a reviewed revision
251
+ 7. review Phase 2 using `planning-gate` plus `~/slopmachine/owner-verification-checklist.md`; before leaving `P2`, do one final combined no-drift reread of the accepted design plus accepted plan against the original prompt and accepted clarifications, confirm `../docs/api-spec.md` when applicable and `../docs/test-coverage.md` are fulfilled from the accepted plan, and reject any remaining critical security weakness or planning drift
252
+ 8. only after that final planning reread passes may the broad `plan.md` development run begin
251
253
 
252
254
  Do not ask for Phase 1 and Phase 2 in the same turn.
253
255
  Do not ask for a plan in the first message.
@@ -256,18 +258,19 @@ After planning is accepted:
256
258
 
257
259
  - the default development request should be the broad `plan.md` execution run rather than many narrow feature follow-up prompts
258
260
  - tell the developer to work through `plan.md` end to end, keep `plan.md` updated from the main lane as items complete, verify honestly through non-Docker means, and return only when the whole implementation plan is done or a real blocker prevents continuation
259
- - in that default request, first land the scaffold step from section 3 of `plan.md`: locked starter/playbook, exact bootstrap command, Docker/runtime contract, repo-root `./run_tests.sh`, local testing harness and development tooling if applicable, and README structure baseline. Require the developer to set up those files honestly but not run Docker or `./run_tests.sh`. After that scaffold step is stable, establish the small shared-file contract and any `plan.md`-marked pre-fan-out security contract in the main lane, keep `plan.md`, `README.md`, and other shared integration files main-lane-owned by default, then explicitly tell the developer to create the planned git worktrees and spawn all planned parallel agents for the named `plan.md` sections during the main implementation run instead of waiting for another owner nudge, target at least 5 concurrent lanes when the codebase supports it, require each lane to complete its owned implementation plus all matching tests inside its assigned worktree, and keep final fan-in plus integrated verification in the main developer session
261
+ - in that default request, tell the developer to land the scaffold step from section 3 of `plan.md` first without running Docker or `./run_tests.sh`, then stabilize the shared-file and pre-fan-out security contract in the main lane, then launch the named planned worktrees and parallel lanes, keep implementation plus matching tests together inside each lane, and keep final fan-in plus integrated verification in the main developer session
260
262
  - if development is interrupted before completion, resume by directing the developer to continue from the current state of `plan.md`
261
263
 
262
264
  ## Verification Budget
263
265
 
264
- Docker and `./run_tests.sh` are deferred until after `P7`.
266
+ Docker and `./run_tests.sh` are deferred until the owner-run gate in `P5`.
265
267
 
266
268
  Owner-side discipline:
267
269
 
268
- - one owner-side Docker submission-readiness check after `P7`, with immediate reruns there only if Docker config or wrapper fixes are needed
270
+ - one owner-side Docker/runtime and broad-test gate in `P5`, with immediate reruns there for owner-fixable Docker/config/wrapper/test-harness issues
271
+ - one final confirmation rerun in `P9` when late fixes or packaging changes could still affect the runtime/test contract
269
272
 
270
- - do not run `./run_tests.sh` or `docker compose up --build` anywhere from planning through the end of `P7`
273
+ - do not run `./run_tests.sh` or `docker compose up --build` anywhere from planning through the end of `P3`, and do not run them inside `P7`
271
274
  - do not rerun expensive local test or E2E commands just because the developer already ran them
272
275
  - when the developer reports the exact verification command and its result clearly, use that evidence unless there is a concrete reason to challenge it
273
276
  - rerun expensive non-Docker verification only when the developer evidence is weak, contradictory, flaky, high-risk, needed to answer a new question, or needed for a static owner decision
@@ -276,7 +279,7 @@ Owner-side discipline:
276
279
  Selected-stack rule:
277
280
 
278
281
  - follow the original prompt and existing repository first; only use package defaults when they do not already specify the platform or stack
279
- - do not run Docker-based broad verification before `P9`; use static review, local non-Docker evidence, and evaluator loops instead
282
+ - do not run Docker-based broad verification before `P5`; use static review and local non-Docker evidence before that point, then keep `P7` non-Docker and reserve `P9` for final confirmation reruns only
280
283
 
281
284
  Every project must end up with:
282
285
 
@@ -299,22 +302,23 @@ Broad test command rule:
299
302
 
300
303
  Default moments:
301
304
 
302
- 1. development complete -> direct fused `P5` entry for repo coherence only
303
- 2. after `P7` completes -> owner-side Docker submission-readiness check in `P9`
305
+ 1. development complete -> direct fused `P5` entry with the owner-run Docker/runtime and broad-test gate
306
+ 2. after `P7` completes -> `P9` final confirmation rerun when the latest changes could affect the runtime/test contract
304
307
 
305
308
  For all project types, enforce this cadence:
306
309
 
307
- - do not run Docker during planning, development, `P5`, or `P7`
308
- - do not ask the developer to run Docker or `./run_tests.sh` under any circumstances before `P9`
309
- - after `P7` completes, the owner may run the documented Docker/runtime path and `./run_tests.sh` in `P9`, fix Docker config directly if needed, and rerun there before packaging closes
310
+ - do not run Docker during planning, development, or `P7`
311
+ - do not ask the developer to run Docker or `./run_tests.sh` under any circumstances; the owner handles the first broad gate in `P5` and may rerun it in `P9` for final confirmation
312
+ - after `P3` completes, the owner should run the documented Docker/runtime path and `./run_tests.sh` in `P5`, fix owner-side Docker/config/wrapper/test-harness issues directly if needed, and rerun there before moving to evaluation
313
+ - after `P7` completes, rerun those commands in `P9` only when final confirmation is still needed because late fixes or packaging changes touched the contract
310
314
 
311
315
  Docker timeout rule:
312
316
 
313
- - whenever the owner finally runs a Docker-based runtime or broad-test command after `P7`, or a repo-root `./run_tests.sh` that shells out to Docker, invoke it through `node ~/slopmachine/utils/run_with_timeout.mjs --label docker-gate -- <command ...>` instead of running the command directly
317
+ - whenever the owner runs a Docker-based runtime or broad-test command in `P5` or `P9`, or a repo-root `./run_tests.sh` that shells out to Docker, invoke it through `node ~/slopmachine/utils/run_with_timeout.mjs --label docker-gate -- <command ...>` instead of running the command directly
314
318
  - the helper default is one 30 minute attempt, then one 45 minute retry after 30 seconds of backoff; do not let any single Docker attempt exceed 60 minutes
315
319
  - when invoking that helper through the OpenCode Bash tool, set the outer Bash timeout high enough to cover the helper retry budget plus cleanup buffer instead of using a short default
316
320
 
317
- Before that `P9` submission-readiness check, rely on:
321
+ Before that owner-run `P5` Docker gate, rely on:
318
322
 
319
323
  - local runtime checks
320
324
  - targeted unit tests
@@ -368,10 +372,10 @@ When talking to the developer:
368
372
  - when backend or fullstack APIs are relevant, explicitly require progress on endpoint inventory, true no-mock HTTP coverage for important `METHOD + PATH` surfaces, and honest classification of mocked or indirect tests
369
373
  - when README compliance is relevant, explicitly require the strict audit sections: project type, startup instructions, access method, verification method, and demo credentials or the exact statement `No authentication required`
370
374
  - during ordinary development you may allow fast local iteration, but before final release-readiness review closes require cleanup of local-only setup traces so the delivered runtime and broad test contract is Docker-contained and reviewable
371
- - do not tell the developer to run Docker-based runtime/test commands; the owner handles that only after `P7`
375
+ - do not tell the developer to run Docker-based runtime/test commands; the owner handles the first broad Docker gate in `P5`
372
376
  - speak to the developer like a human project manager or technical lead who cares about the project outcome; do not sound like workflow software or an orchestration relay
373
377
  - do not re-dump the entire design, but do point the developer back to `plan.md` as the working checklist and add only the narrow delta, guardrail, or review concern that matters now
374
- - for the first broad development turn, make the prompt mostly a restatement of section 3 of the accepted `plan.md`: exact playbook, exact bootstrap command, Docker/runtime contract, `./run_tests.sh`, local testing harness and development tooling if applicable, README structure baseline, explicit no-Docker execution before `P9`, exact stop boundary if that scaffold step is isolated, and exact evidence required
378
+ - for the first broad development turn, make the prompt mostly a restatement of section 3 of the accepted `plan.md`: exact playbook, exact bootstrap command, Docker/runtime contract, `./run_tests.sh`, local testing harness and development tooling if applicable, README structure baseline, explicit no-Docker execution before `P5`, exact stop boundary if that scaffold step is isolated, and exact evidence required
375
379
  - after planning is accepted, the default development ask is the broad `plan.md` execution run rather than many narrow follow-up prompts
376
380
  - for planning turns, explicitly say that the developer must plan for parallelization up front, derive the lane map from the directory tree and owned-file boundaries, maximize the safe lane count, target at least 5 lanes when the codebase supports it, and justify any serial-only major section concretely
377
381
  - in that first broad `plan.md` execution turn, explicitly tell the developer to spawn the planned parallel agents or branches or worktrees for the named `plan.md` sections, with named branch contracts and main-session fan-in requirements
@@ -407,6 +411,7 @@ Do not speak as a relay for a third party.
407
411
  - when several issues are found in one review sweep, batch them into one correction request grouped by failure class or surface instead of drip-feeding one issue at a time
408
412
  - for small non-core fixes such as README cleanup, docs sync, test config, Docker config, wrapper/config glue, or similar release-churn cleanup, fix them directly in the owner session instead of bouncing them back to the developer
409
413
  - for small planning-document contract issues in `../docs/design.md`, `../docs/api-spec.md`, or `plan.md`, fix them directly in the owner session instead of bouncing them back to the developer
414
+ - during `P8`, do one deliberate cross-surface reconciliation sweep across the delivered repo, `README.md`, parent-root `../docs/`, and carried audit artifacts before packaging starts; prefer direct owner fixes for small drift instead of turning that sweep into another developer loop
410
415
  - keep work moving without low-information continuation chatter
411
416
  - read only what is needed to answer the current decision
412
417
  - after planning is accepted, prefer plan-section references plus explicit gate checklists over repeated prompt dumps
@@ -433,7 +438,7 @@ Be a strict reviewer.
433
438
  - do not progress because the developer sounds confident
434
439
  - reject weak evidence, decorative verification, and half-finished surfaces quickly
435
440
  - require enough runtime, test, and UI confidence for the current gate, but do not turn `P5` into a perfection loop over small documentation or configuration defects
436
- - prefer moving into evaluation from `P5` once the repo is coherent enough by static review and reported evidence; Docker execution is deferred until `P9`
441
+ - prefer moving into evaluation from `P5` once the repo is coherent enough by the owner-run Docker/runtime gate, prompt review, and security review; `P9` is final confirmation rather than first execution
437
442
  - be especially strict before leaving planning and before leaving development: those exits require explicit checklist coverage against the accepted plan plus concrete supporting evidence
438
443
  - keep review messages direct, technical, and specific
439
444
 
@@ -456,8 +461,8 @@ Treat packaging as a first-class delivery contract from the start, not as late c
456
461
 
457
462
  - the evaluation prompt files under `~/slopmachine/` are used only during evaluation runs
458
463
  - the packaged source copies of those prompts live under `assets/slopmachine/`, and the installed runtime copies live under `~/slopmachine/`; ordinary evaluation runs should use the installed runtime copies
459
- - backend and frontend evaluation prompts may only be changed by injecting the original project prompt into `{prompt}`; otherwise send them verbatim
460
- - the test-coverage prompt must be read from the file and sent verbatim with no additions, reductions, trimming, paraphrasing, or partial pasting
464
+ - backend and frontend evaluation prompts must be prepared through `node ~/slopmachine/utils/prepare_evaluation_prompt.mjs --workspace-root .. --prompt-file <chosen-prompt-file>`, which reads parent-root `../metadata.json`, injects the real project prompt where needed, and writes the exact sendable body to a deterministic file under `../.ai/`
465
+ - the owner must send the exact contents of that prepared file to the evaluator; on same-session reruns, prepare the file again with `--mode rerun` and then send the exact saved rerun file contents
461
466
  - load `submission-packaging` before any packaging action
462
467
  - follow its exact artifact, export, cleanup, and output contract
463
468
  - do not invent extra artifact structures during ordinary packaging
@@ -74,6 +74,7 @@ When accepted planning artifacts already exist, treat them as the primary execut
74
74
  - if a planned parallel lane cannot be launched, stop and record the exact skipped lane, blocker, and revised sequencing before proceeding serially
75
75
  - keep `plan.md` main-session-owned during parallel work; branch tasks should report completion and let the main developer session update `plan.md` after merge
76
76
  - when `plan.md` marks mutually exclusive file ownership, use separate git worktrees for those sections rather than overlapping edits in one checkout
77
+ - by default, place planned worktrees under parent-root hidden `.ai/worktrees/` rather than as visible root-level sibling folders
77
78
  - keep shared files and final integration work in the main developer session unless the accepted plan explicitly delegates them
78
79
  - after any parallel fan-out, reconcile the work in the main developer session, verify the integrated result yourself, and only then mark the relevant `plan.md` items complete
79
80
  - when explicit agent selection is available for internal task fan-out, prefer the installed `developer` agent for implementation-capable branches so helper work stays aligned with the same engineering standard
@@ -133,9 +134,9 @@ During ordinary work, prefer:
133
134
 
134
135
  - fast local tooling setup is allowed during ordinary iteration, but it must not become a dependency of the final delivered runtime or broad test contract
135
136
 
136
- Do not run broad Docker, `./run_tests.sh`, browser E2E, Playwright, or full-suite commands during work from planning through the end of `P7`.
137
+ Do not run broad Docker, `./run_tests.sh`, browser E2E, Playwright, or full-suite commands during work from planning through the end of `P3`, and do not run them inside `P7`.
137
138
 
138
- Do not run `docker compose up --build`, `./run_tests.sh`, or any other Docker-based runtime/test command under any circumstances before `P9`, even if the repo documents it, the plan implies it, or the owner explicitly asks; the owner handles final Docker and `./run_tests.sh` verification after evaluation is complete.
139
+ Do not run `docker compose up --build`, `./run_tests.sh`, or any other Docker-based runtime/test command under any circumstances during planning, development, `P5`, or `P7`, even if the repo documents it, the plan implies it, or the owner explicitly asks; the owner handles the first broad Docker and `./run_tests.sh` verification in `P5` and may rerun it in `P9` for final confirmation.
139
140
 
140
141
  Selected-stack defaults:
141
142
 
@@ -14,61 +14,53 @@ Do not recreate the older owner-side clarification-options or clarification-prom
14
14
 
15
15
  ## Purpose
16
16
 
17
- Use this skill to drive the owner through the clarification procedure cleanly and consistently.
17
+ Use this skill to keep `P1` narrow and useful.
18
18
 
19
- Its job is to ensure the owner:
20
- - starts from the original prompt plus supporting stack/context notes
21
- - runs one bounded clarification worker using the packaged `clarifier-agent-prompt.md`
22
- - requires the clarification worker to output only `../docs/questions.md`
23
- - treats `questions.md` as the clarification record of material ambiguities and prompt-faithful defaults
24
- - reviews `questions.md` critically before planning begins
25
- - extracts the approved clarification package from `questions.md` for Phase 1 design, with any extra locked deltas kept short and explicit
19
+ Clarification should:
20
+ - start from the original prompt plus supporting stack/context notes
21
+ - run one bounded clarification worker using the packaged `clarifier-agent-prompt.md` verbatim
22
+ - require the worker to output only `../docs/questions.md`
23
+ - treat `questions.md` as the only clarification artifact planning depends on
24
+ - extract an approved clarification package from `questions.md` before `P2`
25
+ - make that approved package the complete unambiguous clarified-prompt baseline for planning
26
26
 
27
27
  ## Core Rule
28
28
 
29
- Clarification exists to resolve material ambiguity before design.
29
+ Clarification exists to resolve material product ambiguity before design.
30
30
 
31
- It must not:
32
- - become planning
33
- - become architecture design
34
- - become execution planning
35
- - narrow the prompt for convenience
36
- - fill `questions.md` with trivial tooling, Docker, or implementation-structure questions
31
+ It must not become planning, architecture design, execution planning, or convenience narrowing. Stack, tooling, Docker, and implementation-structure questions belong later unless they materially change the product contract.
37
32
 
38
33
  ## Procedure
39
34
 
40
- 1. Confirm the clarification inputs.
41
- - Keep the original product prompt as the primary source of truth.
35
+ 1. Confirm the inputs.
36
+ - Keep the original product prompt as the source of truth.
42
37
  - Treat supporting stack/context as supporting information unless it materially changes the product contract.
43
38
 
44
39
  2. Run the clarifier worker.
45
- - Use the packaged `clarifier-agent-prompt.md` as the worker prompt.
46
- - Require the worker to produce only `../docs/questions.md`.
40
+ - Use the packaged `clarifier-agent-prompt.md` verbatim.
41
+ - Only inject the original prompt and supporting stack/context notes into that packet; do not prepend or append a second owner-written clarification contract.
42
+ - Require only `../docs/questions.md` as output.
47
43
 
48
- 3. Review `questions.md` against the clarification bar.
44
+ 3. Review `questions.md` critically.
49
45
  - It should cover material ambiguity only.
50
- - It should preserve prompt faithfulness.
46
+ - It should preserve prompt faithfulness and avoid convenience narrowing.
51
47
  - Each entry should end with a decisive solution.
52
- - It should not contain planning, implementation structure, or convenience narrowing.
53
- - It should survive an explicit anti-degradation read against the original prompt: no dropped implied requirements, no softened enforcement, no collapsed workflows, and no operator/admin narrowing for convenience.
48
+ - It should not leak into planning or implementation structure.
49
+ - Reread it once against the original prompt and reject any degradation of implied scope, enforcement, workflow closure, or operator/admin behavior.
54
50
 
55
- 4. Correct weak clarification before planning.
56
- - If `questions.md` misses major ambiguity, contains filler, or drifts from the prompt, correct it before moving on.
57
- - Do not begin design or planning until `questions.md` is strong enough.
58
-
59
- 5. Build the approved clarification package.
60
- - Read `../docs/questions.md` and extract the accepted clarification list.
61
- - If a small number of additional locked deltas must accompany it, keep them short and explicit rather than inventing a second clarification artifact.
62
- - Use that accepted clarification package as the Phase 1 design baseline.
51
+ 4. Build the approved clarification package.
52
+ - Extract the accepted clarification list from `../docs/questions.md`.
53
+ - If a few extra locked deltas are still needed, keep them short and explicit.
54
+ - Use that package as the complete clarified-prompt baseline for Phase 1 design and later planning.
63
55
 
64
56
  ## Rejection Triggers
65
57
 
66
- Reject the clarification result if any of the following is true:
67
- - material ambiguity is still unresolved
58
+ Reject the clarification result if:
59
+ - material ambiguity remains unresolved
68
60
  - the clarifier narrowed scope for convenience
69
- - the clarification record degrades the original prompt by reducing implied scope, enforcement, actor responsibilities, workflow closure, or reporting/operational expectations
70
- - the questions are mostly about stack, tooling, Docker, or testing process
71
- - entries end in vague or deferred language instead of decisive solutions
61
+ - the clarification record degrades the original prompt
62
+ - the file is mostly stack, tooling, Docker, or testing-process questions
63
+ - entries are vague or deferred instead of decisive
72
64
  - planning or implementation structure leaked into `questions.md`
73
65
 
74
66
  ## Exit Condition
@@ -76,6 +68,7 @@ Reject the clarification result if any of the following is true:
76
68
  `P1 Clarification` is complete only when:
77
69
  - `../docs/questions.md` exists
78
70
  - it resolves the material prompt ambiguities with prompt-faithful defaults
79
- - it has been read once more against the original prompt and does not materially degrade it
71
+ - it has survived one explicit reread against the original prompt
80
72
  - the owner has extracted the approved clarification package from it
73
+ - that package is complete and unambiguous enough to act as the clarified prompt for planning
81
74
  - planning can begin without inventing missing product meaning
@@ -43,6 +43,7 @@ Before any Claude-backed developer work continues:
43
43
 
44
44
  - determine whether the intended developer lane already has a recoverable live Claude session
45
45
  - if the intended lane exists and its bridge state is recoverable, recover that same session and continue there
46
+ - if the intended lane's tmux process died but bridge state still has a recoverable Claude `session_id`, relaunch that same lane by resuming the existing Claude session instead of starting a fresh Claude conversation
46
47
  - if the current workflow boundary requires Claude developer work and no recoverable session is present yet, launch the necessary Claude lane first instead of treating the missing session as a handoff blocker
47
48
  - do not send substantive work until the live lane exists, bridge registration has captured the Claude `session_id`, owner metadata and Beads comments have been synced, and the first session-start message for that lane has completed
48
49
  - a missing Claude session during adoption, conservative lifecycle-state repair, or other first-entry work is not itself an error; it means the owner must establish the correct live lane before continuing
@@ -79,6 +80,8 @@ node ~/slopmachine/utils/claude_live_status.mjs --runtime-dir ../.ai/claude-live
79
80
  node ~/slopmachine/utils/claude_live_stop.mjs --runtime-dir ../.ai/claude-live/develop-1
80
81
  ```
81
82
 
83
+ - the stop helper must only kill a tmux session when bridge state proves it belongs to the current task runtime; if ownership is not proven or kill fails, leave the tmux session alone instead of touching unrelated tmux instances
84
+
82
85
  If you need argument help, these scripts should support `--help`; do not guess flag shapes when an exact command pattern is already available here.
83
86
 
84
87
  ## Model selection rule
@@ -146,7 +149,7 @@ For substantive live-lane prompts, write the message in natural engineering lang
146
149
  - the important shortcuts that are not acceptable
147
150
  - where Claude should stop
148
151
  - the exact changed-files and verification summary expected back
149
- - do not ask Claude to run Docker-based runtime/test commands under any circumstances during planning, development, `P5`, or `P7`; Docker execution is owner-only after `P7`
152
+ - do not ask Claude to run Docker-based runtime/test commands under any circumstances during planning, development, `P5`, or `P7`; Docker execution is owner-only, first in `P5` and then only as a final confirmation rerun in `P9` when needed
150
153
 
151
154
  When the message intentionally uses internal parallel fan-out, also cover naturally:
152
155