humanish 0.0.1 → 0.15.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 (196) hide show
  1. package/AGENTS.md +77 -0
  2. package/CONTRIBUTING.md +39 -0
  3. package/LICENSE +21 -0
  4. package/README.md +435 -8
  5. package/SECURITY.md +34 -0
  6. package/dist/actor-contract.d.ts +107 -0
  7. package/dist/actor-contract.js +286 -0
  8. package/dist/actor-contract.js.map +1 -0
  9. package/dist/actor-registry.d.ts +73 -0
  10. package/dist/actor-registry.js +93 -0
  11. package/dist/actor-registry.js.map +1 -0
  12. package/dist/adapter-extension.d.ts +54 -0
  13. package/dist/adapter-extension.js +214 -0
  14. package/dist/adapter-extension.js.map +1 -0
  15. package/dist/argv.d.ts +1 -0
  16. package/dist/argv.js +8 -0
  17. package/dist/argv.js.map +1 -0
  18. package/dist/artifact-reference.d.ts +22 -0
  19. package/dist/artifact-reference.js +47 -0
  20. package/dist/artifact-reference.js.map +1 -0
  21. package/dist/browser-evidence-hygiene.d.ts +7 -0
  22. package/dist/browser-evidence-hygiene.js +40 -0
  23. package/dist/browser-evidence-hygiene.js.map +1 -0
  24. package/dist/claude-agent-sdk.d.ts +94 -0
  25. package/dist/claude-agent-sdk.js +356 -0
  26. package/dist/claude-agent-sdk.js.map +1 -0
  27. package/dist/cli.d.ts +2 -0
  28. package/dist/cli.js +5 -0
  29. package/dist/cli.js.map +1 -0
  30. package/dist/codex-app-server-ui.d.ts +39 -0
  31. package/dist/codex-app-server-ui.js +327 -0
  32. package/dist/codex-app-server-ui.js.map +1 -0
  33. package/dist/codex-app-server.d.ts +141 -0
  34. package/dist/codex-app-server.js +747 -0
  35. package/dist/codex-app-server.js.map +1 -0
  36. package/dist/command-failure.d.ts +29 -0
  37. package/dist/command-failure.js +54 -0
  38. package/dist/command-failure.js.map +1 -0
  39. package/dist/computer-use-actor.d.ts +52 -0
  40. package/dist/computer-use-actor.js +48 -0
  41. package/dist/computer-use-actor.js.map +1 -0
  42. package/dist/computer-use.d.ts +232 -0
  43. package/dist/computer-use.js +615 -0
  44. package/dist/computer-use.js.map +1 -0
  45. package/dist/concurrency.d.ts +1 -0
  46. package/dist/concurrency.js +27 -0
  47. package/dist/concurrency.js.map +1 -0
  48. package/dist/concurrent-shared-world-lab.d.ts +115 -0
  49. package/dist/concurrent-shared-world-lab.js +1092 -0
  50. package/dist/concurrent-shared-world-lab.js.map +1 -0
  51. package/dist/core/git-state.d.ts +31 -0
  52. package/dist/core/git-state.js +142 -0
  53. package/dist/core/git-state.js.map +1 -0
  54. package/dist/core/index.d.ts +4 -0
  55. package/dist/core/index.js +3 -0
  56. package/dist/core/index.js.map +1 -0
  57. package/dist/core/run-primitives.d.ts +66 -0
  58. package/dist/core/run-primitives.js +120 -0
  59. package/dist/core/run-primitives.js.map +1 -0
  60. package/dist/cua-actor-lab.d.ts +620 -0
  61. package/dist/cua-actor-lab.js +2834 -0
  62. package/dist/cua-actor-lab.js.map +1 -0
  63. package/dist/device-presets.d.ts +67 -0
  64. package/dist/device-presets.js +50 -0
  65. package/dist/device-presets.js.map +1 -0
  66. package/dist/e2b-desktop-executor.d.ts +101 -0
  67. package/dist/e2b-desktop-executor.js +309 -0
  68. package/dist/e2b-desktop-executor.js.map +1 -0
  69. package/dist/e2b-desktop-launch.d.ts +144 -0
  70. package/dist/e2b-desktop-launch.js +59 -0
  71. package/dist/e2b-desktop-launch.js.map +1 -0
  72. package/dist/e2b-detached.d.ts +53 -0
  73. package/dist/e2b-detached.js +130 -0
  74. package/dist/e2b-detached.js.map +1 -0
  75. package/dist/e2b-terminal-lab.d.ts +345 -0
  76. package/dist/e2b-terminal-lab.js +1467 -0
  77. package/dist/e2b-terminal-lab.js.map +1 -0
  78. package/dist/env-file.d.ts +14 -0
  79. package/dist/env-file.js +108 -0
  80. package/dist/env-file.js.map +1 -0
  81. package/dist/feedback.d.ts +51 -0
  82. package/dist/feedback.js +313 -0
  83. package/dist/feedback.js.map +1 -0
  84. package/dist/image-evidence.d.ts +2 -0
  85. package/dist/image-evidence.js +33 -0
  86. package/dist/image-evidence.js.map +1 -0
  87. package/dist/index.d.ts +63 -0
  88. package/dist/index.js +33 -0
  89. package/dist/index.js.map +1 -0
  90. package/dist/init-templates.d.ts +12 -0
  91. package/dist/init-templates.js +369 -0
  92. package/dist/init-templates.js.map +1 -0
  93. package/dist/init.d.ts +26 -0
  94. package/dist/init.js +343 -0
  95. package/dist/init.js.map +1 -0
  96. package/dist/lab-app-runner.d.ts +78 -0
  97. package/dist/lab-app-runner.js +403 -0
  98. package/dist/lab-app-runner.js.map +1 -0
  99. package/dist/lab-config.d.ts +578 -0
  100. package/dist/lab-config.js +1751 -0
  101. package/dist/lab-config.js.map +1 -0
  102. package/dist/lab-engine.d.ts +77 -0
  103. package/dist/lab-engine.js +216 -0
  104. package/dist/lab-engine.js.map +1 -0
  105. package/dist/lab-preflight.d.ts +67 -0
  106. package/dist/lab-preflight.js +385 -0
  107. package/dist/lab-preflight.js.map +1 -0
  108. package/dist/labs.d.ts +53 -0
  109. package/dist/labs.js +176 -0
  110. package/dist/labs.js.map +1 -0
  111. package/dist/observer-assets.d.ts +2 -0
  112. package/dist/observer-assets.js +2630 -0
  113. package/dist/observer-assets.js.map +1 -0
  114. package/dist/observer-data.d.ts +63 -0
  115. package/dist/observer-data.js +145 -0
  116. package/dist/observer-data.js.map +1 -0
  117. package/dist/observer-static.d.ts +39 -0
  118. package/dist/observer-static.js +192 -0
  119. package/dist/observer-static.js.map +1 -0
  120. package/dist/observer.d.ts +46 -0
  121. package/dist/observer.js +353 -0
  122. package/dist/observer.js.map +1 -0
  123. package/dist/openai-responses-cu.d.ts +113 -0
  124. package/dist/openai-responses-cu.js +531 -0
  125. package/dist/openai-responses-cu.js.map +1 -0
  126. package/dist/oss-lab.d.ts +52 -0
  127. package/dist/oss-lab.js +299 -0
  128. package/dist/oss-lab.js.map +1 -0
  129. package/dist/oss-meta-lab-scoring.d.ts +15 -0
  130. package/dist/oss-meta-lab-scoring.js +145 -0
  131. package/dist/oss-meta-lab-scoring.js.map +1 -0
  132. package/dist/oss-meta-lab.d.ts +279 -0
  133. package/dist/oss-meta-lab.js +4889 -0
  134. package/dist/oss-meta-lab.js.map +1 -0
  135. package/dist/oss-remote-telemetry.d.ts +77 -0
  136. package/dist/oss-remote-telemetry.js +403 -0
  137. package/dist/oss-remote-telemetry.js.map +1 -0
  138. package/dist/persona.d.ts +35 -0
  139. package/dist/persona.js +133 -0
  140. package/dist/persona.js.map +1 -0
  141. package/dist/pi-agent-core.d.ts +77 -0
  142. package/dist/pi-agent-core.js +203 -0
  143. package/dist/pi-agent-core.js.map +1 -0
  144. package/dist/program.d.ts +54 -0
  145. package/dist/program.js +2347 -0
  146. package/dist/program.js.map +1 -0
  147. package/dist/redaction.d.ts +90 -0
  148. package/dist/redaction.js +292 -0
  149. package/dist/redaction.js.map +1 -0
  150. package/dist/run.d.ts +784 -0
  151. package/dist/run.js +4555 -0
  152. package/dist/run.js.map +1 -0
  153. package/dist/scripted-browser-actor.d.ts +294 -0
  154. package/dist/scripted-browser-actor.js +1286 -0
  155. package/dist/scripted-browser-actor.js.map +1 -0
  156. package/dist/scripted-browser-lab.d.ts +107 -0
  157. package/dist/scripted-browser-lab.js +738 -0
  158. package/dist/scripted-browser-lab.js.map +1 -0
  159. package/dist/shared-world-lab.d.ts +208 -0
  160. package/dist/shared-world-lab.js +1048 -0
  161. package/dist/shared-world-lab.js.map +1 -0
  162. package/dist/source-archive.d.ts +82 -0
  163. package/dist/source-archive.js +365 -0
  164. package/dist/source-archive.js.map +1 -0
  165. package/dist/stop-conditions.d.ts +26 -0
  166. package/dist/stop-conditions.js +66 -0
  167. package/dist/stop-conditions.js.map +1 -0
  168. package/dist/terminal-agent-actor.d.ts +36 -0
  169. package/dist/terminal-agent-actor.js +23 -0
  170. package/dist/terminal-agent-actor.js.map +1 -0
  171. package/docs/architecture/actor-contract.md +431 -0
  172. package/docs/architecture/github-feedback-loop.md +189 -0
  173. package/docs/architecture/local-codex-tui-actor.md +213 -0
  174. package/docs/architecture/observer.md +118 -0
  175. package/docs/architecture/oss-lab-poc.md +242 -0
  176. package/docs/architecture/project-layout.md +166 -0
  177. package/docs/architecture/state-driven-executor.md +203 -0
  178. package/docs/architecture/terminal-product-lane.md +148 -0
  179. package/docs/contracts/adapter-fixtures.md +80 -0
  180. package/docs/contracts/core.md +71 -0
  181. package/docs/contracts/feedback.md +145 -0
  182. package/docs/contracts/policy.md +305 -0
  183. package/docs/contracts/run-bundle.md +358 -0
  184. package/docs/contracts/schemas.md +984 -0
  185. package/docs/goals/current.md +409 -0
  186. package/docs/principles/invariants-and-defaults.md +135 -0
  187. package/docs/principles/self-driving-harness.md +129 -0
  188. package/docs/product/open-source-install-experience.md +229 -0
  189. package/docs/ramp/README.md +200 -0
  190. package/docs/release/open-source-readiness.md +208 -0
  191. package/docs/release/public-readiness-standard.md +205 -0
  192. package/docs/roadmap/world-class-open-source-v0.md +311 -0
  193. package/package.json +102 -8
  194. package/skills/humanish/SKILL.md +244 -0
  195. package/skills/humanish/agents/openai.yaml +7 -0
  196. package/index.js +0 -1
@@ -0,0 +1,305 @@
1
+ # Policy Contract
2
+
3
+ Date: 2026-06-02
4
+
5
+ Status: v0 draft contract for credential, network, spend, redaction, and
6
+ assisted-run boundaries.
7
+
8
+ ## Purpose
9
+
10
+ Policy defines what a run may access, what it may persist, and what it may
11
+ promote into public feedback. It keeps the public CLI useful without requiring
12
+ private infrastructure, maintainer GitHub credentials, provider account access,
13
+ or real product data.
14
+
15
+ Policy records env var names, capability classes, decisions, and redaction
16
+ status. It never records credential values.
17
+
18
+ ## Boundary Principles
19
+
20
+ - Credential classes are separate; access to one class does not imply access to
21
+ another.
22
+ - Dry-run and smoke proof should work with no provider spend.
23
+ - Network and provider spend require explicit opt-in.
24
+ - Public feedback requires redaction status `passed`.
25
+ - Assisted runs are useful evidence, but they are non-comparable to autonomous
26
+ runs unless the assistance is modeled as an explicit actor event.
27
+ - Maintainer GitHub credentials are not required for the public CLI feedback
28
+ path.
29
+
30
+ ## Credential Classes
31
+
32
+ | Class | Examples | May Be Recorded | Must Not Be Recorded |
33
+ | --- | --- | --- | --- |
34
+ | Executor auth | local Codex login, local shell authority, E2B desktop token, browser automation session | class name, env var name, present/missing status, authority level | tokens, cookies, session ids, raw home config, private command history |
35
+ | Product auth | target app test account, synthetic browser state, local fixture login | synthetic fixture id, auth state class, redaction status | real emails, passwords, customer accounts, patient accounts, production cookies |
36
+ | Provider auth | model provider key, desktop provider key, package registry token | env var name, provider class, present/missing status, spend policy | API key values, auth-bearing stream URLs, billing account identifiers |
37
+ | Maintainer auth | GitHub token, npm publish authority, repository admin rights | required/not-required, requested authority, explicit maintainer approval status | tokens, OAuth payloads, private org metadata, mutation authority by implication |
38
+
39
+ Synthetic fixture:
40
+
41
+ ```yaml
42
+ schema: humanish.policy.v1
43
+ kind: credentials
44
+ credentials:
45
+ executor:
46
+ required: false
47
+ envNames: []
48
+ valuesPersisted: false
49
+ product:
50
+ required: false
51
+ fixture: synthetic-login-state
52
+ valuesPersisted: false
53
+ provider:
54
+ required: false
55
+ envNames:
56
+ - OPENAI_API_KEY
57
+ - E2B_API_KEY
58
+ availability: names_only
59
+ valuesPersisted: false
60
+ maintainer:
61
+ required: false
62
+ githubMutation: disabled
63
+ valuesPersisted: false
64
+ ```
65
+
66
+ ## Network Policy
67
+
68
+ Network policy describes where a run may connect. It is not a hidden allowlist
69
+ for credentials.
70
+
71
+ | Mode | Meaning | Default For |
72
+ | --- | --- | --- |
73
+ | `no_network` | No external network calls. | contract docs, local unit tests |
74
+ | `local_only` | Localhost and loopback only. | Observer, local fixtures |
75
+ | `public_oss` | Public GitHub clone/fetch of owner/repo slugs only. | disposable OSS smoke |
76
+ | `authorized_private` | Token-backed clone/fetch of repos the maintainer is already authorized to access, with repo labels redacted by default. | local maintainer dogfood only |
77
+ | `provider_substrate` | Explicit provider substrate such as hosted desktop streams. | live OSS lab with keys |
78
+ | `custom_allowlist` | Adapter-declared public hosts. | target-specific adapters |
79
+
80
+ Synthetic fixture:
81
+
82
+ ```yaml
83
+ schema: humanish.policy.v1
84
+ kind: network
85
+ mode: public_oss
86
+ allowedHosts:
87
+ - github.com
88
+ allowedRepoSlugs:
89
+ - CorentinTh/it-tools
90
+ - drawdb-io/drawdb
91
+ denied:
92
+ - private remotes
93
+ - SSH remotes
94
+ - auth-bearing URLs
95
+ - target repo mutation
96
+ ```
97
+
98
+ Private maintainer dogfood must use `authorized_private` plus a redaction gate.
99
+ The repo name, screenshots, logs, source snippets, branch names, issue names,
100
+ and stream URLs remain local-only. Public receipts may include only redacted
101
+ labels, ignored artifact paths, and verifier status.
102
+
103
+ ## Spend Policy
104
+
105
+ Spend policy names when provider costs may be incurred.
106
+
107
+ | Mode | Meaning |
108
+ | --- | --- |
109
+ | `no_spend` | No provider calls that can bill. |
110
+ | `dry_run_only` | Only local contract proof; no live substrate. |
111
+ | `explicit_live_provider` | Provider calls allowed because required env var names are present and operator intent is explicit. |
112
+ | `maintainer_approved` | Reserved for publish, billing, or high-risk mutation workflows. |
113
+
114
+ Synthetic fixture:
115
+
116
+ ```yaml
117
+ schema: humanish.policy.v1
118
+ kind: spend
119
+ mode: explicit_live_provider
120
+ providerClasses:
121
+ - model
122
+ - desktop_substrate
123
+ operatorIntent:
124
+ command: humanish lab run oss --json --no-open
125
+ explicit: true
126
+ budget:
127
+ limit: unspecified
128
+ note: Operator-provided keys were present; values were not recorded.
129
+ ```
130
+
131
+ ## Redaction Policy
132
+
133
+ Redaction gates public output. A run may keep ignored local artifacts for
134
+ operator inspection, but public feedback cannot promote them unless the
135
+ redaction result is `passed`.
136
+
137
+ ### Enforcement scope
138
+
139
+ Be precise about what the automated gate does. `humanish verify` runs a
140
+ public-safety scan that detects secret/key/token shapes and known local-path
141
+ shapes, and fails closed on a match. It does **not** detect free-form PII/PHI
142
+ (names, emails, phone numbers, dates of birth, MRNs, medical detail); avoiding
143
+ those depends on using synthetic data and on reviewer judgment. Accordingly,
144
+ `redaction: passed` means the automated secret/path scan found no matches, not a
145
+ certification that the artifact is free of every class in the policy below. A
146
+ first-class PII/PHI detector is planned (issue #108) and would move the listed
147
+ PII classes from author-responsibility to enforced.
148
+
149
+ Required redaction gates:
150
+
151
+ - run bundle verification;
152
+ - Observer public-safety note;
153
+ - feedback draft creation;
154
+ - issue Markdown or issue URL rendering;
155
+ - PR or issue comments that summarize local live evidence.
156
+
157
+ `humanish verify` separates bundle validity from public promotion with
158
+ `shareSafety`:
159
+
160
+ | Status | Meaning |
161
+ | --- | --- |
162
+ | `share_ready` | The bundle passed verification and has no known local-only evidence posture. Feedback commands may render public issue drafts. |
163
+ | `local_only` | The bundle passed verification and is useful local evidence, but should not be shared as-is. Current example: full-fidelity raw screenshots. |
164
+ | `blocked` | Verification or public-safety checks failed. The bundle must not be promoted. |
165
+
166
+ Feedback commands fail closed unless `shareSafety.status` is `share_ready`.
167
+ This keeps the default raw-screenshot capture useful for local review without
168
+ letting agents mistake "verify passed" for "safe to post publicly."
169
+
170
+ Synthetic fixture:
171
+
172
+ ```yaml
173
+ schema: humanish.policy.v1
174
+ kind: redaction
175
+ status: passed
176
+ deny:
177
+ - pii
178
+ - phi
179
+ - secrets
180
+ - tokens
181
+ - raw_private_transcripts
182
+ - private_screenshots
183
+ - auth-bearing URLs
184
+ allow:
185
+ - synthetic_personas
186
+ - synthetic_fixtures
187
+ - env_var_names
188
+ - local ignored artifact paths
189
+ promotion:
190
+ publicFeedbackAllowed: true
191
+ ```
192
+
193
+ If redaction is `failed` or `unknown`, the public CLI must fail closed and tell
194
+ the operator which class of material blocked promotion without printing the
195
+ material itself.
196
+
197
+ ## GitHub Authority
198
+
199
+ The default public CLI does not need a GitHub token.
200
+
201
+ Allowed by default:
202
+
203
+ - render local feedback drafts;
204
+ - print public-safe issue Markdown;
205
+ - print prefilled issue URLs;
206
+ - include exact proof commands;
207
+ - include redacted local artifact pointers.
208
+
209
+ Not allowed by default:
210
+
211
+ - create issues through the GitHub API;
212
+ - update Projects;
213
+ - resolve review threads;
214
+ - merge PRs;
215
+ - publish packages;
216
+ - use maintainer tokens from the environment.
217
+
218
+ Maintainer automation can be built later as a separate, token-explicit,
219
+ dry-run-first tool. It must not be required for ordinary Humanish feedback.
220
+
221
+ Synthetic fixture:
222
+
223
+ ```yaml
224
+ schema: humanish.policy.v1
225
+ kind: maintainer-authority
226
+ github:
227
+ publicCliRequiresToken: false
228
+ defaultAction: print_issue_draft
229
+ apiMutation: disabled
230
+ tokenValuePersisted: false
231
+ ```
232
+
233
+ ## Assisted Runs
234
+
235
+ An assisted run is any run where a human or outside tool performs work that the
236
+ declared actor could not perform autonomously inside the declared substrate.
237
+
238
+ Examples:
239
+
240
+ - human manually logs in to a target account;
241
+ - human edits the target repo during the run;
242
+ - human copies hidden browser state into a fixture;
243
+ - human clicks through product UI while the actor only observes;
244
+ - operator restarts a provider substrate lane and continues the same run;
245
+ - support staff or private upstream context resolves the blocker.
246
+
247
+ Assisted runs can produce useful observations, but they are non-comparable to
248
+ autonomous baselines. They must not be used as green regression proof unless the
249
+ assistance is explicitly modeled as an actor event and the review says what was
250
+ assisted.
251
+
252
+ Synthetic fixture:
253
+
254
+ ```yaml
255
+ schema: humanish.policy.v1
256
+ kind: run-comparability
257
+ assistance:
258
+ status: assisted
259
+ comparableToAutonomousBaseline: false
260
+ reason: Human supplied setup that the actor could not perform.
261
+ review:
262
+ verdictAllowed: blocked
263
+ publicFeedbackAllowed: true
264
+ notes: Assisted observation may become a spec issue, not a green proof.
265
+ ```
266
+
267
+ ## Policy Decision Envelope
268
+
269
+ Policy checks should produce small, public-safe decisions that can be copied
270
+ into run bundles, reviews, or feedback drafts.
271
+
272
+ ```yaml
273
+ schema: humanish.policy-decision.v1
274
+ ok: true
275
+ checkedAt: "2026-06-02T10:00:00.000Z"
276
+ policies:
277
+ credentials:
278
+ ok: true
279
+ message: Required env var names are documented; values were not persisted.
280
+ network:
281
+ ok: true
282
+ message: Public OSS clone mode only.
283
+ spend:
284
+ ok: true
285
+ message: No provider spend in dry-run proof.
286
+ redaction:
287
+ ok: true
288
+ message: Redaction passed before feedback promotion.
289
+ comparability:
290
+ ok: true
291
+ message: Run is autonomous and comparable to dry-run baseline.
292
+ ```
293
+
294
+ ## Stop Conditions
295
+
296
+ Stop before public promotion when:
297
+
298
+ - a credential value appears in a prompt, artifact, issue, or PR body;
299
+ - a stream URL includes auth material;
300
+ - redaction is not `passed`;
301
+ - a run used human assistance but is being treated as autonomous proof;
302
+ - maintainer GitHub credentials would be required for the default public path;
303
+ - provider spend is implied but not explicit;
304
+ - network access exceeds the declared mode;
305
+ - a fixture requires real personal, customer, patient, or private source data.
@@ -0,0 +1,358 @@
1
+ # Run Bundle Contract
2
+
3
+ Date: 2026-06-02
4
+
5
+ Status: v0 draft contract for bundle identity, layout, source state, history,
6
+ lifecycle, and timing primitives.
7
+
8
+ ## Purpose
9
+
10
+ A run bundle is the durable evidence packet for one harness run. It should be
11
+ reviewable by a person, parseable by a tool, and safe to use as the source for
12
+ feedback drafts and future public issues.
13
+
14
+ ## Minimum Bundle Shape
15
+
16
+ ```yaml
17
+ schema: humanish.run-bundle.v1
18
+ runId: "<core run id>"
19
+ mode: "dry-run|live"
20
+ simCount: 1
21
+ createdAt: "<ISO timestamp>"
22
+ cwd: "[target-cwd]"
23
+ artifactRoot: ".humanish/runs/<run-id>"
24
+ source:
25
+ packageName: "<public package name or null>"
26
+ humanishSource: "present|missing"
27
+ git:
28
+ schema: humanish.git-state.v1
29
+ status: "clean|dirty|missing|unavailable"
30
+ capturedAt: "<ISO timestamp>"
31
+ head:
32
+ shortSha: "<short sha or null>"
33
+ refState: "attached|detached|unborn|unknown"
34
+ changes:
35
+ staged: 0
36
+ unstaged: 0
37
+ untracked: 0
38
+ total: 0
39
+ note: "<public-safe note>"
40
+ lifecycle:
41
+ - at: "<ISO timestamp>"
42
+ event: "run.created"
43
+ message: "<public-safe message>"
44
+ artifacts:
45
+ run: "run.json"
46
+ reviewJson: "review.json"
47
+ reviewMarkdown: "review.md"
48
+ observerData: "observer/observer-data.json"
49
+ events: "events.ndjson"
50
+ review:
51
+ schema: humanish.review.v1
52
+ verdict: "contract_proof_only|pass|fail|blocked|timed_out"
53
+ adapterScore:
54
+ schema: humanish.adapter-score.v1
55
+ namespace: "<adapter namespace>"
56
+ status: "pass|partial|fail"
57
+ score: 0
58
+ summary: "<public-safe adapter score summary>"
59
+ data: {}
60
+ feedbackCandidates:
61
+ - schema: humanish.feedback-candidate.v1
62
+ id: "<stable candidate id>"
63
+ failure_owner: "harness|target-app|actor|environment|unknown"
64
+ evidence:
65
+ - path: "<relative run artifact path>"
66
+ kind: "review|state|log|trace|screenshot|filesystem"
67
+ adapterArtifacts:
68
+ - schema: humanish.adapter-artifact.v1
69
+ namespace: "<adapter namespace>"
70
+ label: "<human-readable artifact label>"
71
+ path: "<relative run artifact path>"
72
+ kind: "state|review|log|trace|screenshot|filesystem|summary"
73
+ note: "<public-safe note>"
74
+ ```
75
+
76
+ Persisted `run.json` files must not contain absolute local target paths. Runtime
77
+ commands may return the caller's working directory in process-local JSON
78
+ responses, but durable run bundles use the public-safe `[target-cwd]` marker.
79
+
80
+ ## Subject Provenance
81
+
82
+ `subject` is an optional, additive top-level field: structured provenance for
83
+ what the computer-use backend actually drove (code pin plus state story). It
84
+ is absent on pre-existing bundles and on bundles from backends that have not
85
+ adopted it. The field shape, its three sources (`clone`, `app-url`,
86
+ `local-tree`), and the `humanish verify` checks that guard it are the schema doc's
87
+ job, not this one: see the `subject` entry under
88
+ [`schemas.md`](schemas.md#contract-schema-index). In short, `clone` carries a
89
+ `repo`/`commit` pin, `local-tree` carries an `archiveSha256`/`dirty` pin
90
+ instead (a dirty working tree cannot be commit-pinned), and `app-url` carries
91
+ no code pin at all. No path, basename, or other host-machine string ever
92
+ enters this field; identity is digests, a sha, a boolean, and counts.
93
+
94
+ ## Adapter Score
95
+
96
+ `adapterScore` is optional and namespaced. It lets a downstream adapter summarize
97
+ its own product-specific rubric without adding product nouns to core schemas.
98
+ Core validates only `schema`, `namespace`, `status`, `score`, `summary`, and
99
+ that optional `data` is a record.
100
+
101
+ Terminal-product runs record `adapterScore` additively. Browser/computer-use
102
+ runs treat `status: fail` as product-red: the route result returns `ok: false`,
103
+ the persisted `review.verdict` becomes `fail` when it was pass-like, and a
104
+ generic adapter gap is appended. The bundle remains valid evidence for
105
+ `humanish verify` because the failure is an observed product-acceptance outcome,
106
+ not corrupt evidence.
107
+
108
+ ## Adapter Artifacts
109
+
110
+ `adapterArtifacts` is optional and namespaced. It lets a downstream adapter
111
+ attach product/state proof outputs to the Humanish bundle without making the
112
+ payload shape a core concept. Core validates only:
113
+
114
+ - `schema: humanish.adapter-artifact.v1`;
115
+ - non-empty `namespace`, `label`, `path`, and `note`;
116
+ - local relative paths only, with no absolute paths, traversal, or URLs;
117
+ - supported generic artifact kinds.
118
+
119
+ Adapters that use browser/shared-world hooks may write files under the ignored
120
+ run directory and return relative references through `deriveArtifacts`. Core
121
+ stores those references, Observer links them, and `humanish verify` fails closed
122
+ when any referenced file is missing. The adapter owns the artifact payload schema
123
+ under its namespace.
124
+
125
+ ## Lane Grouping Metadata
126
+
127
+ Multi-lane browser/shared-world routes may carry optional lane grouping metadata:
128
+
129
+ ```yaml
130
+ actors:
131
+ - type: openai-computer-use
132
+ lanes:
133
+ - id: lane-01
134
+ actorType: viewer
135
+ surface: intake
136
+ caseGroup: case-001
137
+ ```
138
+
139
+ For repeated lanes, authors can use compact roster groups. The parser expands
140
+ each group into deterministic `lanes[]` before the engine runs:
141
+
142
+ ```yaml
143
+ actors:
144
+ - type: openai-computer-use
145
+ roster:
146
+ - id: viewer
147
+ count: 3
148
+ actorType: viewer
149
+ surface: review-queue
150
+ caseGroup: case-001
151
+ persona: curious-reviewer
152
+ device: desktop
153
+ ```
154
+
155
+ The generated lane ids are `<group.id>-01`, `<group.id>-02`, and so on. `roster`
156
+ is mutually exclusive with explicit `lanes`, homogeneous `count`, and
157
+ `laneFocus`; it is an authoring convenience, not a second runtime shape.
158
+
159
+ These fields are adapter-owned labels, not core enums. They let downstream
160
+ projects express "N actors of M app-defined types across S surfaces" without
161
+ teaching Humanish private product nouns. Values must be public-safe tokens and
162
+ are projected into:
163
+
164
+ - the preflight lane plan;
165
+ - shared-world `laneWindows[]` and `outcomes[]`;
166
+ - Observer `laneGroups[]`;
167
+ - human-readable Observer stream labels.
168
+
169
+ `actorType` is deliberately separate from `actors[0].type`. The latter selects
170
+ the Humanish execution actor, such as `openai-computer-use` or `scripted-browser`.
171
+ The former is the app-defined simulated user bucket, such as `viewer`,
172
+ `maintainer`, or a downstream adapter's own role label.
173
+
174
+ ## Completion And Meaningful-Use Verdicts
175
+
176
+ Each live stream may include `completion` when the harness has enough evidence
177
+ to judge the lane. Completion state is deliberately compact and public-safe:
178
+ it records actor/app/nested-Observer status, terminal tails that have already
179
+ passed redaction, and optional setup-quality evidence.
180
+
181
+ `completion.meaningfulUse` is the first-class scored verdict for meta-lab
182
+ lanes where a coding agent is asked to set up Humanish inside another project.
183
+ It is a rubric over already-redacted evidence, not a raw transcript dump.
184
+
185
+ ```yaml
186
+ completion:
187
+ status: "running|passed|failed|blocked|timed_out"
188
+ reason: "<public-safe lane summary>"
189
+ actorStatus: "not_started|running|passed|failed|blocked|timed_out|suspended|unknown"
190
+ appStatus: "not_started|running|blocked|failed|missing|unknown"
191
+ nestedObserverPresent: true
192
+ nestedVerifyPassed: true
193
+ visualStatus: "not_started|visible|blocked|unknown"
194
+ meaningfulUse:
195
+ schema: humanish.meaningful-use-score.v1
196
+ status: "pass|partial|fail"
197
+ score: 0
198
+ summary: "<public-safe score explanation>"
199
+ hardFailures:
200
+ - "<hard failure that prevents green proof>"
201
+ components:
202
+ - id: "setup-correctness"
203
+ label: "Setup correctness"
204
+ status: "pass|partial|fail"
205
+ score: 0
206
+ detail: "<public-safe detail>"
207
+ ```
208
+
209
+ The current OSS meta-lab rubric totals 100 points:
210
+
211
+ - setup correctness: 15;
212
+ - filesystem evidence: 10;
213
+ - nested Humanish evidence: 20;
214
+ - actor activity: 15;
215
+ - product surface: 15;
216
+ - feedback quality: 25.
217
+
218
+ A score of 80 or higher is `pass` only when no hard failure is present and
219
+ every rubric component passes. Scores from 45 through 79, or scores of 80 or
220
+ higher with any non-passing component, are `partial`. Scores below 45,
221
+ failed/timed-out bootstraps, missing nested Humanish proof, required actor
222
+ failure, or completed lanes without a running visible product surface are
223
+ `fail`.
224
+
225
+ ## Relative Artifact Layout
226
+
227
+ For run id `example-2026-06-02t10-00-00-000z-proof`, the core layout is:
228
+
229
+ ```text
230
+ .humanish/runs/example-2026-06-02t10-00-00-000z-proof/run.json
231
+ .humanish/runs/example-2026-06-02t10-00-00-000z-proof/review.json
232
+ .humanish/runs/example-2026-06-02t10-00-00-000z-proof/review.md
233
+ .humanish/runs/example-2026-06-02t10-00-00-000z-proof/observer/observer-data.json
234
+ .humanish/runs/example-2026-06-02t10-00-00-000z-proof/events.ndjson
235
+ .humanish/runs/latest.json
236
+ ```
237
+
238
+ Absolute paths, traversal segments, remotes, hosted logs, and private artifact
239
+ URLs are not part of the core layout.
240
+
241
+ ## Filesystem Evidence
242
+
243
+ Filesystem setup evidence is first-class when a lane asks an actor to install
244
+ or configure Humanish inside another project. It is not a repo dump.
245
+
246
+ The durable artifact kind is `filesystem`. The current schema is:
247
+
248
+ ```yaml
249
+ schema: humanish.setup-quality.v1
250
+ status: "passed|needs_review|blocked"
251
+ redaction:
252
+ status: "passed"
253
+ rawPreviews: "included|suppressed"
254
+ checks:
255
+ - id: "humanish-config"
256
+ ok: true
257
+ tree:
258
+ - path: "humanish/config.ts"
259
+ type: "file"
260
+ previews:
261
+ - path: "humanish/config.ts"
262
+ language: "typescript"
263
+ studyQuality:
264
+ schema: humanish.study-quality.v1
265
+ rating: "none|ceremonial|useful|high_leverage"
266
+ checks:
267
+ - id: "coverage-customized"
268
+ ok: true
269
+ signals:
270
+ appUrlProofBlocked: false
271
+ appUrlProofMentioned: true
272
+ actorInsightCaptured: true
273
+ coverageCustomized: true
274
+ personaCustomized: true
275
+ scenarioCustomized: true
276
+ packageScripts:
277
+ humanish: "humanish watch"
278
+ humanish:
279
+ configPresent: true
280
+ personaCount: 1
281
+ scenarioCount: 1
282
+ packageScriptPresent: true
283
+ gitignoreContainsRuntimeIgnore: true
284
+ ```
285
+
286
+ For public OSS runs, previews may include allowlisted setup files such as
287
+ `package.json`, `.gitignore`, `humanish/config.ts`, and
288
+ `humanish/labs/*.yaml` / `humanish/personas/*.yaml` /
289
+ `humanish/scenarios/*.yaml`. For token-backed or private maintainer runs, raw
290
+ previews are suppressed by default. Generated state, `.git`, `.env*`, `.npmrc`,
291
+ browser profiles, `node_modules`, `.humanish/`, and arbitrary source files are
292
+ not included. `studyQuality` is deliberately structural: it stores booleans,
293
+ checks, and a rating so private runs can preserve the useful quality signal
294
+ without committing raw private persona, scenario, or coverage text.
295
+
296
+ ## Latest And History
297
+
298
+ The latest pointer is a small local index:
299
+
300
+ ```yaml
301
+ schema: humanish.latest-run.v1
302
+ runId: "<run-id>"
303
+ path: ".humanish/runs/<run-id>"
304
+ updatedAt: "<ISO timestamp>"
305
+ ```
306
+
307
+ History entries use:
308
+
309
+ ```yaml
310
+ schema: humanish.run-history-entry.v1
311
+ runId: "<run-id>"
312
+ createdAt: "<ISO timestamp>"
313
+ mode: "dry-run|live"
314
+ path: ".humanish/runs/<run-id>"
315
+ ```
316
+
317
+ The latest pointer may move. Run bundle directories should not.
318
+
319
+ ## Verify Result Share Safety
320
+
321
+ `humanish.verify-result.v1` includes a machine-readable `shareSafety` block in
322
+ addition to `ok`, `checks[]`, and `warnings[]`:
323
+
324
+ ```yaml
325
+ schema: humanish.verify-result.v1
326
+ ok: true
327
+ shareSafety:
328
+ status: "share_ready|local_only|blocked"
329
+ reasons:
330
+ - code: "RAW_SCREENSHOTS"
331
+ message: "Full-fidelity screenshots are present ..."
332
+ ```
333
+
334
+ `ok: true` means the bundle is valid evidence. It does not necessarily mean the
335
+ bundle is safe to promote into a public issue. Public promotion should branch on
336
+ `shareSafety.status`:
337
+
338
+ - `share_ready`: feedback draft commands may render public issue payloads;
339
+ - `local_only`: keep the run local or generate a redacted replacement bundle;
340
+ - `blocked`: fix the verification or public-safety failure first.
341
+
342
+ ## Contract Fixture Proof
343
+
344
+ The core fixture proves:
345
+
346
+ - deterministic run ids from explicit inputs;
347
+ - stable relative artifact paths;
348
+ - latest/history/lifecycle/timing records;
349
+ - git status counts without branch names, remotes, file names, file paths, or
350
+ absolute directories;
351
+ - no environment-specific nouns in `src/core`.
352
+
353
+ Proof commands:
354
+
355
+ ```bash
356
+ pnpm test
357
+ pnpm typecheck
358
+ ```