@hassangameryt/freeflow 0.5.0 → 0.7.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 (301) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.codex-plugin/plugin.json +4 -5
  4. package/README.md +141 -163
  5. package/capabilities/cognitive-routing/SKILL.md +387 -0
  6. package/capabilities/context-virtualization/SKILL.md +103 -0
  7. package/capabilities/conversation-history/SKILL.md +53 -0
  8. package/command-surface.json +6 -37
  9. package/hooks/freeflow-runtime-context.mjs +50 -541
  10. package/hooks/hooks.json +1 -26
  11. package/hooks/tests/check-runtime-context-hook.sh +114 -308
  12. package/package.json +27 -17
  13. package/pi-extension/dist/cognitive-routing/commands.js +96 -0
  14. package/pi-extension/dist/cognitive-routing/config.js +232 -0
  15. package/pi-extension/dist/cognitive-routing/controller.js +1292 -0
  16. package/pi-extension/dist/cognitive-routing/history.js +451 -0
  17. package/pi-extension/dist/cognitive-routing/host.js +188 -0
  18. package/pi-extension/dist/cognitive-routing/pi-routing-session.js +414 -0
  19. package/pi-extension/dist/cognitive-routing/pi-session-control.js +320 -0
  20. package/pi-extension/dist/cognitive-routing/runtime.js +43 -0
  21. package/pi-extension/dist/cognitive-routing/tool.js +212 -0
  22. package/pi-extension/dist/cognitive-routing/types.js +6 -0
  23. package/pi-extension/dist/context-virtualization/commands.js +89 -0
  24. package/pi-extension/dist/context-virtualization/projector.js +42 -0
  25. package/pi-extension/dist/context-virtualization/runtime.js +356 -0
  26. package/pi-extension/dist/context-virtualization/state.js +57 -0
  27. package/pi-extension/dist/context-virtualization/types.js +10 -0
  28. package/pi-extension/dist/conversation-history/passages.js +66 -0
  29. package/pi-extension/dist/conversation-history/ranking.js +105 -0
  30. package/pi-extension/dist/conversation-history/runtime.js +226 -0
  31. package/pi-extension/dist/conversation-history/search.js +56 -0
  32. package/pi-extension/dist/conversation-history/types.js +1 -0
  33. package/pi-extension/dist/freeflow-context/resolver.js +120 -0
  34. package/pi-extension/dist/freeflow-context/runtime.js +80 -0
  35. package/pi-extension/dist/freeflow-context/source-projector.js +95 -0
  36. package/pi-extension/dist/freeflow-context/tool.js +308 -0
  37. package/pi-extension/dist/freeflow-context/types.js +12 -0
  38. package/pi-extension/dist/freeflow-context/visibility.js +28 -0
  39. package/pi-extension/dist/index.js +564 -129
  40. package/pi-extension/dist/runtime/runtime-context.js +357 -470
  41. package/pi-extension/dist/runtime/runtime-identity.js +5 -0
  42. package/pi-extension/dist/settings/settings-tui.js +78 -0
  43. package/pi-extension/dist/settings/settings-ui.js +572 -826
  44. package/pi-extension/dist/ui/text-component.js +57 -0
  45. package/pi-extension/src/cognitive-routing/commands.ts +129 -0
  46. package/pi-extension/src/cognitive-routing/config.ts +303 -0
  47. package/pi-extension/src/cognitive-routing/controller.ts +1628 -0
  48. package/pi-extension/src/cognitive-routing/history.ts +650 -0
  49. package/pi-extension/src/cognitive-routing/host.ts +266 -0
  50. package/pi-extension/src/cognitive-routing/pi-routing-session.ts +538 -0
  51. package/pi-extension/src/cognitive-routing/pi-session-control.ts +444 -0
  52. package/pi-extension/src/cognitive-routing/runtime.ts +57 -0
  53. package/pi-extension/src/cognitive-routing/tool.ts +273 -0
  54. package/pi-extension/src/cognitive-routing/types.ts +89 -0
  55. package/pi-extension/src/context-virtualization/commands.ts +111 -0
  56. package/pi-extension/src/context-virtualization/projector.ts +62 -0
  57. package/pi-extension/src/context-virtualization/runtime.ts +406 -0
  58. package/pi-extension/src/context-virtualization/state.ts +79 -0
  59. package/pi-extension/src/context-virtualization/types.ts +92 -0
  60. package/pi-extension/src/conversation-history/passages.ts +81 -0
  61. package/pi-extension/src/conversation-history/ranking.ts +155 -0
  62. package/pi-extension/src/conversation-history/runtime.ts +250 -0
  63. package/pi-extension/src/conversation-history/search.ts +79 -0
  64. package/pi-extension/src/conversation-history/types.ts +31 -0
  65. package/pi-extension/src/freeflow-context/resolver.ts +139 -0
  66. package/pi-extension/src/freeflow-context/runtime.ts +100 -0
  67. package/pi-extension/src/freeflow-context/source-projector.ts +106 -0
  68. package/pi-extension/src/freeflow-context/tool.ts +360 -0
  69. package/pi-extension/src/freeflow-context/types.ts +70 -0
  70. package/pi-extension/src/freeflow-context/visibility.ts +53 -0
  71. package/pi-extension/src/index.ts +597 -135
  72. package/pi-extension/src/runtime/runtime-context.ts +373 -491
  73. package/pi-extension/src/runtime/runtime-identity.ts +8 -0
  74. package/pi-extension/src/settings/settings-tui.ts +93 -0
  75. package/pi-extension/src/settings/settings-ui.ts +679 -910
  76. package/pi-extension/src/ui/text-component.ts +66 -0
  77. package/pi-extension/tests/cognitive-routing/commands.test.js +134 -0
  78. package/pi-extension/tests/cognitive-routing/controller.test.js +1128 -0
  79. package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +1142 -0
  80. package/pi-extension/tests/cognitive-routing/history.test.js +274 -0
  81. package/pi-extension/tests/cognitive-routing/host-fixture.js +4 -0
  82. package/pi-extension/tests/cognitive-routing/host-identity.test.js +63 -0
  83. package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +434 -0
  84. package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +174 -0
  85. package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +91 -0
  86. package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +279 -0
  87. package/pi-extension/tests/cognitive-routing/tool.test.js +230 -0
  88. package/pi-extension/tests/context-virtualization/extension.test.js +749 -0
  89. package/pi-extension/tests/context-virtualization/projector.test.js +110 -0
  90. package/pi-extension/tests/context-virtualization/runtime.test.js +216 -0
  91. package/pi-extension/tests/conversation-history/runtime.test.js +98 -0
  92. package/pi-extension/tests/conversation-history/search.test.js +97 -0
  93. package/pi-extension/tests/integration/mode-free-core.test.js +218 -0
  94. package/pi-extension/tests/integration/pi-extension.test.js +532 -3701
  95. package/pi-extension/tests/integration/prompt-architecture.test.js +350 -0
  96. package/pi-extension/tests/integration/unaffected-regressions.test.js +411 -0
  97. package/runtime/prompts/cognitive-routing.md +10 -0
  98. package/runtime/prompts/context-virtualization.md +3 -0
  99. package/runtime/prompts/conversation-history.md +3 -0
  100. package/runtime/prompts/core.md +84 -0
  101. package/runtime/prompts/interaction-contract.md +11 -0
  102. package/skills/action-selection/SKILL.md +140 -0
  103. package/skills/action-selection/references/trajectory-stalls.md +71 -0
  104. package/skills/bypass/SKILL.md +109 -38
  105. package/skills/commit-work/SKILL.md +94 -55
  106. package/skills/commit-work/references/git-state-edges.md +94 -0
  107. package/skills/commit-work/references/simple-push.md +92 -0
  108. package/skills/commit-work/references/staging-decisions.md +79 -46
  109. package/skills/decision-gate/SKILL.md +80 -22
  110. package/skills/design-for-depth/SKILL.md +206 -60
  111. package/skills/design-for-depth/references/design-pressure-signals.md +108 -240
  112. package/skills/design-for-depth/references/interface-design-loop.md +77 -97
  113. package/skills/design-for-depth/references/module-and-dependency-design.md +147 -0
  114. package/skills/design-for-depth/references/software-design-philosophy.md +128 -174
  115. package/skills/design-for-depth/references/state-and-failure-boundaries.md +136 -0
  116. package/skills/diagnose-failure/SKILL.md +200 -48
  117. package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +18 -6
  118. package/skills/diagnose-failure/references/{flaky-and-performance.md → flaky-and-performance-diagnosis.md} +13 -5
  119. package/skills/discuss/SKILL.md +119 -65
  120. package/skills/discuss/references/discussion-continuity.md +123 -0
  121. package/skills/evaluate-skill/SKILL.md +166 -52
  122. package/skills/evaluate-skill/references/{definition-schema.md → evaluation-definition-schema.md} +43 -3
  123. package/skills/evaluate-skill/references/evaluation-design.md +56 -30
  124. package/skills/evaluate-skill/references/execution-and-evidence.md +8 -3
  125. package/skills/evaluate-skill/references/review-and-revision.md +62 -21
  126. package/skills/evaluate-skill/scripts/lib/definitions.mjs +114 -3
  127. package/skills/evaluate-skill/scripts/lib/grade-interaction.mjs +156 -1
  128. package/skills/evaluate-skill/scripts/lib/grade.mjs +9 -1
  129. package/skills/evaluate-skill/scripts/lib/pi.mjs +147 -32
  130. package/skills/evaluate-skill/scripts/lib/rpc.mjs +4 -4
  131. package/skills/evaluate-skill/scripts/lib/runner.mjs +36 -14
  132. package/skills/evaluate-skill/scripts/lib/sandbox.mjs +92 -0
  133. package/skills/evaluate-skill/scripts/pi-guard.mjs +1 -1
  134. package/skills/evaluate-skill/scripts/pi-observer.mjs +66 -0
  135. package/skills/evaluate-skill/scripts/skill-eval.mjs +6 -5
  136. package/skills/execute-work/SKILL.md +99 -57
  137. package/skills/execute-work/references/code-practices.md +4 -4
  138. package/skills/execute-work/references/execute-work-edges.md +62 -0
  139. package/skills/finish-branch/SKILL.md +2 -2
  140. package/skills/finish-branch/references/integration-options.md +1 -1
  141. package/skills/handoff/SKILL.md +3 -3
  142. package/skills/launch-work/SKILL.md +1 -1
  143. package/skills/launch-work/references/launch-readiness.md +2 -2
  144. package/skills/migration-work/SKILL.md +2 -2
  145. package/skills/migration-work/references/migration-lifecycle.md +1 -1
  146. package/skills/release-work/SKILL.md +1 -1
  147. package/skills/release-work/references/release-evidence.md +1 -1
  148. package/skills/review-artifact/SKILL.md +129 -66
  149. package/skills/review-artifact/references/adjudicate-artifact-review.md +101 -0
  150. package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +159 -0
  151. package/skills/review-work/SKILL.md +113 -68
  152. package/skills/review-work/references/adjudicate-work-review.md +97 -0
  153. package/skills/review-work/references/independent-work-reviewer-contract.md +139 -0
  154. package/skills/review-work/references/security-risk-lens.md +18 -16
  155. package/skills/setup-freeflow/SKILL.md +16 -17
  156. package/skills/setup-freeflow/references/activation-contract.md +24 -30
  157. package/skills/setup-freeflow/references/host-setup.md +6 -7
  158. package/skills/simplify-code/SKILL.md +97 -39
  159. package/skills/simplify-code/references/simplification-patterns.md +1 -1
  160. package/skills/tdd/SKILL.md +100 -53
  161. package/skills/tdd/references/test-design.md +3 -3
  162. package/skills/track-work/SKILL.md +195 -58
  163. package/skills/track-work/references/working-record-format.md +515 -0
  164. package/skills/track-work/scripts/lib/document.mjs +713 -0
  165. package/skills/track-work/scripts/lib/format.mjs +166 -0
  166. package/skills/track-work/scripts/lib/store.mjs +233 -0
  167. package/skills/track-work/scripts/lib/transitions.mjs +790 -0
  168. package/skills/track-work/scripts/lib/views.mjs +40 -0
  169. package/skills/track-work/scripts/working-record.mjs +316 -0
  170. package/skills/verify-work/SKILL.md +57 -19
  171. package/skills/verify-work/references/browser-runtime-evidence.md +2 -2
  172. package/skills/verify-work/references/integration-evidence.md +1 -7
  173. package/skills/verify-work/references/performance-evidence.md +2 -2
  174. package/skills/workflow/SKILL.md +137 -55
  175. package/skills/workflow/references/domain-skill-composition.md +26 -40
  176. package/skills/write-plan/SKILL.md +1 -1
  177. package/skills/write-skill/SKILL.md +218 -61
  178. package/skills/write-skill/references/activation-boundaries.md +63 -21
  179. package/skills/write-skill/references/agent-first-instructions.md +61 -27
  180. package/skills/write-skill/references/progressive-disclosure.md +97 -33
  181. package/skills/write-skill/references/skill-dependency-graphs.md +190 -0
  182. package/capabilities/output-router/SKILL.md +0 -206
  183. package/capabilities/output-router/references/safety-policy.md +0 -40
  184. package/capabilities/output-router/references/setup.md +0 -110
  185. package/pi-extension/dist/output-router/host-producer-identification.js +0 -232
  186. package/pi-extension/dist/output-router/native-safety-net.js +0 -216
  187. package/pi-extension/dist/output-router/observed-tool-routing.js +0 -122
  188. package/pi-extension/dist/output-router/renderers.js +0 -1023
  189. package/pi-extension/dist/output-router/router-tools.js +0 -554
  190. package/pi-extension/dist/output-router/schemas.js +0 -383
  191. package/pi-extension/dist/output-router/status.js +0 -744
  192. package/pi-extension/dist/output-router/utils.js +0 -502
  193. package/pi-extension/src/output-router/host-producer-identification.ts +0 -256
  194. package/pi-extension/src/output-router/native-safety-net.ts +0 -248
  195. package/pi-extension/src/output-router/observed-tool-routing.ts +0 -134
  196. package/pi-extension/src/output-router/renderers.ts +0 -1108
  197. package/pi-extension/src/output-router/router-tools.ts +0 -579
  198. package/pi-extension/src/output-router/schemas.ts +0 -387
  199. package/pi-extension/src/output-router/status.ts +0 -791
  200. package/pi-extension/src/output-router/utils.ts +0 -554
  201. package/pi-extension/tests/output-router/observed-producers.test.js +0 -132
  202. package/pi-extension/tests/output-router/search.test.js +0 -722
  203. package/router/dist/benchmarks/benchmark-harness.d.ts +0 -35
  204. package/router/dist/benchmarks/benchmark-harness.js +0 -92
  205. package/router/dist/benchmarks/benchmarks.d.ts +0 -109
  206. package/router/dist/benchmarks/benchmarks.js +0 -979
  207. package/router/dist/benchmarks/codex-qa-benchmarks.d.ts +0 -95
  208. package/router/dist/benchmarks/codex-qa-benchmarks.js +0 -500
  209. package/router/dist/benchmarks/command-benchmarks.d.ts +0 -143
  210. package/router/dist/benchmarks/command-benchmarks.js +0 -698
  211. package/router/dist/benchmarks/context-mode-normalized-benchmarks.d.ts +0 -82
  212. package/router/dist/benchmarks/context-mode-normalized-benchmarks.js +0 -773
  213. package/router/dist/benchmarks/context-mode-real-deep-benchmark.d.ts +0 -132
  214. package/router/dist/benchmarks/context-mode-real-deep-benchmark.js +0 -1380
  215. package/router/dist/benchmarks/context-saving-baseline.d.ts +0 -60
  216. package/router/dist/benchmarks/context-saving-baseline.js +0 -470
  217. package/router/dist/benchmarks/index-benchmarks.d.ts +0 -103
  218. package/router/dist/benchmarks/index-benchmarks.js +0 -862
  219. package/router/dist/benchmarks/storage-policy-benchmarks.d.ts +0 -101
  220. package/router/dist/benchmarks/storage-policy-benchmarks.js +0 -618
  221. package/router/dist/benchmarks/vault-index-benchmarks.d.ts +0 -56
  222. package/router/dist/benchmarks/vault-index-benchmarks.js +0 -322
  223. package/router/dist/config/config.d.ts +0 -103
  224. package/router/dist/config/config.js +0 -632
  225. package/router/dist/config/router-contract.d.ts +0 -10
  226. package/router/dist/config/router-contract.js +0 -54
  227. package/router/dist/config/schema.d.ts +0 -27
  228. package/router/dist/config/schema.js +0 -648
  229. package/router/dist/config/types.d.ts +0 -573
  230. package/router/dist/config/types.js +0 -41
  231. package/router/dist/evidence/bounded-evidence.d.ts +0 -40
  232. package/router/dist/evidence/bounded-evidence.js +0 -323
  233. package/router/dist/evidence/evidence-range-selector.d.ts +0 -24
  234. package/router/dist/evidence/evidence-range-selector.js +0 -232
  235. package/router/dist/evidence/evidence-search.d.ts +0 -27
  236. package/router/dist/evidence/evidence-search.js +0 -490
  237. package/router/dist/evidence/evidence.d.ts +0 -38
  238. package/router/dist/evidence/evidence.js +0 -200
  239. package/router/dist/evidence/failure-contracts.d.ts +0 -37
  240. package/router/dist/evidence/failure-contracts.js +0 -166
  241. package/router/dist/evidence/line-ranges.d.ts +0 -24
  242. package/router/dist/evidence/line-ranges.js +0 -22
  243. package/router/dist/experiments/local-index.d.ts +0 -64
  244. package/router/dist/experiments/local-index.js +0 -581
  245. package/router/dist/index.d.ts +0 -30
  246. package/router/dist/index.js +0 -32
  247. package/router/dist/local/local-traversal.d.ts +0 -18
  248. package/router/dist/local/local-traversal.js +0 -334
  249. package/router/dist/processing/engine.d.ts +0 -132
  250. package/router/dist/processing/engine.js +0 -533
  251. package/router/dist/processing/reducers.d.ts +0 -280
  252. package/router/dist/processing/reducers.js +0 -1673
  253. package/router/dist/processing/renderers.d.ts +0 -31
  254. package/router/dist/processing/renderers.js +0 -195
  255. package/router/dist/processing/scripts.d.ts +0 -91
  256. package/router/dist/processing/scripts.js +0 -386
  257. package/router/dist/repo/repo-traversal.d.ts +0 -18
  258. package/router/dist/repo/repo-traversal.js +0 -245
  259. package/router/dist/routing/observed-reducers.d.ts +0 -41
  260. package/router/dist/routing/observed-reducers.js +0 -661
  261. package/router/dist/routing/observed-routing.d.ts +0 -26
  262. package/router/dist/routing/observed-routing.js +0 -378
  263. package/router/dist/routing/parsers.d.ts +0 -16
  264. package/router/dist/routing/parsers.js +0 -521
  265. package/router/dist/routing/run-filters.d.ts +0 -60
  266. package/router/dist/routing/run-filters.js +0 -238
  267. package/router/dist/routing/run-reducers.d.ts +0 -49
  268. package/router/dist/routing/run-reducers.js +0 -122
  269. package/router/dist/sandbox/adapter-roots.d.ts +0 -46
  270. package/router/dist/sandbox/adapter-roots.js +0 -66
  271. package/router/dist/sandbox/eryx-python-adapter.d.ts +0 -13
  272. package/router/dist/sandbox/eryx-python-adapter.js +0 -868
  273. package/router/dist/sandbox/jq-wasm-adapter.d.ts +0 -9
  274. package/router/dist/sandbox/jq-wasm-adapter.js +0 -429
  275. package/router/dist/sandbox/quickjs-wasi-adapter.d.ts +0 -13
  276. package/router/dist/sandbox/quickjs-wasi-adapter.js +0 -384
  277. package/router/dist/sandbox/script-sandbox.d.ts +0 -134
  278. package/router/dist/sandbox/script-sandbox.js +0 -337
  279. package/router/dist/setup/script-transform-adapters.d.ts +0 -32
  280. package/router/dist/setup/script-transform-adapters.js +0 -278
  281. package/router/dist/tools/batch.d.ts +0 -33
  282. package/router/dist/tools/batch.js +0 -586
  283. package/router/dist/tools/run.d.ts +0 -62
  284. package/router/dist/tools/run.js +0 -1304
  285. package/router/dist/tools/search.d.ts +0 -66
  286. package/router/dist/tools/search.js +0 -1364
  287. package/router/dist/transform/engine.d.ts +0 -168
  288. package/router/dist/transform/engine.js +0 -2072
  289. package/router/dist/vault/vault-index.d.ts +0 -125
  290. package/router/dist/vault/vault-index.js +0 -416
  291. package/router/dist/vault/vault.d.ts +0 -138
  292. package/router/dist/vault/vault.js +0 -630
  293. package/runtime/interaction-contract.md +0 -16
  294. package/skills/discuss/references/checkpoints.md +0 -66
  295. package/skills/execute-work/references/execution-loop.md +0 -77
  296. package/skills/mode-contract/SKILL.md +0 -104
  297. package/skills/review-artifact/references/reviewer-prompt.md +0 -148
  298. package/skills/review-work/references/reviewer-prompt.md +0 -134
  299. package/skills/track-work/references/working-record-schema.md +0 -378
  300. package/skills/workflow/references/workflow-loop.md +0 -92
  301. /package/skills/handoff/references/{templates.md → handoff-templates.md} +0 -0
@@ -1,126 +1,171 @@
1
1
  ---
2
2
  name: review-work
3
- description: Use when reviewing implementation or integrated work, whether reviewing work you produced or acting as an independent reviewer.
3
+ description: Use when judging implementation or integrated work through self-review or independent review, or when adjudicating a returned independent review report.
4
4
  ---
5
5
 
6
6
  # Review Work
7
7
 
8
- Judge whether work is correct, suitable, and sufficiently evidenced for its intended boundary.
8
+ Judge whether implementation or integrated work is correct, suitable, and sufficiently evidenced for a named boundary.
9
9
 
10
- Review provides judgment. [Verify Work](../verify-work/SKILL.md) establishes what direct evidence proves. Review may challenge whether that evidence is sufficient, but it does not replace verification or authorize changes.
10
+ Review provides judgment. [Verify Work](../../skills/verify-work/SKILL.md) establishes what direct evidence proves. Review may find that evidence insufficient, but it does not replace verification or authorize changes.
11
11
 
12
- ## Choose The Review Role
12
+ ## Select One Route
13
13
 
14
- Choose the role before reviewing:
14
+ Choose the route before reviewing:
15
15
 
16
- - **Self-review:** you produced the work. Inspect it silently using the relevant boundary and lenses below. Correct clear local issues within existing authority and re-verify. Create no formal review items, judgment, number, or cycle. Return unresolved material issues to [Workflow](../workflow/SKILL.md).
17
- - **Independent review:** you did not produce the reviewed state. Inspect and report without editing. Use the formal item, judgment, and report method below. The receiving active agent adjudicates and routes the result.
16
+ - **Self-review:** you produced the reviewed state.
17
+ - **Independent review:** you did not produce the reviewed state and are reviewing from a separate context.
18
+ - **Adjudication:** an independent reviewer returned a report and you are deciding what its findings establish and what follows.
18
19
 
19
- Reading this skill does not create independence. If you produced the work, do not present your own judgment as independent review. Read [the reviewer prompt](references/reviewer-prompt.md) when preparing or performing a separately selected independent review.
20
+ Self-review and independent review use the same review kernel below. Adjudication consumes a completed review; it is not another review.
21
+
22
+ Do not cross roles inside an independent reviewer context. The independent reviewer reports and stops. The receiving agent may then enter adjudication.
20
23
 
21
24
  ## Establish The Boundary
22
25
 
23
- Understand:
26
+ Identify only what the judgment needs:
24
27
 
25
- - the accepted outcome, requirements, and non-goals;
26
- - the implementation, diff, or integrated work product;
28
+ - the future action or boundary the review protects;
29
+ - the exact implementation, diff, commit, or integrated state;
30
+ - accepted outcome, requirements, and non-goals;
27
31
  - relevant Specs, Plans, tests, policies, ADRs, and established behavior;
28
32
  - verification evidence and known gaps;
29
- - risks and interactions material to the future action this review protects.
33
+ - risks and interactions capable of changing whether the boundary may be crossed.
34
+
35
+ Inspect the reviewed state and source truth directly. Do not judge only the producer's summary, reasoning, or claimed result.
36
+
37
+ Before reviewing changes to trust boundaries, authentication, authorization, permissions, untrusted input, secrets, sensitive data, security-relevant dependencies, code execution, or security-sensitive failure behavior, read the [Security Risk Lens](references/security-risk-lens.md).
30
38
 
31
- Inspect the work and source truth directly, not only the author's summary, reasoning, or claimed result. Read [the security risk lens](references/security-risk-lens.md) when the work changes a security-relevant boundary.
39
+ When inspection could branch broadly among several useful observers, use [Action Selection](../../skills/action-selection/SKILL.md). Skip it for an obvious diff, file, test, or source-truth read.
32
40
 
33
- ## Review Proportionately
41
+ ## Apply The Shared Review Kernel
34
42
 
35
- Apply only lenses that can materially change the result:
43
+ Use only lenses capable of changing the boundary judgment:
36
44
 
37
45
  - **Alignment and correctness:** accepted behavior is implemented without invention or omission.
38
46
  - **Regression and integration:** affected callers, states, and components remain correct together.
39
- - **Failure and risk:** relevant errors, recovery, permissions, data, and compatibility behave safely.
40
- - **Evidence:** verification supports the claims and exercised the required boundary.
47
+ - **Failure and risk:** material errors, recovery, permissions, data, and compatibility behave safely.
48
+ - **Evidence:** verification supports the claims at the required observing boundary.
41
49
  - **Design and minimality:** complexity and coordination are justified by requirements or observed failures.
42
- - **Maintainability:** the work can be understood and changed without hidden policy or fragile coupling.
50
+ - **Maintainability:** behavior remains understandable and changeable without hidden policy or fragile coupling.
51
+
52
+ Review the resulting state, not the producer's intention. Use a high evidence bar, not a high item count. Finding no material issue is valid.
53
+
54
+ ### Classify Before Calling Something An Issue
55
+
56
+ Ask in order:
57
+
58
+ 1. **Is the required behavior or source truth settled?**
59
+ - No: **Question**.
60
+ 2. **Are reachability and material consequence supported?**
61
+ - No: **Needs evidence**.
62
+ 3. **Does the reviewed boundary require correction?**
63
+ - Yes, and the boundary cannot be crossed safely: **Blocking Issue**.
64
+ - Yes, but correction can be deferred safely: **Non-blocking Issue**.
65
+ 4. **Would the change merely be useful beyond this boundary?**
66
+ - Omit it by default.
67
+ - Use **Improvement** only when materially relevant or explicitly requested.
68
+
69
+ A material **Needs evidence** observation must name the claim, required observing boundary, available evidence and its limit, why the gap affects judgment, and the smallest evidence that could disagree.
70
+
71
+ Do not turn preferences, imagined edge cases, intentional deferrals, or hypothetical completeness into Issues.
72
+
73
+ An Issue must identify:
74
+
75
+ - the exact location or affected path;
76
+ - the violated requirement, source truth, or invariant;
77
+ - supporting evidence;
78
+ - the concrete consequence for the reviewed boundary.
43
79
 
44
- A pass is valid. Do not invent items, report preferences or hypothetical completeness, reopen intentional deferrals, or treat ordinary reversible choices as issues.
80
+ For a Blocking Issue, state why the boundary cannot safely be crossed. Describe correction constraints or the owning activity to re-enter. Recommend a specific correction only when it is directly supported rather than one of several material alternatives.
45
81
 
46
- A possible edge case is not an Issue merely because it can be imagined:
82
+ ## Self-Review
47
83
 
48
- ```text
49
- Required failure path is missing -> Issue
50
- Unsettled expected behavior -> Question
51
- Plausible concern without reachability or consequence evidence -> Needs evidence
52
- Useful resilience outside this boundary -> Improvement or omit
53
- Repeated related corrections -> diagnose the shared cause
54
- ```
84
+ Apply the complete shared kernel to your own work. Self-review uses the same technical scrutiny as independent review but does not create independence.
55
85
 
56
- ## Classify Independent Review Items
86
+ When evidence supports a clear local defect and existing authority covers its correction:
57
87
 
58
- - **Blocking Issue:** a supported defect, regression, omission, or risk that must be resolved before crossing the reviewed boundary.
59
- - **Non-blocking Issue:** a real issue that can be deferred safely for this boundary.
60
- - **Question:** material intent, requirements, or an owner decision is unclear.
61
- - **Needs evidence:** a plausible concern cannot be established from available evidence.
62
- - **Improvement:** a materially useful enhancement not required by this boundary. It does not affect judgment or authorize implementation.
88
+ 1. return to the producing activity;
89
+ 2. correct the defect;
90
+ 3. re-verify the affected boundary;
91
+ 4. repeat only the affected review lenses once.
63
92
 
64
- A Blocking Issue must name the exact location, violated requirement or source truth, evidence, concrete boundary consequence, and smallest safe correction or owning activity to re-enter.
93
+ Do not create formal review items, a judgment, a review number, or a review cycle for self-review. Do not label it independent.
65
94
 
66
- Use the most consequential applicable judgment:
95
+ Return unresolved material issues to [Workflow](../../skills/workflow/SKILL.md). Use [Diagnose Failure](../../skills/diagnose-failure/SKILL.md) when the cause is unclear or correction repeats. Use [Decision Gate](../../skills/decision-gate/SKILL.md) when accepted behavior or a user-owned choice is unsettled.
67
96
 
68
- 1. **Blocking:** one or more Blocking Issues exist.
97
+ ## Independent Review
98
+
99
+ Before preparing or performing a separately selected independent review, read the [Independent Work Reviewer Contract](references/independent-work-reviewer-contract.md).
100
+
101
+ Use supplied and already available evidence. Do not start a missing active check unless the review authority explicitly covers that exact check. Otherwise report **Needs evidence** with the claim and required observing boundary. When an exact check is covered, apply Verify Work's check-result and claim-result semantics; the review still owns the fitness judgment.
102
+
103
+ Inspect and report without editing. Do not:
104
+
105
+ - adjudicate your own findings;
106
+ - select among materially different remedies;
107
+ - perform corrections;
108
+ - dispatch another review;
109
+ - continue merely to obtain Pass.
110
+
111
+ The independent review ends with its report.
112
+
113
+ Independent judgments are:
114
+
115
+ 1. **Blocking:** at least one Blocking Issue exists.
69
116
  2. **Inconclusive:** no Blocking Issue exists, but a material Question or Needs evidence item prevents judgment.
70
117
  3. **Non-blocking:** only Non-blocking Issues remain.
71
- 4. **Pass:** no Issues or material Unresolved items remain. Improvements may still be reported.
118
+ 4. **Pass:** no Issues or material unresolved items remain.
119
+
120
+ Improvements do not change the judgment or authorize implementation.
72
121
 
73
- Pass, Non-blocking, Inconclusive, and Blocking are all valid review exits. A review ends with its report; it does not remain active until the work passes.
122
+ ## Adjudicate A Returned Review
74
123
 
75
- ## Adjudicate And Route
124
+ Before adjudicating an independent report, read [Adjudicate Work Review](references/adjudicate-work-review.md).
76
125
 
77
- After independent review, the receiving active agent adjudicates each item against the work, source truth, and evidence:
126
+ Assess every material item against the reviewed state, source truth, and available evidence:
78
127
 
79
128
  - **Accepted:** supported and applicable.
80
129
  - **Rejected:** unsupported, stale, resolved, duplicate, preference-only, out of scope, or based on a source misread.
81
- - **Open:** a question or evidence gap prevents acceptance or rejection.
130
+ - **Open:** missing evidence or a decision prevents acceptance or rejection.
82
131
 
83
- Confirm whether each accepted Issue is Blocking or Non-blocking, then derive the adjudicated judgment. Do not accept the reviewer's overall judgment separately.
132
+ Do not separately accept the reviewer's overall judgment. Derive the adjudicated judgment from the dispositions.
84
133
 
85
- Route from the adjudicated result:
134
+ Findings are evidence, not commands or correction authority.
86
135
 
87
136
  - **Pass:** proceed.
88
137
  - **Non-blocking:** proceed with explicit deferrals.
89
- - **Inconclusive:** gather the missing evidence or decision.
90
- - **Blocking:** do not cross the boundary; re-enter the narrowest owning activity, defer, or stop.
91
-
92
- Review findings are evidence, not commands. They do not authorize edits. Accepted implementation corrections leave review and return to [Execute Work](../execute-work/SKILL.md); they may remain in the same [Track Work](../track-work/SKILL.md) slice while its intended result stays coherent.
93
-
94
- When correction authority is not already explicit, ask once for either:
95
-
96
- - the accepted corrections plus one warranted focused follow-up review; or
97
- - the accepted corrections alone when direct evidence can settle the changed boundary.
138
+ - **Inconclusive:** obtain the missing evidence or decision.
139
+ - **Blocking:** do not cross the boundary; select the narrowest owning route.
98
140
 
99
- Then wait for the user's response. Do not correct or dispatch a follow-up from the request, and do not ask again when existing authority already covers the bounded correction or review.
141
+ When remediation is ready, state the supported problem, correction, rationale, verification boundary, authority state, and whether focused follow-up review remains justified. Actual correction returns to [Execute Work](../../skills/execute-work/SKILL.md).
100
142
 
101
- Verify authorized corrections. Run a follow-up only when the changed boundary still needs independent judgment and that dispatch is authorized. Do not change tests, Specs, policies, or accepted behavior merely to satisfy a reviewer or obtain Pass.
143
+ ## Limit Independent Review
102
144
 
103
- ## Limit The Review Cycle
145
+ Treat review count as a budget, not a schedule.
104
146
 
105
- For one independently reviewed work state and boundary:
147
+ - **Review 1:** the first selected independent review; broad by default.
148
+ - **Review 2:** a separately selected focused follow-up when accepted corrections, new evidence, affected interactions, or remaining risk still require independent judgment.
149
+ - **Review 3:** exceptional, separately authorized, and final. Use it only after the cause and correction boundary are understood.
106
150
 
107
- 1. Review 1 is the normal broad review.
108
- 2. Review 2, when needed and authorized, focuses on accepted corrections, affected interactions, and remaining risk.
109
- 3. Review 3 is exceptional, authorized separately, and final for that cycle.
151
+ A review report always ends its review. Remediation does not automatically authorize or require follow-up review.
110
152
 
111
- The budget is a cap, not dispatch authority. Do not request Review 4. At the cap, adjudicate and return control to Workflow; the work may proceed, remain blocked, re-enter another owner, defer, or stop.
153
+ If Review 2 remains Blocking:
112
154
 
113
- After Review 2 is adjudicated Blocking, stop before proposing another correction or Review 3. Classify its relationship to the prior correction:
155
+ - diagnose when the blocker repeats, extends, invalidates, or exposes another consequence of prior correction, or when its cause remains uncertain;
156
+ - return an independent clear local defect to its owner when diagnosis would add no useful understanding;
157
+ - do not automatically correct and dispatch Review 3.
114
158
 
115
- - If the blocker repeats, extends, invalidates, or exposes another consequence of the prior correction, or its cause remains unsupported, read [Diagnose Failure](../diagnose-failure/SKILL.md) and diagnose the shared cause before another patch.
116
- - If it is an independent clear local defect with a supported cause, return directly to its owning activity and state why diagnosis is unnecessary.
159
+ Do not request Review 4. A different reviewer, local correction, or renamed scope does not reset the budget. Workflow may establish a new cycle only for a materially new reviewed state and boundary.
117
160
 
118
- A reviewer judgment alone does not trigger diagnosis; active-agent adjudication and evidence do. Review 3 is final judgment after the cause and correction boundary are understood, not a third attempt to discover the cause through patches. Workflow may later establish a new cycle only for a materially new reviewed state and boundary; local fixes, a different reviewer, or renamed scope do not reset it.
161
+ Self-review does not consume this budget.
119
162
 
120
- ## Report
163
+ ## Stop
121
164
 
122
- For self-review, report no formal review result. Correct clear local issues and surface only unresolved material issues that change the route.
165
+ Stop when the selected route has produced its bounded result:
123
166
 
124
- For independent review, use the structured output in [the reviewer prompt](references/reviewer-prompt.md). The receiving agent reports the reviewer and adjudicated judgments, each material item's Accepted, Rejected, or Open outcome and reason, remaining open items, and authorized or proposed next route.
167
+ - self-review: the supported state is accepted or a material issue is routed;
168
+ - independent review: the report is complete;
169
+ - adjudication: material items are disposed and the next route is explicit.
125
170
 
126
- Omit empty groups. Support material judgments and adjudication with source or evidence rather than confidence.
171
+ Do not review until Pass, use review to authorize correction, or turn optional improvement into unfinished work.
@@ -0,0 +1,97 @@
1
+ # Adjudicate Work Review
2
+
3
+ Read this after an independent work review returns and before selecting what follows from its report.
4
+
5
+ Adjudication belongs to the receiving active agent. It tests the report against the reviewed state, source truth, and evidence. It is not independent review and does not inherit the reviewer's authority or judgment.
6
+
7
+ ## Dispose Each Material Item
8
+
9
+ For every material item, choose one disposition.
10
+
11
+ ### Accepted
12
+
13
+ State:
14
+
15
+ - the supported implementation problem;
16
+ - its consequence for the reviewed boundary;
17
+ - whether it is Blocking or Non-blocking;
18
+ - whether its cause is supported, unnecessary to select a clear local correction, or uncertain.
19
+
20
+ ### Rejected
21
+
22
+ State the concrete reason: unsupported, stale, resolved, duplicate, preference-only, out of scope, or based on a source misread.
23
+
24
+ ### Open
25
+
26
+ State:
27
+
28
+ - the unresolved concern;
29
+ - its potential boundary consequence;
30
+ - the missing evidence or owner decision.
31
+
32
+ When factual evidence is missing, restate the item as a Verify Work input: claim, required observing boundary, available evidence and its limit, and the smallest evidence that could disagree.
33
+
34
+ A suggested correction may help explain a finding, but it does not establish cause, select the remedy, or authorize implementation.
35
+
36
+ After disposing the items, derive the adjudicated judgment. Do not separately accept the reviewer's overall judgment.
37
+
38
+ - **Pass:** no accepted Issues or material Open items remain.
39
+ - **Non-blocking:** only accepted Non-blocking Issues remain.
40
+ - **Inconclusive:** a material Open item prevents judgment.
41
+ - **Blocking:** at least one accepted Blocking Issue remains.
42
+
43
+ ## Use Verification Results
44
+
45
+ Route a known material evidence gap through [Workflow](../../../skills/workflow/SKILL.md) to [Verify Work](../../../skills/verify-work/SKILL.md). Verification produces factual evidence; it does not revise the reviewer's report or determine the review judgment.
46
+
47
+ - **Supported:** re-adjudicate the evidence gap. Do not infer Pass.
48
+ - **Contradicted:** re-adjudicate against source truth; the result may establish an Issue, invalidate one, or expose a source conflict.
49
+ - **Inconclusive:** keep the item Open. The adjudicated review remains Inconclusive when the gap is material.
50
+ - **Unavailable:** keep the item Open and state why the required boundary cannot currently be observed.
51
+
52
+ Select focused independent follow-up only when the new evidence still requires judgment from a separate context.
53
+
54
+ ## Decide Whether Remediation Is Ready
55
+
56
+ Remediation is ready when:
57
+
58
+ - required behavior is settled;
59
+ - the problem and boundary consequence are supported;
60
+ - enough cause or decision basis exists to bound a correction;
61
+ - affected interactions and dependencies are known sufficiently;
62
+ - no material alternative or user-owned choice remains.
63
+
64
+ When remediation is ready, state:
65
+
66
+ - the proposed correction and rationale;
67
+ - affected behavior and locations;
68
+ - required ordering or constraints;
69
+ - regression evidence and verification boundary;
70
+ - whether focused independent follow-up remains justified;
71
+ - the authority state.
72
+
73
+ Use existing correction authority only when it covers that result. Otherwise propose the correction and any warranted follow-up once, then wait. A finding, adjudication, or selected review does not authorize mutation.
74
+
75
+ Actual correction returns to [Execute Work](../../../skills/execute-work/SKILL.md). Preserve the accepted behavior; do not change tests, Specs, policies, or source truth merely to satisfy a reviewer or obtain Pass.
76
+
77
+ ## Route When Remediation Is Not Ready
78
+
79
+ - unclear or repeated cause: [Diagnose Failure](../../../skills/diagnose-failure/SKILL.md);
80
+ - unsettled direction or materially different remedies: [Discuss](../../../skills/discuss/SKILL.md);
81
+ - user-owned choice or source conflict: [Decision Gate](../../../skills/decision-gate/SKILL.md);
82
+ - missing factual support: route the named claim through [Workflow](../../../skills/workflow/SKILL.md) to [Verify Work](../../../skills/verify-work/SKILL.md);
83
+ - uncovered correction: propose the bounded correction and wait.
84
+
85
+ When findings interact, assumptions are challenged, or user input could change the remedy, report a problem checkpoint and stop before selecting or executing a correction.
86
+
87
+ ## After Authorized Correction
88
+
89
+ Verify the affected boundary and perform ordinary self-review.
90
+
91
+ Select focused independent follow-up only when accepted corrections, affected interactions, new evidence, or remaining risk still require judgment from a separate context. Do not dispatch follow-up merely because Review 1 found an Issue or because remediation occurred.
92
+
93
+ If Review 2 remains Blocking, adjudicate it before acting again. Diagnose a repeated, extending, invalidating, or causally uncertain blocker. Return an independent clear local defect to its owner when diagnosis would add no useful understanding. Review 3 remains exceptional, separately authorized, and final.
94
+
95
+ ## Stop
96
+
97
+ Stop when every material item is Accepted, Rejected, or Open; the adjudicated judgment is supported; and the next route and authority state are explicit.
@@ -0,0 +1,139 @@
1
+ # Independent Work Reviewer Contract
2
+
3
+ Read this before preparing or performing a separately selected independent review of implementation or integrated work.
4
+
5
+ The reviewer did not produce the reviewed state. Give them the work product, source truth, and evidence needed to judge it directly. Do not provide only the producer's summary, reasoning, or claimed result.
6
+
7
+ ## Required Context
8
+
9
+ Provide:
10
+
11
+ - the work and future action covered by the review;
12
+ - accepted outcome, requirements, and non-goals;
13
+ - relevant Specs, Plans, tests, policies, ADRs, and established behavior;
14
+ - the implementation, changed files, or diff range;
15
+ - verification evidence and known gaps;
16
+ - only the review lenses material to this boundary;
17
+ - active evidence authority: none, or each exact covered check with its expected evidence and stop condition;
18
+ - review number and, for follow-up, prior items, adjudication, corrections, and new evidence.
19
+
20
+ When state transitions or proof integrity matter, also provide the invariant or state owner, affecting paths, observing mechanism, forbidden mutations, prior-state requirements, adversarial disproof, mutation footprint, and fidelity limits.
21
+
22
+ ## Reviewer Prompt
23
+
24
+ ```md
25
+ # Independent Work Review
26
+
27
+ Review work you did not produce. Inspect the supplied work, source truth, and evidence directly. Report without editing. The review ends with this report; do not adjudicate findings, fix items, dispatch follow-up, or continue merely to obtain Pass.
28
+
29
+ A pass is valid. Use a high evidence bar, not a high item count. Do not broaden scope or treat possible improvement as unfinished work.
30
+
31
+ Use supplied and already available evidence. Do not start a missing active check unless the review contract explicitly authorizes that exact check. Otherwise report **Needs evidence** with the claim and required observing boundary. When an exact check is covered, apply Verify Work's check-result and claim-result semantics; active evidence does not authorize editing or broaden the review.
32
+
33
+ ## Boundary
34
+
35
+ - Protected future action: [boundary]
36
+ - Reviewed state: [commit, tree, diff, or other exact identity]
37
+ - Work: [diff range, changed files, implementation, or integrated result]
38
+
39
+ ## Accepted Outcome And Non-Goals
40
+
41
+ - Outcome: [required result]
42
+ - Requirements: [accepted requirements]
43
+ - Non-goals: [intentional exclusions]
44
+
45
+ ## Source Truth
46
+
47
+ - [Specs, Plans, tests, policies, ADRs, and established behavior]
48
+
49
+ ## Verification Evidence
50
+
51
+ - Checks and results: [commands, observations, and results]
52
+ - Known gaps: [gaps or none]
53
+ - When relevant: [state owner, affecting paths, observer, forbidden mutations, prior-state requirements, adversarial disproof, mutation footprint, fidelity limits]
54
+
55
+ ## Review Scope
56
+
57
+ - Review number: [1 | 2 | 3]
58
+ - Material lenses: [alignment and correctness | regression and integration | failure and risk | evidence | design and minimality | maintainability]
59
+ - Active evidence authority: [none | exact covered check, expected evidence, and stop condition]
60
+
61
+ For Review 2 or 3:
62
+
63
+ - Prior items and adjudication: [Accepted | Rejected | Open]
64
+ - Clarifications: [settled decisions or none]
65
+ - Corrections and new evidence: [changes and verification]
66
+ - Remaining risk: [narrow unresolved scope]
67
+
68
+ ## Check
69
+
70
+ Apply only the selected lenses:
71
+
72
+ - accepted behavior is implemented without invention or omission;
73
+ - affected callers, states, and components remain correct together;
74
+ - material failure paths and risks are handled safely;
75
+ - verification supports the claims at the required boundary;
76
+ - complexity and coordination are justified;
77
+ - the work remains understandable without hidden policy or fragile coupling.
78
+
79
+ Do not search for unrelated issues. Report an out-of-scope issue only when it materially affects whether this boundary may be crossed.
80
+
81
+ Before calling something an Issue, ask:
82
+
83
+ 1. Is required behavior or source truth settled? If not, use **Question**.
84
+ 2. Are reachability and material consequence supported? If not, use **Needs evidence**.
85
+ 3. Does the boundary require correction? Use **Blocking Issue** when it cannot be crossed safely, otherwise **Non-blocking Issue** when correction can be deferred safely.
86
+ 4. Is the change merely useful beyond this boundary? Omit it by default; use **Improvement** only when materially relevant or requested.
87
+
88
+ A **Needs evidence** item must identify the claim, required observing boundary, available evidence and its limit, why the gap affects judgment, and the smallest evidence that could disagree.
89
+
90
+ A Blocking Issue must identify the exact location, violated requirement or source truth, evidence, concrete boundary consequence, and correction constraints or owning activity to re-enter. Recommend a specific correction only when directly supported.
91
+
92
+ For Review 2 or 3, inspect only accepted corrections, affected interactions, new evidence, and remaining risk. Do not reopen Rejected items without contradictory evidence. For each new Blocking Issue, state whether it repeats, extends, invalidates, or exposes another consequence of a prior correction; is independent; or cannot yet be related from the evidence. Report a related pattern rather than proposing another patch. Review 3 is final; do not recommend Review 4.
93
+
94
+ ## Determine The Judgment
95
+
96
+ 1. **Blocking:** at least one Blocking Issue exists.
97
+ 2. **Inconclusive:** no Blocking Issue exists, but a material Question or Needs evidence item prevents judgment.
98
+ 3. **Non-blocking:** only Non-blocking Issues remain.
99
+ 4. **Pass:** no Issues or material unresolved items remain.
100
+
101
+ Improvements do not change the judgment.
102
+
103
+ ## Output
104
+
105
+ Omit empty groups. Do not include Improvements unless they are materially relevant or explicitly requested.
106
+
107
+ Review type: independent
108
+ Review number: [1 | 2 | 3]
109
+ Boundary: [reviewed work and protected future action]
110
+ Reviewed state: [state identity]
111
+ Judgment: Pass | Non-blocking | Inconclusive | Blocking
112
+ Reasoning: [concise evidence-backed judgment]
113
+ Relationship to prior items (Review 2 or 3 only): [related consequence | independent defect | unclear, with evidence]
114
+
115
+ ### Review Items
116
+
117
+ #### Issues — Blocking
118
+ - [location, issue, violated source, evidence, consequence, correction constraints or owning activity]
119
+
120
+ #### Issues — Non-blocking
121
+ - [location, issue, evidence, why it can be deferred]
122
+
123
+ #### Unresolved — Questions
124
+ - [question, effect on judgment, required answer]
125
+
126
+ #### Unresolved — Needs evidence
127
+ - [claim, required observing boundary, available evidence and limit, why the gap affects judgment, smallest evidence that could disagree]
128
+
129
+ #### Improvements
130
+ - [only when materially relevant or requested: improvement, benefit, evidence]
131
+
132
+ Evidence gaps: [unproved claims or none]
133
+ ```
134
+
135
+ ## Calibration
136
+
137
+ Lead with the few items that can change the boundary judgment. Prior review, urgency, implementation effort, or producer confidence does not establish correctness.
138
+
139
+ The report is evidence for adjudication. It is not authority over source truth, owner decisions, corrections, or another independent dispatch. Pass, Non-blocking, Inconclusive, and Blocking are all valid exits.
@@ -1,8 +1,8 @@
1
1
  # Security Risk Lens
2
2
 
3
- Read this when work changes trust boundaries, authentication, authorization, permissions, untrusted input, secrets, sensitive data, dependencies, external integrations, execution, or failure behavior with security consequences.
3
+ Read this before reviewing work that changes trust boundaries, authentication, authorization, permissions, untrusted input, secrets, sensitive data, security-relevant dependencies or external integrations, code-execution boundaries, or failure behavior with security consequences.
4
4
 
5
- This lens helps frame review. It does not replace repo security policy, threat modeling, specialist review, or stack-specific hardening guidance.
5
+ This lens helps frame review. It does not replace repository security policy, threat modeling, specialist review, or stack-specific hardening guidance.
6
6
 
7
7
  ## Establish Authority
8
8
 
@@ -11,10 +11,10 @@ Identify:
11
11
  - assets and data requiring protection;
12
12
  - actors, roles, tenants, and privilege levels;
13
13
  - trust boundaries and external systems;
14
- - accepted security/privacy policy and threat model;
14
+ - accepted security and privacy policy and threat model;
15
15
  - compatibility and failure behavior that security controls must preserve.
16
16
 
17
- Security-sensitive product behavior remains user-owned. Do not invent access, retention, logging, or fail-open/closed policy during review.
17
+ Security-sensitive product behavior remains user-owned. Do not invent access, retention, logging, or fail-open or fail-closed policy during review.
18
18
 
19
19
  ## Trace The Paths
20
20
 
@@ -28,40 +28,42 @@ Review the affected path from boundary to effect:
28
28
  - secrets: source, scope, rotation, exposure, and logging;
29
29
  - execution: shell, file, URL, template, deserialization, plugin, or code-loading boundaries;
30
30
  - dependencies: provenance, permissions, known risk, update impact, and transitive behavior;
31
- - failure: partial state, retries, lockout, rate limits, rollback, and fail-open/closed behavior.
31
+ - failure: partial state, retries, lockout, rate limits, rollback, and fail-open or fail-closed behavior.
32
32
 
33
33
  Look for confused-deputy and cross-tenant paths, not only malformed input.
34
34
 
35
- ## Evidence
35
+ ## Require Boundary-Matched Evidence
36
36
 
37
37
  Prefer evidence at the real boundary:
38
38
 
39
- - tests proving allowed and denied roles/resources;
39
+ - tests proving allowed and denied roles and resources;
40
40
  - negative input and injection cases;
41
41
  - dependency or configuration inspection tied to the shipped artifact;
42
- - logs or traces demonstrating no secret/sensitive leakage;
42
+ - logs or traces demonstrating no secret or sensitive leakage;
43
43
  - failure-path tests for partial authorization, retry, and recovery;
44
44
  - specialist analysis for cryptography, sandboxing, identity protocols, or high-impact threats.
45
45
 
46
46
  A generic scanner pass cannot prove authorization logic or policy correctness. A unit test cannot prove deployed headers, identity configuration, or infrastructure permissions.
47
47
 
48
- Do not copy secrets, credentials, unrestricted personal data, or sensitive payloads into review context. Use the smallest sanitized evidence that supports the review item.
48
+ Do not copy secrets, credentials, unrestricted personal data, or sensitive payloads into review context. Use the smallest sanitized evidence that supports the item.
49
49
 
50
- ## Review Item Calibration
50
+ ## Calibrate Items
51
51
 
52
52
  Treat supported exploitable behavior, policy violation, unintended privilege or data exposure, unsafe failure semantics, secret leakage, or a missing required control as an Issue.
53
53
 
54
- Classify the Issue against the accepted security policy and reviewed boundary:
54
+ Classify it against accepted security policy and the reviewed boundary:
55
55
 
56
56
  - **Blocking:** crossing the boundary would remain unsafe, non-compliant, or contrary to a required control.
57
- - **Non-blocking:** the security issue is real but can be deferred safely without violating the accepted boundary.
57
+ - **Non-blocking:** the issue is real but can be deferred safely without violating the accepted boundary.
58
58
 
59
59
  Use **Question** when security behavior or accepted risk remains undecided. Use **Needs evidence** when a control may exist but the available test or environment cannot establish it.
60
60
 
61
- Treat materially useful defense-in-depth beyond the accepted boundary as an Improvement. Do not turn theoretical hardening, preference, or hypothetical completeness into an Issue.
61
+ Treat materially useful defense in depth beyond the accepted boundary as an Improvement. Omit theoretical hardening, preference, or hypothetical completeness.
62
62
 
63
- Do not omit an observed security issue merely because the selected lenses were narrower. Name the asset, path, precondition, consequence, evidence, and source requirement.
63
+ Do not omit an observed security issue because the selected lenses were narrower. Name the asset, path, precondition, consequence, evidence, and source requirement.
64
64
 
65
- ## Route
65
+ ## Return Through The Selected Role
66
66
 
67
- When security evidence changes the path, use [Workflow](../../workflow/SKILL.md) to choose what follows. Use [Diagnose Failure](../../diagnose-failure/SKILL.md) for unknown exploitability or root cause, [Decision Gate](../../decision-gate/SKILL.md) for missing policy or accepted-risk decisions, [Design For Depth](../../design-for-depth/SKILL.md) when trust decisions spread across callers, and [Launch Work](../../launch-work/SKILL.md) when the concern affects production rollout.
67
+ For self-review, return a route-changing security concern to [Workflow](../../../skills/workflow/SKILL.md). Use [Diagnose Failure](../../../skills/diagnose-failure/SKILL.md) for unknown exploitability or cause, [Decision Gate](../../../skills/decision-gate/SKILL.md) for missing policy or accepted-risk decisions, [Design For Depth](../../../skills/design-for-depth/SKILL.md) when trust decisions spread across callers, and [Launch Work](../../../skills/launch-work/SKILL.md) when the concern affects production rollout.
68
+
69
+ For independent review, classify the concern in the review report and stop. Do not route, correct, or dispatch follow-up. The receiving agent adjudicates the report and selects what follows.