@codyswann/lisa 8.6.0 → 8.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 (221) hide show
  1. package/all/copy-overwrite/scripts/lib/completion-authorization.mjs +3 -3
  2. package/all/copy-overwrite/scripts/lib/completion-proof-publisher.mjs +2 -1
  3. package/all/copy-overwrite/scripts/lib/completion-proof-shape.mjs +21 -1
  4. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +3 -3
  5. package/dist/controls/attest-check.d.ts.map +1 -1
  6. package/dist/controls/attest-check.js +31 -18
  7. package/dist/controls/attest-check.js.map +1 -1
  8. package/dist/controls/attest-record.d.ts +3 -0
  9. package/dist/controls/attest-record.d.ts.map +1 -1
  10. package/dist/controls/attest-record.js +28 -5
  11. package/dist/controls/attest-record.js.map +1 -1
  12. package/dist/controls/checks-binding.d.ts.map +1 -1
  13. package/dist/controls/checks-binding.js +28 -1
  14. package/dist/controls/checks-binding.js.map +1 -1
  15. package/dist/controls/commands/attest-host-proof.d.ts +18 -0
  16. package/dist/controls/commands/attest-host-proof.d.ts.map +1 -0
  17. package/dist/controls/commands/attest-host-proof.js +168 -0
  18. package/dist/controls/commands/attest-host-proof.js.map +1 -0
  19. package/dist/controls/commands/attest-options.d.ts +4 -0
  20. package/dist/controls/commands/attest-options.d.ts.map +1 -1
  21. package/dist/controls/commands/attest.d.ts.map +1 -1
  22. package/dist/controls/commands/attest.js +52 -0
  23. package/dist/controls/commands/attest.js.map +1 -1
  24. package/dist/controls/commands/declaration-check.d.ts.map +1 -1
  25. package/dist/controls/commands/declaration-check.js +19 -5
  26. package/dist/controls/commands/declaration-check.js.map +1 -1
  27. package/dist/controls/commands/register.d.ts.map +1 -1
  28. package/dist/controls/commands/register.js +4 -1
  29. package/dist/controls/commands/register.js.map +1 -1
  30. package/dist/controls/evidence-document.d.ts.map +1 -1
  31. package/dist/controls/evidence-document.js +12 -0
  32. package/dist/controls/evidence-document.js.map +1 -1
  33. package/dist/controls/evidence-gather.d.ts +1 -0
  34. package/dist/controls/evidence-gather.d.ts.map +1 -1
  35. package/dist/controls/evidence-gather.js +5 -2
  36. package/dist/controls/evidence-gather.js.map +1 -1
  37. package/dist/controls/evidence-types.d.ts +19 -1
  38. package/dist/controls/evidence-types.d.ts.map +1 -1
  39. package/dist/controls/evidence-types.js +11 -0
  40. package/dist/controls/evidence-types.js.map +1 -1
  41. package/dist/controls/evidence-write.d.ts.map +1 -1
  42. package/dist/controls/evidence-write.js +7 -1
  43. package/dist/controls/evidence-write.js.map +1 -1
  44. package/dist/controls/exercise-declaration.d.ts +58 -0
  45. package/dist/controls/exercise-declaration.d.ts.map +1 -0
  46. package/dist/controls/exercise-declaration.js +138 -0
  47. package/dist/controls/exercise-declaration.js.map +1 -0
  48. package/dist/controls/exercise-observations.d.ts +32 -0
  49. package/dist/controls/exercise-observations.d.ts.map +1 -0
  50. package/dist/controls/exercise-observations.js +141 -0
  51. package/dist/controls/exercise-observations.js.map +1 -0
  52. package/dist/controls/exercise-record-shape.d.ts +10 -0
  53. package/dist/controls/exercise-record-shape.d.ts.map +1 -0
  54. package/dist/controls/exercise-record-shape.js +29 -0
  55. package/dist/controls/exercise-record-shape.js.map +1 -0
  56. package/dist/controls/exercise-records.d.ts +28 -0
  57. package/dist/controls/exercise-records.d.ts.map +1 -0
  58. package/dist/controls/exercise-records.js +113 -0
  59. package/dist/controls/exercise-records.js.map +1 -0
  60. package/dist/controls/exercise-result.d.ts +23 -0
  61. package/dist/controls/exercise-result.d.ts.map +1 -0
  62. package/dist/controls/exercise-result.js +186 -0
  63. package/dist/controls/exercise-result.js.map +1 -0
  64. package/dist/controls/host-proof-input.d.ts +53 -0
  65. package/dist/controls/host-proof-input.d.ts.map +1 -0
  66. package/dist/controls/host-proof-input.js +129 -0
  67. package/dist/controls/host-proof-input.js.map +1 -0
  68. package/dist/controls/host-proof-receipt.d.ts +47 -0
  69. package/dist/controls/host-proof-receipt.d.ts.map +1 -0
  70. package/dist/controls/host-proof-receipt.js +132 -0
  71. package/dist/controls/host-proof-receipt.js.map +1 -0
  72. package/dist/controls/host-proof-register.d.ts +37 -0
  73. package/dist/controls/host-proof-register.d.ts.map +1 -0
  74. package/dist/controls/host-proof-register.js +153 -0
  75. package/dist/controls/host-proof-register.js.map +1 -0
  76. package/dist/controls/host-proof-signature.d.ts +30 -0
  77. package/dist/controls/host-proof-signature.d.ts.map +1 -0
  78. package/dist/controls/host-proof-signature.js +49 -0
  79. package/dist/controls/host-proof-signature.js.map +1 -0
  80. package/dist/controls/host-proof-trust.d.ts +33 -0
  81. package/dist/controls/host-proof-trust.d.ts.map +1 -0
  82. package/dist/controls/host-proof-trust.js +124 -0
  83. package/dist/controls/host-proof-trust.js.map +1 -0
  84. package/dist/controls/pull-request-executor.d.ts +18 -6
  85. package/dist/controls/pull-request-executor.d.ts.map +1 -1
  86. package/dist/controls/pull-request-executor.js +19 -24
  87. package/dist/controls/pull-request-executor.js.map +1 -1
  88. package/dist/controls/register-types.d.ts +3 -4
  89. package/dist/controls/register-types.d.ts.map +1 -1
  90. package/dist/controls/register-types.js +3 -4
  91. package/dist/controls/register-types.js.map +1 -1
  92. package/dist/controls/register.d.ts +4 -7
  93. package/dist/controls/register.d.ts.map +1 -1
  94. package/dist/controls/register.js +17 -6
  95. package/dist/controls/register.js.map +1 -1
  96. package/dist/controls/verdict-answers.d.ts.map +1 -1
  97. package/dist/controls/verdict-answers.js +6 -2
  98. package/dist/controls/verdict-answers.js.map +1 -1
  99. package/dist/controls/verdict-types.d.ts +1 -1
  100. package/dist/controls/verdict-types.d.ts.map +1 -1
  101. package/dist/controls/verdict-types.js +2 -0
  102. package/dist/controls/verdict-types.js.map +1 -1
  103. package/dist/controls/verdict-wording.d.ts +2 -0
  104. package/dist/controls/verdict-wording.d.ts.map +1 -1
  105. package/dist/controls/verdict-wording.js +7 -0
  106. package/dist/controls/verdict-wording.js.map +1 -1
  107. package/dist/controls/verdict.d.ts +2 -0
  108. package/dist/controls/verdict.d.ts.map +1 -1
  109. package/dist/controls/verdict.js +17 -2
  110. package/dist/controls/verdict.js.map +1 -1
  111. package/dist/core/lisa-owned-hash-ledger.json +14 -0
  112. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  113. package/dist/core/upstream-evidence-manifest.json +64 -9
  114. package/package.json +4 -4
  115. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  116. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  117. package/plugins/lisa/.codex-plugin/scripts/human-gate-act.mjs +50 -21
  118. package/plugins/lisa/.codex-plugin/skills/lisa-attest/SKILL.md +1 -1
  119. package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +3 -2
  120. package/plugins/lisa/.codex-plugin/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  121. package/plugins/lisa/.codex-plugin/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  122. package/plugins/lisa/.codex-plugin/skills/lisa-usage-accounting/references/estimate.md +5 -5
  123. package/plugins/lisa/scripts/human-gate-act.mjs +50 -21
  124. package/plugins/lisa/skills/lisa-attest/SKILL.md +1 -1
  125. package/plugins/lisa/skills/lisa-configure/SKILL.md +3 -2
  126. package/plugins/lisa/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  127. package/plugins/lisa/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  128. package/plugins/lisa/skills/lisa-usage-accounting/references/estimate.md +5 -5
  129. package/plugins/lisa-agy/plugin.json +1 -1
  130. package/plugins/lisa-agy/scripts/human-gate-act.mjs +50 -21
  131. package/plugins/lisa-agy/skills/lisa-attest/SKILL.md +1 -1
  132. package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +3 -2
  133. package/plugins/lisa-agy/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  134. package/plugins/lisa-agy/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  135. package/plugins/lisa-agy/skills/lisa-usage-accounting/references/estimate.md +5 -5
  136. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  137. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  138. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  139. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  140. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  141. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  142. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  143. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  144. package/plugins/lisa-copilot/scripts/human-gate-act.mjs +50 -21
  145. package/plugins/lisa-copilot/skills/lisa-attest/SKILL.md +1 -1
  146. package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +3 -2
  147. package/plugins/lisa-copilot/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  148. package/plugins/lisa-copilot/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  149. package/plugins/lisa-copilot/skills/lisa-usage-accounting/references/estimate.md +5 -5
  150. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  151. package/plugins/lisa-cursor/scripts/human-gate-act.mjs +50 -21
  152. package/plugins/lisa-cursor/skills/lisa-attest/SKILL.md +1 -1
  153. package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +3 -2
  154. package/plugins/lisa-cursor/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  155. package/plugins/lisa-cursor/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  156. package/plugins/lisa-cursor/skills/lisa-usage-accounting/references/estimate.md +5 -5
  157. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  158. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  159. package/plugins/lisa-devin/scripts/human-gate-act.mjs +50 -21
  160. package/plugins/lisa-devin/skills/lisa-attest/SKILL.md +1 -1
  161. package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +3 -2
  162. package/plugins/lisa-devin/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  163. package/plugins/lisa-devin/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  164. package/plugins/lisa-devin/skills/lisa-usage-accounting/references/estimate.md +5 -5
  165. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  166. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  167. package/plugins/lisa-expo-agy/plugin.json +1 -1
  168. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  169. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  170. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  171. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  172. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  173. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  174. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  175. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  176. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  177. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  178. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  179. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  180. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  181. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  182. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  183. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  184. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  185. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  186. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  187. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  188. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  189. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  190. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  191. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  192. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  193. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  194. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  195. package/plugins/lisa-rails-agy/plugin.json +1 -1
  196. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  197. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  198. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  199. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  200. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  201. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  202. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  203. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  204. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  205. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  206. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  207. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  208. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  209. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  210. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  211. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  212. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  213. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  214. package/plugins/src/base/scripts/human-gate-act.mjs +50 -21
  215. package/plugins/src/base/skills/lisa-attest/SKILL.md +1 -1
  216. package/plugins/src/base/skills/lisa-configure/SKILL.md +3 -2
  217. package/plugins/src/base/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  218. package/plugins/src/base/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  219. package/plugins/src/base/skills/lisa-usage-accounting/references/estimate.md +5 -5
  220. package/schemas/control-evidence.schema.json +39 -1
  221. package/schemas/control-verdict.schema.json +1 -0
@@ -116,6 +116,24 @@ function readConfig(file) {
116
116
  }
117
117
  }
118
118
 
119
+ /**
120
+ * Whether parsed JSON is an object that can hold configuration keys.
121
+ * @param {unknown} value - Parsed configuration value
122
+ * @returns {boolean} Whether the value is a config object
123
+ */
124
+ function isConfigObject(value) {
125
+ return value !== null && typeof value === "object" && !Array.isArray(value);
126
+ }
127
+
128
+ /**
129
+ * Read the raw block, preserving invalid declarations for the mode resolver.
130
+ * @param {unknown} config - Parsed config file
131
+ * @returns {unknown} Raw human-gate block
132
+ */
133
+ function humanGateBlock(config) {
134
+ return isConfigObject(config) ? config.humanGate : undefined;
135
+ }
136
+
119
137
  /**
120
138
  * The effective human-only classes: local override replaces global when set.
121
139
  * @param {unknown} local - Parsed local config
@@ -123,10 +141,10 @@ function readConfig(file) {
123
141
  * @returns {unknown[]} Declared classes
124
142
  */
125
143
  export function resolveHumanOnly(local, global) {
126
- const pick = config =>
127
- config && typeof config === "object"
128
- ? config.humanGate?.humanOnly
129
- : undefined;
144
+ const pick = config => {
145
+ const block = humanGateBlock(config);
146
+ return isConfigObject(block) ? block.humanOnly : undefined;
147
+ };
130
148
  const value = pick(local) ?? pick(global);
131
149
  return Array.isArray(value) ? value : [];
132
150
  }
@@ -142,27 +160,37 @@ export function resolveHumanOnly(local, global) {
142
160
  * as `rejected` (its JSON spelling) so the caller can report it.
143
161
  * @param {unknown} local - Parsed local config
144
162
  * @param {unknown} global - Parsed global config
145
- * @returns {{ mode: string, rejected?: string }} The mode in force
163
+ * @returns {{ mode: string, rejected?: string, rejectedBlock?: true }} The mode in force
146
164
  */
147
165
  export function resolveHumanGateMode(local, global) {
148
- const pick = config =>
149
- config && typeof config === "object" ? config.humanGate?.mode : undefined;
166
+ const pick = config => {
167
+ const block = humanGateBlock(config);
168
+ if (!isConfigObject(block))
169
+ return { value: block, mode: undefined, malformed: true };
170
+ return {
171
+ value: block.mode,
172
+ mode: normalizeHumanGateMode(block.mode),
173
+ malformed: false,
174
+ };
175
+ };
150
176
  // Every declaration is judged, so a typo in the committed file is reported
151
177
  // even while a valid local value is in force.
152
178
  const declared = [pick(local), pick(global)].filter(
153
- value => value !== undefined
179
+ entry => entry.value !== undefined
154
180
  );
155
- const valid = declared
156
- .map(normalizeHumanGateMode)
157
- .find(mode => HUMAN_GATE_MODES.includes(mode));
181
+ const valid = declared.find(entry => HUMAN_GATE_MODES.includes(entry.mode));
158
182
  const invalid = declared.find(
159
- value => !HUMAN_GATE_MODES.includes(normalizeHumanGateMode(value))
183
+ entry => !HUMAN_GATE_MODES.includes(entry.mode)
160
184
  );
161
185
  const mode =
162
- valid ?? (invalid === undefined ? DEFAULT_HUMAN_GATE_MODE : "strict");
186
+ valid?.mode ?? (invalid === undefined ? DEFAULT_HUMAN_GATE_MODE : "strict");
163
187
  return invalid === undefined
164
188
  ? { mode }
165
- : { mode, rejected: JSON.stringify(invalid) };
189
+ : {
190
+ mode,
191
+ rejected: JSON.stringify(invalid.value),
192
+ ...(invalid.malformed ? { rejectedBlock: true } : {}),
193
+ };
166
194
  }
167
195
 
168
196
  /**
@@ -170,23 +198,24 @@ export function resolveHumanGateMode(local, global) {
170
198
  * human-only classes, each resolved local-then-global.
171
199
  * @param {unknown} local - Parsed local config
172
200
  * @param {unknown} global - Parsed global config
173
- * @returns {{ mode: string, humanOnly: unknown[], rejected?: string }} Policy
201
+ * @returns {{ mode: string, humanOnly: unknown[], rejected?: string, rejectedBlock?: true }} Policy
174
202
  */
175
203
  export function resolveHumanGatePolicy(local, global) {
176
- const { mode, rejected } = resolveHumanGateMode(local, global);
177
204
  return {
178
- mode,
205
+ ...resolveHumanGateMode(local, global),
179
206
  humanOnly: resolveHumanOnly(local, global),
180
- ...(rejected === undefined ? {} : { rejected }),
181
207
  };
182
208
  }
183
209
 
184
210
  /**
185
211
  * The stderr line for an invalid `humanGate.mode`.
186
212
  * @param {string} rejected - JSON spelling of the declared value
213
+ * @param {boolean} rejectedBlock - Whether the whole block was invalid
187
214
  * @returns {string} One warning line
188
215
  */
189
- function invalidModeWarning(rejected) {
216
+ function invalidModeWarning(rejected, rejectedBlock) {
217
+ if (rejectedBlock)
218
+ return `Invalid humanGate: ${rejected} is not an object.\n`;
190
219
  const accepted = HUMAN_GATE_MODES.map(value => `"${value}"`).join(" | ");
191
220
  return `Invalid humanGate.mode: ${rejected} is not one of ${accepted}; ignored.\n`;
192
221
  }
@@ -250,12 +279,12 @@ export function main(argv, io = {}) {
250
279
  error(`${failed.error}\n`);
251
280
  return 2;
252
281
  }
253
- const { rejected, ...policy } = resolveHumanGatePolicy(
282
+ const { rejected, rejectedBlock, ...policy } = resolveHumanGatePolicy(
254
283
  local.value,
255
284
  global.value
256
285
  );
257
286
  if (rejected !== undefined) {
258
- error(invalidModeWarning(rejected));
287
+ error(invalidModeWarning(rejected, rejectedBlock === true));
259
288
  error(`humanGate.mode in force: "${policy.mode}".\n`);
260
289
  }
261
290
  if (command === "policy") {
@@ -351,7 +351,7 @@ verdict.
351
351
 
352
352
  | `rung` | Say it as |
353
353
  | --- | --- |
354
- | `exercised` | Proved: a bad change was really tried, and the check stopped it. |
354
+ | `exercised` | Proved by a real exercise. A check rejected a controlled violation, or a verified artifact exercise recorded its result. |
355
355
  | `observed` | Observed: a document was found where it should be, or a platform setting was read. Nothing was tried. |
356
356
  | `asserted` | A person's answer: someone answered the audit's question. Nothing was checked by code. |
357
357
 
@@ -189,7 +189,7 @@ Sort the findings:
189
189
  | `question` | **Still open.** Declare nothing for that requirement in that part. List it for the closing message. |
190
190
  | `missing` | Nothing to declare. The enforce step files a ticket for it. |
191
191
  | `unknown` or `not-applicable` | Nothing to declare. |
192
- | any state, for a requirement whose `kind` is `artifact` or `human-attested` | Nothing to declare here: it is a record or a person's word, not a check that can refuse a change. |
192
+ | any state, for a requirement whose `kind` is `artifact` or `human-attested` | Record the artifact or the person's evidence through audit. For AC5.5, AC6.4, AC7.2, and AC8.9, configure the required exercises before attest. See [Exercised artifacts](references/exercised-artifacts.md). |
193
193
 
194
194
  **What a person answered.** The report's `answers` list holds what people have answered. Each
195
195
  entry has the `id` of the question, the `question` as it was asked, and the `answer`. A question
@@ -325,7 +325,8 @@ lisa controls declaration-check
325
325
  ```
326
326
 
327
327
  - **Exit 0.** Lisa reproduced the shipped folder checks from the local task manifests and
328
- confirmed audit support for any parts declared from findings.
328
+ confirmed audit support for any parts declared from findings. It also checked the fields in the
329
+ exercise plan when the repository has one.
329
330
  - **Any other exit.** Each line printed is one problem, naming the gate and the part. A part that
330
331
  names a place the audit did not report, rests on a question nobody answered or on an answer
331
332
  about something else, or serves a requirement the audit still asks about is refused. Correct the
@@ -0,0 +1,55 @@
1
+ # Exercised artifacts
2
+
3
+ Record the required exercises in `.lisa/controls/exercises.json`. Use one environment per plan.
4
+ A scope is `.` for the whole repository or a folder from its root. Give every target its own id.
5
+ Include each authoritative gate and scope for AC5.5, and each applicable connection and execution
6
+ surface for AC6.4. For rollback and staff qualification, include every release path and role
7
+ that the audit identifies as applicable.
8
+
9
+ ```json
10
+ {
11
+ "schema_version": 1,
12
+ "environment": "production-representative",
13
+ "targets": [
14
+ { "id": "lint", "criterion": "AC5.5", "scope": ".", "producer": "gate-owner", "adjudicator": "independent-reviewer", "gate": "code-style", "moment": "pull-request" },
15
+ { "id": "registry-worker", "criterion": "AC6.4", "scope": "api", "producer": "connection-owner", "adjudicator": "independent-reviewer", "connection": "registry", "surface": "worker" },
16
+ { "id": "rollback", "criterion": "AC7.2", "scope": ".", "producer": "release-owner", "adjudicator": "independent-reviewer", "release_track": "production-representative" },
17
+ { "id": "release-qualification", "criterion": "AC8.9", "scope": ".", "producer": "staff-owner", "adjudicator": "independent-reviewer", "role": "release-operator", "minimum_shadow_seconds": 86400 }
18
+ ]
19
+ }
20
+ ```
21
+
22
+ Check the plan with `lisa controls declaration-check`, then commit it before collecting evidence.
23
+ Run `lisa controls attest` to get the current
24
+ `checks.digest` in `.lisa/controls/evidence.json`. Give the producer the current digest and scope
25
+ so the independent reviewer can link each result to that plan and those checks.
26
+
27
+ The externally administered `LISA_HOST_PROOF_TRUST_FILE` authorizes the reviewer for the exact
28
+ repository origin and environment. Keep it outside the checkout. Its JSON contains
29
+ `schema_version: 1`, `repository`, `environment`, and distinct `adjudicator` and `attestor`
30
+ objects with `id` and an Ed25519 `public_key` in PEM form. Each exercise's producer and reviewer
31
+ must also be distinct. The producer runs the exercise. The reviewer independently checks the
32
+ result, its scope and the source artifact before signing it.
33
+
34
+ Each signed body contains `schema_version: 1`, `repository`, `environment`, `checks_digest`,
35
+ `target_id`, `criterion`, `scope`, `producer`, `adjudicator`, `artifact`, `completed_at`, and
36
+ `outcome`. Set `artifact` to an object containing `sha256`, or an immutable `locator` in the
37
+ form `git:<full-object-id>:<path>`. Set `completed_at` and the other time fields to UTC with
38
+ milliseconds. These are the required outcome fields.
39
+
40
+ | Criterion | Outcome fields |
41
+ | --- | --- |
42
+ | AC5.5 Gate exercise | `gate`, `moment`, `violation_exit`, `violation_output`, and `clean_exit` when a clean companion is required. Use the authoritative moment. Capture the nonzero refusal and its declared failure text. |
43
+ | AC6.4 Credential paths | `connection`, `surface`, `principal`, and `identity_verified: true` after an identity check on that surface. Record the public principal name. Keep credential values out of the result and its source artifact. |
44
+ | AC7.2 Rollback | `release_track`, `incident`, `actor`, `finding`, `previous_generation`, `rolled_back_from`, `restored_generation`, `detected_at`, `rolled_back_at`, `verified_at`, and `recovery_verified: true`. Confirm the previous generation was restored and is serving. |
45
+ | AC8.9 Staff qualification | `role`, `actor`, `roster_sha256`, `shadow_started_at`, `shadow_completed_at`, `comparisons`, `shadow_agreed: true`, `adversarial_passed: true`, and `qualification: "qualified"`. Observe the planned shadow period and record both checks. |
46
+
47
+ Sign the compact canonical JSON of `{"purpose":"artifact-exercise","body":…}` using the authorized
48
+ reviewer's Ed25519 key. Canonical JSON sorts object keys by code unit at every depth and keeps array
49
+ order. Add the unpadded Base64url `signature` to the envelope. Put one envelope per target in an
50
+ array at `.lisa/controls/exercise-results.json`.
51
+
52
+ Run `lisa controls attest`, then `lisa controls attest --check`. Attest records exercised evidence
53
+ for a criterion after each applicable target has a current, verified result. The check authenticates
54
+ the signed results again and compares them with the saved evidence. When a target is missing or
55
+ unusable, the command names the evidence that remains due.
@@ -262,7 +262,7 @@ lisa controls register
262
262
  The command names the rules that read unproved, for example:
263
263
 
264
264
  ```text
265
- register: 2 entries read unproved: code-style@api, code-style@web. The pull-request check for them runs from .gitlab-ci.yml on gitlab, a file Lisa did not write, and .lisa/controls/evidence.json holds no record that both halves of their proof held yet. They stay unproved until the attest step records that both held.
265
+ register: 2 entries read unproved: code-style@api, code-style@web. The pull-request check for them runs from .gitlab-ci.yml on gitlab, a file Lisa did not write. Authenticating both halves of their proof in .lisa/controls/evidence.json requires a trusted, current receipt. They stay unproved until the attest step records that both held.
266
266
  ```
267
267
 
268
268
  Each of those entries now carries `"status": "unproved"` in `.lisa/controls/register.json`. That is
@@ -271,16 +271,40 @@ together in one change.
271
271
 
272
272
  ## How a rule stops being unproved
273
273
 
274
- Only one thing clears the mark: `.lisa/controls/evidence.json` holding a record of **both** halves
275
- of that entry's proof, the change that breaks the rule (`violation`) and the change that does not
276
- (`clean`), each saying the half held. A half that was run and did not hold leaves the mark in
277
- place. The attest step writes those records. When it has, `lisa controls register` writes the
278
- register again without the mark.
274
+ A trusted, current attest receipt clears the mark. It binds **both** held halves in
275
+ `.lisa/controls/evidence.json`, the deliberate violation (`violation`) and the accepted change
276
+ (`clean`), to the current check definitions. `lisa controls register --check` says when the status
277
+ is what differs. The same verification applies to host-authored workflows on GitHub.
278
+
279
+ The protected attest process needs `LISA_HOST_PROOF_TRUST_FILE` set to an absolute JSON file
280
+ outside the checkout. Set `schema_version` to `1`, `repository` to the checkout's exact
281
+ `remote.origin.url`, and `environment` to the environment the checks ran against. Give
282
+ `adjudicator` and `attestor` separate objects, each with `id` and an Ed25519 PEM `public_key`.
283
+ Keep the corresponding private keys under their distinct authorized roles.
284
+
285
+ The independent reviewer verifies both platform runs and their artifact hashes. Their signed
286
+ `host-proof-import` body has `schema_version: 1`, the common `subject`, distinct `producer` and
287
+ `adjudicator` ids, and the `clean` and `violation` runs. The `subject` names `repository`,
288
+ `environment`, `work_item`, `entry_id`, `platform`, `executor_path`, and `checks_digest`. Read
289
+ `checks.digest` from a fresh attest evidence document for the current check definitions.
290
+
291
+ Each run records `run_id`, `run_url`, `commit`, `artifact_sha256`, `started_at`, `completed_at`,
292
+ `exit_status`, and `output_excerpt`. Use immutable run ids, HTTPS run URLs without credentials or
293
+ query parameters, and UTC timestamps. The clean run must exit zero. The violating run must exit
294
+ nonzero and include the declared failure text. Sign the canonical JSON object containing `purpose`
295
+ and `body` with the adjudicator's Ed25519 key. Attach the unpadded Base64url `signature` to that
296
+ object. The protected attestor verifies this signature before issuing its own signed receipt.
279
297
 
280
- The register is generated from the declaration and the evidence file together. So after either one
281
- changes, `lisa controls register --check` fails until the register is written again, and it says
282
- when the status is what differs. The mark applies to host-written workflows on GitHub as well.
283
- Use the verdict to see what was proved.
298
+ ```bash
299
+ lisa controls attest --import-host-proof reviewed-pair.json --host-proof-signing-key /protected/attestor.pem
300
+ lisa controls register --check
301
+ lisa controls attest --check
302
+ ```
303
+
304
+ The import uses the protected key to write `.lisa/controls/host-proof-receipts.json` with the
305
+ exact records it wrote. Both check commands read the same trust file. Changed check definitions,
306
+ expired records, or an unverifiable receipt leave the hosted entry unproved. The check commands
307
+ report why they could not use the receipt.
284
308
 
285
309
  ## Step 4: return the result
286
310
 
@@ -130,11 +130,11 @@ reached done with no estimate shows `none recorded` in the estimate row rather t
130
130
  range.
131
131
 
132
132
  `lisa-work-item complete` enforces it: when `required` is true, it refuses (as `pending-proof`) an
133
- item with no usage entry, with no tally, or with a tally that no longer matches the ledger. The
134
- estimate section is machine-owned metadata, so rewriting it does not change the specification
135
- digest the accepted completion proof is bound to. Only the exact lines `lisa-estimate` writes are
136
- left out; every other line a person adds inside it still counts, even one that starts with
137
- `Actual:` or `Basis:`.
133
+ item with no usage entry, with no tally, or with a tally that no longer matches the ledger.
134
+ The specification digest stays the same when Lisa first adds the estimate section or refreshes
135
+ its tally. The digest includes prose a person adds inside that section, including lines starting
136
+ with `Actual:` or `Basis:`. Existing proofs can still match the digest that Lisa calculated for
137
+ their unchanged specification.
138
138
 
139
139
  ## When the config is off
140
140
 
@@ -93,11 +93,49 @@
93
93
  {
94
94
  "$ref": "#/$defs/observed_record"
95
95
  },
96
+ {
97
+ "$ref": "#/$defs/artifact_exercise_record"
98
+ },
96
99
  {
97
100
  "$ref": "#/$defs/finding_record"
98
101
  }
99
102
  ],
100
- "description": "One of three kinds of record, told apart by `rung`."
103
+ "description": "One record from a gate proof, a platform setting, an audit finding, or an independently verified artifact exercise."
104
+ },
105
+ "artifact_exercise_record": {
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "description": "A current result for a typed exercise and its independently signed proof statement.",
109
+ "required": ["checks_digest", "command", "commit", "completed_at", "criterion", "detail", "entry_id", "exercise", "exit_status", "freshness_seconds", "id", "moment", "output_excerpt", "output_truncated", "reason", "result", "rung", "scope", "started_at"],
110
+ "properties": {
111
+ "checks_digest": { "$ref": "#/$defs/sha256" },
112
+ "command": { "const": null },
113
+ "commit": { "const": null },
114
+ "completed_at": { "$ref": "#/$defs/utc_time" },
115
+ "criterion": { "enum": ["AC5.5", "AC6.4", "AC7.2", "AC8.9"] },
116
+ "detail": { "type": "string", "minLength": 1 },
117
+ "entry_id": { "const": null },
118
+ "exercise": {
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "required": ["target", "statement_sha256"],
122
+ "properties": {
123
+ "target": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$" },
124
+ "statement_sha256": { "$ref": "#/$defs/sha256" }
125
+ }
126
+ },
127
+ "exit_status": { "const": null },
128
+ "freshness_seconds": { "$ref": "#/$defs/exercised_record/properties/freshness_seconds" },
129
+ "id": { "type": "string", "pattern": "^artifact-exercise/[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}/AC(?:5\\.5|6\\.4|7\\.2|8\\.9)$" },
130
+ "moment": { "const": null },
131
+ "output_excerpt": { "const": "" },
132
+ "output_truncated": { "const": false },
133
+ "reason": { "const": "artifact-exercised" },
134
+ "result": { "const": "held" },
135
+ "rung": { "const": "exercised" },
136
+ "scope": { "type": "string", "minLength": 1 },
137
+ "started_at": { "$ref": "#/$defs/utc_time" }
138
+ }
101
139
  },
102
140
  "exercised_record": {
103
141
  "type": "object",
@@ -219,6 +219,7 @@
219
219
  "enum": [
220
220
  "control-proved",
221
221
  "artifact-located",
222
+ "artifact-exercised",
222
223
  "person-attested",
223
224
  "not-applicable",
224
225
  "control-failed",