@sockulags/agent-os 0.14.0 → 0.16.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 (101) hide show
  1. package/README.md +102 -49
  2. package/cli/doctor.mjs +307 -0
  3. package/cli/index.mjs +328 -151
  4. package/cli/index.test.mjs +406 -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 +65 -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 +13 -6
  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 +133 -0
  14. package/plugins/agent-os-core/skills/plan-work/references/elicitation.md +32 -0
  15. package/plugins/agent-os-core/skills/plan-work/references/map.md +108 -0
  16. package/plugins/agent-os-core/skills/plan-work/references/spec-template.md +64 -0
  17. package/plugins/agent-os-core/skills/record-lesson/SKILL.md +47 -0
  18. package/plugins/agent-os-core/skills/scope-guard/SKILL.md +53 -0
  19. package/{skills → plugins/agent-os-core/skills}/verify-before-done/SKILL.md +6 -2
  20. package/plugins/agent-os-dev/.claude-plugin/plugin.json +18 -0
  21. package/plugins/agent-os-dev/.codex-plugin/plugin.json +24 -0
  22. package/plugins/agent-os-dev/hooks/hooks.json +42 -0
  23. package/{skills → plugins/agent-os-dev/skills}/batch-work/SKILL.md +9 -4
  24. package/{skills → plugins/agent-os-dev/skills}/batch-work/references/manifest.md +8 -0
  25. package/{skills → plugins/agent-os-dev/skills}/check-work/SKILL.md +31 -14
  26. package/{skills/deliver-work/workflow.md → plugins/agent-os-dev/skills/deliver-work/SKILL.md} +85 -17
  27. package/plugins/agent-os-dev/skills/design-work/SKILL.md +145 -0
  28. package/plugins/agent-os-dev/skills/design-work/scripts/render-sketch.mjs +233 -0
  29. package/plugins/agent-os-dev/skills/design-work/scripts/render-sketch.test.mjs +73 -0
  30. package/plugins/agent-os-dev/skills/diagnose-before-fix/SKILL.md +29 -0
  31. package/{skills → plugins/agent-os-dev/skills}/dispatch-next/SKILL.md +10 -4
  32. package/plugins/agent-os-dev/skills/init-agent-os/SKILL.md +121 -0
  33. package/plugins/agent-os-dev/skills/init-agent-os/policy.md +88 -0
  34. package/plugins/agent-os-dev/skills/init-agent-os/references/guards.md +39 -0
  35. package/{skills → plugins/agent-os-dev/skills}/init-agent-os/references/repository-init.md +41 -9
  36. package/plugins/agent-os-dev/skills/init-agent-os/references/review-template.md +35 -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 +103 -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 +172 -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 +124 -0
  54. package/plugins/agent-os-dev/skills/shape-work/references/implementation-issues.md +143 -0
  55. package/{skills/chart-work → plugins/agent-os-dev/skills/shape-work}/references/prototypes.md +11 -13
  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 +53 -20
  60. package/hooks/hooks.json +0 -17
  61. package/skills/chart-work/SKILL.md +0 -42
  62. package/skills/chart-work/references/elicitation.md +0 -25
  63. package/skills/chart-work/references/map.md +0 -84
  64. package/skills/deliver-work/SKILL.md +0 -12
  65. package/skills/diagnose-before-fix/SKILL.md +0 -24
  66. package/skills/explain-work/SKILL.md +0 -27
  67. package/skills/guide-me/SKILL.md +0 -36
  68. package/skills/init-agent-os/SKILL.md +0 -54
  69. package/skills/init-agent-os/scripts/policy-block.ps1 +0 -87
  70. package/skills/notice-lesson/SKILL.md +0 -20
  71. package/skills/quality-ratchet/SKILL.md +0 -72
  72. package/skills/record-lesson/SKILL.md +0 -31
  73. package/skills/scope-guard/SKILL.md +0 -32
  74. package/skills/shape-work/SKILL.md +0 -48
  75. package/skills/shape-work/references/implementation-issues.md +0 -69
  76. package/skills/shape-work/references/mockups.md +0 -23
  77. package/skills/simplifier/SKILL.md +0 -35
  78. package/skills/simplifier/agents/openai.yaml +0 -2
  79. package/skills/simplifier-audit/SKILL.md +0 -30
  80. package/skills/simplifier-review/SKILL.md +0 -40
  81. package/skills/understand-work/SKILL.md +0 -31
  82. package/skills/understand-work/agents/openai.yaml +0 -2
  83. package/skills/writing-skills/SKILL.md +0 -68
  84. package/skills/writing-skills/agents/openai.yaml +0 -2
  85. /package/{skills/batch-work → plugins/agent-os-core/skills/capture-intent}/agents/openai.yaml +0 -0
  86. /package/{skills/chart-work → plugins/agent-os-core/skills/explain-work}/agents/openai.yaml +0 -0
  87. /package/{skills/deliver-work → plugins/agent-os-core/skills/list-skills}/agents/openai.yaml +0 -0
  88. /package/{skills → plugins/agent-os-core/skills}/plain-voice/references/tells.md +0 -0
  89. /package/{skills/dispatch-next → plugins/agent-os-core/skills/plan-work}/agents/openai.yaml +0 -0
  90. /package/{skills/explain-work → plugins/agent-os-dev/skills/batch-work}/agents/openai.yaml +0 -0
  91. /package/{skills → plugins/agent-os-dev/skills}/batch-work/scripts/manifest-hash.mjs +0 -0
  92. /package/{skills → plugins/agent-os-dev/skills}/batch-work/scripts/test-manifest-hash.mjs +0 -0
  93. /package/{skills → plugins/agent-os-dev/skills}/check-work/references/findings.md +0 -0
  94. /package/{skills/guide-me → plugins/agent-os-dev/skills/deliver-work}/agents/openai.yaml +0 -0
  95. /package/{skills/init-agent-os → plugins/agent-os-dev/skills/design-work}/agents/openai.yaml +0 -0
  96. /package/{skills/list-skills → plugins/agent-os-dev/skills/dispatch-next}/agents/openai.yaml +0 -0
  97. /package/{skills/record-lesson → plugins/agent-os-dev/skills/init-agent-os}/agents/openai.yaml +0 -0
  98. /package/{skills → plugins/agent-os-dev/skills}/proportional-testing/references/strategy.md +0 -0
  99. /package/{skills → plugins/agent-os-dev/skills}/quality-ratchet/references/structure.md +0 -0
  100. /package/{skills → plugins/agent-os-dev/skills}/shape-work/agents/openai.yaml +0 -0
  101. /package/{skills/simplifier-audit → plugins/agent-os-dev/skills/simplify}/agents/openai.yaml +0 -0
@@ -1,87 +0,0 @@
1
- # Manages the AGENT OS block in global instruction files.
2
- # Source of truth: policy.md at the plugin root (two levels up from this script).
3
- #
4
- # Semantics (locked in the agent-os plan, M3):
5
- # - No block in target -> append exactly one block, preserve everything else.
6
- # - Empty target file -> treated as "no block"; the block becomes the whole file.
7
- # - Exactly one well-formed -> replace only the content between the markers.
8
- # - Duplicated, crossed, or half-open markers -> abort without mutation, exit 2.
9
- # - -Check -> read-only; exit 0 in sync, exit 1 on drift/missing, never writes.
10
- # - Text outside the block is never touched or normalized.
11
-
12
- [CmdletBinding()]
13
- param(
14
- [switch]$Check,
15
- [string[]]$Targets = @(
16
- (Join-Path (Join-Path $HOME '.claude') 'CLAUDE.md'),
17
- (Join-Path (Join-Path $HOME '.codex') 'AGENTS.md')
18
- )
19
- )
20
-
21
- $ErrorActionPreference = 'Stop'
22
- $BeginMarker = '<!-- BEGIN AGENT OS -->'
23
- $EndMarker = '<!-- END AGENT OS -->'
24
-
25
- $policyPath = Join-Path $PSScriptRoot '..\..\..\policy.md' | Resolve-Path
26
- $policy = (Get-Content -Raw -Path $policyPath).TrimEnd()
27
- $block = "$BeginMarker`n$policy`n$EndMarker"
28
-
29
- $exit = 0
30
-
31
- foreach ($target in $Targets) {
32
- $label = $target
33
- if (-not (Test-Path $target)) {
34
- if ($Check) {
35
- Write-Output "DRIFT $label : file missing"
36
- $exit = 1
37
- } else {
38
- $dir = Split-Path $target
39
- if (-not (Test-Path $dir)) { New-Item -ItemType Directory -Force -Path $dir | Out-Null }
40
- Set-Content -NoNewline -Path $target -Value ($block + "`n")
41
- Write-Output "ADDED $label : created file with managed block"
42
- }
43
- continue
44
- }
45
-
46
- # An empty file returns $null from -Raw, which would throw in Matches below.
47
- $content = Get-Content -Raw -Path $target
48
- if ($null -eq $content) { $content = '' }
49
- $beginCount = ([regex]::Matches($content, [regex]::Escape($BeginMarker))).Count
50
- $endCount = ([regex]::Matches($content, [regex]::Escape($EndMarker))).Count
51
-
52
- if ($beginCount -eq 0 -and $endCount -eq 0) {
53
- if ($Check) {
54
- Write-Output "DRIFT $label : managed block missing"
55
- $exit = 1
56
- } else {
57
- $sep = if ($content.Length -eq 0) { '' } elseif ($content.EndsWith("`n")) { "`n" } else { "`n`n" }
58
- Set-Content -NoNewline -Path $target -Value ($content + $sep + $block + "`n")
59
- Write-Output "ADDED $label : appended managed block"
60
- }
61
- continue
62
- }
63
-
64
- $wellFormed = ($beginCount -eq 1 -and $endCount -eq 1 -and
65
- $content.IndexOf($BeginMarker) -lt $content.IndexOf($EndMarker))
66
- if (-not $wellFormed) {
67
- Write-Output "ERROR $label : malformed markers (begin=$beginCount end=$endCount) - no mutation"
68
- exit 2
69
- }
70
-
71
- $start = $content.IndexOf($BeginMarker)
72
- $end = $content.IndexOf($EndMarker) + $EndMarker.Length
73
- $current = $content.Substring($start, $end - $start)
74
-
75
- if ($current -eq $block) {
76
- Write-Output "OK $label : in sync"
77
- } elseif ($Check) {
78
- Write-Output "DRIFT $label : block differs from policy.md"
79
- $exit = 1
80
- } else {
81
- $updated = $content.Substring(0, $start) + $block + $content.Substring($end)
82
- Set-Content -NoNewline -Path $target -Value $updated
83
- Write-Output "UPDATED $label : block replaced from policy.md"
84
- }
85
- }
86
-
87
- exit $exit
@@ -1,20 +0,0 @@
1
- ---
2
- name: notice-lesson
3
- description: Treats a developer interruption, correction, or challenge as a misunderstanding signal worth examining. It activates when the developer stops the agent, contradicts its direction, or questions its output mid-task. It skips ordinary clarifying questions, requested iteration rounds, and disagreements the developer resolves in the same breath.
4
- ---
5
-
6
- # Notice lesson
7
-
8
- An interruption is information: the agent's model of the task and the developer's intent just
9
- diverged.
10
-
11
- When it happens, name the divergence in one sentence — what was assumed, what was actually wanted —
12
- and correct course first. Then judge whether the divergence is durable: would the next session, or
13
- an agent in a repository that has never seen this conversation, make the same mistake?
14
-
15
- - A one-off — missing context, an ambiguous word, a changed mind — needs no record; continue.
16
- - A durable lesson — a convention, a preference, a gotcha that will recur — deserves recording.
17
- Offer `record-lesson` with the candidate lesson already phrased.
18
-
19
- Noticing never argues with the correction and never edits policy itself; recording is the
20
- developer's call through `record-lesson`.
@@ -1,72 +0,0 @@
1
- ---
2
- name: quality-ratchet
3
- description: Keeps implementation quality from regressing by comparing a candidate with its exact entry state and separating bounded touched-surface improvement from cleanup. It activates during implementation and delivery review, not for repository-wide debt hunts or line-count optimization.
4
- ---
5
-
6
- # Quality ratchet
7
-
8
- Keep the smallest set of concepts and machinery needed for the current change. The ratchet is an
9
- evidence layer, not a score or replacement for semantic review. Explicit project rules may gate delivery.
10
-
11
- Before choosing the implementation, find the nearest existing behavior, contract, and tests. Reuse
12
- or extend their owner before adding a parallel implementation. For TypeScript, React, or Java
13
- changes, read [references/structure.md](references/structure.md) for contract ownership and cohesive
14
- boundaries. Make this a code decision, not a mandatory planning artifact.
15
-
16
- Resolve `scripts/quality-delta.mjs` relative to this loaded `SKILL.md`; do not assume the current
17
- worktree contains an Agent OS checkout. Before the first mutation in a Git worktree, run that
18
- installed runner with `begin` when it is available. It records the exact tracked and nonignored
19
- untracked entry state without stashing or changing user files. After implementation and before
20
- `simplifier-review`, run the same runner with `check` and pass its evidence to that review. Use its
21
- `clear` command only when abandoning the attempt. The normal correctness, security, scope,
22
- independent-review, and verification steps still decide delivery.
23
-
24
- Use three zones:
25
-
26
- 1. A bounded, behavior-preserving improvement on the implementation surface already being
27
- touched is allowed when it makes the requested change clearer or safer.
28
- 2. Report at most one concrete adjacent structural opportunity when it materially constrains the
29
- requested change, but leave it out of the patch unless the boundary expands.
30
- 3. Ignore unrelated debt. `scope-guard` owns drift; do not turn a ratchet signal into a cleanup
31
- project.
32
-
33
- Extract a named responsibility when it makes the touched code easier to understand or protects an
34
- invariant, even with one caller. This is allowed local improvement, not automatic scope expansion.
35
- Do not force inheritance, shared utils, or extra layers merely to reduce file size.
36
-
37
- The check reports added, changed, and deleted source files, touched-source NLOC before/after, the
38
- before/after status of source paths that were already present at entry, package dependency deltas,
39
- and optional analyzer capability. Raw file, function, or line counts are signals only. There is no
40
- aggregate score and no threshold gate. Missing Lizard or jscpd is reported as unavailable rather
41
- than clean; the core Node evidence remains usable. Their parsing integration is an explicit
42
- follow-up, not an install-time prerequisite.
43
-
44
- Use existing project checks for enforceable rules and report structural signals as advisory.
45
- When configuring external checks, read [references/project-controls.md](references/project-controls.md).
46
- The runner executes project commands from `.agent-os/quality.json`; required failures block delivery.
47
- Do not rerun unchanged failing checks in a loop. Fix the failure or report the blocker.
48
- Policy changes require an explicit acknowledgement with the already-authorized reason; do not ask
49
- for approval again when the task authorizes the change or clear the baseline to hide it. A
50
- fresh `check` proves evidence freshness, not code quality, passing tests, or completed review. The
51
- runner currently inspects dependencies only in the root `package.json`; do not infer Java or
52
- workspace-package coverage from it. Run relevant configured analyzers outside the model, pass short
53
- actionable deltas to review, and reuse results only while their inputs, configuration, and tool
54
- versions remain unchanged. Do not install analyzers or invent thresholds for an ordinary task.
55
-
56
- The Stop hook blocks an active lifecycle violation (a corrupt baseline or missing/stale check),
57
- unacknowledged control-policy changes, or failed explicit project requirements. It checks recorded
58
- results and their inputs without rerunning project commands. State is bound to the current Git worktree and host session: Claude uses
59
- `CLAUDE_CODE_SESSION_ID`, Codex uses `CODEX_THREAD_ID`, and standalone/manual use has a deterministic
60
- fallback. `begin`, `check`, and `clear` use those command environments, preferring Codex when both
61
- IDs exist. Stop uses payload
62
- `session_id`, treating a non-empty `turn_id` as Codex and otherwise as Claude; without `session_id`,
63
- it retains the command environment for direct/manual use. A worktree without an active baseline for
64
- the current session is a cheap no-op. A re-entered Stop hook remains blocked until that same session
65
- records a fresh passing `check`; the `stop_hook_active` payload does not bypass the lifecycle requirement. A fresh passing Stop clears only the
66
- current session state. Run `clear` deliberately from the same host session when abandoning an
67
- implementation attempt; uninstall is not currently a command.
68
-
69
- Exit with the smallest complete implementation, the quality evidence, semantic review findings,
70
- and fresh verification. Do not remove a legitimate abstraction merely because it increases a raw
71
- count: multiple providers, runtime selection, compatibility, or a real trust boundary can justify
72
- the machinery and belongs to semantic judgment.
@@ -1,31 +0,0 @@
1
- ---
2
- name: record-lesson
3
- description: Records one durable lesson where it applies — the repo's project policy or the global agent-os policy. User-invoked when a session produced a lesson worth keeping, often after notice-lesson offers it. Not for session-specific details or facts the repository already records.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Record lesson
8
-
9
- Capture the lesson while its evidence is fresh, at the narrowest level where it holds.
10
-
11
- ## Choose the level
12
-
13
- - **Repo:** conventions, gotchas, verify commands, and delivery defaults that hold only in this
14
- repository go to the project policy section that `init-agent-os` seeds.
15
- - **Global:** lessons about how the developer works that would hold in a repository that has never
16
- seen them go to `policy.md` in the agent-os repository — the source of truth behind the managed
17
- blocks. After that edit, remind the developer to run `init-agent-os global` to reinstall the
18
- blocks. Never edit an installed managed block directly; if the agent-os repository is not
19
- reachable, stop with the exact lesson text as a handoff.
20
-
21
- Default to repo level.
22
-
23
- ## Write the lesson
24
-
25
- State the smallest rule the next agent can act on, with the observed failure or insight that
26
- motivates it. Search the target for an existing line with the same meaning: update it rather than
27
- duplicating, and delete a line the lesson proves wrong. Show the resulting diff.
28
-
29
- A machine-checkable lesson belongs in a test, script, or validator per the
30
- [writing-skills enforcement ladder](../writing-skills/SKILL.md); route it there and record at most
31
- a pointer in policy prose.
@@ -1,32 +0,0 @@
1
- ---
2
- name: scope-guard
3
- description: Detects and contains task drift while implementation or review is already in progress. It activates when unrelated work, opportunistic cleanup, extra dependencies, or broadened requirements appear beyond the agreed request or spec, before adding them to the diff. It skips initial scoping and planning, root-cause diagnosis, and verification of work already inside scope.
4
- ---
5
-
6
- # Guard scope
7
-
8
- Keep the active change aligned with the developer's requested outcome.
9
-
10
- The direct request, accepted spec, and project policy define the boundary. When new work appears,
11
- classify it:
12
-
13
- - **Required:** the requested outcome cannot work or be verified without it. Include it and explain
14
- the dependency.
15
- - **Adjacent:** useful cleanup or hardening that is not needed now. Leave it out and mention it only
16
- when it is actionable.
17
- - **Conflicting:** it changes product behavior, architecture, dependencies, a public interface, or
18
- delivery risk. Ask the developer before crossing that boundary.
19
-
20
- Behavior-preserving extraction within the touched surface is allowed when it clarifies responsibility
21
- or reuses an existing contract. Do not classify every new helper as an architecture change.
22
-
23
- The implementer may reject unsupported review requests with evidence. For actionable adjacent work,
24
- search for an existing issue before proposing another. If the request or project policy authorizes
25
- follow-up issue creation, and no explicit read-only instruction forbids it, create or update it
26
- with the concrete problem, impact, and acceptance
27
- condition. Otherwise collect worthwhile follow-ups into one question with a recommended disposition
28
- and draft content. Do not create tickets for rejected preferences or delay authorized delivery while
29
- waiting on an optional backlog decision. Report any unresolved delivery blocker separately.
30
-
31
- Before delivery, inspect the diff for unrelated edits. Preserve pre-existing developer work; scope
32
- control never grants permission to revert it.
@@ -1,48 +0,0 @@
1
- ---
2
- name: shape-work
3
- description: Shapes a bounded idea into implementation-ready issues backed by settled product decisions. User-invoked while material product choices remain. Not for small fixes or work whose outcome is already clear.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # shape-work
8
-
9
- Produce the smallest set of implementation-ready issues that lets delivery proceed without inventing
10
- product intent.
11
-
12
- Read [references/implementation-issues.md](references/implementation-issues.md) before shaping.
13
-
14
- ## Loop
15
-
16
- Read the repository, project policy, and any linked chart-work decisions before asking questions.
17
- Resolve facts from those sources. For each remaining material choice, recommend an answer, explain
18
- the consequence, and ask only what the developer must decide.
19
-
20
- Use a diagram or mockup when it makes behavior, layout, states, or boundaries materially easier to
21
- judge. Frontend proposals follow [references/mockups.md](references/mockups.md). Do not create a
22
- visualization merely to satisfy the workflow.
23
-
24
- When a solution-changing assumption needs observation, apply the
25
- [experiment decision](../chart-work/references/prototypes.md), including small technical experiments
26
- and comparable UI alternatives. Do not turn a question with sufficient evidence into a prototype.
27
-
28
- Deliver the coherent product shape: outcome, boundaries, acceptance examples, affected seams,
29
- ground truth, settled decisions, and open risks. Then create or reuse its implementation issues on
30
- the configured planning surface. With no configured tracker, use the local-file fallback in the
31
- reference. Link dependencies and expose the first claimable delivery frontier.
32
-
33
- One shape may produce one or several sequential or parallel issues. Multiple issues do not imply
34
- `batch-work`: each ready issue can be delivered with `deliver-work`, while `batch-work` remains an
35
- explicit developer choice for integrated parallel execution. Do not start either workflow unless
36
- the request includes implementation.
37
-
38
- When shaping started from a chart-work handoff, reconcile the issue links and readiness back into
39
- the origin handoff and map. A handoff alone is not delivery-ready. Shape-work is complete only when
40
- every selected branch points to implementation-ready issues or is explicitly parked or rejected.
41
-
42
- Recommend one concrete next action with its reason and blocker, weighing uncertainty and downstream
43
- work unlocked as well as project priority. A ready frontier alone is not enough guidance. Continue
44
- into authorized sequential delivery only when the request includes that bounded implementation;
45
- otherwise finish with the recommendation.
46
-
47
- The invocation authorizes planning artifacts, not product code. A deferred product choice remains
48
- explicit; a reversible implementation choice does not need to become a question.
@@ -1,69 +0,0 @@
1
- # Implementation issues
2
-
3
- The configured planning surface owns implementation issues. Research, grilling, and prototypes are
4
- decision evidence; the durable output of shaping is the issue set that a developer can choose to
5
- run with `deliver-work` or `batch-work`.
6
-
7
- With no project convention, use:
8
-
9
- ```text
10
- planning/<shape-slug>/implementation/<unit-key>.md
11
- ```
12
-
13
- When the shape originates from `guide-me`, place the approved plain-language summary as a `## TLDR`
14
- at the top of the shape's origin document, so the shape opens with what it solves before any
15
- technical detail.
16
-
17
- ## Completion invariant
18
-
19
- A selected product branch is not `delivery-ready`, and shape-work is not complete, until one or
20
- more implementation issues have been created or reused. A parked or rejected branch needs no issue.
21
-
22
- Each issue represents one coherent delivery unit: one observable outcome with a reviewable change
23
- boundary and ground truth that can verify it. The unit may depend on earlier units, but it must not
24
- contain an unresolved product decision or several separately closable delivery targets.
25
-
26
- ## Issue contract
27
-
28
- Identity is `(origin, unit key)`. Search the configured planning surface before creating anything so
29
- retrying the same shape updates existing issues instead of duplicating them.
30
-
31
- ```text
32
- ## Implementation issue
33
- Origin: <shape-work handoff, planning artifact, or request link>
34
- Unit key: <stable key>
35
- Status: ready | blocked
36
-
37
- ## Outcome
38
- ## Boundaries
39
- ## Acceptance
40
- ## Ground truth
41
- ## Dependencies
42
- ## Evidence and settled decisions
43
- ## Delivery target
44
- ## Open risks
45
- ```
46
-
47
- Use dependencies to distinguish order from execution strategy. An issue is `ready` when its product
48
- decisions are settled and its dependencies are satisfied; otherwise record the exact blocker. The
49
- delivery frontier is the set of ready, unblocked implementation issues. Use the planning surface's
50
- existing status and label conventions rather than inventing a parallel queue vocabulary.
51
-
52
- ## Routing belongs to the developer
53
-
54
- Expose the frontier without choosing an execution workflow:
55
-
56
- - `deliver-work` can deliver any one ready issue, including issues from a larger sequential graph;
57
- - `batch-work` consumes an existing dependency-mapped issue set only when the developer explicitly
58
- requests integrated parallel execution;
59
- - the existence of several issues never invokes or recommends batch-work by itself.
60
-
61
- Issue creation is a planning write, not implementation authority. Do not edit product code, start a
62
- batch, merge, deploy, or perform external delivery effects under a planning-only shape-work invocation.
63
-
64
- ## Chart-work reconciliation
65
-
66
- When the origin is a chart-work handoff, update the handoff and map idempotently after materializing
67
- the issues. Link every implementation issue, record the ready or blocked frontier, and move the
68
- branch from shaping to `delivery-ready` only when the completion invariant holds. Preserve
69
- concurrent map entries and keep decision tickets canonical for their evidence.
@@ -1,23 +0,0 @@
1
- # Frontend mockups
2
-
3
- Use a mockup only when seeing the behavior will improve a decision.
4
-
5
- ## Grounding
6
-
7
- Inspect the project's tokens, components, and nearby views. Reuse established patterns. When the
8
- system lacks a needed pattern, label the proposal as new instead of presenting it as existing.
9
-
10
- ## Fidelity scaling
11
-
12
- - **Sketch or wireframe:** enough to compare structure, states, or flow.
13
- - **Renderable proposal:** useful when visual hierarchy or interaction behavior cannot be judged
14
- from a sketch.
15
-
16
- Build only the fidelity needed for the open decision.
17
-
18
- ## Evidence
19
-
20
- Show the states and viewport sizes relevant to the decision, including keyboard or failure behavior
21
- when those are in scope. Keep the artifact inspectable and capture the developer's decision and the
22
- reason behind it. Implementation authority comes from the later implementation request, not from a
23
- separate mockup approval state.
@@ -1,35 +0,0 @@
1
- ---
2
- name: simplifier
3
- description: Simplifies an existing implementation or diff by removing unnecessary code, abstractions, dependencies, and solution layers while preserving required behavior. Use manually when the developer asks to simplify, reduce code, remove over-engineering, or find a more direct solution. Not for code golf, speculative rewrites, initial feature design, or changing product behavior.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Simplifier
8
-
9
- Make the solution smaller in concepts and code without making it harder to understand.
10
-
11
- Read the request, affected code, project conventions, current diff, and relevant checks. Establish
12
- the required behavior before editing. Then simplify in this order:
13
-
14
- 1. Delete code, options, branches, configuration, and files that serve no current requirement.
15
- 2. Reuse an existing project helper or pattern instead of maintaining a duplicate.
16
- 3. Prefer the standard library, native platform behavior, or an already-installed dependency over
17
- custom machinery.
18
- 4. Collapse wrappers, layers, and abstractions that add indirection without a current responsibility
19
- or requirement. Preserve cohesive boundaries even with one caller.
20
- 5. Express the remaining behavior directly and readably.
21
-
22
- Reduce lines when deletion reflects a simpler solution. Do not compress readable code into dense
23
- expressions merely to lower the line count. A clear loop can be simpler than a clever one-liner.
24
-
25
- Preserve required behavior, public contracts, validation at trust boundaries, security,
26
- accessibility, error handling that prevents data loss, and justified performance characteristics.
27
- Keep tests that protect behavior; remove only tests for behavior that no longer exists or tests
28
- that duplicate the same signal without value.
29
-
30
- Stay inside the requested surface. Do not turn a focused simplification into an architectural
31
- rewrite or introduce a new dependency to save a few lines.
32
-
33
- After editing, inspect the final diff and run the smallest relevant checks. Report what was removed
34
- or made more direct, the verification result, and any complexity that remains because it serves a
35
- real requirement. If the implementation is already simple, leave it unchanged and say so.
@@ -1,2 +0,0 @@
1
- policy:
2
- allow_implicit_invocation: false
@@ -1,30 +0,0 @@
1
- ---
2
- name: simplifier-audit
3
- description: Audits an entire repository for unnecessary code, abstractions, dependencies, and solution layers while leaving files unchanged. Use manually when the developer asks for a simplification audit, over-engineering audit, deletion candidates, or a repo-wide search for simpler solutions. Not for applying fixes, code golf, or a general correctness, security, or performance audit.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Audit for simplification
8
-
9
- Find the repository's strongest opportunities to own less code and fewer solution layers without
10
- changing required behavior.
11
-
12
- Inspect the project structure, dependencies, conventions, representative flows, and usages of each
13
- candidate before reporting it. Look for:
14
-
15
- - dead or speculative behavior that no current requirement or caller uses;
16
- - duplicate helpers and parallel implementations;
17
- - custom code replaced by the standard library, native platform behavior, or an installed
18
- dependency;
19
- - wrappers, factories, layers, configuration, and abstractions without a current responsibility or requirement;
20
- - dependencies used for behavior the project or platform already provides.
21
-
22
- Prefer a short ranked list of high-confidence findings over a large speculative inventory. For each
23
- finding, name the location, evidence that the complexity is unnecessary, the simpler replacement,
24
- and any behavior or migration constraint that must be preserved. Do not estimate saved lines unless
25
- the deletion is directly countable.
26
-
27
- Preserve cohesive responsibilities and protected invariants even with one caller.
28
-
29
- Do not apply fixes. Do not treat required validation, security, accessibility, data-loss protection,
30
- justified performance, or useful tests as bloat. If the repository is already simple, say so.
@@ -1,40 +0,0 @@
1
- ---
2
- name: simplifier-review
3
- description: Reviews the current implementation diff for unnecessary code, abstractions, dependencies, and solution layers without changing files. It activates during code review, including deliver-work review, when the candidate should be checked for a simpler solution. It skips whole-repository audits, initial design, code golf, and correctness or security review outside complexity caused by the diff.
4
- ---
5
-
6
- # Review for simplification
7
-
8
- Find concrete ways to make the current diff smaller in concepts and code while preserving its
9
- required behavior.
10
-
11
- Read the request, diff, affected code, project conventions, and relevant checks. Look for:
12
-
13
- - code, branches, configuration, options, files, or dependencies with no current requirement;
14
- - duplicated behavior already provided by the project;
15
- - custom machinery covered by the standard library, native platform behavior, or an installed
16
- dependency;
17
- - wrappers, layers, factories, and abstractions without a current responsibility or requirement;
18
- - indirect or dense code that has a more direct, readable form.
19
-
20
- Do not recommend code golf. Do not remove required behavior, public contracts, trust-boundary
21
- validation, security, accessibility, data-loss protection, justified performance, or tests that
22
- protect real behavior.
23
-
24
- Preserve a cohesive named responsibility even with one caller. Apply
25
- [finding calibration](../check-work/references/findings.md): require a concrete benefit from a
26
- replacement, and do not turn a reasonable alternative into a required correction.
27
-
28
- When [`quality-ratchet`](../quality-ratchet/SKILL.md) evidence is available, consume it before
29
- forming findings. Read the diff and implementation yourself: added/changed/deleted files, NLOC,
30
- legacy-before/after, dependency deltas, and unavailable optional analyzers are evidence, not an
31
- oracle or threshold. Preserve machinery justified by real provider, runtime-selection,
32
- compatibility, or trust-boundary requirements. Report at most one materially constraining adjacent
33
- opportunity and leave unrelated debt to `scope-guard`.
34
-
35
- Report only supported, actionable findings. For each, name the location, unnecessary complexity,
36
- and simpler replacement. Rank material deletions and dependency removals first. Do not invent a
37
- line-savings total. If there is nothing worth changing, report `No simplification findings.`
38
-
39
- This review is read-only and complements correctness, security, and scope review; it never replaces
40
- them.
@@ -1,31 +0,0 @@
1
- ---
2
- name: understand-work
3
- description: Questions out what the developer actually needs behind a stated wish, one load-bearing question at a time. User-invoked directly or as the questioning stage of guide-me. Not for requests whose goal is already articulated or for facts the repository answers.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Understand work
8
-
9
- Find the need behind the stated wish. The deliverable is a settled understanding — what the
10
- developer wants, why now, and what was ruled out — not a plan or a solution.
11
-
12
- ## Questioning loop
13
-
14
- Resolve everything the repository, project policy, and conversation already answer before asking
15
- anything. Then, for each open point that materially changes the goal:
16
-
17
- - Present the concrete tension with materially different alternatives.
18
- - Recommend one and name its consequence.
19
- - Ask one load-bearing question at a time and wait for the answer.
20
- - Record the choice, the reason, and every ruled-out direction with its reason.
21
-
22
- Dig beneath the stated wish: what becomes possible when this exists, who feels the difference, and
23
- why it matters now. Do not treat silence, momentum, or approval of a larger bundle as an answer to
24
- a specific question. Do not propose a technical solution while the goal is still moving.
25
-
26
- ## Exit
27
-
28
- Questioning ends when the developer says it is done or when further answers stop changing the goal.
29
- Deliver the settled understanding: the goal, its motivation, the choices made with their reasons,
30
- the ruled-out directions, and the questions that remain open. Under guide-me this feeds the
31
- plain-language gate in explain-work; standalone, report it directly.
@@ -1,2 +0,0 @@
1
- policy:
2
- allow_implicit_invocation: false
@@ -1,68 +0,0 @@
1
- ---
2
- name: writing-skills
3
- description: Doctrine for writing and validating agent-os skills, loaded before creating or editing any SKILL.md, description, or eval case in this framework. Not for ordinary coding tasks that do not touch skill files.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Writing skills
8
-
9
- Write a skill as a compact program for an agent, not a transcript of how one successful run happened.
10
-
11
- ## Contract
12
-
13
- Make these elements discoverable without forcing headings when prose is clearer:
14
-
15
- - **Objective:** the observable result.
16
- - **Inputs:** the minimum context and tools to inspect.
17
- - **Working surface:** what the agent may create or change when the request authorizes it.
18
- - **Boundaries:** product decisions, destructive actions, or external effects the request does not cover.
19
- - **Ground truth:** the checks or observations that decide success.
20
- - **Loop:** inspect, act, evaluate, and adapt.
21
- - **Exit:** the delivered artifact, evidence, or precise blocker.
22
-
23
- The description says what the skill does, when it applies, and when it does not. Keep execution detail
24
- in the body.
25
-
26
- ## Freedom and control
27
-
28
- - Lock objectives, boundaries, ground truth, and stop conditions. Let the agent choose local tactics.
29
- - The developer's request is the authority boundary. Do not add a second approval ceremony for work
30
- the request already asks the agent to perform.
31
- - Ask the developer only when an unresolved product choice would materially change the outcome.
32
- - Use prose for judgment, examples for preferred shapes, and scripts for exact transformations.
33
- - Add ordering only where changing the order causes a demonstrated failure.
34
- - Keep references one hop away and load them only when the task needs them.
35
-
36
- ## Enforcement ladder
37
-
38
- Choose the lowest layer that can reliably stop the failure:
39
-
40
- 1. **Deterministic invariant → test or lint.** Machine-checkable repository facts belong in an
41
- executable validator with a red case.
42
- 2. **Fragile operation → script, hook, or CI.** Put parsing, identity, idempotency, and exact writes
43
- behind one deterministic operation.
44
- 3. **Semantic judgment → skill plus eval.** Use prose for reasoning that depends on meaning, then
45
- test it with trigger cases and blind forward tests.
46
- 4. **Context or preference → policy.** Record project-specific defaults where the agent reads them
47
- at decision time.
48
- 5. **Product intent → developer decision.** Ask only for the unresolved choice, with a recommendation.
49
-
50
- Start from observed failure evidence and recurrence risk. Do not promote a preference into
51
- infrastructure or leave a deterministic invariant as a reminder.
52
-
53
- ## Anti-patterns (delete on sight)
54
-
55
- - **No-ops**: lines the agent already does by default.
56
- - **Tactic locks**: prescribing the method when several methods can satisfy the contract.
57
- - **Duplication**: one source of truth per meaning; link, do not restate.
58
- - **Sediment**: stale layers from old iterations; prune when editing.
59
- - **Audit theater**: receipts, states, or logs that do not protect recovery, correctness, or trust.
60
- - **Authority theater**: asking again for permission already granted by the direct request.
61
-
62
- ## Definition of done — a skill is not finished until
63
-
64
- 1. Structural validation passes: folder name equals `name`, frontmatter has `name` + `description`, and manual skills (including manual workflows and this meta-skill) have `disable-model-invocation: true` and `agents/openai.yaml` with `policy.allow_implicit_invocation: false`. Automatic skills carry neither gate.
65
- 2. At least two positive and two negative trigger cases describe the intended boundary.
66
- 3. Risky or complex behavior has a blind forward test against the observable contract, not the
67
- preferred reasoning trace.
68
- 4. Retired skills move to root `deprecated/`, never get deleted, and re-enter `skills/` only through this definition of done again.
@@ -1,2 +0,0 @@
1
- policy:
2
- allow_implicit_invocation: false