theslopmachine 1.0.3 → 1.0.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 (70) hide show
  1. package/MANUAL.md +18 -18
  2. package/README.md +60 -65
  3. package/RELEASE.md +4 -4
  4. package/assets/agents/developer.md +68 -235
  5. package/assets/agents/slopmachine-claude.md +82 -553
  6. package/assets/agents/slopmachine.md +60 -499
  7. package/assets/claude/agents/developer.md +51 -302
  8. package/assets/claude/skills/integration-fanin/SKILL.md +15 -114
  9. package/assets/claude/skills/module-handoff/SKILL.md +15 -87
  10. package/assets/claude/skills/module-lane-execution/SKILL.md +15 -118
  11. package/assets/claude/skills/shared-surface-control/SKILL.md +15 -91
  12. package/assets/skills/beads-operations/SKILL.md +2 -8
  13. package/assets/skills/clarification-gate/SKILL.md +7 -8
  14. package/assets/skills/claude-worker-management/SKILL.md +18 -584
  15. package/assets/skills/developer-session-lifecycle/SKILL.md +19 -268
  16. package/assets/skills/development-guidance/SKILL.md +23 -184
  17. package/assets/skills/evaluation-triage/SKILL.md +24 -24
  18. package/assets/skills/final-evaluation-orchestration/SKILL.md +29 -318
  19. package/assets/skills/integrated-verification/SKILL.md +25 -137
  20. package/assets/skills/p8-readiness-reconciliation/SKILL.md +31 -87
  21. package/assets/skills/planning-gate/SKILL.md +23 -634
  22. package/assets/skills/planning-guidance/SKILL.md +45 -157
  23. package/assets/skills/report-output-discipline/SKILL.md +1 -1
  24. package/assets/skills/retrospective-analysis/SKILL.md +2 -2
  25. package/assets/skills/scaffold-guidance/SKILL.md +21 -178
  26. package/assets/skills/submission-packaging/SKILL.md +29 -227
  27. package/assets/skills/verification-gates/SKILL.md +21 -259
  28. package/assets/slopmachine/backend-evaluation-prompt.md +211 -165
  29. package/assets/slopmachine/clarification-faithfulness-review-prompt.md +2 -2
  30. package/assets/slopmachine/clarifier-agent-prompt.md +8 -8
  31. package/assets/slopmachine/exact-readme-template.md +5 -7
  32. package/assets/slopmachine/frontend-evaluation-prompt.md +221 -179
  33. package/assets/slopmachine/owner-verification-checklist.md +29 -270
  34. package/assets/slopmachine/phase-1-design-prompt.md +41 -42
  35. package/assets/slopmachine/phase-1-design-template.md +12 -12
  36. package/assets/slopmachine/phase-2-execution-planning-prompt.md +48 -48
  37. package/assets/slopmachine/phase-2-plan-template.md +37 -37
  38. package/assets/slopmachine/scaffold-playbooks/selection-matrix.md +5 -5
  39. package/assets/slopmachine/scaffold-playbooks/shared-contract.md +8 -6
  40. package/assets/slopmachine/scaffold-playbooks/stack-go-gin-templ-postgres.md +3 -3
  41. package/assets/slopmachine/scaffold-playbooks/stack-vue-koa-mysql.md +1 -1
  42. package/assets/slopmachine/scaffold-playbooks/tech-backend-gin-templ.md +1 -1
  43. package/assets/slopmachine/templates/AGENTS.md +43 -180
  44. package/assets/slopmachine/templates/CLAUDE.md +43 -179
  45. package/assets/slopmachine/test-coverage-prompt.md +4 -4
  46. package/assets/slopmachine/utils/README.md +242 -0
  47. package/assets/slopmachine/utils/claude_create_session.mjs +2 -1
  48. package/assets/slopmachine/utils/claude_export_session.mjs +2 -1
  49. package/assets/slopmachine/utils/claude_live_common.mjs +23 -10
  50. package/assets/slopmachine/utils/claude_live_launch.mjs +4 -3
  51. package/assets/slopmachine/utils/claude_live_turn.mjs +2 -2
  52. package/assets/slopmachine/utils/claude_resume_session.mjs +2 -1
  53. package/assets/slopmachine/utils/claude_wait_for_rate_limit_reset.sh +0 -0
  54. package/assets/slopmachine/utils/claude_worker_common.mjs +36 -5
  55. package/assets/slopmachine/utils/convert_ai_session.py +85 -85
  56. package/assets/slopmachine/utils/convert_exported_ai_session.mjs +5 -1
  57. package/assets/slopmachine/utils/export_ai_session.mjs +3 -2
  58. package/assets/slopmachine/utils/package_claude_session.mjs +15 -11
  59. package/assets/slopmachine/utils/prepare_evaluation_prompt.mjs +18 -6
  60. package/assets/slopmachine/utils/prepare_evaluation_send_packet.mjs +34 -7
  61. package/assets/slopmachine/utils/prepare_strict_audit_workspace.mjs +10 -8
  62. package/package.json +9 -3
  63. package/src/cli.js +4 -4
  64. package/src/constants.js +30 -31
  65. package/src/init.js +109 -121
  66. package/src/install.js +32 -4
  67. package/src/send-data.js +47 -43
  68. package/src/utils.js +1 -1
  69. package/tsconfig.json +24 -0
  70. package/assets/slopmachine/templates/plan.md +0 -966
package/MANUAL.md CHANGED
@@ -39,7 +39,7 @@ Inside a new or empty project directory, run:
39
39
  slopmachine init
40
40
  ```
41
41
 
42
- Or to open OpenCode immediately in `repo/` after bootstrap:
42
+ Or to open OpenCode immediately in `task/` after bootstrap:
43
43
 
44
44
  ```bash
45
45
  slopmachine init -o
@@ -47,32 +47,32 @@ slopmachine init -o
47
47
 
48
48
  ## What `init` does
49
49
 
50
- - creates `.ai/` workflow files plus `.ai/artifacts`
51
- - creates hidden `.ai/worktrees/` as the default location for parallel git worktrees
52
- - initializes git when needed
53
- - updates `.gitignore`
50
+ - creates workflow-root `.ai/` workflow files plus `.ai/artifacts`
51
+ - creates hidden workflow-root `.ai/worktrees/` as the default location for parallel git worktrees
52
+ - creates `task/` and initializes git inside `task/`
53
+ - updates `task/.gitignore`
54
54
  - bootstraps beads_rust (`br`)
55
- - creates parent-root `docs/`, `.tmp/`, `metadata.json`, and root `.beads/`
56
- - creates `repo/`
57
- - copies the packaged default repo rulebook into `repo/AGENTS.md`
58
- - copies the packaged Claude repo rulebook into `repo/CLAUDE.md`
59
- - seeds `repo/README.md`, `repo/plan.md`, and `repo/.claude/settings.json`
60
- - seeds `.ai/startup-context.md` plus the parent-root planning docs under `docs/`
61
- - later, when `P5` closes, the workflow preserves the final truthful execution record in `docs/plan.md` and removes `repo/plan.md` before evaluation begins
55
+ - creates workflow-root `.beads/` outside `task/`
56
+ - creates task-root `docs/`, `.tmp/`, `metadata.json`, and `repo/`
57
+ - copies the packaged default rulebook into `task/AGENTS.md`
58
+ - copies the packaged Claude rulebook into `task/CLAUDE.md`
59
+ - seeds `task/repo/README.md`, task-visible product docs, and `task/.claude/settings.json`
60
+ - seeds `.ai/startup-context.md` plus owner-private planning files under `.ai/`
61
+ - keeps execution planning owner-private in `.ai/plan.md`
62
62
  - creates the initial git commit so the workspace starts with a clean tree
63
- - optionally opens `opencode` in `repo/`
64
- - parallel worktrees should stay under hidden parent-root `.ai/worktrees/` so the visible workspace root stays clean
63
+ - optionally opens `opencode` in `task/`
64
+ - parallel worktrees should stay under hidden workflow-root `.ai/worktrees/` so the visible task root stays clean
65
65
 
66
66
  ## Rough workflow
67
67
 
68
68
  1. Intake and setup
69
69
  2. Clarification
70
70
  3. Planning
71
- 4. Development, starting with the scaffold step inside `plan.md`
71
+ 4. Development, starting with scaffold and then module-by-module owner prompts
72
72
  5. Rough integrated verification and hardening: repo coherence and small owner-side fixes only, with no Docker execution
73
73
  6. Evaluation and fix verification, including the final coverage and README audit inside `P7`
74
74
  7. Final readiness decision
75
- 8. Submission packaging, including the owner-only Docker and `./run_tests.sh` check
75
+ 8. Submission packaging, including the owner-only Docker and `./repo/run_tests.sh` check
76
76
  9. Retrospective
77
77
 
78
78
  The intended fast path is:
@@ -82,7 +82,7 @@ The intended fast path is:
82
82
  - execute the plan end to end
83
83
  - make the repo coherent
84
84
  - proceed through evaluation without Docker execution
85
- - after evaluation is complete, have the owner run and fix `docker compose up --build` and `./run_tests.sh` before submission closes
85
+ - after evaluation is complete, have the owner run and fix `docker compose up --build` and `./repo/run_tests.sh` before submission closes
86
86
 
87
87
  ## Important notes
88
88
 
@@ -92,5 +92,5 @@ The intended fast path is:
92
92
  - packaging and send-data depend on archive support: `zip` on non-Windows systems or PowerShell on Windows.
93
93
  - The workflow-owner agents use mandatory skills for specific phases; skipping them is considered a workflow failure.
94
94
  - `slopmachine` is the lighter current engine: it keeps the owner prompt smaller, uses more specialized skills, and keeps one active developer session at a time while preserving rollover history when new sessions are intentionally started.
95
- - the scaffold playbook inventory now covers the main repeated families used in current tasks: React/Vite, Vue/Vite, Angular, FastAPI, Spring Boot, Django, Laravel, Livewire, Go/Chi, Android Java Views, Android Kotlin Compose, Electron/Vite, Tauri, Expo iOS-on-Linux, plus honest Linux partial-proof native Swift and Objective-C iOS playbooks.
95
+ - the scaffold playbook inventory covers current packaged type, technology, and composed-stack playbooks under `~/slopmachine/scaffold-playbooks/`; unsupported stacks fall back to the generic scaffold path instead of a nonexistent named playbook.
96
96
  - Submission packaging collects the final docs, accepted evaluation reports, cleaned OpenCode session exports or one Claude session zip bundle containing only the tracked relevant Claude sessions, and the cleaned repo into the required final structure.
package/README.md CHANGED
@@ -85,29 +85,24 @@ Notes:
85
85
 
86
86
  Current scaffold inventory includes:
87
87
 
88
- - shared Docker/runtime/test contract
89
- - generic unknown-tech scaffold guide
90
- - frontend, backend, database, platform, and overlay family matrices
91
- - experimentally verified concrete playbooks for:
92
- - React/Vite
93
- - Vue/Vite
94
- - Angular
95
- - FastAPI
96
- - Spring Boot
97
- - Django
98
- - Laravel
99
- - Livewire
100
- - Go/Chi
101
- - Android Java Views
102
- - Android Kotlin Compose
103
- - Electron/Vite desktop
104
- - Tauri desktop
105
- - Expo iOS-on-Linux
106
- - experimentally verified Linux partial-proof playbooks for:
107
- - native Swift iOS
108
- - native Objective-C iOS
109
-
110
- These playbooks are baseline-only references. The redesigned workflow uses them to define the scaffold step at the start of development inside `plan.md` before the single broad implementation run continues.
88
+ - shared runtime/test contract
89
+ - stack selection matrix
90
+ - type playbooks for web SPA, API service, database, background jobs, offline/local-first, Android, and desktop work
91
+ - technology playbooks for React, Vue, Go, Koa, Laravel, Gin/Templ, MySQL, Postgres, Room, LocalDB, and Rust workspaces
92
+ - composed stack playbooks for browser-only offline SPA, Vue/Koa/MySQL, Vue/Laravel/MySQL, React/Go/Postgres, Go/Gin/Templ/Postgres, Rust fullstack workspace, Android Room offline, WinForms LocalDB, and generic fallback work
93
+
94
+ These playbooks are baseline-only references. The workflow uses them to guide the scaffold step from owner-private planning before module-by-module implementation continues.
95
+
96
+ ## Development Checks
97
+
98
+ Run these before packaging changes to the CLI or installed tools:
99
+
100
+ ```bash
101
+ npm run typecheck
102
+ npm run check
103
+ ```
104
+
105
+ `npm run typecheck` uses TypeScript `checkJs` over the package CLI source and shipped `assets/slopmachine` JavaScript utilities without adding a build step. The utility reference lives at `assets/slopmachine/utils/README.md` and documents each installed helper's arguments and output contract.
111
106
 
112
107
  ### `slopmachine init`
113
108
 
@@ -139,45 +134,44 @@ slopmachine init --continue-from P3
139
134
 
140
135
  What it creates:
141
136
 
142
- - `repo/`
143
- - `docs/`
144
- - `.tmp/`
145
- - `metadata.json`
146
- - `.ai/metadata.json`
147
- - `.ai/startup-context.md`
148
- - hidden `.ai/worktrees/` for parallel git worktrees when used
149
- - root `.beads/`
150
- - `repo/AGENTS.md`
151
- - `repo/CLAUDE.md`
152
- - `repo/plan.md`
153
- - `repo/.claude/settings.json`
154
- - `repo/README.md`
155
- - `docs/questions.md`
156
- - `docs/design.md`
157
- - `docs/api-spec.md`
158
- - `docs/plan.md`
159
- - `docs/test-coverage.md`
137
+ - workflow root `.ai/metadata.json`
138
+ - workflow root `.ai/startup-context.md`
139
+ - hidden workflow root `.ai/worktrees/` for parallel git worktrees when used
140
+ - workflow root `.beads/`
141
+ - `task/`
142
+ - `task/.git/`
143
+ - `task/AGENTS.md`
144
+ - `task/CLAUDE.md`
145
+ - `task/.claude/settings.json`
146
+ - `task/repo/`
147
+ - `task/repo/README.md`
148
+ - `task/docs/questions.md`
149
+ - `task/docs/design.md`
150
+ - `task/docs/api-spec.md`
151
+ - `task/.tmp/`
152
+ - `task/metadata.json`
160
153
 
161
154
  Important details:
162
155
 
163
- - `run_id` is created in `.ai/metadata.json`
164
- - the workspace root is the parent directory containing `repo/`
165
- - parent-root `.tmp/` is the audit and fix-check artifact directory used during `P7`
166
- - parent-root `.tmp/` also holds `test_coverage_and_readme_audit_report.md` after the final post-bugfix audit
167
- - parent-root `metadata.json` is strict project metadata only and must contain exactly these keys: `prompt`, `project_type`, `frontend_language`, `backend_language`, `database`, `frontend_framework`, `backend_framework`
156
+ - `run_id` is created in workflow root `.ai/metadata.json`
157
+ - the operational session root is `task/`
158
+ - product code lives under `task/repo/`
159
+ - task-root `.tmp/` is the audit and fix-check artifact directory used during `P7`
160
+ - task-root `.tmp/` also holds `test_coverage_and_readme_audit_report.md` after the final post-bugfix audit
161
+ - task-root `metadata.json` is strict project metadata only and must contain exactly these keys: `prompt`, `project_type`, `frontend_language`, `backend_language`, `database`, `frontend_framework`, `backend_framework`
168
162
  - `project_type` should use only `fullstack`, `backend`, `android`, `ios`, `desktop`, or `web` when known
169
- - Beads lives in the workspace root, not inside `repo/`
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
172
- - when `P5` completes, the workflow moves `repo/plan.md` to parent-root `docs/plan.md`; packaging later validates that `repo/plan.md`, `repo/AGENTS.md`, and `repo/CLAUDE.md` are absent from the delivered `repo/`
173
- - after non-`-o` bootstrap, the command prints the exact `cd repo` next step so you can continue immediately
174
- - `--adopt` moves the current project files into `repo/`, preserves root workflow state in the parent workspace, and skips the automatic bootstrap commit
163
+ - Beads lives in the workflow root outside `task/`
164
+ - `task/.claude/settings.json` seeds Claude Code to use the custom `developer` agent by default for that task root
165
+ - planned parallel git worktrees should live under hidden workflow root `.ai/worktrees/` by default so visible task-root folders do not clutter the delivery structure
166
+ - owner-private execution planning lives under workflow root `.ai/plan.md` and is translated into normal developer prompts
167
+ - after non-`-o` bootstrap, the command prints the exact `cd task` next step so you can continue immediately
168
+ - `--adopt` moves the current project files into `task/repo/`, preserves workflow state outside `task/`, and skips the automatic bootstrap commit
175
169
  - `--continue-from <PX>` is a smoother alias for existing-project bootstrap; it implies adoption mode and seeds the requested start phase in one step
176
- - if `--continue-from <PX>` is run while your current working directory is already the real project `repo/`, or if the explicit target path itself points at that `repo/` directory, SlopMachine automatically treats `..` as the workspace root and writes the workflow state there instead of creating `repo/repo`
170
+ - if `--continue-from <PX>` is run while your current working directory is already `task/` or `task/repo/`, SlopMachine automatically resolves the surrounding workflow root instead of creating nested task/repo directories
177
171
  - when a later start phase is seeded for adoption or recovery, the Beads workflow phases before that requested phase are created and immediately marked completed so tracker state matches the seeded entry point
178
172
  - in the `slopmachine-claude` path, if adopted or resumed later-phase work has no recoverable tracked Claude developer session yet, the owner must launch and orient the needed Claude lane first and only then continue the substantive work in that same session
179
173
  - `--phase <PX>` seeds the initial `current_phase` for adoption/recovery bootstrap; the owner should still fall back if the real repo evidence does not support that later phase
180
- - `repo/plan.md` is seeded at bootstrap and becomes the definitive repo-local execution checklist through planning, development, and `P5`; after `P5`, the preserved reference copy is `docs/plan.md`
174
+ - `task/docs/plan.md` and `task/docs/test-coverage.md` are not seeded or required; planning and coverage notes stay owner-private under workflow root `.ai/`
181
175
 
182
176
  ### `slopmachine set-token`
183
177
 
@@ -222,34 +216,35 @@ slopmachine send-data ses_abc123 --endpoint "https://<project-ref>.supabase.co/f
222
216
 
223
217
  Where to run it:
224
218
 
225
- - preferred: workspace root
226
- - also supported: `repo/`
219
+ - preferred: `task/`
220
+ - also supported: workflow root containing `task/`
221
+ - also supported: `task/repo/`
227
222
 
228
- If run from `repo/`, the command resolves the parent workspace root automatically.
223
+ If run from `task/repo/`, the command resolves the surrounding task and workflow roots automatically.
229
224
 
230
225
  What it exports live:
231
226
 
232
227
  - owner session from the positional `owner-session-id`
233
- - developer sessions from `.ai/metadata.json`
234
- - `beads-export.json` from root `.beads/`
228
+ - developer sessions from workflow-root `.ai/metadata.json`
229
+ - `beads-export.json` from workflow-root `.beads/`
235
230
 
236
231
  What it includes when present:
237
232
 
238
- - `.tmp/`
233
+ - task-root `.tmp/`
239
234
  - `retrospective-<run_id>.md`
240
235
  - `improvement-actions-<run_id>.md`
241
236
  - `test_coverage_and_readme_audit_report.md`
242
237
 
243
238
  What it always includes:
244
239
 
245
- - `metadata.json`
240
+ - task-root `metadata.json`
246
241
  - `ai-metadata.json`
247
242
  - `manifest.json`
248
243
 
249
244
  Fail-fast conditions:
250
245
 
251
246
  - missing owner session id argument
252
- - missing `.ai/metadata.json`
247
+ - missing workflow-root `.ai/metadata.json`
253
248
  - missing `run_id`
254
249
  - missing tracked developer session ids
255
250
  - owner session export failure
@@ -257,7 +252,7 @@ Fail-fast conditions:
257
252
 
258
253
  Warn-only conditions:
259
254
 
260
- - missing `.tmp/`
255
+ - missing task-root `.tmp/`
261
256
  - missing retrospective files
262
257
 
263
258
  Output behavior:
@@ -343,5 +338,5 @@ slopmachine send-data <owner-session-id> --dry-run --endpoint "https://<project-
343
338
 
344
339
  - the upload token is machine-level state and is not stored in the repo
345
340
  - the owner session id is currently supplied manually to `send-data`
346
- - developer session ids come from `.ai/metadata.json`
347
- - broad workflow files and session exports live at workspace root, not inside `repo/`
341
+ - developer session ids come from workflow-root `.ai/metadata.json`
342
+ - broad workflow files and session exports live at workflow root, outside `task/`
package/RELEASE.md CHANGED
@@ -52,12 +52,12 @@ printf 'console.log("hello")\n' > .tmp-project-continue/index.js
52
52
  SLOPMACHINE_HOME="$(pwd)/.tmp-home" node ./bin/slopmachine.js init --continue-from P3 .tmp-project-continue
53
53
  ```
54
54
 
55
- 7. Test `repo/` auto-wrap for `--continue-from`:
55
+ 7. Test `task/repo/` auto-wrap for `--continue-from`:
56
56
 
57
57
  ```bash
58
- mkdir -p .tmp-project-continue-parent/repo
59
- printf 'console.log("hello")\n' > .tmp-project-continue-parent/repo/index.js
60
- (cd .tmp-project-continue-parent/repo && SLOPMACHINE_HOME="$(pwd)/../../.tmp-home" node ../../../bin/slopmachine.js init --continue-from P3)
58
+ mkdir -p .tmp-project-continue-parent/task/repo
59
+ printf 'console.log("hello")\n' > .tmp-project-continue-parent/task/repo/index.js
60
+ (cd .tmp-project-continue-parent/task/repo && SLOPMACHINE_HOME="$(pwd)/../../../.tmp-home" node ../../../../bin/slopmachine.js init --continue-from P3)
61
61
  ```
62
62
 
63
63
  Note: