@sockulags/agent-os 0.18.0 → 0.19.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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/plugins/agent-os-core/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-os-core/.codex-plugin/plugin.json +1 -1
- package/plugins/agent-os-core/skills/record-lesson/SKILL.md +16 -2
- package/plugins/agent-os-core/skills/scope-guard/SKILL.md +6 -0
- package/plugins/agent-os-dev/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-os-dev/.codex-plugin/plugin.json +1 -1
- package/plugins/agent-os-dev/skills/check-work/references/findings.md +4 -0
- package/plugins/agent-os-dev/skills/deliver-work/SKILL.md +6 -4
- package/plugins/agent-os-dev/skills/init-agent-os/references/review-template.md +4 -3
- package/plugins/agent-os-dev/skills/proportional-testing/SKILL.md +7 -0
- package/plugins/agent-os-dev/skills/proportional-testing/references/strategy.md +5 -0
- package/plugins/agent-os-dev/skills/quality-ratchet/SKILL.md +50 -10
- package/plugins/agent-os-dev/skills/shape-work/SKILL.md +8 -2
- package/plugins/agent-os-dev/skills/shape-work/references/implementation-issues.md +2 -0
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ truth, and `plan.md` for delivery units. See the
|
|
|
46
46
|
| `check-work` | workflow | automatic | Independently review a candidate and report or fix supported findings |
|
|
47
47
|
| `diagnose-before-fix` | discipline | automatic | Reproduce and root-cause before patching |
|
|
48
48
|
| `proportional-testing` | discipline | automatic | Minimum meaningful regression coverage |
|
|
49
|
-
| `quality-ratchet` | discipline | automatic |
|
|
49
|
+
| `quality-ratchet` | discipline | automatic | Decide the shape first, then compare entry and candidate evidence without score gates |
|
|
50
50
|
|
|
51
51
|
Manual skills carry `disable-model-invocation: true` (Claude) and `agents/openai.yaml` with
|
|
52
52
|
`policy.allow_implicit_invocation: false` (Codex). Automatic skills carry neither gate; their
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sockulags/agent-os",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "A lightweight agent operating system for Claude Code and Codex: agent-os-core for intent, planning, and evidence, and agent-os-dev for delivery, review, and guard hooks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-os-core",
|
|
3
3
|
"description": "Agent OS core: capture intent, plan decisions, explain plainly, keep scope, and prove claims. Useful for any agent work, not only code.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lucas Skog"
|
|
7
7
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-os-core",
|
|
3
3
|
"description": "Agent OS core: capture intent, plan decisions, explain plainly, keep scope, and prove claims. Useful for any agent work, not only code.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"homepage": "https://sockulags.github.io/agent-os/",
|
|
6
6
|
"repository": "https://github.com/sockulags/agent-os",
|
|
7
7
|
"keywords": [
|
|
@@ -43,5 +43,19 @@ State the smallest rule the next agent can act on, with the observed failure or
|
|
|
43
43
|
motivates it. Search the target for an existing line with the same meaning: update it rather than
|
|
44
44
|
duplicating, and delete a line the lesson proves wrong. Show the resulting diff.
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
## Choose the enforcement
|
|
47
|
+
|
|
48
|
+
Nothing fails when an agent skips a sentence, and an agent copies the nearest example before it
|
|
49
|
+
reads policy. Offer the lesson at the highest of these levels that works:
|
|
50
|
+
|
|
51
|
+
1. a change that makes the mistake impossible: one owner for the state, one supported way to do the
|
|
52
|
+
task, and the old way deleted so that nothing is left to copy;
|
|
53
|
+
2. a type, lint rule, hook, or validator whose error names what to use instead;
|
|
54
|
+
3. a test that fails when the behavior breaks;
|
|
55
|
+
4. policy prose, for judgment that nothing can check.
|
|
56
|
+
|
|
57
|
+
Levels 1 to 3 change the repository, so they need the person's agreement like any recorded lesson
|
|
58
|
+
and follow the project's delivery rules. When that change is larger than the current task, offer it
|
|
59
|
+
as a follow-up and record the prose rule until it lands. A machine-checkable lesson leaves at most a
|
|
60
|
+
pointer in policy prose. End the policy line with what enforces it, or `prose only`. When a
|
|
61
|
+
correction repeats a rule recorded as `prose only`, move it up a level instead of rewording it.
|
|
@@ -38,6 +38,12 @@ through `shape-work`.
|
|
|
38
38
|
Behavior-preserving extraction within the touched surface is allowed when it clarifies responsibility
|
|
39
39
|
or reuses an existing contract. Do not classify every new helper as an architecture change.
|
|
40
40
|
|
|
41
|
+
A unit's `Target shape` is part of the boundary: the reshape and the removals it names are required
|
|
42
|
+
work. For work without a unit, the same holds for the shape the implementation needs in the code it
|
|
43
|
+
touches and the callers that must move with it, as agent-os-dev's quality-ratchet decides it. Either
|
|
44
|
+
one needs a new decision only when it changes a public interface, adds a dependency, or reaches
|
|
45
|
+
beyond those callers.
|
|
46
|
+
|
|
41
47
|
For an actionable adjacent item, search for an existing issue first. If the request or project
|
|
42
48
|
policy authorizes follow-up issue creation, and no explicit read-only instruction forbids it, create
|
|
43
49
|
or update one concrete follow-up with its problem, impact, and acceptance condition. Otherwise
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-os-dev",
|
|
3
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.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lucas Skog"
|
|
7
7
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-os-dev",
|
|
3
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.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"homepage": "https://sockulags.github.io/agent-os/",
|
|
6
6
|
"repository": "https://github.com/sockulags/agent-os",
|
|
7
7
|
"keywords": [
|
|
@@ -7,6 +7,10 @@ responsibilities that make the requested behavior unsafe to change can justify s
|
|
|
7
7
|
line count, personal style, and an equally valid design alternative cannot. Tests are code to
|
|
8
8
|
maintain: changed behavior that nothing protects and a new test that `proportional-testing` would
|
|
9
9
|
not keep, such as one duplicating an existing case or asserting internal calls, are both findings.
|
|
10
|
+
So is structure the candidate leaves behind: an old path kept beside its replacement, a unit's
|
|
11
|
+
target shape not reached with no reason stated, and a comment in the code the candidate touches that `quality-ratchet`
|
|
12
|
+
would not keep. The required change for such a comment is to delete it and fix what it points at,
|
|
13
|
+
not to reword it.
|
|
10
14
|
|
|
11
15
|
Separate required corrections from useful nonblocking follow-ups. Omit cosmetic preferences and
|
|
12
16
|
speculative hardening. No findings is a valid result. Do not manufacture work to justify review.
|
|
@@ -103,8 +103,9 @@ through the work loop and the review gate.
|
|
|
103
103
|
|
|
104
104
|
## Work loop
|
|
105
105
|
|
|
106
|
-
1. Inspect enough of the affected system to choose a coherent change.
|
|
107
|
-
|
|
106
|
+
1. Inspect enough of the affected system to choose a coherent change. Settle the shape before
|
|
107
|
+
writing: the unit's `Target shape` when it has one, otherwise quality-ratchet's shape decision.
|
|
108
|
+
If a solution-changing uncertainty remains,
|
|
108
109
|
use the [experiment decision](../shape-work/references/prototypes.md); clear tasks need no prototype.
|
|
109
110
|
2. If available, run [`quality-ratchet`](../quality-ratchet/SKILL.md)'s `begin` before the first
|
|
110
111
|
mutation. It captures the exact worktree entry state without stashing or editing user files; an
|
|
@@ -112,8 +113,9 @@ through the work loop and the review gate.
|
|
|
112
113
|
3. Classify the review gate before editing. If review is required, confirm the current tool list
|
|
113
114
|
contains a real reviewer launch tool before mutation. Re-evaluate the gate against the completed
|
|
114
115
|
diff.
|
|
115
|
-
4. Make the smallest complete implementation
|
|
116
|
-
|
|
116
|
+
4. Make the smallest complete implementation of that shape, removing what it replaces before
|
|
117
|
+
adding to it. Beyond the shape, allow only the quality-ratchet's bounded improvement on the
|
|
118
|
+
touched surface. Use `diagnose-before-fix` when the
|
|
117
119
|
cause is unknown and `scope-guard` when discoveries threaten the boundary.
|
|
118
120
|
5. Apply [`proportional-testing`](../proportional-testing/SKILL.md) when selecting or creating tests.
|
|
119
121
|
Run fast, relevant checks while working and adapt from their results.
|
|
@@ -23,9 +23,10 @@ or public API compatibility, each with one sentence on why.>
|
|
|
23
23
|
loss risk, a broken public contract, or an edit to an accepted intent or spec.
|
|
24
24
|
- **Should fix:** a defect with limited impact; changed behavior that no existing test, type, or lint
|
|
25
25
|
rule protects; a new test that duplicates an existing one, asserts internal calls or module
|
|
26
|
-
structure instead of behavior, or copies setup a shared fixture already covers;
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
structure instead of behavior, or copies setup a shared fixture already covers; an old path left
|
|
27
|
+
beside its replacement; a comment in the touched code that explains the project's own code,
|
|
28
|
+
narrates it, or suppresses a correctness rule; or complexity the change does not need.
|
|
29
|
+
- **Minor:** naming or local readability. Report at most <three> minor findings per review.
|
|
29
30
|
|
|
30
31
|
## Out of scope for review
|
|
31
32
|
|
|
@@ -31,6 +31,13 @@ Leave a touched test file no worse than you found it. When you add a case, merge
|
|
|
31
31
|
same rule into one table-driven test, name tests by the rule they protect rather than the issue that
|
|
32
32
|
added them, and remove assertions the new case makes redundant.
|
|
33
33
|
|
|
34
|
+
Judge the existing cases in a test file you touch, and the tests of code you reshape, by two
|
|
35
|
+
imagined edits. Break the behavior: the test must fail. Change only the internals: the test must
|
|
36
|
+
still pass. Rewrite a case that fails either edit so it drives the public behavior, or delete it
|
|
37
|
+
when another case already protects that behavior or the behavior is gone. This needs no separate
|
|
38
|
+
approval; name each deleted test and its reason in the report. A large suite is no reason to delete,
|
|
39
|
+
and a test locked by `lock-test` stays as it is.
|
|
40
|
+
|
|
34
41
|
For a confirmed bug, establish one reproducing regression check when practical, prove it fails for
|
|
35
42
|
the expected reason, fix it, then run that check and relevant affected tests. Expand execution only
|
|
36
43
|
when the blast radius is uncertain, shared infrastructure changed, or project policy requires a
|
|
@@ -28,6 +28,11 @@ Before adding coverage, search for an existing behavioral test. Prefer extending
|
|
|
28
28
|
to a table-driven test, and reusing its fixtures. One strong regression test is better than several
|
|
29
29
|
tests with equivalent setup and assertions.
|
|
30
30
|
|
|
31
|
+
Existing tests are held to the same standard when you touch their file or reshape the code they
|
|
32
|
+
cover. Imagine breaking the behavior: the test must fail. Imagine changing only the internals: it
|
|
33
|
+
must still pass. Rewrite a test that fails either edit so it drives the public behavior, or delete
|
|
34
|
+
it when another test already protects that behavior or the behavior is gone.
|
|
35
|
+
|
|
31
36
|
## Choose the cheapest sufficient level
|
|
32
37
|
|
|
33
38
|
Use a focused unit or component test when it can prove the contract. Use integration or end-to-end
|
|
@@ -1,17 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quality-ratchet
|
|
3
|
-
description: Quality ratchet for code you are implementing or about to deliver, so the touched code ends up no worse than it was.
|
|
3
|
+
description: Quality ratchet for code you are implementing or about to deliver, so the touched code ends up in the shape the change needs and no worse than it was. Decides that shape before the first edit instead of repeating the existing pattern, records the entry state, compares the candidate with it, and keeps cleanup bounded to the code the change touches. Use when adding a feature or changing existing code, when reviewing your own implementation or candidate before delivery, and when the user says things like don't make it worse, keep it at least as clean as it is now, no quality regressions compared with main, tidy it up while you're there but only what you touch, check the candidate, or this has too many layers. Not for repository-wide tech-debt hunts, reviewing someone else's pull request, or cutting line counts.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Quality ratchet
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
evidence layer, not a score or replacement for semantic review.
|
|
8
|
+
Decide the shape the touched code should have, then keep the smallest set of concepts and machinery
|
|
9
|
+
that shape needs. The runner is an evidence layer, not a score or replacement for semantic review.
|
|
10
|
+
Explicit project rules may gate delivery.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
## Decide the shape first
|
|
13
|
+
|
|
14
|
+
Before the first edit, find the nearest existing behavior, contract, and tests, and decide the shape
|
|
15
|
+
the touched code should have with this change in it. An existing pattern shows what fit when it was
|
|
16
|
+
written; it is not a rule to repeat. Ask what you would build if this requirement had been there
|
|
17
|
+
from the start:
|
|
18
|
+
|
|
19
|
+
- When the existing design still fits, extend its owner instead of adding a parallel implementation.
|
|
20
|
+
- When it does not, reshape the touched code to the design that fits and move its callers in the
|
|
21
|
+
same change. Do not bolt the new case onto the old design or leave the old path beside the new one.
|
|
22
|
+
|
|
23
|
+
Remove before you add: delete what the change makes dead, such as the old path, its unused helpers
|
|
24
|
+
and options, and tests that protect only the replaced implementation, then build on what is left.
|
|
25
|
+
A unit's `Target shape` is this decision already made. Follow it. When the code shows a better shape
|
|
26
|
+
inside the same outcome and boundaries, build that one and state the difference and the reason in
|
|
27
|
+
the report. Return the unit to `shape-work` only when the shape changes its outcome or boundaries.
|
|
28
|
+
|
|
29
|
+
The decision covers the code the change touches and the callers it must move. A reshape that needs
|
|
30
|
+
more than that is the one adjacent opportunity to report, not part of the patch. For TypeScript,
|
|
31
|
+
React, or Java changes, read [references/structure.md](references/structure.md) for contract
|
|
32
|
+
ownership and cohesive boundaries. Make this a code decision, not a mandatory planning artifact.
|
|
33
|
+
|
|
34
|
+
## Comments
|
|
35
|
+
|
|
36
|
+
A comment that explains the project's own code is a defect in that code. That covers a comment that
|
|
37
|
+
says why the code is odd, what it works around, or that it must not be changed, narration of what
|
|
38
|
+
the next lines do, commented-out code, and a lint or type suppression whose rule guards correctness
|
|
39
|
+
or safety. Add none. In the code the change touches, delete every such comment and fix what it
|
|
40
|
+
points at in the same change: reshape or rename until the behavior is obvious, fix the suppressed
|
|
41
|
+
error, or encode a `do not change` constraint as a type, test, or lint rule. When that fix reaches
|
|
42
|
+
beyond the touched code, still delete the comment, make the smallest fix that fits, and report the
|
|
43
|
+
symbol and what remains as an open item. When unsure whether a comment may stay, it goes.
|
|
44
|
+
|
|
45
|
+
Only these stay: license headers, documentation of a public contract, a link to an issue or
|
|
46
|
+
specification for a constraint the code cannot express, a suppression of a rule that is only
|
|
47
|
+
stylistic, and a note on behavior that an external dependency, platform, or protocol forces.
|
|
48
|
+
|
|
49
|
+
## Baseline and check
|
|
15
50
|
|
|
16
51
|
Resolve `scripts/quality-delta.mjs` relative to this loaded `SKILL.md`; do not assume the current
|
|
17
52
|
worktree contains an Agent OS checkout. Before the first mutation in a Git worktree, run that
|
|
@@ -22,10 +57,13 @@ delivery, run `finish`: it records a fresh check and closes the baseline only wh
|
|
|
22
57
|
Use its `clear` command only when abandoning the attempt. The normal correctness, security, scope,
|
|
23
58
|
independent-review, and verification steps still decide delivery.
|
|
24
59
|
|
|
60
|
+
## Zones
|
|
61
|
+
|
|
25
62
|
Use three zones:
|
|
26
63
|
|
|
27
|
-
1.
|
|
28
|
-
touched
|
|
64
|
+
1. The shape decision, and a bounded improvement on the implementation surface already being
|
|
65
|
+
touched that makes the requested change clearer or safer, belong in the patch. Behavior the
|
|
66
|
+
request does not change stays the same. A touched test file is
|
|
29
67
|
part of that surface; `proportional-testing` says what it keeps.
|
|
30
68
|
2. Report at most one concrete adjacent structural opportunity when it materially constrains the
|
|
31
69
|
requested change, but leave it out of the patch unless the boundary expands.
|
|
@@ -36,6 +74,8 @@ Extract a named responsibility when it makes the touched code easier to understa
|
|
|
36
74
|
invariant, even with one caller. This is allowed local improvement, not automatic scope expansion.
|
|
37
75
|
Do not force inheritance, shared utils, or extra layers merely to reduce file size.
|
|
38
76
|
|
|
77
|
+
## Evidence
|
|
78
|
+
|
|
39
79
|
The check reports added, changed, and deleted source files, test files included, touched-source NLOC
|
|
40
80
|
before/after, the before/after status of source paths that were already present at entry, package
|
|
41
81
|
dependency deltas, and optional analyzer capability. When lizard is installed, it also reports
|
|
@@ -99,7 +139,7 @@ check.
|
|
|
99
139
|
`unlock-test <path>` once the fix passes. A block is a boundary: change course or ask, and never
|
|
100
140
|
reach the same edit through another tool or path.
|
|
101
141
|
|
|
102
|
-
Exit with the smallest complete implementation, the quality evidence, semantic review findings,
|
|
142
|
+
Exit with the smallest complete implementation of the decided shape, the quality evidence, semantic review findings,
|
|
103
143
|
and fresh verification. Do not remove a legitimate abstraction merely because it increases a raw
|
|
104
144
|
count: multiple providers, runtime selection, compatibility, or a real trust boundary can justify
|
|
105
145
|
the machinery and belongs to semantic judgment.
|
|
@@ -32,8 +32,14 @@ where that is the true answer:
|
|
|
32
32
|
sentence or two.
|
|
33
33
|
- **Boundaries:** the non-goals a worker would plausibly cross, and what neighboring units own
|
|
34
34
|
instead.
|
|
35
|
-
- **Change surface:** the modules, interfaces, and existing code
|
|
36
|
-
repository, in a few lines. It names seams and does not list steps or every file.
|
|
35
|
+
- **Change surface:** the modules, interfaces, and existing code the unit changes, found by reading
|
|
36
|
+
the repository, in a few lines. It names seams and does not list steps or every file.
|
|
37
|
+
- **Target shape:** how that code should be organized once the unit is delivered, decided as if this
|
|
38
|
+
requirement had been there from the start, and what the unit removes on the way: the old path and
|
|
39
|
+
its callers, tests that protect only the replaced implementation, and comments that explain a
|
|
40
|
+
workaround. An existing pattern shows what fit when it was written; it does not decide this. One
|
|
41
|
+
to three lines that name structure, not steps. Write `extend as is` with the reason when the
|
|
42
|
+
existing design already fits.
|
|
37
43
|
- **Acceptance:** the checks that decide done, written out in the unit as given, when, then or as
|
|
38
44
|
assertions, one line each, each citing its spec example. Cover the behaviors this unit owns, not
|
|
39
45
|
every variation. A spec example shared between units states exactly this unit's part. A bare
|
|
@@ -66,6 +66,7 @@ source: files
|
|
|
66
66
|
Outcome:
|
|
67
67
|
Boundaries:
|
|
68
68
|
Change surface:
|
|
69
|
+
Target shape:
|
|
69
70
|
Acceptance:
|
|
70
71
|
Ground truth:
|
|
71
72
|
Dependencies:
|
|
@@ -110,6 +111,7 @@ Status: ready | blocked
|
|
|
110
111
|
## Outcome
|
|
111
112
|
## Boundaries
|
|
112
113
|
## Change surface
|
|
114
|
+
## Target shape
|
|
113
115
|
## Acceptance
|
|
114
116
|
## Ground truth
|
|
115
117
|
## Dependencies
|