@sockulags/agent-os 0.9.0 → 0.11.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 +65 -41
- package/cli/index.mjs +735 -412
- package/cli/index.test.mjs +300 -142
- package/package.json +32 -31
- package/policy.md +6 -6
- package/skills/batch-work/SKILL.md +43 -0
- package/skills/batch-work/agents/openai.yaml +2 -0
- package/skills/batch-work/references/manifest.md +100 -0
- package/skills/batch-work/scripts/manifest-hash.mjs +263 -0
- package/skills/batch-work/scripts/test-manifest-hash.mjs +132 -0
- package/skills/chart-work/SKILL.md +37 -0
- package/skills/chart-work/agents/openai.yaml +2 -0
- package/skills/chart-work/references/elicitation.md +25 -0
- package/skills/chart-work/references/map.md +84 -0
- package/skills/chart-work/references/prototypes.md +21 -0
- package/skills/deliver-work/SKILL.md +12 -0
- package/skills/deliver-work/agents/openai.yaml +2 -0
- package/skills/deliver-work/workflow.md +113 -0
- package/skills/diagnose-before-fix/SKILL.md +24 -0
- package/skills/dispatch-next/SKILL.md +28 -0
- package/skills/dispatch-next/agents/openai.yaml +2 -0
- package/skills/explain-work/SKILL.md +27 -0
- package/skills/explain-work/agents/openai.yaml +2 -0
- package/skills/guide-me/SKILL.md +36 -0
- package/skills/guide-me/agents/openai.yaml +2 -0
- package/skills/init-agent-os/SKILL.md +39 -0
- package/skills/init-agent-os/agents/openai.yaml +2 -0
- package/skills/init-agent-os/scripts/policy-block.ps1 +87 -87
- package/skills/list-skills/SKILL.md +42 -0
- package/skills/list-skills/agents/openai.yaml +2 -0
- package/skills/notice-lesson/SKILL.md +20 -0
- package/skills/proportional-testing/SKILL.md +30 -0
- package/skills/proportional-testing/references/strategy.md +75 -0
- package/skills/record-lesson/SKILL.md +31 -0
- package/skills/record-lesson/agents/openai.yaml +2 -0
- package/skills/scope-guard/SKILL.md +21 -0
- package/skills/shape-work/SKILL.md +39 -0
- package/skills/shape-work/agents/openai.yaml +2 -0
- package/skills/shape-work/references/implementation-issues.md +69 -0
- package/skills/shape-work/references/mockups.md +23 -0
- package/skills/simplifier/SKILL.md +34 -0
- package/skills/simplifier/agents/openai.yaml +2 -0
- package/skills/simplifier-audit/SKILL.md +28 -0
- package/skills/simplifier-audit/agents/openai.yaml +2 -0
- package/skills/simplifier-review/SKILL.md +29 -0
- package/skills/understand-work/SKILL.md +31 -0
- package/skills/understand-work/agents/openai.yaml +2 -0
- package/skills/verify-before-done/SKILL.md +29 -0
- package/skills/writing-skills/SKILL.md +68 -0
- package/skills/writing-skills/agents/openai.yaml +2 -0
package/cli/index.test.mjs
CHANGED
|
@@ -1,142 +1,300 @@
|
|
|
1
|
-
import assert from 'node:assert/strict'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
test
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
scope:
|
|
78
|
-
policy:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}),
|
|
101
|
-
/
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
1
|
+
import assert from 'node:assert/strict'
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import os from 'node:os'
|
|
4
|
+
import path from 'node:path'
|
|
5
|
+
import test, { after } from 'node:test'
|
|
6
|
+
import {
|
|
7
|
+
buildPlan,
|
|
8
|
+
executeInstall,
|
|
9
|
+
INSTALL_MANIFEST,
|
|
10
|
+
PACKAGE_NAME,
|
|
11
|
+
parseArgs,
|
|
12
|
+
planPolicyUpdate,
|
|
13
|
+
resolveOptions,
|
|
14
|
+
run,
|
|
15
|
+
targetSkillRoot,
|
|
16
|
+
VERSION
|
|
17
|
+
} from './index.mjs'
|
|
18
|
+
|
|
19
|
+
const temporaryRoots = []
|
|
20
|
+
|
|
21
|
+
function temporaryRoot() {
|
|
22
|
+
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'agent-os-cli-'))
|
|
23
|
+
temporaryRoots.push(root)
|
|
24
|
+
return root
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function silentOutput() {
|
|
28
|
+
return { write() {} }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
after(() => {
|
|
32
|
+
for (const root of temporaryRoots) fs.rmSync(root, { recursive: true, force: true })
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
test('defaults to guided direct install', () => {
|
|
36
|
+
assert.deepEqual(parseArgs([]), {
|
|
37
|
+
command: 'install',
|
|
38
|
+
platform: null,
|
|
39
|
+
method: null,
|
|
40
|
+
scope: null,
|
|
41
|
+
policy: null,
|
|
42
|
+
yes: false,
|
|
43
|
+
dryRun: false,
|
|
44
|
+
help: false,
|
|
45
|
+
version: false
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
test('parses non-interactive direct update flags', () => {
|
|
50
|
+
assert.deepEqual(parseArgs([
|
|
51
|
+
'update',
|
|
52
|
+
'--platform=both',
|
|
53
|
+
'--method',
|
|
54
|
+
'direct',
|
|
55
|
+
'--scope',
|
|
56
|
+
'project',
|
|
57
|
+
'--no-policy',
|
|
58
|
+
'--yes'
|
|
59
|
+
]), {
|
|
60
|
+
command: 'update',
|
|
61
|
+
platform: 'both',
|
|
62
|
+
method: 'direct',
|
|
63
|
+
scope: 'project',
|
|
64
|
+
policy: false,
|
|
65
|
+
yes: true,
|
|
66
|
+
dryRun: false,
|
|
67
|
+
help: false,
|
|
68
|
+
version: false
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
test('supports Claude Code as a platform alias and upgrade as update', () => {
|
|
73
|
+
assert.deepEqual(parseArgs(['upgrade', '--platform', 'claude-code', '--yes']), {
|
|
74
|
+
command: 'update',
|
|
75
|
+
platform: 'claude',
|
|
76
|
+
method: null,
|
|
77
|
+
scope: null,
|
|
78
|
+
policy: null,
|
|
79
|
+
yes: true,
|
|
80
|
+
dryRun: false,
|
|
81
|
+
help: false,
|
|
82
|
+
version: false
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
test('prints scoped npm commands and explains the direct default', async () => {
|
|
87
|
+
const chunks = []
|
|
88
|
+
await run(['--help'], { output: { write: (chunk) => chunks.push(chunk) } })
|
|
89
|
+
const help = chunks.join('')
|
|
90
|
+
assert.match(help, /npx @sockulags\/agent-os install/)
|
|
91
|
+
assert.match(help, /does not require Codex or Claude Code CLI/)
|
|
92
|
+
assert.match(help, /--method <name>\s+direct \(default\) or plugin/)
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
test('rejects conflicting policy flags and direct local scope', async () => {
|
|
96
|
+
assert.throws(() => parseArgs(['install', '--policy', '--no-policy']), /one of --policy and --no-policy/)
|
|
97
|
+
await assert.rejects(
|
|
98
|
+
resolveOptions(parseArgs([
|
|
99
|
+
'install', '--platform', 'codex', '--method', 'direct', '--scope', 'local', '--yes'
|
|
100
|
+
]), { input: { isTTY: false }, output: { isTTY: false } }),
|
|
101
|
+
/Local scope is available only with --method plugin/
|
|
102
|
+
)
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
test('requires explicit non-interactive choices', async () => {
|
|
106
|
+
await assert.rejects(
|
|
107
|
+
resolveOptions(parseArgs(['install']), {
|
|
108
|
+
input: { isTTY: false },
|
|
109
|
+
output: { isTTY: false }
|
|
110
|
+
}),
|
|
111
|
+
/--yes with explicit options/
|
|
112
|
+
)
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
test('builds direct filesystem plans without marketplace commands', () => {
|
|
116
|
+
const root = temporaryRoot()
|
|
117
|
+
const plan = buildPlan({
|
|
118
|
+
command: 'install',
|
|
119
|
+
platform: 'both',
|
|
120
|
+
method: 'direct',
|
|
121
|
+
scope: 'user',
|
|
122
|
+
policy: false
|
|
123
|
+
}, { homeDir: root, cwd: root })
|
|
124
|
+
assert.deepEqual(plan.map((step) => step.kind), ['install-skills', 'install-skills'])
|
|
125
|
+
assert.deepEqual(plan.map((step) => step.command), ['filesystem', 'filesystem'])
|
|
126
|
+
assert.equal(plan[0].args[0], path.join(root, '.claude', 'skills'))
|
|
127
|
+
assert.equal(plan[1].args[0], path.join(root, '.codex', 'skills'))
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
test('maps project and user targets for both hosts', () => {
|
|
131
|
+
const root = temporaryRoot()
|
|
132
|
+
const project = path.join(root, 'project')
|
|
133
|
+
assert.equal(targetSkillRoot('codex', 'user', { homeDir: root, cwd: project }), path.join(root, '.codex', 'skills'))
|
|
134
|
+
assert.equal(targetSkillRoot('claude', 'user', { homeDir: root, cwd: project }), path.join(root, '.claude', 'skills'))
|
|
135
|
+
assert.equal(targetSkillRoot('codex', 'project', { homeDir: root, cwd: project }), path.join(project, '.agents', 'skills'))
|
|
136
|
+
assert.equal(targetSkillRoot('claude', 'project', { homeDir: root, cwd: project }), path.join(project, '.claude', 'skills'))
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
test('installs both hosts and policy without either host CLI', async () => {
|
|
140
|
+
const root = temporaryRoot()
|
|
141
|
+
const homeDir = path.join(root, 'home')
|
|
142
|
+
const cwd = path.join(root, 'project')
|
|
143
|
+
await executeInstall({
|
|
144
|
+
command: 'install',
|
|
145
|
+
platform: 'both',
|
|
146
|
+
method: 'direct',
|
|
147
|
+
scope: 'user',
|
|
148
|
+
policy: true
|
|
149
|
+
}, {
|
|
150
|
+
output: silentOutput(),
|
|
151
|
+
homeDir,
|
|
152
|
+
cwd,
|
|
153
|
+
exists: () => { throw new Error('host CLI lookup must not run') },
|
|
154
|
+
execute: () => { throw new Error('external command must not run') }
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
for (const agent of ['.claude', '.codex']) {
|
|
158
|
+
const skillsRoot = path.join(homeDir, agent, 'skills')
|
|
159
|
+
assert.equal(fs.existsSync(path.join(skillsRoot, 'shape-work', 'SKILL.md')), true)
|
|
160
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(skillsRoot, INSTALL_MANIFEST), 'utf8'))
|
|
161
|
+
assert.equal(manifest.package, PACKAGE_NAME)
|
|
162
|
+
assert.equal(manifest.version, VERSION)
|
|
163
|
+
assert.ok(manifest.skills.includes('shape-work'))
|
|
164
|
+
}
|
|
165
|
+
assert.match(fs.readFileSync(path.join(homeDir, '.claude', 'CLAUDE.md'), 'utf8'), /BEGIN AGENT OS/)
|
|
166
|
+
assert.match(fs.readFileSync(path.join(homeDir, '.codex', 'AGENTS.md'), 'utf8'), /BEGIN AGENT OS/)
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
test('updates only managed skills and preserves unrelated skills', async () => {
|
|
170
|
+
const root = temporaryRoot()
|
|
171
|
+
const homeDir = path.join(root, 'home')
|
|
172
|
+
const options = {
|
|
173
|
+
command: 'install',
|
|
174
|
+
platform: 'codex',
|
|
175
|
+
method: 'direct',
|
|
176
|
+
scope: 'user',
|
|
177
|
+
policy: false
|
|
178
|
+
}
|
|
179
|
+
await executeInstall(options, { output: silentOutput(), homeDir, cwd: root })
|
|
180
|
+
|
|
181
|
+
const skillsRoot = path.join(homeDir, '.codex', 'skills')
|
|
182
|
+
const managedFile = path.join(skillsRoot, 'shape-work', 'SKILL.md')
|
|
183
|
+
const foreignFile = path.join(skillsRoot, 'my-private-skill', 'SKILL.md')
|
|
184
|
+
fs.writeFileSync(managedFile, 'stale managed content\n')
|
|
185
|
+
fs.mkdirSync(path.dirname(foreignFile), { recursive: true })
|
|
186
|
+
fs.writeFileSync(foreignFile, 'private content\n')
|
|
187
|
+
|
|
188
|
+
await executeInstall({ ...options, command: 'update' }, { output: silentOutput(), homeDir, cwd: root })
|
|
189
|
+
assert.notEqual(fs.readFileSync(managedFile, 'utf8'), 'stale managed content\n')
|
|
190
|
+
assert.equal(fs.readFileSync(foreignFile, 'utf8'), 'private content\n')
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
test('refuses to overwrite a same-name skill without an Agent OS manifest', async () => {
|
|
194
|
+
const root = temporaryRoot()
|
|
195
|
+
const homeDir = path.join(root, 'home')
|
|
196
|
+
const collision = path.join(homeDir, '.codex', 'skills', 'shape-work', 'SKILL.md')
|
|
197
|
+
fs.mkdirSync(path.dirname(collision), { recursive: true })
|
|
198
|
+
fs.writeFileSync(collision, 'developer-owned\n')
|
|
199
|
+
|
|
200
|
+
await assert.rejects(
|
|
201
|
+
executeInstall({
|
|
202
|
+
command: 'install',
|
|
203
|
+
platform: 'codex',
|
|
204
|
+
method: 'direct',
|
|
205
|
+
scope: 'user',
|
|
206
|
+
policy: false
|
|
207
|
+
}, { output: silentOutput(), homeDir, cwd: root }),
|
|
208
|
+
/Refusing to overwrite unmanaged skills.*shape-work/
|
|
209
|
+
)
|
|
210
|
+
assert.equal(fs.readFileSync(collision, 'utf8'), 'developer-owned\n')
|
|
211
|
+
assert.equal(fs.existsSync(path.join(homeDir, '.codex', 'skills', INSTALL_MANIFEST)), false)
|
|
212
|
+
})
|
|
213
|
+
|
|
214
|
+
test('policy planning preserves surrounding text and rejects malformed markers', () => {
|
|
215
|
+
const policy = '# Policy\n'
|
|
216
|
+
const original = 'before\n\n<!-- BEGIN AGENT OS -->\nold\n<!-- END AGENT OS -->\nafter\n'
|
|
217
|
+
const updated = planPolicyUpdate(original, policy)
|
|
218
|
+
assert.equal(updated.status, 'UPDATED')
|
|
219
|
+
assert.equal(updated.content, 'before\n\n<!-- BEGIN AGENT OS -->\n# Policy\n<!-- END AGENT OS -->\nafter\n')
|
|
220
|
+
assert.throws(
|
|
221
|
+
() => planPolicyUpdate('<!-- BEGIN AGENT OS -->\nbroken\n', policy),
|
|
222
|
+
/Malformed Agent OS policy markers/
|
|
223
|
+
)
|
|
224
|
+
})
|
|
225
|
+
|
|
226
|
+
test('malformed policy markers abort before direct skill installation', async () => {
|
|
227
|
+
const root = temporaryRoot()
|
|
228
|
+
const homeDir = path.join(root, 'home')
|
|
229
|
+
const target = path.join(homeDir, '.codex', 'AGENTS.md')
|
|
230
|
+
fs.mkdirSync(path.dirname(target), { recursive: true })
|
|
231
|
+
fs.writeFileSync(target, '<!-- BEGIN AGENT OS -->\nbroken\n')
|
|
232
|
+
|
|
233
|
+
await assert.rejects(
|
|
234
|
+
executeInstall({
|
|
235
|
+
command: 'install',
|
|
236
|
+
platform: 'codex',
|
|
237
|
+
method: 'direct',
|
|
238
|
+
scope: 'user',
|
|
239
|
+
policy: true
|
|
240
|
+
}, { output: silentOutput(), homeDir, cwd: root }),
|
|
241
|
+
/Malformed Agent OS policy markers/
|
|
242
|
+
)
|
|
243
|
+
assert.equal(fs.existsSync(path.join(homeDir, '.codex', 'skills')), false)
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
test('plugin mode still requires only the selected host CLI', async () => {
|
|
247
|
+
const calls = []
|
|
248
|
+
await assert.rejects(
|
|
249
|
+
executeInstall({
|
|
250
|
+
command: 'install',
|
|
251
|
+
platform: 'codex',
|
|
252
|
+
method: 'plugin',
|
|
253
|
+
scope: 'user',
|
|
254
|
+
policy: false
|
|
255
|
+
}, {
|
|
256
|
+
output: silentOutput(),
|
|
257
|
+
exists: () => false,
|
|
258
|
+
execute: (...args) => calls.push(args)
|
|
259
|
+
}),
|
|
260
|
+
/Native plugin mode requires the selected host CLIs.*Codex/s
|
|
261
|
+
)
|
|
262
|
+
assert.deepEqual(calls, [])
|
|
263
|
+
})
|
|
264
|
+
|
|
265
|
+
test('plugin update skips Git refresh for a registered local Codex marketplace', async () => {
|
|
266
|
+
const calls = []
|
|
267
|
+
await executeInstall({
|
|
268
|
+
command: 'update',
|
|
269
|
+
platform: 'codex',
|
|
270
|
+
method: 'plugin',
|
|
271
|
+
scope: 'user',
|
|
272
|
+
policy: false
|
|
273
|
+
}, {
|
|
274
|
+
output: silentOutput(),
|
|
275
|
+
exists: () => true,
|
|
276
|
+
execute: (command, args) => {
|
|
277
|
+
calls.push([command, args])
|
|
278
|
+
if (args.join(' ') === 'plugin marketplace list --json') {
|
|
279
|
+
return { status: 0, stdout: JSON.stringify({ marketplaces: [{ name: 'agent-os' }] }), stderr: '' }
|
|
280
|
+
}
|
|
281
|
+
if (args.join(' ') === 'plugin list --json') {
|
|
282
|
+
return {
|
|
283
|
+
status: 0,
|
|
284
|
+
stdout: JSON.stringify({ installed: [{
|
|
285
|
+
marketplaceName: 'agent-os',
|
|
286
|
+
marketplaceSource: { sourceType: 'local' }
|
|
287
|
+
}] }),
|
|
288
|
+
stderr: ''
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return { status: 0, stdout: '', stderr: '' }
|
|
292
|
+
}
|
|
293
|
+
})
|
|
294
|
+
|
|
295
|
+
assert.deepEqual(calls.map((call) => call[1]), [
|
|
296
|
+
['plugin', 'marketplace', 'list', '--json'],
|
|
297
|
+
['plugin', 'list', '--json'],
|
|
298
|
+
['plugin', 'add', 'agent-os@agent-os']
|
|
299
|
+
])
|
|
300
|
+
})
|
package/package.json
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@sockulags/agent-os",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A lightweight personal agent operating system with an npx installer for Claude Code and Codex.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"agent-os": "./cli/index.mjs"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"cli/",
|
|
11
|
-
"policy.md",
|
|
12
|
-
"skills/
|
|
13
|
-
],
|
|
14
|
-
"engines": {
|
|
15
|
-
"node": ">=18.18"
|
|
16
|
-
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"test": "node --test cli/*.test.mjs",
|
|
19
|
-
"validate": "node scripts/validate-agent-os.mjs"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@sockulags/agent-os",
|
|
3
|
+
"version": "0.11.0",
|
|
4
|
+
"description": "A lightweight personal agent operating system with an npx installer for Claude Code and Codex.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"agent-os": "./cli/index.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"cli/",
|
|
11
|
+
"policy.md",
|
|
12
|
+
"skills/"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18.18"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "node --test cli/*.test.mjs",
|
|
19
|
+
"validate": "node scripts/validate-agent-os.mjs",
|
|
20
|
+
"verify:release": "node scripts/verify-release.mjs"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"agent",
|
|
24
|
+
"claude-code",
|
|
25
|
+
"codex",
|
|
26
|
+
"workflow",
|
|
27
|
+
"skills",
|
|
28
|
+
"installer"
|
|
29
|
+
],
|
|
30
|
+
"homepage": "https://sockulags.github.io/agent-os/",
|
|
31
|
+
"repository": "https://github.com/sockulags/agent-os"
|
|
32
|
+
}
|
package/policy.md
CHANGED
|
@@ -29,12 +29,12 @@ Rules:
|
|
|
29
29
|
- Never force the reader to cross-reference labels or numbering invented earlier in the text — say what you mean in place.
|
|
30
30
|
- Explanations belong in prose; tables only for short enumerable facts.
|
|
31
31
|
- Calibrate tone to the topic: playfulness is fine, neutral and factual the moment the subject is serious. When in doubt, it is serious.
|
|
32
|
-
- Orchestration is opt-in:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
`/agent-os:
|
|
36
|
-
workflow may continue into the workflow its exit contract names once the
|
|
37
|
-
exit, as `guide-me` does after its approved plain-language gate.
|
|
32
|
+
- Orchestration is opt-in: `guide-me`, `chart-work`, `shape-work`, `batch-work`, `deliver-work`,
|
|
33
|
+
`dispatch-next`, `init-agent-os`, `understand-work`, `explain-work`, and `record-lesson` exist for
|
|
34
|
+
planned work; invoke them through the name exposed by the host (`/guide-me` for direct Claude
|
|
35
|
+
skills, `/agent-os:guide-me` for the Claude plugin, or `$guide-me` for Codex). Never self-invoke
|
|
36
|
+
them. One exception: a workflow may continue into the workflow its exit contract names once the
|
|
37
|
+
developer approves that exit, as `guide-me` does after its approved plain-language gate.
|
|
38
38
|
|
|
39
39
|
## Preferences (seed defaults — project policy overrides)
|
|
40
40
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: batch-work
|
|
3
|
+
description: Plans and runs several decision-ready units through isolated workers and aggregate verification. User-invoked for an explicit batch. Not for unresolved decisions, one unit, or a loose backlog.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Batch work
|
|
8
|
+
|
|
9
|
+
Read project policy and [references/manifest.md](references/manifest.md). The request defines whether
|
|
10
|
+
to plan the batch, execute it, or both.
|
|
11
|
+
|
|
12
|
+
Batch-work consumes an existing set of implementation-ready, dependency-mapped issues. It does not
|
|
13
|
+
discover, decompose, or represent a product shape, and the existence of several issues does not
|
|
14
|
+
invoke it. Use this workflow only when the developer explicitly requests an integrated batch.
|
|
15
|
+
|
|
16
|
+
## Contract
|
|
17
|
+
|
|
18
|
+
- **Outcome:** one integrated candidate whose full behavior passes the aggregate ground truth.
|
|
19
|
+
- **Working surface:** the manifest, coordinator branch, isolated task worktrees, and task branches.
|
|
20
|
+
- **Boundaries:** workers own only their task workspace; the coordinator owns the manifest and
|
|
21
|
+
integration. Merge, deploy, destructive cleanup, and external effects follow the request or
|
|
22
|
+
project policy.
|
|
23
|
+
- **Ground truth:** task checks on each result plus fresh aggregate checks after integration.
|
|
24
|
+
|
|
25
|
+
## Loop
|
|
26
|
+
|
|
27
|
+
1. Confirm every source issue has a stable identity, outcome, scope, dependencies, and checks. Route
|
|
28
|
+
unresolved product decisions or missing decomposition to `shape-work` or `chart-work`.
|
|
29
|
+
2. Create or update `.agent-os/batches/<batch-slug>.md`. Validate its graph and definition hashes.
|
|
30
|
+
A planning-only request stops here; an execution request continues.
|
|
31
|
+
3. Reconcile the manifest with live Git and worktree state before every dispatch wave.
|
|
32
|
+
4. Dispatch the open frontier into isolated workspaces within project concurrency. Each worker gets
|
|
33
|
+
one current task definition and returns a commit SHA, changed files, checks, and uncertainty.
|
|
34
|
+
5. Integrate completed tasks in dependency order. Detect already-contained commits, rerun relevant
|
|
35
|
+
checks on the integrated head, and stop on conflicts rather than guessing.
|
|
36
|
+
6. After all tasks integrate, run fresh aggregate checks.
|
|
37
|
+
7. Treat the integrated batch as material. Apply the
|
|
38
|
+
[deliver-work review gate](../deliver-work/workflow.md#review-gate) to the complete candidate,
|
|
39
|
+
resolve supported findings, and rerun affected aggregate checks.
|
|
40
|
+
8. Deliver the candidate only to the boundary named by the request or project policy.
|
|
41
|
+
|
|
42
|
+
Definition drift while work is active invalidates the affected task result and requires an explicit
|
|
43
|
+
replan or fresh attempt. Individual worker checks never substitute for aggregate verification.
|