owlrunkit 0.18.1 → 0.18.3

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 (32) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +85 -19
  3. package/docs/architecture/OWLCODA_RUNKIT_018_PROJECT_DRIVER_PRODUCT_DEFINITION.md +16 -5
  4. package/docs/architecture/OWLCODA_RUNKIT_USAGE_MODE_SELECTION_PRODUCT_DECISION_20260811.md +78 -4
  5. package/docs/architecture/OWLCODA_RUN_KIT_CONTRACT_V0_2.md +7 -0
  6. package/integrations/codex/skills/owlcoda-runkit/SKILL.md +28 -9
  7. package/integrations/codex/skills/owlcoda-runkit/assets/templates/config.json +3 -3
  8. package/integrations/codex/skills/owlcoda-runkit/references/contract-v0.1.md +160 -0
  9. package/integrations/codex/skills/owlcoda-runkit/references/contract-v0.2.md +545 -0
  10. package/package.json +1 -1
  11. package/packages/attest/README.md +4 -3
  12. package/packages/attest/consumer-surface-v1.json +1 -0
  13. package/packages/attest/distribution-manifest-v1.json +12 -1
  14. package/packages/attest/schemas/quick-verification-receipt-v2.schema.json +232 -0
  15. package/packages/attest/src/index.mjs +4 -1
  16. package/packages/attest/src/quick-receipt-contract.mjs +13 -3
  17. package/packages/attest/src/quick.mjs +21 -2
  18. package/registry-release-policy-v1.json +5 -5
  19. package/sbom.spdx.json +5 -5
  20. package/scripts/runkit-contract/assurance-router.mjs +3 -1
  21. package/scripts/runkit-contract/core-contract.mjs +2 -1
  22. package/scripts/runkit-contract/onboarding-doctor.mjs +46 -18
  23. package/scripts/runkit-contract/profile-onboarding.mjs +4 -0
  24. package/scripts/runkit-contract/project-cli-resolver.mjs +3 -0
  25. package/scripts/runkit-contract/quick-metrics.mjs +3 -3
  26. package/scripts/runkit-contract/quick-receipt.mjs +110 -5
  27. package/scripts/runkit-contract/quick-verify.mjs +93 -11
  28. package/scripts/runkit-contract/runkit-cli.mjs +172 -24
  29. package/scripts/runkit-contract/schemas/profile-reconcile-plan-v1.schema.json +2 -0
  30. package/scripts/runkit-contract/schemas/team-project-event-v2.schema.json +128 -0
  31. package/scripts/runkit-contract/team-project.mjs +310 -45
  32. package/scripts/runkit-contract/usage-mode.mjs +11 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.3
4
+
5
+ - Adds `quick-verify --stdin-file <file>` so a local or remote verification
6
+ script can be copied into the receipt store, hash-bound, and supplied as
7
+ exact stdin without embedding its bytes in argv.
8
+ - Returns bounded opening and closing Quick output lines while preserving the
9
+ complete stdout/stderr artifacts for later inspection.
10
+ - Stops emitting the fixed `quick_ignored_artifact_unbound` noise on new Quick
11
+ receipts and omits it from attestation issue output for historical receipts.
12
+ - Adds `quick-verify --attest` as one high-level command while preserving the
13
+ Quick receipt and attestation as separate evidence objects.
14
+ - Adds action-specific `quick-metrics --help`; aggregate counts are now the
15
+ default output and receipt paths require `--verbose`.
16
+ - Adds atomic `project reject-and-return` for a current failed checkpoint. It
17
+ preserves the failed attempt, records reviewer evidence, opens an assigned
18
+ rework attempt, and keeps every authority flag false.
19
+ - Introduces `OwlCodaRunKitTeamProjectEventV2` for the new rework event instead
20
+ of changing the existing Event V1 contract in place.
21
+ - Packages the Contract v0.1 and v0.2 references beside the bundled Codex Skill
22
+ so its relative links work before and after managed Skill installation.
23
+
24
+ ## 0.18.2
25
+
26
+ - Makes `project checkpoint --help` action-specific and returns a complete,
27
+ shell-safe correction command when a measured checkpoint omits
28
+ `--completed-units`.
29
+ - Keeps symlinked workspace roots fail-closed while reporting the canonical
30
+ `--workspace` path, including the macOS `/tmp` to `/private/tmp` case.
31
+ - Returns a bounded stdout/stderr `outputSummary` at the top level of Quick
32
+ results without changing the receipt or weakening full-output binding.
33
+ - Retries one transient registry transport failure while retaining the existing
34
+ per-attempt timeout, and distinguishes DNS, connection, timeout, HTTP,
35
+ authentication, and missing-version failures.
36
+ - Aligns the packaged README with five-mode routing and existing profile
37
+ reconciliation instead of treating long-running, release, or production
38
+ labels as automatic Formal triggers.
39
+ - Adds action-specific `quick-verify --help`, lists canonical risk-category
40
+ values in mode help and validation errors, and marks formatting-only profile
41
+ reconcile plans with `normalizationOnly: true`.
42
+
3
43
  ## 0.18.1
4
44
 
5
45
  - Adds read-only `mode recommend` and `mode status` commands with five
package/README.md CHANGED
@@ -11,6 +11,16 @@ continuity and assurance independently. It keeps ordinary development light
11
11
  while preserving mandatory Formal routing for material safety and authority
12
12
  facts.
13
13
 
14
+ RunKit 0.18.2 is a focused dogfood patch for clearer CLI help, actionable
15
+ checkpoint and canonical-path errors, bounded Quick output summaries, typed
16
+ registry diagnostics, and explicit profile normalization previews.
17
+
18
+ RunKit 0.18.3 turns the next Sierac recovery dogfood findings into a smaller
19
+ Quick surface: hash-bound stdin scripts, bounded opening and closing summaries,
20
+ actionable-only receipt issues, optional one-command attestation, and concise
21
+ metrics by default. It also adds one atomic failed-work return path and makes
22
+ the bundled Skill's contract references self-contained.
23
+
14
24
  The 0.18 Project Driver is a bounded surface for new projects and controlled
15
25
  dogfood. Its product name does not claim to be a general long-running,
16
26
  multi-phase, or enterprise control plane. Version 0.18 adds one bounded
@@ -25,7 +35,7 @@ separate authority boundaries.
25
35
  ## Install
26
36
 
27
37
  ```bash
28
- npm install --save-exact owlrunkit@0.18.1
38
+ npm install --save-exact owlrunkit@0.18.3
29
39
  ```
30
40
 
31
41
  The `owlrunkit` bootstrap uses the project's exact locally bound CLI for
@@ -54,8 +64,8 @@ grant Git, release, deployment, production, or business authority.
54
64
 
55
65
  RunKit 0.18 keeps the project alive independently of any one Agent or chat.
56
66
  Initialize a definition, then use typed direct commands for the normal
57
- assignment, checkpoint, handoff, decision, integration, status, and takeover
58
- flow:
67
+ assignment, checkpoint, handoff, failed-work return, decision, integration,
68
+ status, and takeover flow:
59
69
 
60
70
  ```bash
61
71
  cp node_modules/owlrunkit/scripts/runkit-contract/templates/team-project-definition.json ./project-definition.json
@@ -73,6 +83,14 @@ owlrunkit project handoff --workspace . --handoff-id handoff-1 \
73
83
  --from-agent agent-runtime --to-agent agent-successor \
74
84
  --summary 'Source work is ready for continuation' --next 'Run verification' \
75
85
  --evidence evidence/source.txt
86
+ # If review instead rejects a failed checkpoint, preserve it and open rework
87
+ # without first mutating the WorkItem back to active:
88
+ owlrunkit project reject-and-return --workspace . --rework-id review-1 \
89
+ --at 2026-08-09T00:10:30.000Z --work-item work-item-1 \
90
+ --reviewer-agent agent-control --to-agent agent-runtime \
91
+ --reason 'The candidate violates its versioned contract' \
92
+ --next 'Repair the contract and rerun the focused check' \
93
+ --evidence evidence/rejected-review.txt
76
94
  owlrunkit project assign --workspace . --assignment-id assign-2 \
77
95
  --at 2026-08-09T00:11:00.000Z --work-item work-item-1 \
78
96
  --agent agent-successor --supersedes assign-1
@@ -112,9 +130,16 @@ Normal users supply the one definition JSON to `init`, then use typed flags and
112
130
  values. They do not need to author request, event, receipt, or hash JSON. The
113
131
  legacy `--request <event.json>` path remains available for existing automation
114
132
  and compatibility. Multiple Agents do not make project coordination Formal by
115
- themselves. This flow does not make project coordination Formal by itself; the
116
- assurance lane follows the underlying high-risk integration,
117
- release, production, migration, destructive, or explicit Formal-acceptance boundary.
133
+ themselves. Project Driver continuity does not make project coordination Formal
134
+ by itself. The assurance lane follows actual writer and authority count,
135
+ rollback certainty, permissions, security, funds, irreversibility, schema/data
136
+ migration, and explicit acceptance contracts—not environment labels alone.
137
+
138
+ `project reject-and-return` applies only to the current explicit failed
139
+ checkpoint. One Event V2 atomically binds that failure, its prior assignment,
140
+ the reviewer, evidence, target Agent, and new assignment. The failed checkpoint
141
+ remains immutable; status and takeover expose the rework relation and attempt.
142
+ The command is not a Git rejection, merge action, or release authorization.
118
143
 
119
144
  `project verification --defer` is a small deferred-verification ledger, not a
120
145
  test scheduler. It records stable check IDs, why they were intentionally not
@@ -166,30 +191,52 @@ high-confidence candidates:
166
191
  ```bash
167
192
  owlrunkit profiles detect --workspace . --dry-run
168
193
  owlrunkit profiles detect --workspace . --apply
194
+ owlrunkit profiles reconcile --workspace . --dry-run
195
+ owlrunkit profiles reconcile --workspace . --apply
169
196
  owlrunkit profiles validate --workspace .
170
197
  ```
171
198
 
172
- `--apply` is create-only. It refuses ambiguous or low-confidence candidates,
173
- source drift, symlinks, and launchers that do not resolve to exact local files.
174
- It directly supports lock-bound npm plus exact project-installed pnpm, Yarn,
175
- and Bun launchers. A PATH-only package manager remains review-required. It
176
- never silently replaces an existing profile set.
199
+ `profiles detect --apply` is create-only. `profiles reconcile` previews or
200
+ atomically updates an existing profile set and leaves a migration receipt. Both
201
+ paths refuse ambiguous or low-confidence candidates, source drift, symlinks,
202
+ and launchers that do not resolve to exact local files. Detection directly
203
+ supports lock-bound npm plus exact project-installed pnpm, Yarn, and Bun
204
+ launchers. A PATH-only package manager remains review-required. A dry-run that
205
+ only canonicalizes JSON formatting reports `normalizationOnly: true` instead of
206
+ showing unexplained hash drift with an empty update list.
207
+
208
+ ## Choose auto, off, light, managed, or formal
209
+
210
+ Start with the human-first read-only recommendation:
211
+
212
+ ```bash
213
+ owlrunkit mode recommend --workspace .
214
+ ```
215
+
216
+ - **off / No RunKit** uses neither continuity nor assurance for analysis,
217
+ documentation, and disposable exploration that needs no reusable evidence.
218
+ - **light / Quick Verification** runs one exact low-risk, source-bound command.
219
+ - **managed** adds Project Driver continuity; each WorkItem may still use no
220
+ assurance, Quick, or Formal according to its own facts.
221
+ - **formal / Formal Delivery** is forced by multiple writers, permission or
222
+ security boundaries, funds, irreversible work, uncertain rollback,
223
+ schema/data migration, or an explicit Formal acceptance contract.
224
+ - **auto** derives the preset from supplied facts and is the default.
177
225
 
178
- ## Choose No RunKit, Quick, or Formal
226
+ Production, release, deployment, long duration, and interruption recovery do
227
+ not force Formal by themselves. Long or interrupted work primarily selects
228
+ Project Driver continuity. Risk containment permits a fresh lower-assurance
229
+ recommendation; escalation is not sticky.
179
230
 
180
- Route explicit risk facts before starting work:
231
+ Machine integrations may route an explicit risk-facts document directly:
181
232
 
182
233
  ```bash
183
234
  owlrunkit assurance route --workspace . \
184
235
  --request ./scripts/runkit-contract/templates/assurance-request.json
185
236
  ```
186
237
 
187
- - **No RunKit** is for work that needs neither a reusable receipt nor controlled
188
- writes.
189
- - **Quick Verification** is for one low-risk, source-bound command that needs a
190
- reusable receipt but no writer lease or Formal acceptance.
191
- - **Formal Delivery** is for multi-writer, long-running, migration, integration,
192
- release, production, funds, destructive, or formally accepted work.
238
+ `mode recommend --help` lists every accepted `--risk-category`; an invalid
239
+ category reports both the rejected value and the canonical allowed list.
193
240
 
194
241
  The router fails closed to Formal when required risk facts are incomplete.
195
242
  Quick receipts cannot become Formal acceptance, and Formal acceptance does not
@@ -199,8 +246,27 @@ Run Quick with:
199
246
 
200
247
  ```bash
201
248
  owlrunkit quick-verify --workspace . -- npm test
249
+ owlrunkit quick-verify --workspace . --stdin-file ./remote-check.sh --attest \
250
+ -- ssh test-host /bin/sh
251
+ owlrunkit quick-metrics --workspace . --local
252
+ owlrunkit quick-metrics --workspace . --local --verbose
202
253
  ```
203
254
 
255
+ `--stdin-file` accepts a regular non-symlink file up to 1 MiB, copies its exact
256
+ bytes into the receipt store, and binds its path, size, and SHA-256 in a V2
257
+ Quick receipt before supplying those stored bytes as stdin. This avoids putting
258
+ large scripts into SSH argv or receipt JSON. The top-level `outputSummary`
259
+ includes bounded opening and closing stdout/stderr lines, so both rollback and
260
+ restore phases remain visible while the complete artifacts stay receipt-bound.
261
+ `--attest` runs the existing attestation immediately and returns its independent
262
+ object alongside the Quick result; it does not promote Quick to Formal.
263
+
264
+ `quick-metrics --local` returns aggregate counts only. Add `--verbose` when the
265
+ individual receipt paths are needed. New successful receipts no longer carry
266
+ the fixed `quick_ignored_artifact_unbound` issue; historical receipts remain
267
+ strictly readable without surfacing that non-actionable code as an attestation
268
+ issue.
269
+
204
270
  ## Formal Delivery in three commands
205
271
 
206
272
  Given a Goal Contract and the paths this work item may write, the happy path is:
@@ -34,11 +34,13 @@ The ordinary user-facing flow is a typed direct CLI surface:
34
34
  3. `project checkpoint` records meaningful state and evidence.
35
35
  4. `project handoff` transfers a responsibility without overwriting its
36
36
  history.
37
- 5. `project decision` opens or resolves a decision with rationale and evidence.
38
- 6. `project integrate` records an integration-gate result with evidence.
39
- 7. `project status` projects the current team state.
40
- 8. `project takeover` builds the next bounded action for a successor Agent.
41
- 9. After the project derives `overall=completed`, `project successor`
37
+ 5. `project reject-and-return` preserves a current failed checkpoint and opens
38
+ one evidence-linked rework assignment atomically.
39
+ 6. `project decision` opens or resolves a decision with rationale and evidence.
40
+ 7. `project integrate` records an integration-gate result with evidence.
41
+ 8. `project status` projects the current team state.
42
+ 9. `project takeover` builds the next bounded action for a successor Agent.
43
+ 10. After the project derives `overall=completed`, `project successor`
42
44
  archives it and installs one fresh project under explicit Owner invocation.
43
45
 
44
46
  Except for the one definition supplied to `init`, normal users provide typed
@@ -65,6 +67,11 @@ checkpoint.
65
67
  ## Continuity actions
66
68
 
67
69
  A handoff preserves the outgoing assignment and records the successor action.
70
+ A reject-and-return event binds the current failed checkpoint, failed
71
+ assignment, reviewer, evidence, target Agent, and new rework assignment in one
72
+ append-only write. The failed event stays terminal and immutable; the WorkItem
73
+ continues from a new derived active rework attempt. It cannot target completed,
74
+ active, implicit execution-only failure, or historical failure state.
68
75
  A decision separates the open question from its later resolution, rationale,
69
76
  and evidence. An integration event records that the project gate was reached;
70
77
  it is not a Git merge, release, deployment, or publication operation. Status and
@@ -132,6 +139,10 @@ untrusted control state. Normal project coordination retains
132
139
  `authorizationGranted=false` unless a separately authorized boundary says
133
140
  otherwise.
134
141
 
142
+ The new atomic rework record uses `OwlCodaRunKitTeamProjectEventV2`; existing
143
+ Event V1 bytes and meanings are unchanged and remain readable. This avoids
144
+ silently adding a new event meaning to the versioned V1 contract.
145
+
135
146
  ## Assurance boundary
136
147
 
137
148
  Multiple Agents coordinating a project do not make project coordination Formal
@@ -1,6 +1,6 @@
1
1
  # OwlCoda RunKit 使用模式选择:Sierac MES Dogfood 产品决议
2
2
 
3
- 状态:**0.18.1 本地候选,未发布、未安装、未激活**
3
+ 状态:**0.18.2 已发布;本文主体保留既有产品决议,文末追加未发布的 0.18.3 dogfood 修复候选**
4
4
  日期:2026-08-11
5
5
 
6
6
  ## 已验证现场事实
@@ -125,8 +125,9 @@ global gate 仍正确失效。
125
125
 
126
126
  ## 不能声称的内容
127
127
 
128
- - 这份文档和当前 worktree 不是已发布的 0.18.1,也不是 npm、Core、Skill 或任何
129
- 项目的升级完成证明。
128
+ - 本文主体形成时记录的是 0.18.1 发布前候选;0.18.1 后续发布事实以
129
+ `docs/PRODUCT-TRUTH.md` 和独立 release receipt 为准。本文本身不证明 npm、Core、
130
+ Skill 或任何项目已升级。
130
131
  - `mode recommend` 根据调用者提供的结构化事实路由;它不会自动发现所有业务、
131
132
  权限、资金或迁移风险。
132
133
  - RunKit 降低进度、证据和完成状态幻觉,不直接解决 Sierac MES 业务问答幻觉。
@@ -136,7 +137,80 @@ global gate 仍正确失效。
136
137
 
137
138
  ## 版本建议
138
139
 
139
- 本组变更适合形成 `owlrunkit@0.18.1` 小版本候选:它保持 0.18 的 Project Driver
140
+ 本组变更当时适合形成 `owlrunkit@0.18.1` 小版本候选:它保持 0.18 的 Project Driver
140
141
  和回执合同,新增只读 CLI,并修复 dogfood 验证出的行为缺陷。候选只有在聚焦测试、
141
142
  RunKit contract/package gate、Core 身份同步、pack 内容检查和安装 smoke 都通过后
142
143
  才具备发布评审资格;发布、项目升级与运行时激活仍是之后的独立动作。
144
+
145
+ ## 0.18.2 dogfood 补丁追加
146
+
147
+ 0.18.1 发布后,Sierac MES 与 OwlChen 的项目级使用继续证明 `managed + quick` 是普通
148
+ 跨会话源码 Wave 的合适默认,Formal 只应由真实高风险事实触发。OwlChen 已读回项目
149
+ 本地 0.18.1 的 doctor、profiles、Formal、Quick、metrics 与模式选择器主路径;进程级
150
+ 共享 Skill 因另一项目存在 active execution/lease 而停止升级,这是正确的安全边界,
151
+ 不是缺陷。
152
+
153
+ 这些后续 dogfood 暴露的缺口适合形成 0.18.2 patch,而不是新增平台能力:
154
+
155
+ - symlink workspace 拒绝时直接给出 canonical `--workspace`,包括 macOS
156
+ `/tmp` 到 `/private/tmp`;
157
+ - `project checkpoint --help` 和 measured WorkItem 缺参错误给出完整命令;
158
+ - Quick 顶层返回有界 stdout/stderr 摘要,同时完整日志继续由回执绑定;
159
+ - doctor 对 registry transport 做一次重试、每次保留原有超时上限,并区分 DNS、连接、
160
+ 超时、HTTP、认证和版本缺失;
161
+ - `quick-verify --help` 可用,risk category 的帮助与错误列出同一组规范值;
162
+ - profile 纯格式规范化计划显式返回 `normalizationOnly: true`;
163
+ - package README 与五模式、profile reconcile 的已实现真值一致。
164
+
165
+ 上述 0.18.2 内容已经发布;准确 Git/npm 身份以 `docs/PRODUCT-TRUTH.md` 和独立发布
166
+ 回执为准。发布本身没有更新全局 Skill、迁移外部项目或授予业务权限。
167
+
168
+ ## 0.18.3 Sierac recovery dogfood 修复候选
169
+
170
+ ### 新增现场事实
171
+
172
+ Sierac MES 三轮 0.18.2 实测继续支持“普通小任务少用、跨窗口使用 Project Driver、
173
+ 高价值状态转换使用 Quick”的模式决议。冷启动 takeover 约 0.4 秒恢复了当前 truth,
174
+ 并正确识别陈旧 handoff;一次 W1.8 回滚与 W1.9 恢复在串行读回后留下 GO Quick
175
+ attestation,且没有扩大到 Formal、生产、Git 或业务验收。
176
+
177
+ 同一轮暴露了五个可复现的 Quick 产品缺口:
178
+
179
+ - 为把远端脚本精确交给 SSH,操作者只能把 base64 放进 argv;单个参数达到
180
+ 14,469 bytes,整条 argv 约 14,539 bytes,receipt 为 79,591 bytes。
181
+ - 顶层摘要只保留最后三行,无法同时展示前半段 W1.8 回滚与后半段 W1.9 恢复。
182
+ - 项目现存 13/13 Quick 都携带固定 `quick_ignored_artifact_unbound`,没有可行动差异。
183
+ - 日常 Quick 仍需第二次调用 `quick-attest`。
184
+ - `quick-metrics --help` 返回通用 invalid-input,默认结果无条件展开全部 receipt 路径。
185
+
186
+ ### 本轮实现
187
+
188
+ - `quick-verify --stdin-file <file>` 将最多 1 MiB 的 regular non-symlink 输入复制到
189
+ receipt store,以路径、大小和 SHA-256 生成 `OwlCodaQuickVerificationReceiptV2`,
190
+ 再把已保存字节作为 exact stdin;脚本内容不进入 argv 或 receipt JSON。
191
+ - `outputSummary` 同时返回有界 head 与 tail,完整 stdout/stderr 仍是唯一证据材料。
192
+ - 新 Quick 不再生成固定 ignored-artifact issue;历史 receipt 仍严格可读,但 attest
193
+ 不再把该推测性代码作为问题输出。未声明 ignored output 仍不属于 Quick 证明范围。
194
+ - `quick-verify --attest` 在一个高层调用中返回独立 attestation 对象,不把 Quick
195
+ 提升为 Formal。
196
+ - `quick-metrics --local` 默认只返回聚合;`--verbose` 才返回 receipt 路径,并新增
197
+ action-specific help。
198
+ - 后续真实候选复核证明 RunKit 能保存“测试全绿但版本合同错误”的 rejection、Quick
199
+ receipt、源码未变事实和重新责任人。`project reject-and-return` 因此作为同一
200
+ 0.18.3 候选的原子 Project Driver 动作:只接受当前显式 failed checkpoint,保留
201
+ 失败事件,记录 reviewer/reason/evidence,并创建新的 rework assignment。新记录使用
202
+ Event V2,不改写 Event V1 合同。
203
+ - standalone npm 构建把 Contract v0.1/v0.2 的权威字节复制到 Skill 自身的
204
+ `references/`,使发布包内相对链接和之后的 managed Skill 安装保持一致。
205
+
206
+ ### 后续缺口
207
+
208
+ 本轮没有实现次优先级的 `project takeover` stale-handoff delta,也没有新增 recovery
209
+ evidence 的 `captured_before` / `restores_to` 语义字段。Project Driver 自动 ID、时间戳、
210
+ 单项完成与 integrate 合并,以及路径范围指纹仍保留在既有 backlog。
211
+
212
+ ### 不能声称
213
+
214
+ `0.18.3` 当前只是隔离 worktree 内的源码候选。它尚未 commit、合并、tag、publish、
215
+ 安装、全局 Skill 更新或外部项目 adoption;聚焦测试也不构成发布授权、生产授权或
216
+ 业务验收。
@@ -471,6 +471,13 @@ project-owned receipt store and performs no telemetry or network access. A
471
471
  Quick `GO` remains `captured_verification`; it cannot satisfy the Formal
472
472
  Contract v0.2 acceptance gate.
473
473
 
474
+ Core `0.18.3` adds `OwlCodaQuickVerificationReceiptV2` only when the caller
475
+ uses `quick-verify --stdin-file`. RunKit copies at most 1 MiB from a regular
476
+ non-symlink file into the receipt store before execution, supplies those stored
477
+ bytes as exact stdin, and binds their workspace-relative path, byte size, and
478
+ SHA-256. V1 remains the no-stdin receipt and stays readable. Neither schema
479
+ binds undeclared ignored outputs or grants any authority.
480
+
474
481
  Deterministic `repair` persists a reviewable plan before replay, reuses only
475
482
  fresh receipt-bound coverage, replays pending exact argv, and appends
476
483
  replacement lineage. Failed and orphaned attempts remain inspectable. Repair
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  name: owlcoda-runkit
3
- description: Run receipt-backed, project-owned work with OwlCoda RunKit. Use when Codex needs to coordinate a large multi-Agent project, show per-Agent progress, manage dependencies or decisions, record intentionally deferred verification without repeating covered tests, hand work to another Agent, recover a blank-session next action, initialize or inspect `.owlcoda/runkit/`, plan bounded work with engine pins and leases, capture exact verification evidence, close an execution, produce a ready-for-commit receipt, or perform a read-only foreign-project shadow without widening Git or release authority.
3
+ description: Run receipt-backed, project-owned work with OwlCoda RunKit. Use when Codex needs to coordinate a large multi-Agent project, show per-Agent progress, manage dependencies or decisions, atomically return failed work for evidence-linked rework, record intentionally deferred verification without repeating covered tests, hand work to another Agent, recover a blank-session next action, initialize or inspect `.owlcoda/runkit/`, plan bounded work with engine pins and leases, capture exact verification evidence, close an execution, produce a ready-for-commit receipt, or perform a read-only foreign-project shadow without widening Git or release authority.
4
4
  ---
5
5
 
6
6
  # OwlCoda RunKit
7
7
 
8
8
  Use the bundled deterministic Core to coordinate work through project artifacts rather than chat memory. Require Node.js 20 or later.
9
9
 
10
- Bundled release: standalone `owlrunkit@0.18.1`, bundling Contract `0.2` and
11
- Core `0.18.1` with manifest
12
- `sha256:349b4157d3d089462b172de1619ccd169b5c1669b9322e2580ac6ec4f8616b07`.
13
- The published `owlrunkit@0.18.0` package is the trusted prior for rollback;
10
+ Bundled release: standalone `owlrunkit@0.18.3`, bundling Contract `0.2` and
11
+ Core `0.18.3` with manifest
12
+ `sha256:cc7a923649592084150828f24f0d90f280af92514bafdbc4999f4015b3175d5c`.
13
+ The published `owlrunkit@0.18.2` package is the trusted prior for rollback;
14
14
  verify exact official npm registry provenance before adoption. The immutable
15
15
  rollback baseline for the prior release is `owlrunkit@0.16.1` with SHA-1
16
16
  `1bc119d24879bdd8959af16b364af55ca9d61ea9` and canonical npm tarball URL
@@ -24,8 +24,9 @@ The session is an execution interface. Project artifacts are the system of recor
24
24
  Translate ordinary user requests into durable typed project actions. Do not ask
25
25
  the user to operate the CLI when the request and authority are already clear.
26
26
 
27
- The normal mainline is `init`, `assign`, `checkpoint`, `handoff`, `decision`,
28
- `verification`, `integrate`, `status`, and `takeover`. After a project
27
+ The normal mainline is `init`, `assign`, `checkpoint`, `handoff`,
28
+ `reject-and-return`, `decision`, `verification`, `integrate`, `status`, and
29
+ `takeover`. After a project
29
30
  derives completed, `successor` is the bounded lifecycle step. `init` accepts one project definition
30
31
  JSON; subsequent actions use direct typed flags. Normal users do not author
31
32
  request, event, receipt, or hash JSON. The legacy `--request <event.json>` form
@@ -40,6 +41,9 @@ remains available for existing automation and compatibility.
40
41
  - "I decided ...": append a decision resolution with rationale and evidence.
41
42
  - "Hand this to another Agent": append the handoff, then a successor assignment;
42
43
  never overwrite the old assignment.
44
+ - "Reject this failed candidate and return it": use one `project
45
+ reject-and-return` event. Preserve the failed checkpoint, bind the review
46
+ evidence, create the rework assignment, and never rewrite failure as active.
43
47
  - "Continue/take over": build `project takeover` for the current Agent and use
44
48
  its bounded next action and evidence refs.
45
49
  - "Start the next project": only after status derives `overall=completed`,
@@ -76,6 +80,10 @@ owlrunkit project handoff --workspace "$PROJECT_ROOT" --handoff-id "$HANDOFF_ID"
76
80
  --at "$OCCURRED_AT" --assignment-id "$ASSIGNMENT_ID" --work-item "$WORK_ITEM_ID" \
77
81
  --from-agent "$AGENT_ID" --to-agent "$SUCCESSOR_AGENT_ID" \
78
82
  --summary "$SUMMARY" --next "$NEXT_ACTION" --evidence "$EVIDENCE_REF"
83
+ owlrunkit project reject-and-return --workspace "$PROJECT_ROOT" \
84
+ --rework-id "$REWORK_ID" --at "$OCCURRED_AT" --work-item "$WORK_ITEM_ID" \
85
+ --reviewer-agent "$REVIEWER_AGENT_ID" --to-agent "$AGENT_ID" \
86
+ --reason "$REJECTION_REASON" --next "$NEXT_ACTION" --evidence "$EVIDENCE_REF"
79
87
  owlrunkit project decision --workspace "$PROJECT_ROOT" --resolve \
80
88
  --decision-id "$DECISION_ID" --at "$OCCURRED_AT" --resolution "$RESOLUTION" \
81
89
  --rationale "$RATIONALE" --evidence "$EVIDENCE_REF"
@@ -199,15 +207,26 @@ For one low-risk exact command, use the Core v0.13 Quick path:
199
207
  owlrunkit quick-verify \
200
208
  --workspace "$PROJECT_ROOT" -- "$ABSOLUTE_EXECUTABLE" "arg-one"
201
209
 
210
+ owlrunkit quick-verify \
211
+ --workspace "$PROJECT_ROOT" --stdin-file "$SCRIPT_FILE" --attest \
212
+ -- ssh test-host /bin/sh
213
+
202
214
  owlrunkit quick-attest \
203
215
  --workspace "$PROJECT_ROOT" --receipt "$QUICK_RECEIPT"
204
216
 
205
217
  owlrunkit quick-metrics \
206
218
  --workspace "$PROJECT_ROOT" --local
219
+
220
+ owlrunkit quick-metrics \
221
+ --workspace "$PROJECT_ROOT" --local --verbose
207
222
  ```
208
223
 
209
- Quick receipts are `captured_verification`, not Formal acceptance. Metrics are
210
- local-only and perform no telemetry or network request.
224
+ `--stdin-file` copies and SHA-256-binds at most 1 MiB of regular non-symlink
225
+ input before supplying the stored bytes as exact stdin. `--attest` returns the
226
+ separate attestation object in the same high-level invocation. Quick receipts
227
+ remain `captured_verification`, not Formal acceptance. Metrics are aggregate by
228
+ default; `--verbose` adds receipt paths. Both forms are local-only and perform
229
+ no telemetry or network request.
211
230
 
212
231
  Core v0.13 also adds deterministic repair and exact-byte offline transport:
213
232
 
@@ -2,9 +2,9 @@
2
2
  "schemaVersion": "OwlCodaRunKitConfigV2",
3
3
  "core": {
4
4
  "contractVersion": "0.2",
5
- "coreVersion": "0.18.1",
6
- "coreManifestSha256": "sha256:349b4157d3d089462b172de1619ccd169b5c1669b9322e2580ac6ec4f8616b07",
7
- "coreSourceRef": "artifact:sha256:349b4157d3d089462b172de1619ccd169b5c1669b9322e2580ac6ec4f8616b07"
5
+ "coreVersion": "0.18.3",
6
+ "coreManifestSha256": "sha256:cc7a923649592084150828f24f0d90f280af92514bafdbc4999f4015b3175d5c",
7
+ "coreSourceRef": "artifact:sha256:cc7a923649592084150828f24f0d90f280af92514bafdbc4999f4015b3175d5c"
8
8
  },
9
9
  "authorizationPolicy": "external_explicit_authority_required"
10
10
  }
@@ -0,0 +1,160 @@
1
+ # OwlCoda RunKit Contract v0.1
2
+
3
+ Status: **frozen for Codex-side project execution**
4
+ Frozen at: 2026-07-13
5
+ Runner prerequisite: Node.js 20+
6
+
7
+ ## Purpose
8
+
9
+ RunKit Contract v0.1 defines the smallest reusable execution contract proven while developing OwlCoda inside Codex. It coordinates project-owned truth, bounded workers, delivery evidence, stage verification, invalidation and replacement without relying on chat history or agent memory.
10
+
11
+ This is a control and evidence contract. It is not an OwlCoda product API, a workflow designer, a memory system or a release system.
12
+
13
+ ## Frozen principles
14
+
15
+ 1. **Project-owned truth** — goals, packets, profiles, receipts and decisions live as project artifacts. Agent memory may help locate them but is never authoritative.
16
+ 2. **One owner per write scope** — every work item has an explicit lease and owned paths. Parallelism is allowed only across non-overlapping scopes.
17
+ 3. **Complete a phase before stage verification** — implementation lanes may batch a coherent phase and stop at `ready_for_stage_verification`; the stage gate runs once after all dependencies are fresh.
18
+ 4. **Evidence travels with delivery** — a delivery packet records scoped whole-file hashes, canonical fingerprint, commands already run and repository actions. The controller verifies hashes instead of repeating covered commands.
19
+ 5. **Stale evidence fails before execution** — a scoped source mismatch returns `invalidated_by_concurrent_write`; verification commands must remain at zero until a fresh replacement packet is valid.
20
+ 6. **Uncovered change fails closed** — if no profile covers a changed path, the decision is `full_profile_required`, never an empty successful selection.
21
+ 7. **Lineage validity is not verification success** — a structurally valid receipt graph becomes accepted only when the active receipt binds the current source fingerprint, exact selected profiles and real command receipts.
22
+ 8. **Append-only replacement** — invalidated receipts remain immutable. A replacement references the parent receipt SHA-256 and becomes the only active leaf.
23
+ 9. **Foreign projects remain project-owned** — read-only shadow runs may read another repository but must write all runner artifacts and scratch outside that repository and prove its start/end state is unchanged.
24
+ 10. **Runtime truth beats transcript appearance** — gate decisions consume files, hashes, exit codes and receipts, not worker summaries.
25
+
26
+ ### Additive clarifications
27
+
28
+ These rules narrow unsafe or ambiguous inputs without changing the frozen v0.1 semantics:
29
+
30
+ 1. **Runtime state is never product source** — `.owlcoda/runkit` and every descendant are reserved. They are forbidden in delivery `changedFiles`, verification profile path rules and lease owned paths. A violation is `invalid_input` / exit `3`, never a source change or profile match.
31
+ 2. **One execution pins one engine** — execution creation records `contractVersion`, `coreVersion`, `coreManifestSha256` and an immutable or content-addressed `coreSourceRef`. Every later core invocation compares this pin before acting. A mismatch fails closed as `engine_changed_during_execution` / exit `2`; it cannot silently mix implementations inside one lineage.
32
+ 3. **Core and producer data are separate** — acceptance semantics consume the contract version, pinned core identity and core payload. Producer identity is provenance. Adapter-specific extensions are namespaced and cannot add authority or change acceptance.
33
+ 4. **Configuration is data, not authority** — project configuration, profiles and command declarations never authorize Git, publish, deploy, destructive actions, credential use or foreign-project writes.
34
+
35
+ ## Artifact chain
36
+
37
+ ```text
38
+ GoalContract
39
+ -> ExecutionPlan
40
+ -> WorkItem + WorkerLease
41
+ -> ExecutionDeliveryPacket
42
+ -> VerificationProfile selection
43
+ -> Stage VerificationReceipt
44
+ -> GateDecision
45
+ -> CloseoutReceipt
46
+ ```
47
+
48
+ `events.jsonl` is the append-only transition ledger. `execution-plan.json` is a derived mutable snapshot and must not override contradictory events or receipts.
49
+
50
+ ## Delivery source contract
51
+
52
+ An `ExecutionDeliveryPacket` contains exactly one source hash map:
53
+
54
+ - `changedFiles.files`, or
55
+ - `changedFiles.wholeFileSha256`.
56
+
57
+ Both shapes present is malformed. Paths must be safe repository-relative paths: no absolute path, Windows rooted or drive-relative path, backslash, NUL, empty segment, `.` or `..`. Selected sources must be regular files inside the physical workspace root; symlinks and root escapes are rejected. The reserved `.owlcoda/runkit` subtree is rejected even though it is otherwise repository-relative, preventing receipts from recursively changing the fingerprint they describe.
58
+
59
+ Canonical stream:
60
+
61
+ ```text
62
+ <path><TAB>sha256:<lowercase-whole-file-sha256><LF>
63
+ ```
64
+
65
+ Rows are ordered by ascending Unicode code units, independent of locale and ICU. The source fingerprint is SHA-256 of the UTF-8 bytes of the canonical stream.
66
+
67
+ Source gate results and process exit codes:
68
+
69
+ - `valid` — exit `0`
70
+ - `invalidated_by_concurrent_write` — exit `2`
71
+ - `malformed_packet` — exit `3`
72
+
73
+ ## Verification profile contract
74
+
75
+ A profile has a stable `id` and path rules. v0.1 supports only:
76
+
77
+ - exact safe repository-relative path;
78
+ - safe non-empty `directory/**` prefix.
79
+
80
+ For legal inputs the resolver returns deterministic, de-duplicated profile IDs. Any uncovered changed path returns:
81
+
82
+ ```json
83
+ {
84
+ "decision": "full_profile_required",
85
+ "profileIds": [],
86
+ "uncoveredPaths": ["..."]
87
+ }
88
+ ```
89
+
90
+ Unsafe input is `invalid_input` / exit `3`; it is not converted into a profile decision. Profiles may not name `.owlcoda/runkit`, `.owlcoda/runkit/**` or a descendant exact path.
91
+
92
+ ## Receipt lineage contract
93
+
94
+ Each lineage entry contains:
95
+
96
+ - a 64-hex `receiptSha256` matching canonical receipt content;
97
+ - a receipt object;
98
+ - optional 64-hex `parentReceiptSha256` referencing an earlier invalidated receipt.
99
+
100
+ Receipt SHA values are globally unique. The lineage rejects malformed entries, hash mismatch, missing or non-prior parent, parent with the wrong state, cycles, branches and multiple active leaves.
101
+
102
+ Lineage CLI exit codes:
103
+
104
+ - structurally valid — exit `0`
105
+ - well-formed but invalid — exit `2`
106
+ - malformed input — exit `3`
107
+
108
+ ## Joint verification gate
109
+
110
+ The active receipt must bind:
111
+
112
+ - a current source gate with `status=valid` and exit `0`;
113
+ - the exact recomputed source fingerprint;
114
+ - the exact targeted profile IDs;
115
+ - a valid single-leaf receipt lineage.
116
+
117
+ For `status=passed`, `commandRuns` must be greater than zero and equal the number of command receipts. Every command receipt requires a non-empty command, exit `0`, and SHA-256 for stdout and stderr.
118
+
119
+ A zero-command receipt may remain `shadow_validated` or `ready_for_verification`, but it cannot be accepted as passed.
120
+
121
+ ## Stage verification economy
122
+
123
+ - Implementation lanes complete a coherent phase before testing when the round contract selects stage verification.
124
+ - A stage owner consumes all fresh packets and runs one declared top-level profile.
125
+ - The controller validates the packet and receipt hashes and does not repeat covered commands.
126
+ - A failed stage is classified before repair. Only the affected stage is rerun after a replacement packet; unrelated profiles remain valid.
127
+ - Full regression belongs at an integration, merge or release boundary, not every feature delivery.
128
+
129
+ ## Foreign-project read-only mode
130
+
131
+ Before and after the stage, record at minimum:
132
+
133
+ - foreign HEAD;
134
+ - raw Git status bytes and SHA-256;
135
+ - a declared workspace manifest fingerprint appropriate to the project;
136
+ - selected file hashes.
137
+
138
+ All foreign build scratch and receipts must be redirected to the controller project's artifact directory. Any start/end mismatch is `foreign_workspace_changed_during_shadow`, even when the verifier itself passed.
139
+
140
+ ## Provenance
141
+
142
+ - Run001 proved leases, receipt-first handoff, targeted repair and controller economy.
143
+ - Run002 proved a packaged provider-backed synthetic coding loop and restart recovery.
144
+ - Run003 proved stale packet invalidation, minimal affected profile selection and append-only replacement.
145
+ - Run004 proved the contract against the foreign Swift/macOS OwlOps project with one stage command, one focused Swift verifier and zero foreign repository writes.
146
+
147
+ The exact evidence hashes are recorded in the Run004 manifest and closeout receipt.
148
+
149
+ ## Versioning rule
150
+
151
+ The semantics above are frozen as v0.1. New optional fields are allowed when they do not weaken these invariants. Any change to path grammar, canonicalization, exit meanings, invalidation timing, receipt parentage, acceptance evidence or foreign-write policy requires a new contract version.
152
+
153
+ ## Not yet included
154
+
155
+ - reusable npm package or global installation;
156
+ - Codex plugin or skill distribution;
157
+ - remote worker transport;
158
+ - UI/workflow designer;
159
+ - cloud/team memory;
160
+ - automatic commit, publish or deployment authority.