@sockulags/agent-os 0.16.0 → 0.17.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 +33 -41
- package/cli/doctor.mjs +45 -1
- package/cli/index.test.mjs +30 -0
- package/package.json +1 -1
- package/plugins/agent-os-core/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-os-core/.codex-plugin/plugin.json +1 -1
- package/plugins/agent-os-core/skills/capture-intent/SKILL.md +9 -6
- package/plugins/agent-os-core/skills/list-skills/SKILL.md +5 -3
- package/plugins/agent-os-core/skills/plan-work/SKILL.md +36 -18
- package/plugins/agent-os-core/skills/plan-work/references/spec-template.md +2 -1
- package/plugins/agent-os-dev/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-os-dev/.codex-plugin/plugin.json +1 -1
- package/plugins/agent-os-dev/skills/batch-work/SKILL.md +1 -0
- package/plugins/agent-os-dev/skills/check-work/SKILL.md +2 -0
- package/plugins/agent-os-dev/skills/deliver-work/SKILL.md +67 -33
- package/plugins/agent-os-dev/skills/deliver-work/references/work-records.md +20 -0
- package/plugins/agent-os-dev/skills/design-work/SKILL.md +22 -7
- package/plugins/agent-os-dev/skills/dispatch-next/SKILL.md +6 -3
- package/plugins/agent-os-dev/skills/init-agent-os/SKILL.md +22 -12
- package/plugins/agent-os-dev/skills/init-agent-os/policy.md +37 -34
- package/plugins/agent-os-dev/skills/init-agent-os/references/guards.md +6 -5
- package/plugins/agent-os-dev/skills/init-agent-os/references/repository-init.md +15 -6
- package/plugins/agent-os-dev/skills/init-agent-os/references/workflow-template.md +80 -0
- package/plugins/agent-os-dev/skills/quality-ratchet/SKILL.md +4 -3
- package/plugins/agent-os-dev/skills/quality-ratchet/scripts/intent-files.mjs +1 -1
- package/plugins/agent-os-dev/skills/quality-ratchet/scripts/intent-files.test.mjs +6 -1
- package/plugins/agent-os-dev/skills/shape-work/SKILL.md +28 -17
- package/plugins/agent-os-dev/skills/shape-work/references/implementation-issues.md +34 -14
- package/policy.md +37 -34
package/README.md
CHANGED
|
@@ -12,9 +12,11 @@ ceremony proportional to the work. It ships as two packages from one source:
|
|
|
12
12
|
|
|
13
13
|
## Skills
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
Most work lives in tracker issues: `shape-work` writes each delivery unit as an issue that holds its
|
|
16
|
+
whole contract, even for a bug with a known fix, so every change can be traced. Only an initiative, work that several pull
|
|
17
|
+
requests deliver and whose product decisions someone else must agree to, keeps versioned files:
|
|
18
|
+
`intents/<id>/intent.md` for what is needed and why, `spec.md` for behavior, boundaries, and ground
|
|
19
|
+
truth, and `plan.md` for delivery units. See the
|
|
18
20
|
[intent file reference](https://sockulags.github.io/agent-os/reference/intents).
|
|
19
21
|
|
|
20
22
|
### agent-os-core
|
|
@@ -34,9 +36,9 @@ small fix needs none of them. See the
|
|
|
34
36
|
|
|
35
37
|
| Skill | Bucket | Invocation | Purpose |
|
|
36
38
|
|---|---|---|---|
|
|
37
|
-
| `design-work` | workflow | manual | Sketch new and changed screens in the project's chosen medium
|
|
38
|
-
| `shape-work` | workflow | manual | Shape
|
|
39
|
-
| `deliver-work` | workflow | manual | Deliver one unit
|
|
39
|
+
| `design-work` | workflow | manual | Sketch new and changed screens in the project's chosen medium, when the developer wants them |
|
|
40
|
+
| `shape-work` | workflow | manual | Shape work into delivery units as tracker issues, or plan.md for an initiative |
|
|
41
|
+
| `deliver-work` | workflow | manual | Deliver one unit, or a whole intent unit by unit, against its contract |
|
|
40
42
|
| `batch-work` | workflow | manual | Run isolated ready units and verify the integrated result |
|
|
41
43
|
| `dispatch-next` | workflow | manual | Pick or dispatch one action according to the request |
|
|
42
44
|
| `simplify` | workflow | manual | Review, audit, or remove unnecessary code and solution layers |
|
|
@@ -91,48 +93,38 @@ Direct Claude skills appear as `/<skill>` and direct Codex skills as `$<skill>`.
|
|
|
91
93
|
|
|
92
94
|
### Hooks
|
|
93
95
|
|
|
94
|
-
With agent-os-dev,
|
|
95
|
-
|
|
96
|
-
`SessionStart` and `PreToolUse` guard hooks. The user and project paths are
|
|
97
|
-
`~/.claude/settings.json` or `<project>/.claude/settings.json` for Claude Code, and
|
|
96
|
+
With agent-os-dev, the installer adds three hooks to the host configuration and leaves your other
|
|
97
|
+
hooks alone: `~/.claude/settings.json` or `<project>/.claude/settings.json` for Claude Code, and
|
|
98
98
|
`~/.codex/hooks.json` or `<project>/.codex/hooks.json` for Codex. Plugin installs load the same hooks
|
|
99
|
-
from `plugins/agent-os-dev/hooks/hooks.json
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
closes the baseline only after a passing check. Every block except corrupt state is bounded: after
|
|
120
|
-
three re-entries on the unchanged candidate the hook releases the stop to the user and keeps delivery
|
|
121
|
-
blocked. Without a
|
|
122
|
-
baseline for the current host session it is a no-op. Resolve
|
|
123
|
-
`scripts/quality-delta.mjs` relative to the installed `quality-ratchet/SKILL.md` and run its `clear`
|
|
124
|
-
command from that same host session to abandon an active attempt. Standalone/manual use without a
|
|
125
|
-
host session ID uses a deterministic fallback state. `begin`, `check`, `finish`, and `clear` read the host ID
|
|
126
|
-
from `CODEX_THREAD_ID` or `CLAUDE_CODE_SESSION_ID`, with Codex taking precedence when both exist;
|
|
127
|
-
native Stop resolves the same identity from its `session_id` payload, using non-empty `turn_id` to
|
|
128
|
-
identify Codex. There is no uninstall command yet.
|
|
99
|
+
from `plugins/agent-os-dev/hooks/hooks.json` and need Node on PATH.
|
|
100
|
+
|
|
101
|
+
The guard hooks read `.agent-os/guards.json` and do nothing where it is absent. At session start
|
|
102
|
+
they name the intent behind the current branch and any stale spec or plan. Before an edit they
|
|
103
|
+
block changes to protected paths, to accepted intents and specs during delivery, and to a test
|
|
104
|
+
locked with `guards.mjs lock-test`, and they block a `git commit` that adds a likely secret. They
|
|
105
|
+
never run a command the repository declares. See the
|
|
106
|
+
[guard hook reference](https://sockulags.github.io/agent-os/reference/guards).
|
|
107
|
+
|
|
108
|
+
The quality-ratchet `Stop` hook keeps a delivery from ending with a missing, stale, or failed check.
|
|
109
|
+
`deliver-work` records the state of the worktree before its first change, and the ratchet compares
|
|
110
|
+
the finished change with it: files, lines, dependencies, and complexity when an analyzer is
|
|
111
|
+
installed. The numbers are evidence for the review, not a score. Declare the delivery ground truth
|
|
112
|
+
as a `required` check in `.agent-os/quality.json`; it runs only after the developer trusts the
|
|
113
|
+
repository's controls. After three blocks on an unchanged candidate the hook lets the turn end and
|
|
114
|
+
keeps delivery blocked. How to inspect or clear a blocked check is in
|
|
115
|
+
[Troubleshooting](https://sockulags.github.io/agent-os/guide/troubleshooting#the-quality-ratchet-stop-hook-blocks),
|
|
116
|
+
and the full lifecycle is in the
|
|
117
|
+
[quality-ratchet page](https://sockulags.github.io/agent-os/skills/quality-ratchet). There is no
|
|
118
|
+
uninstall command yet.
|
|
129
119
|
|
|
130
120
|
### Doctor and lint-intents
|
|
131
121
|
|
|
132
122
|
`npx @sockulags/agent-os@latest doctor` is a read-only report of every installed version and package,
|
|
133
123
|
retired or missing skills, duplicate direct and plugin installs, an old single `agent-os` plugin that
|
|
134
124
|
must be replaced by `agent-os-core` and `agent-os-dev`, the global policy blocks (each carries an
|
|
135
|
-
`<!-- agent-os version X -->` line), and the hooks, with the command that fixes each difference.
|
|
125
|
+
`<!-- agent-os version X -->` line), and the hooks, with the command that fixes each difference. Run
|
|
126
|
+
inside a repository that `init-agent-os` set up, it also warns when `.agent-os/workflow.md` is
|
|
127
|
+
missing, has no routes, or is not pointed to by the project policy.
|
|
136
128
|
Team update, migration, governance, and removal steps are in the
|
|
137
129
|
[team setup guide](https://sockulags.github.io/agent-os/guide/team-setup).
|
|
138
130
|
|
package/cli/doctor.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Read-only installation report: which Agent OS versions this machine and project run, whether
|
|
2
|
-
// they match this CLI,
|
|
2
|
+
// they match this CLI, whether the managed policy blocks and hooks are current, and whether the
|
|
3
|
+
// current repository's workflow file is in place. It never
|
|
3
4
|
// writes, and a broken or unexpected file becomes a finding instead of a crash.
|
|
4
5
|
|
|
5
6
|
import { spawnSync } from 'node:child_process'
|
|
@@ -225,6 +226,48 @@ function checkPolicy(homeDir, { version, packageName, policy, installed, fsImpl,
|
|
|
225
226
|
}
|
|
226
227
|
}
|
|
227
228
|
|
|
229
|
+
const INIT_COMMAND = 'run init-agent-os in this repository (/init-agent-os, /agent-os-dev:init-agent-os, or $init-agent-os)'
|
|
230
|
+
|
|
231
|
+
function repositoryRoot(cwd, fsImpl) {
|
|
232
|
+
let dir = path.resolve(cwd)
|
|
233
|
+
for (;;) {
|
|
234
|
+
if (fsImpl.existsSync(path.join(dir, '.git'))) return dir
|
|
235
|
+
const parent = path.dirname(dir)
|
|
236
|
+
if (parent === dir) return null
|
|
237
|
+
dir = parent
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// The repository's own setup: a project that init-agent-os set up has .agent-os/, and its work routes,
|
|
242
|
+
// tracker, and finishing tasks live in .agent-os/workflow.md, which the project policy points to.
|
|
243
|
+
// Missing repository setup is a warning, never drift, so an onboarding script's exit code stays about installs.
|
|
244
|
+
function checkRepository(cwd, { fsImpl, report }) {
|
|
245
|
+
const root = repositoryRoot(cwd, fsImpl)
|
|
246
|
+
if (!root || !fsImpl.existsSync(path.join(root, '.agent-os'))) return
|
|
247
|
+
const label = `repository ${root}`
|
|
248
|
+
const workflow = readText(path.join(root, '.agent-os', 'workflow.md'), fsImpl)
|
|
249
|
+
if (workflow.state === 'absent') {
|
|
250
|
+
report('warn', label, 'no .agent-os/workflow.md, so the default work routes apply and deliver-work only recommends an issue ' +
|
|
251
|
+
`instead of requiring one. To add the routes, tracker, and finishing tasks: ${INIT_COMMAND} and choose routes and finishing tasks.`)
|
|
252
|
+
return
|
|
253
|
+
}
|
|
254
|
+
if (workflow.state === 'invalid') {
|
|
255
|
+
report('warn', label, `cannot read .agent-os/workflow.md: ${workflow.error}`)
|
|
256
|
+
return
|
|
257
|
+
}
|
|
258
|
+
if (!/^## Routes\b/m.test(workflow.text)) {
|
|
259
|
+
report('warn', label, `.agent-os/workflow.md has no "## Routes" section, so the default routes apply. To fix it: ${INIT_COMMAND}.`)
|
|
260
|
+
}
|
|
261
|
+
const pointed = ['CLAUDE.md', 'AGENTS.md', 'policy.md'].some((name) =>
|
|
262
|
+
readText(path.join(root, name), fsImpl).text.includes('.agent-os/workflow.md'))
|
|
263
|
+
if (!pointed) {
|
|
264
|
+
report('warn', label, 'the project policy does not point to .agent-os/workflow.md, so agents may not read it. ' +
|
|
265
|
+
`Add the line "Work routes, tracker, and finishing tasks: .agent-os/workflow.md." to the policy, or ${INIT_COMMAND}.`)
|
|
266
|
+
} else if (/^## Routes\b/m.test(workflow.text)) {
|
|
267
|
+
report('ok', label, '.agent-os/workflow.md is present and the project policy points to it')
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
228
271
|
export function latestPublishedVersion(packageName, { spawn = spawnSync } = {}) {
|
|
229
272
|
if (!/^@?[a-z0-9][a-z0-9._/-]*$/.test(packageName)) return null
|
|
230
273
|
// npm is a .cmd shim on Windows, which needs a shell; one fixed command string avoids argument joining.
|
|
@@ -295,6 +338,7 @@ export function collectDoctorReport({
|
|
|
295
338
|
}
|
|
296
339
|
|
|
297
340
|
checkPolicy(homeDir, { version, packageName, policy, installed, fsImpl, report })
|
|
341
|
+
checkRepository(cwd, { fsImpl, report })
|
|
298
342
|
return { entries, drift: entries.some((entry) => entry.level === 'drift') }
|
|
299
343
|
}
|
|
300
344
|
|
package/cli/index.test.mjs
CHANGED
|
@@ -767,6 +767,36 @@ test('doctor finds no installation and suggests install', async () => {
|
|
|
767
767
|
assert.match(text, /no Agent OS installation found/)
|
|
768
768
|
})
|
|
769
769
|
|
|
770
|
+
test('doctor reports the repository workflow file without counting it as drift', async () => {
|
|
771
|
+
const root = temporaryRoot()
|
|
772
|
+
const homeDir = path.join(root, 'home')
|
|
773
|
+
const repo = path.join(root, 'repo')
|
|
774
|
+
const cwd = path.join(repo, 'src')
|
|
775
|
+
fs.mkdirSync(cwd, { recursive: true })
|
|
776
|
+
fs.mkdirSync(path.join(repo, '.git'))
|
|
777
|
+
|
|
778
|
+
const outside = await runDoctor(homeDir, cwd)
|
|
779
|
+
assert.doesNotMatch(outside.text, /repository /)
|
|
780
|
+
|
|
781
|
+
fs.mkdirSync(path.join(repo, '.agent-os'))
|
|
782
|
+
const missing = await runDoctor(homeDir, cwd)
|
|
783
|
+
assert.equal(missing.code, 0)
|
|
784
|
+
assert.match(missing.text, /WARN {2}repository .*no \.agent-os\/workflow\.md.*init-agent-os/)
|
|
785
|
+
|
|
786
|
+
fs.writeFileSync(path.join(repo, '.agent-os', 'workflow.md'), '# How we work\n\n## Routes\n')
|
|
787
|
+
const unpointed = await runDoctor(homeDir, cwd)
|
|
788
|
+
assert.match(unpointed.text, /WARN {2}repository .*does not point to \.agent-os\/workflow\.md/)
|
|
789
|
+
|
|
790
|
+
fs.writeFileSync(path.join(repo, 'CLAUDE.md'), 'Work routes, tracker, and finishing tasks: .agent-os/workflow.md.\n')
|
|
791
|
+
const ready = await runDoctor(homeDir, cwd)
|
|
792
|
+
assert.match(ready.text, /OK {4}repository .*workflow\.md is present and the project policy points to it/)
|
|
793
|
+
|
|
794
|
+
fs.writeFileSync(path.join(repo, '.agent-os', 'workflow.md'), '# How we work\n')
|
|
795
|
+
const noRoutes = await runDoctor(homeDir, cwd)
|
|
796
|
+
assert.match(noRoutes.text, /WARN {2}repository .*no "## Routes" section/)
|
|
797
|
+
assert.doesNotMatch(noRoutes.text, /OK {4}repository/)
|
|
798
|
+
})
|
|
799
|
+
|
|
770
800
|
function snapshotTree(root) {
|
|
771
801
|
const entries = []
|
|
772
802
|
const visit = (dir) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sockulags/agent-os",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "A lightweight agent operating system for Claude Code and Codex: agent-os-core for intent, planning, and evidence, and agent-os-dev for delivery, review, and guard hooks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-os-core",
|
|
3
3
|
"description": "Agent OS core: capture intent, plan decisions, explain plainly, keep scope, and prove claims. Useful for any agent work, not only code.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.17.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lucas Skog"
|
|
7
7
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-os-core",
|
|
3
3
|
"description": "Agent OS core: capture intent, plan decisions, explain plainly, keep scope, and prove claims. Useful for any agent work, not only code.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.17.0",
|
|
5
5
|
"homepage": "https://sockulags.github.io/agent-os/",
|
|
6
6
|
"repository": "https://github.com/sockulags/agent-os",
|
|
7
7
|
"keywords": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: capture-intent
|
|
3
|
-
description: Captures what is needed and why
|
|
3
|
+
description: Captures what is needed and why, questioning out the need behind a stated wish one load-bearing question at a time, and writes a versioned intent file when the work is an initiative. User-invoked when a new need, feature request, or tracker item needs its goal settled, or as the questioning stage of plan-work. Not for requests whose goal is already articulated, small fixes, or facts the repository answers.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -29,9 +29,11 @@ Questioning ends when the person says it is done or when further answers stop ch
|
|
|
29
29
|
|
|
30
30
|
## Write the intent
|
|
31
31
|
|
|
32
|
-
Write a file
|
|
33
|
-
|
|
34
|
-
file: report the settled
|
|
32
|
+
Write a file only for an initiative: work that several pull requests will deliver and whose product
|
|
33
|
+
decisions someone other than the requester, such as a product owner, must agree to. Also write one
|
|
34
|
+
when the person or the project policy asks for it. Everything else needs no file: report the settled
|
|
35
|
+
understanding directly, written so it can open a tracker issue, and recommend `shape-work` when the
|
|
36
|
+
work should become issues. A feature that one or a few pull requests deliver is not an initiative.
|
|
35
37
|
|
|
36
38
|
1. Choose the location. Use `intents/` at the repository root unless the project policy names
|
|
37
39
|
another intent location, such as a separate product repository.
|
|
@@ -60,6 +62,7 @@ to `status: superseded` in the same review.
|
|
|
60
62
|
## Exit
|
|
61
63
|
|
|
62
64
|
Report the intent path and id, the choices made with their reasons, the ruled-out directions, and
|
|
63
|
-
the questions that remain open.
|
|
64
|
-
|
|
65
|
+
the questions that remain open. Name the kind of work, which decides its route, and end with the
|
|
66
|
+
route line. Recommend one next action: usually `plan-work` when behavior, decisions, or ground truth
|
|
67
|
+
still need settling, otherwise the next step of the route. Under plan-work, this stage informs the spec and
|
|
65
68
|
adds no separate approval gate.
|
|
@@ -38,9 +38,11 @@ differently per host.
|
|
|
38
38
|
|
|
39
39
|
Close with the entry points for a person who has not named a skill: a new need starts at
|
|
40
40
|
`capture-intent`, behavior and decisions at `plan-work`, screens and their sketches at
|
|
41
|
-
`design-work`, delivery structure at `shape-work`,
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
`design-work`, delivery structure at `shape-work`, a decision-complete unit at `deliver-work`, a bug with
|
|
42
|
+
a known fix at `shape-work` for one issue, and a diff to review only a request in the person's own
|
|
43
|
+
words; name the last five only when agent-os-dev is installed. Say plainly that automatic skills need no entry point
|
|
44
|
+
for an implicit trigger; mention an automatic workflow's explicit modes only when useful. End with
|
|
45
|
+
the page that matches situations to skills, https://sockulags.github.io/agent-os/guide/where-to-start.
|
|
44
46
|
|
|
45
47
|
## Boundaries
|
|
46
48
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-work
|
|
3
|
-
description: Plans a coherent mission from outcome through coverage, decisions, feasibility, and verification with adaptive depth, and writes the result as a versioned spec beside
|
|
3
|
+
description: Plans a coherent mission from outcome through coverage, decisions, feasibility, and verification with adaptive depth, and writes the result as a versioned spec beside an initiative's intent, or as a contract a tracker issue can carry. User-invoked when the developer wants a plan or a spec, or the work needs one. Not required for an already clear implementation request or a substitute for shape-work delivery structure.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -16,6 +16,9 @@ request. Shape-work may also start from an existing specification.
|
|
|
16
16
|
Do not ask the developer to select a mode. Match the depth to scope and uncertainty separately:
|
|
17
17
|
|
|
18
18
|
- A small, clear fix needs its outcome, boundaries, and verification, and no spec file.
|
|
19
|
+
- Work that is not an initiative needs no spec file, whatever its size. Its settled contract
|
|
20
|
+
goes into the tracker issues that `shape-work` writes, or straight into delivery when one pull
|
|
21
|
+
request is enough.
|
|
19
22
|
- A large but known change needs repository inspection and a coverage check across the relevant
|
|
20
23
|
flows, states, errors, integrations, and the screens each role sees.
|
|
21
24
|
- A bounded open choice needs discoverable facts first, then only focused questions for choices
|
|
@@ -24,7 +27,8 @@ Do not ask the developer to select a mode. Match the depth to scope and uncertai
|
|
|
24
27
|
separate evidence work, or parallel treatment.
|
|
25
28
|
|
|
26
29
|
Use [capture-intent](../capture-intent/SKILL.md) when the outcome is still moving or cannot be
|
|
27
|
-
stated, or when no intent
|
|
30
|
+
stated, or when an initiative has no intent yet. An initiative is work that several pull requests
|
|
31
|
+
deliver and whose product decisions someone other than the requester must agree to. Use [explain-work](../explain-work/SKILL.md)
|
|
28
32
|
for the plain-language summary at the top of the spec and whenever an actual decision needs one. A
|
|
29
33
|
summary is not a general approval gate: existing authority continues across workflow boundaries,
|
|
30
34
|
and planning alone never starts implementation.
|
|
@@ -53,22 +57,32 @@ does not authorize product implementation, and an issue becoming ready does not
|
|
|
53
57
|
|
|
54
58
|
## Settle the interface
|
|
55
59
|
|
|
56
|
-
Design is part of the plan, not something delivery invents. When the plan writes a
|
|
57
|
-
new or changed screen or state in its `## Interface` section, per role that sees
|
|
58
|
-
`None` when nothing a person sees or does changes. A small, clear fix needs no spec;
|
|
59
|
-
its interface decision. A plan whose interface changes is ready
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
Design is part of the plan, not something delivery invents by accident. When the plan writes a
|
|
61
|
+
spec, list every new or changed screen or state in its `## Interface` section, per role that sees
|
|
62
|
+
it, or write `None` when nothing a person sees or does changes. A small, clear fix needs no spec;
|
|
63
|
+
its request is its interface decision. A plan whose interface changes is ready when each listed
|
|
64
|
+
surface is decided, left to delivery by the developer's choice, or explicitly deferred with an
|
|
65
|
+
owner. An undecided surface is an open question, not a detail for delivery to fill in.
|
|
66
|
+
|
|
67
|
+
Sketching is the developer's choice and never a required step. They may sketch before any spec
|
|
68
|
+
exists to find out what they are trying to solve, before delivery to settle a screen, after delivery
|
|
69
|
+
to reconsider one that was left to it, or not at all. When agent-os-dev is installed and a surface
|
|
70
|
+
is still open, recommend `design-work` in one line with the reason and ask once whether to sketch
|
|
71
|
+
now, after the screen is built, or not at all; a `When` entry in the policy's `## Design` section
|
|
72
|
+
answers this without asking. On "now", continue into `design-work` and return here when it is done.
|
|
73
|
+
Otherwise ask the developer for each open decision and record the answer they state, or record the
|
|
74
|
+
surface as `Left to delivery:` with what delivery may decide when they say so; never guess a
|
|
75
|
+
layout. Start from sketches the developer already made. A developer who explicitly hands those
|
|
76
|
+
decisions to you for this run is the exception: decide, record each as `Decided: (delegated)` with
|
|
77
|
+
its reason, and list them in the review for the developer to overturn.
|
|
68
78
|
|
|
69
79
|
## Write the spec
|
|
70
80
|
|
|
71
|
-
|
|
81
|
+
Write a spec file only when the work has an intent, or when the person or the project policy asks
|
|
82
|
+
for one. Otherwise report the settled contract, with its behavior, interface decisions, boundaries,
|
|
83
|
+
and ground truth, in the form a tracker issue can carry, and recommend `shape-work` or
|
|
84
|
+
`deliver-work` as the next action. When the work has an intent, write `spec.md` in the same
|
|
85
|
+
`intents/<id>/` folder from
|
|
72
86
|
[references/spec-template.md](references/spec-template.md). Its `built_on` names the intent revision
|
|
73
87
|
it answers, such as `intent@2`. Acceptance examples originate in the spec. A delivery unit written
|
|
74
88
|
by `shape-work` states the ones it is accountable for and cites the spec section; the spec stays the
|
|
@@ -128,6 +142,10 @@ and report the unsynced updates. If the information must survive the session, ad
|
|
|
128
142
|
`Pending tracker updates` section to the spec only when needed; store a delta, not a copy of this
|
|
129
143
|
plan.
|
|
130
144
|
|
|
131
|
-
Recommend one concrete next action at exit, with the reason it wins and any blocker
|
|
132
|
-
|
|
133
|
-
|
|
145
|
+
Recommend one concrete next action at exit, with the reason it wins and any blocker, and end with
|
|
146
|
+
the route line. When the route's next step is `shape-work` and agent-os-dev is installed, follow the
|
|
147
|
+
person's `Next step:` preference, which by default asks once whether to create the issues now; on
|
|
148
|
+
yes, or with `continue`, go on into `shape-work` with the settled contract, so the decisions reach
|
|
149
|
+
the tracker before the session ends. Continue into an authorized next workflow
|
|
150
|
+
without adding an approval ceremony; stop when the plan is ready and the request does not include
|
|
151
|
+
implementation.
|
|
@@ -37,7 +37,8 @@ status: accepted
|
|
|
37
37
|
## Interface
|
|
38
38
|
|
|
39
39
|
<One bullet for every new or changed screen or state, per role that sees it, in one of these forms:
|
|
40
|
-
- <role>, <screen or state>. Decided: <the decision and its reason>. Rejected: <alternatives>. Sketch: <location>.
|
|
40
|
+
- <role>, <screen or state>. Decided: <the decision and its reason>. Rejected: <alternatives>. Sketch: <location, when one was made>.
|
|
41
|
+
- <role>, <screen or state>. Left to delivery: <what delivery may decide, and any constraint it must keep>.
|
|
41
42
|
- <role>, <screen or state>. Deferred to <who> by <when>: <what is undecided>.
|
|
42
43
|
- <role>, <screen or state>. Open: <the question>.
|
|
43
44
|
Write `None` when nothing a person sees or does changes. Never delete.>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-os-dev",
|
|
3
3
|
"description": "Agent OS development: shape plans, deliver against ground truth, review independently, and guard delivery with hooks. Requires agent-os-core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.17.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lucas Skog"
|
|
7
7
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-os-dev",
|
|
3
3
|
"description": "Agent OS development: shape plans, deliver against ground truth, review independently, and guard delivery with hooks. Requires agent-os-core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.17.0",
|
|
5
5
|
"homepage": "https://sockulags.github.io/agent-os/",
|
|
6
6
|
"repository": "https://github.com/sockulags/agent-os",
|
|
7
7
|
"keywords": [
|
|
@@ -33,6 +33,7 @@ invoke it. Use this workflow only when the developer explicitly requests an inte
|
|
|
33
33
|
3. Reconcile the manifest with live Git and worktree state before every dispatch wave.
|
|
34
34
|
4. Dispatch the open frontier into isolated workspaces within project concurrency. Each worker gets
|
|
35
35
|
one current task definition and returns a commit SHA, changed files, checks, and uncertainty.
|
|
36
|
+
A unit that is a tracker issue without an intent keeps the tracker's closing reference to it.
|
|
36
37
|
A unit taken from a plan keeps its `Intent-Unit: <intent-id>/<unit-key>` line in the commit or
|
|
37
38
|
pull request that delivers it, so the plan's status can be read from history.
|
|
38
39
|
5. Integrate completed tasks in dependency order. Detect already-contained commits, rerun relevant
|
|
@@ -32,6 +32,8 @@ Read `REVIEW.md` at the repository root when it exists. It is the repository's r
|
|
|
32
32
|
areas, severity tiers, what counts as a blocking finding, and limits such as a cap on minor
|
|
33
33
|
findings. It narrows and ranks findings; it never turns a speculative concern into a supported one.
|
|
34
34
|
|
|
35
|
+
When the candidate links a tracker issue with no intent behind it, that issue is the contract:
|
|
36
|
+
review against its outcome, boundaries, acceptance, and ground truth.
|
|
35
37
|
When the candidate carries `Intent-Unit: <intent-id>/<unit-key>`, read that unit in
|
|
36
38
|
`intents/<intent-id>/plan.md` and the spec beside it. The spec's behavior, boundaries, and ground
|
|
37
39
|
truth are the review contract: report a candidate that misses an acceptance example, crosses a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deliver-work
|
|
3
|
-
description: Delivers one decision-ready change against explicit boundaries and ground truth. User-invoked for implementation, including as a batch worker. Not for exploration or specification-only work.
|
|
3
|
+
description: Delivers one decision-ready change, or every unit of a finished intent in sequence, against explicit boundaries and ground truth. User-invoked for implementation, including as a batch worker. Not for exploration or specification-only work.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -23,7 +23,8 @@ Read the request, repository policy, relevant code, and working-tree state. Pres
|
|
|
23
23
|
Resolve discoverable facts yourself. When the unit comes from `intents/<id>/plan.md`, or from a
|
|
24
24
|
tracker issue whose `Origin` names an intent, read its plan entry or issue, spec, and intent: the
|
|
25
25
|
unit's contract, the spec's boundaries, its `## Interface` entries with their sketches, and its
|
|
26
|
-
ground truth are the contract below.
|
|
26
|
+
ground truth are the contract below. A tracker issue with no intent behind it is itself the whole
|
|
27
|
+
contract: its need, outcome, boundaries, acceptance, and ground truth. Before editing, know:
|
|
27
28
|
|
|
28
29
|
- **Outcome:** the observable change requested.
|
|
29
30
|
- **Boundaries:** explicit non-goals and the smallest plausible change surface.
|
|
@@ -41,9 +42,12 @@ cites goes back the same way, because the spec wins. Delivery never edits an acc
|
|
|
41
42
|
spec, or plan entry; a needed change goes back through those workflows.
|
|
42
43
|
|
|
43
44
|
An open or deferred interface surface is also an unresolved product decision. When the unit builds
|
|
44
|
-
a screen whose `## Interface` entry is
|
|
45
|
-
to `
|
|
46
|
-
|
|
45
|
+
a screen whose `## Interface` entry is open or deferred, stop before mutating that screen and return
|
|
46
|
+
it to the developer through `plan-work`. A screen left to delivery is yours to build inside the
|
|
47
|
+
entry's constraints and the project's established patterns; show the built screen with the
|
|
48
|
+
delivery, as an image when the developer has no checkout, so they can judge it. Build decided
|
|
49
|
+
screens to match their sketch when one exists, using production components rather than the sketch's
|
|
50
|
+
code.
|
|
47
51
|
|
|
48
52
|
## Confirm one delivery unit
|
|
49
53
|
|
|
@@ -51,11 +55,12 @@ Before editing each unit, verify that it is one coherent implementation issue or
|
|
|
51
55
|
bounded direct request: one observable outcome, one reviewable change boundary, explicit ground
|
|
52
56
|
truth, and satisfied dependencies. If an unshaped target contains several separately closable outcomes,
|
|
53
57
|
different delivery targets, or unresolved product choices, stop before mutation and return it for
|
|
54
|
-
shaping into implementation-ready issues
|
|
58
|
+
shaping into implementation-ready issues, unless the request is to finish a whole intent, which
|
|
59
|
+
covers that shaping. Do not choose `batch-work`; execution strategy belongs to
|
|
55
60
|
the developer.
|
|
56
61
|
|
|
57
|
-
Skip a unit that already has an open pull request carrying its `Intent-Unit` line
|
|
58
|
-
claimed it. When the request explicitly covers a bounded set of already shaped issues, deliver one ready unit
|
|
62
|
+
Skip a unit that already has an open pull request carrying its `Intent-Unit` line, or for an issue
|
|
63
|
+
without an intent, an open pull request that links the issue: someone else has claimed it. When the request explicitly covers a bounded set of already shaped issues, deliver one ready unit
|
|
59
64
|
at a time and continue sequentially within that authority. Re-read dependencies and project state
|
|
60
65
|
after each unit; stop for a material unresolved decision or an exhausted ready frontier. This repeats
|
|
61
66
|
the active delivery contract, not `dispatch-next` or an implicit batch. An undecomposed epic still
|
|
@@ -68,6 +73,34 @@ authorized result, not merely whichever child happens to be green. When the requ
|
|
|
68
73
|
run its aggregate verification and report the final verification owner. Child success never closes
|
|
69
74
|
the parent or grants authority over its siblings.
|
|
70
75
|
|
|
76
|
+
## Finish a whole intent
|
|
77
|
+
|
|
78
|
+
When the request is to finish an intent, the target is every unit of its plan, and the request
|
|
79
|
+
covers that bounded set and the shaping it needs. Nothing else changes: each unit still goes
|
|
80
|
+
through the work loop and the review gate.
|
|
81
|
+
|
|
82
|
+
- **Before anything.** The intent and spec must be accepted and current, and no `## Interface`
|
|
83
|
+
surface may be `Open:` or `Deferred to`. Otherwise stop with the file and the question. A surface
|
|
84
|
+
left to delivery does not stop the run.
|
|
85
|
+
- **Plan.** With no plan, or a plan built on an older spec revision, shape the units with
|
|
86
|
+
`shape-work` first and commit the plan with the work; it needs no separate review. A unit that
|
|
87
|
+
shaping must block on a product choice stays blocked while the others proceed.
|
|
88
|
+
- **Units.** Deliver ready units one at a time in dependency order, as the sequence rule above
|
|
89
|
+
describes. A unit delivered earlier in this run counts as delivered for the units that depend on
|
|
90
|
+
it. Running units in parallel is `batch-work` and stays the developer's explicit choice.
|
|
91
|
+
- **One candidate.** Unless the project policy asks for a pull request per unit, work on one branch
|
|
92
|
+
named `<intent-id>` and one draft pull request. Each unit's commits carry its `Intent-Unit` line,
|
|
93
|
+
and the pull request body carries one line per delivered unit.
|
|
94
|
+
- **Finish.** After the last unit, run the spec's ground truth and any epic's aggregate
|
|
95
|
+
verification on the whole result, run the initiative's finishing tasks, apply the review gate to
|
|
96
|
+
the complete candidate, set the intent's and plan's `status: done`, and mark the pull request
|
|
97
|
+
ready. Never merge unless the
|
|
98
|
+
request or project policy includes it.
|
|
99
|
+
- **Stop and resume.** Stop when what remains is blocked, when ground truth fails and the fix is
|
|
100
|
+
outside the unit, or when a finding needs a product decision. Report the units delivered, the
|
|
101
|
+
units left, and the exact blocker. A later run reads what is delivered from the `Intent-Unit`
|
|
102
|
+
lines on the branch and the pull request, never from notes.
|
|
103
|
+
|
|
71
104
|
## Work loop
|
|
72
105
|
|
|
73
106
|
1. Inspect enough of the affected system to choose a coherent change. Apply quality-ratchet's
|
|
@@ -96,11 +129,28 @@ the parent or grants authority over its siblings.
|
|
|
96
129
|
|
|
97
130
|
When the delivery target includes a pull request, claim the unit early: work on a branch named by
|
|
98
131
|
the project policy, or `<intent-id>-<unit-key>` by default, and open a draft pull request with the
|
|
99
|
-
first commit. Its body carries `Intent-Unit: <intent-id>/<unit-key>`,
|
|
100
|
-
|
|
132
|
+
first commit. Its body carries `Intent-Unit: <intent-id>/<unit-key>`, or for an issue without an
|
|
133
|
+
intent the tracker's closing reference such as `Closes #12` and a branch named after the issue, then
|
|
134
|
+
the outcome, the ground truth, and, as delivery proceeds, the evidence and review record. Mark it ready for review only after the
|
|
101
135
|
final verification. In the pull request that delivers the last open unit of a plan, also set the
|
|
102
136
|
intent's and plan's `status: done`. Never write delivery progress into `plan.md`.
|
|
103
137
|
|
|
138
|
+
## Route and finishing tasks
|
|
139
|
+
|
|
140
|
+
Read the route for this kind of work from `.agent-os/workflow.md` when the project policy points to
|
|
141
|
+
one, otherwise from a default path the project policy states, otherwise from the global policy's
|
|
142
|
+
default routes. When the route puts `shape-work` before delivery and the work has no issue or plan
|
|
143
|
+
unit, say so in one sentence and recommend `shape-work`. Stop before mutation only when the project
|
|
144
|
+
has a workflow file, a tracker can be written, and the request does not say to skip the issue;
|
|
145
|
+
otherwise continue with the delivery.
|
|
146
|
+
|
|
147
|
+
When the work is complete, run the workflow file's `## Finishing tasks` for this kind of work; for
|
|
148
|
+
an initiative, in the pull request that delivers its last unit. A repository task, such as a
|
|
149
|
+
changelog entry, joins that pull request and its review gate. An external task runs when a tool can
|
|
150
|
+
write there, since the workflow file is project policy; otherwise hand over the finished text with
|
|
151
|
+
its destination. Report each task as done or handed off; none merges, deploys, or closes anything
|
|
152
|
+
unless it says so. End with the route line, naming the issue or unit and the resume command.
|
|
153
|
+
|
|
104
154
|
Ground truth governs the loop; no prescribed implementation sequence substitutes for it.
|
|
105
155
|
|
|
106
156
|
## Review gate
|
|
@@ -167,33 +217,17 @@ because a necessary detail was discovered late. Continue independent authorized
|
|
|
167
217
|
partial block. A context or session limit calls for a compact continuation record, not a new
|
|
168
218
|
product issue. Changing workflow names is not itself a new approval step.
|
|
169
219
|
|
|
170
|
-
No workflow grants tracker write access automatically
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
Without tracker mandate, keep corrections local and report the delta. If it must survive a session,
|
|
175
|
-
use the work record's existing sections and add `Pending tracker updates` only when needed; record
|
|
176
|
-
the unsynced delta, never a copied plan.
|
|
220
|
+
No workflow grants tracker write access automatically; the global policy's tracker rule decides
|
|
221
|
+
what a mandate covers, and a ready issue is not authorization. Without a mandate, keep corrections
|
|
222
|
+
local and report the delta, in the work record's `Pending tracker updates` when it must survive the
|
|
223
|
+
session.
|
|
177
224
|
|
|
178
225
|
## Resume only when useful
|
|
179
226
|
|
|
180
227
|
Ordinary work needs no workflow record, and a draft pull request is the record for claimed units.
|
|
181
|
-
For work expected to span sessions without a pull request, keep a compact
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
```yaml
|
|
185
|
-
---
|
|
186
|
-
agent_os_work: 2
|
|
187
|
-
title: <work title>
|
|
188
|
-
status: active
|
|
189
|
-
next_action: <concrete continuation>
|
|
190
|
-
---
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Record only Outcome, Boundaries, Ground truth, Decisions, and Evidence. Use `blocked`, `verified`, or
|
|
194
|
-
`delivered` when those words help the next session resume accurately. Add `Pending tracker updates`
|
|
195
|
-
only when an authorized or reported tracker delta needs to survive the session. The record is working memory,
|
|
196
|
-
not an approval ledger, plan copy, or audit receipt.
|
|
228
|
+
For work expected to span sessions without a pull request, keep a compact `.agent-os/work/<slug>.md`
|
|
229
|
+
in the [work record format](references/work-records.md). The record is working memory, not an
|
|
230
|
+
approval ledger, plan copy, or audit receipt.
|
|
197
231
|
|
|
198
232
|
## Batch workers
|
|
199
233
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Work records
|
|
2
|
+
|
|
3
|
+
A work record is resumable working memory for delivery that spans sessions without a pull request.
|
|
4
|
+
Ordinary work needs none, and a draft pull request is the record for a claimed unit.
|
|
5
|
+
|
|
6
|
+
Keep it as `.agent-os/work/<slug>.md`:
|
|
7
|
+
|
|
8
|
+
```yaml
|
|
9
|
+
---
|
|
10
|
+
agent_os_work: 2
|
|
11
|
+
title: <work title>
|
|
12
|
+
status: active
|
|
13
|
+
next_action: <concrete continuation>
|
|
14
|
+
---
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Record only Outcome, Boundaries, Ground truth, Decisions, and Evidence. Use the status `blocked`,
|
|
18
|
+
`verified`, or `delivered` when that word helps the next session resume accurately. Add a
|
|
19
|
+
`Pending tracker updates` section only when an authorized or reported tracker delta needs to survive
|
|
20
|
+
the session, and record the unsynced delta, never a copied plan.
|