@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.
Files changed (29) hide show
  1. package/README.md +33 -41
  2. package/cli/doctor.mjs +45 -1
  3. package/cli/index.test.mjs +30 -0
  4. package/package.json +1 -1
  5. package/plugins/agent-os-core/.claude-plugin/plugin.json +1 -1
  6. package/plugins/agent-os-core/.codex-plugin/plugin.json +1 -1
  7. package/plugins/agent-os-core/skills/capture-intent/SKILL.md +9 -6
  8. package/plugins/agent-os-core/skills/list-skills/SKILL.md +5 -3
  9. package/plugins/agent-os-core/skills/plan-work/SKILL.md +36 -18
  10. package/plugins/agent-os-core/skills/plan-work/references/spec-template.md +2 -1
  11. package/plugins/agent-os-dev/.claude-plugin/plugin.json +1 -1
  12. package/plugins/agent-os-dev/.codex-plugin/plugin.json +1 -1
  13. package/plugins/agent-os-dev/skills/batch-work/SKILL.md +1 -0
  14. package/plugins/agent-os-dev/skills/check-work/SKILL.md +2 -0
  15. package/plugins/agent-os-dev/skills/deliver-work/SKILL.md +67 -33
  16. package/plugins/agent-os-dev/skills/deliver-work/references/work-records.md +20 -0
  17. package/plugins/agent-os-dev/skills/design-work/SKILL.md +22 -7
  18. package/plugins/agent-os-dev/skills/dispatch-next/SKILL.md +6 -3
  19. package/plugins/agent-os-dev/skills/init-agent-os/SKILL.md +22 -12
  20. package/plugins/agent-os-dev/skills/init-agent-os/policy.md +37 -34
  21. package/plugins/agent-os-dev/skills/init-agent-os/references/guards.md +6 -5
  22. package/plugins/agent-os-dev/skills/init-agent-os/references/repository-init.md +15 -6
  23. package/plugins/agent-os-dev/skills/init-agent-os/references/workflow-template.md +80 -0
  24. package/plugins/agent-os-dev/skills/quality-ratchet/SKILL.md +4 -3
  25. package/plugins/agent-os-dev/skills/quality-ratchet/scripts/intent-files.mjs +1 -1
  26. package/plugins/agent-os-dev/skills/quality-ratchet/scripts/intent-files.test.mjs +6 -1
  27. package/plugins/agent-os-dev/skills/shape-work/SKILL.md +28 -17
  28. package/plugins/agent-os-dev/skills/shape-work/references/implementation-issues.md +34 -14
  29. package/policy.md +37 -34
@@ -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
@@ -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