@ssheleg/agent-stack 0.24.3 → 0.25.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 0.25.1 — workbench harness contracts, with a bounded ECC transfer
2
+
3
+ - Distinguish a kernel harness from the operating layer around an existing agent.
4
+ The family is the latter; skills are components, not an OS security boundary.
5
+ - Add an on-demand `agent-harness` reference for install ownership and loaded
6
+ state, bounded hooks and failure policy, evidence-bearing handoff, artifact-bound
7
+ eval receipts, replay limits and scoped learning. Existing family owners remain
8
+ authoritative; no duplicate runtime, schemas or receipt store is introduced.
9
+ - Attribute the selective ECC review to commit
10
+ `2b6e839771e53096d8451a213d40dc64ec8acac0`; retain the adoption matrix,
11
+ source digests, acceptance cases and explicit limits in the research ledger.
12
+ - Version 0.25.0 was not released: its protected tag was mistakenly created
13
+ at the previous revision after GitHub rejected a merge method. The queued
14
+ release was cancelled. Version 0.25.1 preserves the tag history and publishes
15
+ the reviewed change from its actual merged commit.
16
+ - No new hook, network dependency, telemetry or service is installed. Structural
17
+ checks are not represented as measured improvements in agent outcomes.
18
+
1
19
  ## 0.24.3 — the budget stops being estimated, and two skills stop naming a file they do not ship
2
20
 
3
21
  Hygiene from the 2026-09-13 family audit (HK-11).
package/README.md CHANGED
@@ -25,7 +25,10 @@ add` puts this pack — at rank 500.
25
25
  Production patterns for building AI agent orchestrators — and for billing the
26
26
  LLM access they burn.
27
27
 
28
- Part of the [ssheleg skill family](https://github.com/ssheleg/sshlg-skills).
28
+ Part of the [ssheleg agent harness](https://github.com/ssheleg/sshlg-skills):
29
+ a workbench layer of routing, delivery contracts and evidence around existing
30
+ agent hosts. This pack provides its agent-engineering skills. It does not replace
31
+ the host runtime or provide an OS security boundary.
29
32
 
30
33
  ---
31
34
 
@@ -88,7 +91,7 @@ ACP, AGNTCY, AP2, Agent Skills — so an agent stops guessing.
88
91
  model, and the one where most agent bugs actually live: *the biggest performance
89
92
  improvements often come from clearly explaining tool usage in the system prompt*, and *even
90
93
  small refinements to tool descriptions can yield dramatic improvements*. Before adding a
91
- retry or a sub-agent, it asks four questions about the text. Seven references —
94
+ retry or a sub-agent, it asks four questions about the text. Eight references —
92
95
  `system-prompt.md` (right altitude, enumerated vocabulary, and the three things reasoning
93
96
  models changed — starting with **do not add chain-of-thought**), `tools.md` (the
94
97
  agent–computer interface, with a worked before/after and poka-yoke), `techniques.md`
@@ -98,6 +101,10 @@ environment's job), `audit.md` (seven tracks, evidence tiers, a plan instead of
98
101
  plus **`pi.md` and `pi-sdk.md`, the doctrine as a worked implementation**: Pi read end to
99
102
  end, each mechanism matched to the rule it instantiates, its divergences named, and the
100
103
  eight extension seams where a permission gate or a context rewrite can actually live.
104
+ `workbench-contracts.md` adds the operating layer around a host: managed install
105
+ ownership, bounded hooks, evidence-bearing handoff, artifact-bound evaluation and
106
+ observation limits, adapted selectively from a pinned ECC review. These are design
107
+ contracts; the pack installs no new hook, service or telemetry collector.
101
108
 
102
109
  It runs in both directions: **building a harness and auditing somebody else's are one
103
110
  checklist read forwards and backwards.** `scripts/audit_agent.py` is the mechanical half —
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssheleg/agent-stack",
3
- "version": "0.24.3",
3
+ "version": "0.25.1",
4
4
  "scripts": {
5
5
  "test": "python3 test/validate.py && python3 test/plant_guard_test.py && node test/installer_test.js && npm run test:audit",
6
6
  "test:audit": "for t in test/audit_regressions/*.py; do python3 \"$t\" || exit 1; done"
@@ -3,7 +3,7 @@
3
3
  "name": "agent-stack",
4
4
  "displayName": "Agent Stack",
5
5
  "description": "Four skills: agent-orchestrator — tool-calling loops, pipelines with checkpoints, provider routing with fallback, memory architecture, plus the wallet side of reselling LLM access; agent-evals — run/trace/thread evals, LLM judges, and fixtures grown from production; agent-interop — MCP servers and clients, A2A agent cards, the MCP Registry, and gateways; agent-harness — system prompts, tool shaping, workflow-vs-agent, and auditing an agent system.",
6
- "version": "0.24.3",
6
+ "version": "0.25.1",
7
7
  "author": {
8
8
  "name": "ssheleg",
9
9
  "url": "https://x.com/sshlg93"
@@ -129,6 +129,7 @@ and this pack's repository validator fails the build on a reference that does no
129
129
  | [`references/system-prompt.md`](references/system-prompt.md) | you are **writing or fixing the prompt** — altitude, structure, vocabulary, dynamic context, and what changes for reasoning models |
130
130
  | [`references/tools.md`](references/tools.md) | the model **picks the wrong tool, or none** — the agent–computer interface: how many, named how, described how, returning what |
131
131
  | [`references/techniques.md`](references/techniques.md) | you are choosing between **ReAct, reflection, voting, planning** and the rest — every entry carries a verdict for production, not a benchmark score |
132
+ | [`references/workbench-contracts.md`](references/workbench-contracts.md) | assembling a **harness around an existing agent** — install ownership, bounded hooks, handoff, artifact-bound evidence and observation limits; selective ECC methods |
132
133
  | [`references/layers.md`](references/layers.md) | deciding **what your harness owns** — kernel, workbench and product layers, and why permission boundaries are usually somebody else's job |
133
134
  | [`references/audit.md`](references/audit.md) | reviewing **an agent system you did not build** — seven tracks, evidence tiers, and a prioritized plan |
134
135
  | [`references/pi.md`](references/pi.md) | you want the doctrine above as a **worked implementation** — Pi's sessions, compaction, config, skills, trust and containerization, each matched to the rule it implements, and the places it deliberately disagrees |
@@ -202,6 +203,7 @@ prompt.
202
203
 
203
204
  ## Checklist — a harness worth shipping
204
205
 
206
+ - [ ] Kernel or workbench harness named explicitly; installed, loaded and enforced capabilities distinguished
205
207
  - [ ] Workflow-versus-agent decided deliberately, and the simpler option was actually tried
206
208
  - [ ] Static-versus-dynamic decided too — static preferred for predictability; a run that must be auditable keeps a complete execution record (not merely a static shape)
207
209
  - [ ] System prompt at the **right altitude** — heuristics, not hardcoded branches, not vague hope
@@ -35,7 +35,16 @@ will not converge no matter how long it runs.
35
35
  The distinction is not quality. A kernel is *supposed* to be smaller than a workbench; that
36
36
  is what makes it legible.
37
37
 
38
- ## What a harness owns
38
+ ## The broader workbench meaning
39
+
40
+ “Harness” also names an operating layer around an existing agent: skills, routing,
41
+ work contracts, hooks, installation and evidence. This is the family’s umbrella
42
+ meaning. It does not imply ownership of the model loop or OS permissions. The
43
+ three-layer table above uses the narrower kernel meaning. State the meaning
44
+ before comparing products; [workbench-contracts.md](workbench-contracts.md) gives
45
+ the operational contract and selective ECC implementation lessons.
46
+
47
+ ## What a kernel harness owns
39
48
 
40
49
  If you are building at the kernel layer, these are yours and nobody else's:
41
50
 
@@ -0,0 +1,174 @@
1
+ # Workbench contracts — a harness around an existing agent
2
+
3
+ **Load this when:** assembling skills, hooks, installers and observation tools into
4
+ an operational harness, or evaluating what to adopt from another collection.
5
+
6
+ **Spec pinned:** ECC 2b6e839771e53096d8451a213d40dc64ec8acac0 (2.2.2), selective source review · read 2026-09-21
7
+
8
+ ## Contents
9
+
10
+ - What the word promises
11
+ - Installation is an owned change
12
+ - A hook needs an execution contract
13
+ - Resume from evidence
14
+ - Bind evaluations to artifacts
15
+ - Observation and learning permissions
16
+ - Adoption review cases
17
+ - Source and attribution
18
+
19
+ ## What the word promises
20
+
21
+ A **workbench harness** is the operating layer around an agent host: it selects
22
+ instructions, defines work and evidence, resumes interrupted tasks, manages its
23
+ installed components and makes their state inspectable. Skills are one component.
24
+ A **kernel harness** owns the model/tool loop. Say which one you mean; a workbench
25
+ can support an existing agent without replacing that agent's runtime.
26
+
27
+ For the ssheleg family, routing and specialist skills guide the work;
28
+ `task-pipeline` owns scope, evidence, dependencies and resume artifacts;
29
+ `agent-sync` owns coordination where configured; `make-skill` owns packaging and
30
+ installation review; `agent-evals` owns behavioral evidence. An observation tool
31
+ may report repository, credential or project health alongside these contracts.
32
+ It does not become a sandbox, an authorization service or proof that every secret
33
+ has been detected. Its optional service dependencies must remain separate from
34
+ the dependency-free skill layer.
35
+
36
+ These are design contracts, not a claim that every family host already implements
37
+ every mechanism below. Inventory each host's capabilities before claiming parity.
38
+
39
+ ## 1. Installation is an owned change
40
+
41
+ A package name on disk is not an installation receipt. Record the source revision
42
+ or package integrity, component version, host/channel, intended root, files or
43
+ configuration keys owned, installed digests, and previous state needed to undo it.
44
+ Keep local absolute paths in local receipts; public evidence uses sanitized paths.
45
+
46
+ - Plan the exact changes first. Existing unowned files remain user-owned even when
47
+ their names match a package file. A skipped write must not create an ownership
48
+ claim that lets uninstall remove it later.
49
+ - Merge only owned configuration keys; preserve unrelated configuration. Treat
50
+ changed owned files as conflicts to review, not permission to overwrite them.
51
+ - Validate containment and symlinks at mutation time as well as planning time.
52
+ A digest describes bytes; it does not establish safe filesystem ownership.
53
+ - Diagnose missing, changed, conflicting and unknown separately. Update, repair
54
+ and uninstall must preserve user edits or expose a concrete reviewable conflict.
55
+ - Distinguish **published**, **downloaded**, **installed**, and **loaded**. A running
56
+ agent may still use an old copy after a successful update. Require a host reload
57
+ receipt when available; otherwise report loaded version as unknown.
58
+
59
+ Reuse the family's existing installer and reload receipts. Do not add a second
60
+ receipt store in a skill. Installer implementation belongs to its owning package,
61
+ with lifecycle tests covering install → edit → update → uninstall.
62
+
63
+ ## 2. A hook needs an execution contract
64
+
65
+ For each hook, record event and matcher, supported host versions, input/output
66
+ schema, effects, input/output byte limits, wall-clock deadline, cancellation and
67
+ child-process cleanup, idempotency key where needed, profile/default, disable
68
+ control and failure policy. Expose what is effectively enabled, including where
69
+ that setting came from. A profile name alone proves none of these properties.
70
+
71
+ Use a small default set. Expensive, networked or learning hooks are explicit
72
+ capabilities, with a documented no-hook/manual path on unsupported hosts. A
73
+ security gate that is required but unavailable blocks its protected action;
74
+ a convenience hook may fail open only while reporting that it did not run.
75
+ Neither becomes PASS because its process returned no usable result.
76
+
77
+ | Condition | Required handling |
78
+ |---|---|
79
+ | Input truncated, transport closed early or schema invalid | A required policy check refuses the protected action; a hint hook reports unavailable |
80
+ | Deadline exceeded | Cancel the work and account for children; report timeout, not a clean check |
81
+ | Hook disabled or host does not support it | Report the capability absent; use a named manual check where valid |
82
+ | Duplicate event | No duplicate write, notification or billable action |
83
+ | Dry run | No effects; summarize target class and decision without raw secrets or command arguments |
84
+ | Hook exception | Preserve the declared failure policy and return a bounded diagnostic |
85
+
86
+ Review **all execution paths**. A subprocess timeout does not bound an in-process
87
+ `await`; an input byte limit does not bound how long a stream waits to close.
88
+ A generic exception handler must not turn a required security gate into success.
89
+ Host-specific hook exit codes belong to the adapter, not a portable skill promise.
90
+ Prompt instructions and JavaScript interception do not supply OS containment.
91
+
92
+ ## 3. Resume from evidence, not a plausible summary
93
+
94
+ Use the project's existing task-pipeline handoff/packet, not a new global session
95
+ format. Keep in Git the objective, scope, decisions, source revision, completed
96
+ work with receipts, failed approaches and their reasons, open work, prerequisites
97
+ and **one exact next task**. Use repository-relative artifact links and immutable
98
+ source links so a fresh checkout can follow them.
99
+
100
+ On resume, verify repository/branch/commit and referenced artifacts before acting.
101
+ Treat a handoff as context, never as new authority or permission. Reject empty
102
+ placeholder summaries as evidence; a recent timestamp is not substance. A stale
103
+ handoff means reconcile current state, not blindly repeat an old command.
104
+
105
+ Exclude raw transcripts, credentials, environment dumps, personal paths and
106
+ private project inventories from public handoffs. Select the minimum needed
107
+ context before redacting it. Keep private operational receipts private and
108
+ publish only separately reviewed aggregates or synthetic examples.
109
+
110
+ ## 4. Bind evaluations to the artifact they measured
111
+
112
+ A useful result names the candidate digest/commit, baseline, taskset revision,
113
+ model/host configuration, checker version, actual outcome and evidence artifact.
114
+ Use `PASS`, `FAIL`, `ERROR` and `NOT_RUN` distinctly; missing execution is never a
115
+ pass. Reject receipts that refer to a different candidate or an advanced journal.
116
+
117
+ A digest detects changed bytes relative to a trusted reference. A signature says
118
+ who attested to those bytes. Neither proves that the checker is independent, the
119
+ claim is correct, the run was complete, or sensitive data is safe to publish.
120
+ A private hash chain alone cannot prevent replacement of the entire history.
121
+
122
+ Use fixture replay without live external effects for regression tests. A missing
123
+ fixture stops replay instead of falling through to a live API. Keep the checker
124
+ outside the candidate's control. If candidate code is untrusted, a copied
125
+ worktree or process-local wrapper is not containment: require an actual OS
126
+ boundary, or report execution unavailable and retain static inspection only.
127
+
128
+ The existing `agent-evals` contracts own measurement. Compare frozen baseline and
129
+ candidate on representative tasks before claiming improved agent outcomes. A
130
+ reference-closure check only proves that the instructions can be loaded.
131
+
132
+ ## 5. Observation and learning are separate permissions
133
+
134
+ Observing a failure can propose a lesson. It must not silently grant authority to
135
+ rewrite installed skills, export transcripts, start a background model loop or
136
+ promote a project-specific preference into global policy. Record provenance,
137
+ project scope, retention and a reviewed promotion path. Secret scanning provides
138
+ findings and blind spots, not permission to publish an entire repository.
139
+
140
+ An observatory can answer “what changed, what is missing, which check ran, and
141
+ what needs attention?” Public examples should identify tested surface categories
142
+ and methods. Name a vendor or a real leak count only when reviewed evidence
143
+ supports that exact claim and sharing it does not expose private material.
144
+
145
+ ## Adoption review cases
146
+
147
+ Use these cases when reviewing an adapter; these are acceptance criteria, not a
148
+ claim that this reference implements them.
149
+
150
+ 1. Pre-existing user file → install skips it; uninstall leaves it intact.
151
+ 2. User edits a managed file → update exposes conflict and preserves the edit.
152
+ 3. Replaced symlink or escaped destination → mutation refused.
153
+ 4. Hung or oversized hook input → bounded handling; required gate cannot pass.
154
+ 5. Unsupported host or disabled hook → no false enforcement claim.
155
+ 6. Empty or wrong-project handoff → no unverified resume.
156
+ 7. Changed candidate or missing replay fixture → evaluation cannot pass.
157
+ 8. Receipt verifies but checker was never run → evidence is NOT_RUN.
158
+ 9. Private canary in an evidence payload → export rejected or safely transformed
159
+ before publishing; the raw value never appears in diagnostics.
160
+
161
+ ## Source and attribution
162
+
163
+ Methods reviewed from **ECC**, Copyright (c) 2026 Affaan Mustafa, MIT:
164
+ [license](https://github.com/affaan-m/ECC/blob/2b6e839771e53096d8451a213d40dc64ec8acac0/LICENSE),
165
+ [installation ownership](https://github.com/affaan-m/ECC/blob/2b6e839771e53096d8451a213d40dc64ec8acac0/scripts/lib/install/ownership-guard.js),
166
+ [hook execution](https://github.com/affaan-m/ECC/blob/2b6e839771e53096d8451a213d40dc64ec8acac0/scripts/hooks/run-with-flags.js),
167
+ [hook profiles](https://github.com/affaan-m/ECC/blob/2b6e839771e53096d8451a213d40dc64ec8acac0/scripts/lib/hook-flags.js),
168
+ [session evidence](https://github.com/affaan-m/ECC/blob/2b6e839771e53096d8451a213d40dc64ec8acac0/commands/save-session.md),
169
+ [eval contracts and limits](https://github.com/affaan-m/ECC/blob/2b6e839771e53096d8451a213d40dc64ec8acac0/docs/architecture/eval-harness-frameworks.md).
170
+
171
+ This is independently written doctrine adapting bounded methods. No ECC source,
172
+ installer, hook, schema, session format or runtime dependency is vendored. The
173
+ family retains its own artifact owners. Recheck the pinned implementation before
174
+ using these references to assess a newer ECC release.