@sockulags/agent-os 0.16.0 → 0.17.1

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/README.md +33 -41
  2. package/cli/doctor.mjs +45 -1
  3. package/cli/index.mjs +13 -2
  4. package/cli/index.test.mjs +40 -0
  5. package/package.json +1 -1
  6. package/plugins/agent-os-core/.claude-plugin/plugin.json +1 -1
  7. package/plugins/agent-os-core/.codex-plugin/plugin.json +1 -1
  8. package/plugins/agent-os-core/skills/capture-intent/SKILL.md +9 -6
  9. package/plugins/agent-os-core/skills/list-skills/SKILL.md +5 -3
  10. package/plugins/agent-os-core/skills/plan-work/SKILL.md +36 -18
  11. package/plugins/agent-os-core/skills/plan-work/references/spec-template.md +2 -1
  12. package/plugins/agent-os-dev/.claude-plugin/plugin.json +1 -1
  13. package/plugins/agent-os-dev/.codex-plugin/plugin.json +1 -1
  14. package/plugins/agent-os-dev/skills/batch-work/SKILL.md +1 -0
  15. package/plugins/agent-os-dev/skills/check-work/SKILL.md +2 -0
  16. package/plugins/agent-os-dev/skills/deliver-work/SKILL.md +67 -33
  17. package/plugins/agent-os-dev/skills/deliver-work/references/work-records.md +20 -0
  18. package/plugins/agent-os-dev/skills/design-work/SKILL.md +22 -7
  19. package/plugins/agent-os-dev/skills/dispatch-next/SKILL.md +6 -3
  20. package/plugins/agent-os-dev/skills/init-agent-os/SKILL.md +22 -12
  21. package/plugins/agent-os-dev/skills/init-agent-os/policy.md +37 -34
  22. package/plugins/agent-os-dev/skills/init-agent-os/references/guards.md +6 -5
  23. package/plugins/agent-os-dev/skills/init-agent-os/references/repository-init.md +15 -6
  24. package/plugins/agent-os-dev/skills/init-agent-os/references/workflow-template.md +80 -0
  25. package/plugins/agent-os-dev/skills/quality-ratchet/SKILL.md +4 -3
  26. package/plugins/agent-os-dev/skills/quality-ratchet/scripts/intent-files.mjs +1 -1
  27. package/plugins/agent-os-dev/skills/quality-ratchet/scripts/intent-files.test.mjs +6 -1
  28. package/plugins/agent-os-dev/skills/shape-work/SKILL.md +28 -17
  29. package/plugins/agent-os-dev/skills/shape-work/references/implementation-issues.md +34 -14
  30. package/policy.md +37 -34
@@ -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. Before editing, know:
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 not decided, stop before mutating that screen and return it
45
- to `design-work`. Build decided screens to match their sketch, using production components rather
46
- than the sketch's code.
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. Do not choose `batch-work`; execution strategy belongs to
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: someone else has
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>`, the outcome, the ground truth,
100
- and, as delivery proceeds, the evidence and review record. Mark it ready for review only after the
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. Tracker maintenance is allowed only when the
171
- request or project policy grants it, and then only for implementation detail and technical
172
- ordering/readiness inside the authorized set. It does not include changing acceptance, owners,
173
- delivery scope, adding unrequested work, or closing an issue. A ready issue is not authorization.
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
- `.agent-os/work/<slug>.md`:
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.
@@ -1,14 +1,17 @@
1
1
  ---
2
2
  name: design-work
3
- description: Sketches the user-facing interface of planned work in the medium the project has chosen, such as standalone HTML, a component workshop, or images, inside the real layout with the project's own look, and records the decisions in the spec's Interface section. User-invoked, or continued into from plan-work when a spec changes what a person sees or does. Not for production UI implementation, polish of shipped screens, or work with no user-facing change.
3
+ description: Sketches the user-facing interface of planned work in the medium the project has chosen, such as standalone HTML, a component workshop, or images, inside the real layout with the project's own look, and records the decisions in the spec's Interface section. User-invoked at any point, or continued into from plan-work when the developer chooses to sketch; no workflow requires it. Not for production UI implementation, polish of shipped screens, or work with no user-facing change.
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
7
  # Design work
8
8
 
9
- Settle what people will see and do before delivery starts. The result is a set of sketches in the
10
- medium the project chose, and a spec whose `## Interface` section says, for every new or changed
11
- screen and state, what was decided and why. A product owner or account manager should be able to
9
+ Sketch what people will see and do, so the person can decide it by looking. When is their choice:
10
+ before a spec exists, to find out what they are trying to solve; before delivery, to settle a
11
+ screen; after delivery, to reconsider a screen that was left to it; or not at all. No workflow
12
+ requires this skill. The result is a set of sketches in the medium the project chose and, when a
13
+ spec exists, an `## Interface` section that says for each sketched screen and state what was decided
14
+ and why. A product owner or account manager should be able to
12
15
  judge the sketches without a design tool or a checkout; when the person deciding has no checkout,
13
16
  give them images.
14
17
 
@@ -16,7 +19,8 @@ give them images.
16
19
 
17
20
  Read the project policy, the intent and spec when they exist, and the request. The policy's
18
21
  `## Design` section names how sketches are made (`Sketch with`), where they live (`Sketches live`),
19
- and the widths that matter. Then inspect the tokens, the shared components, and the nearest existing
22
+ the widths that matter, and optionally when the project sketches (`When`: `before delivery`,
23
+ `after delivery`, `ask`, or `never`). Then inspect the tokens, the shared components, and the nearest existing
20
24
  views. Resolve these facts yourself; ask the person only about what the product should be.
21
25
 
22
26
  ## Medium
@@ -68,7 +72,10 @@ Start from the spec's `## Interface` section: the surfaces it lists per role and
68
72
  marks open. A surface that is already decided is sketched only when the decision is about to
69
73
  change. When the section says `None`, report that there is nothing to sketch and write no files.
70
74
  When the section is missing or empty, derive the surfaces from the spec's behavior examples and
71
- confirm the list with the person before sketching.
75
+ confirm the list with the person before sketching. With no spec yet, sketch from the request and
76
+ write no spec: report what the sketches settled, so `capture-intent` or `plan-work` can start from
77
+ them. A surface marked `Left to delivery:` is sketched only when the person asks, and its decision
78
+ then replaces that entry.
72
79
 
73
80
  - **Real context.** Render each screen inside the layout the person will actually see, such as the
74
81
  application shell, navigation, and page frame, not as a lone component on a blank canvas.
@@ -105,12 +112,20 @@ When the person cannot answer now, commit the spec on a branch, with the sketche
105
112
  committed, open a draft pull request that lists each open decision with the address or image of its
106
113
  sketch, and wait. Never record your own recommendation as their decision.
107
114
 
115
+ The one exception is a person who explicitly hands the open decisions to you for this run, for
116
+ example so that work can continue while they are away. Then still build each sketch, choose your
117
+ recommendation, and record it as `Decided: (delegated)` with the reason and the rejected
118
+ alternatives. List every delegated decision in the pull request so the person can overturn it
119
+ there; merging the review is still their acceptance. A person who is only unavailable has delegated
120
+ nothing.
121
+
108
122
  ## Record
109
123
 
110
124
  Write the outcome into the spec's `## Interface` section, one bullet per surface: the role and the
111
125
  screen or state, then `Decided:` with the decision, its reason, the alternatives rejected, and the
112
126
  sketch's location; `Deferred to <who> by <when>:` with what is undecided; or `Open:` with the question
113
- while it waits on the person. The text must stand on its own: a reader who can no longer open the
127
+ while it waits on the person. Leave a `Left to delivery:` entry the person did not ask to sketch
128
+ as it is. The text must stand on its own: a reader who can no longer open the
114
129
  sketch still knows what was decided.
115
130
 
116
131
  A sketch's location must be reachable by everyone who reads the spec: a repository path, a pull
@@ -15,7 +15,8 @@ Read project policy, queue conventions, the units in `intents/*/plan.md`, issues
15
15
  CI. A unit's status comes from pull requests, never from the plan: a unit with an open pull request
16
16
  carrying its `Intent-Unit: <intent-id>/<unit-key>` line is claimed, one whose pull request merged is
17
17
  delivered, and one whose dependencies are delivered and whose line carries no `blocked:` note is
18
- ready. A spec or plan whose `built_on` revision is older than its source is not ready; route it to
18
+ ready. An issue without an intent is claimed by an open pull request that links it and delivered
19
+ when that pull request merges. A spec or plan whose `built_on` revision is older than its source is not ready; route it to
19
20
  `plan-work` or `shape-work`. Prioritize work already in
20
21
  flight when it has an actionable review or failure. Select one target using the repository's
21
22
  priority rules and explain why it wins.
@@ -24,8 +25,10 @@ Within those priorities, prefer the action that removes a consequential uncertai
24
25
  dependent work at reasonable effort. When observation would settle an open decision, recommend a
25
26
  bounded experiment through plan-work or shape-work; a ready coding task need not always win.
26
27
 
27
- Route broad or mission-level planning to `plan-work`, a bounded open delivery choice to
28
- `shape-work`, and one selected implementation-ready issue to `deliver-work`. Route to `batch-work`
28
+ Follow the route for the kind of work from `.agent-os/workflow.md`, or the global policy's default
29
+ routes, and end with the route line. Route broad or mission-level planning to `plan-work`, a bounded open delivery choice to
30
+ `shape-work`, and one selected implementation-ready issue to `deliver-work`, which also takes an
31
+ intent the developer asks to finish. Route to `batch-work`
29
32
  only when the developer
30
33
  explicitly asks to execute an existing ready issue graph as an integrated batch; issue count alone
31
34
  does not choose the workflow.
@@ -22,12 +22,16 @@ Invoked as `init-agent-os global`.
22
22
  The npm installer imports this writer, so both share one marker contract. Each block starts with
23
23
  an `<!-- agent-os version X -->` line taken from the installed release.
24
24
  4. Settle personal preferences in a `## My working preferences` section outside the managed block
25
- of each target file. When the section is absent, ask three things with a recommendation each:
25
+ of each target file. When the section is absent, ask four things with a recommendation each:
26
26
  when unsure, ask early or decide and report (recommend decide and report for reversible choices);
27
- explanations short or walked through (recommend short); and anything the agent should always or
28
- never do. When it exists, show it and ask what to change; "nothing" writes nothing. These are
27
+ explanations short or walked through (recommend short); what happens when a step of a route
28
+ ends, written as a `Next step:` line with `ask` (ask once whether to start the next step),
29
+ `continue` (start the next planning step without asking and ask once before delivery), or
30
+ `recommend` (only recommend), recommending `ask`; and anything the agent should always or never
31
+ do. When it exists, show it and ask what to change; "nothing" writes nothing. These are
29
32
  style only: they yield to project policy and never grant merge, deploy, or external-effect
30
- authority.
33
+ authority. The one exception is `Next step: continue`, which lets a planning workflow go on into
34
+ `shape-work` and so lets it create its new issues without asking first.
31
35
 
32
36
  ## Mode: repo init (default)
33
37
 
@@ -48,12 +52,16 @@ These are the preferences a repository records, under `## Working agreement` in
48
52
 
49
53
  - who works here and who approves: solo, or a team and its reviewer;
50
54
  - the default stopping point: local change, pull request, merge, or deployment;
51
- - the default path for a new feature: deliver directly, spec first, or intent, spec, and plan;
52
- - where delivery units live: `plan.md` or a tracker;
55
+ - the routes: show the default route for each kind of work (a bug with a known fix, a small change,
56
+ a feature, an initiative) and ask what to change, recommending the defaults, where every route
57
+ gives the work an issue before delivery and only initiatives get intent and spec files;
58
+ - which tracker holds issues, and where an initiative's units live: `plan.md` or that tracker;
59
+ - where an initiative is documented when it is finished, beyond its pull request, such as a
60
+ changelog or a wiki page, recommending the changelog when the repository has one;
53
61
  - the language of commits, docs, and issues;
54
- - with the frontend module active, whether interfaces are sketched before they are built and, if
55
- so, in which medium and where the sketches live, recommending a workshop the repository already
56
- has and `html` otherwise.
62
+ - with the frontend module active, when interfaces are sketched (before delivery, after it, asked
63
+ each time, or never) and, unless never, in which medium and where the sketches live,
64
+ recommending asking each time, a workshop the repository already has, and `html` otherwise.
57
65
 
58
66
  Ask them in at most two rounds of at most four questions, through the host's structured question
59
67
  tool when it has one. Each question leads with its recommended answer and states the consequence of
@@ -93,7 +101,9 @@ An answer that settles a core field is written once.
93
101
  instruction surface. When none exists, write a new `policy.md`, plus a `CLAUDE.md` holding
94
102
  `@policy.md` and an `AGENTS.md` that says to read it, so the hosts load it. Preserve unrelated
95
103
  instructions, show the resulting diff, and do not request a second approval for this setup write.
96
- 7. Write the Agent OS repository files the reference lists: `.agent-os/guards.json`,
104
+ 7. Write `.agent-os/workflow.md` from [workflow-template.md](references/workflow-template.md) with the
105
+ routes, tracker, tracker mandate, where information goes, and finishing tasks, and point to it
106
+ from the policy in one line. Write the other Agent OS repository files the reference lists: `.agent-os/guards.json`,
97
107
  `.agent-os/quality.json`, `REVIEW.md`, and, for GitHub Actions repositories, the `lint-intents` and `agent-review` workflows. Propose a
98
108
  `CODEOWNERS` entry for intents and specs without writing it.
99
109
  8. Close with how you will work here, in at most six plain lines, and one recommended first action.
@@ -104,11 +114,11 @@ A return run adjusts a setup; it never repeats the interview.
104
114
 
105
115
  1. Inspect as in the first run, and resolve policy ownership the same way.
106
116
  2. Show a short plain-language summary of what is set today: working agreement, delivery,
107
- verification, and planning. Under it, flag only what needs attention: drift where the policy
117
+ verification, planning, and the workflow file's routes and finishing tasks. Under it, flag only what needs attention: drift where the policy
108
118
  contradicts the repository, such as a command that no longer exists; any core field, working
109
119
  agreement item, or active module the policy does not cover; and **Open setup questions**.
110
120
  3. Ask one question: what do you want to change? Offer working agreement, delivery, verification,
111
- planning, and what the summary flagged, plus "nothing, this was a check".
121
+ planning, routes and finishing tasks, and what the summary flagged, plus "nothing, this was a check".
112
122
  4. Ask only about the chosen areas, under the first run's question rules.
113
123
  5. Write only the chosen areas and show the diff; everything else stays byte for byte. Agent OS
114
124
  repository files change only when a chosen area needs it. "Nothing" writes nothing and leaves any
@@ -38,29 +38,31 @@ Rules:
38
38
  - Never force the reader to cross-reference labels or numbering invented earlier in the text; say what you mean in place.
39
39
  - Explanations belong in prose; tables only for short enumerable facts.
40
40
  - Calibrate tone to the topic: playfulness is fine, neutral and factual the moment the subject is serious. When in doubt, it is serious.
41
- - Orchestration is opt-in: manual agent-os skills such as `capture-intent`, `plan-work`,
42
- `explain-work`, `record-lesson`, and `list-skills` run only when invoked through the name the host
43
- exposes (`/plan-work` for direct Claude skills, `/agent-os-core:plan-work` for the Claude plugin,
44
- or `$plan-work` for Codex). Never self-invoke them or any other manual agent-os skill. Planning
45
- depth is chosen internally by plan-work, and its use does not add a general summary approval gate.
46
- Planning alone never starts implementation.
47
- - Always recommend one concrete next action when planning or a delivery unit ends, with the reason
48
- it wins and any blocker. Existing authority persists across unit boundaries, but never expands to
49
- unrelated backlog work. If the goal is complete and no useful next action remains, say so instead
50
- of manufacturing work.
51
- - Scope has two independent axes: classify discoveries as required, adjacent, or unrelated to the
52
- mission, then classify the work as covered by the existing mandate or requiring a new decision or
53
- external action. Risk guides implementation and verification and can reveal a missing decision;
54
- risk-area membership does not grant permission. Required covered work normally stays in scope,
55
- while adjacent work is a follow-up and unrelated work gets no invented proposal.
56
- - No skill grants external tracker write access automatically. An explicit tracker mandate in the
57
- request or the project policy's `## Tracker mandate` section may include implementation detail and
58
- technical ordering/readiness inside the authorized set, but not acceptance changes, new owners or
59
- deliveries, or closure. Without that mandate, keep corrections local and report the unsynced delta.
60
- - Decisions that outlive a session live in versioned files: `intents/<id>/intent.md` for what is
61
- needed and why, and `spec.md` beside it for behavior, interface, boundaries, decisions, and
62
- ground truth. They change only through a reviewed change, and a file whose `built_on` revision
63
- is older than its source is stale until it is reconsidered.
41
+ - Orchestration is opt-in: manual agent-os skills run only when the person invokes them by the name
42
+ the host exposes (`/plan-work`, `/agent-os-core:plan-work`, or `$plan-work`). Never self-invoke one.
43
+ When a request clearly matches a manual skill the person did not name, suggest it once in one
44
+ sentence with its invocation and why it fits, then do what was asked. Planning alone never starts
45
+ implementation.
46
+ - End every agent-os workflow with a route line: the kind of work, the steps done and left, and the
47
+ exact command that resumes it, such as `/deliver-work #42`. Take the route from the project's
48
+ `.agent-os/workflow.md` when the project policy points to one, else from a default path the policy
49
+ states, else from the default routes; with agent-os-core alone, name the next installed step. Then
50
+ follow the `Next step:` line in the person's `## My working preferences`: `ask`, the default, asks
51
+ once whether to start the next step; `continue` starts the next planning step, including the
52
+ issues `shape-work` creates, and asks before delivery; `recommend` only recommends. Never skip a
53
+ step, decide an open product question, merge, or deploy on that basis.
54
+ - Recommend one concrete next action with its reason and any blocker. Authority persists across unit
55
+ boundaries but never expands to unrelated backlog work; when nothing useful remains, say so.
56
+ - Sort discoveries with `scope-guard`: required work the mandate covers stays in scope, adjacent work
57
+ is a follow-up, unrelated work gets no proposal, and risk never grants permission by itself.
58
+ - Tracker writes need a tracker mandate in the request or the project policy's `## Tracker mandate`,
59
+ except the new issues an invoked `shape-work` creates. A mandate never covers acceptance, owners,
60
+ new deliveries, or closure. Without one, keep corrections local and report the unsynced delta.
61
+ - Only an initiative, work that several pull requests deliver and whose product decisions someone
62
+ other than the requester must agree to, or work the person or project policy asks files for, gets
63
+ `intents/<id>/intent.md` and `spec.md`. Other work lives in tracker issues and pull requests. Those
64
+ files change only through review, and one whose `built_on` revision is older than its source is
65
+ stale until it is reconsidered.
64
66
 
65
67
  ## Preferences (seed defaults; project policy overrides)
66
68
 
@@ -73,16 +75,17 @@ Rules:
73
75
  ## Development workflows
74
76
 
75
77
  - Use the Git identity configured by the repository or current session. Never add AI attribution or `Co-Authored-By` trailers.
76
- - The development skills `design-work`, `shape-work`, `deliver-work`, `batch-work`, `dispatch-next`,
77
- `simplify`, and `init-agent-os` are manual too (`/agent-os-dev:deliver-work` for the Claude
78
- plugin). Existing authority may continue into the workflow a skill's exit contract names, as
79
- `plan-work` does into `design-work`. Continuing sequentially
80
- through already shaped units is allowed when the active implementation request covers that bounded
81
- set; parallel batch execution still requires explicit selection. The automatic `check-work` review
82
- workflow is also available from supported implicit review requests; its report mode is read-only
83
- and its fix mode requires explicit authority.
84
- - `plan.md` beside a spec lists delivery units and dependencies only. Delivery status is never
85
- written into it: a unit is claimed by a draft pull request whose body carries
86
- `Intent-Unit: <intent-id>/<unit-key>`, and status is read from open and merged pull requests.
78
+ - The development skills are manual too. Authority may continue into the workflow a skill's exit
79
+ contract names. A request that covers a bounded set of shaped units, or finishing an intent, covers
80
+ delivering them one at a time; parallel batch execution needs explicit selection. `check-work` may
81
+ start from an implicit review request; its report mode is read-only and its fix mode needs explicit
82
+ authority.
83
+ - Default routes: a bug with a known fix, `shape-work` for one issue and then `deliver-work`; a small
84
+ change or a bug whose fix holds a choice, `plan-work`, `shape-work`, and `deliver-work`; a feature,
85
+ the same with `plan-work` only when something is unclear; an initiative, every step and the
86
+ project's finishing tasks. Each route gives the work an issue unless the request skips it, and
87
+ routes guide only agent-os workflows: a request made without one is done as asked.
88
+ - Delivery status is never written into `plan.md`: a draft pull request claims a unit, by its
89
+ `Intent-Unit: <intent-id>/<unit-key>` line or by linking its issue, and its merge delivers it.
87
90
  - Agent OS hooks read `.agent-os/guards.json`. A hook block is a boundary, not an obstacle: change
88
91
  course or ask, and never work around it by another tool or path.
@@ -9,15 +9,16 @@ nothing.
9
9
  {
10
10
  "schema": 1,
11
11
  "protectedPaths": ["migrations/**", ".github/workflows/**"],
12
- "frozen": ["intents/*/intent.md", "intents/*/spec.md"],
12
+ "frozen": ["intents/*/intent.md", "intents/*/spec.md", "intents/*/plan.md"],
13
13
  "secretScan": true
14
14
  }
15
15
  ```
16
16
 
17
- - `protectedPaths`: globs relative to the repository root. An agent edit to a matching path is
18
- blocked with a message asking the agent to get the developer's explicit go-ahead. `*` matches within
19
- one path segment and `**` across segments.
20
- - `frozen`: globs for accepted intent and spec files. While a quality-ratchet delivery baseline is
17
+ - `protectedPaths`: globs relative to the repository root. An agent edit to a matching path asks
18
+ the developer in Claude Code. Codex has no ask decision, so there the edit is blocked with a
19
+ message asking the agent to get the developer's explicit go-ahead. `*` matches within one path
20
+ segment and `**` across segments.
21
+ - `frozen`: globs for accepted intent, spec, and plan files. While a quality-ratchet delivery baseline is
21
22
  active in the session, an edit to a matching file whose frontmatter `status` is `accepted` is
22
23
  blocked, because delivery never changes the decisions it delivers. Planning sessions, which have no
23
24
  delivery baseline, can still change them through a review.
@@ -45,12 +45,17 @@ is insufficient:
45
45
  whether external writes, publication, or other effects require a separate explicit request.
46
46
  3. **Verification:** exact useful commands and the ground truth they establish; record what must be
47
47
  inspected manually or otherwise checked when commands are insufficient.
48
- 4. **Planning:** where intents live (`intents/` in this repository by default, or a named product
49
- repository), whether units live in `plan.md` (`source: files`) or a tracker (`source: issues`),
48
+ 4. **Planning:** which tracker holds issues (the repository host's issue tracker by default), where
49
+ intents live for initiatives (`intents/` in this repository by default, or a named product
50
+ repository), whether an initiative's units live in `plan.md` (`source: files`) or the tracker
51
+ (`source: issues`),
50
52
  the branch naming convention, stable plan and decision-ticket identities, epic ownership, and
51
- dependency conventions. When a tracker is used, write a `## Tracker mandate` section that names
52
- what the agent may create, update, and comment on, and state that it never changes priority,
53
- assignee, or acceptance, and never closes items.
53
+ dependency conventions. The routes, the tracker, where information goes, and the finishing tasks
54
+ go into `.agent-os/workflow.md`, not the policy. `shape-work` may create its own new issues without
55
+ a mandate. When the agent should do more in the tracker, write a `## Tracker mandate` section in
56
+ the workflow file that names what it may create, update, and comment on, and state that it never
57
+ changes priority, assignee, or acceptance, and never closes items. An existing `## Tracker mandate`
58
+ in the policy stays valid; a return run offers to move it.
54
59
  5. **Maintenance:** where durable lessons, recurring gotchas, and policy changes are recorded.
55
60
 
56
61
  ## Evidence-gated modules
@@ -61,7 +66,8 @@ omit it entirely when inactive:
61
66
  - frontend/design/rendered QA, which records where the design system lives and a `## Design`
62
67
  section for `design-work`: `Sketch with` (`html`, a component workshop and the command that starts
63
68
  it, `image`, or anything else the project describes), `Sketches live` (a path and naming, or
64
- `not in the repository`), and `Widths`;
69
+ `not in the repository`), `Widths`, and `When` (`before delivery`, `after delivery`, `ask`, or
70
+ `never`; `ask` when the developer states no default);
65
71
  - package, release, or documentation publication;
66
72
  - CI or deployment;
67
73
  - authentication, security, billing, or external writes;
@@ -82,6 +88,9 @@ this skill's `references/` and `templates/` directories, and shows each in the d
82
88
  file is updated only where it lacks a field the policy now depends on, and on a return run only when
83
89
  an area the developer chose needs it.
84
90
 
91
+ - **`.agent-os/workflow.md`** from [workflow-template.md](workflow-template.md): the routes, the
92
+ tracker, where information goes, and the finishing tasks, with a one-line pointer to it in the
93
+ policy.
85
94
  - **`.agent-os/guards.json`** from [guards.md](guards.md): protected paths found by inspection
86
95
  (migrations, CI workflows, generated or vendored code), the default frozen intent and spec globs,
87
96
  and `secretScan: true`.
@@ -0,0 +1,80 @@
1
+ # Workflow file template
2
+
3
+ `init-agent-os` writes `.agent-os/workflow.md` from this template and adds one line to the project
4
+ policy that points to it, so every host finds it: `Work routes, tracker, and finishing tasks:
5
+ .agent-os/workflow.md.` The file holds how work moves through this repository, so the policy itself
6
+ stays short. It is project policy: a route, tracker rule, or finishing task written here counts as
7
+ the project policy including it.
8
+
9
+ Keep the headings. Fill each section from the developer's answers and repository evidence, and drop
10
+ an optional section that has nothing to say. Write it in the language the project uses for
11
+ documentation.
12
+
13
+ ```markdown
14
+ # How we work
15
+
16
+ Agent OS reads this file to choose the next step for a piece of work, to know where issues and
17
+ records go, and to run the tasks that finish a delivery. The project policy points here. Change it
18
+ through a pull request like any other policy.
19
+
20
+ ## Routes
21
+
22
+ | Work | Route |
23
+ |---|---|
24
+ | Bug with a known fix | shape-work (one issue), deliver-work |
25
+ | Small change, or a bug whose fix holds a choice | plan-work, shape-work, deliver-work |
26
+ | Feature | plan-work when anything is unclear, shape-work, deliver-work |
27
+ | Initiative | capture-intent, plan-work, shape-work, deliver-work, finishing tasks |
28
+
29
+ An initiative is work that several pull requests deliver and whose product decisions someone other
30
+ than the requester must agree to. Only initiatives get intent, spec, and plan files.
31
+
32
+ ## Tracker
33
+
34
+ - Tracker: <GitHub Issues in this repository, or the tracker and project to use>
35
+ - New issues: <labels, issue type, or project board to set, or "nothing extra">
36
+ - An initiative's units live in: <plan.md | the tracker>
37
+
38
+ ## Tracker mandate
39
+
40
+ <Optional. What the agent may do in the tracker beyond creating the issues shape-work shapes, such
41
+ as commenting on or updating issues in the authorized set. It never changes priority, assignee, or
42
+ acceptance, and never closes items.>
43
+
44
+ ## Where information goes
45
+
46
+ - Intents and specs: <intents/ in this repository, or another repository>
47
+ - Decisions of smaller work: the tracker issues and their pull requests
48
+ - <Any other place the team keeps records, such as a decision log or a wiki space>
49
+
50
+ ## Finishing tasks
51
+
52
+ ### Initiative
53
+
54
+ <Tasks that run after the last unit of an initiative, before its pull request is marked ready.
55
+ One line each, saying what to write and where, for example:>
56
+
57
+ - Add the change to `CHANGELOG.md` under the next release.
58
+ - Write a summary of what changed and why on the wiki page <name or link>.
59
+
60
+ ### <Another route, optional>
61
+
62
+ <Tasks for another kind of work, when the team wants them.>
63
+ ```
64
+
65
+ ## Rules for the routes
66
+
67
+ - Each route lists steps in order. A step marked "when anything is unclear" or similar runs only
68
+ when that condition holds; every other step runs.
69
+ - A route that starts at `shape-work` means the work gets an issue before delivery, for
70
+ traceability. `deliver-work` follows it unless the request says to skip the issue.
71
+ - The developer may change the rows, add rows for kinds of work the team knows, or remove a row. A
72
+ kind of work with no row falls back to the default route in the global policy.
73
+
74
+ ## Rules for finishing tasks
75
+
76
+ - A task inside the repository, such as a changelog entry, is part of the final pull request.
77
+ - A task in an external system, such as a wiki or a documentation site, runs when the session has a
78
+ tool that can write there. Otherwise the agent writes the finished text and reports it as a
79
+ handoff with its destination, and the delivery report lists it as not done.
80
+ - Finishing tasks never merge, deploy, or close anything unless the task says so explicitly.
@@ -84,9 +84,10 @@ that file is absent:
84
84
 
85
85
  - **SessionStart** names the intent behind the current branch, its spec revision, and any spec or
86
86
  plan whose `built_on` revision is stale.
87
- - **PreToolUse** blocks edits to paths under `protectedPaths`, edits to accepted intents and specs
88
- under `frozen` while a delivery baseline is active, and edits to a test locked by `lock-test`. With
89
- `secretScan` on, it also blocks a `git commit` whose staged diff contains a likely secret.
87
+ - **PreToolUse** asks before an edit to a path under `protectedPaths` (Codex has no ask decision
88
+ and blocks it), and blocks edits to accepted intents, specs, and plans under `frozen` while a
89
+ delivery baseline is active and edits to a test locked by `lock-test`. With `secretScan` on, it
90
+ also blocks a `git commit` whose staged diff contains a likely secret.
90
91
 
91
92
  The delivery Stop gate is this skill's own Stop hook. Declare the ground truth as a `required`
92
93
  check in `.agent-os/quality.json`: `check` then runs it after the developer has trusted the