theslopmachine 0.4.6 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/MANUAL.md +13 -12
  2. package/README.md +111 -117
  3. package/RELEASE.md +6 -3
  4. package/assets/agents/developer.md +12 -1
  5. package/assets/agents/slopmachine.md +27 -114
  6. package/assets/skills/developer-session-lifecycle/SKILL.md +12 -31
  7. package/assets/skills/development-guidance/SKILL.md +21 -2
  8. package/assets/skills/evaluation-triage/SKILL.md +24 -63
  9. package/assets/skills/final-evaluation-orchestration/SKILL.md +53 -50
  10. package/assets/skills/hardening-gate/SKILL.md +18 -0
  11. package/assets/skills/integrated-verification/SKILL.md +5 -0
  12. package/assets/skills/planning-gate/SKILL.md +28 -2
  13. package/assets/skills/planning-guidance/SKILL.md +42 -10
  14. package/assets/skills/retrospective-analysis/SKILL.md +5 -5
  15. package/assets/skills/scaffold-guidance/SKILL.md +29 -8
  16. package/assets/skills/submission-packaging/SKILL.md +63 -227
  17. package/assets/skills/verification-gates/SKILL.md +46 -11
  18. package/assets/slopmachine/backend-evaluation-prompt.md +257 -206
  19. package/assets/slopmachine/frontend-evaluation-prompt.md +368 -282
  20. package/assets/slopmachine/templates/AGENTS.md +37 -5
  21. package/assets/slopmachine/utils/cleanup_delivery_artifacts.py +124 -0
  22. package/package.json +1 -1
  23. package/src/constants.js +5 -7
  24. package/src/init.js +35 -11
  25. package/assets/skills/remediation-guidance/SKILL.md +0 -31
  26. package/assets/skills/session-rollover/SKILL.md +0 -55
  27. package/assets/slopmachine/document-completeness.md +0 -59
  28. package/assets/slopmachine/engineering-results.md +0 -63
  29. package/assets/slopmachine/implementation-comparison.md +0 -43
  30. package/assets/slopmachine/quality-document.md +0 -67
package/MANUAL.md CHANGED
@@ -23,7 +23,7 @@ The installed agent set includes the current `slopmachine` and `developer` agent
23
23
 
24
24
  ## Start a project
25
25
 
26
- Inside the project root, run:
26
+ Inside a new or empty project directory, run:
27
27
 
28
28
  ```bash
29
29
  slopmachine init
@@ -43,25 +43,26 @@ slopmachine init -o
43
43
  - bootstraps beads_rust (`br`)
44
44
  - creates `repo/`
45
45
  - copies the packaged repo rulebook into `repo/AGENTS.md`
46
- - creates the initial git checkpoint
46
+ - creates the initial git commit so the workspace starts with a clean tree
47
47
  - optionally opens `opencode` in `repo/`
48
48
 
49
49
  ## Rough workflow
50
50
 
51
- 1. Clarification
52
- 2. Planning
53
- 3. Scaffold/foundation
54
- 4. Development
55
- 5. Integrated verification
56
- 6. Hardening
57
- 7. Evaluation and triage
58
- 8. Final human decision
59
- 9. Remediation when needed
51
+ 1. Intake and setup
52
+ 2. Clarification
53
+ 3. Planning
54
+ 4. Scaffold/foundation
55
+ 5. Development
56
+ 6. Integrated verification
57
+ 7. Hardening
58
+ 8. Evaluation and fix verification
59
+ 9. Final human decision
60
60
  10. Submission packaging
61
+ 11. Retrospective
61
62
 
62
63
  ## Important notes
63
64
 
64
65
  - theslopmachine depends on OpenCode, beads_rust (`br`), git, python3, and Docker being available.
65
66
  - The workflow-owner agents use mandatory skills for specific phases; skipping them is considered a workflow failure.
66
67
  - `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.
68
+ - Submission packaging collects the final docs, accepted evaluation reports, cleaned session exports, converted session traces, and the cleaned repo into the required final structure.
package/README.md CHANGED
@@ -1,62 +1,46 @@
1
1
  # theslopmachine
2
2
 
3
- `theslopmachine` installs the SlopMachine owner/developer workflow into OpenCode, sets up the required support files on your machine, and bootstraps new project workspaces.
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.
4
4
 
5
- **Quickstart**
5
+ ## Features
6
6
 
7
- This is the full machine-to-project flow:
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
8
12
 
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
13
+ ## Installation
16
14
 
17
- ## Requirements
15
+ Requirements:
18
16
 
19
17
  - Node.js 18+
20
18
  - `git`
21
19
  - Docker running on the machine
22
- - `curl` on Unix-like systems for automatic `br` install
20
+ - `curl` on Unix-like systems for automatic `br` installation
23
21
 
24
- `slopmachine setup` can install or verify:
25
-
26
- - `opencode`
27
- - `br` (`beads_rust`)
28
-
29
- ## 1. Install The Package
30
-
31
- From this package directory:
22
+ Build and install the package:
32
23
 
33
24
  ```bash
34
25
  npm install
35
26
  npm run check
36
27
  npm pack
28
+ npm install -g ./theslopmachine-<version>.tgz
37
29
  ```
38
30
 
39
- That produces a tarball such as:
40
-
41
- ```bash
42
- theslopmachine-0.4.5.tgz
43
- ```
44
-
45
- Install it globally:
46
-
47
- ```bash
48
- npm install -g ./theslopmachine-0.4.5.tgz
49
- ```
31
+ `package.json` is the package-version source of truth. The packed tarball name and CLI version banner both derive from that version.
50
32
 
51
- For local package development instead:
33
+ For local package development instead of global install:
52
34
 
53
35
  ```bash
54
36
  npm link
55
37
  ```
56
38
 
57
- ## 2. Run Setup
39
+ The published package is intentionally source-only. It packages only `bin/`, `src/`, `assets/`, `README.md`, `RELEASE.md`, and `MANUAL.md`.
58
40
 
59
- Run this once per machine, or rerun it any time you want to refresh packaged assets:
41
+ ## Setup
42
+
43
+ Run machine setup:
60
44
 
61
45
  ```bash
62
46
  slopmachine setup
@@ -64,47 +48,36 @@ slopmachine setup
64
48
 
65
49
  `setup` does the following:
66
50
 
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/`
51
+ - installs or verifies `opencode`
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/`
71
56
  - updates `~/.config/opencode/opencode.json`
72
- - prompts for missing Context7 and Exa MCP API keys
73
-
74
- If `setup` installs `opencode` for the first time, open a fresh terminal before running `opencode` commands.
57
+ - prompts for missing MCP API keys when needed
75
58
 
76
- ## 3. Get MCP API Keys
59
+ If `opencode` was newly installed, open a fresh terminal before running OpenCode commands.
77
60
 
78
- During `slopmachine setup`, you may be prompted for:
61
+ MCP API keys:
79
62
 
80
63
  - Context7: `https://context7.com`
81
64
  - Exa: `https://exa.ai`
82
65
 
83
- You can leave either blank and add it later by editing:
84
-
85
- ```bash
86
- ~/.config/opencode/opencode.json
87
- ```
88
-
89
- If `context7` or `exa` is already configured in `opencode.json`, `setup` leaves the existing entries in place.
90
-
91
- ## 4. Log Into Codex With OpenCode
92
-
93
- Authenticate OpenCode against Codex:
66
+ Codex login with OpenCode:
94
67
 
95
68
  ```bash
96
69
  opencode auth login -p codex
97
70
  ```
98
71
 
99
- Optional check:
72
+ Optional verification:
100
73
 
101
74
  ```bash
102
75
  opencode auth list
103
76
  ```
104
77
 
105
- ## 5. Initialize A Project Workspace
78
+ ## Startup
106
79
 
107
- Create a new workspace directory and bootstrap it:
80
+ Create and initialize a new project workspace in a new or empty directory:
108
81
 
109
82
  ```bash
110
83
  mkdir my-project
@@ -112,58 +85,110 @@ cd my-project
112
85
  slopmachine init
113
86
  ```
114
87
 
115
- This creates:
116
-
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
123
-
124
- If you want `init` to open OpenCode automatically in `repo/`, use:
88
+ Or initialize and open OpenCode immediately:
125
89
 
126
90
  ```bash
91
+ mkdir my-project
92
+ cd my-project
127
93
  slopmachine init -o
128
94
  ```
129
95
 
130
- ## 6. Enter `repo/`
131
-
132
- If you used plain `slopmachine init`, move into the working repository:
96
+ If you used plain `slopmachine init`, then continue with:
133
97
 
134
98
  ```bash
135
99
  cd repo
100
+ opencode
136
101
  ```
137
102
 
138
- ## 7. Start OpenCode
103
+ Inside OpenCode, select the `slopmachine` agent to start the workflow.
139
104
 
140
- Start OpenCode inside `repo/`:
105
+ Bootstrapped workspace layout:
106
+
107
+ - `repo/` for the working codebase
108
+ - `docs/` for workflow documentation and evidence
109
+ - `sessions/` for exported session artifacts
110
+ - `metadata.json` for project workflow metadata
111
+ - `repo/AGENTS.md` for the repo-local agent instructions
112
+
113
+ `slopmachine init` creates the initial git commit so the workspace starts from a clean tree.
114
+
115
+ ## Testing
116
+
117
+ Package-level checks:
141
118
 
142
119
  ```bash
143
- opencode
120
+ npm run check
121
+ npm pack --dry-run
144
122
  ```
145
123
 
146
- Then select the `slopmachine` agent and begin the workflow.
124
+ Generated project conventions:
125
+
126
+ - every bootstrapped project must expose one primary runtime command
127
+ - every bootstrapped project must expose one primary broad test command: `./run_tests.sh`
128
+ - for Dockerized web backend or fullstack projects, the expected broad runtime command is `docker compose up --build`
129
+ - for non-Docker runtime cases, the expected broad runtime command is usually `./run_app.sh`
130
+
131
+ Verification policy:
147
132
 
148
- The normal operating split is:
133
+ - use local fast verification during normal development
134
+ - treat `./run_tests.sh` as a broad gate, not an ordinary every-step verification command
135
+ - for Dockerized web backend and fullstack projects, scaffold acceptance should establish both `docker compose up --build` and `./run_tests.sh`
149
136
 
150
- - `slopmachine` is the owner/orchestrator
137
+ ## Architecture
138
+
139
+ Operating model:
140
+
141
+ - `slopmachine` is the owner and orchestrator
151
142
  - `developer` is the implementation worker
143
+ - detailed workflow behavior is primarily carried by loaded skills rather than one monolithic owner prompt
144
+
145
+ High-level lifecycle:
146
+
147
+ 1. `P0 Intake and Setup`
148
+ 2. `P1 Clarification`
149
+ 3. `P2 Planning`
150
+ 4. `P3 Scaffold`
151
+ 5. `P4 Development`
152
+ 6. `P5 Integrated Verification`
153
+ 7. `P6 Hardening`
154
+ 8. `P7 Evaluation and Fix Verification`
155
+ 9. `P8 Final Human Decision`
156
+ 10. `P9 Submission Packaging`
157
+ 11. `P10 Retrospective`
158
+
159
+ Design constraints:
160
+
161
+ - keep the owner shell small and load phase-specific skills when needed
162
+ - prefer targeted reads and focused local verification during implementation
163
+ - keep environment-specific state out of the package
164
+ - do not package local runtime artifacts, caches, editor folders, or generated dependency environments
165
+
166
+ Database dependency rule:
167
+
168
+ - database dependencies must be provisioned by initialization scripts, migrations, container startup hooks, or equivalent runtime setup
169
+ - do not hardcode database-specific environment state into packaged assets
170
+ - do not ship database files such as `.db`, `.sqlite`, dumps, or seeded local database artifacts in the package
152
171
 
153
- ## Configured Items
172
+ For this package specifically, the installer ships workflow logic and templates only. It does not ship database dependency files or packaged database state.
154
173
 
155
- These are the main files and directories `setup` configures.
174
+ ## Installed Configuration
156
175
 
157
- ### OpenCode Agents
176
+ Main locations:
177
+
178
+ - agents: `~/.config/opencode/agents/`
179
+ - skills: `~/.agents/skills/`
180
+ - OpenCode config: `~/.config/opencode/opencode.json`
181
+ - packaged workflow files: `~/slopmachine/`
182
+
183
+ Installed agents:
158
184
 
159
185
  - `~/.config/opencode/agents/slopmachine.md`
160
186
  - `~/.config/opencode/agents/developer.md`
161
187
 
162
- ### OpenCode Skills
188
+ Installed skills:
163
189
 
164
190
  - `~/.agents/skills/clarification-gate/`
165
191
  - `~/.agents/skills/developer-session-lifecycle/`
166
- - `~/.agents/skills/session-rollover/`
167
192
  - `~/.agents/skills/final-evaluation-orchestration/`
168
193
  - `~/.agents/skills/beads-operations/`
169
194
  - `~/.agents/skills/planning-guidance/`
@@ -174,37 +199,23 @@ These are the main files and directories `setup` configures.
174
199
  - `~/.agents/skills/integrated-verification/`
175
200
  - `~/.agents/skills/hardening-gate/`
176
201
  - `~/.agents/skills/evaluation-triage/`
177
- - `~/.agents/skills/remediation-guidance/`
178
202
  - `~/.agents/skills/submission-packaging/`
179
203
  - `~/.agents/skills/retrospective-analysis/`
180
204
  - `~/.agents/skills/owner-evidence-discipline/`
181
205
  - `~/.agents/skills/report-output-discipline/`
182
206
  - `~/.agents/skills/frontend-design/`
183
207
 
184
- ### SlopMachine Support Files
185
-
186
- Installed under `~/slopmachine/`:
208
+ Installed workflow files under `~/slopmachine/`:
187
209
 
188
210
  - `backend-evaluation-prompt.md`
189
211
  - `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
212
  - `templates/AGENTS.md`
213
+ - `workflow-init.js`
196
214
  - `utils/strip_session_parent.py`
197
215
  - `utils/convert_ai_session.py`
216
+ - `utils/cleanup_delivery_artifacts.py`
198
217
 
199
- ### OpenCode Config
200
-
201
- Config file:
202
-
203
- ```bash
204
- ~/.config/opencode/opencode.json
205
- ```
206
-
207
- `setup` ensures these entries exist:
218
+ OpenCode config entries ensured by `setup`:
208
219
 
209
220
  - plugin: `oc-chatgpt-multi-auth`
210
221
  - MCP server: `chrome-devtools`
@@ -212,21 +223,4 @@ Config file:
212
223
  - MCP server: `exa`
213
224
  - MCP server: `shadcn` disabled by default
214
225
 
215
- If you want to customize agents, MCP settings, or plugins, these are the files to edit.
216
-
217
- ## Daily Use
218
-
219
- After the machine is set up, the common flow is:
220
-
221
- ```bash
222
- cd my-project/repo
223
- opencode
224
- ```
225
-
226
- Or for a brand new project in one shot:
227
-
228
- ```bash
229
- mkdir my-project
230
- cd my-project
231
- slopmachine init -o
232
- ```
226
+ These are the user-editable locations if you want to customize agents, skills, plugins, or MCP configuration after setup.
package/RELEASE.md CHANGED
@@ -39,16 +39,18 @@ Note:
39
39
  npm pack
40
40
  ```
41
41
 
42
- This should produce a tarball such as:
42
+ This should produce a tarball named like:
43
43
 
44
44
  ```bash
45
- theslopmachine-0.4.5.tgz
45
+ theslopmachine-<version>.tgz
46
46
  ```
47
47
 
48
+ `<version>` comes from `package.json`, which is the single package-version source of truth.
49
+
48
50
  ## Inspect package contents
49
51
 
50
52
  ```bash
51
- tar -tzf theslopmachine-0.4.5.tgz
53
+ tar -tzf theslopmachine-<version>.tgz
52
54
  ```
53
55
 
54
56
  Check that the tarball includes:
@@ -87,6 +89,7 @@ npm publish --dry-run
87
89
 
88
90
  ## Versioning
89
91
 
92
+ - `package.json` is the single package-version source of truth for the tarball name and CLI version banner
90
93
  - bump `package.json` version before each release
91
94
  - keep the CLI command as `slopmachine`
92
95
  - keep the npm package name as `theslopmachine`
@@ -49,7 +49,9 @@ Do not narrow scope for convenience.
49
49
  - implement real behavior, not placeholders
50
50
  - keep user-facing and admin-facing flows complete through their real surfaces
51
51
  - verify the changed area locally and realistically before reporting completion
52
- - update repo-local docs such as `README.md` when behavior or run/test instructions change
52
+ - update repo-local docs such as `README.md` and `./docs/*` when behavior or run/test instructions change
53
+ - keep repo-local docs and code structure statically reviewable; do not rely on runtime success alone to make the project understandable
54
+ - 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
53
55
  - do not touch workflow or rulebook files such as `AGENTS.md` unless explicitly asked
54
56
 
55
57
  ## Verification Cadence
@@ -85,6 +87,15 @@ Selected-stack defaults:
85
87
  - do not ship placeholder, demo, setup, or debug UI in product-facing screens
86
88
  - do not create `.env` files or similar env-file variants
87
89
  - do not hardcode secrets or leave prototype residue behind
90
+ - when the project has database dependencies, keep database setup in `./init_db.sh` rather than scattered repo logic
91
+ - do not hardcode database connection values or database bootstrap values anywhere in the repo
92
+ - if the project uses mock, stub, fake, or local-data behavior, disclose that scope accurately in the repo-local documentation instead of implying real backend or production behavior
93
+ - if mock or interception behavior is enabled by default, document that clearly
94
+ - disclose feature flags, debug/demo surfaces, and default enabled states clearly in repo-local docs when they exist
95
+ - keep frontend state requirements explicit in code and repo-local docs for prompt-critical flows
96
+ - use a shared logging path and avoid random print-style debugging as the durable implementation pattern
97
+ - use a shared validation/error-handling path when validation materially affects the flow
98
+ - do not hide missing failure handling behind fake-success paths
88
99
 
89
100
  ## Skills
90
101