@sockulags/agent-os 0.17.1 → 0.18.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/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/plan-work/references/spec-template.md +3 -1
- package/plugins/agent-os-core/skills/verify-before-done/SKILL.md +3 -1
- 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 +3 -1
- package/plugins/agent-os-dev/skills/diagnose-before-fix/SKILL.md +8 -6
- package/plugins/agent-os-dev/skills/init-agent-os/references/review-template.md +4 -2
- package/plugins/agent-os-dev/skills/proportional-testing/SKILL.md +15 -4
- package/plugins/agent-os-dev/skills/proportional-testing/references/strategy.md +3 -3
- package/plugins/agent-os-dev/skills/quality-ratchet/SKILL.md +11 -10
- package/plugins/agent-os-dev/skills/quality-ratchet/references/project-controls.md +9 -6
- package/plugins/agent-os-dev/skills/quality-ratchet/scripts/project-controls.mjs +2 -1
- package/plugins/agent-os-dev/skills/quality-ratchet/scripts/project-controls.test.mjs +20 -0
- package/plugins/agent-os-dev/skills/shape-work/SKILL.md +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sockulags/agent-os",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.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.18.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.18.0",
|
|
5
5
|
"homepage": "https://sockulags.github.io/agent-os/",
|
|
6
6
|
"repository": "https://github.com/sockulags/agent-os",
|
|
7
7
|
"keywords": [
|
|
@@ -53,7 +53,9 @@ Write `None` when nothing a person sees or does changes. Never delete.>
|
|
|
53
53
|
|
|
54
54
|
## Ground truth
|
|
55
55
|
|
|
56
|
-
<The commands or observations that prove the outcome, such as `npm test -- export` or a named manual check
|
|
56
|
+
<The commands or observations that prove the outcome, such as `npm test -- export` or a named manual check.
|
|
57
|
+
Acceptance examples define the behavior, not the number of tests: name where they are proven, such as
|
|
58
|
+
one table-driven test, an end-to-end step, or an observation.>
|
|
57
59
|
|
|
58
60
|
## Open risks
|
|
59
61
|
|
|
@@ -24,7 +24,9 @@ Use the strongest practical layer:
|
|
|
24
24
|
4. Static inspection only when execution is impossible and the limitation is explicit.
|
|
25
25
|
|
|
26
26
|
Passing a weaker layer does not prove a stronger claim. Stale or second-hand results are context, not
|
|
27
|
-
verification.
|
|
27
|
+
verification. When the strongest layer is unavailable, report that gap instead of compensating with
|
|
28
|
+
more unit tests at a weaker layer. A check that proves a claim does not have to become a committed
|
|
29
|
+
test; with agent-os-dev installed, proportional-testing decides what stays.
|
|
28
30
|
|
|
29
31
|
When agent-os-dev is installed, a quality-ratchet Stop block saying the check is stale or a required
|
|
30
32
|
check failed is this discipline enforced: rerun the check, or name the claim as unverified.
|
|
@@ -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.18.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.18.0",
|
|
5
5
|
"homepage": "https://sockulags.github.io/agent-os/",
|
|
6
6
|
"repository": "https://github.com/sockulags/agent-os",
|
|
7
7
|
"keywords": [
|
|
@@ -4,7 +4,9 @@ A blocking finding needs a location, triggering condition, concrete consequence,
|
|
|
4
4
|
the candidate fails a requirement or imposes a material maintenance cost. Security and data-loss
|
|
5
5
|
risks need a credible path, not a production incident. Duplicated rules that can diverge or mixed
|
|
6
6
|
responsibilities that make the requested behavior unsafe to change can justify simplification;
|
|
7
|
-
line count, personal style, and an equally valid design alternative cannot.
|
|
7
|
+
line count, personal style, and an equally valid design alternative cannot. Tests are code to
|
|
8
|
+
maintain: changed behavior that nothing protects and a new test that `proportional-testing` would
|
|
9
|
+
not keep, such as one duplicating an existing case or asserting internal calls, are both findings.
|
|
8
10
|
|
|
9
11
|
Separate required corrections from useful nonblocking follow-ups. Omit cosmetic preferences and
|
|
10
12
|
speculative hardening. No findings is a valid result. Do not manufacture work to justify review.
|
|
@@ -17,12 +17,14 @@ Find the smallest supported explanation that accounts for the failure and predic
|
|
|
17
17
|
|
|
18
18
|
Reproduce, reduce, trace the nearest seam, and compare plausible causes with high-information checks.
|
|
19
19
|
Use temporary instrumentation when it helps. When the failure can be captured as an automated test,
|
|
20
|
-
write that test first
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
write that test first, as a case in the existing test for the same rule when one exists and in the
|
|
21
|
+
shape [proportional-testing](../proportional-testing/SKILL.md) keeps, and confirm it fails for the
|
|
22
|
+
diagnosed reason. In a delivery that commits, commit the failing test before the fix, and when
|
|
23
|
+
agent-os-dev guards are installed run `guards.mjs lock-test <path>` from the quality-ratchet skill's
|
|
24
|
+
`scripts/` so the test cannot be bent to fit the fix. Once evidence supports a cause, implement the
|
|
25
|
+
smallest fix. Re-run the original failing path, then `guards.mjs unlock-test <path>`. The lock
|
|
26
|
+
covers the whole file, so tidy other cases in it after unlocking. Changing a locked test needs the
|
|
27
|
+
developer's explicit agreement, because it changes what counts as fixed.
|
|
26
28
|
|
|
27
29
|
If the failure cannot be reproduced or competing explanations cannot be distinguished, report the
|
|
28
30
|
bounded uncertainty and the next discriminating check. Do not turn a plausible hypothesis into a
|
|
@@ -21,8 +21,10 @@ or public API compatibility, each with one sentence on why.>
|
|
|
21
21
|
|
|
22
22
|
- **Blocking:** incorrect behavior, a missed acceptance example from the spec, a security or data
|
|
23
23
|
loss risk, a broken public contract, or an edit to an accepted intent or spec.
|
|
24
|
-
- **Should fix:** a defect with limited impact
|
|
25
|
-
|
|
24
|
+
- **Should fix:** a defect with limited impact; changed behavior that no existing test, type, or lint
|
|
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; or complexity the
|
|
27
|
+
change does not need.
|
|
26
28
|
- **Minor:** naming, comments, or local readability. Report at most <three> minor findings per review.
|
|
27
29
|
|
|
28
30
|
## Out of scope for review
|
|
@@ -15,16 +15,27 @@ Before adding a test:
|
|
|
15
15
|
|
|
16
16
|
1. Identify the observable behavior changed and its plausible blast radius.
|
|
17
17
|
2. Search existing tests for that behavior and affected contracts.
|
|
18
|
-
3. Name the realistic regression the proposed test would catch that existing
|
|
18
|
+
3. Name the realistic regression the proposed test would catch that existing tests, types, and lint
|
|
19
|
+
rules would not.
|
|
19
20
|
4. If that regression is unclear, do not add the test.
|
|
20
21
|
5. Otherwise extend existing or table-driven coverage when practical, using the cheapest test level
|
|
21
22
|
that proves the behavior.
|
|
22
23
|
|
|
24
|
+
Decide whether a test is evidence for this change or a lasting guard. Commit it only when it protects
|
|
25
|
+
externally observable behavior and survives a behavior-preserving refactor: it mocks none of the
|
|
26
|
+
project's own modules, and it asserts call order or arguments only where that call is the contract at
|
|
27
|
+
a system boundary. Otherwise run it as evidence and do not commit it, or fold it into the existing
|
|
28
|
+
case for the same rule.
|
|
29
|
+
|
|
30
|
+
Leave a touched test file no worse than you found it. When you add a case, merge cases that test the
|
|
31
|
+
same rule into one table-driven test, name tests by the rule they protect rather than the issue that
|
|
32
|
+
added them, and remove assertions the new case makes redundant.
|
|
33
|
+
|
|
23
34
|
For a confirmed bug, establish one reproducing regression check when practical, prove it fails for
|
|
24
35
|
the expected reason, fix it, then run that check and relevant affected tests. Expand execution only
|
|
25
36
|
when the blast radius is uncertain, shared infrastructure changed, or project policy requires a
|
|
26
37
|
broader gate.
|
|
27
38
|
|
|
28
|
-
Do not create a test for every function, branch, file, or generated code path.
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
Do not create a test for every function, branch, file, or generated code path. This discipline
|
|
40
|
+
controls test creation and development-time selection; it never removes required repository or CI
|
|
41
|
+
checks at delivery.
|
|
@@ -22,7 +22,7 @@ Existing coverage may already be sufficient.
|
|
|
22
22
|
Test externally observable behavior and contracts. A behavior-preserving refactor should not force
|
|
23
23
|
large test rewrites. Avoid tests whose main value is asserting internal calls, exact call sequences
|
|
24
24
|
when ordering is not contractual, trivial delegation, getters, constructors, framework boilerplate,
|
|
25
|
-
private structure, or mocks that reproduce the implementation.
|
|
25
|
+
private structure, mocks of the project's own modules, or mocks that reproduce the implementation.
|
|
26
26
|
|
|
27
27
|
Before adding coverage, search for an existing behavioral test. Prefer extending it, adding a case
|
|
28
28
|
to a table-driven test, and reusing its fixtures. One strong regression test is better than several
|
|
@@ -83,5 +83,5 @@ Coverage is adequate when the intended behavior is verified, plausible affected
|
|
|
83
83
|
important justified edge cases have been considered, relevant existing tests pass, and the chosen
|
|
84
84
|
test level is proportional to the risk.
|
|
85
85
|
|
|
86
|
-
Before adding another test, ask: **What realistic regression would this catch that existing tests
|
|
87
|
-
would not?** If there is no clear answer, do not add it.
|
|
86
|
+
Before adding another test, ask: **What realistic regression would this catch that existing tests,
|
|
87
|
+
types, and lint rules would not?** If there is no clear answer, do not add it.
|
|
@@ -25,7 +25,8 @@ independent-review, and verification steps still decide delivery.
|
|
|
25
25
|
Use three zones:
|
|
26
26
|
|
|
27
27
|
1. A bounded, behavior-preserving improvement on the implementation surface already being
|
|
28
|
-
touched is allowed when it makes the requested change clearer or safer.
|
|
28
|
+
touched is allowed when it makes the requested change clearer or safer. A touched test file is
|
|
29
|
+
part of that surface; `proportional-testing` says what it keeps.
|
|
29
30
|
2. Report at most one concrete adjacent structural opportunity when it materially constrains the
|
|
30
31
|
requested change, but leave it out of the patch unless the boundary expands.
|
|
31
32
|
3. Ignore unrelated debt. `scope-guard` owns drift; do not turn a ratchet signal into a cleanup
|
|
@@ -35,15 +36,15 @@ Extract a named responsibility when it makes the touched code easier to understa
|
|
|
35
36
|
invariant, even with one caller. This is allowed local improvement, not automatic scope expansion.
|
|
36
37
|
Do not force inheritance, shared utils, or extra layers merely to reduce file size.
|
|
37
38
|
|
|
38
|
-
The check reports added, changed, and deleted source files, touched-source NLOC
|
|
39
|
-
before/after status of source paths that were already present at entry, package
|
|
40
|
-
and optional analyzer capability. When lizard is installed, it also reports
|
|
41
|
-
before and after for touched functions, ranked by increase. That value counts
|
|
42
|
-
function, not readability; it is best effort, can miss functions in unusual
|
|
43
|
-
before values only for files that were clean at entry. Raw file, function, line,
|
|
44
|
-
counts are signals only. There is no aggregate score and no threshold gate unless the
|
|
45
|
-
one. Missing lizard is reported as unavailable rather than clean; jscpd is detected but
|
|
46
|
-
integrated into the delta. The core Node evidence remains usable without either.
|
|
39
|
+
The check reports added, changed, and deleted source files, test files included, touched-source NLOC
|
|
40
|
+
before/after, the before/after status of source paths that were already present at entry, package
|
|
41
|
+
dependency deltas, and optional analyzer capability. When lizard is installed, it also reports
|
|
42
|
+
cyclomatic complexity before and after for touched functions, ranked by increase. That value counts
|
|
43
|
+
paths through a function, not readability; it is best effort, can miss functions in unusual
|
|
44
|
+
formatting, and has before values only for files that were clean at entry. Raw file, function, line,
|
|
45
|
+
or complexity counts are signals only. There is no aggregate score and no threshold gate unless the
|
|
46
|
+
project sets one. Missing lizard is reported as unavailable rather than clean; jscpd is detected but
|
|
47
|
+
not integrated into the delta. The core Node evidence remains usable without either.
|
|
47
48
|
|
|
48
49
|
Use existing project checks for enforceable rules and report structural signals as advisory.
|
|
49
50
|
When configuring external checks, read [references/project-controls.md](references/project-controls.md).
|
|
@@ -77,12 +77,15 @@ Agent OS does not suppress pre-existing analyzer failures or equate tool success
|
|
|
77
77
|
|
|
78
78
|
## New exceptions and policy changes
|
|
79
79
|
|
|
80
|
-
The runner reports new source lines matching `type-escape` (common `: any`/`as any` annotations and
|
|
81
|
-
`lint-disable` (ESLint suppression and Java
|
|
82
|
-
focused tests, and Java `@Disabled`)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
The runner reports new source lines matching `type-escape` (common `: any`/`as any` annotations and
|
|
81
|
+
casts, TypeScript suppression comments), `lint-disable` (ESLint suppression and Java
|
|
82
|
+
`@SuppressWarnings`), `test-skip` (common test skips, focused tests, and Java `@Disabled`), and
|
|
83
|
+
`project-mock` (`vi.mock` or `jest.mock` of a relative path or an `@/`, `~/`, or `#/` alias, which
|
|
84
|
+
couples a test to the project's own module structure). It subtracts existing occurrences per file,
|
|
85
|
+
ignoring simple line movement. These lexical signals can match comments or strings and can reappear
|
|
86
|
+
on rename; they do not establish a semantic defect. Review them or delegate exact rules to the
|
|
87
|
+
project's linter. Only rules explicitly listed in `blockSignals` block delivery. Raw LOC and
|
|
88
|
+
structural counts never do.
|
|
86
89
|
|
|
87
90
|
## Complexity threshold
|
|
88
91
|
|
|
@@ -9,7 +9,8 @@ export const DEFAULT_TRUST_STORE = path.join(os.homedir(), '.agent-os', 'trusted
|
|
|
9
9
|
const SIGNALS = {
|
|
10
10
|
'type-escape': /@ts-(?:ignore|nocheck|expect-error)\b|:\s*any\b|\bas\s+any\b/,
|
|
11
11
|
'lint-disable': /eslint-disable|@SuppressWarnings\b/,
|
|
12
|
-
'test-skip': /\b(?:it|test|describe)\s*\.\s*(?:skip|todo|only)\s*\(|\b[fx](?:it|describe)\s*\(|@Disabled\b
|
|
12
|
+
'test-skip': /\b(?:it|test|describe)\s*\.\s*(?:skip|todo|only)\s*\(|\b[fx](?:it|describe)\s*\(|@Disabled\b/,
|
|
13
|
+
'project-mock': /\b(?:vi|jest)\s*\.\s*(?:mock|doMock)\s*\(\s*['"`](?:\.{1,2}\/|[@~#]\/)/
|
|
13
14
|
}
|
|
14
15
|
const hash = value => createHash('sha256').update(value).digest('hex')
|
|
15
16
|
const identity = value => hash(JSON.stringify(value))
|
|
@@ -80,6 +80,26 @@ test('advisory failures and new exception signals do not gate delivery', t => {
|
|
|
80
80
|
assert.deepEqual(hook(f.root), {})
|
|
81
81
|
})
|
|
82
82
|
|
|
83
|
+
test('new mocks of project modules are advisory signals; package mocks are not', t => {
|
|
84
|
+
const f = fixture(t)
|
|
85
|
+
f.write('source.test.ts', "vi.mock('@/lib/db')\n")
|
|
86
|
+
begin(f.root, options)
|
|
87
|
+
f.write('source.test.ts', [
|
|
88
|
+
"vi.mock('@/lib/db')",
|
|
89
|
+
"vi.mock('@/lib/mail')",
|
|
90
|
+
"jest.mock('../store', () => ({}))",
|
|
91
|
+
'vi.doMock("./clock")',
|
|
92
|
+
"vi.mock('@scope/package')",
|
|
93
|
+
"vi.mock('node:fs')"
|
|
94
|
+
].join('\n'))
|
|
95
|
+
const result = check(f.root, options)
|
|
96
|
+
assert.equal(result.status, 'ok')
|
|
97
|
+
assert.deepEqual(result.sourceFiles.changed, ['source.test.ts'])
|
|
98
|
+
assert.deepEqual(result.controls.signals.map(s => [s.rule, s.line]),
|
|
99
|
+
[['project-mock', 2], ['project-mock', 3], ['project-mock', 4]])
|
|
100
|
+
assert.deepEqual(hook(f.root), {})
|
|
101
|
+
})
|
|
102
|
+
|
|
83
103
|
test('an explicit project exception rule blocks only additions since entry', t => {
|
|
84
104
|
const f = fixture(t, [], { blockSignals: ['test-skip'] })
|
|
85
105
|
f.write('source.ts', "test.skip('old', () => {})")
|
|
@@ -39,6 +39,8 @@ where that is the true answer:
|
|
|
39
39
|
every variation. A spec example shared between units states exactly this unit's part. A bare
|
|
40
40
|
pointer such as "behaviors 1 to 3" is not acceptance.
|
|
41
41
|
- **Ground truth:** the commands to run and the named cases or observations they must show.
|
|
42
|
+
Acceptance lines define the behavior, not the number of tests: several can be proven by one
|
|
43
|
+
table-driven test, an end-to-end step, or an observation.
|
|
42
44
|
- **Dependencies:** for each dependency, what this unit consumes from it, in a line.
|
|
43
45
|
- **Evidence and settled decisions:** only the decisions a worker could otherwise get wrong, one
|
|
44
46
|
line each with its link. Do not retell the spec's decisions.
|