@codyswann/lisa 2.221.5 → 2.222.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 (75) hide show
  1. package/dist/utils/usage-accounting.d.ts +1 -0
  2. package/dist/utils/usage-accounting.d.ts.map +1 -1
  3. package/dist/utils/usage-accounting.js +25 -9
  4. package/dist/utils/usage-accounting.js.map +1 -1
  5. package/package.json +1 -1
  6. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  7. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  8. package/plugins/lisa/.codex-plugin/skills/lisa-github-validate-issue/SKILL.md +68 -9
  9. package/plugins/lisa/.codex-plugin/skills/lisa-usage-accounting/SKILL.md +4 -0
  10. package/plugins/lisa/rules/eager/usage-accounting.md +3 -2
  11. package/plugins/lisa/rules/reference/usage-accounting.md +8 -3
  12. package/plugins/lisa/skills/lisa-github-validate-issue/SKILL.md +68 -9
  13. package/plugins/lisa/skills/lisa-usage-accounting/SKILL.md +4 -0
  14. package/plugins/lisa-agy/plugin.json +1 -1
  15. package/plugins/lisa-agy/skills/lisa-github-validate-issue/SKILL.md +68 -9
  16. package/plugins/lisa-agy/skills/lisa-usage-accounting/SKILL.md +4 -0
  17. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  19. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  20. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-copilot/rules/eager/usage-accounting.md +3 -2
  24. package/plugins/lisa-copilot/rules/reference/usage-accounting.md +8 -3
  25. package/plugins/lisa-copilot/skills/lisa-github-validate-issue/SKILL.md +68 -9
  26. package/plugins/lisa-copilot/skills/lisa-usage-accounting/SKILL.md +4 -0
  27. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-cursor/rules/usage-accounting-reference.mdc +8 -3
  29. package/plugins/lisa-cursor/rules/usage-accounting.mdc +3 -2
  30. package/plugins/lisa-cursor/skills/lisa-github-validate-issue/SKILL.md +68 -9
  31. package/plugins/lisa-cursor/skills/lisa-usage-accounting/SKILL.md +4 -0
  32. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  34. package/plugins/lisa-expo-agy/plugin.json +1 -1
  35. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  40. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  45. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  49. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  50. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  55. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  59. package/plugins/lisa-rails-agy/plugin.json +1 -1
  60. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  64. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  65. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  69. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  70. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  72. package/plugins/src/base/rules/eager/usage-accounting.md +3 -2
  73. package/plugins/src/base/rules/reference/usage-accounting.md +8 -3
  74. package/plugins/src/base/skills/lisa-github-validate-issue/SKILL.md +68 -9
  75. package/plugins/src/base/skills/lisa-usage-accounting/SKILL.md +4 -0
@@ -10,6 +10,7 @@ export interface LisaUsageEntry {
10
10
  entryId: string;
11
11
  flow: string;
12
12
  inputTokens: number | null;
13
+ measuredSubsetTokens: number | null;
13
14
  model: string;
14
15
  outputTokens: number | null;
15
16
  parentArtifactRef: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"usage-accounting.d.ts","sourceRoot":"","sources":["../../src/utils/usage-accounting.ts"],"names":[],"mappings":"AAKA,eAAO,MAA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AAqB,CACnC,QAAQ,EAAE,MAAM,GACf,sBAAsB,CA2CxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE;IACL,cAAc,CAAC,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACnD,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CACjC,GACA,MAAM,CA0BR"}
@@ -2,7 +2,7 @@
2
2
  import { collectLisaUsageChildArtifacts } from "./usage-accounting-rollup.js";
3
3
  import { sumNullableDecimals } from "./decimal-sum.js";
4
4
  export const LISA_USAGE_HEADING = "## Lisa Usage";
5
- const ENTRY_PATTERN = /<!-- lisa:usage-entry entry_id=(\S+) flow=(\S+) run_id=(\S+) provider=(\S+) model=(\S+) source=(\S+) input_tokens=(\S+) cached_input_tokens=(\S+) output_tokens=(\S+) reasoning_tokens=(\S+) total_tokens=(\S+) cost=(\S+) currency=(\S+) pricing_status=(\S+) pricing_source=(\S+) artifact_ref=(\S+) parent_artifact_ref=(\S*) -->/g;
5
+ const ENTRY_PATTERN = /<!-- lisa:usage-entry entry_id=(\S+) flow=(\S+) run_id=(\S+) provider=(\S+) model=(\S+) source=(\S+) input_tokens=(\S+) cached_input_tokens=(\S+) output_tokens=(\S+) reasoning_tokens=(\S+) total_tokens=(\S+) (?:measured_subset_tokens=(\S+) )?cost=(\S+) currency=(\S+) pricing_status=(\S+) pricing_source=(\S+) artifact_ref=(\S+) parent_artifact_ref=(\S*) -->/g;
6
6
  const ROLLUP_PATTERN = /<!-- lisa:usage-rollup direct_entry_ids=(\S*) child_entry_ids=(\S*) child_refs=(\S*) direct_tokens=(\S+) child_tokens=(\S+) total_tokens=(\S+) direct_cost=(\S+) child_cost=(\S+) total_cost=(\S+) currency=(\S+)(?: child_currency=(\S+))? -->/;
7
7
  const MIXED_CURRENCY = "mixed";
8
8
  /**
@@ -167,6 +167,21 @@ function splitDocumentAroundRange(document, range) {
167
167
  function formatTokens(value) {
168
168
  return value === null ? "null" : String(value);
169
169
  }
170
+ /**
171
+ * Render the token-count cell for human readers without making a measured
172
+ * subset look like a complete total.
173
+ *
174
+ * @param entry Usage entry to display.
175
+ * @returns A deterministic display string.
176
+ */
177
+ function formatEntryTokens(entry) {
178
+ if (entry.totalTokens !== null) {
179
+ return formatTokens(entry.totalTokens);
180
+ }
181
+ return entry.measuredSubsetTokens === null
182
+ ? "null"
183
+ : `${entry.measuredSubsetTokens} measured subset`;
184
+ }
170
185
  /**
171
186
  * Render a cost value for the human-readable table.
172
187
  *
@@ -299,7 +314,7 @@ export function createLisaUsageRollup(entries, previousRollup, childArtifacts) {
299
314
  * @returns The canonical `lisa:usage-entry` token line.
300
315
  */
301
316
  export function renderLisaUsageEntryToken(entry) {
302
- return `<!-- lisa:usage-entry entry_id=${encodeTokenValue(entry.entryId)} flow=${encodeTokenValue(entry.flow)} run_id=${encodeTokenValue(entry.runId)} provider=${encodeTokenValue(entry.provider)} model=${encodeTokenValue(entry.model)} source=${encodeTokenValue(entry.source)} input_tokens=${renderNullable(entry.inputTokens)} cached_input_tokens=${renderNullable(entry.cachedInputTokens)} output_tokens=${renderNullable(entry.outputTokens)} reasoning_tokens=${renderNullable(entry.reasoningTokens)} total_tokens=${renderNullable(entry.totalTokens)} cost=${renderNullable(entry.cost)} currency=${renderNullable(entry.currency)} pricing_status=${encodeTokenValue(entry.pricingStatus)} pricing_source=${renderNullable(entry.pricingSource)} artifact_ref=${encodeTokenValue(entry.artifactRef)} parent_artifact_ref=${entry.parentArtifactRef === null ? "" : encodeTokenValue(entry.parentArtifactRef)} -->`;
317
+ return `<!-- lisa:usage-entry entry_id=${encodeTokenValue(entry.entryId)} flow=${encodeTokenValue(entry.flow)} run_id=${encodeTokenValue(entry.runId)} provider=${encodeTokenValue(entry.provider)} model=${encodeTokenValue(entry.model)} source=${encodeTokenValue(entry.source)} input_tokens=${renderNullable(entry.inputTokens)} cached_input_tokens=${renderNullable(entry.cachedInputTokens)} output_tokens=${renderNullable(entry.outputTokens)} reasoning_tokens=${renderNullable(entry.reasoningTokens)} total_tokens=${renderNullable(entry.totalTokens)} measured_subset_tokens=${renderNullable(entry.measuredSubsetTokens)} cost=${renderNullable(entry.cost)} currency=${renderNullable(entry.currency)} pricing_status=${encodeTokenValue(entry.pricingStatus)} pricing_source=${renderNullable(entry.pricingSource)} artifact_ref=${encodeTokenValue(entry.artifactRef)} parent_artifact_ref=${entry.parentArtifactRef === null ? "" : encodeTokenValue(entry.parentArtifactRef)} -->`;
303
318
  }
304
319
  /**
305
320
  * Render the machine-readable rollup token for a managed usage section.
@@ -323,7 +338,7 @@ export function renderLisaUsageSection(input) {
323
338
  const { entries, rollup } = input;
324
339
  const entryLines = entries.length === 0
325
340
  ? ["| _No direct entries recorded_ | | | | |"]
326
- : entries.map(entry => `| ${entry.flow} | ${entry.source} | ${entry.provider}/${entry.model} | ${formatTokens(entry.totalTokens)} | ${formatCost(entry.cost, entry.currency)} | ${renderLisaUsageEntryToken(entry)}`);
341
+ : entries.map(entry => `| ${entry.flow} | ${entry.source} | ${entry.provider}/${entry.model} | ${formatEntryTokens(entry)} | ${formatCost(entry.cost, entry.currency)} | ${renderLisaUsageEntryToken(entry)}`);
327
342
  const lines = [
328
343
  LISA_USAGE_HEADING,
329
344
  "",
@@ -358,12 +373,13 @@ export function parseLisaUsageSection(document) {
358
373
  outputTokens: parseNullableNumber(match[9] ?? ""),
359
374
  reasoningTokens: parseNullableNumber(match[10] ?? ""),
360
375
  totalTokens: parseNullableNumber(match[11] ?? ""),
361
- cost: parseNullableNumber(match[12] ?? ""),
362
- currency: parseNullableString(match[13] ?? ""),
363
- pricingStatus: decodeTokenValue(match[14] ?? ""),
364
- pricingSource: parseNullableString(match[15] ?? ""),
365
- artifactRef: decodeTokenValue(match[16] ?? ""),
366
- parentArtifactRef: parseNullableString(match[17] ?? ""),
376
+ measuredSubsetTokens: match[12] === undefined ? null : parseNullableNumber(match[12]),
377
+ cost: parseNullableNumber(match[13] ?? ""),
378
+ currency: parseNullableString(match[14] ?? ""),
379
+ pricingStatus: decodeTokenValue(match[15] ?? ""),
380
+ pricingSource: parseNullableString(match[16] ?? ""),
381
+ artifactRef: decodeTokenValue(match[17] ?? ""),
382
+ parentArtifactRef: parseNullableString(match[18] ?? ""),
367
383
  }));
368
384
  const rollupMatch = ROLLUP_PATTERN.exec(section);
369
385
  const rollup = rollupMatch
@@ -1 +1 @@
1
- {"version":3,"file":"usage-accounting.js","sourceRoot":"","sources":["../../src/utils/usage-accounting.ts"],"names":[],"mappings":"AAAA,uHAAuH;AAEvH,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AA2DlD,MAAM,aAAa,GACjB,uUAAuU,CAAC;AAE1U,MAAM,cAAc,GAClB,iPAAiP,CAAC;AAEpP,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B;;;;;GAKG;AACH,SAAS,mBAAmB,CAAC,KAAa;IACxC,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,qCAAqC,KAAK,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,SAAS,mBAAmB,CAAC,KAAa;IACxC,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;I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pC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAAgB,EAChB,KAIC;IAED,MAAM,MAAM,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IAC/C,MAAM,aAAa,GAAG,qBAAqB,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3E,MAAM,MAAM,GACV,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM;QACxC,CAAC,CAAC,KAAK,CAAC,MAAM;QACd,CAAC,CAAC,qBAAqB,CACnB,aAAa,EACb,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,EAC7B,KAAK,CAAC,cAAc,CACrB,CAAC;IACR,MAAM,YAAY,GAAG,sBAAsB,CAAC;QAC1C,OAAO,EAAE,aAAa;QACtB,MAAM;KACP,CAAC,CAAC,OAAO,EAAE,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,wBAAwB,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAE3E,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,YAAY,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,YAAY,IAAI,CAAC;IACvE,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,GAAG,MAAM,OAAO,YAAY,IAAI,CAAC;IAC1C,CAAC;IAED,OAAO,GAAG,MAAM,OAAO,YAAY,OAAO,KAAK,IAAI,CAAC;AACtD,CAAC;AAED,6EAA6E"}
package/package.json CHANGED
@@ -102,7 +102,7 @@
102
102
  "form-data": ">=4.0.6"
103
103
  },
104
104
  "name": "@codyswann/lisa",
105
- "version": "2.221.5",
105
+ "version": "2.222.0",
106
106
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
107
107
  "main": "dist/index.js",
108
108
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.221.5",
3
+ "version": "2.222.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.221.5",
3
+ "version": "2.222.0",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -25,7 +25,7 @@ org: my-org
25
25
  repo: my-repo
26
26
  summary: "[CU-1.2] Upload contract PDF from settings"
27
27
  priority: medium
28
- parent_ref: "my-org/my-repo#1234" # Parent Epic for non-Bug/non-Epic; Story for Sub-task
28
+ parent_ref: "my-org/my-repo#1234" # Parent Epic for ordinary children; PRD for an Epic only in the same-repo GitHub self-host shape; Story/etc. for Sub-task
29
29
  body: |
30
30
  ## Context / Business Value
31
31
  ...
@@ -63,7 +63,7 @@ artifacts_attached: true # → requires Source Precedence section
63
63
  links: [{ ref: "my-org/my-repo#99", type: "is blocked by" }] # known issue links (may be empty)
64
64
  remote_links: [{ url: "https://github.com/.../pull/42", title: "PR #42" }]
65
65
  journey_followup: auto # auto | none — see S11
66
- build_ready: true # caller asserts the build-ready role (status:ready) is/would be applied — see S15
66
+ build_ready: true # caller asserts the configured build-ready role (github.labels.build.ready, default status:ready) is/would be applied — see S15
67
67
  child_refs: ["my-org/my-repo#601", "my-org/my-repo#602"] # known child work (sub-issues / task-list / "Blocked by" parentage) — see S15
68
68
  prd_source: "https://notion.so/..." # set when the issue was generated from a PRD — requires the Source Requirement section, see S16
69
69
  ```
@@ -213,9 +213,11 @@ This gate depends on S11. It is `N/A` for containers — an **Epic**, or any ite
213
213
 
214
214
  #### S15 — Leaf-only build-ready
215
215
 
216
- Enforces the build-side of the vendor-neutral `leaf-only-lifecycle` rule: **only a leaf work unit may carry the build-ready role.** This is the symmetric write-side guard for the GitHub validator a stale or hand-applied `status:ready` on a container is a lifecycle error and must FAIL here, regardless of how the issue was produced. (Mirrors the "Build-ready label is leaf-only" rule that `lisa-github-write-issue` applies at write time.)
216
+ Enforces the build-side of the vendor-neutral `leaf-only-lifecycle` rule: **only a leaf work unit may carry the build-ready role.** Before evaluating this gate, resolve `READY_ROLE` from merged project config (`.lisa.config.local.json` over `.lisa.config.json`) at `github.labels.build.ready`, defaulting to `status:ready` per `config-resolution`. Use that resolved value everywhere this validator interprets build readiness; a project-specific label is not an alias for the literal default.
217
217
 
218
- **When the gate applies.** Run S15 whenever the issue is build-ready i.e. `build_ready = true`, or the spec/live labels include `status:ready`. If the issue is not build-ready, S15 is `N/A` (nothing claims a non-ready issue, so the invariant is vacuous).
218
+ This is the symmetric write-side guard for the GitHub validatora stale or hand-applied `READY_ROLE` on a container is a lifecycle error and must FAIL here, regardless of how the issue was produced. (Mirrors the "Build-ready label is leaf-only" rule that `lisa-github-write-issue` applies at write time.)
219
+
220
+ **When the gate applies.** Run S15 whenever the issue is build-ready — i.e. `build_ready = true`, or the spec/live labels include the resolved `READY_ROLE`. If the issue is not build-ready, S15 is `N/A` (nothing claims a non-ready issue, so the invariant is vacuous). For example, if `github.labels.build.ready = "queue:approved"`, a container carrying `queue:approved` FAILs S15 even when it does not carry the literal `status:ready` default.
219
221
 
220
222
  **Resolve container vs. leaf — structural first, then nominal.** Per `leaf-only-lifecycle` the classification is structural: an item is a **container** if it has child work, whatever its declared type; otherwise the **type label** decides. Determine child work from (in order) `child_refs`, native sub-issues, body task-list checkboxes, and `Blocked by #<n>` / parent references — the same hierarchy resolution `lisa-github-read-issue` uses. When validating a live ref, query sub-issues alongside the issue fetch.
221
223
 
@@ -233,7 +235,7 @@ PASS (the childless-parent exception) when the issue is build-ready and is a **l
233
235
  | Epic | no | yes | **FAIL** (childless Epic — pure rollup container, exception does not apply) |
234
236
  | any | any | no | **N/A** (not build-ready) |
235
237
 
236
- Remediation: `"Build-ready (status:ready) is leaf-only per leaf-only-lifecycle. Move status:ready off this container onto its leaf children (or, for a childless Epic, decompose it into leaf children or reclassify it to a leaf type); a parent's lifecycle state rolls up from its children and is never set to ready directly."`
238
+ Remediation (render `<READY_ROLE>` as the resolved configured label, never as a hard-coded default): `"Build-ready (<READY_ROLE>; status:ready by default) is leaf-only per leaf-only-lifecycle. Move <READY_ROLE> off this container onto its leaf children (or, for a childless Epic, decompose it into leaf children or reclassify it to a leaf type); a parent's lifecycle state rolls up from its children and is never set to ready directly."`
237
239
 
238
240
  `product_relevant: false` — a build-ready container is a lifecycle/decomposition error for the caller to repair, not a product question.
239
241
 
@@ -284,8 +286,37 @@ gh issue view <number> --repo <org>/<repo> --json number,labels,state
284
286
  ```
285
287
 
286
288
  Confirm the parent issue exists and:
287
- - For non-Sub-task children: parent has `type:Epic` label.
288
- - For Sub-task children: parent has `type:Story`, `type:Task`, `type:Bug`, or `type:Improvement` (anything that can host sub-tasks).
289
+
290
+ - For an `Epic` child, first resolve whether the validator can prove the native PRD-parent shape
291
+ allowed by `prd-lifecycle-rollup`: merged project config has `source = github` and
292
+ `tracker = github`; the spec/live child's `org` and `repo` match configured `github.org` and
293
+ `github.repo`; and `parent_ref` names that same `org/repo`. These facts are available from the
294
+ existing spec/live ref plus project config; do not infer the exception from label spelling alone.
295
+ Only in that proven same-repository GitHub self-host shape may the parent qualify by having one of
296
+ the configured PRD lifecycle labels from
297
+ `github.labels.prd` (`draft`, `ready`, `in_review`, `blocked`, `ticketed`, `shipped`, or
298
+ `verified`; defaults use the `prd-*` namespace). Resolve the configured values from
299
+ `.lisa.config.local.json` over `.lisa.config.json`, using the defaults from `config-resolution`.
300
+ The `sentinel` label is not a lifecycle role and does not qualify. This is the native
301
+ PRD→generated-Epic hierarchy used when GitHub is both source and tracker in one repository; the
302
+ PRD parent does **not** need `type:Epic`. If any self-host/same-repository predicate is false, a
303
+ PRD label does not grant the exception: native hierarchy cannot cross repositories or source
304
+ systems, so a PRD-labelled parent alone FAILs F2.
305
+ - For a `Sub-task` child: the parent has `type:Story`, `type:Task`, `type:Bug`, or
306
+ `type:Improvement` (anything that can host sub-tasks). This allowlist is unchanged; a PRD
307
+ lifecycle label or `type:Epic` alone does not qualify.
308
+ - For every other non-Sub-task child: the parent has `type:Epic`. A PRD lifecycle label alone does
309
+ not qualify, so the Epic→Story (and Epic→ordinary-leaf) hierarchy remains enforced.
310
+
311
+ | child type | relationship shape | qualifying parent label | F2 |
312
+ |---|---|---|---|
313
+ | `Epic` | source GitHub + tracker GitHub + configured child repo = parent repo | configured PRD lifecycle label | **PASS** |
314
+ | `Epic` | cross-repository or source/tracker is not same-repo GitHub | PRD lifecycle label only | **FAIL** |
315
+ | `Epic` | permitted self-host shape | unconfigured `prd-*` lookalike or `prd-intake-feedback` sentinel only | **FAIL** |
316
+ | `Sub-task` | any | `type:Story`, `type:Task`, `type:Bug`, or `type:Improvement` | **PASS** |
317
+ | `Sub-task` | any | PRD lifecycle label or `type:Epic` only | **FAIL** |
318
+ | any other non-Sub-task | any | `type:Epic` | **PASS** |
319
+ | any other non-Sub-task | any | PRD lifecycle label only | **FAIL** |
289
320
 
290
321
  #### F3 — Linked issues exist
291
322
 
@@ -293,7 +324,35 @@ For each entry in `links`, run `gh issue view <number> --repo <link-org>/<link-r
293
324
 
294
325
  #### F4 — Required labels populated
295
326
 
296
- Per `Phase 5` of `lisa-github-write-issue`, every issue MUST carry: `type:<issue_type>`, `status:<status>`, `priority:<priority>`. If any are missing from the spec / live issue, FAIL with the missing label name.
327
+ Per `Phase 5` of `lisa-github-write-issue`, every issue MUST carry
328
+ `type:<issue_type>` and `priority:<priority>`. These two labels are unconditional: if either is
329
+ missing from the proposed spec or live issue, FAIL with the missing label name.
330
+
331
+ The `status:*` requirement uses this validator's S15 leaf/container classification while preserving
332
+ the writer's documented `build_ready` control-input defaults:
333
+
334
+ 1. Classify the issue structurally using the S15 child-resolution rules. A container (any issue
335
+ with child work, plus a childless `Epic`) may omit `status:*`; its state rolls up rather than
336
+ being assigned directly.
337
+ 2. For a proposed leaf spec, normalize omitted `build_ready` to `true`, preserving the writer's
338
+ backward-compatible default-ready behavior. Explicit `build_ready: false` means backlog mode.
339
+ 3. For a live issue ref, derive `build_ready` from the labels (`true` exactly when the S15-resolved
340
+ `READY_ROLE` from `github.labels.build.ready`, default `status:ready`, is present). A live backlog leaf without a status label
341
+ therefore validates as `build_ready: false`; live data cannot distinguish an explicit false from
342
+ a historical write that omitted the label.
343
+ 4. A leaf with normalized `build_ready: true` MUST carry that same resolved `READY_ROLE`. A leaf with `build_ready: false` may omit
344
+ `status:*`.
345
+
346
+ | classification | normalized build_ready | status label | F4 |
347
+ |---|---:|---|---|
348
+ | container | any | omitted | **PASS** |
349
+ | leaf | `false` | omitted | **PASS** |
350
+ | leaf | `true` | configured build-ready role (`status:ready` by default) | **PASS** |
351
+ | leaf | `true` | omitted or a different `status:*` label | **FAIL** |
352
+
353
+ F4 does not make a container build-ready. S15 remains the independent lifecycle prohibition: any
354
+ container carrying the build-ready role still FAILs S15, even though F4's status-presence check is
355
+ not applicable to containers.
297
356
 
298
357
  #### F5 — Required external access provable
299
358
 
@@ -322,7 +381,7 @@ system, and never invent or ask for credentials inline.
322
381
 
323
382
  ## Execution
324
383
 
325
- 1. Parse `$ARGUMENTS`. If it's an issue ref, fetch via `gh issue view --json` and derive the spec fields — including `build_ready` (label set contains `status:ready`) and `child_refs` (native sub-issues plus body task-list / `Blocked by #<n>` parentage, resolved as in `lisa-github-read-issue`) so S15 can classify the issue. Otherwise parse the YAML spec.
384
+ 1. Parse `$ARGUMENTS`. Resolve `READY_ROLE` from merged `github.labels.build.ready` config (default `status:ready`). If the input is an issue ref, fetch via `gh issue view --json` and derive the spec fields — including `build_ready` (label set contains the resolved `READY_ROLE`, not a hard-coded label) and `child_refs` (native sub-issues plus body task-list / `Blocked by #<n>` parentage, resolved as in `lisa-github-read-issue`) so S15 can classify the issue. Otherwise parse the YAML spec and preserve the proposed `build_ready` value for S15/F4 normalization.
326
385
  2. Confirm `gh auth status` succeeds before any feasibility gate runs.
327
386
  3. Run every Specification gate in order. Collect PASS / FAIL / N/A with a one-line reason.
328
387
  4. Unless the caller passed `--spec-only`, run every Feasibility gate.
@@ -67,6 +67,10 @@ and artifact refs. Callers do not get to omit the "unavailable" case; when trust
67
67
  missing they still pass an explicit entry with `source: unavailable` and nullable token/cost
68
68
  fields.
69
69
 
70
+ When the runtime exposes only a trustworthy subtotal, callers MUST use `source: measured-subset`,
71
+ write the subtotal to `measured_subset_tokens`, and leave `total_tokens: null`. Do not coerce a
72
+ known subset into `total_tokens`; rollups use `total_tokens` only for complete totals.
73
+
70
74
  ## Return shape
71
75
 
72
76
  Return structured output so callers can persist or log what happened without reparsing prose:
@@ -16,7 +16,8 @@ Every artifact with inline body content gets exactly one section:
16
16
 
17
17
  Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is the stable dedupe key — rewriting the same logical run with the same `entry_id` updates in place; a different run gets a different `entry_id`.
18
18
 
19
- - **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `unavailable`.
19
+ - **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `measured-subset` (a trustworthy subtotal exists, but the complete run total is unknown) / `unavailable`.
20
+ - **`measured_subset_tokens`**: measured subtotal for `measured-subset` entries only. Keep `total_tokens = null` so rollups do not treat a subset as a complete total.
20
21
  - **`pricing_status`**: same trinary plus `missing` (cost not known but should be).
21
22
  - **Absence ≠ zero.** `null` means unknown; `0` means explicitly zero. Always write the entry — never silently omit.
22
23
  - Do NOT replace observed counts with estimates.
@@ -25,4 +26,4 @@ Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is th
25
26
 
26
27
  Container artifacts (Epic, PRD, etc.) roll up usage from their direct children. Roll-up is recursive — a parent's `## Lisa Usage` aggregates its descendants' direct entries. Re-writes are idempotent: re-running an intake or lifecycle skill must not duplicate entries.
27
28
 
28
- Full schema (all 17 fields, pricing semantics, rollup math, idempotent-rewrite rules): [reference/usage-accounting.md](../reference/usage-accounting.md).
29
+ Full schema (all 18 fields, pricing semantics, rollup math, idempotent-rewrite rules): [reference/usage-accounting.md](../reference/usage-accounting.md).
@@ -25,12 +25,13 @@ Each direct usage entry records one logical Lisa run or sub-run on one artifact.
25
25
  | `run_id` | Runtime/session identifier when available; empty only when the runtime exposes no stable run id. |
26
26
  | `provider` | Model provider name. |
27
27
  | `model` | Model identifier. |
28
- | `source` | `observed`, `estimated`, or `unavailable`. |
28
+ | `source` | `observed`, `estimated`, `measured-subset`, or `unavailable`. |
29
29
  | `input_tokens` | Prompt/input tokens, or `null` when unavailable. |
30
30
  | `cached_input_tokens` | Cached/reused input tokens, or `null` when unavailable/not exposed. |
31
31
  | `output_tokens` | Output/completion tokens, or `null` when unavailable. |
32
32
  | `reasoning_tokens` | Reasoning/internal tokens, or `null` when unavailable/not exposed. |
33
33
  | `total_tokens` | Total trustworthy tokens for the entry, or `null`. |
34
+ | `measured_subset_tokens` | Trustworthy measured subtotal for a known subset of the run, or `null`. |
34
35
  | `cost` | Observed or estimated cost for this entry, or `null`. |
35
36
  | `currency` | ISO currency code when `cost` is known, otherwise `null`. |
36
37
  | `pricing_status` | `observed`, `estimated`, `missing`, or `unavailable`. |
@@ -46,13 +47,17 @@ Each direct usage entry records one logical Lisa run or sub-run on one artifact.
46
47
 
47
48
  - `observed`: the runtime supplied the usage directly. Do not replace observed counts with estimates.
48
49
  - `estimated`: Lisa derived counts or cost from trustworthy runtime metadata plus an explicit pricing contract. Estimates are allowed only when the derivation inputs are real and attributable to the run.
50
+ - `measured-subset`: Lisa measured a known subset of the run, but not enough to claim a complete `total_tokens` value. Preserve the subtotal in `measured_subset_tokens`, keep `total_tokens = null`, and keep rollup totals unknown instead of treating the subset as the whole run.
49
51
  - `unavailable`: Lisa could not obtain trustworthy usage data. Write the entry anyway with `null` token/cost fields rather than silently omitting the row.
50
52
 
51
53
  The absence of data is never treated as zero. `null` means unknown; `0` means explicitly observed or derived zero.
52
54
 
53
55
  For example, an unavailable Verify run still records a direct entry with `source = unavailable`,
54
56
  `pricing_status = unavailable`, and `null` token/cost fields so downstream readers can distinguish
55
- "missing telemetry" from "zero usage."
57
+ "missing telemetry" from "zero usage." A Plan run with measured sub-agent usage but unmeasured
58
+ main-loop usage records `source = measured-subset`, `measured_subset_tokens = <subtotal>`, and
59
+ `total_tokens = null` so the subtotal is durable without being misrepresented as the complete run
60
+ total.
56
61
 
57
62
  ## Pricing semantics
58
63
 
@@ -70,7 +75,7 @@ Runtime-observed cost always wins over estimates. Estimated cost never overwrite
70
75
  Every visible direct entry row ends with exactly one machine-readable token:
71
76
 
72
77
  ```text
73
- <!-- lisa:usage-entry entry_id=<id> flow=<flow> run_id=<run-id> provider=<provider> model=<model> source=<source> input_tokens=<n|null> cached_input_tokens=<n|null> output_tokens=<n|null> reasoning_tokens=<n|null> total_tokens=<n|null> cost=<decimal|null> currency=<code|null> pricing_status=<status> pricing_source=<ref|null> artifact_ref=<ref> parent_artifact_ref=<ref-or-empty> -->
78
+ <!-- lisa:usage-entry entry_id=<id> flow=<flow> run_id=<run-id> provider=<provider> model=<model> source=<source> input_tokens=<n|null> cached_input_tokens=<n|null> output_tokens=<n|null> reasoning_tokens=<n|null> total_tokens=<n|null> measured_subset_tokens=<n|null> cost=<decimal|null> currency=<code|null> pricing_status=<status> pricing_source=<ref|null> artifact_ref=<ref> parent_artifact_ref=<ref-or-empty> -->
74
79
  ```
75
80
 
76
81
  Field order is fixed. A reader parses the usage ledger by matching `<!-- lisa:usage-entry ` lines only; it never needs to scrape prose or table cell positions. String fields are percent-encoded before rendering and decoded after parsing, so whitespace, commas, and HTML comment terminators inside source values cannot split or truncate the token.
@@ -25,7 +25,7 @@ org: my-org
25
25
  repo: my-repo
26
26
  summary: "[CU-1.2] Upload contract PDF from settings"
27
27
  priority: medium
28
- parent_ref: "my-org/my-repo#1234" # Parent Epic for non-Bug/non-Epic; Story for Sub-task
28
+ parent_ref: "my-org/my-repo#1234" # Parent Epic for ordinary children; PRD for an Epic only in the same-repo GitHub self-host shape; Story/etc. for Sub-task
29
29
  body: |
30
30
  ## Context / Business Value
31
31
  ...
@@ -63,7 +63,7 @@ artifacts_attached: true # → requires Source Precedence section
63
63
  links: [{ ref: "my-org/my-repo#99", type: "is blocked by" }] # known issue links (may be empty)
64
64
  remote_links: [{ url: "https://github.com/.../pull/42", title: "PR #42" }]
65
65
  journey_followup: auto # auto | none — see S11
66
- build_ready: true # caller asserts the build-ready role (status:ready) is/would be applied — see S15
66
+ build_ready: true # caller asserts the configured build-ready role (github.labels.build.ready, default status:ready) is/would be applied — see S15
67
67
  child_refs: ["my-org/my-repo#601", "my-org/my-repo#602"] # known child work (sub-issues / task-list / "Blocked by" parentage) — see S15
68
68
  prd_source: "https://notion.so/..." # set when the issue was generated from a PRD — requires the Source Requirement section, see S16
69
69
  ```
@@ -213,9 +213,11 @@ This gate depends on S11. It is `N/A` for containers — an **Epic**, or any ite
213
213
 
214
214
  #### S15 — Leaf-only build-ready
215
215
 
216
- Enforces the build-side of the vendor-neutral `leaf-only-lifecycle` rule: **only a leaf work unit may carry the build-ready role.** This is the symmetric write-side guard for the GitHub validator a stale or hand-applied `status:ready` on a container is a lifecycle error and must FAIL here, regardless of how the issue was produced. (Mirrors the "Build-ready label is leaf-only" rule that `lisa-github-write-issue` applies at write time.)
216
+ Enforces the build-side of the vendor-neutral `leaf-only-lifecycle` rule: **only a leaf work unit may carry the build-ready role.** Before evaluating this gate, resolve `READY_ROLE` from merged project config (`.lisa.config.local.json` over `.lisa.config.json`) at `github.labels.build.ready`, defaulting to `status:ready` per `config-resolution`. Use that resolved value everywhere this validator interprets build readiness; a project-specific label is not an alias for the literal default.
217
217
 
218
- **When the gate applies.** Run S15 whenever the issue is build-ready i.e. `build_ready = true`, or the spec/live labels include `status:ready`. If the issue is not build-ready, S15 is `N/A` (nothing claims a non-ready issue, so the invariant is vacuous).
218
+ This is the symmetric write-side guard for the GitHub validatora stale or hand-applied `READY_ROLE` on a container is a lifecycle error and must FAIL here, regardless of how the issue was produced. (Mirrors the "Build-ready label is leaf-only" rule that `lisa-github-write-issue` applies at write time.)
219
+
220
+ **When the gate applies.** Run S15 whenever the issue is build-ready — i.e. `build_ready = true`, or the spec/live labels include the resolved `READY_ROLE`. If the issue is not build-ready, S15 is `N/A` (nothing claims a non-ready issue, so the invariant is vacuous). For example, if `github.labels.build.ready = "queue:approved"`, a container carrying `queue:approved` FAILs S15 even when it does not carry the literal `status:ready` default.
219
221
 
220
222
  **Resolve container vs. leaf — structural first, then nominal.** Per `leaf-only-lifecycle` the classification is structural: an item is a **container** if it has child work, whatever its declared type; otherwise the **type label** decides. Determine child work from (in order) `child_refs`, native sub-issues, body task-list checkboxes, and `Blocked by #<n>` / parent references — the same hierarchy resolution `lisa-github-read-issue` uses. When validating a live ref, query sub-issues alongside the issue fetch.
221
223
 
@@ -233,7 +235,7 @@ PASS (the childless-parent exception) when the issue is build-ready and is a **l
233
235
  | Epic | no | yes | **FAIL** (childless Epic — pure rollup container, exception does not apply) |
234
236
  | any | any | no | **N/A** (not build-ready) |
235
237
 
236
- Remediation: `"Build-ready (status:ready) is leaf-only per leaf-only-lifecycle. Move status:ready off this container onto its leaf children (or, for a childless Epic, decompose it into leaf children or reclassify it to a leaf type); a parent's lifecycle state rolls up from its children and is never set to ready directly."`
238
+ Remediation (render `<READY_ROLE>` as the resolved configured label, never as a hard-coded default): `"Build-ready (<READY_ROLE>; status:ready by default) is leaf-only per leaf-only-lifecycle. Move <READY_ROLE> off this container onto its leaf children (or, for a childless Epic, decompose it into leaf children or reclassify it to a leaf type); a parent's lifecycle state rolls up from its children and is never set to ready directly."`
237
239
 
238
240
  `product_relevant: false` — a build-ready container is a lifecycle/decomposition error for the caller to repair, not a product question.
239
241
 
@@ -284,8 +286,37 @@ gh issue view <number> --repo <org>/<repo> --json number,labels,state
284
286
  ```
285
287
 
286
288
  Confirm the parent issue exists and:
287
- - For non-Sub-task children: parent has `type:Epic` label.
288
- - For Sub-task children: parent has `type:Story`, `type:Task`, `type:Bug`, or `type:Improvement` (anything that can host sub-tasks).
289
+
290
+ - For an `Epic` child, first resolve whether the validator can prove the native PRD-parent shape
291
+ allowed by `prd-lifecycle-rollup`: merged project config has `source = github` and
292
+ `tracker = github`; the spec/live child's `org` and `repo` match configured `github.org` and
293
+ `github.repo`; and `parent_ref` names that same `org/repo`. These facts are available from the
294
+ existing spec/live ref plus project config; do not infer the exception from label spelling alone.
295
+ Only in that proven same-repository GitHub self-host shape may the parent qualify by having one of
296
+ the configured PRD lifecycle labels from
297
+ `github.labels.prd` (`draft`, `ready`, `in_review`, `blocked`, `ticketed`, `shipped`, or
298
+ `verified`; defaults use the `prd-*` namespace). Resolve the configured values from
299
+ `.lisa.config.local.json` over `.lisa.config.json`, using the defaults from `config-resolution`.
300
+ The `sentinel` label is not a lifecycle role and does not qualify. This is the native
301
+ PRD→generated-Epic hierarchy used when GitHub is both source and tracker in one repository; the
302
+ PRD parent does **not** need `type:Epic`. If any self-host/same-repository predicate is false, a
303
+ PRD label does not grant the exception: native hierarchy cannot cross repositories or source
304
+ systems, so a PRD-labelled parent alone FAILs F2.
305
+ - For a `Sub-task` child: the parent has `type:Story`, `type:Task`, `type:Bug`, or
306
+ `type:Improvement` (anything that can host sub-tasks). This allowlist is unchanged; a PRD
307
+ lifecycle label or `type:Epic` alone does not qualify.
308
+ - For every other non-Sub-task child: the parent has `type:Epic`. A PRD lifecycle label alone does
309
+ not qualify, so the Epic→Story (and Epic→ordinary-leaf) hierarchy remains enforced.
310
+
311
+ | child type | relationship shape | qualifying parent label | F2 |
312
+ |---|---|---|---|
313
+ | `Epic` | source GitHub + tracker GitHub + configured child repo = parent repo | configured PRD lifecycle label | **PASS** |
314
+ | `Epic` | cross-repository or source/tracker is not same-repo GitHub | PRD lifecycle label only | **FAIL** |
315
+ | `Epic` | permitted self-host shape | unconfigured `prd-*` lookalike or `prd-intake-feedback` sentinel only | **FAIL** |
316
+ | `Sub-task` | any | `type:Story`, `type:Task`, `type:Bug`, or `type:Improvement` | **PASS** |
317
+ | `Sub-task` | any | PRD lifecycle label or `type:Epic` only | **FAIL** |
318
+ | any other non-Sub-task | any | `type:Epic` | **PASS** |
319
+ | any other non-Sub-task | any | PRD lifecycle label only | **FAIL** |
289
320
 
290
321
  #### F3 — Linked issues exist
291
322
 
@@ -293,7 +324,35 @@ For each entry in `links`, run `gh issue view <number> --repo <link-org>/<link-r
293
324
 
294
325
  #### F4 — Required labels populated
295
326
 
296
- Per `Phase 5` of `lisa-github-write-issue`, every issue MUST carry: `type:<issue_type>`, `status:<status>`, `priority:<priority>`. If any are missing from the spec / live issue, FAIL with the missing label name.
327
+ Per `Phase 5` of `lisa-github-write-issue`, every issue MUST carry
328
+ `type:<issue_type>` and `priority:<priority>`. These two labels are unconditional: if either is
329
+ missing from the proposed spec or live issue, FAIL with the missing label name.
330
+
331
+ The `status:*` requirement uses this validator's S15 leaf/container classification while preserving
332
+ the writer's documented `build_ready` control-input defaults:
333
+
334
+ 1. Classify the issue structurally using the S15 child-resolution rules. A container (any issue
335
+ with child work, plus a childless `Epic`) may omit `status:*`; its state rolls up rather than
336
+ being assigned directly.
337
+ 2. For a proposed leaf spec, normalize omitted `build_ready` to `true`, preserving the writer's
338
+ backward-compatible default-ready behavior. Explicit `build_ready: false` means backlog mode.
339
+ 3. For a live issue ref, derive `build_ready` from the labels (`true` exactly when the S15-resolved
340
+ `READY_ROLE` from `github.labels.build.ready`, default `status:ready`, is present). A live backlog leaf without a status label
341
+ therefore validates as `build_ready: false`; live data cannot distinguish an explicit false from
342
+ a historical write that omitted the label.
343
+ 4. A leaf with normalized `build_ready: true` MUST carry that same resolved `READY_ROLE`. A leaf with `build_ready: false` may omit
344
+ `status:*`.
345
+
346
+ | classification | normalized build_ready | status label | F4 |
347
+ |---|---:|---|---|
348
+ | container | any | omitted | **PASS** |
349
+ | leaf | `false` | omitted | **PASS** |
350
+ | leaf | `true` | configured build-ready role (`status:ready` by default) | **PASS** |
351
+ | leaf | `true` | omitted or a different `status:*` label | **FAIL** |
352
+
353
+ F4 does not make a container build-ready. S15 remains the independent lifecycle prohibition: any
354
+ container carrying the build-ready role still FAILs S15, even though F4's status-presence check is
355
+ not applicable to containers.
297
356
 
298
357
  #### F5 — Required external access provable
299
358
 
@@ -322,7 +381,7 @@ system, and never invent or ask for credentials inline.
322
381
 
323
382
  ## Execution
324
383
 
325
- 1. Parse `$ARGUMENTS`. If it's an issue ref, fetch via `gh issue view --json` and derive the spec fields — including `build_ready` (label set contains `status:ready`) and `child_refs` (native sub-issues plus body task-list / `Blocked by #<n>` parentage, resolved as in `lisa-github-read-issue`) so S15 can classify the issue. Otherwise parse the YAML spec.
384
+ 1. Parse `$ARGUMENTS`. Resolve `READY_ROLE` from merged `github.labels.build.ready` config (default `status:ready`). If the input is an issue ref, fetch via `gh issue view --json` and derive the spec fields — including `build_ready` (label set contains the resolved `READY_ROLE`, not a hard-coded label) and `child_refs` (native sub-issues plus body task-list / `Blocked by #<n>` parentage, resolved as in `lisa-github-read-issue`) so S15 can classify the issue. Otherwise parse the YAML spec and preserve the proposed `build_ready` value for S15/F4 normalization.
326
385
  2. Confirm `gh auth status` succeeds before any feasibility gate runs.
327
386
  3. Run every Specification gate in order. Collect PASS / FAIL / N/A with a one-line reason.
328
387
  4. Unless the caller passed `--spec-only`, run every Feasibility gate.
@@ -67,6 +67,10 @@ and artifact refs. Callers do not get to omit the "unavailable" case; when trust
67
67
  missing they still pass an explicit entry with `source: unavailable` and nullable token/cost
68
68
  fields.
69
69
 
70
+ When the runtime exposes only a trustworthy subtotal, callers MUST use `source: measured-subset`,
71
+ write the subtotal to `measured_subset_tokens`, and leave `total_tokens: null`. Do not coerce a
72
+ known subset into `total_tokens`; rollups use `total_tokens` only for complete totals.
73
+
70
74
  ## Return shape
71
75
 
72
76
  Return structured output so callers can persist or log what happened without reparsing prose:
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.221.5",
3
+ "version": "2.222.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"