theslopmachine 0.4.9 → 0.5.0

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/README.md CHANGED
@@ -1,234 +1,256 @@
1
1
  # theslopmachine
2
2
 
3
- `theslopmachine` is an installer and bootstrap CLI for the SlopMachine OpenCode workflow. It installs the packaged owner/developer agents, required skills, workflow support files, and project bootstrap logic needed to start a new SlopMachine-managed repository.
3
+ `theslopmachine` installs and bootstraps the SlopMachine workflow for OpenCode.
4
4
 
5
- ## Features
5
+ It configures:
6
6
 
7
- - installs packaged OpenCode agents into `~/.config/opencode/agents/`
8
- - installs packaged skills into `~/.agents/skills/`
9
- - installs packaged workflow support files into `~/slopmachine/`
10
- - bootstraps a new project workspace with `repo/`, `docs/`, `sessions/`, `metadata.json`, `AGENTS.md`, and initialized `br` state
11
- - configures required OpenCode plugins and MCP entries without overwriting existing `context7` or `exa` configuration
12
-
13
- ## Installation
7
+ - the `slopmachine` owner agent
8
+ - the `developer` implementation agent
9
+ - required skills under `~/.agents/skills/`
10
+ - workflow support files under `~/slopmachine/`
11
+ - OpenCode MCP entries for `context7` and `exa`
14
12
 
15
- Requirements:
13
+ ## Requirements
16
14
 
17
15
  - Node.js 18+
18
16
  - `git`
19
- - Docker running on the machine
20
- - `curl` on Unix-like systems for automatic `br` installation
17
+ - Docker
18
+ - `python3`
19
+ - `opencode`
20
+ - `br` (`beads_rust`)
21
+
22
+ `slopmachine setup` verifies or installs what it can.
23
+
24
+ ## Install
21
25
 
22
- Build and install the package:
26
+ From this package directory:
23
27
 
24
28
  ```bash
25
29
  npm install
26
30
  npm run check
27
31
  npm pack
28
- npm install -g ./theslopmachine-<version>.tgz
32
+ npm install -g ./theslopmachine-0.5.0.tgz
29
33
  ```
30
34
 
31
- `package.json` is the package-version source of truth. The packed tarball name and CLI version banner both derive from that version.
32
-
33
- For local package development instead of global install:
35
+ For local development instead:
34
36
 
35
37
  ```bash
36
38
  npm link
37
39
  ```
38
40
 
39
- The published package is intentionally source-only. It packages only `bin/`, `src/`, `assets/`, `README.md`, `RELEASE.md`, and `MANUAL.md`.
41
+ ## Commands
40
42
 
41
- ## Setup
43
+ ### `slopmachine setup`
42
44
 
43
- Run machine setup:
45
+ Use this once per machine, then rerun any time you want to refresh packaged assets.
44
46
 
45
47
  ```bash
46
48
  slopmachine setup
47
49
  ```
48
50
 
49
- `setup` does the following:
51
+ What it does:
50
52
 
51
- - installs `opencode-ai@latest` when missing and refreshes it to `@latest` when already present
52
- - installs or verifies `br` (`beads_rust`)
53
- - installs or refreshes packaged agents
54
- - installs or refreshes packaged skills
55
- - installs or refreshes packaged workflow files into `~/slopmachine/`
53
+ - verifies or installs `opencode`
54
+ - verifies `br`, `git`, `python3`, and Docker
55
+ - installs packaged agents into `~/.config/opencode/agents/`
56
+ - installs packaged skills into `~/.agents/skills/`
57
+ - installs workflow files into `~/slopmachine/`
56
58
  - updates `~/.config/opencode/opencode.json`
57
- - prompts for missing MCP API keys when needed
59
+ - ensures packaged MCP entries for `context7` and `exa`
60
+ - optionally asks for an upload token if one is not already stored
61
+
62
+ Notes:
58
63
 
59
- To refresh an existing machine install to the latest published package in one step:
64
+ - existing upload token is preserved and setup skips that prompt when one already exists
65
+ - existing `context7` and `exa` entries are preserved if already configured
66
+ - package-managed assets are refreshed on rerun
67
+
68
+ ### `slopmachine init`
69
+
70
+ Use this in a new or empty project directory to create a SlopMachine workspace.
60
71
 
61
72
  ```bash
62
- slopmachine upgrade
73
+ mkdir my-project
74
+ cd my-project
75
+ slopmachine init
63
76
  ```
64
77
 
65
- `slopmachine upgrade` installs `theslopmachine@latest` globally and then runs `slopmachine setup` automatically.
78
+ Or open OpenCode immediately after bootstrap:
66
79
 
67
- If `opencode` was newly installed, open a fresh terminal before running OpenCode commands.
80
+ ```bash
81
+ slopmachine init -o
82
+ ```
68
83
 
69
- MCP API keys:
84
+ What it creates:
70
85
 
71
- - Context7: `https://context7.com`
72
- - Exa: `https://exa.ai`
86
+ - `repo/`
87
+ - `docs/`
88
+ - `sessions/`
89
+ - `metadata.json`
90
+ - `.ai/metadata.json`
91
+ - root `.beads/`
92
+ - `repo/AGENTS.md`
73
93
 
74
- Codex login with OpenCode:
94
+ Important details:
75
95
 
76
- ```bash
77
- opencode auth login -p codex
78
- ```
96
+ - `run_id` is created in `.ai/metadata.json`
97
+ - the workspace root is the parent directory containing `repo/`
98
+ - Beads lives in the workspace root, not inside `repo/`
99
+
100
+ ### `slopmachine set-token`
79
101
 
80
- Optional verification:
102
+ Stores the upload token used by `send-data`.
81
103
 
82
104
  ```bash
83
- opencode auth list
105
+ slopmachine set-token
84
106
  ```
85
107
 
86
- ## Startup
108
+ Behavior:
87
109
 
88
- Create and initialize a new project workspace in a new or empty directory:
110
+ - prompts for the plaintext upload token
111
+ - stores it in `~/.config/slopmachine/config.json`
112
+ - replaces an existing token if one is already stored
113
+ - does not validate the token over the network during entry
89
114
 
90
- ```bash
91
- mkdir my-project
92
- cd my-project
93
- slopmachine init
94
- ```
115
+ ### `slopmachine send-data <owner-session-id>`
95
116
 
96
- Or initialize and open OpenCode immediately:
117
+ Exports workflow artifacts and uploads them to the configured Supabase endpoint.
97
118
 
98
119
  ```bash
99
- mkdir my-project
100
- cd my-project
101
- slopmachine init -o
120
+ slopmachine send-data <owner-session-id>
102
121
  ```
103
122
 
104
- If you used plain `slopmachine init`, then continue with:
123
+ Supported options:
124
+
125
+ - `--dry-run`
126
+ - `--yes`
127
+ - `--label <text>`
128
+ - `--project-id <id>`
129
+ - `--output <path>`
130
+ - `--endpoint <url>`
131
+
132
+ Examples:
105
133
 
106
134
  ```bash
107
- cd repo
108
- opencode
135
+ slopmachine send-data ses_abc123
136
+ slopmachine send-data ses_abc123 --dry-run
137
+ slopmachine send-data ses_abc123 --yes --label sprint-12
138
+ slopmachine send-data ses_abc123 --endpoint "https://<project-ref>.supabase.co/functions/v1/slopmachine-upload"
109
139
  ```
110
140
 
111
- Inside OpenCode, select the `slopmachine` agent to start the workflow.
141
+ Where to run it:
112
142
 
113
- Bootstrapped workspace layout:
143
+ - preferred: workspace root
144
+ - also supported: `repo/`
114
145
 
115
- - `repo/` for the working codebase
116
- - `docs/` for workflow documentation and evidence
117
- - `sessions/` for exported session artifacts
118
- - `metadata.json` for project workflow metadata
119
- - `repo/AGENTS.md` for the repo-local agent instructions
146
+ If run from `repo/`, the command resolves the parent workspace root automatically.
120
147
 
121
- `slopmachine init` creates the initial git commit so the workspace starts from a clean tree.
148
+ What it exports live:
122
149
 
123
- ## Testing
150
+ - owner session from the positional `owner-session-id`
151
+ - developer sessions from `.ai/metadata.json`
152
+ - `beads-export.json` from root `.beads/`
124
153
 
125
- Package-level checks:
154
+ What it includes when present:
126
155
 
127
- ```bash
128
- npm run check
129
- npm pack --dry-run
130
- ```
156
+ - `self-test-run.md`
157
+ - `self-test-fixes.md`
158
+ - `retrospective-<run_id>.md`
159
+ - `improvement-actions-<run_id>.md`
160
+ - `metadata.json`
161
+ - `ai-metadata.json`
162
+ - `manifest.json`
131
163
 
132
- Generated project conventions:
164
+ Fail-fast conditions:
133
165
 
134
- - every bootstrapped project must expose one primary runtime command
135
- - every bootstrapped project must expose one primary broad test command: `./run_tests.sh`
136
- - for Dockerized web backend or fullstack projects, the expected broad runtime command is `docker compose up --build`
137
- - for non-Docker runtime cases, the expected broad runtime command is usually `./run_app.sh`
166
+ - missing owner session id argument
167
+ - missing `.ai/metadata.json`
168
+ - missing `run_id`
169
+ - missing tracked developer session ids
170
+ - owner session export failure
171
+ - developer session export failure
138
172
 
139
- Verification policy:
173
+ Warn-only conditions:
140
174
 
141
- - use local fast verification during normal development
142
- - treat `./run_tests.sh` as a broad gate, not an ordinary every-step verification command
143
- - for Dockerized web backend and fullstack projects, scaffold acceptance should establish both `docker compose up --build` and `./run_tests.sh`
175
+ - missing `self-test-run.md`
176
+ - missing `self-test-fixes.md`
177
+ - missing retrospective files
144
178
 
145
- ## Architecture
179
+ Output behavior:
146
180
 
147
- Operating model:
181
+ - creates a flat zip archive
182
+ - keeps the local zip by default
183
+ - default zip path:
184
+ - `~/slopmachine/retrospectives/send-data-<run_id>.zip`
185
+ - shows a preview before upload unless `--yes` is passed
148
186
 
149
- - `slopmachine` is the owner and orchestrator
150
- - `developer` is the implementation worker
151
- - detailed workflow behavior is primarily carried by loaded skills rather than one monolithic owner prompt
187
+ ## Config Files
152
188
 
153
- High-level lifecycle:
189
+ Machine-level config:
154
190
 
155
- 1. `P0 Intake and Setup`
156
- 2. `P1 Clarification`
157
- 3. `P2 Planning`
158
- 4. `P3 Scaffold`
159
- 5. `P4 Development`
160
- 6. `P5 Integrated Verification`
161
- 7. `P6 Hardening`
162
- 8. `P7 Evaluation and Fix Verification`
163
- 9. `P8 Final Human Decision`
164
- 10. `P9 Submission Packaging`
165
- 11. `P10 Retrospective`
191
+ - `~/.config/slopmachine/config.json`
166
192
 
167
- Design constraints:
193
+ Current schema:
168
194
 
169
- - keep the owner shell small and load phase-specific skills when needed
170
- - prefer targeted reads and focused local verification during implementation
171
- - keep environment-specific state out of the package
172
- - do not package local runtime artifacts, caches, editor folders, or generated dependency environments
173
-
174
- Database dependency rule:
195
+ ```json
196
+ {
197
+ "upload": {
198
+ "endpoint": "https://<project-ref>.supabase.co/functions/v1/slopmachine-upload",
199
+ "token": "sm_u_...",
200
+ "timeoutMs": 30000
201
+ }
202
+ }
203
+ ```
175
204
 
176
- - database dependencies must be provisioned by initialization scripts, migrations, container startup hooks, or equivalent runtime setup
177
- - do not hardcode database-specific environment state into packaged assets
178
- - do not ship database files such as `.db`, `.sqlite`, dumps, or seeded local database artifacts in the package
205
+ OpenCode config managed by setup:
179
206
 
180
- For this package specifically, the installer ships workflow logic and templates only. It does not ship database dependency files or packaged database state.
207
+ - `~/.config/opencode/opencode.json`
181
208
 
182
- ## Installed Configuration
209
+ Packaged MCPs managed by setup:
183
210
 
184
- Main locations:
211
+ - `context7`
212
+ - `exa`
185
213
 
186
- - agents: `~/.config/opencode/agents/`
187
- - skills: `~/.agents/skills/`
188
- - OpenCode config: `~/.config/opencode/opencode.json`
189
- - packaged workflow files: `~/slopmachine/`
214
+ ## Installed Assets
190
215
 
191
- Installed agents:
216
+ Agents:
192
217
 
193
218
  - `~/.config/opencode/agents/slopmachine.md`
194
219
  - `~/.config/opencode/agents/developer.md`
195
220
 
196
- Installed skills:
197
-
198
- - `~/.agents/skills/clarification-gate/`
199
- - `~/.agents/skills/developer-session-lifecycle/`
200
- - `~/.agents/skills/final-evaluation-orchestration/`
201
- - `~/.agents/skills/beads-operations/`
202
- - `~/.agents/skills/planning-guidance/`
203
- - `~/.agents/skills/planning-gate/`
204
- - `~/.agents/skills/scaffold-guidance/`
205
- - `~/.agents/skills/development-guidance/`
206
- - `~/.agents/skills/verification-gates/`
207
- - `~/.agents/skills/integrated-verification/`
208
- - `~/.agents/skills/hardening-gate/`
209
- - `~/.agents/skills/evaluation-triage/`
210
- - `~/.agents/skills/submission-packaging/`
211
- - `~/.agents/skills/retrospective-analysis/`
212
- - `~/.agents/skills/owner-evidence-discipline/`
213
- - `~/.agents/skills/report-output-discipline/`
214
- - `~/.agents/skills/frontend-design/`
215
-
216
- Installed workflow files under `~/slopmachine/`:
217
-
218
- - `backend-evaluation-prompt.md`
219
- - `frontend-evaluation-prompt.md`
220
- - `templates/AGENTS.md`
221
- - `workflow-init.js`
222
- - `utils/strip_session_parent.py`
223
- - `utils/convert_ai_session.py`
224
- - `utils/cleanup_delivery_artifacts.py`
225
-
226
- OpenCode config entries ensured by `setup`:
227
-
228
- - plugin: `oc-chatgpt-multi-auth`
229
- - MCP server: `chrome-devtools`
230
- - MCP server: `context7`
231
- - MCP server: `exa`
232
- - MCP server: `shadcn` disabled by default
233
-
234
- These are the user-editable locations if you want to customize agents, skills, plugins, or MCP configuration after setup.
221
+ Skills:
222
+
223
+ - installed under `~/.agents/skills/`
224
+
225
+ Workflow files:
226
+
227
+ - installed under `~/slopmachine/`
228
+
229
+ ## Verification
230
+
231
+ Package-level check:
232
+
233
+ ```bash
234
+ npm run check
235
+ ```
236
+
237
+ Basic machine verification:
238
+
239
+ ```bash
240
+ slopmachine --help
241
+ slopmachine set-token
242
+ slopmachine setup
243
+ ```
244
+
245
+ `send-data` verification:
246
+
247
+ ```bash
248
+ slopmachine send-data <owner-session-id> --dry-run --endpoint "https://<project-ref>.supabase.co/functions/v1/slopmachine-upload"
249
+ ```
250
+
251
+ ## Notes
252
+
253
+ - the upload token is machine-level state and is not stored in the repo
254
+ - the owner session id is currently supplied manually to `send-data`
255
+ - developer session ids come from `.ai/metadata.json`
256
+ - broad workflow files and session exports live at workspace root, not inside `repo/`
@@ -32,6 +32,7 @@ Read and follow `AGENTS.md` before implementing.
32
32
  - do real verification, not confidence theater
33
33
  - keep moving until the assigned work is materially complete or concretely blocked
34
34
  - do not stop for unnecessary intermediate check-ins
35
+ - use independent engineering judgment; do not behave like a passive worker waiting to be corrected later
35
36
 
36
37
  ## Requirements And Planning
37
38
 
@@ -41,6 +42,7 @@ Before coding:
41
42
  - surface meaningful ambiguity instead of silently guessing
42
43
  - make the plan concrete enough to drive real implementation
43
44
  - keep frontend/backend surfaces aligned when both sides matter
45
+ - check prompt-fit before reporting completion; if the requested result still has visible gaps, keep working or call them out explicitly
44
46
 
45
47
  Do not narrow scope for convenience.
46
48
 
@@ -53,6 +55,7 @@ Do not narrow scope for convenience.
53
55
  - keep repo-local docs and code structure statically reviewable; do not rely on runtime success alone to make the project understandable
54
56
  - keep the repo self-sufficient; do not make it depend on parent-directory docs or sibling artifacts for startup, build/preview, configuration, verification, or basic understanding
55
57
  - do not touch workflow or rulebook files such as `AGENTS.md` unless explicitly asked
58
+ - if the work changes acceptance-critical docs or contracts, review those docs yourself before replying instead of assuming the owner will catch inconsistencies later
56
59
 
57
60
  ## Verification Cadence
58
61
 
@@ -97,6 +100,19 @@ Selected-stack defaults:
97
100
  - use a shared validation/error-handling path when validation materially affects the flow
98
101
  - do not hide missing failure handling behind fake-success paths
99
102
 
103
+ ## Completion Preflight
104
+
105
+ Before reporting a planning package, scaffold, implementation slice, or fix round as ready, run this preflight yourself:
106
+
107
+ - prompt-fit: does the result still satisfy the original request without silent narrowing?
108
+ - consistency: do code, docs, route contracts, security notes, and runtime/test commands agree?
109
+ - flow completeness: are the user-facing and operator-facing flows touched by this work actually covered end to end?
110
+ - security and permissions: are auth, RBAC, object-level checks, sensitive actions, and audit implications handled where relevant?
111
+ - verification: did you run the strongest targeted checks that are appropriate without using owner-only broad gates?
112
+ - reviewability: can the owner review this work by reading the changed files and a small number of directly related files?
113
+
114
+ If any answer is no, fix it before replying or call out the blocker explicitly.
115
+
100
116
  ## Skills
101
117
 
102
118
  - use relevant framework or language skills when they materially help the current task
@@ -109,3 +125,13 @@ Selected-stack defaults:
109
125
  - always name the exact verification commands you ran and the concrete results they produced
110
126
  - if you ran no verification command for part of the work, say that explicitly instead of implying broader proof than you have
111
127
  - if a problem needs a real fix, fix it instead of explaining around it
128
+
129
+ Use this reply shape for substantive work:
130
+
131
+ 1. `Changed files` — exact files changed
132
+ 2. `What changed` — the concrete behavior/contract updates in those files
133
+ 3. `Why this should pass review` — prompt-fit and consistency check in 2-5 bullets
134
+ 4. `Verification` — exact commands run and exact results
135
+ 5. `Remaining risks` — only the real unresolved weaknesses, if any
136
+
137
+ Keep the reply compact. Point to the exact changed files and the narrow supporting files the owner should read next.
@@ -244,6 +244,8 @@ When talking to the developer:
244
244
  - keep prompts natural, sharp, and compact unless the moment really needs more context
245
245
  - translate workflow intent into normal software-project language
246
246
  - for each development slice or follow-up fix request, require the reply to state the exact verification commands that were run and the concrete results they produced
247
+ - require the developer to point to the exact changed files and the narrow supporting files worth review
248
+ - require the developer to self-check prompt-fit, consistency, and likely review defects before claiming readiness
247
249
 
248
250
  Do not leak workflow internals such as:
249
251
 
@@ -265,6 +267,11 @@ Do not speak as a relay for a third party.
265
267
  - read only what is needed to answer the current decision
266
268
  - keep comments and metadata auditable and specific
267
269
  - keep external docs owner-maintained as reference copies and repo-local docs developer-maintained for the repo's self-sufficient source of truth
270
+ - default review scope to the changed files and the specific supporting files named by the developer
271
+ - expand review scope only when a concrete inconsistency or missing dependency forces it
272
+ - avoid `grep` by default; prefer `glob` to identify exact files and `read` with targeted offsets
273
+ - use `grep` only for an exact low-cardinality string after the relevant file set is already known
274
+ - do not run broad parent-root searches during ordinary review when exact project files are already known
268
275
 
269
276
  ## Review Posture
270
277
 
@@ -100,14 +100,17 @@ If nothing material was unclear, still create `questions.md` and keep it minimal
100
100
 
101
101
  - compare the original prompt and the prepared clarification prompt using one dedicated `General` validation session, never the developer session
102
102
  - do not create a new validation session for every retry unless the session became unusable or a fundamental misunderstanding requires a clean restart
103
- - on the first validation pass, build one self-contained validation prompt block for that `General` session
104
- - on that first pass, include the full original prompt text, the full current questions or clarification record, and the full current `../.ai/clarification-prompt.md`
105
- - do not use placeholders such as `same as previous`, `from context`, `see above`, or `latest artifact`
103
+ - on the first validation pass, prefer a file-based validation request that points the validator to `../metadata.json`, `../docs/questions.md`, and `../.ai/clarification-prompt.md` and asks it to read those files directly
104
+ - in that first pass, use `../metadata.json` as the source of truth for the original prompt instead of re-inlining the full prompt body when file access is available
105
+ - if file access is unavailable or blocked, fall back to one self-contained validation prompt block that includes the full original prompt text, the full current questions record, and the full current `../.ai/clarification-prompt.md`
106
+ - do not use placeholders such as `same as previous`, `from context`, `see above`, or `latest artifact` when you are in the inline fallback mode
106
107
  - ask that `General` session whether the clarification prompt deviates from, weakens, narrows, or violates the original prompt in any way
107
108
  - require it to judge whether the clarification prompt is a genuine improvement in execution quality while remaining faithful to the original intent
108
109
  - if the validator suggests real fixes, patch the existing questions record and clarification prompt directly; do not restart the clarification phase from scratch unless the validator found a fundamental scope misunderstanding
109
110
  - treat validator output as a correction list, not as a reason to regenerate giant clarification blocks repeatedly
110
- - when rerunning validation in the same validator session, send only the improved clarification payload and the concrete fixes you made; do not resend the original prompt block if the session already has that context
111
+ - when rerunning validation in the same validator session, send only the updated file path(s), the concrete fixes you made, and a request to confirm that those fixes resolve the previously reported issues
112
+ - on reruns, do not resend the original prompt block if the validator session already has that context
113
+ - on reruns, do not resend unchanged file bodies; point to the updated clarification file and, when useful, the narrow changed section in `questions.md`
111
114
  - rerun validation only after applying the concrete fixes that matter
112
115
  - keep the validation loop bounded and intentional; prefer one strong pass plus a small number of revision cycles over repeated loose churn
113
116
  - once prompt-faithfulness is satisfied and the remaining notes are minor or cosmetic, stop iterating and proceed
@@ -17,63 +17,15 @@ This file is the repo-local engineering rulebook for `slopmachine` projects.
17
17
  - Do not call work complete while it is still shaky.
18
18
  - Reuse and extend shared cross-cutting patterns instead of inventing incompatible local ones.
19
19
 
20
- ## Verification Rules
20
+ ## Runtime And Verification
21
21
 
22
- - During ordinary iteration, prefer the fastest meaningful local verification for the changed area.
23
- - Prefer targeted unit, integration, module, route-family, or platform-appropriate local UI/E2E checks over broad reruns.
24
- - Do not rerun full Dockerized startup and the full test suite on every small change.
25
- - The broad owner-run project-standard verification path should be used sparingly, with a target budget of at most 3 times across the whole workflow cycle.
26
- - If you run a Docker-based verification command sequence, end it with `docker compose down` unless containers must remain up.
27
-
28
- Every project must expose:
29
-
30
- - one primary documented runtime command
31
- - one primary documented broad test command: `./run_tests.sh`
32
- - follow the original prompt and existing repository first for the runtime stack; `./run_tests.sh` should exist regardless of project type
33
- - the primary full-test command should install or prepare what it needs first when that setup is required for a clean environment
34
-
35
- For web projects, those are usually:
36
-
37
- - `docker compose up --build`
38
- - `./run_tests.sh`
39
-
40
- For web projects using the default Docker-first runtime model:
41
-
42
- - `./run_tests.sh` must run the broad full-test path through Docker
43
- - local non-Docker tests should still exist for normal development work
44
- - final broad verification should use the Dockerized `./run_tests.sh` path, not only local test commands
45
- - keep Compose isolation safe for shared machines: no unnecessary `container_name`, unique `COMPOSE_PROJECT_NAME`, and Compose-scoped image/network/volume naming
46
- - 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
47
- - 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
48
- - add healthchecks and wait for service readiness before tests or dependent startup steps proceed
49
-
50
- For web projects, default the runtime contract to `docker compose up --build` unless the prompt or existing repository clearly dictates another model.
51
-
52
- When `docker compose up --build` is not the runtime contract, provide `./run_app.sh` as the single primary runtime wrapper.
53
-
54
- For mobile, desktop, CLI, library, or other non-web projects, `./run_app.sh` should own the selected stack's runtime flow, while `./run_tests.sh` remains the single broad test wrapper calling the platform-equivalent full test path.
55
-
56
- ## Testing Rules
57
-
58
- - Tests must be real and tied to actual behavior.
59
- - Do not mock APIs for integration testing.
60
- - Use real HTTP requests against the actual running service surface for integration evidence.
61
- - For UI-bearing work, use the selected stack's local UI/E2E tool on affected flows and inspect screenshots or equivalent artifacts when practical.
62
- - Prefer TDD when the behavior is well defined and practical to drive test-first.
63
- - Where TDD is not practical, define the expected tests before implementation so coverage is intentional rather than retrofitted.
64
- - Keep repo-local `./docs/test-coverage.md` aligned with the real test surface. It should map major requirement or risk points to concrete tests, key assertions, coverage status, and remaining gaps.
65
- - For backend or fullstack projects, cover 401, 403, 404, conflict or duplicate submission when relevant, object-level authorization, tenant or user isolation, and sensitive-log exposure when those risks exist.
66
- - For frontend-bearing projects, build and use a layered frontend test story where relevant: unit, component, page/route integration, and E2E.
67
- - For non-trivial frontend projects, do not rely only on runtime or E2E proof; add component, page, route, or state-focused tests when UI state complexity is meaningful.
68
- - For frontend-bearing flows, keep required UI states statically visible and tested where relevant: loading, empty, submitting, disabled, success, error, and duplicate-action protection.
69
- - The project should normally reach roughly 90 percent meaningful coverage of the relevant behavior surface.
70
-
71
- Selected-stack defaults:
72
-
73
- - follow the original prompt and existing repository first; use the defaults below only when they do not already specify the platform or stack
74
- - web frontend/fullstack: Playwright for browser E2E/UI verification when applicable
75
- - mobile: Expo + React Native + TypeScript by default, with Jest plus React Native Testing Library for local tests and a platform-appropriate mobile UI/E2E tool when the flow needs it
76
- - desktop: Electron + Vite + TypeScript by default, with a project-standard local test runner plus Playwright's Electron support or another platform-appropriate desktop UI/E2E tool when the flow needs it
22
+ - Keep one primary documented runtime command and one primary broad test command: `./run_tests.sh`.
23
+ - Follow the original prompt and existing repository first for the runtime stack.
24
+ - Prefer the fastest meaningful local verification for the changed area during ordinary iteration.
25
+ - Do not rerun broad runtime/test commands on every small change.
26
+ - For web projects, default the runtime contract to `docker compose up --build` unless the prompt or existing repository clearly dictates another model.
27
+ - When `docker compose up --build` is not the runtime contract, provide `./run_app.sh` as the single primary runtime wrapper.
28
+ - If the project has database dependencies, keep `./init_db.sh` as the only project-standard database initialization path.
77
29
 
78
30
  ## Documentation Rules
79
31
 
@@ -82,11 +34,7 @@ Selected-stack defaults:
82
34
  - The README must clearly document whether the primary runtime command is `docker compose up --build` or `./run_app.sh`.
83
35
  - The README must clearly document `./run_tests.sh` as the broad test command.
84
36
  - The README must stand on its own for basic codebase use.
85
- - The README should summarize important API or service surfaces when useful, but the full API catalog belongs in repo-local `./docs/api-spec.md` when that doc applies.
86
37
  - Keep repo-local docs under `./docs/` when relevant, especially `./docs/reviewer-guide.md`, `./docs/test-coverage.md`, `./docs/security-boundaries.md`, `./docs/frontend-flow-matrix.md`, and `./docs/api-spec.md`.
87
- - `./docs/reviewer-guide.md` should make build/preview/config, app entry points, routes, major module boundaries, feature flags, debug/demo surfaces, mock/interception defaults, and logging/validation overview traceable from inside the repo.
88
- - `./docs/security-boundaries.md` should exist when auth, authorization, admin/debug, or isolation boundaries matter.
89
- - `./docs/frontend-flow-matrix.md` should exist when frontend pages, interactions, and state transitions are material.
90
38
  - The repo should be statically reviewable by a fresh reviewer: entry points, routes, config, test commands, and major module boundaries should be traceable from repository artifacts.
91
39
  - If the project uses mock, stub, fake, interception, or local-data behavior, the README must disclose that scope accurately.
92
40
  - If mock or interception behavior is enabled by default, the README must say so clearly.
@@ -94,31 +42,13 @@ Selected-stack defaults:
94
42
  - Do not let a mock-only or local-data-only project look like undisclosed real backend or production integration.
95
43
  - Do not hide missing failure handling behind fake-success paths.
96
44
 
97
- ## Logging And Validation Rules
98
-
99
- - Establish and use a shared logging path rather than random print-style debugging.
100
- - Logging should have meaningful categories or levels, support troubleshooting, and avoid sensitive-data leakage.
101
- - Establish and use a shared validation path when validation matters instead of inventing ad hoc rules in scattered files.
102
- - Keep validation and normalized user-facing error behavior traceable in repo-local code or docs.
103
-
104
45
  ## Secret And Runtime Rules
105
46
 
106
47
  - Do not create or keep `.env` files anywhere in the repo.
107
48
  - Do not rely on `.env`, `.env.local`, `.env.example`, or similar files for project startup.
108
49
  - Do not hardcode secrets.
109
50
  - If runtime env-file format is required, generate it ephemerally and do not commit or package it.
110
- - If the project has database dependencies, create and maintain `./init_db.sh` as the only project-standard database initialization path.
111
- - If the project has database dependencies, create `./init_db.sh` during scaffold and keep expanding it as the real schema, migrations, bootstrap data, and other database dependencies become known.
112
- - If the project has database dependencies, use `./init_db.sh` from runtime and test entrypoints whenever database preparation is required.
113
51
  - Do not hardcode database connection values or database bootstrap values anywhere in the repo.
114
- - When auth or access control matters, keep the real security boundaries statically traceable in code and docs: auth entry points, route authorization, object authorization, function-level authorization, admin/debug protection, and tenant or user isolation where applicable.
115
-
116
- Selected-stack secret/config defaults:
117
-
118
- - follow the original prompt and existing repository first; use the defaults below only when they do not already specify the platform or stack
119
- - web Dockerized services: use Docker/runtime-provided variables, never committed env files
120
- - mobile apps: do not bundle real secrets into the client; use app config only for non-secret public configuration and keep real secrets server-side or in platform-appropriate secure storage when user/device secrets must be stored at runtime
121
- - desktop apps: keep sensitive values in main-process/runtime configuration or platform-appropriate secure storage, and do not expose them to the renderer by default
122
52
 
123
53
  ## Product Integrity Rules
124
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "theslopmachine",
3
- "version": "0.4.9",
3
+ "version": "0.5.0",
4
4
  "description": "SlopMachine installer and project bootstrap CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",