theslopmachine 0.4.3 → 0.4.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.
package/MANUAL.md CHANGED
@@ -63,5 +63,5 @@ slopmachine init -o
63
63
 
64
64
  - theslopmachine depends on OpenCode, beads_rust (`br`), git, python3, and Docker being available.
65
65
  - The workflow-owner agents use mandatory skills for specific phases; skipping them is considered a workflow failure.
66
- - `slopmachine` is the lighter current engine: it keeps the owner prompt smaller, uses more specialized skills, and uses up to three bounded developer sessions instead of one long-lived session.
67
- - Submission packaging collects the final docs, reports, screenshots, session export, trajectory, and cleaned repo into the required final structure.
66
+ - `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.
67
+ - Submission packaging collects the final docs, accepted evaluation reports, screenshots, cleaned session exports, converted session traces, and cleaned repo into the required final structure.
package/README.md CHANGED
@@ -1,59 +1,32 @@
1
1
  # theslopmachine
2
2
 
3
- Installer package for the theslopmachine workflow owner, developer agents, required skills, templates, and local support files.
3
+ `theslopmachine` installs the SlopMachine owner/developer workflow into OpenCode, sets up the required support files on your machine, and bootstraps new project workspaces.
4
4
 
5
- ## What This Package Installs
5
+ **Quickstart**
6
6
 
7
- `slopmachine setup` installs the current workflow assets.
7
+ This is the full machine-to-project flow:
8
8
 
9
- That includes:
10
-
11
- - owner agents under `~/.config/opencode/agents/`
12
- - required skills under `~/.agents/skills/`
13
- - packaged workflow files under `~/slopmachine/`
14
- - repo templates, evaluation prompts, bootstrap helpers, and session export utilities
15
-
16
- The canonical package documents in `~/slopmachine/` are:
17
-
18
- - `backend-evaluation-prompt.md`
19
- - `frontend-evaluation-prompt.md`
20
- - `document-completeness.md`
21
- - `engineering-results.md`
22
- - `implementation-comparison.md`
23
- - `quality-document.md`
24
-
25
- Usage split:
26
-
27
- - the two evaluation prompt files are used exactly in evaluation runs
28
- - the other four files are used in the submission packaging phase
29
-
30
- Installed agent set:
31
-
32
- - `slopmachine.md`
33
- - `developer.md`
34
-
35
- The current engine is the lighter workflow line:
36
-
37
- - smaller always-loaded owner shell
38
- - smaller developer rulebook
39
- - richer phase-specific skills loaded when needed
40
- - bounded 2-session developer-session model
41
- - `beads_rust` bootstrap path
9
+ 1. install the package
10
+ 2. run `slopmachine setup`
11
+ 3. add MCP API keys if prompted
12
+ 4. log into Codex with OpenCode
13
+ 5. initialize a project workspace
14
+ 6. enter `repo/`
15
+ 7. start OpenCode and choose the `slopmachine` agent
42
16
 
43
17
  ## Requirements
44
18
 
45
19
  - Node.js 18+
46
- - OpenCode installed and usable on the machine
47
- - `br` (`beads_rust`) will be installed or verified during setup
48
- - git available in the shell
20
+ - `git`
21
+ - Docker running on the machine
22
+ - `curl` on Unix-like systems for automatic `br` install
49
23
 
50
- ## Commands
24
+ `slopmachine setup` can install or verify:
51
25
 
52
- - `slopmachine setup` - configures agents, files, scripts, and beads_rust (`br`)
53
- - `slopmachine init` - sets up a project
54
- - `slopmachine init -o` to bootstrap the project and immediately open OpenCode inside `repo/`
26
+ - `opencode`
27
+ - `br` (`beads_rust`)
55
28
 
56
- ## Installation
29
+ ## 1. Install The Package
57
30
 
58
31
  From this package directory:
59
32
 
@@ -63,206 +36,197 @@ npm run check
63
36
  npm pack
64
37
  ```
65
38
 
66
- This produces a tarball such as:
39
+ That produces a tarball such as:
67
40
 
68
41
  ```bash
69
- theslopmachine-0.4.3.tgz
42
+ theslopmachine-0.4.5.tgz
70
43
  ```
71
44
 
72
- You can then install it globally with:
45
+ Install it globally:
73
46
 
74
47
  ```bash
75
- npm install -g ./theslopmachine-0.4.3.tgz
48
+ npm install -g ./theslopmachine-0.4.5.tgz
76
49
  ```
77
50
 
78
- For local development instead of global install:
51
+ For local package development instead:
79
52
 
80
53
  ```bash
81
54
  npm link
82
55
  ```
83
56
 
84
- ## Initial Setup
57
+ ## 2. Run Setup
85
58
 
86
- Run once per machine or whenever you want to refresh the packaged assets:
59
+ Run this once per machine, or rerun it any time you want to refresh packaged assets:
87
60
 
88
61
  ```bash
89
62
  slopmachine setup
90
63
  ```
91
64
 
92
- What setup does:
65
+ `setup` does the following:
93
66
 
94
- - installs or refreshes the packaged agents
95
- - installs or refreshes the packaged skills
96
- - installs packaged workflow files into `~/slopmachine/`
97
- - merges required OpenCode plugin/MCP configuration
98
- - installs or verifies `br` (`beads_rust`)
67
+ - installs or verifies `git`, `python3`, `opencode`, `br`, and Docker availability
68
+ - installs the packaged OpenCode agents into `~/.config/opencode/agents/`
69
+ - installs the packaged skills into `~/.agents/skills/`
70
+ - installs workflow support files into `~/slopmachine/`
71
+ - updates `~/.config/opencode/opencode.json`
72
+ - prompts for missing Context7 and Exa MCP API keys
99
73
 
100
- ## Project Bootstrap
74
+ If `setup` installs `opencode` for the first time, open a fresh terminal before running `opencode` commands.
101
75
 
102
- Create a new project root:
76
+ ## 3. Get MCP API Keys
103
77
 
104
- ```bash
105
- mkdir my-project
106
- cd my-project
107
- slopmachine init
108
- ```
78
+ During `slopmachine setup`, you may be prompted for:
109
79
 
110
- This creates the expected structure, including:
80
+ - Context7: `https://context7.com`
81
+ - Exa: `https://exa.ai`
111
82
 
112
- - `repo/` as the working codebase directory
113
- - parent-root workflow files such as `metadata.json`
114
- - parent-root `docs/` and `sessions/`
115
- - repo-local `AGENTS.md`
116
- - initialized `beads_rust` state
117
- - an initial git checkpoint
118
-
119
- To bootstrap and open OpenCode directly in `repo/`:
83
+ You can leave either blank and add it later by editing:
120
84
 
121
85
  ```bash
122
- slopmachine init -o
86
+ ~/.config/opencode/opencode.json
123
87
  ```
124
88
 
125
- ## Recommended Operation
126
-
127
- After init:
128
-
129
- 1. open OpenCode in `repo/`
130
- 2. choose the `slopmachine` owner agent
131
- 3. let the owner run the lifecycle using the packaged skills
132
- 4. let the owner delegate implementation work to `developer`
89
+ If `context7` or `exa` is already configured in `opencode.json`, `setup` leaves the existing entries in place.
133
90
 
134
- The expected high-level lifecycle is:
91
+ ## 4. Log Into Codex With OpenCode
135
92
 
136
- 1. clarification
137
- 2. planning
138
- 3. scaffold
139
- 4. development
140
- 5. integrated verification
141
- 6. hardening
142
- 7. evaluation and triage
143
- 8. final human decision
144
- 9. remediation when needed
145
- 10. submission packaging
146
- 11. retrospective
93
+ Authenticate OpenCode against Codex:
147
94
 
148
- ## How It Is Intended To Operate
149
-
150
- `slopmachine` is designed to keep the owner prompt light while moving the important operational detail into loaded skills.
95
+ ```bash
96
+ opencode auth login -p codex
97
+ ```
151
98
 
152
- That means:
99
+ Optional check:
153
100
 
154
- - the owner shell stays small
155
- - planning, scaffold, development, verification, hardening, remediation, and packaging load detailed skills only when needed
156
- - early and late phases do not carry each other's full instruction payloads all the time
101
+ ```bash
102
+ opencode auth list
103
+ ```
157
104
 
158
- The current workflow also expects:
105
+ ## 5. Initialize A Project Workspace
159
106
 
160
- - targeted reads over broad rereads
161
- - local and narrow verification during ordinary iteration
162
- - broad selected-stack owner-run gates used sparingly
163
- - no `.env` files in the repo
164
- - real integration evidence, not mocked API integration tests
107
+ Create a new workspace directory and bootstrap it:
165
108
 
166
- Every bootstrapped project should expose:
109
+ ```bash
110
+ mkdir my-project
111
+ cd my-project
112
+ slopmachine init
113
+ ```
167
114
 
168
- - one primary documented runtime command
169
- - one primary documented broad test command: `./run_tests.sh`
115
+ This creates:
170
116
 
171
- Follow the original prompt and the existing repository first. Use the examples below only when they do not already specify the platform or stack.
117
+ - `repo/` for the actual codebase work
118
+ - parent-level workflow files such as `metadata.json` and `.ai/metadata.json`
119
+ - parent-level `docs/` and `sessions/`
120
+ - `repo/AGENTS.md`
121
+ - initialized `br` state
122
+ - an initial git commit
172
123
 
173
- Examples:
124
+ If you want `init` to open OpenCode automatically in `repo/`, use:
174
125
 
175
- - web backend/fullstack: `docker compose up --build` and `./run_tests.sh`
176
- - mobile or desktop when Docker runtime is not the direct run path: `./run_app.sh` and `./run_tests.sh`
126
+ ```bash
127
+ slopmachine init -o
128
+ ```
177
129
 
178
- ## What It Does Well
130
+ ## 6. Enter `repo/`
179
131
 
180
- - keeps the owner shell strict without carrying a giant monolith prompt
181
- - loads detailed phase and activity skills only when they are actually needed
182
- - uses a bounded 2-session model to reduce long-run context drag
183
- - pushes prompt-fit, security, testing, and engineering-quality concerns earlier into planning and hardening
184
- - standardizes runtime and broad-test expectations with `docker compose up --build` or `./run_app.sh` plus `./run_tests.sh`
185
- - preserves strong packaging/report discipline with canonical files in `~/slopmachine/`
132
+ If you used plain `slopmachine init`, move into the working repository:
186
133
 
187
- ## Installed Assets
134
+ ```bash
135
+ cd repo
136
+ ```
188
137
 
189
- The package installs:
138
+ ## 7. Start OpenCode
190
139
 
191
- - owner and developer agents
192
- - phase and activity skills
193
- - canonical evaluation and report templates in `~/slopmachine/`
194
- - workflow bootstrap helper
195
- - repo rulebook template
196
- - session export utilities
140
+ Start OpenCode inside `repo/`:
197
141
 
198
- Canonical files in `~/slopmachine/`:
142
+ ```bash
143
+ opencode
144
+ ```
199
145
 
200
- - `backend-evaluation-prompt.md`
201
- - `frontend-evaluation-prompt.md`
202
- - `document-completeness.md`
203
- - `engineering-results.md`
204
- - `implementation-comparison.md`
205
- - `quality-document.md`
206
- - `retrospectives/`
146
+ Then select the `slopmachine` agent and begin the workflow.
207
147
 
208
- ## Dependencies And Assumptions
148
+ The normal operating split is:
209
149
 
210
- - Node.js 18+ is required for the package CLI itself
211
- - OpenCode must already be available on the machine
212
- - git must be available
213
- - `beads_rust` / `br` is installed or verified by `slopmachine setup`
150
+ - `slopmachine` is the owner/orchestrator
151
+ - `developer` is the implementation worker
214
152
 
215
- Generated projects follow the original prompt and the existing repository first.
153
+ ## Configured Items
216
154
 
217
- Default runtime/test wrapper expectations:
155
+ These are the main files and directories `setup` configures.
218
156
 
219
- - Dockerized web backend/fullstack: `docker compose up --build` and `./run_tests.sh`
220
- - non-web or non-Docker runtime cases: `./run_app.sh` and `./run_tests.sh`
157
+ ### OpenCode Agents
221
158
 
222
- `./run_tests.sh` is always the broad test wrapper.
159
+ - `~/.config/opencode/agents/slopmachine.md`
160
+ - `~/.config/opencode/agents/developer.md`
223
161
 
224
- ## Command Summary
162
+ ### OpenCode Skills
225
163
 
226
- Package CLI:
164
+ - `~/.agents/skills/clarification-gate/`
165
+ - `~/.agents/skills/developer-session-lifecycle/`
166
+ - `~/.agents/skills/session-rollover/`
167
+ - `~/.agents/skills/final-evaluation-orchestration/`
168
+ - `~/.agents/skills/beads-operations/`
169
+ - `~/.agents/skills/planning-guidance/`
170
+ - `~/.agents/skills/planning-gate/`
171
+ - `~/.agents/skills/scaffold-guidance/`
172
+ - `~/.agents/skills/development-guidance/`
173
+ - `~/.agents/skills/verification-gates/`
174
+ - `~/.agents/skills/integrated-verification/`
175
+ - `~/.agents/skills/hardening-gate/`
176
+ - `~/.agents/skills/evaluation-triage/`
177
+ - `~/.agents/skills/remediation-guidance/`
178
+ - `~/.agents/skills/submission-packaging/`
179
+ - `~/.agents/skills/retrospective-analysis/`
180
+ - `~/.agents/skills/owner-evidence-discipline/`
181
+ - `~/.agents/skills/report-output-discipline/`
182
+ - `~/.agents/skills/frontend-design/`
227
183
 
228
- - `slopmachine setup`
229
- - `slopmachine init`
230
- - `slopmachine init -o`
184
+ ### SlopMachine Support Files
231
185
 
232
- Package validation:
186
+ Installed under `~/slopmachine/`:
233
187
 
234
- - `npm run check`
235
- - `npm pack`
188
+ - `backend-evaluation-prompt.md`
189
+ - `frontend-evaluation-prompt.md`
190
+ - `document-completeness.md`
191
+ - `quality-document.md`
192
+ - `engineering-results.md`
193
+ - `implementation-comparison.md`
194
+ - `workflow-init.js`
195
+ - `templates/AGENTS.md`
196
+ - `utils/strip_session_parent.py`
197
+ - `utils/convert_ai_session.py`
236
198
 
237
- Generated project conventions:
199
+ ### OpenCode Config
238
200
 
239
- - `docker compose up --build` or `./run_app.sh`
240
- - `./run_tests.sh`
201
+ Config file:
241
202
 
242
- ## Files And Locations
203
+ ```bash
204
+ ~/.config/opencode/opencode.json
205
+ ```
243
206
 
244
- Main install locations:
207
+ `setup` ensures these entries exist:
245
208
 
246
- - agents: `~/.config/opencode/agents/`
247
- - skills: `~/.agents/skills/`
248
- - packaged workflow files: `~/slopmachine/`
209
+ - plugin: `oc-chatgpt-multi-auth`
210
+ - MCP server: `chrome-devtools`
211
+ - MCP server: `context7`
212
+ - MCP server: `exa`
213
+ - MCP server: `shadcn` disabled by default
249
214
 
250
- Inside a bootstrapped project root:
215
+ If you want to customize agents, MCP settings, or plugins, these are the files to edit.
251
216
 
252
- - working codebase: `repo/`
253
- - external docs: `docs/`
254
- - session exports: `sessions/`
255
- - project metadata: `metadata.json`
217
+ ## Daily Use
256
218
 
257
- See also:
219
+ After the machine is set up, the common flow is:
258
220
 
259
- - `MANUAL.md` for the short workflow guide
260
- - `RELEASE.md` for packaging and release checks
221
+ ```bash
222
+ cd my-project/repo
223
+ opencode
224
+ ```
261
225
 
262
- ## Package layout
226
+ Or for a brand new project in one shot:
263
227
 
264
- - `assets/agents/`
265
- - `assets/skills/`
266
- - `assets/slopmachine/`
267
- - `bin/`
268
- - `src/`
228
+ ```bash
229
+ mkdir my-project
230
+ cd my-project
231
+ slopmachine init -o
232
+ ```
package/RELEASE.md CHANGED
@@ -18,13 +18,14 @@ SLOPMACHINE_HOME="$(pwd)/.tmp-home" SLOPMACHINE_NONINTERACTIVE=1 SLOPMACHINE_PLU
18
18
 
19
19
  ```bash
20
20
  mkdir -p .tmp-project
21
- SLOPMACHINE_HOME="$(pwd)/.tmp-home" node ./bin/slopmachine.js init
21
+ SLOPMACHINE_HOME="$(pwd)/.tmp-home" node ./bin/slopmachine.js init .tmp-project
22
22
  ```
23
23
 
24
24
  4. Test the open-after-bootstrap path:
25
25
 
26
26
  ```bash
27
- SLOPMACHINE_HOME="$(pwd)/.tmp-home" node ./bin/slopmachine.js init -o
27
+ mkdir -p .tmp-project-open
28
+ SLOPMACHINE_HOME="$(pwd)/.tmp-home" node ./bin/slopmachine.js init -o .tmp-project-open
28
29
  ```
29
30
 
30
31
  Note:
@@ -41,13 +42,13 @@ npm pack
41
42
  This should produce a tarball such as:
42
43
 
43
44
  ```bash
44
- theslopmachine-0.4.3.tgz
45
+ theslopmachine-0.4.5.tgz
45
46
  ```
46
47
 
47
48
  ## Inspect package contents
48
49
 
49
50
  ```bash
50
- tar -tzf theslopmachine-0.4.3.tgz
51
+ tar -tzf theslopmachine-0.4.5.tgz
51
52
  ```
52
53
 
53
54
  Check that the tarball includes:
@@ -62,7 +62,12 @@ During ordinary work, prefer:
62
62
  - targeted module or route-family tests
63
63
  - the selected stack's local UI or E2E tool on affected flows when UI is material
64
64
 
65
- Do not jump to broad Docker and full-suite commands on ordinary turns.
65
+ Owner-only broad gate commands:
66
+
67
+ - never run `./run_tests.sh`
68
+ - never run `docker compose up --build`
69
+ - treat both commands as owner-run gate commands only, even if they are documented in the repo or look convenient for debugging
70
+ - if your work would normally call for one of those commands, stop at targeted local verification and report that the change is ready for owner-run broad verification
66
71
 
67
72
  The owner reserves the limited broad gate budget. Your job is to make those owner-run gates likely to pass.
68
73
 
@@ -90,4 +95,6 @@ Selected-stack defaults:
90
95
 
91
96
  - be direct and technically clear
92
97
  - report what changed, what was verified, and what still looks weak
98
+ - always name the exact verification commands you ran and the concrete results they produced
99
+ - if you ran no verification command for part of the work, say that explicitly instead of implying broader proof than you have
93
100
  - if a problem needs a real fix, fix it instead of explaining around it
@@ -78,6 +78,7 @@ Default to:
78
78
  - targeted reads instead of broad rereads
79
79
  - targeted execution instead of broad reruns
80
80
  - local and narrow verification before expensive gate commands
81
+ - do not rerun expensive commands just to duplicate clear developer-provided evidence
81
82
  - file-backed reports with short in-chat summaries when the output would otherwise bloat context
82
83
 
83
84
  Stay aggressive about cutting waste, but do not weaken the actual standard.
@@ -171,16 +172,30 @@ Phase rules:
171
172
  - `P9 Remediation` stays its own root phase once evaluation has accepted follow-up work
172
173
  - `P6 Hardening` may reopen `P5` if hardening exposes unresolved integrated instability
173
174
  - `P11 Retrospective` runs automatically after successful packaging and is non-blocking unless it finds a real delivery defect
175
+ - post-submission external evaluation feedback may reopen `P9 Remediation`, then rerun `P10 Submission Packaging`, and then rerun `P11 Retrospective`
174
176
 
175
177
  ## Developer Session Model
176
178
 
177
- Use up to two bounded developer sessions:
179
+ Maintain exactly one active developer session at a time.
178
180
 
179
- 1. develop session: planning, scaffold, development
180
- 2. bugfix session: integrated verification, hardening, and remediation, only if needed
181
+ Track every developer session in metadata, but create a new one only in these cases:
182
+
183
+ 1. you explicitly request a new session
184
+ 2. after successful submission, you return with external evaluation issues that require more fixes
185
+
186
+ Session classes:
187
+
188
+ 1. `develop`: every developer session created before the first successful submission packaging
189
+ 2. `bugfix`: every developer session created after successful submission packaging when the project is reopened for external-evaluation follow-up
190
+
191
+ There may be multiple `develop` sessions and multiple `bugfix` sessions over the life of one project.
192
+
193
+ During the first full run from planning through initial submission packaging, keep all work in the `develop` session class, including integrated verification, hardening, evaluation-driven remediation, and packaging follow-through.
194
+
195
+ If you explicitly request a new session while one is active, ask the current developer exactly `give me a summary of all the work that has been done`, then use that handoff to seed the next session.
181
196
 
182
197
  Use `developer-session-lifecycle` for startup, resume detection, session consistency checks, and recovery.
183
- Use `session-rollover` only for planned transitions between those bounded developer sessions.
198
+ Use `session-rollover` only when intentionally starting a new developer session because of an explicit user request or post-submission external-feedback reopen.
184
199
 
185
200
  Do not launch the developer during `P0` or `P1`.
186
201
 
@@ -198,6 +213,14 @@ Do not merge those messages.
198
213
 
199
214
  Broad project-standard gate commands are expensive and must stay rare.
200
215
 
216
+ Owner-side discipline:
217
+
218
+ - do not run `./run_tests.sh` casually
219
+ - do not run `docker compose up --build` casually
220
+ - do not rerun expensive local test or E2E commands just because the developer already ran them
221
+ - when the developer reports the exact verification command and its result clearly, use that evidence unless there is a concrete reason to challenge it
222
+ - rerun expensive verification only when the developer evidence is weak, contradictory, flaky, high-risk, needed for a true broad gate, or needed to answer a new question
223
+
201
224
  Target budget for the whole workflow:
202
225
 
203
226
  - at most 3 broad owner-run verification moments using the selected stack's full verification path
@@ -272,7 +295,7 @@ Core map:
272
295
  - `P11` -> `retrospective-analysis`, `owner-evidence-discipline`, `report-output-discipline`
273
296
  - state mutations -> `beads-operations`
274
297
  - evidence-heavy review -> `owner-evidence-discipline`
275
- - planned developer-session switch -> `session-rollover`
298
+ - intentional new developer session -> `session-rollover`
276
299
 
277
300
  Do not improvise a phase from memory when a phase skill exists.
278
301
 
@@ -284,6 +307,7 @@ When talking to the developer:
284
307
  - lead with the engineering point, not process framing
285
308
  - keep prompts natural, sharp, and compact unless the moment really needs more context
286
309
  - translate workflow intent into normal software-project language
310
+ - for each development slice or bugfix request, require the reply to state the exact verification commands that were run and the concrete results they produced
287
311
 
288
312
  Do not leak workflow internals such as:
289
313
 
@@ -344,6 +368,7 @@ Treat packaging as a first-class delivery contract from the start, not as late c
344
368
  - the two evaluation prompt files are used exactly during evaluation runs
345
369
  - the four non-evaluation package documents are used during submission packaging to generate the required submission outputs
346
370
  - exact packaging file outputs and final paragraph outputs are mandatory in `P10`
371
+ - accepted evaluation reports and cleaned original session exports are mandatory submission artifacts in `P10`
347
372
  - do not leave packaging structure, screenshots, self-test outputs, or exports to be improvised at the end
348
373
 
349
374
  When `P10 Submission Packaging` begins:
@@ -358,7 +383,7 @@ After `P10 Submission Packaging` closes successfully:
358
383
 
359
384
  - automatically enter `P11 Retrospective`
360
385
  - load `retrospective-analysis`
361
- - write dated retrospective output under `~/slopmachine/retrospectives/`
386
+ - write `run_id`-scoped retrospective output under `~/slopmachine/retrospectives/`
362
387
  - keep it owner-only and non-blocking by default
363
388
  - reopen packaging only if the retrospective finds a real packaged-result defect
364
389
 
@@ -24,7 +24,7 @@ When a root phase changes:
24
24
  - do not close multiple root phases in one transition block
25
25
  - keep structured comments specific and auditable
26
26
  - treat phase-closure failures as real workflow failures to resolve
27
- - keep Beads and metadata aligned on current phase and active developer session slot when either changes
27
+ - keep Beads and metadata aligned on current phase and active developer session record when either changes
28
28
 
29
29
  ## Structured comment prefixes
30
30
 
@@ -28,7 +28,7 @@ Use this skill only during `P1 Clarification`.
28
28
  - decompose the prompt thoroughly into explicit requirements, implied requirements, user flows, constraints, boundaries, risks, quality expectations, and verification expectations
29
29
  - identify and lock safe default decisions that are consistent with the prompt and improve execution quality without changing intent
30
30
  - when more than one safe default is available, prefer the one that preserves or slightly over-covers the full prompt scope rather than the one that narrows scope for implementation convenience
31
- - record meaningful ambiguities, locked safe defaults, and decision rationale in the working questions record that will later become `../docs/questions.md`
31
+ - record meaningful ambiguities, locked safe defaults, and decision rationale directly in mandatory parent-root `../docs/questions.md`
32
32
  - prepare a developer-facing clarification prompt in `../.ai/clarification-prompt.md`
33
33
  - keep clarification aligned with the original prompt
34
34
  - do not let clarification reduce, weaken, narrow, or silently reinterpret the prompt
@@ -50,7 +50,7 @@ Use this skill only during `P1 Clarification`.
50
50
 
51
51
  ## Required outputs
52
52
 
53
- - working clarification record that will become `../docs/questions.md`
53
+ - parent-root `../docs/questions.md`
54
54
  - developer-facing clarification prompt in `../.ai/clarification-prompt.md`
55
55
  - explicit list of safe defaults and resolved ambiguities
56
56
 
@@ -94,7 +94,7 @@ Preferred entry shape:
94
94
  <brief justification tied to prompt faithfulness>
95
95
  ```
96
96
 
97
- If nothing material was unclear, keep `questions.md` minimal rather than inventing content.
97
+ If nothing material was unclear, still create `questions.md` and keep it minimal rather than inventing content.
98
98
 
99
99
  ## Clarification-prompt validation loop
100
100
 
@@ -119,5 +119,6 @@ If nothing material was unclear, keep `questions.md` minimal rather than inventi
119
119
  - the owner is confident the scope is understood clearly enough to enter planning
120
120
  - the clarification prompt is strong enough for the developer to start from the right understanding
121
121
  - material ambiguities are resolved or safely locked and documented
122
+ - `../docs/questions.md` exists and reflects the accepted clarification record
122
123
  - prompt drift has been checked and rejected
123
124
  - human approval exists
@@ -11,7 +11,7 @@ Use this skill during `P0 Intake and Setup` and whenever startup or recovery sta
11
11
 
12
12
  - detect whether the run is new or resumed
13
13
  - initialize or recover workflow metadata consistently
14
- - initialize the planned bounded developer-session slots
14
+ - initialize developer-session tracking for the run
15
15
  - recover the current active developer session when one already exists
16
16
 
17
17
  ## Usage rules
@@ -55,10 +55,10 @@ Optional startup inputs may include:
55
55
  2. create `../.ai/metadata.json` for internal workflow state
56
56
  3. initialize parent-root `../metadata.json` with the required schema and store the full prompt text in `prompt`
57
57
  4. initialize root workflow state and top-level phase Beads items
58
- 5. complete clarification using the clarification skill
59
- 6. wait only for the initial clarification approval before development starts
60
- 7. ensure the parent project root has the required working structure, especially `../sessions/` and `../docs/`
61
- 8. initialize the bounded developer-session slots
58
+ 5. ensure the parent project root has the required working structure, especially `../sessions/` and `../docs/`
59
+ 6. complete clarification using the clarification skill
60
+ 7. wait only for the initial clarification approval before development starts
61
+ 8. initialize developer-session tracking for the run
62
62
  9. start the develop developer session only after `P2` is ready to begin
63
63
  10. send this exact first planning opener as the first message in that session: `lets plan this <original-prompt>`
64
64
  11. wait for the developer's first exchange
@@ -67,7 +67,7 @@ Optional startup inputs may include:
67
67
 
68
68
  ## First developer-session handshake
69
69
 
70
- The first bounded developer session must begin in this exact order:
70
+ The first developer session of the run must begin in this exact order:
71
71
 
72
72
  1. owner starts the develop developer session
73
73
  2. owner sends: `lets plan this <original-prompt>`
@@ -84,7 +84,7 @@ Do not merge those two messages into one.
84
84
  - root workflow state exists
85
85
  - `../.ai/metadata.json` exists
86
86
  - `../metadata.json` exists
87
- - planned developer session slots are initialized
87
+ - developer-session tracking is initialized
88
88
  - required parent-root directories exist
89
89
 
90
90
  ## Metadata and workflow files
@@ -107,19 +107,26 @@ Track at least:
107
107
  - `backend_evaluation_session_id`
108
108
  - `frontend_evaluation_session_id`
109
109
  - `last_evaluation_session_id`
110
+ - `backend_evaluation_report_path`
111
+ - `frontend_evaluation_report_path`
110
112
  - `passed_evaluation_tracks`
111
113
  - `developer_sessions`
112
- - `active_developer_session_index`
114
+ - `active_developer_session_id`
115
+ - `next_develop_session_number`
116
+ - `next_bugfix_session_number`
117
+ - `submission_completed`
113
118
 
114
- Each planned developer session record should include enough to recover it later, such as:
119
+ Each developer session record should include enough to recover and export it later, such as:
115
120
 
116
- - `index`
121
+ - `session_class`
122
+ - `sequence`
117
123
  - `label`
118
- - `phase_group`
124
+ - `created_phase`
119
125
  - `session_id`
120
126
  - `status`
121
127
  - `handoff_in`
122
128
  - `handoff_out`
129
+ - `reopened_after_submission`
123
130
 
124
131
  Required project metadata fields in `../metadata.json` when relevant:
125
132
 
@@ -136,19 +143,29 @@ Required project metadata fields in `../metadata.json` when relevant:
136
143
  - fill known values immediately and keep the file current as the project becomes clearer
137
144
  - prefer explicit values; use `null` only when a field is genuinely unknown or not applicable
138
145
 
139
- ## Bounded session model
146
+ ## Session model
140
147
 
141
- Track up to two planned developer sessions:
148
+ - keep exactly one active developer session at a time
149
+ - record every developer session in `developer_sessions`
150
+ - classify sessions as `develop` or `bugfix`
151
+ - every session created before the first successful submission packaging is `develop`
152
+ - every session created after successful submission packaging to address external evaluation follow-up is `bugfix`
153
+ - create a new developer session only when:
154
+ - the user explicitly requests a new session
155
+ - post-submission external evaluation feedback reopens the project for more fixes
142
156
 
143
- 1. develop
144
- 2. bugfix
157
+ If the user explicitly requests a new session while one is active:
145
158
 
146
- Later session slots may remain unused if the workflow never needs them.
159
+ 1. ask the current developer exactly: `give me a summary of all the work that has been done`
160
+ 2. treat that reply as the handoff summary
161
+ 3. start the new developer session with that summary as the handoff-in context
162
+ 4. keep the session class as `develop` before first successful submission, otherwise keep it as `bugfix`
147
163
 
148
164
  ## Initial structure rule
149
165
 
150
166
  - parent-root `../docs/` is the owner-maintained external documentation directory
151
167
  - parent-root `../sessions/` is the session artifact directory for exported conversation traces
168
+ - `../docs/questions.md` is a mandatory project artifact produced during clarification and preserved through packaging
152
169
  - do not treat repo-local `docs/` as the active external documentation location
153
170
 
154
171
  ## Recovery rule
@@ -29,7 +29,7 @@ Use this skill during `P4 Development` before prompting the developer.
29
29
  - verify tenant or ownership isolation where relevant so access is scoped to the authorized context rather than merely functionally working for one actor
30
30
  - verify file and export paths are validated and confined to allowed roots when the module reads, writes, imports, or exports files
31
31
  - verify error and auth responses are user-safe and do not leak internal reasons, paths, stack details, or sensitive state
32
- - perform a clean-slate sweep before reporting module completion: remove seeded credentials, weak demo defaults, test-account hints, prototype residue, and other production-inappropriate artifacts
32
+ - perform a clean-slate sweep before reporting module completion: remove weak demo defaults, stray test-account hints, prototype residue, and other production-inappropriate artifacts; deterministic non-secret Dockerized dev/test default credentials are allowed only when clearly labeled local-only and required for startup or test stability
33
33
  - do not treat backend existence, composable existence, or partial wiring as completion if the user-visible flow is still incomplete
34
34
  - when the prompt says users can manage or configure something, implement full management behavior rather than create-only controls where appropriate
35
35
  - if a required user-facing or admin-facing surface is missing, treat that gap as incomplete implementation rather than a reason to bypass the surface with direct API calls or test-only shortcuts
@@ -54,6 +54,7 @@ Use this skill during `P4 Development` before prompting the developer.
54
54
  - for mobile projects, default local UI testing to the selected mobile test stack and use a platform-appropriate mobile UI/E2E tool when device-flow proof matters
55
55
  - for desktop projects, default local UI verification to Playwright's Electron support or another platform-appropriate desktop UI/E2E tool when window-flow proof matters
56
56
  - when the slice materially changes frontend code, frontend tooling, or release-facing build behavior, include production build health in meaningful local verification when practical
57
+ - in each slice reply, report the exact verification commands that were run and the concrete results they produced so the owner can review the evidence without blindly rerunning the same commands
57
58
 
58
59
  ## Quality rules
59
60
 
@@ -36,12 +36,13 @@ These two files are the only evaluation prompt sources for evaluation runs.
36
36
  - send that fully composed text block directly to the fresh `General` evaluator session
37
37
  - never tell the evaluator to go read prompt files, metadata files, or evaluation template paths on its own
38
38
  - never send only a path, filename, or shorthand reference and expect the evaluator to assemble the prompt itself
39
- - never reuse, resume, or continue a prior evaluation session
39
+ - do not reuse, resume, or continue a prior evaluation session except for the explicit pass-3 fallback on the last still-failing track
40
40
  - run the two evaluations sequentially, not in parallel, so shared runtime state, ports, databases, and artifacts do not conflict
41
41
  - track backend and frontend evaluation status separately
42
42
  - once backend evaluation passes, do not run backend evaluation again in later remediation rounds
43
43
  - once frontend evaluation passes, do not run frontend evaluation again in later remediation rounds
44
44
  - require each evaluation session to produce its own detailed evaluation report artifact
45
+ - record the current accepted backend and frontend evaluation report paths in metadata for later packaging
45
46
  - always compare both evaluations against the original prompt for alignment, not just the delivered implementation
46
47
  - keep reports file-backed and bring only short summaries into chat
47
48
  - rerun only the evaluation track that still needs re-evaluation after remediation
@@ -61,7 +62,7 @@ These two files are the only evaluation prompt sources for evaluation runs.
61
62
 
62
63
  ## Remediation loop
63
64
 
64
- - route accepted blocking issues back into the active remediation developer-session slot rather than inventing an untracked side path
65
+ - route accepted blocking issues back into the active developer session rather than inventing an untracked side path
65
66
  - after remediation, rerun strong local verification before any re-evaluation:
66
67
  - relevant local test commands
67
68
  - local runtime checks when affected behavior needs runtime proof
@@ -23,6 +23,8 @@ Once a failure class is known:
23
23
  - run the relevant tests for the changed behavior
24
24
  - during in-phase verification, prefer the fastest meaningful local test commands for the known failure class
25
25
  - use local verification to prepare for the next owner-run broad gate rather than duplicating it casually
26
+ - when sending a developer fix request for integrated-verification failures, require the reply to name the exact rerun commands and the concrete results they produced
27
+ - do not reflexively rerun the same expensive local test or E2E command on the owner side when the developer's reported evidence is already clear and sufficient
26
28
  - for applicable UI-bearing work, run the selected stack's platform-appropriate UI/E2E tool for the affected flows in-phase, capture screenshots or equivalent artifacts, and verify the UI behavior and quality directly
27
29
  - verify requirement closure, not just feature existence
28
30
  - verify behavior against the current plan, the actual requirements, and any settled project decisions that affect the change
@@ -91,6 +91,9 @@ Selected-stack defaults:
91
91
  - for Dockerized web backend/fullstack projects, `./run_tests.sh` must run the full test path through Docker rather than a purely local test invocation
92
92
  - for non-web or non-Docker projects, `./run_tests.sh` must call the selected stack's equivalent full test path while keeping the same single-command interface
93
93
  - local tests should still exist for ordinary developer iteration, but `./run_tests.sh` is the broad final test path for the project
94
+ - for Dockerized web backend/fullstack projects, plan collision-resistant Compose defaults from the start: unique `COMPOSE_PROJECT_NAME`, no unnecessary `container_name`, only the app-facing port exposed to host by default, and internal services kept off host ports unless required
95
+ - for Dockerized web backend/fullstack projects, prefer random host-port binding on `127.0.0.1` for the default runtime so parallel projects can start cleanly; if a fixed host port is genuinely required, plan an override plus a free-port fallback in the runtime or test wrapper
96
+ - when Dockerized dev/test runtime or tests require credentials or bootstrap accounts, plan deterministic non-secret default runtime env values through Compose or wrapper configuration so local startup does not fail on missing credentials, while keeping those defaults out of `.env` files and out of Dockerfile image layers
94
97
  - define frontend validation and accessibility expectations when the product surface materially depends on them, including keyboard, focus, feedback, and other user-interaction quality requirements where relevant
95
98
  - if backup or recovery behavior is prompt-critical, plan the designated media, operator drill flow, visibility, and verification expectations explicitly
96
99
  - if the prompt names literal storage, indexing, partitioning, retention, or performance dimensions, represent them literally in the planning artifacts rather than abstracting them away
@@ -21,7 +21,7 @@ Use this skill only during `P9 Remediation`.
21
21
  - rerun the relevant verification after each fix
22
22
  - if the issue exposed drift, docs overclaim, or missing acceptance coverage, repair that too before closing the issue
23
23
  - update docs if behavior or instructions changed
24
- - report exactly what was fixed, what was rerun, and what still looks risky if anything remains
24
+ - report exactly what was fixed, the exact verification commands that were rerun, the concrete results they produced, and what still looks risky if anything remains
25
25
 
26
26
  ## Rules
27
27
 
@@ -24,17 +24,19 @@ Use this skill only after `P10 Submission Packaging` has materially and formally
24
24
 
25
25
  ## Output location
26
26
 
27
- Write dated retrospective files under:
27
+ Write run-scoped retrospective files under:
28
28
 
29
29
  - `~/slopmachine/retrospectives/`
30
30
 
31
31
  Preferred filenames:
32
32
 
33
- - `retrospective-YYYY-MM-DD.md`
34
- - `improvement-actions-YYYY-MM-DD.md`
33
+ - `retrospective-<run_id>.md`
34
+ - `improvement-actions-<run_id>.md`
35
35
 
36
36
  If only one file is needed, the retrospective file is sufficient.
37
37
 
38
+ The `run_id` must come from the current project's `../.ai/metadata.json` so the retrospective can be matched back to one exact workflow run.
39
+
38
40
  ## Evidence sources
39
41
 
40
42
  Prefer existing workflow artifacts first:
@@ -49,6 +49,13 @@ For Dockerized web backend/fullstack projects, scaffold must make these commands
49
49
  - remove prototype residue from runtime foundations: no placeholder titles, hidden setup, fake defaults, or seeded live-path assumptions
50
50
  - make prompt-critical runtime behavior visible in the scaffold instead of hand-waving it for later, especially offline, worker, backup, or HTTPS requirements
51
51
  - for Dockerized web projects, keep runtime isolation clean in shared environments: use self-contained Compose namespacing, avoid fragile generic project names, and prefer Compose-managed service naming over unnecessary hardcoded `container_name` values
52
+ - for Dockerized web projects, derive a unique `COMPOSE_PROJECT_NAME` from the repo or worktree identity for runtime wrappers, and use a separate unique test namespace for `./run_tests.sh` so parallel local projects do not collide
53
+ - for Dockerized web projects, expose only the primary app-facing port to the host by default, keep databases/cache/internal services off host ports unless the prompt truly requires exposure, and bind exposed ports to `127.0.0.1`
54
+ - for Dockerized web projects, prefer Docker-assigned random host ports for the default host binding so plain `docker compose up --build` can run without host-port collisions; if the prompt requires a fixed host port, support an overrideable host-port variable and make the runtime or test wrapper fall back to a free port automatically when needed
55
+ - for Dockerized web projects, keep image, network, and volume naming under Compose project scoping; if explicit image names are needed, namespace them with the Compose project name instead of using generic shared names
56
+ - for Dockerized web projects, add healthchecks and make runtime or test wrappers wait for service readiness before proceeding so startup is reliable on slower machines
57
+ - when Dockerized dev/test startup or tests require credentials or bootstrap accounts, provide deterministic non-secret default values through Compose/runtime environment configuration so `docker compose up --build` and `./run_tests.sh` do not fail due to missing credentials
58
+ - keep those Dockerized dev/test default credentials clearly marked as local-only test credentials, do not store them in `.env` files, and do not bake them into the Dockerfile image layers
52
59
  - require reproducible build and tooling foundations: prefer lockfile-driven installs where the stack supports them, keep source and build outputs clearly separated, and do not allow generated runtime artifacts to drift back into source directories
53
60
  - for typed build pipelines, keep source-of-truth boundaries clean so compiled output does not create TS/JS or similar dual-source drift in the working tree
54
61
  - establish README structure early instead of leaving it until the end
@@ -1,22 +1,36 @@
1
1
  ---
2
2
  name: session-rollover
3
- description: Planned developer-session handoff and rollover rules for bounded slopmachine developer sessions.
3
+ description: Developer-session handoff and rollover rules for intentional slopmachine session switches.
4
4
  ---
5
5
 
6
6
  # Session Rollover
7
7
 
8
- Use this skill only when intentionally moving from one planned developer session slot to the next.
8
+ Use this skill only when intentionally starting a new developer session while preserving the old one as history.
9
9
 
10
10
  ## Typical uses
11
11
 
12
- - develop session -> bugfix session
12
+ - the user explicitly asks for a new developer session
13
+ - post-submission external evaluation feedback reopens the project for more fixes
13
14
 
14
15
  ## Rules
15
16
 
16
- - rollover is planned, not a recovery event
17
+ - rollover is intentional, not a recovery event
18
+ - keep exactly one active developer session at a time
17
19
  - do not open the next developer session until the current session has a clear handoff out
18
20
  - record the new session id and status immediately after the new session is created
19
21
 
22
+ If the user explicitly requests a new session while one is active:
23
+
24
+ 1. ask the current developer exactly: `give me a summary of all the work that has been done`
25
+ 2. store that reply as the handoff artifact for the closing session
26
+ 3. start the new developer session with that summary as the handoff-in context
27
+
28
+ If the project is reopened after successful submission because of external evaluation feedback:
29
+
30
+ 1. record the external issue list and any accepted evaluation report references in the handoff
31
+ 2. start a new `bugfix` developer session
32
+ 3. use that external feedback plus the handoff summary as the starting context
33
+
20
34
  ## Required handoff contents
21
35
 
22
36
  - current phase and why rollover is happening
@@ -32,7 +46,8 @@ When rollover succeeds, update metadata so it is obvious:
32
46
  - which prior session is now completed or inactive
33
47
  - which new session is active
34
48
  - where the handoff artifact lives
35
- - which phase group the new session now owns
49
+ - which session class the new session belongs to
50
+ - whether the new session was opened after successful submission
36
51
 
37
52
  ## Avoid
38
53
 
@@ -73,14 +73,16 @@ The final submission layout in the parent project root must be:
73
73
  - `questions.md`
74
74
  - `submission/`
75
75
  - generated submission documents based on the reference files in `~/`
76
- - evaluation reports
76
+ - `backend-evaluation-report.md` when applicable
77
+ - `frontend-evaluation-report.md` when applicable
78
+ - cleaned original session exports for every tracked developer session
77
79
  - repo file structure screenshot
78
80
  - working app screenshots
79
81
  - relocated screenshots and proof materials needed for submission review
80
82
  - current working directory delivered as parent-root `repo/`
81
83
  - `../sessions/`
82
- - `develop-N.json`
83
- - `bugfix-N.json`
84
+ - converted `develop-N.json` session exports for all pre-submission developer sessions
85
+ - converted `bugfix-N.json` session exports for all post-submission external-follow-up developer sessions
84
86
  - `../metadata.json`
85
87
  - parent-root `../.tmp/` directory moved out of current `.tmp/` when it exists
86
88
 
@@ -91,7 +93,7 @@ The final submission layout in the parent project root must be:
91
93
  - verify parent-root `../docs/design.md` exists and reflects the final delivered design when applicable
92
94
  - verify parent-root `../docs/api-spec.md` exists and reflects the final delivered interfaces when applicable
93
95
  - verify parent-root `../docs/test-coverage.md` exists and reflects the final delivered verification coverage
94
- - verify parent-root `../docs/questions.md` exists from the accepted clarification/question record when applicable
96
+ - verify parent-root `../docs/questions.md` exists from the accepted clarification/question record
95
97
  - create parent-root `../submission/` for final generated submission artifacts and reviewer-facing proof
96
98
  - use these exact `~/slopmachine/` document templates as the packaging reference sources:
97
99
  - `~/slopmachine/document-completeness.md`
@@ -100,10 +102,12 @@ The final submission layout in the parent project root must be:
100
102
  - `~/slopmachine/quality-document.md`
101
103
  - ensure `README.md` matches the delivered codebase, functionality, runtime steps, and test steps, stays friendly to a junior developer, and does not reference the external docs set in `../docs/`
102
104
  - include `./run_tests.sh` and any supporting runner logic it needs to execute the project's broad test path from a clean environment
103
- - relocate evaluation artifacts into parent-root `../submission/`
105
+ - relocate accepted backend and frontend evaluation reports into parent-root `../submission/` as `backend-evaluation-report.md` and `frontend-evaluation-report.md` when those tracks apply
104
106
  - relocate screenshots and proof materials relevant to runtime behavior and major flows into parent-root `../submission/`
105
107
  - preserve parent-root `../sessions/` as the session artifact directory for converted workflow session exports
106
108
  - export all tracked workflow sessions before generating the final submission documents
109
+ - preserve all cleaned original session exports under parent-root `../submission/`
110
+ - when packaging succeeds, mark `submission_completed` as true in internal metadata so later reopen handling can classify post-submission sessions correctly
107
111
  - after the session exports are complete, the owner should answer the final submission-document questions based on the recent review responses gathered across evaluation reports, remediation results, verification notes, and packaging checks
108
112
 
109
113
  ## Session export sequence
@@ -112,22 +116,34 @@ This export sequence must happen first in packaging, before final submission doc
112
116
 
113
117
  Export every tracked workflow session from metadata.
114
118
 
119
+ Use a class-and-sequence label for each tracked session, for example:
120
+
121
+ - `develop-1`
122
+ - `develop-2`
123
+ - `bugfix-1`
124
+
115
125
  For each tracked session:
116
126
 
117
127
  1. `opencode export <session-id> > ../session-export-<label>.json`
118
128
  2. `python3 ~/utils/strip_session_parent.py ../session-export-<label>.json --output ../session-clean-<label>.json`
119
129
  3. `python3 ~/utils/convert_ai_session.py -i ../session-clean-<label>.json -o ../sessions/<final-name>.json`
130
+ 4. copy `../session-clean-<label>.json` to `../submission/session-clean-<label>.json`
120
131
 
121
132
  Naming rule for converted files under `../sessions/`:
122
133
 
123
- - the develop session becomes `develop-N.json`
124
- - the bugfix session becomes `bugfix-N.json`
134
+ - every pre-submission developer session becomes `develop-N.json`
135
+ - every post-submission external-follow-up developer session becomes `bugfix-N.json`
136
+
137
+ Naming rule for cleaned original session exports under `../submission/`:
138
+
139
+ - `session-clean-develop-N.json`
140
+ - `session-clean-bugfix-N.json`
125
141
 
126
142
  After those steps:
127
143
 
128
- - verify every planned developer session has been exported and converted before continuing packaging
144
+ - verify every tracked developer session has been exported, cleaned, converted, and copied into `../submission/` before continuing packaging
129
145
  - keep the converted session outputs in `../sessions/` using the naming rules above
130
- - treat the `../session-export-*.json` and `../session-clean-*.json` files as temporary packaging intermediates unless the package contract later says otherwise
146
+ - treat only the raw `../session-export-*.json` files as temporary packaging intermediates unless the package contract later says otherwise
131
147
  - if the required utilities, metadata session ids, or output files are missing, packaging is not ready to continue
132
148
  - only after these exports are complete may you generate the final submission documents
133
149
 
@@ -147,7 +163,7 @@ If the gathered review evidence is incomplete, stop and repair the missing evide
147
163
 
148
164
  - if repo-local `docs/` exists, treat it as accidental residue, reconcile any missing content into parent-root `../docs/`, and remove it from the delivered `repo/` tree
149
165
  - if current `.tmp/` exists, move the whole directory to parent-root `../.tmp/` before harvesting any reviewer-facing artifacts from it
150
- - after preserving parent-root `../.tmp/`, collect the relevant evaluation reports and proof artifacts from it into parent-root `../submission/`
166
+ - after preserving parent-root `../.tmp/`, collect the accepted backend and frontend evaluation reports plus other relevant proof artifacts into parent-root `../submission/`
151
167
  - collect screenshots and other required proof materials from repo-local runtime/output directories into parent-root `../submission/`
152
168
  - after relocation, the final submission should not require digging through repo-local output directories to find evidence
153
169
  - keep screenshot filenames clear enough that the referenced runtime page, flow, or evidence purpose is understandable
@@ -166,13 +182,15 @@ If the gathered review evidence is incomplete, stop and repair the missing evide
166
182
  - confirm docs describe delivered behavior, not planned or aspirational behavior
167
183
  - confirm parent-root `../docs/test-coverage.md` explains the tested flows, coverage boundaries, and how the evaluator should interpret the coverage evidence
168
184
  - confirm generated submission documents exist under parent-root `../submission/` and correspond to the final qualified state
169
- - confirm evaluation reports and screenshots have been relocated into parent-root `../submission/`
185
+ - confirm accepted backend and frontend evaluation reports have been relocated into parent-root `../submission/` when those tracks apply
186
+ - confirm cleaned original session exports for every tracked developer session exist under parent-root `../submission/`
170
187
  - confirm shared project docs live in parent-root `../docs/` and any accidental repo-local `docs/` copy has been removed from the delivered tree
171
188
  - confirm required screenshots have been relocated into parent-root `../submission/`
172
189
  - confirm parent-root metadata fields are populated correctly
190
+ - confirm internal metadata marks `submission_completed` as true for a successful packaged state
173
191
  - confirm session export naming rules are followed under `../sessions/`:
174
- - `develop-N.json` for the develop session
175
- - `bugfix-N.json` for the bugfix session
192
+ - `develop-N.json` for every pre-submission developer session
193
+ - `bugfix-N.json` for every post-submission external-follow-up developer session
176
194
 
177
195
  ## Submission artifact and response contract
178
196
 
@@ -42,7 +42,8 @@ Use this skill after development begins whenever you are reviewing work, decidin
42
42
  - do not accept frontend/backend drift in fullstack work
43
43
  - do not accept missing end-to-end coverage for major fullstack flows
44
44
  - do not accept UI claims without screenshot-backed or platform-equivalent visual evidence when the change affects real UI behavior
45
- - do not accept prototype residue such as seeded credentials, weak demo defaults, login hints, or unsanitized user-facing error behavior
45
+ - do not accept production-inappropriate residue such as weak demo defaults, stray login hints, or unsanitized user-facing error behavior
46
+ - deterministic non-secret Dockerized dev/test default credentials are acceptable only when they are clearly labeled local-only, supplied through runtime configuration rather than `.env` files or Dockerfile image layers, and required so local startup or tests do not fail on missing credentials
46
47
  - do not accept multi-tenant or cross-user security claims without negative isolation evidence when that boundary matters
47
48
  - do not accept file-bearing flows without path confinement and traversal-style validation when that boundary matters
48
49
  - do not accept partial foundation work for complex features when the prompt implies broader usable scope, infrastructure depth, or security depth than what was actually delivered
@@ -55,6 +56,8 @@ Use this skill after development begins whenever you are reviewing work, decidin
55
56
  - use targeted local verification as the default during scaffold corrections, development, hardening, and remediation
56
57
  - reserve the selected stack's broad verification path for the limited owner-run gate moments in the workflow budget
57
58
  - do not turn ordinary acceptance into repeated integrated-style gate runs
59
+ - do not run `./run_tests.sh` casually on the owner side
60
+ - do not run `docker compose up --build` casually on the owner side
58
61
  - for Dockerized web backend/fullstack projects, the owner must run `docker compose up --build` and `./run_tests.sh` once after scaffold completion to confirm the scaffold baseline
59
62
  - after that scaffold confirmation, the next Docker-based run should be at development completion or integrated-verification entry unless a real blocker forces earlier escalation
60
63
 
@@ -64,10 +67,12 @@ Use this skill after development begins whenever you are reviewing work, decidin
64
67
  - review technical quality, prompt alignment, architecture impact, and verification depth of the current work
65
68
  - during normal implementation iteration, always prefer fast local language-native or framework-native verification for the changed area instead of the selected stack's broad gate path
66
69
  - require the developer to set up and use the project-appropriate local test environment in the current working directory when normal local verification is needed
70
+ - require the developer to report the exact verification commands that were run and the concrete results they produced
67
71
  - require local runtime proof when relevant by starting the app or service through the selected stack's local run path and exercising the changed behavior directly rather than jumping to the broad gate path
68
72
  - if the local toolchain is missing, require the developer to install or enable it first; do not jump to the broad gate path during ordinary iteration just because local setup is inconvenient
69
73
  - do not accept hand-wavy claims that local verification is unavailable without a real setup attempt and clear explanation
70
74
  - for applicable UI-bearing work, require the selected stack's local UI/E2E tool on affected flows plus screenshot review or equivalent platform artifacts and explicit UI validation
75
+ - if the developer already ran the relevant targeted test or E2E command and reported it clearly, do not rerun the same command on the owner side unless the evidence is weak, contradictory, flaky, high-risk, or needed to answer a new question
71
76
  - if verification is weak, missing, or failing, require fixes and reruns before acceptance
72
77
  - if documentation or repo hygiene drifts, secrets leak, contracts drift, or frontend integrity is compromised, require cleanup before acceptance
73
78
  - keep looping until the current work is genuinely acceptable
@@ -101,6 +106,8 @@ Use evidence such as internal metadata files, structured Beads comments, verific
101
106
  - when scaffold includes prompt-critical security controls, acceptance requires real runtime or endpoint verification of the protection rather than helper-only or shape-only proof
102
107
  - for security-bearing scaffolds, require applicable rejection evidence such as stale replay rejection, nonce reuse rejection, CSRF rejection on protected mutations, lockout triggering when lockout is in scope, or equivalent proof that the control is truly enforced
103
108
  - scaffold acceptance also requires clean startup and teardown behavior in the selected runtime model; for Dockerized web projects this includes self-contained Compose namespacing and no unnecessary fragile `container_name` usage
109
+ - for Dockerized web projects, scaffold acceptance also requires collision-resistant shared-machine defaults: only the primary app-facing port exposed to host by default, internal services not bound to host without prompt need, default host binding on `127.0.0.1`, and either random host-port assignment or a real free-port fallback when fixed ports are required
110
+ - for Dockerized web projects, scaffold acceptance also requires deterministic non-secret local-only default credentials in runtime configuration when startup or tests depend on credentials, and those defaults must not live in `.env` files or Dockerfile image layers
104
111
  - for Dockerized web backend/fullstack projects, scaffold acceptance is not complete until the owner has actually run `docker compose up --build` and `./run_tests.sh` once successfully after scaffold completion
105
112
  - module implementation requires platform-appropriate local verification and selected-stack UI/E2E evidence when UI-bearing flows are material
106
113
  - module implementation acceptance should challenge tenant isolation, path confinement, sanitized error behavior, prototype residue, integration seams, and cross-cutting consistency when those concerns are in scope
@@ -41,6 +41,10 @@ For Dockerized web backend/fullstack projects:
41
41
  - `./run_tests.sh` must run the broad full-test path through Docker
42
42
  - local non-Docker tests should still exist for normal development work
43
43
  - final broad verification should use the Dockerized `./run_tests.sh` path, not only local test commands
44
+ - keep Compose isolation safe for shared machines: no unnecessary `container_name`, unique `COMPOSE_PROJECT_NAME`, and Compose-scoped image/network/volume naming
45
+ - expose only the primary app-facing port to host by default, bind it to `127.0.0.1`, and keep databases/cache/internal services off host ports unless truly required
46
+ - prefer random host-port assignment by default so parallel local projects do not collide; if a fixed host port is truly required, support override plus free-port fallback in the runtime or test wrapper
47
+ - add healthchecks and wait for service readiness before tests or dependent startup steps proceed
44
48
 
45
49
  When `docker compose up --build` is not the runtime contract, provide `./run_app.sh` as the single primary runtime wrapper.
46
50
 
@@ -74,6 +78,8 @@ Selected-stack defaults:
74
78
  - Do not rely on `.env`, `.env.local`, `.env.example`, or similar files for project startup.
75
79
  - Do not hardcode secrets.
76
80
  - If runtime env-file format is required, generate it ephemerally and do not commit or package it.
81
+ - If Dockerized dev/test startup or tests require credentials, provide deterministic non-secret local-only default values through Docker runtime configuration so `docker compose up --build` and `./run_tests.sh` do not fail on missing credentials.
82
+ - Keep those Dockerized dev/test default credentials out of Dockerfile image layers.
77
83
 
78
84
  Selected-stack secret/config defaults:
79
85
 
@@ -2,10 +2,32 @@
2
2
 
3
3
  import argparse
4
4
  import json
5
+ import re
5
6
  from pathlib import Path
6
7
  from typing import Any
7
8
 
8
9
 
10
+ SUBAGENT_TITLE_SUFFIX = re.compile(r"\s+\(@[^)]*subagent\)\s*$")
11
+
12
+
13
+ def clean_title(title: Any) -> Any:
14
+ if not isinstance(title, str):
15
+ return title
16
+ return SUBAGENT_TITLE_SUFFIX.sub("", title)
17
+
18
+
19
+ def clean_message_info(info: Any) -> Any:
20
+ if not isinstance(info, dict):
21
+ return info
22
+
23
+ cleaned = dict(info)
24
+ tools = cleaned.get("tools")
25
+ if isinstance(tools, dict) and tools and all(value is False for value in tools.values()):
26
+ cleaned.pop("tools", None)
27
+
28
+ return cleaned
29
+
30
+
9
31
  def strip_parent_id(data: Any) -> Any:
10
32
  if not isinstance(data, dict):
11
33
  raise ValueError("Expected top-level JSON object")
@@ -20,13 +42,30 @@ def strip_parent_id(data: Any) -> Any:
20
42
  # Remove only the session-level parent marker. Message-level parentIDs
21
43
  # are preserved so the conversation structure remains intact.
22
44
  cleaned_info.pop("parentID", None)
45
+ cleaned_info.pop("permission", None)
46
+ cleaned_info["title"] = clean_title(cleaned_info.get("title"))
23
47
  cleaned["info"] = cleaned_info
48
+
49
+ messages = cleaned.get("messages")
50
+ if isinstance(messages, list):
51
+ cleaned_messages = []
52
+ for message in messages:
53
+ if not isinstance(message, dict):
54
+ cleaned_messages.append(message)
55
+ continue
56
+
57
+ cleaned_message = dict(message)
58
+ cleaned_message["info"] = clean_message_info(message.get("info"))
59
+ cleaned_messages.append(cleaned_message)
60
+
61
+ cleaned["messages"] = cleaned_messages
62
+
24
63
  return cleaned
25
64
 
26
65
 
27
66
  def parse_args() -> argparse.Namespace:
28
67
  parser = argparse.ArgumentParser(
29
- description="Remove the top-level parentID from an OpenCode session export."
68
+ description="Remove subagent-only top-level metadata from an OpenCode session export."
30
69
  )
31
70
  parser.add_argument("input", type=Path, help="Path to the source session JSON file")
32
71
  parser.add_argument(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "theslopmachine",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "SlopMachine installer and project bootstrap CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/constants.js CHANGED
@@ -2,7 +2,7 @@ import os from "node:os";
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
 
5
- export const PACKAGE_VERSION = "0.4.3";
5
+ export const PACKAGE_VERSION = "0.4.5";
6
6
  export const OPCODE_VERSION = "1.3.5";
7
7
  export const BR_VERSION = "0.1.34";
8
8
  export const PACKAGE_ROOT = path.resolve(
package/src/init.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import fs from 'node:fs/promises'
2
+ import { randomUUID } from 'node:crypto'
2
3
  import path from 'node:path'
3
4
 
4
5
  import { buildPaths } from './constants.js'
@@ -150,12 +151,59 @@ async function runWorkflowBootstrap(paths, targetPath, trackerScript) {
150
151
  }
151
152
 
152
153
  async function createRepoStructure(targetPath, agentsTemplate) {
154
+ log('Creating parent workflow directories')
155
+ await ensureDir(path.join(targetPath, 'docs'))
156
+ await ensureDir(path.join(targetPath, 'sessions'))
157
+
153
158
  log('Creating repo/ working directory')
154
159
  await ensureDir(path.join(targetPath, 'repo'))
155
160
 
156
161
  log('Copying AGENTS template into repo/')
157
162
  await fs.copyFile(agentsTemplate, path.join(targetPath, 'repo', 'AGENTS.md'))
158
163
 
164
+ const projectMetadataPath = path.join(targetPath, 'metadata.json')
165
+ if (!(await pathExists(projectMetadataPath))) {
166
+ log('Creating parent metadata.json')
167
+ await fs.writeFile(projectMetadataPath, `${JSON.stringify({
168
+ prompt: null,
169
+ project_type: null,
170
+ frontend_language: null,
171
+ backend_language: null,
172
+ database: null,
173
+ session_id: null,
174
+ frontend_framework: null,
175
+ backend_framework: null,
176
+ }, null, 2)}\n`, 'utf8')
177
+ }
178
+
179
+ const workflowMetadataPath = path.join(targetPath, '.ai', 'metadata.json')
180
+ if (!(await pathExists(workflowMetadataPath))) {
181
+ log('Creating .ai/metadata.json')
182
+ await fs.writeFile(workflowMetadataPath, `${JSON.stringify({
183
+ run_id: randomUUID(),
184
+ current_phase: null,
185
+ awaiting_human: false,
186
+ clarification_approved: false,
187
+ remediation_round: 0,
188
+ clarification_validator_session_id: null,
189
+ evaluation_pass: 0,
190
+ backend_evaluation_session_id: null,
191
+ frontend_evaluation_session_id: null,
192
+ last_evaluation_session_id: null,
193
+ backend_evaluation_report_path: null,
194
+ frontend_evaluation_report_path: null,
195
+ passed_evaluation_tracks: [],
196
+ developer_sessions: [],
197
+ active_developer_session_id: null,
198
+ next_develop_session_number: 1,
199
+ next_bugfix_session_number: 1,
200
+ submission_completed: false,
201
+ }, null, 2)}\n`, 'utf8')
202
+ }
203
+
204
+ await fs.writeFile(path.join(targetPath, '.ai', 'artifacts', '.gitkeep'), '', 'utf8')
205
+ await fs.writeFile(path.join(targetPath, 'docs', '.gitkeep'), '', 'utf8')
206
+ await fs.writeFile(path.join(targetPath, 'sessions', '.gitkeep'), '', 'utf8')
159
207
  await fs.writeFile(path.join(targetPath, 'repo', '.gitkeep'), '', 'utf8')
160
208
  }
161
209