@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
@@ -194,7 +194,7 @@ function checkInterface(folder, file, root, warn) {
194
194
  if (/\bDeferred to\b/.test(bullet)) {
195
195
  if (!/\bDeferred to\s+\S.*?\s+by\s+\S/.test(bullet)) warn(`interface surface "${label}" is deferred without an owner and a date`)
196
196
  } else if (/\bOpen:/.test(bullet)) warn(`interface surface "${label}" is still open`)
197
- else if (!/\bDecided:/.test(bullet)) warn(`interface surface "${label}" has no Decided:, Deferred to, or Open:`)
197
+ else if (!/\b(?:Decided|Left to delivery):/.test(bullet)) warn(`interface surface "${label}" has no Decided:, Left to delivery:, Deferred to, or Open:`)
198
198
  }
199
199
  const inside = (candidate) => !path.relative(root, candidate).startsWith('..')
200
200
  for (const reference of sketchFiles(section)) {
@@ -84,6 +84,11 @@ test('a spec with decided surfaces and reachable sketches has no interface warni
84
84
  assert.deepEqual(interfaceWarnings(face, { 'intents/2026-11-csv-export/sketches/list.html': 'x' }), [])
85
85
  })
86
86
 
87
+ test('a surface left to delivery needs no sketch and no warning', () => {
88
+ const face = '## Interface\n\n- Admin, settings. Left to delivery: the layout, inside the existing settings page.\n\n## Boundaries\n'
89
+ assert.deepEqual(interfaceWarnings(face), [])
90
+ })
91
+
87
92
  test('a missing or empty interface section is a warning, and None is enough', () => {
88
93
  assert.deepEqual(interfaceWarnings(''), ['needs a "## Interface" section; write None when nothing a person sees or does changes'])
89
94
  assert.deepEqual(interfaceWarnings('## Interface\n\n## Boundaries\n'), ['"## Interface" is empty; list each surface or write None'])
@@ -95,7 +100,7 @@ test('a surface without a decision or an owner is a warning', () => {
95
100
  assert.deepEqual(warnings, [
96
101
  'interface surface "Admin, settings. Open: where it goes." is still open',
97
102
  'interface surface "Admin, list. Deferred to Mira: order." is deferred without an owner and a date',
98
- 'interface surface "Admin, page. Looks nice." has no Decided:, Deferred to, or Open:'
103
+ 'interface surface "Admin, page. Looks nice." has no Decided:, Left to delivery:, Deferred to, or Open:'
99
104
  ])
100
105
  })
101
106
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: shape-work
3
- description: Shapes a bounded mission or accepted spec into coherent delivery units with dependencies, written as plan.md beside the spec or as implementation-ready tracker issues, backed by settled product decisions. User-invoked when delivery structure or an epic contract still needs shaping. Not for small fixes or work whose outcome and delivery unit are already clear.
3
+ description: Shapes a request, bounded mission, or accepted spec into coherent delivery units with dependencies, written as implementation-ready tracker issues, or as plan.md beside an initiative's spec, backed by settled product decisions. User-invoked when delivery structure or an epic contract still needs shaping. Not for work whose delivery unit is already shaped; a known fix that needs an issue gets one without an interview.
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
@@ -11,7 +11,11 @@ product intent. A delivery unit is the smallest independently useful or assessab
11
11
  its own meaningful boundary; technical layers are not delivery units by themselves.
12
12
 
13
13
  Read [references/implementation-issues.md](references/implementation-issues.md) before shaping. It
14
- defines `plan.md`, the unit line format, and the tracker alternative.
14
+ defines where units live, the issue format, and `plan.md` for an initiative.
15
+
16
+ Work without an intent is shaped into tracker issues only: the issue is the whole record, and no
17
+ intent, spec, or plan file is written. Only an initiative, work that already has an intent, gets a
18
+ `plan.md` beside its spec.
15
19
 
16
20
  ## Unit contract
17
21
 
@@ -21,7 +25,7 @@ spec stays the authority. A unit writes out what it is accountable for and cites
21
25
  when the two disagree the spec wins. `built_on` already marks restated text stale when the spec
22
26
  changes.
23
27
 
24
- Every unit carries these fields, in its `plan.md` section or its tracker issue. Write `none` only
28
+ Every unit carries these fields, in its tracker issue or its `plan.md` section. Write `none` only
25
29
  where that is the true answer:
26
30
 
27
31
  - **Outcome:** the observable change once this unit is delivered, for a person or a caller, in a
@@ -42,7 +46,7 @@ where that is the true answer:
42
46
  - **Open risks:** at most three risks that could change this unit's approach, each with what to do.
43
47
  Routine engineering concerns are not risks.
44
48
 
45
- Match depth to the unit: a one-line change gets one-line fields, and a typical unit fits in about
49
+ Match depth to the unit: a known fix becomes one issue without questions, a one-line change gets one-line fields, and a typical unit fits in about
46
50
  4,000 characters. A longer unit is too broad or is retelling the spec or the architecture: cut it,
47
51
  or split it for one of the concrete reasons below. Do not write code or implementation steps;
48
52
  choices the implementer can reverse stay with the implementer.
@@ -61,11 +65,15 @@ decide. A pre-existing specification is a valid starting point; a plan-work run
61
65
  A spec whose `built_on` revision is older than its intent is stale. Do not shape from it: return it
62
66
  to `plan-work` for reconsideration and report which revision changed.
63
67
 
64
- Shape-work does not settle the interface; the spec's `## Interface` section does. Link it from the
65
- units that build those screens instead of restating it. When that section lists a decision as
68
+ Without a spec, a screen whose layout or flow is still open is a material product question: ask
69
+ it while shaping, recommend `design-work` in one line when sketching would help, and write the
70
+ answer into the unit. With a spec, the spec decides. Shape-work does not settle the interface; the
71
+ spec's `## Interface` section does. Link it from the units that build those screens instead of restating it. When that section lists a decision as
66
72
  open, is missing while the work changes what a person sees or does, or a unit would change a screen
67
- the section does not cover, return that interface question to `design-work` and keep the affected
68
- units blocked until it is settled. Units the open question does not touch can still be shaped. Use
73
+ the section does not cover, return that interface question to `plan-work`, where the developer
74
+ decides it, sketches it with `design-work`, or leaves it to delivery, and keep the affected units
75
+ blocked until it is settled. A surface left to delivery blocks nothing: name in its unit what
76
+ delivery may decide. Units the open question does not touch can still be shaped. Use
69
77
  a diagram when it makes dependencies or boundaries materially easier to judge.
70
78
 
71
79
  When a solution-changing technical assumption needs observation, apply the
@@ -74,10 +82,10 @@ into a prototype.
74
82
 
75
83
  Deliver the coherent product shape: outcome, boundaries, acceptance examples, affected seams,
76
84
  ground truth, settled decisions, and open risks. Then write the delivery units to the unit
77
- contract: `intents/<id>/plan.md` by default, or
78
- create or reuse its implementation issues on the tracker when the project policy makes the tracker the source
79
- of truth for units. Link real dependencies and report the first claimable delivery frontier to the
80
- developer; it is derived from the plan and is not written into it.
85
+ contract. For work without an intent, create or reuse its implementation issues on the tracker. For
86
+ an initiative, write `intents/<id>/plan.md`, with its units as tracker issues when the project policy
87
+ makes the tracker the source of truth. Link real dependencies and report the first claimable delivery frontier to the
88
+ developer; it is derived from the issues or the plan and is not written into them.
81
89
 
82
90
  Start from one coherent delivery unit. Split only for a concrete reason such as an independently
83
91
  usable or assessable result, different ownership, a separate migration, a delivery boundary, or a
@@ -108,15 +116,18 @@ A plan built on an older spec revision is stale. Reshape it from the current spe
108
116
  `rev`, and keep unit keys stable so delivered work and open pull requests still point at the right
109
117
  unit.
110
118
 
111
- Planning-surface writes do not grant product implementation or external tracker authority. Commit
112
- `plan.md` and open its review only when the request or the project's delivery defaults include
113
- that. Creating tracker issues needs the project policy's `## Tracker mandate`; keep it within the
114
- requested set and do not silently change acceptance, ownership, delivery scope, or closure. A ready
119
+ Planning-surface writes do not grant product implementation. Commit `plan.md` and open its review
120
+ only when the request or the project's delivery defaults include that. The invocation authorizes
121
+ creating the new issues this shape needs, and updating the ones it created for the same origin on a
122
+ retry. Any other tracker write needs the project policy's `## Tracker mandate`; keep it within the
123
+ requested set and do not silently change acceptance, ownership, delivery scope, or closure. When no
124
+ tracker can be written, return the issue texts in the reply and write no file. A ready
115
125
  unit is not an authorization. Without that mandate, keep corrections local and report the pending
116
126
  tracker delta.
117
127
 
118
128
  Recommend one concrete next action with its reason and blocker, weighing uncertainty and downstream
119
- work unlocked as well as project priority. A ready frontier alone is not enough guidance. Continue
129
+ work unlocked as well as project priority, and end with the route line naming the issues created and
130
+ the `deliver-work` command that takes the first one. A ready frontier alone is not enough guidance. Continue
120
131
  into authorized sequential delivery only when the request includes that bounded implementation;
121
132
  otherwise finish with the recommendation.
122
133
 
@@ -6,18 +6,30 @@ can choose to run with `deliver-work` or `batch-work`.
6
6
 
7
7
  ## Where units live
8
8
 
9
- - **`source: files` (default).** `intents/<id>/plan.md` beside the spec lists every unit and holds
10
- each unit's contract.
11
- - **`source: issues`.** When the project policy makes a tracker the source of truth for units,
12
- `plan.md` lists the units by tracker key and the tracker issues hold each unit's contract. The
13
- plan then contains links, never copies.
14
-
15
- With no intent folder, write a minimal `intent.md` with the settled outcome first, following
16
- `capture-intent`'s template, so the plan has a place and a revision to build on.
9
+ Choose from the size of the work. Never create an intent, spec, or plan file only to give units a
10
+ place to live.
11
+
12
+ - **Issues only (the default).** Work without an intent: a feature, change, or fix that one or a few
13
+ pull requests deliver. Each unit is an issue in the project's tracker, and the issue is the whole
14
+ record. No `intent.md`, `spec.md`, or `plan.md` is written. Origin is the request or the issue the
15
+ work came from, dependencies are the tracker's issue links or a `Depends on` line, and an epic
16
+ contract goes in a parent issue.
17
+ - **Intent plan.** Work that already has an intent, which is an initiative. `intents/<id>/plan.md`
18
+ beside the spec lists every unit. With `source: files` it holds each unit's contract; with
19
+ `source: issues`, set when the project policy makes a tracker the source of truth for units, it
20
+ lists the tracker keys and the issues hold the contracts. The plan contains links, never copies.
21
+
22
+ The tracker is the one `.agent-os/workflow.md` or the project policy names, with the labels or board
23
+ the workflow file asks for, otherwise the repository host's issue tracker when
24
+ the session can write to it, such as GitHub Issues. Invoking `shape-work` authorizes creating new
25
+ issues there, and updating the issues it created for the same origin when shaping is retried. Any
26
+ other tracker write, such as editing, commenting on, relabeling, or closing other issues, still
27
+ needs the project policy's `## Tracker mandate`. When no tracker can be written, return each
28
+ issue's text in the reply for the person to create, and write no file.
17
29
 
18
30
  When a plan-work run supplied a plain-language summary for an actual decision, it is the spec's
19
- `## Summary`. Do not turn summary approval into a second gate or copy the plan into a competing
20
- specification.
31
+ `## Summary`, or on the issues-only path the opening of the first issue. Do not turn summary
32
+ approval into a second gate or copy the plan into a competing specification.
21
33
 
22
34
  ## Completion invariant
23
35
 
@@ -79,14 +91,22 @@ Rules:
79
91
  and it is delivered when that pull request merges.
80
92
  - `built_on` names the spec revision. A plan built on an older spec revision is stale.
81
93
 
82
- With `source: issues`, each tracker issue carries the same fields as headings:
94
+ ## Issues
95
+
96
+ A tracker issue carries the same fields as headings, on both paths. On the issues-only path it also
97
+ opens with the need in one or two sentences, because no intent holds it, and it is claimed by a
98
+ draft pull request that links it with the tracker's closing reference, such as `Closes #12` on
99
+ GitHub. It is delivered when that pull request merges. Its origin is not a stable file, so before
100
+ creating issues on this path, search the tracker's open issues for ones that already cover the same
101
+ outcome and reuse them instead of creating duplicates.
83
102
 
84
103
  ```text
85
104
  ## Implementation issue
86
- Origin: <intent id and plan link>
105
+ Origin: <intent id and plan link, or the request or issue the work came from>
87
106
  Unit key: <stable key>
88
107
  Status: ready | blocked
89
108
 
109
+ ## Why (issues-only path)
90
110
  ## Outcome
91
111
  ## Boundaries
92
112
  ## Change surface
@@ -106,8 +126,8 @@ vocabulary.
106
126
 
107
127
  ## Epic contract
108
128
 
109
- When one shared end result needs an owner, add an epic contract to the plan instead of splitting
110
- every technical layer into a child:
129
+ When one shared end result needs an owner, add an epic contract to the plan, or to a parent issue
130
+ on the issues-only path, instead of splitting every technical layer into a child:
111
131
 
112
132
  ```text
113
133
  ## Epic contract
package/policy.md CHANGED
@@ -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.