@sockulags/agent-os 0.15.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 (99) hide show
  1. package/README.md +105 -59
  2. package/cli/doctor.mjs +351 -0
  3. package/cli/index.mjs +328 -151
  4. package/cli/index.test.mjs +436 -9
  5. package/package.json +5 -6
  6. package/plugins/agent-os-core/.claude-plugin/plugin.json +18 -0
  7. package/plugins/agent-os-core/.codex-plugin/plugin.json +24 -0
  8. package/plugins/agent-os-core/skills/capture-intent/SKILL.md +68 -0
  9. package/plugins/agent-os-core/skills/capture-intent/references/intent-template.md +47 -0
  10. package/plugins/agent-os-core/skills/explain-work/SKILL.md +42 -0
  11. package/{skills → plugins/agent-os-core/skills}/list-skills/SKILL.md +16 -7
  12. package/{skills → plugins/agent-os-core/skills}/plain-voice/SKILL.md +7 -4
  13. package/plugins/agent-os-core/skills/plan-work/SKILL.md +151 -0
  14. package/{skills → plugins/agent-os-core/skills}/plan-work/references/elicitation.md +7 -3
  15. package/plugins/agent-os-core/skills/plan-work/references/spec-template.md +65 -0
  16. package/plugins/agent-os-core/skills/record-lesson/SKILL.md +47 -0
  17. package/{skills → plugins/agent-os-core/skills}/scope-guard/SKILL.md +11 -6
  18. package/{skills → plugins/agent-os-core/skills}/verify-before-done/SKILL.md +6 -2
  19. package/plugins/agent-os-dev/.claude-plugin/plugin.json +18 -0
  20. package/plugins/agent-os-dev/.codex-plugin/plugin.json +24 -0
  21. package/plugins/agent-os-dev/hooks/hooks.json +42 -0
  22. package/{skills → plugins/agent-os-dev/skills}/batch-work/SKILL.md +6 -2
  23. package/{skills → plugins/agent-os-dev/skills}/check-work/SKILL.md +33 -14
  24. package/{skills/deliver-work/workflow.md → plugins/agent-os-dev/skills/deliver-work/SKILL.md} +126 -57
  25. package/plugins/agent-os-dev/skills/deliver-work/references/work-records.md +20 -0
  26. package/plugins/agent-os-dev/skills/design-work/SKILL.md +160 -0
  27. package/plugins/agent-os-dev/skills/design-work/scripts/render-sketch.mjs +233 -0
  28. package/plugins/agent-os-dev/skills/design-work/scripts/render-sketch.test.mjs +73 -0
  29. package/plugins/agent-os-dev/skills/diagnose-before-fix/SKILL.md +29 -0
  30. package/{skills → plugins/agent-os-dev/skills}/dispatch-next/SKILL.md +11 -3
  31. package/plugins/agent-os-dev/skills/init-agent-os/SKILL.md +131 -0
  32. package/plugins/agent-os-dev/skills/init-agent-os/policy.md +91 -0
  33. package/plugins/agent-os-dev/skills/init-agent-os/references/guards.md +40 -0
  34. package/plugins/agent-os-dev/skills/init-agent-os/references/repository-init.md +115 -0
  35. package/plugins/agent-os-dev/skills/init-agent-os/references/review-template.md +35 -0
  36. package/plugins/agent-os-dev/skills/init-agent-os/references/workflow-template.md +80 -0
  37. package/plugins/agent-os-dev/skills/init-agent-os/scripts/policy-block.mjs +187 -0
  38. package/plugins/agent-os-dev/skills/init-agent-os/templates/agent-review.yml +59 -0
  39. package/plugins/agent-os-dev/skills/init-agent-os/templates/lint-intents.yml +30 -0
  40. package/{skills → plugins/agent-os-dev/skills}/proportional-testing/SKILL.md +1 -1
  41. package/plugins/agent-os-dev/skills/quality-ratchet/SKILL.md +104 -0
  42. package/{skills → plugins/agent-os-dev/skills}/quality-ratchet/references/project-controls.md +31 -3
  43. package/plugins/agent-os-dev/skills/quality-ratchet/scripts/analyzers.mjs +145 -0
  44. package/plugins/agent-os-dev/skills/quality-ratchet/scripts/analyzers.test.mjs +158 -0
  45. package/plugins/agent-os-dev/skills/quality-ratchet/scripts/guards.mjs +372 -0
  46. package/plugins/agent-os-dev/skills/quality-ratchet/scripts/guards.test.mjs +138 -0
  47. package/plugins/agent-os-dev/skills/quality-ratchet/scripts/intent-files.mjs +322 -0
  48. package/plugins/agent-os-dev/skills/quality-ratchet/scripts/intent-files.test.mjs +177 -0
  49. package/{skills → plugins/agent-os-dev/skills}/quality-ratchet/scripts/project-controls.mjs +59 -8
  50. package/{skills → plugins/agent-os-dev/skills}/quality-ratchet/scripts/project-controls.test.mjs +134 -8
  51. package/{skills → plugins/agent-os-dev/skills}/quality-ratchet/scripts/quality-delta.mjs +296 -22
  52. package/{skills → plugins/agent-os-dev/skills}/quality-ratchet/scripts/quality-delta.test.mjs +114 -6
  53. package/plugins/agent-os-dev/skills/shape-work/SKILL.md +135 -0
  54. package/plugins/agent-os-dev/skills/shape-work/references/implementation-issues.md +163 -0
  55. package/{skills/plan-work → plugins/agent-os-dev/skills/shape-work}/references/prototypes.md +9 -10
  56. package/plugins/agent-os-dev/skills/simplify/SKILL.md +91 -0
  57. package/plugins/agent-os-dev/skills/simplify/scripts/audit-evidence.mjs +166 -0
  58. package/plugins/agent-os-dev/skills/simplify/scripts/audit-evidence.test.mjs +49 -0
  59. package/policy.md +57 -30
  60. package/hooks/hooks.json +0 -17
  61. package/skills/deliver-work/SKILL.md +0 -12
  62. package/skills/diagnose-before-fix/SKILL.md +0 -24
  63. package/skills/explain-work/SKILL.md +0 -28
  64. package/skills/init-agent-os/SKILL.md +0 -55
  65. package/skills/init-agent-os/references/repository-init.md +0 -75
  66. package/skills/init-agent-os/scripts/policy-block.ps1 +0 -87
  67. package/skills/notice-lesson/SKILL.md +0 -20
  68. package/skills/plan-work/SKILL.md +0 -100
  69. package/skills/quality-ratchet/SKILL.md +0 -72
  70. package/skills/record-lesson/SKILL.md +0 -31
  71. package/skills/shape-work/SKILL.md +0 -71
  72. package/skills/shape-work/references/implementation-issues.md +0 -90
  73. package/skills/shape-work/references/mockups.md +0 -23
  74. package/skills/simplifier/SKILL.md +0 -35
  75. package/skills/simplifier-audit/SKILL.md +0 -30
  76. package/skills/simplifier-review/SKILL.md +0 -40
  77. package/skills/understand-work/SKILL.md +0 -32
  78. package/skills/understand-work/agents/openai.yaml +0 -2
  79. package/skills/writing-skills/SKILL.md +0 -68
  80. package/skills/writing-skills/agents/openai.yaml +0 -2
  81. /package/{skills/batch-work → plugins/agent-os-core/skills/capture-intent}/agents/openai.yaml +0 -0
  82. /package/{skills/deliver-work → plugins/agent-os-core/skills/explain-work}/agents/openai.yaml +0 -0
  83. /package/{skills/dispatch-next → plugins/agent-os-core/skills/list-skills}/agents/openai.yaml +0 -0
  84. /package/{skills → plugins/agent-os-core/skills}/plain-voice/references/tells.md +0 -0
  85. /package/{skills/explain-work → plugins/agent-os-core/skills/plan-work}/agents/openai.yaml +0 -0
  86. /package/{skills → plugins/agent-os-core/skills}/plan-work/references/map.md +0 -0
  87. /package/{skills/init-agent-os → plugins/agent-os-dev/skills/batch-work}/agents/openai.yaml +0 -0
  88. /package/{skills → plugins/agent-os-dev/skills}/batch-work/references/manifest.md +0 -0
  89. /package/{skills → plugins/agent-os-dev/skills}/batch-work/scripts/manifest-hash.mjs +0 -0
  90. /package/{skills → plugins/agent-os-dev/skills}/batch-work/scripts/test-manifest-hash.mjs +0 -0
  91. /package/{skills → plugins/agent-os-dev/skills}/check-work/references/findings.md +0 -0
  92. /package/{skills/list-skills → plugins/agent-os-dev/skills/deliver-work}/agents/openai.yaml +0 -0
  93. /package/{skills/plan-work → plugins/agent-os-dev/skills/design-work}/agents/openai.yaml +0 -0
  94. /package/{skills/record-lesson → plugins/agent-os-dev/skills/dispatch-next}/agents/openai.yaml +0 -0
  95. /package/{skills/shape-work → plugins/agent-os-dev/skills/init-agent-os}/agents/openai.yaml +0 -0
  96. /package/{skills → plugins/agent-os-dev/skills}/proportional-testing/references/strategy.md +0 -0
  97. /package/{skills → plugins/agent-os-dev/skills}/quality-ratchet/references/structure.md +0 -0
  98. /package/{skills/simplifier-audit → plugins/agent-os-dev/skills/shape-work}/agents/openai.yaml +0 -0
  99. /package/{skills/simplifier → plugins/agent-os-dev/skills/simplify}/agents/openai.yaml +0 -0
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: capture-intent
3
+ description: Captures what is needed and why, questioning out the need behind a stated wish one load-bearing question at a time, and writes a versioned intent file when the work is an initiative. User-invoked when a new need, feature request, or tracker item needs its goal settled, or as the questioning stage of plan-work. Not for requests whose goal is already articulated, small fixes, or facts the repository answers.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Capture intent
8
+
9
+ Find the need behind the stated wish and record it where the next person and agent will find it.
10
+ The deliverable is a settled intent: who needs what, why now, the desired outcome, what is out of
11
+ scope, and the questions that remain open. It is not a plan or a solution.
12
+
13
+ ## Questioning loop
14
+
15
+ Resolve everything the repository, project policy, existing intents, linked tracker items, and the
16
+ conversation already answer before asking anything. Then, for each open point that materially
17
+ changes the goal:
18
+
19
+ - Present the concrete tension with materially different alternatives.
20
+ - Recommend one and name its consequence.
21
+ - Ask one load-bearing question at a time and wait for the answer.
22
+ - Record the choice, the reason, and every ruled-out direction with its reason.
23
+
24
+ Dig beneath the stated wish: what becomes possible when this exists, who feels the difference, and
25
+ why it matters now. Do not treat silence, momentum, or approval of a larger bundle as an answer to
26
+ a specific question. Do not propose a technical solution while the goal is still moving.
27
+
28
+ Questioning ends when the person says it is done or when further answers stop changing the goal.
29
+
30
+ ## Write the intent
31
+
32
+ Write a file only for an initiative: work that several pull requests will deliver and whose product
33
+ decisions someone other than the requester, such as a product owner, must agree to. Also write one
34
+ when the person or the project policy asks for it. Everything else needs no file: report the settled
35
+ understanding directly, written so it can open a tracker issue, and recommend `shape-work` when the
36
+ work should become issues. A feature that one or a few pull requests deliver is not an initiative.
37
+
38
+ 1. Choose the location. Use `intents/` at the repository root unless the project policy names
39
+ another intent location, such as a separate product repository.
40
+ 2. Choose the id `<YYYY-MM>-<slug>` from the current month and a short kebab-case name. Search the
41
+ existing intent folders first: reuse an intent that already covers this need instead of creating
42
+ a second one.
43
+ 3. Write `intents/<id>/intent.md` from [references/intent-template.md](references/intent-template.md).
44
+ A new intent has `rev: 1` and `status: accepted`, because merging its review is what accepts it.
45
+ Keep any extra frontmatter keys the project policy asks for, such as a tracker key.
46
+ 4. Write in the language the project uses for product text. Keep it short enough to read in a few
47
+ minutes; behavior details, decisions, and ground truth belong in the spec that `plan-work` writes.
48
+
49
+ The invocation authorizes writing the intent file. Commit it on a branch and open a pull request
50
+ for the owner's review only when the request or the project's delivery defaults include that;
51
+ otherwise leave the file for the person to commit. Never merge the review yourself.
52
+
53
+ ## Changing an accepted intent
54
+
55
+ An accepted intent changes only through a new review. Increase `rev` by one, add a line to its
56
+ `## Decision log` with the date, what changed, and why, and keep the earlier wording addressable in
57
+ history rather than rewriting the reason away. Every spec or plan built on the earlier revision is
58
+ now stale; name them in the report so `plan-work` can reconsider them. Replace an intent with a new
59
+ one only when the need itself changed: give the new intent `supersedes: <old-id>` and set the old one
60
+ to `status: superseded` in the same review.
61
+
62
+ ## Exit
63
+
64
+ Report the intent path and id, the choices made with their reasons, the ruled-out directions, and
65
+ the questions that remain open. Name the kind of work, which decides its route, and end with the
66
+ route line. Recommend one next action: usually `plan-work` when behavior, decisions, or ground truth
67
+ still need settling, otherwise the next step of the route. Under plan-work, this stage informs the spec and
68
+ adds no separate approval gate.
@@ -0,0 +1,47 @@
1
+ # Intent template
2
+
3
+ Copy everything below the rule into `intents/<id>/intent.md`. Replace each angle-bracket
4
+ placeholder, and delete a section only where the comment says it may go.
5
+
6
+ Frontmatter rules:
7
+
8
+ - `id` equals the folder name, `<YYYY-MM>-<slug>`.
9
+ - `status` is `accepted`, `done`, or `superseded`. A new intent is written as `accepted`: merging
10
+ its review is the acceptance. `deliver-work` sets `done` in the pull request that delivers the
11
+ last unit. Delivery progress is never written here.
12
+ - `rev` starts at 1 and increases by one each time an accepted intent changes meaning.
13
+ - `supersedes` is the id of the intent this one replaces, or `null`.
14
+ - Extra keys, such as a tracker key, are allowed when the project policy asks for them.
15
+
16
+ ---
17
+
18
+ ```markdown
19
+ ---
20
+ id: <YYYY-MM>-<slug>
21
+ status: accepted
22
+ rev: 1
23
+ supersedes: null
24
+ ---
25
+
26
+ # <The outcome in one line>
27
+
28
+ ## Who and why
29
+
30
+ <Who has the need, what they cannot do today, and why it matters now.>
31
+
32
+ ## Desired outcome
33
+
34
+ <What is true when this is done, observable by the people who asked for it.>
35
+
36
+ ## Out of scope
37
+
38
+ <What this deliberately does not do, with the reason when it is not obvious.>
39
+
40
+ ## Open questions
41
+
42
+ <Questions only the owner can answer. Delete this section when none remain.>
43
+
44
+ ## Decision log
45
+
46
+ <Empty in revision 1. Afterwards one line per revision: `rev N (YYYY-MM-DD): what changed and why`.>
47
+ ```
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: explain-work
3
+ description: Explains a task, plan, spec, diff, or an over-long explanation in short plain language with no technical vocabulary, so a developer or product owner can judge it beyond the jargon. User-invoked directly, for example to shorten the agent's own wordy answer, and used by plan-work for the summary at the top of spec.md. Not a substitute for technical review or verification.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Explain work
8
+
9
+ Say what the work solves as if the reader knows no technical terms, then let the reader judge it.
10
+
11
+ ## The summary
12
+
13
+ Cover, in everyday language: the problem it solves, who feels that problem, what changes in their
14
+ day when it works, and what it deliberately will not do. No technical vocabulary at all. If the
15
+ summary cannot stand without a technical term, the understanding is not finished; go back and
16
+ understand before explaining. Keep it short enough to read in under a minute: a TLDR, not a report.
17
+
18
+ ## Shortening an explanation
19
+
20
+ When the input is an explanation that says too much, often the agent's own previous answer, keep
21
+ only what changes the reader's next step: the outcome, the one decision they must make, and what is
22
+ not done or not verified. Drop the reasoning trail, restated context, and anything the reader did
23
+ not ask about. Keep every fact that would change a decision; shortening never hides a risk or an
24
+ unverified claim. Use the reader's language.
25
+
26
+ ## In a spec
27
+
28
+ Under `plan-work`, the summary becomes the `## Summary` section at the top of `spec.md`. It is
29
+ written for the product owner who approves the spec, follows the rules above, and changes whenever
30
+ the spec changes meaning.
31
+
32
+ ## After the summary
33
+
34
+ End with the summary. Do not ask for approval, confirmation, or feedback, and do not close with a
35
+ question: the reader replies only to challenge it. When the summary supports a decision that
36
+ another workflow owns, that workflow asks its one question; explain-work adds none.
37
+
38
+ A challenge means the understanding was wrong somewhere: name what was misunderstood and reopen the
39
+ questioning or the plan at that point rather than defending the summary.
40
+
41
+ Standalone, explain-work can run against any plan, spec, diff, pull request, or explanation; the
42
+ deliverable is the plain-language summary itself.
@@ -12,7 +12,9 @@ changes nothing.
12
12
  ## Read the installation, never a remembered list
13
13
 
14
14
  Take every skill from the sibling directories beside this one, using each `SKILL.md` frontmatter for
15
- its name and description. A reference card recited from memory goes stale the moment a skill is
15
+ its name and description. A direct install puts agent-os-core and agent-os-dev skills side by side.
16
+ A plugin install keeps them in two plugins: list the siblings, then add the agent-os-dev skills the
17
+ host shows under that plugin name, or say that agent-os-dev is not installed. A reference card recited from memory goes stale the moment a skill is
16
18
  added, removed, or partially installed, and it hides exactly the drift a developer opens the card to
17
19
  find. Report a directory whose frontmatter is missing or unreadable as unavailable rather than
18
20
  omitting it.
@@ -24,16 +26,23 @@ instructions.
24
26
 
25
27
  ## Report
26
28
 
29
+ Start with the installed Agent OS version: `version` in the `.agent-os-install.json` beside the skill
30
+ directories for a direct install, or in `.claude-plugin/plugin.json` at the plugin root. If neither exists, say the version is unknown. Name `npx @sockulags/agent-os@latest doctor` as
31
+ the way to compare it with the latest release.
32
+
27
33
  Group by invocation, explicit skills first, and give each one line: how to invoke it and what it
28
34
  does, condensed from its description rather than copied whole. Show the invocation form matching how
29
- this skill was itself reached — `/agent-os:<name>` through the Claude plugin, `/<name>` for a direct
30
- Claude install, `$<name>` on Codex — and name which form is shown, since the same skill set is typed
35
+ this skill was itself reached: `/agent-os-core:<name>` or `/agent-os-dev:<name>` through the Claude
36
+ plugins, `/<name>` for a direct Claude install, `$<name>` on Codex. Name which form is shown, since the same skill set is typed
31
37
  differently per host.
32
38
 
33
- Close with the entry points for a developer who has not named a skill: coherent planning starts at
34
- `plan-work`, delivery structure with material choices at `shape-work`, and a decision-complete unit
35
- at `deliver-work`. Say plainly that automatic skills need no entry point
36
- for an implicit trigger; mention an automatic workflow's explicit modes only when useful.
39
+ Close with the entry points for a person who has not named a skill: a new need starts at
40
+ `capture-intent`, behavior and decisions at `plan-work`, screens and their sketches at
41
+ `design-work`, delivery structure at `shape-work`, a decision-complete unit at `deliver-work`, a bug with
42
+ a known fix at `shape-work` for one issue, and a diff to review only a request in the person's own
43
+ words; name the last five only when agent-os-dev is installed. Say plainly that automatic skills need no entry point
44
+ for an implicit trigger; mention an automatic workflow's explicit modes only when useful. End with
45
+ the page that matches situations to skills, https://sockulags.github.io/agent-os/guide/where-to-start.
37
46
 
38
47
  ## Boundaries
39
48
 
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: plain-voice
3
- description: Removes generated-prose tells from every agent-authored textual response, including short chat and status replies, documentation, commit and pull request text, and issue comments, so each sentence carries a fact, an instruction, or a number. It skips code, identifiers, structured data, quoted source material, and prose the developer wrote.
3
+ description: Plain wording for written artifacts such as documentation, README text, commit messages, pull request descriptions, issue comments, and release notes. Removes filler, restated requests, stacked hedges, and promotional wording so each sentence carries a fact, an instruction, or a number. Use when the user says things like write the PR description, draft the commit message, write the docs for this feature, or post a comment on the issue. Not for ordinary chat, explanations, summaries, or status replies, which the global policy covers, and not for code, identifiers, structured data, quoted source material, or text the user wrote.
4
4
  ---
5
5
 
6
6
  # Plain voice
7
7
 
8
- Apply this discipline to every textual response the agent authors, including short conversational
9
- and status replies. It is not limited to formal prose artifacts.
8
+ The global policy block carries the core plain-voice rules for every reply, including short chat and
9
+ status replies. This skill is the full checklist for written artifacts that outlive the conversation:
10
+ documentation, README text, commit messages, pull request descriptions, issue comments, and release
11
+ notes.
10
12
 
11
13
  Write so every sentence leaves the reader with a fact, an instruction, or a number. Cut the rest.
12
14
 
@@ -22,7 +24,8 @@ rewrite:
22
24
  - **Structure imposed on the content rather than drawn from it.** Ideas forced into threes, "not just
23
25
  X but Y", ranges whose ends share no scale, and bold labels that restate the line they introduce.
24
26
  - **Conversational residue.** Openers that congratulate the reader, closing offers of further help,
25
- and disclaimers about what could not be checked. State the finding, or go find it.
27
+ and vague hedges about what might not hold. State the finding, or go find it. A claim that stays
28
+ unverified after checking is a fact: name it once, in one plain sentence.
26
29
 
27
30
  Two checks settle a doubtful sentence. Ask what it tells the reader to do or know; if it cannot be
28
31
  restated as a fact, an instruction, or a number, cut it. Then ask whether it could appear unchanged
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: plan-work
3
+ description: Plans a coherent mission from outcome through coverage, decisions, feasibility, and verification with adaptive depth, and writes the result as a versioned spec beside an initiative's intent, or as a contract a tracker issue can carry. User-invoked when the developer wants a plan or a spec, or the work needs one. Not required for an already clear implementation request or a substitute for shape-work delivery structure.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Plan work
8
+
9
+ Own the coherent mission before delivery: the desired result and behavior, boundaries, affected
10
+ parts, material decisions, technical feasibility, and one verification story for the whole result.
11
+ Planning is an entry point, not a mandatory ceremony before an already clear implementation
12
+ request. Shape-work may also start from an existing specification.
13
+
14
+ ## Choose planning depth internally
15
+
16
+ Do not ask the developer to select a mode. Match the depth to scope and uncertainty separately:
17
+
18
+ - A small, clear fix needs its outcome, boundaries, and verification, and no spec file.
19
+ - Work that is not an initiative needs no spec file, whatever its size. Its settled contract
20
+ goes into the tracker issues that `shape-work` writes, or straight into delivery when one pull
21
+ request is enough.
22
+ - A large but known change needs repository inspection and a coverage check across the relevant
23
+ flows, states, errors, integrations, and the screens each role sees.
24
+ - A bounded open choice needs discoverable facts first, then only focused questions for choices
25
+ that materially change behavior.
26
+ - A broad initiative uses the decision map below when questions need independent ownership,
27
+ separate evidence work, or parallel treatment.
28
+
29
+ Use [capture-intent](../capture-intent/SKILL.md) when the outcome is still moving or cannot be
30
+ stated, or when an initiative has no intent yet. An initiative is work that several pull requests
31
+ deliver and whose product decisions someone other than the requester must agree to. Use [explain-work](../explain-work/SKILL.md)
32
+ for the plain-language summary at the top of the spec and whenever an actual decision needs one. A
33
+ summary is not a general approval gate: existing authority continues across workflow boundaries,
34
+ and planning alone never starts implementation.
35
+
36
+ ## Establish the plan
37
+
38
+ Read project policy, the request, the intent, relevant repository code, existing specs and plans,
39
+ and live worktree or tracker state before asking questions. Check the real main flows, states,
40
+ error paths, and integrations. For a rebuild or migration, identify what is preserved, replaced,
41
+ migrated, and removed. Do not invent requirements to fill a template.
42
+
43
+ Resolve repository facts yourself. Ask only a material product question, with a recommendation and
44
+ the consequence of choosing differently. Record decisions, reasons, rejected alternatives, open
45
+ risks, and evidence in the spec, or on the planning surface the project policy names instead.
46
+
47
+ The plan owns one coherent mission, not a pile of disconnected tickets. The plan is ready when delivery
48
+ can proceed without inventing material product intent. The ready result may be:
49
+
50
+ - ready for direct delivery when the mission already has a sufficient contract;
51
+ - ready for `shape-work` when delivery units, dependencies, or an epic contract still need to be
52
+ materialized; or
53
+ - one explicit remaining question or evidence gap.
54
+
55
+ Exact code, a complete file list, and every technical work step do not need to be decided. A plan
56
+ does not authorize product implementation, and an issue becoming ready does not authorize it.
57
+
58
+ ## Settle the interface
59
+
60
+ Design is part of the plan, not something delivery invents by accident. When the plan writes a
61
+ spec, list every new or changed screen or state in its `## Interface` section, per role that sees
62
+ it, or write `None` when nothing a person sees or does changes. A small, clear fix needs no spec;
63
+ its request is its interface decision. A plan whose interface changes is ready when each listed
64
+ surface is decided, left to delivery by the developer's choice, or explicitly deferred with an
65
+ owner. An undecided surface is an open question, not a detail for delivery to fill in.
66
+
67
+ Sketching is the developer's choice and never a required step. They may sketch before any spec
68
+ exists to find out what they are trying to solve, before delivery to settle a screen, after delivery
69
+ to reconsider one that was left to it, or not at all. When agent-os-dev is installed and a surface
70
+ is still open, recommend `design-work` in one line with the reason and ask once whether to sketch
71
+ now, after the screen is built, or not at all; a `When` entry in the policy's `## Design` section
72
+ answers this without asking. On "now", continue into `design-work` and return here when it is done.
73
+ Otherwise ask the developer for each open decision and record the answer they state, or record the
74
+ surface as `Left to delivery:` with what delivery may decide when they say so; never guess a
75
+ layout. Start from sketches the developer already made. A developer who explicitly hands those
76
+ decisions to you for this run is the exception: decide, record each as `Decided: (delegated)` with
77
+ its reason, and list them in the review for the developer to overturn.
78
+
79
+ ## Write the spec
80
+
81
+ Write a spec file only when the work has an intent, or when the person or the project policy asks
82
+ for one. Otherwise report the settled contract, with its behavior, interface decisions, boundaries,
83
+ and ground truth, in the form a tracker issue can carry, and recommend `shape-work` or
84
+ `deliver-work` as the next action. When the work has an intent, write `spec.md` in the same
85
+ `intents/<id>/` folder from
86
+ [references/spec-template.md](references/spec-template.md). Its `built_on` names the intent revision
87
+ it answers, such as `intent@2`. Acceptance examples originate in the spec. A delivery unit written
88
+ by `shape-work` states the ones it is accountable for and cites the spec section; the spec stays the
89
+ authority.
90
+
91
+ A new spec has `rev: 1` and `status: accepted`; merging its review is the acceptance. Commit it and
92
+ open the review only when the request or the project's delivery defaults include that. Never merge
93
+ the review yourself.
94
+
95
+ A spec whose `built_on` revision is older than its intent is stale. Reconsider it before anything
96
+ is shaped or delivered from it: confirm it still holds and update `built_on`, or change it.
97
+
98
+ ### Reconsideration
99
+
100
+ Treat reconsideration as explicit planning information, not as an erased resolution:
101
+
102
+ 1. Preserve the earlier resolution and keep it addressable: an accepted spec changes only through a
103
+ new review that increases `rev` and adds a line to its `## Decision log`.
104
+ 2. Record which decision is under review, why it is being reconsidered, and the question that
105
+ remains open.
106
+ 3. Show the active reconsideration in the map and process it with the ordinary claim and frontier
107
+ rules.
108
+ 4. When it closes, record whether the earlier decision was confirmed or replaced. Register a
109
+ replacement only after a new decision is actually made.
110
+
111
+ A changed spec makes every plan built on the earlier revision stale; name them so `shape-work` can
112
+ reconcile them. Find potentially affected work through decision links, acceptance, and boundaries.
113
+ Pause only branches with demonstrated impact; independent authorized work continues.
114
+
115
+ ## Decision-map mode
116
+
117
+ When the broad depth is justified, read [references/map.md](references/map.md) and
118
+ [references/elicitation.md](references/elicitation.md). Preserve these mechanics:
119
+
120
+ - the decision ticket is canonical; the map is a repairable, low-resolution index;
121
+ - ticket identity is stable and updates are idempotent;
122
+ - claim an open frontier ticket before independent work, and never infer parallel workers from a
123
+ map with parallel possibilities;
124
+ - connect real dependencies and expose the open, unblocked frontier;
125
+ - re-read live state before writing and use compare-and-swap or the planning surface's equivalent
126
+ to protect concurrent updates;
127
+ - hand off each bounded branch to `shape-work` through one stable, canonical handoff; shaping
128
+ reconciles issues and readiness back into the plan.
129
+
130
+ The handoff links the canonical plan and ticket evidence. It carries a bounded summary, settled
131
+ decisions, evidence, and remaining questions; it does not copy the plan into a competing
132
+ specification. Use existing tracker status plus explicit reconsideration fields rather than
133
+ inventing a global status machine.
134
+
135
+ ## Authority and tracker boundaries
136
+
137
+ No planning skill grants external write access. If the request or the project policy's
138
+ `## Tracker mandate` already authorizes tracker maintenance, that may include implementation detail
139
+ and technical ordering or readiness within the authorized set. It does not silently change
140
+ acceptance, ownership, delivery scope, or closure. Without tracker authority, keep corrections local
141
+ and report the unsynced updates. If the information must survive the session, add a
142
+ `Pending tracker updates` section to the spec only when needed; store a delta, not a copy of this
143
+ plan.
144
+
145
+ Recommend one concrete next action at exit, with the reason it wins and any blocker, and end with
146
+ the route line. When the route's next step is `shape-work` and agent-os-dev is installed, follow the
147
+ person's `Next step:` preference, which by default asks once whether to create the issues now; on
148
+ yes, or with `continue`, go on into `shape-work` with the settled contract, so the decisions reach
149
+ the tracker before the session ends. Continue into an authorized next workflow
150
+ without adding an approval ceremony; stop when the plan is ready and the request does not include
151
+ implementation.
@@ -4,7 +4,7 @@ Use the smallest evidence that can settle the active planning question.
4
4
 
5
5
  ## Developer choice
6
6
 
7
- Follow the questioning loop in [understand-work](../../understand-work/SKILL.md). Present materially
7
+ Follow the questioning loop in [capture-intent](../../capture-intent/SKILL.md). Present materially
8
8
  different options, recommend one, name the consequence, and ask one load-bearing question at a
9
9
  time. The developer supplies preference evidence; the agent does not invent it.
10
10
 
@@ -15,8 +15,12 @@ observation and state uncertainty that could change the decision.
15
15
 
16
16
  ## Prototype
17
17
 
18
- Follow [prototypes.md](prototypes.md). Keep observed behavior separate from the developer's
19
- judgment and stop when the question is settled or the bounded effort budget is exhausted.
18
+ Run the smallest bounded experiment when an unresolved assumption could change the solution and
19
+ observing it is cheaper or more decisive than further discussion. When agent-os-dev is installed,
20
+ `design-work` governs interface sketches and the experiment decision in `shape-work` governs
21
+ technical prototypes. Keep observed behavior
22
+ separate from the developer's judgment and stop when the question is settled or the bounded effort
23
+ budget is exhausted.
20
24
 
21
25
  ## Prerequisite task
22
26
 
@@ -0,0 +1,65 @@
1
+ # Spec template
2
+
3
+ Copy everything below the rule into `intents/<id>/spec.md`, beside its `intent.md`. Replace each
4
+ angle-bracket placeholder, and delete a section only where the comment says it may go.
5
+
6
+ Frontmatter rules:
7
+
8
+ - `intent` equals the intent id and folder name.
9
+ - `built_on` is `intent@<rev>`: the intent revision this spec answers. When the intent's `rev` is
10
+ higher, this spec is stale until it is reconsidered.
11
+ - `rev` starts at 1 and increases by one each time an accepted spec changes meaning.
12
+ - `status` is `accepted` or `superseded`. Merging the spec's review is the acceptance.
13
+
14
+ The `## Summary` follows `explain-work`: plain language, no technical vocabulary, readable in under
15
+ a minute by the owner who approves the spec.
16
+
17
+ ---
18
+
19
+ ```markdown
20
+ ---
21
+ intent: <YYYY-MM>-<slug>
22
+ rev: 1
23
+ built_on: intent@1
24
+ status: accepted
25
+ ---
26
+
27
+ # <The outcome in one line>
28
+
29
+ ## Summary
30
+
31
+ <Plain language for the owner: the problem, who feels it, what changes for them, what this will not do.>
32
+
33
+ ## Behavior
34
+
35
+ <Acceptance examples in given, when, then form. One example per meaningful case, including errors.>
36
+
37
+ ## Interface
38
+
39
+ <One bullet for every new or changed screen or state, per role that sees it, in one of these forms:
40
+ - <role>, <screen or state>. Decided: <the decision and its reason>. Rejected: <alternatives>. Sketch: <location, when one was made>.
41
+ - <role>, <screen or state>. Left to delivery: <what delivery may decide, and any constraint it must keep>.
42
+ - <role>, <screen or state>. Deferred to <who> by <when>: <what is undecided>.
43
+ - <role>, <screen or state>. Open: <the question>.
44
+ Write `None` when nothing a person sees or does changes. Never delete.>
45
+
46
+ ## Boundaries and non-goals
47
+
48
+ <What must stay unchanged, what is explicitly not part of this, and the smallest change surface.>
49
+
50
+ ## Decisions
51
+
52
+ <Each settled choice with its reason and the rejected alternatives.>
53
+
54
+ ## Ground truth
55
+
56
+ <The commands or observations that prove the outcome, such as `npm test -- export` or a named manual check.>
57
+
58
+ ## Open risks
59
+
60
+ <Uncertainty that could change the solution, with the evidence that would settle it. Delete when none.>
61
+
62
+ ## Decision log
63
+
64
+ <Empty in revision 1. Afterwards one line per revision: `rev N (YYYY-MM-DD): what changed and why`.>
65
+ ```
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: record-lesson
3
+ description: Interruption, pushback, or correction from the user in the middle of a task, and recording the durable lesson behind it. Names what was assumed and what was wanted, changes course without arguing, and offers to record a repeated correction in the project or global policy. Use when the user says things like no, stop, that is not what I asked, wait, why are you touching that, I said leave it alone, you did it again, or remember this next time. Not for ordinary clarifying questions, a requested next iteration, a disagreement the user settles in the same message, or session-specific details.
4
+ ---
5
+
6
+ # Record lesson
7
+
8
+ An interruption is information: the agent's model of the task and the person's intent just
9
+ diverged. Correct course first, then keep the lesson only if the next session would repeat the
10
+ mistake.
11
+
12
+ ## Notice
13
+
14
+ When a correction arrives, name the divergence in one sentence (what was assumed, what was actually
15
+ wanted) and change course without arguing. Then judge whether it is durable: would the next
16
+ session, or an agent in a repository that has never seen this conversation, make the same mistake?
17
+
18
+ - A one-off, such as missing context, an ambiguous word, or a changed mind, needs no record;
19
+ continue the task.
20
+ - A durable lesson, such as a convention, a preference, or a gotcha that will recur, deserves
21
+ recording. Offer it with the candidate lesson already phrased, and continue the task while the
22
+ person decides.
23
+
24
+ Noticing never edits policy by itself. Record only after the person agrees, or when they ask to
25
+ record a lesson directly.
26
+
27
+ ## Choose the level
28
+
29
+ - **Repo:** conventions, gotchas, verify commands, and delivery defaults that hold only in this
30
+ repository go to the project policy section that `init-agent-os` seeds.
31
+ - **Global:** lessons about how the person works that would hold in a repository that has never
32
+ seen them go to `policy.md` in the agent-os repository, the source of truth behind the managed
33
+ blocks. After that edit, sync it with the `init-agent-os` policy script and
34
+ `--source <checkout>/policy.md`, or remind the person to run `init-agent-os global` after the
35
+ next release. Never edit an installed managed block directly; if the agent-os repository is not
36
+ reachable, stop with the exact lesson text as a handoff.
37
+
38
+ Default to repo level.
39
+
40
+ ## Write the lesson
41
+
42
+ State the smallest rule the next agent can act on, with the observed failure or insight that
43
+ motivates it. Search the target for an existing line with the same meaning: update it rather than
44
+ duplicating, and delete a line the lesson proves wrong. Show the resulting diff.
45
+
46
+ A machine-checkable lesson belongs in a test, script, hook, or validator rather than in prose; route
47
+ it there and record at most a pointer in policy prose.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: scope-guard
3
- description: Detects and contains task drift while implementation or review is already in progress by classifying discoveries on relation and mandate axes. It activates when required, adjacent, or unrelated work or a new decision or external action appears beyond the agreed request or spec. It skips initial scoping and planning, root-cause diagnosis, and verification of work already inside scope.
3
+ description: Scope creep in a task already in progress, such as an extra cleanup, the same bug elsewhere, a new dependency, or a public API change. Sorts each discovery into required, adjacent, or unrelated, keeps unrelated work out of the change, and asks before anything that needs a new decision. Use when the user says things like I noticed this too, should I fix that as well, is this okay to include in this PR, or handle it however makes sense. Not for scoping a feature before work starts, finding a root cause, or checking work that is already in scope.
4
4
  ---
5
5
 
6
6
  # Guard scope
@@ -9,15 +9,15 @@ Keep the active change aligned with the developer's requested outcome. The direc
9
9
  accepted spec, and project policy define the boundary. Classify every discovery on both axes before
10
10
  editing:
11
11
 
12
- - **Relation — required:** the requested outcome cannot work or be verified without it. It normally
12
+ - **Relation, required:** the requested outcome cannot work or be verified without it. It normally
13
13
  belongs in the current mission.
14
- - **Relation — adjacent:** useful improvement that is relevant but not needed now. Offer it as a
14
+ - **Relation, adjacent:** useful improvement that is relevant but not needed now. Offer it as a
15
15
  valuable follow-up only when it is actionable.
16
- - **Relation — unrelated:** no relevant connection to the requested outcome. Leave it out and do
16
+ - **Relation, unrelated:** no relevant connection to the requested outcome. Leave it out and do
17
17
  not manufacture a proposal.
18
- - **Mandate — covered:** the existing request and policy cover the work. Continue within the
18
+ - **Mandate, covered:** the existing request and policy cover the work. Continue within the
19
19
  covered boundary; do not ask for a second approval.
20
- - **Mandate — new decision or external action:** the existing authority does not cover it. Ask a
20
+ - **Mandate, new decision or external action:** the existing authority does not cover it. Ask a
21
21
  focused question only when the required work cannot proceed without that decision or action.
22
22
 
23
23
  Risk controls how covered work is implemented and verified. Risk can reveal a missing decision, but
@@ -25,6 +25,11 @@ belonging to a risk area does not automatically require new permission. Check ar
25
25
  interfaces, dependencies, and delivery risk against settled decisions and boundaries. Ask when a
26
26
  material choice has no coverage.
27
27
 
28
+ An accepted `spec.md` is part of the boundary: its behavior, boundaries, and non-goals hold during
29
+ delivery, and delivery never edits it. When agent-os-dev guard hooks are installed, an edit to an
30
+ accepted intent or spec during delivery is blocked; treat that block as this boundary, not as an
31
+ obstacle to route around.
32
+
28
33
  A required discovery with covered mandate is included. A required discovery that changes a product
29
34
  contract or explicit boundary returns to `plan-work`. Adjacent work does not delay authorized
30
35
  delivery, and unrelated work gets no invented proposal. A motivated split of required work goes
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: verify-before-done
3
- description: Requires fresh execution evidence before an agent states that implemented work is complete, fixed, passing, or ready to ship. It activates at the completion-claim boundary after changes or validation, including requests to mark work done or report test status. It skips diagnosis, planning, speculative review, and status reports that make no completion claim.
3
+ description: Done, fixed, passing, or ready to merge. Runs fresh checks and shows their output before saying work is complete. Use when the user says things like is this ready to merge, did the tests pass, confirm it works, mark it done, or close it out, and before the agent itself claims that work is finished. Not for diagnosing a failure, planning tests, or progress updates that claim nothing is finished.
4
4
  ---
5
5
 
6
6
  # Verify before done
@@ -10,7 +10,8 @@ Match each material completion claim to fresh evidence from the final candidate.
10
10
  ## Loop
11
11
 
12
12
  Identify the material outcomes the final response will claim. Choose the closest practical checks,
13
- prefer the project's documented acceptance path, and run them against the final state. Inspect what
13
+ prefer the ground truth named in the accepted spec, the required checks in `.agent-os/quality.json`,
14
+ or the project's documented acceptance path, and run them against the final state. Inspect what
14
15
  the result actually proves. Fix failures and rerun affected checks.
15
16
 
16
17
  ## Evidence strength
@@ -25,5 +26,8 @@ Use the strongest practical layer:
25
26
  Passing a weaker layer does not prove a stronger claim. Stale or second-hand results are context, not
26
27
  verification.
27
28
 
29
+ When agent-os-dev is installed, a quality-ratchet Stop block saying the check is stale or a required
30
+ check failed is this discipline enforced: rerun the check, or name the claim as unverified.
31
+
28
32
  Lead with the outcome and cite the decisive checks compactly. If a material check cannot run, name
29
33
  the unverified claim and its impact instead of calling the whole result complete.
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "agent-os-dev",
3
+ "description": "Agent OS development: shape plans, deliver against ground truth, review independently, and guard delivery with hooks. Requires agent-os-core.",
4
+ "version": "0.17.0",
5
+ "author": {
6
+ "name": "Lucas Skog"
7
+ },
8
+ "homepage": "https://sockulags.github.io/agent-os/",
9
+ "repository": "https://github.com/sockulags/agent-os",
10
+ "keywords": [
11
+ "workflow",
12
+ "delivery",
13
+ "code-review",
14
+ "testing",
15
+ "hooks",
16
+ "skills"
17
+ ]
18
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "agent-os-dev",
3
+ "description": "Agent OS development: shape plans, deliver against ground truth, review independently, and guard delivery with hooks. Requires agent-os-core.",
4
+ "version": "0.17.0",
5
+ "homepage": "https://sockulags.github.io/agent-os/",
6
+ "repository": "https://github.com/sockulags/agent-os",
7
+ "keywords": [
8
+ "workflow",
9
+ "delivery",
10
+ "code-review",
11
+ "testing",
12
+ "hooks",
13
+ "skills"
14
+ ],
15
+ "skills": "./skills/",
16
+ "interface": {
17
+ "displayName": "Agent OS Dev",
18
+ "shortDescription": "Delivery, review, and guard hooks for code",
19
+ "longDescription": "Shapes a spec into delivery units in plan.md, delivers one unit at a time against ground truth with draft pull requests, runs batches through isolated workers, reviews candidates independently in a session or in CI against REVIEW.md, reproduces bugs before fixing, keeps touched code no worse, and enforces it with hooks for spec freeze, test locks, protected paths, secret scans, and a delivery Stop gate. Requires agent-os-core.",
20
+ "developerName": "Lucas Skog",
21
+ "category": "Engineering",
22
+ "websiteURL": "https://sockulags.github.io/agent-os/"
23
+ }
24
+ }