@codyswann/lisa 4.101.5 → 4.101.7

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 (127) hide show
  1. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  2. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  3. package/dist/core/upstream-evidence-manifest.js +23 -7
  4. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  5. package/package.json +4 -4
  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/scripts/automation-run-record.mjs +678 -0
  9. package/plugins/lisa/.codex-plugin/scripts/blocker-edge-resolution.mjs +150 -0
  10. package/plugins/lisa/.codex-plugin/scripts/intake-blocker-reprobe.mjs +1379 -0
  11. package/plugins/lisa/.codex-plugin/scripts/intake-prework-denominator.mjs +249 -0
  12. package/plugins/lisa/.codex-plugin/scripts/operator-id-kinds.mjs +120 -0
  13. package/plugins/lisa/.codex-plugin/scripts/qa-signal-lifecycle.mjs +523 -0
  14. package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +549 -0
  15. package/plugins/lisa/.codex-plugin/scripts/resolve-lifecycle-role.mjs +347 -0
  16. package/plugins/lisa/.codex-plugin/skills/lisa-jira-evidence/SKILL.md +10 -5
  17. package/plugins/lisa/.codex-plugin/skills/lisa-jira-journey/SKILL.md +14 -11
  18. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-evidence/references/completion-authorization.md +7 -3
  19. package/plugins/lisa/skills/lisa-jira-evidence/SKILL.md +10 -5
  20. package/plugins/lisa/skills/lisa-jira-journey/SKILL.md +14 -11
  21. package/plugins/lisa/skills/lisa-tracker-evidence/references/completion-authorization.md +7 -3
  22. package/plugins/lisa-agy/plugin.json +1 -1
  23. package/plugins/lisa-agy/skills/lisa-jira-evidence/SKILL.md +10 -5
  24. package/plugins/lisa-agy/skills/lisa-jira-journey/SKILL.md +14 -11
  25. package/plugins/lisa-agy/skills/lisa-tracker-evidence/references/completion-authorization.md +7 -3
  26. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  28. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  29. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  33. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-copilot/skills/lisa-jira-evidence/SKILL.md +10 -5
  35. package/plugins/lisa-copilot/skills/lisa-jira-journey/SKILL.md +14 -11
  36. package/plugins/lisa-copilot/skills/lisa-tracker-evidence/references/completion-authorization.md +7 -3
  37. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-cursor/skills/lisa-jira-evidence/SKILL.md +10 -5
  39. package/plugins/lisa-cursor/skills/lisa-jira-journey/SKILL.md +14 -11
  40. package/plugins/lisa-cursor/skills/lisa-tracker-evidence/references/completion-authorization.md +7 -3
  41. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  43. package/plugins/lisa-devin/skills/lisa-jira-evidence/SKILL.md +10 -5
  44. package/plugins/lisa-devin/skills/lisa-jira-journey/SKILL.md +14 -11
  45. package/plugins/lisa-devin/skills/lisa-tracker-evidence/references/completion-authorization.md +7 -3
  46. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  48. package/plugins/lisa-expo/.codex-plugin/skills/jira-evidence/SKILL.md +10 -5
  49. package/plugins/lisa-expo/.codex-plugin/skills/jira-journey/SKILL.md +14 -11
  50. package/plugins/lisa-expo/skills/jira-evidence/SKILL.md +10 -5
  51. package/plugins/lisa-expo/skills/jira-journey/SKILL.md +14 -11
  52. package/plugins/lisa-expo-agy/plugin.json +1 -1
  53. package/plugins/lisa-expo-agy/skills/jira-evidence/SKILL.md +10 -5
  54. package/plugins/lisa-expo-agy/skills/jira-journey/SKILL.md +14 -11
  55. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-expo-copilot/skills/jira-evidence/SKILL.md +10 -5
  57. package/plugins/lisa-expo-copilot/skills/jira-journey/SKILL.md +14 -11
  58. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-expo-cursor/skills/jira-evidence/SKILL.md +10 -5
  60. package/plugins/lisa-expo-cursor/skills/jira-journey/SKILL.md +14 -11
  61. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  63. package/plugins/lisa-expo-devin/skills/jira-evidence/SKILL.md +10 -5
  64. package/plugins/lisa-expo-devin/skills/jira-journey/SKILL.md +14 -11
  65. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  67. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  68. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  72. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  74. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  75. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  79. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  81. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  82. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  86. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  87. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  88. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  89. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  90. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  92. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  93. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  94. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  95. package/plugins/lisa-rails/.codex-plugin/skills/jira-evidence/SKILL.md +10 -5
  96. package/plugins/lisa-rails/skills/jira-evidence/SKILL.md +10 -5
  97. package/plugins/lisa-rails-agy/plugin.json +1 -1
  98. package/plugins/lisa-rails-agy/skills/jira-evidence/SKILL.md +10 -5
  99. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  100. package/plugins/lisa-rails-copilot/skills/jira-evidence/SKILL.md +10 -5
  101. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  102. package/plugins/lisa-rails-cursor/skills/jira-evidence/SKILL.md +10 -5
  103. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  104. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  105. package/plugins/lisa-rails-devin/skills/jira-evidence/SKILL.md +10 -5
  106. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  107. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  108. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  109. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  111. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  112. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  113. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  114. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  115. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  116. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  118. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  119. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  120. package/plugins/src/base/skills/lisa-jira-evidence/SKILL.md +10 -5
  121. package/plugins/src/base/skills/lisa-jira-journey/SKILL.md +14 -11
  122. package/plugins/src/base/skills/lisa-tracker-evidence/references/completion-authorization.md +7 -3
  123. package/plugins/src/expo/skills/jira-evidence/SKILL.md +10 -5
  124. package/plugins/src/expo/skills/jira-journey/SKILL.md +14 -11
  125. package/plugins/src/rails/skills/jira-evidence/SKILL.md +10 -5
  126. package/scripts/generate-codex-plugin-artifacts.mjs +6 -0
  127. package/scripts/lib/codex-shared-scripts.mjs +156 -0
@@ -0,0 +1,347 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Lifecycle-role resolution — the single resolver for every vendor.
4
+ *
5
+ * ## The defect this replaces
6
+ *
7
+ * Twelve skills inlined their own `read_role()` bash helper. Hashing the
8
+ * function bodies produced ELEVEN distinct implementations — only
9
+ * `lisa-linear-build-intake` and `lisa-linear-evidence` agreed. Copy-paste with
10
+ * no shared source is why the three vendors drifted apart on the same contract.
11
+ *
12
+ * The drift was not cosmetic. `lisa-linear-evidence` resolved
13
+ * `read_role review "In Review"` — a NON-EMPTY default — while
14
+ * `lisa-jira-evidence/scripts/post-evidence.sh` resolved the same role with
15
+ * `REVIEW=""` and an explicit skip branch. Same role, opposite behaviour, on the
16
+ * question of whether an unconfigured review step exists at all.
17
+ *
18
+ * ## R1 — absent means SKIP, never default
19
+ *
20
+ * `ready`, `claimed`, `blocked` and `done` are REQUIRED: a project that omits
21
+ * them is misconfigured and the caller should say so. `review` and the `qa.*`
22
+ * roles are OPTIONAL and have NO built-in default, so omitting one means the
23
+ * lifecycle skips that transition entirely.
24
+ *
25
+ * This is the difference between "not customized" and "we don't do this step",
26
+ * which a defaulting resolver cannot express. Measured downstream: a project
27
+ * deliberately bound no `review` role — a PR-open ticket was meant to stay in
28
+ * `claimed` until it reached an environment — and agents moved issues into a
29
+ * human-only review state anyway, because every layer that could have honoured
30
+ * the omission supplied a default instead.
31
+ *
32
+ * ## R2 — a fallback may inform a READ, never supply a WRITE target
33
+ *
34
+ * Linear states carry a machine-readable `type`, so a skill may fall back to
35
+ * resolving a role by type when the configured name is missing — the
36
+ * `config-resolution` rule permits this "but only to *read* … it must never
37
+ * invent a state to write into."
38
+ *
39
+ * Nothing enforced that sentence. The fallback selects the lowest-position
40
+ * `started` state, and on the board where this was measured the states ranked
41
+ * `blocked` (-1989.26), `claimed` (-1478.50), then two unbound human-only review
42
+ * states at -1209.69 and -1079.70. With `blocked` and `claimed` already taken,
43
+ * the fallback returned the first unbound one — precisely where two issues
44
+ * landed. Not fuzzy matching; position ordering, used for a write.
45
+ *
46
+ * `--intent=write` therefore refuses to return a fallback value and reports a
47
+ * setup defect instead. `--intent=read` may use one, and always reports which.
48
+ *
49
+ * ## Why a script rather than a shared bash snippet
50
+ *
51
+ * A snippet is copy-paste, which is the disease. Skills shell out to
52
+ * `${CLAUDE_PLUGIN_ROOT}/scripts/…` for exactly this reason elsewhere
53
+ * (`lifecycle-label-trust.mjs`, `automation-run-record.mjs`), and a real process
54
+ * boundary means the resolution can be unit-tested rather than re-read.
55
+ * @module scripts/resolve-lifecycle-role
56
+ */
57
+
58
+ import { readFileSync, realpathSync } from "node:fs";
59
+ import { fileURLToPath } from "node:url";
60
+
61
+ /** Config file consulted first; its keys override the committed file. */
62
+ export const LOCAL_CONFIG = ".lisa.config.local.json";
63
+
64
+ /** The committed config file. */
65
+ export const GLOBAL_CONFIG = ".lisa.config.json";
66
+
67
+ /**
68
+ * Roles a project MUST bind. Omitting one is a setup defect, not a policy
69
+ * choice — there is no coherent lifecycle without a ready lane, a claimed lane,
70
+ * a blocked lane and a terminal.
71
+ */
72
+ export const REQUIRED_ROLES = Object.freeze([
73
+ "ready",
74
+ "claimed",
75
+ "blocked",
76
+ "done",
77
+ ]);
78
+
79
+ /**
80
+ * Roles a project MAY bind. Omitting one means the lifecycle skips that
81
+ * transition. These have NO built-in default — that is the whole point of R1.
82
+ */
83
+ export const OPTIONAL_ROLES = Object.freeze(["review", "human_needed"]);
84
+
85
+ /** Where each vendor keeps its build lifecycle role map. */
86
+ export const VENDOR_ROOTS = Object.freeze({
87
+ jira: "jira.workflow",
88
+ linear: "linear.workflow",
89
+ github: "github.labels.build",
90
+ });
91
+
92
+ /** GitHub's PRD lifecycle is a separate required role map from build work. */
93
+ const GITHUB_PRD_PREFIX = "prd.";
94
+
95
+ /** Resolution outcomes, reported so a caller never has to guess what happened. */
96
+ export const OUTCOMES = Object.freeze({
97
+ CONFIGURED: "configured",
98
+ UNSET_OPTIONAL: "unset-optional",
99
+ UNSET_REQUIRED: "unset-required",
100
+ FALLBACK_REFUSED: "fallback-refused-for-write",
101
+ });
102
+
103
+ /**
104
+ * Read a dotted path out of a parsed config object.
105
+ *
106
+ * @param {unknown} source parsed config
107
+ * @param {string} path dotted key path, e.g. `linear.workflow.review`
108
+ * @returns {unknown} the value, or undefined when any segment is missing
109
+ */
110
+ export const readPath = (source, path) => {
111
+ let cursor = source;
112
+ for (const segment of path.split(".")) {
113
+ if (cursor === null || typeof cursor !== "object" || !(segment in cursor))
114
+ return undefined;
115
+ cursor = cursor[segment];
116
+ }
117
+ return cursor;
118
+ };
119
+
120
+ /**
121
+ * Parse a config file, treating an unreadable or malformed file as absent.
122
+ *
123
+ * A malformed local override must not silently mask the committed file, so the
124
+ * caller is told which files actually parsed via the returned `sources`.
125
+ *
126
+ * @param {string} file path to read
127
+ * @returns {{ value: object | undefined, error: string | undefined }} parse result
128
+ */
129
+ export const parseConfig = file => {
130
+ let raw;
131
+ try {
132
+ raw = readFileSync(file, "utf8");
133
+ } catch {
134
+ return { value: undefined, error: undefined };
135
+ }
136
+ try {
137
+ return { value: JSON.parse(raw), error: undefined };
138
+ } catch (cause) {
139
+ return {
140
+ value: undefined,
141
+ error: `${file} is not valid JSON: ${cause.message}`,
142
+ };
143
+ }
144
+ };
145
+
146
+ /**
147
+ * Resolve one lifecycle role for one vendor.
148
+ *
149
+ * Resolution order is local config → global config → (nothing). There is no
150
+ * built-in default tier: see R1 in the module docblock.
151
+ *
152
+ * @param {object} options resolution inputs
153
+ * @param {string} options.role role name (`ready`, `review`, `human_needed`, …)
154
+ * @param {string} options.vendor one of `jira` | `linear` | `github`
155
+ * @param {"read" | "write"} [options.intent] what the caller will do with it
156
+ * @param {string} [options.env] env key when resolving the env-keyed `done` map
157
+ * @param {object} [options.local] pre-parsed local config (tests)
158
+ * @param {object} [options.global] pre-parsed global config (tests)
159
+ * @param {string} [options.fallback] a value a vendor fallback would supply
160
+ * @returns {{ value: string, outcome: string, source: string, message: string }} resolution
161
+ */
162
+ export const resolveRole = ({
163
+ role,
164
+ vendor,
165
+ intent = "read",
166
+ env,
167
+ local,
168
+ global: globalConfig,
169
+ fallback,
170
+ }) => {
171
+ let root = VENDOR_ROOTS[vendor];
172
+ let configuredRole = role;
173
+ if (vendor === "github" && role.startsWith(GITHUB_PRD_PREFIX)) {
174
+ root = "github.labels.prd";
175
+ configuredRole = role.slice(GITHUB_PRD_PREFIX.length);
176
+ }
177
+ if (!root) {
178
+ return {
179
+ value: "",
180
+ outcome: OUTCOMES.UNSET_REQUIRED,
181
+ source: "none",
182
+ message: `Unknown vendor '${vendor}'. Expected one of: ${Object.keys(VENDOR_ROOTS).join(", ")}.`,
183
+ };
184
+ }
185
+
186
+ // `done` is env-keyed on every vendor; an env selects one rung of the map.
187
+ const path =
188
+ env && configuredRole === "done"
189
+ ? `${root}.done.${env}`
190
+ : `${root}.${configuredRole}`;
191
+
192
+ for (const [label, source] of [
193
+ ["local", local],
194
+ ["global", globalConfig],
195
+ ]) {
196
+ const found = readPath(source, path);
197
+ if (typeof found === "string" && found.length > 0) {
198
+ return {
199
+ value: found,
200
+ outcome: OUTCOMES.CONFIGURED,
201
+ source: label,
202
+ message: `${path} = ${found} (from ${label} config)`,
203
+ };
204
+ }
205
+ }
206
+
207
+ const optional =
208
+ !role.startsWith(GITHUB_PRD_PREFIX) &&
209
+ OPTIONAL_ROLES.includes(configuredRole);
210
+
211
+ // R2 — a fallback may inform a read, never supply a write target.
212
+ if (fallback && intent === "write") {
213
+ return {
214
+ value: "",
215
+ outcome: OUTCOMES.FALLBACK_REFUSED,
216
+ source: "none",
217
+ message:
218
+ `Refusing to write to '${fallback}': it was derived by fallback, not named at ${path}. ` +
219
+ `A fallback may inform a read but must never supply a write target (config-resolution). ` +
220
+ `Bind ${path} explicitly, or run /lisa:setup:${vendor}.`,
221
+ };
222
+ }
223
+ if (fallback) {
224
+ return {
225
+ value: fallback,
226
+ outcome: OUTCOMES.CONFIGURED,
227
+ source: "fallback",
228
+ message: `${path} is unset; using fallback '${fallback}' for a READ only.`,
229
+ };
230
+ }
231
+
232
+ if (optional) {
233
+ return {
234
+ value: "",
235
+ outcome: OUTCOMES.UNSET_OPTIONAL,
236
+ source: "none",
237
+ message:
238
+ `No ${path} configured; skipping the ${role} transition. ` +
239
+ `This is a supported configuration, not an error — the item stays in its current role.`,
240
+ };
241
+ }
242
+
243
+ return {
244
+ value: "",
245
+ outcome: OUTCOMES.UNSET_REQUIRED,
246
+ source: "none",
247
+ message: `Required role '${role}' is not configured at ${path}. Run /lisa:setup:${vendor}.`,
248
+ };
249
+ };
250
+
251
+ /**
252
+ * Parse `--key=value` / `--key value` argv into a plain object.
253
+ *
254
+ * @param {string[]} argv raw arguments
255
+ * @returns {Record<string, string>} parsed flags
256
+ */
257
+ export const parseArgs = argv => {
258
+ const out = {};
259
+ for (let index = 0; index < argv.length; index += 1) {
260
+ const token = argv[index];
261
+ if (!token.startsWith("--")) continue;
262
+ const [key, inline] = token.slice(2).split("=");
263
+ if (inline !== undefined) {
264
+ out[key] = inline;
265
+ continue;
266
+ }
267
+ const next = argv[index + 1];
268
+ if (next && !next.startsWith("--")) {
269
+ out[key] = next;
270
+ index += 1;
271
+ } else {
272
+ out[key] = "true";
273
+ }
274
+ }
275
+ return out;
276
+ };
277
+
278
+ /**
279
+ * CLI entry point.
280
+ *
281
+ * Exit codes are the contract callers branch on:
282
+ * - `0` with a value on stdout — the role is configured (or a read fallback).
283
+ * - `0` with EMPTY stdout — an optional role is unset; skip the transition.
284
+ * - `2` — a required role is unset, or a write was refused a fallback value.
285
+ *
286
+ * The distinction between the two `0` cases is deliberate: an unset optional
287
+ * role is a supported configuration, so it must not look like a failure.
288
+ *
289
+ * @param {string[]} argv arguments after the script name
290
+ * @returns {number} process exit code
291
+ */
292
+ export const main = argv => {
293
+ const args = parseArgs(argv);
294
+ if (!args.role || !args.vendor) {
295
+ process.stderr.write(
296
+ "usage: resolve-lifecycle-role.mjs --role <name> --vendor <jira|linear|github> " +
297
+ "[--intent read|write] [--env dev|staging|production] [--fallback <name>]\n"
298
+ );
299
+ return 2;
300
+ }
301
+
302
+ const local = parseConfig(args.local ?? LOCAL_CONFIG);
303
+ const globalConfig = parseConfig(args.config ?? GLOBAL_CONFIG);
304
+ for (const parsed of [local, globalConfig]) {
305
+ if (parsed.error) {
306
+ process.stderr.write(`${parsed.error}\n`);
307
+ return 2;
308
+ }
309
+ }
310
+
311
+ const result = resolveRole({
312
+ role: args.role,
313
+ vendor: args.vendor,
314
+ intent: args.intent ?? "read",
315
+ env: args.env,
316
+ fallback: args.fallback,
317
+ local: local.value,
318
+ global: globalConfig.value,
319
+ });
320
+
321
+ if (args.json === "true") {
322
+ process.stdout.write(`${JSON.stringify(result)}\n`);
323
+ } else if (result.value) {
324
+ process.stdout.write(`${result.value}\n`);
325
+ }
326
+
327
+ if (result.outcome === OUTCOMES.CONFIGURED) return 0;
328
+ if (result.outcome === OUTCOMES.UNSET_OPTIONAL) {
329
+ process.stderr.write(`${result.message}\n`);
330
+ return 0;
331
+ }
332
+ process.stderr.write(`${result.message}\n`);
333
+ return 2;
334
+ };
335
+
336
+ const invokedDirectly = (() => {
337
+ try {
338
+ return (
339
+ realpathSync(process.argv[1] ?? "") ===
340
+ realpathSync(fileURLToPath(import.meta.url))
341
+ );
342
+ } catch {
343
+ return false;
344
+ }
345
+ })();
346
+
347
+ if (invokedDirectly) process.exit(main(process.argv.slice(2)));
@@ -62,20 +62,25 @@ If either is missing, **refuse to post**: stop and report the missing Not-establ
62
62
 
63
63
  ## Usage
64
64
 
65
+ Resolve the evidence release once, before posting. When `generate-templates.py` wrote the evidence links, use the same release it used so the links match the uploads. If the release cannot be used (for example, it is nearly full), the step prints `Evidence release not usable; stop.` and fails: stop there and report it instead of posting.
66
+
67
+ If you came here from jira-journey, `generate-templates.py` already wrote the links: skip the block below and reuse the release name jira-journey printed in its Step 4, because resolving again can pick a different month's release.
68
+
65
69
  ```bash
66
- bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>
70
+ unset LISA_EVIDENCE_RELEASE; LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure) || { echo "Evidence release not usable; stop."; false; } &&
71
+ export LISA_EVIDENCE_RELEASE && echo "Evidence release: $LISA_EVIDENCE_RELEASE"
67
72
  ```
68
73
 
69
- ### Example
74
+ Some agent runtimes start a new shell for every command, and a new shell forgets an exported value. So put the printed release name in front of every later command that reads it, as `LISA_EVIDENCE_RELEASE=<name>`; the commands below show where.
70
75
 
71
76
  ```bash
72
- bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 42
77
+ LISA_EVIDENCE_RELEASE=<name> bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>
73
78
  ```
74
79
 
75
- When `generate-templates.py` wrote the evidence links, run both with the same exported release so the links match the uploads:
80
+ ### Example
76
81
 
77
82
  ```bash
78
- export LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure)
83
+ LISA_EVIDENCE_RELEASE=pr-assets bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 42
79
84
  ```
80
85
 
81
86
  `post-evidence.sh` uses `LISA_EVIDENCE_RELEASE` when it is set, after the resolver confirms it is one of the project's evidence releases and is not nearly full.
@@ -122,10 +122,19 @@ evidence/
122
122
 
123
123
  ### Step 4: Generate Evidence Templates
124
124
 
125
- After capturing all evidence, run the template generator:
125
+ The GitHub links point at the evidence release. Resolve it once, before generating templates, so the links and the uploads in Step 5 name the same release even across a month boundary. `--ensure` creates the release when it is missing. If the release cannot be used (for example, it is nearly full), the step prints `Evidence release not usable; stop.` and fails: stop there and report it instead of continuing.
126
126
 
127
127
  ```bash
128
- python3 .claude/skills/jira-journey/scripts/generate-templates.py \
128
+ unset LISA_EVIDENCE_RELEASE; LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure) || { echo "Evidence release not usable; stop."; false; } &&
129
+ export LISA_EVIDENCE_RELEASE && echo "Evidence release: $LISA_EVIDENCE_RELEASE"
130
+ ```
131
+
132
+ Some agent runtimes start a new shell for every command, and a new shell forgets an exported value. So put the printed release name in front of every later command that reads it, as `LISA_EVIDENCE_RELEASE=<name>`; the commands below show where.
133
+
134
+ After capturing all evidence, run the template generator with that release name:
135
+
136
+ ```bash
137
+ LISA_EVIDENCE_RELEASE=<name> python3 .claude/skills/jira-journey/scripts/generate-templates.py \
129
138
  <TICKET_ID> \
130
139
  <PR_NUMBER> \
131
140
  <BRANCH_NAME> \
@@ -134,20 +143,14 @@ python3 .claude/skills/jira-journey/scripts/generate-templates.py \
134
143
 
135
144
  This generates `evidence/comment.txt` (JIRA wiki markup) and `evidence/comment.md` (GitHub markdown) with evidence formatted as code blocks.
136
145
 
137
- The GitHub links point at the evidence release. Resolve it once, before generating templates, and keep it exported for Step 5 so the links and the uploads name the same release even across a month boundary:
138
-
139
- ```bash
140
- export LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure)
141
- ```
142
-
143
- `--ensure` creates the release when it is missing and stops, in plain words, when it is nearly full. Both `generate-templates.py` and `post-evidence.sh` read `LISA_EVIDENCE_RELEASE`; `post-evidence.sh` still validates and capacity-checks it. Without it they resolve the configured release themselves (default `pr-assets`).
146
+ Both `generate-templates.py` and `post-evidence.sh` read `LISA_EVIDENCE_RELEASE`; `post-evidence.sh` still validates and capacity-checks it. Without it they resolve the configured release themselves (default `pr-assets`).
144
147
 
145
148
  ### Step 5: Post Evidence
146
149
 
147
- Use the jira-evidence skill to post everything:
150
+ Use the jira-evidence skill to post everything, with the same release name as Step 4:
148
151
 
149
152
  ```bash
150
- bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> ./evidence <PR_NUMBER>
153
+ LISA_EVIDENCE_RELEASE=<name> bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> ./evidence <PR_NUMBER>
151
154
  ```
152
155
 
153
156
  ### Step 6: Verify
@@ -177,9 +177,13 @@ template listed in `verification.completion.acceptedEvidenceReleases`, so
177
177
  proof published before a rename or rotation keeps validating. Only releases in
178
178
  the implementation repository are accepted.
179
179
 
180
- `LISA_EVIDENCE_RELEASE` pins the concrete release for one run (skill scripts
181
- export it once so links and uploads agree). It must be one of the accepted
182
- releases; `evidence-release --ensure` still creates and capacity-checks it.
180
+ `LISA_EVIDENCE_RELEASE` pins the concrete release for one run. Skills resolve
181
+ it once with `evidence-release --ensure`, stop when that refuses, and pass the
182
+ printed name inline (`LISA_EVIDENCE_RELEASE=<name>`) on every later command,
183
+ because some agent runtimes start a new shell for each command and lose an
184
+ exported value; that keeps links and uploads on the same release. It must be
185
+ one of the accepted releases; `evidence-release --ensure` still creates and
186
+ capacity-checks it.
183
187
 
184
188
  Creating an evidence release is a real GitHub release: it fires `release`
185
189
  webhook and workflow events and adds a git tag of the same name. Workflows
@@ -60,20 +60,25 @@ If either is missing, **refuse to post**: stop and report the missing Not-establ
60
60
 
61
61
  ## Usage
62
62
 
63
+ Resolve the evidence release once, before posting. When `generate-templates.py` wrote the evidence links, use the same release it used so the links match the uploads. If the release cannot be used (for example, it is nearly full), the step prints `Evidence release not usable; stop.` and fails: stop there and report it instead of posting.
64
+
65
+ If you came here from jira-journey, `generate-templates.py` already wrote the links: skip the block below and reuse the release name jira-journey printed in its Step 4, because resolving again can pick a different month's release.
66
+
63
67
  ```bash
64
- bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>
68
+ unset LISA_EVIDENCE_RELEASE; LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure) || { echo "Evidence release not usable; stop."; false; } &&
69
+ export LISA_EVIDENCE_RELEASE && echo "Evidence release: $LISA_EVIDENCE_RELEASE"
65
70
  ```
66
71
 
67
- ### Example
72
+ Some agent runtimes start a new shell for every command, and a new shell forgets an exported value. So put the printed release name in front of every later command that reads it, as `LISA_EVIDENCE_RELEASE=<name>`; the commands below show where.
68
73
 
69
74
  ```bash
70
- bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 42
75
+ LISA_EVIDENCE_RELEASE=<name> bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>
71
76
  ```
72
77
 
73
- When `generate-templates.py` wrote the evidence links, run both with the same exported release so the links match the uploads:
78
+ ### Example
74
79
 
75
80
  ```bash
76
- export LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure)
81
+ LISA_EVIDENCE_RELEASE=pr-assets bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 42
77
82
  ```
78
83
 
79
84
  `post-evidence.sh` uses `LISA_EVIDENCE_RELEASE` when it is set, after the resolver confirms it is one of the project's evidence releases and is not nearly full.
@@ -120,10 +120,19 @@ evidence/
120
120
 
121
121
  ### Step 4: Generate Evidence Templates
122
122
 
123
- After capturing all evidence, run the template generator:
123
+ The GitHub links point at the evidence release. Resolve it once, before generating templates, so the links and the uploads in Step 5 name the same release even across a month boundary. `--ensure` creates the release when it is missing. If the release cannot be used (for example, it is nearly full), the step prints `Evidence release not usable; stop.` and fails: stop there and report it instead of continuing.
124
124
 
125
125
  ```bash
126
- python3 .claude/skills/jira-journey/scripts/generate-templates.py \
126
+ unset LISA_EVIDENCE_RELEASE; LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure) || { echo "Evidence release not usable; stop."; false; } &&
127
+ export LISA_EVIDENCE_RELEASE && echo "Evidence release: $LISA_EVIDENCE_RELEASE"
128
+ ```
129
+
130
+ Some agent runtimes start a new shell for every command, and a new shell forgets an exported value. So put the printed release name in front of every later command that reads it, as `LISA_EVIDENCE_RELEASE=<name>`; the commands below show where.
131
+
132
+ After capturing all evidence, run the template generator with that release name:
133
+
134
+ ```bash
135
+ LISA_EVIDENCE_RELEASE=<name> python3 .claude/skills/jira-journey/scripts/generate-templates.py \
127
136
  <TICKET_ID> \
128
137
  <PR_NUMBER> \
129
138
  <BRANCH_NAME> \
@@ -132,20 +141,14 @@ python3 .claude/skills/jira-journey/scripts/generate-templates.py \
132
141
 
133
142
  This generates `evidence/comment.txt` (JIRA wiki markup) and `evidence/comment.md` (GitHub markdown) with evidence formatted as code blocks.
134
143
 
135
- The GitHub links point at the evidence release. Resolve it once, before generating templates, and keep it exported for Step 5 so the links and the uploads name the same release even across a month boundary:
136
-
137
- ```bash
138
- export LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure)
139
- ```
140
-
141
- `--ensure` creates the release when it is missing and stops, in plain words, when it is nearly full. Both `generate-templates.py` and `post-evidence.sh` read `LISA_EVIDENCE_RELEASE`; `post-evidence.sh` still validates and capacity-checks it. Without it they resolve the configured release themselves (default `pr-assets`).
144
+ Both `generate-templates.py` and `post-evidence.sh` read `LISA_EVIDENCE_RELEASE`; `post-evidence.sh` still validates and capacity-checks it. Without it they resolve the configured release themselves (default `pr-assets`).
142
145
 
143
146
  ### Step 5: Post Evidence
144
147
 
145
- Use the jira-evidence skill to post everything:
148
+ Use the jira-evidence skill to post everything, with the same release name as Step 4:
146
149
 
147
150
  ```bash
148
- bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> ./evidence <PR_NUMBER>
151
+ LISA_EVIDENCE_RELEASE=<name> bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> ./evidence <PR_NUMBER>
149
152
  ```
150
153
 
151
154
  ### Step 6: Verify
@@ -177,9 +177,13 @@ template listed in `verification.completion.acceptedEvidenceReleases`, so
177
177
  proof published before a rename or rotation keeps validating. Only releases in
178
178
  the implementation repository are accepted.
179
179
 
180
- `LISA_EVIDENCE_RELEASE` pins the concrete release for one run (skill scripts
181
- export it once so links and uploads agree). It must be one of the accepted
182
- releases; `evidence-release --ensure` still creates and capacity-checks it.
180
+ `LISA_EVIDENCE_RELEASE` pins the concrete release for one run. Skills resolve
181
+ it once with `evidence-release --ensure`, stop when that refuses, and pass the
182
+ printed name inline (`LISA_EVIDENCE_RELEASE=<name>`) on every later command,
183
+ because some agent runtimes start a new shell for each command and lose an
184
+ exported value; that keeps links and uploads on the same release. It must be
185
+ one of the accepted releases; `evidence-release --ensure` still creates and
186
+ capacity-checks it.
183
187
 
184
188
  Creating an evidence release is a real GitHub release: it fires `release`
185
189
  webhook and workflow events and adds a git tag of the same name. Workflows
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.101.5",
3
+ "version": "4.101.7",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -60,20 +60,25 @@ If either is missing, **refuse to post**: stop and report the missing Not-establ
60
60
 
61
61
  ## Usage
62
62
 
63
+ Resolve the evidence release once, before posting. When `generate-templates.py` wrote the evidence links, use the same release it used so the links match the uploads. If the release cannot be used (for example, it is nearly full), the step prints `Evidence release not usable; stop.` and fails: stop there and report it instead of posting.
64
+
65
+ If you came here from jira-journey, `generate-templates.py` already wrote the links: skip the block below and reuse the release name jira-journey printed in its Step 4, because resolving again can pick a different month's release.
66
+
63
67
  ```bash
64
- bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>
68
+ unset LISA_EVIDENCE_RELEASE; LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure) || { echo "Evidence release not usable; stop."; false; } &&
69
+ export LISA_EVIDENCE_RELEASE && echo "Evidence release: $LISA_EVIDENCE_RELEASE"
65
70
  ```
66
71
 
67
- ### Example
72
+ Some agent runtimes start a new shell for every command, and a new shell forgets an exported value. So put the printed release name in front of every later command that reads it, as `LISA_EVIDENCE_RELEASE=<name>`; the commands below show where.
68
73
 
69
74
  ```bash
70
- bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 42
75
+ LISA_EVIDENCE_RELEASE=<name> bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>
71
76
  ```
72
77
 
73
- When `generate-templates.py` wrote the evidence links, run both with the same exported release so the links match the uploads:
78
+ ### Example
74
79
 
75
80
  ```bash
76
- export LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure)
81
+ LISA_EVIDENCE_RELEASE=pr-assets bash .claude/skills/jira-evidence/scripts/post-evidence.sh PROJ-123 ./evidence 42
77
82
  ```
78
83
 
79
84
  `post-evidence.sh` uses `LISA_EVIDENCE_RELEASE` when it is set, after the resolver confirms it is one of the project's evidence releases and is not nearly full.
@@ -120,10 +120,19 @@ evidence/
120
120
 
121
121
  ### Step 4: Generate Evidence Templates
122
122
 
123
- After capturing all evidence, run the template generator:
123
+ The GitHub links point at the evidence release. Resolve it once, before generating templates, so the links and the uploads in Step 5 name the same release even across a month boundary. `--ensure` creates the release when it is missing. If the release cannot be used (for example, it is nearly full), the step prints `Evidence release not usable; stop.` and fails: stop there and report it instead of continuing.
124
124
 
125
125
  ```bash
126
- python3 .claude/skills/jira-journey/scripts/generate-templates.py \
126
+ unset LISA_EVIDENCE_RELEASE; LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure) || { echo "Evidence release not usable; stop."; false; } &&
127
+ export LISA_EVIDENCE_RELEASE && echo "Evidence release: $LISA_EVIDENCE_RELEASE"
128
+ ```
129
+
130
+ Some agent runtimes start a new shell for every command, and a new shell forgets an exported value. So put the printed release name in front of every later command that reads it, as `LISA_EVIDENCE_RELEASE=<name>`; the commands below show where.
131
+
132
+ After capturing all evidence, run the template generator with that release name:
133
+
134
+ ```bash
135
+ LISA_EVIDENCE_RELEASE=<name> python3 .claude/skills/jira-journey/scripts/generate-templates.py \
127
136
  <TICKET_ID> \
128
137
  <PR_NUMBER> \
129
138
  <BRANCH_NAME> \
@@ -132,20 +141,14 @@ python3 .claude/skills/jira-journey/scripts/generate-templates.py \
132
141
 
133
142
  This generates `evidence/comment.txt` (JIRA wiki markup) and `evidence/comment.md` (GitHub markdown) with evidence formatted as code blocks.
134
143
 
135
- The GitHub links point at the evidence release. Resolve it once, before generating templates, and keep it exported for Step 5 so the links and the uploads name the same release even across a month boundary:
136
-
137
- ```bash
138
- export LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release --ensure)
139
- ```
140
-
141
- `--ensure` creates the release when it is missing and stops, in plain words, when it is nearly full. Both `generate-templates.py` and `post-evidence.sh` read `LISA_EVIDENCE_RELEASE`; `post-evidence.sh` still validates and capacity-checks it. Without it they resolve the configured release themselves (default `pr-assets`).
144
+ Both `generate-templates.py` and `post-evidence.sh` read `LISA_EVIDENCE_RELEASE`; `post-evidence.sh` still validates and capacity-checks it. Without it they resolve the configured release themselves (default `pr-assets`).
142
145
 
143
146
  ### Step 5: Post Evidence
144
147
 
145
- Use the jira-evidence skill to post everything:
148
+ Use the jira-evidence skill to post everything, with the same release name as Step 4:
146
149
 
147
150
  ```bash
148
- bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> ./evidence <PR_NUMBER>
151
+ LISA_EVIDENCE_RELEASE=<name> bash .claude/skills/jira-evidence/scripts/post-evidence.sh <TICKET_ID> ./evidence <PR_NUMBER>
149
152
  ```
150
153
 
151
154
  ### Step 6: Verify
@@ -177,9 +177,13 @@ template listed in `verification.completion.acceptedEvidenceReleases`, so
177
177
  proof published before a rename or rotation keeps validating. Only releases in
178
178
  the implementation repository are accepted.
179
179
 
180
- `LISA_EVIDENCE_RELEASE` pins the concrete release for one run (skill scripts
181
- export it once so links and uploads agree). It must be one of the accepted
182
- releases; `evidence-release --ensure` still creates and capacity-checks it.
180
+ `LISA_EVIDENCE_RELEASE` pins the concrete release for one run. Skills resolve
181
+ it once with `evidence-release --ensure`, stop when that refuses, and pass the
182
+ printed name inline (`LISA_EVIDENCE_RELEASE=<name>`) on every later command,
183
+ because some agent runtimes start a new shell for each command and lose an
184
+ exported value; that keeps links and uploads on the same release. It must be
185
+ one of the accepted releases; `evidence-release --ensure` still creates and
186
+ capacity-checks it.
183
187
 
184
188
  Creating an evidence release is a real GitHub release: it fires `release`
185
189
  webhook and workflow events and adds a git tag of the same name. Workflows
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.101.5",
3
+ "version": "4.101.7",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"