@codyswann/lisa 2.104.6 → 2.105.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 (46) hide show
  1. package/dist/utils/usage-accounting-rollup.d.ts +13 -0
  2. package/dist/utils/usage-accounting-rollup.d.ts.map +1 -0
  3. package/dist/utils/usage-accounting-rollup.js +46 -0
  4. package/dist/utils/usage-accounting-rollup.js.map +1 -0
  5. package/dist/utils/usage-accounting.d.ts +11 -1
  6. package/dist/utils/usage-accounting.d.ts.map +1 -1
  7. package/dist/utils/usage-accounting.js +23 -6
  8. package/dist/utils/usage-accounting.js.map +1 -1
  9. package/package.json +1 -1
  10. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  11. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  12. package/plugins/lisa/rules/config-resolution.md +7 -19
  13. package/plugins/lisa/rules/prd-lifecycle-rollup.md +16 -15
  14. package/plugins/lisa/scripts/queue-contract-resolution.mjs +0 -20
  15. package/plugins/lisa/skills/confluence-prd-intake/SKILL.md +14 -35
  16. package/plugins/lisa/skills/github-prd-intake/SKILL.md +13 -30
  17. package/plugins/lisa/skills/linear-prd-intake/SKILL.md +14 -32
  18. package/plugins/lisa/skills/notion-prd-intake/SKILL.md +12 -31
  19. package/plugins/lisa/skills/setup-confluence/SKILL.md +1 -1
  20. package/plugins/lisa/skills/verify-prd/SKILL.md +7 -7
  21. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  23. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  25. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  27. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  29. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  31. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  33. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  35. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  37. package/plugins/src/base/rules/config-resolution.md +7 -19
  38. package/plugins/src/base/rules/prd-lifecycle-rollup.md +16 -15
  39. package/plugins/src/base/scripts/queue-contract-resolution.mjs +0 -20
  40. package/plugins/src/base/skills/confluence-prd-intake/SKILL.md +14 -35
  41. package/plugins/src/base/skills/github-prd-intake/SKILL.md +13 -30
  42. package/plugins/src/base/skills/linear-prd-intake/SKILL.md +14 -32
  43. package/plugins/src/base/skills/notion-prd-intake/SKILL.md +12 -31
  44. package/plugins/src/base/skills/setup-confluence/SKILL.md +1 -1
  45. package/plugins/src/base/skills/verify-prd/SKILL.md +7 -7
  46. package/typescript/create-only/.github/workflows/claude.yml +3 -0
@@ -0,0 +1,13 @@
1
+ import type { LisaUsageChildArtifact, LisaUsageEntry } from "./usage-accounting.js";
2
+ /**
3
+ * Collect descendant usage entries and consulted child refs in deterministic order.
4
+ *
5
+ * @param childArtifacts Child artifacts consulted for the rollup.
6
+ * @param directEntryIds Direct entry ids already attached to the target artifact.
7
+ * @returns Dedupe descendant entries plus the unique child refs consulted.
8
+ */
9
+ export declare function collectLisaUsageChildArtifacts(childArtifacts: readonly LisaUsageChildArtifact[], directEntryIds: readonly string[]): {
10
+ childEntries: readonly LisaUsageEntry[];
11
+ childRefs: readonly string[];
12
+ };
13
+ //# sourceMappingURL=usage-accounting-rollup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-accounting-rollup.d.ts","sourceRoot":"","sources":["../../src/utils/usage-accounting-rollup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,cAAc,EACf,MAAM,uBAAuB,CAAC;AA4C/B;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,cAAc,EAAE,SAAS,sBAAsB,EAAE,EACjD,cAAc,EAAE,SAAS,MAAM,EAAE,GAChC;IACD,YAAY,EAAE,SAAS,cAAc,EAAE,CAAC;IACxC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B,CAeA"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Append a unique string to a stable-order list.
3
+ *
4
+ * @param items Existing ordered values.
5
+ * @param value Candidate value.
6
+ * @returns The original list when present/empty, otherwise a new list.
7
+ */
8
+ function appendUniqueString(items, value) {
9
+ if (value.length === 0 || items.includes(value)) {
10
+ return items;
11
+ }
12
+ return [...items, value];
13
+ }
14
+ /**
15
+ * Append a child usage entry when it is not already represented directly or by
16
+ * another descendant path.
17
+ *
18
+ * @param entries Existing ordered descendant entries.
19
+ * @param entry Candidate child usage entry.
20
+ * @param directEntryIds Direct entry ids that must never be counted as child totals.
21
+ * @returns The original list when the entry is already represented, otherwise a new list.
22
+ */
23
+ function appendUniqueChildEntry(entries, entry, directEntryIds) {
24
+ if (directEntryIds.includes(entry.entryId) ||
25
+ entries.some(existing => existing.entryId === entry.entryId)) {
26
+ return entries;
27
+ }
28
+ return [...entries, entry];
29
+ }
30
+ /**
31
+ * Collect descendant usage entries and consulted child refs in deterministic order.
32
+ *
33
+ * @param childArtifacts Child artifacts consulted for the rollup.
34
+ * @param directEntryIds Direct entry ids already attached to the target artifact.
35
+ * @returns Dedupe descendant entries plus the unique child refs consulted.
36
+ */
37
+ export function collectLisaUsageChildArtifacts(childArtifacts, directEntryIds) {
38
+ return childArtifacts.reduce((state, childArtifact) => ({
39
+ childEntries: childArtifact.entries.reduce((entries, entry) => appendUniqueChildEntry(entries, entry, directEntryIds), state.childEntries),
40
+ childRefs: appendUniqueString(state.childRefs, childArtifact.artifactRef),
41
+ }), {
42
+ childEntries: [],
43
+ childRefs: [],
44
+ });
45
+ }
46
+ //# sourceMappingURL=usage-accounting-rollup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-accounting-rollup.js","sourceRoot":"","sources":["../../src/utils/usage-accounting-rollup.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,SAAS,kBAAkB,CACzB,KAAwB,EACxB,KAAa;IAEb,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,sBAAsB,CAC7B,OAAkC,EAClC,KAAqB,EACrB,cAAiC;IAEjC,IACE,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC;QACtC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,CAAC,EAC5D,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,CAAC,GAAG,OAAO,EAAE,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAC5C,cAAiD,EACjD,cAAiC;IAKjC,OAAO,cAAc,CAAC,MAAM,CAC1B,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC;QACzB,YAAY,EAAE,aAAa,CAAC,OAAO,CAAC,MAAM,CACxC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CACjB,sBAAsB,CAAC,OAAO,EAAE,KAAK,EAAE,cAAc,CAAC,EACxD,KAAK,CAAC,YAAY,CACnB;QACD,SAAS,EAAE,kBAAkB,CAAC,KAAK,CAAC,SAAS,EAAE,aAAa,CAAC,WAAW,CAAC;KAC1E,CAAC,EACF;QACE,YAAY,EAAE,EAA+B;QAC7C,SAAS,EAAE,EAAuB;KACnC,CACF,CAAC;AACJ,CAAC"}
@@ -36,6 +36,13 @@ export interface LisaUsageRollup {
36
36
  totalCost: number | null;
37
37
  totalTokens: number | null;
38
38
  }
39
+ /**
40
+ *
41
+ */
42
+ export interface LisaUsageChildArtifact {
43
+ artifactRef: string;
44
+ entries: readonly LisaUsageEntry[];
45
+ }
39
46
  /**
40
47
  *
41
48
  */
@@ -62,9 +69,10 @@ export declare function mergeLisaUsageEntries(existingEntries: readonly LisaUsag
62
69
  *
63
70
  * @param entries Direct usage entries that should appear in the section.
64
71
  * @param previousRollup Existing rollup token parsed from the artifact, if any.
72
+ * @param childArtifacts Optional child ledgers to recompute descendant totals from current work.
65
73
  * @returns A deterministic rollup token payload for the managed section.
66
74
  */
67
- export declare function createLisaUsageRollup(entries: readonly LisaUsageEntry[], previousRollup?: LisaUsageRollup | null): LisaUsageRollup;
75
+ export declare function createLisaUsageRollup(entries: readonly LisaUsageEntry[], previousRollup?: LisaUsageRollup | null, childArtifacts?: readonly LisaUsageChildArtifact[]): LisaUsageRollup;
68
76
  /**
69
77
  * Render the machine-readable token for a single direct usage row.
70
78
  *
@@ -105,11 +113,13 @@ export declare function parseLisaUsageSection(document: string): ParsedLisaUsage
105
113
  *
106
114
  * @param document Existing artifact markdown or comment body.
107
115
  * @param input New usage content to merge into the managed section.
116
+ * @param input.childArtifacts Optional child ledgers to recompute descendant totals from current work.
108
117
  * @param input.entries Newly observed direct usage entries.
109
118
  * @param input.rollup Optional explicit rollup payload to serialize.
110
119
  * @returns The updated artifact markdown with exactly one managed usage block.
111
120
  */
112
121
  export declare function upsertLisaUsageSection(document: string, input: {
122
+ childArtifacts?: readonly LisaUsageChildArtifact[];
113
123
  entries: readonly LisaUsageEntry[];
114
124
  rollup?: LisaUsageRollup | null;
115
125
  }): string;
@@ -1 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C,EAAE,eAAe,GAAG,IAAI,CAAC;CACjC,GACA,MAAM,CA0BR"}
@@ -1,3 +1,5 @@
1
+ /* eslint-disable max-lines -- Usage ledger parsing, rendering, and rollup helpers share one public utility surface. */
2
+ import { collectLisaUsageChildArtifacts } from "./usage-accounting-rollup.js";
1
3
  import { sumNullableDecimals } from "./decimal-sum.js";
2
4
  export const LISA_USAGE_HEADING = "## Lisa Usage";
3
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;
@@ -184,16 +186,28 @@ export function mergeLisaUsageEntries(existingEntries, nextEntries) {
184
186
  *
185
187
  * @param entries Direct usage entries that should appear in the section.
186
188
  * @param previousRollup Existing rollup token parsed from the artifact, if any.
189
+ * @param childArtifacts Optional child ledgers to recompute descendant totals from current work.
187
190
  * @returns A deterministic rollup token payload for the managed section.
188
191
  */
189
- export function createLisaUsageRollup(entries, previousRollup) {
192
+ export function createLisaUsageRollup(entries, previousRollup, childArtifacts) {
190
193
  const directEntryIds = entries.map(entry => entry.entryId);
191
194
  const directTokens = sumNullable(entries.map(entry => entry.totalTokens));
192
195
  const directCost = sumNullableDecimals(entries.map(entry => entry.cost));
193
- const childEntryIds = previousRollup?.childEntryIds ?? [];
194
- const childRefs = previousRollup?.childRefs ?? [];
195
- const childTokens = previousRollup ? previousRollup.childTokens : null;
196
- const childCost = previousRollup ? previousRollup.childCost : null;
196
+ const hasChildArtifacts = childArtifacts !== undefined;
197
+ const collectedChildArtifacts = collectLisaUsageChildArtifacts(childArtifacts ?? [], directEntryIds);
198
+ const dedupedChildEntries = collectedChildArtifacts.childEntries;
199
+ const childEntryIds = hasChildArtifacts
200
+ ? dedupedChildEntries.map(entry => entry.entryId)
201
+ : (previousRollup?.childEntryIds ?? []);
202
+ const childRefs = hasChildArtifacts
203
+ ? collectedChildArtifacts.childRefs
204
+ : (previousRollup?.childRefs ?? []);
205
+ const childTokens = hasChildArtifacts
206
+ ? sumNullable(dedupedChildEntries.map(entry => entry.totalTokens))
207
+ : (previousRollup?.childTokens ?? null);
208
+ const childCost = hasChildArtifacts
209
+ ? sumNullableDecimals(dedupedChildEntries.map(entry => entry.cost))
210
+ : (previousRollup?.childCost ?? null);
197
211
  const totalTokens = directTokens === null && childTokens === null
198
212
  ? null
199
213
  : (directTokens ?? 0) + (childTokens ?? 0);
@@ -201,6 +215,7 @@ export function createLisaUsageRollup(entries, previousRollup) {
201
215
  ? null
202
216
  : sumNullableDecimals([directCost, childCost]);
203
217
  const currency = entries.find(entry => entry.currency !== null)?.currency ??
218
+ dedupedChildEntries.find(entry => entry.currency !== null)?.currency ??
204
219
  previousRollup?.currency ??
205
220
  null;
206
221
  return {
@@ -312,6 +327,7 @@ export function parseLisaUsageSection(document) {
312
327
  *
313
328
  * @param document Existing artifact markdown or comment body.
314
329
  * @param input New usage content to merge into the managed section.
330
+ * @param input.childArtifacts Optional child ledgers to recompute descendant totals from current work.
315
331
  * @param input.entries Newly observed direct usage entries.
316
332
  * @param input.rollup Optional explicit rollup payload to serialize.
317
333
  * @returns The updated artifact markdown with exactly one managed usage block.
@@ -321,7 +337,7 @@ export function upsertLisaUsageSection(document, input) {
321
337
  const mergedEntries = mergeLisaUsageEntries(parsed.entries, input.entries);
322
338
  const rollup = mergedEntries.length === 0 && input.rollup
323
339
  ? input.rollup
324
- : createLisaUsageRollup(mergedEntries, input.rollup ?? parsed.rollup);
340
+ : createLisaUsageRollup(mergedEntries, input.rollup ?? parsed.rollup, input.childArtifacts);
325
341
  const usageSection = renderLisaUsageSection({
326
342
  entries: mergedEntries,
327
343
  rollup,
@@ -335,4 +351,5 @@ export function upsertLisaUsageSection(document, input) {
335
351
  }
336
352
  return `${before}\n\n${usageSection}\n\n${after}\n`;
337
353
  }
354
+ /* eslint-enable max-lines -- End usage accounting public utility surface. */
338
355
  //# sourceMappingURL=usage-accounting.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage-accounting.js","sourceRoot":"","sources":["../../src/utils/usage-accounting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAkDlD,MAAM,aAAa,GACjB,uUAAuU,CAAC;AAE1U,MAAM,cAAc,GAClB,uNAAuN,CAAC;AAE1N;;;;;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;IAED,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,KAAa;IACrC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAS,gBAAgB,CAAC,KAAa;IAC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GED
@@ -82,7 +82,7 @@
82
82
  "lodash": ">=4.18.1"
83
83
  },
84
84
  "name": "@codyswann/lisa",
85
- "version": "2.104.6",
85
+ "version": "2.105.0",
86
86
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
87
87
  "main": "dist/index.js",
88
88
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.104.6",
3
+ "version": "2.105.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.104.6",
3
+ "version": "2.105.0",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -58,8 +58,7 @@ fi
58
58
  "verified": "<page-id>"
59
59
  },
60
60
  "dashboardPageId": "<page-id>",
61
- "feedbackPageId": "<page-id>",
62
- "rollup": { "closeOnShipped": false }
61
+ "feedbackPageId": "<page-id>"
63
62
  },
64
63
  "github": {
65
64
  "org": "<org-or-user>",
@@ -86,8 +85,7 @@ fi
86
85
  "ready": "prd-ready", "in_review": "prd-in-review",
87
86
  "blocked": "prd-blocked", "ticketed": "prd-ticketed",
88
87
  "shipped": "prd-shipped", "verified": "prd-verified",
89
- "sentinel": "prd-intake-feedback",
90
- "rollup": { "closeOnShipped": false }
88
+ "sentinel": "prd-intake-feedback"
91
89
  }
92
90
  }
93
91
  },
@@ -99,8 +97,7 @@ fi
99
97
  "draft": "Draft", "ready": "Ready", "in_review": "In Review",
100
98
  "blocked": "Blocked", "ticketed": "Ticketed", "shipped": "Shipped",
101
99
  "verified": "Verified"
102
- },
103
- "rollup": { "closeOnShipped": false }
100
+ }
104
101
  },
105
102
  "linear": {
106
103
  "workspace": "<workspace-slug>",
@@ -118,8 +115,7 @@ fi
118
115
  "ready": "prd-ready", "in_review": "prd-in-review",
119
116
  "blocked": "prd-blocked", "ticketed": "prd-ticketed",
120
117
  "shipped": "prd-shipped", "verified": "prd-verified",
121
- "sentinel": "prd-intake-feedback",
122
- "rollup": { "closeOnShipped": false }
118
+ "sentinel": "prd-intake-feedback"
123
119
  }
124
120
  }
125
121
  },
@@ -291,17 +287,9 @@ Every lifecycle skill operates on a fixed set of **roles** (`ready`, `claimed`,
291
287
  | `verified` | Shipped product empirically checked against the PRD | `Verified` (status) | `prd-verified` (label); parent-page lookup (Confluence) |
292
288
  | `sentinel` | (PRD-intake feedback issue marker, GitHub/Linear self-host only) | — | `prd-intake-feedback` |
293
289
 
294
- ### PRD rollup config (`prd.rollup`)
295
-
296
- PRD lifecycle completion is **derived** from the PRD's generated top-level work, not set independently — see the `prd-lifecycle-rollup` rule for the full contract (generated-top-level-work definition, per-vendor terminal-state predicate, the `shipped` transition, and the child-ref idempotency key). When all required generated top-level children are terminal, rollup transitions the PRD to its `shipped` role; the `prd.rollup` block configures the optional close/archive step that follows.
297
-
298
- The `rollup` object lives in each PRD-source vendor section (`github.labels.prd.rollup`, `linear.labels.prd.rollup`, `notion.rollup`, `confluence.rollup`):
299
-
300
- | Key | Required | Default | Notes |
301
- |-----|----------|---------|-------|
302
- | `closeOnShipped` | no | `false` | When `true`, rollup closes/archives the PRD after the `shipped` transition (GitHub: close the issue; Linear: move to a closed/archived state; JIRA: transition to Done; Confluence/Notion: archive where supported). When `false` (the default), the PRD is set to `shipped` but left open for a human to close. Closure never happens before all generated top-level work is terminal. |
290
+ ### PRD rollup behavior
303
291
 
304
- Like every other vocabulary key, `prd.rollup` is **optional** a missing block inherits `closeOnShipped: false`. The `shipped` transition itself is unconditional on the all-terminal condition; only the close/archive step is gated by this flag.
292
+ PRD lifecycle completion is **derived** from the PRD's generated top-level work, not set independently — see the `prd-lifecycle-rollup` rule for the full contract (generated-top-level-work definition, per-vendor terminal-state predicate, the `shipped` transition, verified native closure, and the child-ref idempotency key). When all required generated top-level children are terminal, rollup transitions the PRD to its `shipped` role and leaves it open/active for `/lisa:verify-prd`. There is no project-configurable close-on-shipped flag: provider-native closure/archive/completion happens only after `/lisa:verify-prd` passes and moves the PRD to `verified`.
305
293
 
306
294
  ### Repair intake config (`intake.repair`)
307
295
 
@@ -370,7 +358,7 @@ The true terminal `done` value is also the only value that triggers provider-nat
370
358
  ### What's configurable, what's not
371
359
 
372
360
  - **Status / label NAMES** are configurable per project — that's the point of the vocabulary maps.
373
- - **Role SEMANTICS and TRANSITIONS** are not. The build lifecycle is always `ready → claimed → done` (with optional `review` for label-driven systems). The PRD lifecycle is always `ready → in_review → (blocked | ticketed) → shipped`, then verification may move `shipped → verified` on a pass or `shipped → blocked` on a failed verification. `verified` is terminal and product-owned like `draft` and `shipped`; Lisa does not add `prd-verifying` or `prd-verification-failed` states. Skills hardcode these transitions because they encode the design intent of the framework, not the project's preferences.
361
+ - **Role SEMANTICS and TRANSITIONS** are not. The build lifecycle is always `ready → claimed → done` (with optional `review` for label-driven systems). The PRD lifecycle is always `ready → in_review → (blocked | ticketed) → shipped`, then verification may move `shipped → verified` on a pass or `shipped → ticketed` on a failed verification. `verified` is terminal and product-owned like `draft` and `shipped`; Lisa does not add `prd-verifying` or `prd-verification-failed` states. Skills hardcode these transitions because they encode the design intent of the framework, not the project's preferences.
374
362
  - **Extra statuses/labels** the project uses outside these roles are fine — lisa never touches them.
375
363
 
376
364
  ### Defaults vs. requirements
@@ -6,7 +6,7 @@ It defines four coupled things:
6
6
 
7
7
  1. **Generated top-level work** — what a PRD owns as children (its created Epics / top-level Stories), explicitly **excluding** leaf Sub-tasks.
8
8
  2. **Per-vendor terminal-state predicate** — how "this generated child is done" is decided for each source/tracker.
9
- 3. **PRD `shipped` transition + config-gated close/archive** — when and how a PRD rolls up to its terminal state and is closed/archived.
9
+ 3. **PRD `shipped` transition + verified native closure** — when and how a PRD rolls up to shipped, remains eligible for verification, and closes only after verified.
10
10
  4. **Idempotency dedupe key** — the child-ref identity that makes linking and rollup safe to re-run.
11
11
 
12
12
  This is the PRD-level companion to `leaf-only-lifecycle`: that rule governs the *build* lifecycle of leaf work units and how a **parent container** rolls up from its leaf children; this rule governs the *PRD* lifecycle and how the **PRD** rolls up from its generated top-level children. The two share the rollup shape (terminal children → parent advances) and the multi-env terminal handling, applied at different levels of the hierarchy.
@@ -52,12 +52,12 @@ Use this matrix when implementing or auditing a PRD-source integration. It descr
52
52
 
53
53
  | PRD source / tracker shape | Native hierarchy mechanism | Documented fallback | Closure behavior |
54
54
  |---|---|---|---|
55
- | **GitHub Issues (source and tracker in the same repo)** | Link generated top-level work as native sub-issues of the PRD issue when the repo supports GitHub sub-issues. The PRD's direct sub-issues are the generated top-level child set; descendants under those children are excluded from PRD rollup. | Always maintain the machine-readable `## Tickets` / `## Generated Work` section keyed by `owner/repo#number`, and use it when sub-issues are unavailable, disabled, or incomplete. | Rollup changes the PRD lifecycle label from `prd-ticketed` to `prd-shipped` when every required generated top-level issue is terminal. Close the PRD issue only when `github.labels.prd.rollup.closeOnShipped` is `true`; the default is to leave it open. |
56
- | **Linear** | Use Linear native grouping where the PRD also lives in Linear: generated top-level Issues are related through `parentId`, or a generated Project groups the generated Issues. Read only top-level Issues for PRD rollup. | Use the PRD's machine-readable generated-work section when the destination tracker is not Linear or native project / parent relationships cannot represent the PRD-to-work link. Entries are keyed by Linear issue or project identifier / UUID. | Rollup removes `prd-ticketed` and adds `prd-shipped` to the PRD project when every required generated top-level Issue / Project is completed. Archive or close the project only when `linear.labels.prd.rollup.closeOnShipped` is `true`; otherwise leave it active. |
57
- | **JIRA / Atlassian tracker work** | Prefer native Epic / parent fields, or a documented issue-link type where the PRD-to-Epic relationship can be represented in JIRA. JIRA child terminal state is read from the issue's Done status category. | If the PRD source is not JIRA or the native link cannot attach tracker work to the PRD artifact, record generated top-level JIRA issue keys in the PRD's generated-work section. | Rollup may transition a JIRA-hosted PRD to the configured shipped / Done status only after all required generated top-level issues are in the Done status category. Native resolution / closure is config-gated through the PRD rollup close-on-shipped setting. |
58
- | **Confluence PRDs** | No native issue hierarchy for tracker work. Confluence's native structure is used for PRD lifecycle lanes by parent page, not for destination work children. | The Confluence page's machine-readable `## Tickets` / `## Generated Work` section is the primary child source. Top-level generated work entries are keyed by destination ticket ref. | Rollup re-parents the PRD page from the `ticketed` parent to the `shipped` parent when every required generated-work entry is marked done. Archive the page only when `confluence.rollup.closeOnShipped` is `true`; otherwise leave it active. |
59
- | **Notion PRDs** | No native issue hierarchy for tracker work. Notion's native status/select property stores PRD lifecycle state, not generated ticket parentage. | The Notion page's machine-readable `## Tickets` / `## Generated Work` section is the primary child source. Top-level generated work entries are keyed by destination ticket ref. | Rollup sets the configured Notion status/select value to `Shipped` when every required generated-work entry is marked done. Archive the page only when `notion.rollup.closeOnShipped` is `true`; otherwise leave it active. |
60
- | **Cross-vendor PRD -> tracker** | Native hierarchy cannot cross systems, so the destination ticket is not expected to become a native child of the PRD artifact. Native tracker hierarchy still applies inside the destination system among generated Epics, Stories, and Sub-tasks. | The source PRD artifact's generated-work section is authoritative for the PRD-to-top-level-work child set, and each entry links to the destination ticket URL / key. | The PRD source owns the final lifecycle transition and optional close/archive. It evaluates terminal state using the destination tracker's predicate, then applies the source vendor's `shipped` transition and close-on-shipped behavior. |
55
+ | **GitHub Issues (source and tracker in the same repo)** | Link generated top-level work as native sub-issues of the PRD issue when the repo supports GitHub sub-issues. The PRD's direct sub-issues are the generated top-level child set; descendants under those children are excluded from PRD rollup. | Always maintain the machine-readable `## Tickets` / `## Generated Work` section keyed by `owner/repo#number`, and use it when sub-issues are unavailable, disabled, or incomplete. | Rollup changes the PRD lifecycle label from `prd-ticketed` to `prd-shipped` when every required generated top-level issue is terminal and leaves the issue open for `/lisa:verify-prd`. Verified PASS closes the issue natively. |
56
+ | **Linear** | Use Linear native grouping where the PRD also lives in Linear: generated top-level Issues are related through `parentId`, or a generated Project groups the generated Issues. Read only top-level Issues for PRD rollup. | Use the PRD's machine-readable generated-work section when the destination tracker is not Linear or native project / parent relationships cannot represent the PRD-to-work link. Entries are keyed by Linear issue or project identifier / UUID. | Rollup removes `prd-ticketed` and adds `prd-shipped` to the PRD project when every required generated top-level Issue / Project is completed and leaves it active for `/lisa:verify-prd`. Verified PASS archives/completes it natively. |
57
+ | **JIRA / Atlassian tracker work** | Prefer native Epic / parent fields, or a documented issue-link type where the PRD-to-Epic relationship can be represented in JIRA. JIRA child terminal state is read from the issue's Done status category. | If the PRD source is not JIRA or the native link cannot attach tracker work to the PRD artifact, record generated top-level JIRA issue keys in the PRD's generated-work section. | Rollup may transition a JIRA-hosted PRD to the configured shipped status only after all required generated top-level issues are in the Done status category. Verified PASS performs native completion where supported. |
58
+ | **Confluence PRDs** | No native issue hierarchy for tracker work. Confluence's native structure is used for PRD lifecycle lanes by parent page, not for destination work children. | The Confluence page's machine-readable `## Tickets` / `## Generated Work` section is the primary child source. Top-level generated work entries are keyed by destination ticket ref. | Rollup re-parents the PRD page from the `ticketed` parent to the `shipped` parent when every required generated-work entry is marked done and leaves the page active for `/lisa:verify-prd`. Verified PASS archives it where supported. |
59
+ | **Notion PRDs** | No native issue hierarchy for tracker work. Notion's native status/select property stores PRD lifecycle state, not generated ticket parentage. | The Notion page's machine-readable `## Tickets` / `## Generated Work` section is the primary child source. Top-level generated work entries are keyed by destination ticket ref. | Rollup sets the configured Notion status/select value to `Shipped` when every required generated-work entry is marked done and leaves the page active for `/lisa:verify-prd`. Verified PASS archives it where supported. |
60
+ | **Cross-vendor PRD -> tracker** | Native hierarchy cannot cross systems, so the destination ticket is not expected to become a native child of the PRD artifact. Native tracker hierarchy still applies inside the destination system among generated Epics, Stories, and Sub-tasks. | The source PRD artifact's generated-work section is authoritative for the PRD-to-top-level-work child set, and each entry links to the destination ticket URL / key. | The PRD source owns the lifecycle transition. It evaluates terminal state using the destination tracker's predicate, applies the source vendor's `shipped` transition, leaves the PRD open/active, then `/lisa:verify-prd` owns verified native closure. |
61
61
 
62
62
  ## Per-vendor terminal-state predicate
63
63
 
@@ -82,13 +82,14 @@ Where a vendor's terminal predicate references the build-status `done` role (Git
82
82
 
83
83
  **Single-environment collapse (this repo).** Lisa's own deploy has only `main`/`production` (`deploy.branches = production: main`, no dev/staging), so `done` is a single value, not a map, and the build lifecycle collapses to one chain: `ready → claimed (in-progress) → review (code-review) → done`. A generated top-level child is terminal when it reaches the single `status:done`; rollup never resolves a `dev` or `staging` `done` in this repo. This is the *collapsed* case of the generic rule, not a different rule — projects with more environments keep the env-keyed map.
84
84
 
85
- ## PRD `shipped` transition + config-gated close/archive
85
+ ## PRD `shipped` transition and verified native closure
86
86
 
87
- When **all required** generated top-level children are terminal, the PRD rolls up to its terminal PRD-lifecycle state and, where configured, is closed/archived:
87
+ When **all required** generated top-level children are terminal, the PRD rolls up to its `shipped` PRD-lifecycle state and remains open/active for the initiative-level verification loop:
88
88
 
89
- 1. **Transition to `shipped`.** Set the PRD to the configured `shipped` role (`config-resolution` PRD-lifecycle roles: `prd-shipped` label for GitHub/Linear, `Shipped` status for Notion, the shipped parent page for Confluence). The PRD lifecycle is `ready → in_review → (blocked | ticketed) → shipped → verified`; rollup performs the `ticketed → shipped` hop only, and only on the all-terminal condition. The subsequent `shipped → verified` (pass) / `shipped → blocked` (fail) hops are owned by PRD-level verification (`/lisa:verify-prd`), **not** by this rollup — see "PRD-level verification vs ticket verification" below.
90
- 2. **Config-gated close/archive.** When the source tool supports closure/archival *and* the project configures it, also close (GitHub: close the issue; Linear: move to a closed/archived state; JIRA: transition to Done; Confluence/Notion: archive where supported). Closure is **gated on configuration** via `prd.rollup.closeOnShipped` (`config-resolution`): when false (the default), the PRD is set to `shipped` but left open for a human to close; when true, rollup closes/archives it after the `shipped` transition. Never close a PRD before all generated top-level work is terminal (PRD #525 non-goal).
91
- 3. **Partial completion is a no-op + report.** If only some required children are terminal, leave the PRD in its current state and report the incomplete/blocked child set. Do not advance, do not close.
89
+ 1. **Transition to `shipped`.** Set the PRD to the configured `shipped` role (`config-resolution` PRD-lifecycle roles: `prd-shipped` label for GitHub/Linear, `Shipped` status for Notion, the shipped parent page for Confluence). The PRD lifecycle is `ready → in_review → (blocked | ticketed) → shipped → verified`; rollup performs the `ticketed → shipped` hop only, and only on the all-terminal condition. The subsequent `shipped → verified` (pass) / `shipped → ticketed` (fail) hops are owned by PRD-level verification (`/lisa:verify-prd`), **not** by this rollup — see "PRD-level verification vs ticket verification" below.
90
+ 2. **Leave `shipped` open for verification.** Rollup never closes, archives, or completes the PRD at the `shipped` hop. `shipped` is the queue for `/lisa:verify-prd`, so closing here would hide the PRD from the acceptance gate.
91
+ 3. **Verified closes natively.** When `/lisa:verify-prd` passes, it transitions `shipped verified` and then closes, archives, or completes the PRD where the source tool supports a native terminal action. The verified native close is mandatory and idempotent; there is no project-configurable close-on-verified escape hatch.
92
+ 4. **Partial completion is a no-op + report.** If only some required children are terminal, leave the PRD in its current state and report the incomplete/blocked child set. Do not advance, do not close.
92
93
 
93
94
  The PRD never advances to `shipped` on its own authority — it is **derived** from the generated-top-level-child set, exactly as a container's state is derived from its leaves in `leaf-only-lifecycle`.
94
95
 
@@ -118,7 +119,7 @@ The PRD never advances to `shipped` on its own authority — it is **derived** f
118
119
 
119
120
  **The self-healing FAIL loop.** When verify-prd fails it re-opens the PRD `shipped → ticketed` and creates **build-ready** fix tickets (registered as the PRD's generated work). Because the fix tickets are build-ready they are auto-claimed by the build queue with no human promotion; once they reach terminal, the `ticketed → shipped` rollup (Phase 3f) re-ships the PRD, and the next cycle's verify dispatch (Phase 3g) re-verifies. PASS ends at `verified`; FAIL starts another round. The loop **never auto-halts** (the failure report carries a verification-round count for human visibility) and **never** parks the PRD in `blocked`.
120
121
 
121
- Bounded, like the ready claim: `/lisa:verify-prd` is a heavy full flow (spec-conformance + empirical verification + fix-ticket creation), so a scanner verifies **one shipped PRD per cycle** and lets the scheduler drain the rest — the same one-item-per-cycle discipline the `ready` claim uses. After verify-prd runs, the PRD leaves `shipped` (to `verified` on pass, or `ticketed` on fail), so it is not re-picked by the shipped query that cycle; a PRD whose generated work is not actually terminal is guard-stopped by verify-prd and left `shipped` (verify-prd's gate, not the scanner's). A PRD that the project chose to close on ship (`*.rollup.closeOnShipped = true`) is out of the open verification queue — closing on ship is an explicit opt-out of the open loop. This dispatch is **behaviorally identical across all four PRD-intake skills** (the `github` / `linear` / `notion` / `confluence` `*-prd-intake` Phase 3g); only the `shipped`-role query surface differs.
122
+ Bounded, like the ready claim: `/lisa:verify-prd` is a heavy full flow (spec-conformance + empirical verification + fix-ticket creation), so a scanner verifies **one shipped PRD per cycle** and lets the scheduler drain the rest — the same one-item-per-cycle discipline the `ready` claim uses. After verify-prd runs, the PRD leaves `shipped` (to `verified` on pass, or `ticketed` on fail), so it is not re-picked by the shipped query that cycle; a PRD whose generated work is not actually terminal is guard-stopped by verify-prd and left `shipped` (verify-prd's gate, not the scanner's). This dispatch is **behaviorally identical across all four PRD-intake skills** (the `github` / `linear` / `notion` / `confluence` `*-prd-intake` Phase 3g); only the `shipped`-role query surface differs.
122
123
 
123
124
  ## Idempotency dedupe key
124
125
 
@@ -144,8 +145,8 @@ Skills that link generated work to a PRD or roll a PRD up cite this rule by slug
144
145
 
145
146
  - **PRD backlink / native linking** (`prd-backlink`) — record generated top-level work as native PRD children where supported; always write the documented generated-work fallback; dedupe by child-ref. *(LPC-1.1 #580, LPC-1.2 #582)*
146
147
  - **PRD coverage** (`prd-ticket-coverage`) — read the generated top-level child set deterministically from the recorded relationship, not from free-form comments.
147
- - **GitHub PRD closure rollup** (`github-prd-intake`) — detect terminal/incomplete/blocked child sets, transition to `prd-shipped`, and close the PRD issue when `prd.rollup.closeOnShipped` is configured. *(LPC-1.3 #583)*
148
- - **Linear / Confluence / Notion PRD rollup** (`linear-prd-intake`, `confluence-prd-intake`, `notion-prd-intake`) — mirror the GitHub closure rollup with each vendor's terminal predicate and close/archive support. *(LPC-1.3 #584)*
148
+ - **GitHub PRD shipped rollup** (`github-prd-intake`) — detect terminal/incomplete/blocked child sets, transition to `prd-shipped`, and leave the PRD open for `/lisa:verify-prd`. *(LPC-1.3 #583)*
149
+ - **Linear / Confluence / Notion PRD shipped rollup** (`linear-prd-intake`, `confluence-prd-intake`, `notion-prd-intake`) — mirror the GitHub shipped rollup with each vendor's terminal predicate and keep the PRD active for verification. *(LPC-1.3 #584)*
149
150
  - **Repair close-out** (`repair-intake`) — re-run the same generated-top-level-work terminal
150
151
  predicate to close out PRDs that were left open after all associated child work became terminal,
151
152
  without setting the product-owned `verified` role.
@@ -219,11 +219,6 @@ export function resolvePrdLifecycleRoles(
219
219
  DEFAULT_GITHUB_LINEAR_PRD_ROLES,
220
220
  { allowNull: false }
221
221
  ),
222
- rollup: {
223
- closeOnShipped: Boolean(
224
- config.github?.labels?.prd?.rollup?.closeOnShipped ?? false
225
- ),
226
- },
227
222
  };
228
223
  case "linear":
229
224
  return {
@@ -234,11 +229,6 @@ export function resolvePrdLifecycleRoles(
234
229
  DEFAULT_GITHUB_LINEAR_PRD_ROLES,
235
230
  { allowNull: false }
236
231
  ),
237
- rollup: {
238
- closeOnShipped: Boolean(
239
- config.linear?.labels?.prd?.rollup?.closeOnShipped ?? false
240
- ),
241
- },
242
232
  };
243
233
  case "notion":
244
234
  return {
@@ -250,11 +240,6 @@ export function resolvePrdLifecycleRoles(
250
240
  DEFAULT_NOTION_PRD_ROLES,
251
241
  { allowNull: false }
252
242
  ),
253
- rollup: {
254
- closeOnShipped: Boolean(
255
- config.notion?.rollup?.closeOnShipped ?? false
256
- ),
257
- },
258
243
  };
259
244
  case "confluence":
260
245
  return {
@@ -265,11 +250,6 @@ export function resolvePrdLifecycleRoles(
265
250
  DEFAULT_CONFLUENCE_PARENT_ROLES,
266
251
  { allowNull: true }
267
252
  ),
268
- rollup: {
269
- closeOnShipped: Boolean(
270
- config.confluence?.rollup?.closeOnShipped ?? false
271
- ),
272
- },
273
253
  };
274
254
  default:
275
255
  throw new Error(