theslopmachine 0.3.7 → 0.4.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/MANUAL.md +13 -9
- package/README.md +163 -3
- package/RELEASE.md +11 -3
- package/assets/agents/developer-v2.md +86 -0
- package/assets/agents/developer.md +21 -23
- package/assets/agents/slopmachine-v2.md +219 -0
- package/assets/agents/slopmachine.md +56 -38
- package/assets/skills/beads-operations/SKILL.md +32 -31
- package/assets/skills/beads-operations-v2/SKILL.md +82 -0
- package/assets/skills/clarification-gate/SKILL.md +8 -1
- package/assets/skills/clarification-gate-v2/SKILL.md +74 -0
- package/assets/skills/developer-session-lifecycle/SKILL.md +45 -14
- package/assets/skills/developer-session-lifecycle-v2/SKILL.md +148 -0
- package/assets/skills/development-guidance-v2/SKILL.md +60 -0
- package/assets/skills/evaluation-triage-v2/SKILL.md +38 -0
- package/assets/skills/final-evaluation-orchestration/SKILL.md +9 -11
- package/assets/skills/final-evaluation-orchestration-v2/SKILL.md +57 -0
- package/assets/skills/get-overlays/SKILL.md +77 -6
- package/assets/skills/hardening-gate-v2/SKILL.md +64 -0
- package/assets/skills/integrated-verification-v2/SKILL.md +47 -0
- package/assets/skills/owner-evidence-discipline-v2/SKILL.md +15 -0
- package/assets/skills/planning-gate/SKILL.md +6 -4
- package/assets/skills/planning-gate-v2/SKILL.md +91 -0
- package/assets/skills/planning-guidance-v2/SKILL.md +100 -0
- package/assets/skills/remediation-guidance-v2/SKILL.md +31 -0
- package/assets/skills/report-output-discipline-v2/SKILL.md +15 -0
- package/assets/skills/scaffold-guidance-v2/SKILL.md +57 -0
- package/assets/skills/session-rollover-v2/SKILL.md +41 -0
- package/assets/skills/submission-packaging/SKILL.md +147 -115
- package/assets/skills/submission-packaging-v2/SKILL.md +142 -0
- package/assets/skills/verification-gates/SKILL.md +44 -16
- package/assets/skills/verification-gates-v2/SKILL.md +102 -0
- package/assets/slopmachine/backend-evaluation-prompt.md +9 -2
- package/assets/slopmachine/frontend-evaluation-prompt.md +9 -2
- package/assets/slopmachine/templates/AGENTS-v2.md +55 -0
- package/assets/slopmachine/templates/AGENTS.md +20 -17
- package/assets/slopmachine/tracker-init.js +104 -0
- package/assets/slopmachine/workflow-init-v2.js +99 -0
- package/package.json +1 -1
- package/src/constants.js +22 -3
- package/src/init.js +33 -28
- package/src/install.js +186 -140
- package/src/utils.js +19 -0
- package/assets/slopmachine/beads-init.js +0 -439
package/src/constants.js
CHANGED
|
@@ -2,9 +2,9 @@ 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.
|
|
5
|
+
export const PACKAGE_VERSION = '0.4.0'
|
|
6
6
|
export const OPCODE_VERSION = '1.3.5'
|
|
7
|
-
export const
|
|
7
|
+
export const BR_VERSION = '0.1.34'
|
|
8
8
|
export const PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
|
|
9
9
|
|
|
10
10
|
export function resolveHomeDir() {
|
|
@@ -25,13 +25,30 @@ export function buildPaths() {
|
|
|
25
25
|
|
|
26
26
|
export const REQUIRED_SKILL_DIRS = [
|
|
27
27
|
'clarification-gate',
|
|
28
|
+
'clarification-gate-v2',
|
|
28
29
|
'developer-session-lifecycle',
|
|
30
|
+
'developer-session-lifecycle-v2',
|
|
31
|
+
'session-rollover-v2',
|
|
29
32
|
'final-evaluation-orchestration',
|
|
33
|
+
'final-evaluation-orchestration-v2',
|
|
30
34
|
'beads-operations',
|
|
35
|
+
'beads-operations-v2',
|
|
31
36
|
'get-overlays',
|
|
37
|
+
'planning-guidance-v2',
|
|
32
38
|
'planning-gate',
|
|
39
|
+
'planning-gate-v2',
|
|
40
|
+
'scaffold-guidance-v2',
|
|
41
|
+
'development-guidance-v2',
|
|
33
42
|
'verification-gates',
|
|
43
|
+
'verification-gates-v2',
|
|
44
|
+
'integrated-verification-v2',
|
|
45
|
+
'hardening-gate-v2',
|
|
46
|
+
'evaluation-triage-v2',
|
|
47
|
+
'remediation-guidance-v2',
|
|
34
48
|
'submission-packaging',
|
|
49
|
+
'submission-packaging-v2',
|
|
50
|
+
'owner-evidence-discipline-v2',
|
|
51
|
+
'report-output-discipline-v2',
|
|
35
52
|
'frontend-design',
|
|
36
53
|
]
|
|
37
54
|
|
|
@@ -42,8 +59,10 @@ export const REQUIRED_SLOPMACHINE_FILES = [
|
|
|
42
59
|
'quality-document.md',
|
|
43
60
|
'engineering-results.md',
|
|
44
61
|
'implementation-comparison.md',
|
|
45
|
-
'
|
|
62
|
+
'tracker-init.js',
|
|
63
|
+
'workflow-init-v2.js',
|
|
46
64
|
'templates/AGENTS.md',
|
|
65
|
+
'templates/AGENTS-v2.md',
|
|
47
66
|
'utils/strip_session_parent.py',
|
|
48
67
|
'utils/convert_ai_session.py',
|
|
49
68
|
]
|
package/src/init.js
CHANGED
|
@@ -21,33 +21,33 @@ const GITIGNORE_ENTRIES = [
|
|
|
21
21
|
'antigravity-logs/',
|
|
22
22
|
]
|
|
23
23
|
|
|
24
|
-
function
|
|
24
|
+
function getUnixTrackerCommandCandidates(paths) {
|
|
25
25
|
return [
|
|
26
|
-
path.join(paths.home, '.local', 'bin', '
|
|
27
|
-
path.join(paths.home, '.
|
|
28
|
-
'/opt/homebrew/bin/
|
|
29
|
-
'/usr/local/bin/
|
|
30
|
-
'/home/linuxbrew/.linuxbrew/bin/bd',
|
|
26
|
+
path.join(paths.home, '.local', 'bin', 'br'),
|
|
27
|
+
path.join(paths.home, '.cargo', 'bin', 'br'),
|
|
28
|
+
'/opt/homebrew/bin/br',
|
|
29
|
+
'/usr/local/bin/br',
|
|
31
30
|
]
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
function
|
|
33
|
+
function getWindowsTrackerCommandCandidates(paths) {
|
|
35
34
|
if (process.platform !== 'win32') {
|
|
36
35
|
return []
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
return [
|
|
40
|
-
process.env.LOCALAPPDATA ? path.join(process.env.LOCALAPPDATA, 'Programs', '
|
|
41
|
-
|
|
39
|
+
process.env.LOCALAPPDATA ? path.join(process.env.LOCALAPPDATA, 'Programs', 'br', 'br.exe') : null,
|
|
40
|
+
path.join(paths.home, '.local', 'bin', 'br.exe'),
|
|
41
|
+
path.join(paths.home, '.cargo', 'bin', 'br.exe'),
|
|
42
42
|
].filter(Boolean)
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
async function
|
|
45
|
+
async function resolveTrackerCommand(paths) {
|
|
46
46
|
const candidates = process.platform === 'win32'
|
|
47
|
-
?
|
|
48
|
-
:
|
|
47
|
+
? getWindowsTrackerCommandCandidates(paths)
|
|
48
|
+
: getUnixTrackerCommandCandidates(paths)
|
|
49
49
|
|
|
50
|
-
return resolveCommand('
|
|
50
|
+
return resolveCommand('br', { additionalCandidates: candidates, preferCandidates: true })
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
function parseInitArgs(args) {
|
|
@@ -71,18 +71,23 @@ function parseInitArgs(args) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
async function assertRequiredFiles(paths) {
|
|
74
|
-
const
|
|
74
|
+
const workflowInitV2 = path.join(paths.slopmachineDir, 'workflow-init-v2.js')
|
|
75
|
+
const trackerScript = path.join(paths.slopmachineDir, 'tracker-init.js')
|
|
76
|
+
const agentsTemplateV2 = path.join(paths.slopmachineDir, 'templates', 'AGENTS-v2.md')
|
|
75
77
|
const agentsTemplate = path.join(paths.slopmachineDir, 'templates', 'AGENTS.md')
|
|
76
78
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
const bootstrapScript = await pathExists(workflowInitV2) ? workflowInitV2 : trackerScript
|
|
80
|
+
const selectedAgentsTemplate = await pathExists(agentsTemplateV2) ? agentsTemplateV2 : agentsTemplate
|
|
81
|
+
|
|
82
|
+
if (!(await pathExists(bootstrapScript))) {
|
|
83
|
+
throw new Error(`Missing packaged workflow init script at ${bootstrapScript}. Run slopmachine setup first.`)
|
|
79
84
|
}
|
|
80
85
|
|
|
81
|
-
if (!(await pathExists(
|
|
82
|
-
throw new Error(`Missing packaged AGENTS template at ${
|
|
86
|
+
if (!(await pathExists(selectedAgentsTemplate))) {
|
|
87
|
+
throw new Error(`Missing packaged AGENTS template at ${selectedAgentsTemplate}. Run slopmachine setup first.`)
|
|
83
88
|
}
|
|
84
89
|
|
|
85
|
-
return {
|
|
90
|
+
return { trackerScript: bootstrapScript, agentsTemplate: selectedAgentsTemplate }
|
|
86
91
|
}
|
|
87
92
|
|
|
88
93
|
async function resolveTarget(targetInput) {
|
|
@@ -127,25 +132,25 @@ async function ensureGitignore(targetPath) {
|
|
|
127
132
|
}
|
|
128
133
|
}
|
|
129
134
|
|
|
130
|
-
async function
|
|
135
|
+
async function runTrackerBootstrap(paths, targetPath, trackerScript) {
|
|
131
136
|
const nodeExecutable = process.execPath
|
|
132
137
|
if (!nodeExecutable) {
|
|
133
|
-
throw new Error('Unable to locate the current Node.js executable for
|
|
138
|
+
throw new Error('Unable to locate the current Node.js executable for workflow bootstrap.')
|
|
134
139
|
}
|
|
135
140
|
|
|
136
|
-
const
|
|
141
|
+
const trackerCommand = await resolveTrackerCommand(paths)
|
|
137
142
|
|
|
138
|
-
log('Running
|
|
139
|
-
const result = await runCommand(nodeExecutable, [
|
|
143
|
+
log('Running workflow bootstrap')
|
|
144
|
+
const result = await runCommand(nodeExecutable, [trackerScript, targetPath], {
|
|
140
145
|
stdio: 'inherit',
|
|
141
146
|
env: {
|
|
142
147
|
...process.env,
|
|
143
|
-
|
|
148
|
+
BR_COMMAND: trackerCommand || '',
|
|
144
149
|
HOME: paths.home,
|
|
145
150
|
},
|
|
146
151
|
})
|
|
147
152
|
if (result.code !== 0) {
|
|
148
|
-
throw new Error('
|
|
153
|
+
throw new Error('Tracker initialization failed')
|
|
149
154
|
}
|
|
150
155
|
}
|
|
151
156
|
|
|
@@ -196,7 +201,7 @@ async function maybeOpenOpencode(targetPath, openAfterInit) {
|
|
|
196
201
|
export async function runInit(args = []) {
|
|
197
202
|
const paths = buildPaths()
|
|
198
203
|
const { openAfterInit, targetInput } = parseInitArgs(args)
|
|
199
|
-
const {
|
|
204
|
+
const { trackerScript, agentsTemplate } = await assertRequiredFiles(paths)
|
|
200
205
|
const targetPath = await resolveTarget(targetInput)
|
|
201
206
|
|
|
202
207
|
log(`Target: ${targetPath}`)
|
|
@@ -206,7 +211,7 @@ export async function runInit(args = []) {
|
|
|
206
211
|
await ensureGitRepo(targetPath)
|
|
207
212
|
log('Ensuring .gitignore defaults')
|
|
208
213
|
await ensureGitignore(targetPath)
|
|
209
|
-
await
|
|
214
|
+
await runTrackerBootstrap(paths, targetPath, trackerScript)
|
|
210
215
|
await createRepoStructure(targetPath, agentsTemplate)
|
|
211
216
|
await createInitialCommit(targetPath)
|
|
212
217
|
await maybeOpenOpencode(targetPath, openAfterInit)
|