@codyswann/lisa 2.114.0 → 2.115.1

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.
package/package.json CHANGED
@@ -82,7 +82,7 @@
82
82
  "lodash": ">=4.18.1"
83
83
  },
84
84
  "name": "@codyswann/lisa",
85
- "version": "2.114.0",
85
+ "version": "2.115.1",
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.114.0",
3
+ "version": "2.115.1",
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.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -55,6 +55,41 @@ const HIGHLIGHT_COPY = {
55
55
  },
56
56
  };
57
57
 
58
+ /**
59
+ * Decide whether a PRD queue snapshot has open lifecycle pressure that should
60
+ * pause automatic PRD promotion or ideation work.
61
+ *
62
+ * @param {{
63
+ * readonly counts?: Record<string, number>
64
+ * readonly highlights?: readonly Record<string, any>[]
65
+ * }} snapshot
66
+ */
67
+ export function evaluatePrdQueuePressure(snapshot = {}) {
68
+ const decisiveRole = ACTIONABLE_ROLE_ORDER.find(
69
+ role => normalizeCount(snapshot.counts?.[role]) > 0
70
+ );
71
+
72
+ if (!decisiveRole) {
73
+ return {
74
+ allowed: true,
75
+ decisiveRole: null,
76
+ blockerItem: null,
77
+ nextStep: null,
78
+ };
79
+ }
80
+
81
+ const blockerItem =
82
+ snapshot.highlights?.find(highlight => highlight.role === decisiveRole) ??
83
+ null;
84
+
85
+ return {
86
+ allowed: false,
87
+ decisiveRole,
88
+ blockerItem,
89
+ nextStep: blockerItem?.nextStep ?? HIGHLIGHT_COPY[decisiveRole].nextStep,
90
+ };
91
+ }
92
+
58
93
  /**
59
94
  * Read a GitHub-backed PRD queue snapshot from issue payloads.
60
95
  *
@@ -393,3 +428,11 @@ function normalizeTimestamp(value) {
393
428
  const trimmed = value.trim();
394
429
  return trimmed.length > 0 ? trimmed : null;
395
430
  }
431
+
432
+ /**
433
+ * @param {unknown} value
434
+ * @returns {number}
435
+ */
436
+ function normalizeCount(value) {
437
+ return Number.isFinite(value) && value > 0 ? value : 0;
438
+ }
@@ -147,6 +147,32 @@ Rank Practical Ideas by **persona value, feasibility, verification clarity, and
147
147
  select the creation set by `max_prds` (default **1** → the single top-ranked idea; `<n>` → top n;
148
148
  `all` → every Practical Idea). Spikes and Rejected ideas are reported but never selected.
149
149
 
150
+ ## Step 5.5 — Block auto-ready writes when the PRD queue has pressure
151
+
152
+ This step runs **only** when `prd_ready=true`. A draft run (`prd_ready=false`) skips this gate and
153
+ continues to Step 6, because draft PRDs do not create immediate PRD-intake pickup pressure.
154
+
155
+ Before invoking `lisa:research` for any selected idea, inspect the configured PRD source queue with
156
+ the same PRD reader contract used by `/lisa:queue-status` and evaluate it with
157
+ `evaluatePrdQueuePressure` from `plugins/lisa/scripts/queue-status-prd-readers.mjs` (source:
158
+ `plugins/src/base/scripts/queue-status-prd-readers.mjs`). Resolve the queue from `.lisa.config.json`
159
+ the same way `lisa:intake` resolves the PRD side, and pass the matching queue argument in the
160
+ blocked outcome (for example, `github intake_mode=prd`).
161
+
162
+ If the helper returns `allowed: false`, stop before any `lisa:research`, `lisa:prd-source-write`, or
163
+ vendor PRD writer invocation. Emit **PRDs Created** as a blocked outcome, not as an empty success.
164
+ The blocked outcome must include:
165
+
166
+ - `source` and `tracker` from `.lisa.config.json`;
167
+ - the decisive PRD lifecycle `role`;
168
+ - the blocking PRD item `ref` and `url`, when the snapshot supplies them;
169
+ - the smallest next action, preferring the helper's `nextStep` and otherwise using
170
+ `/lisa:intake <PRD queue>`;
171
+ - a clear statement that no research or PRD source write was invoked.
172
+
173
+ If the helper returns `allowed: true`, continue to Step 6 normally and keep the existing draft/ready
174
+ creation behavior unchanged.
175
+
150
176
  ## Step 6 — Create a PRD per selected idea (via lisa:research)
151
177
 
152
178
  For each idea in the creation set, invoke `/lisa:research` with:
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "NestJS-specific skills and migration write-protection hooks.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.114.0",
3
+ "version": "2.115.1",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -55,6 +55,41 @@ const HIGHLIGHT_COPY = {
55
55
  },
56
56
  };
57
57
 
58
+ /**
59
+ * Decide whether a PRD queue snapshot has open lifecycle pressure that should
60
+ * pause automatic PRD promotion or ideation work.
61
+ *
62
+ * @param {{
63
+ * readonly counts?: Record<string, number>
64
+ * readonly highlights?: readonly Record<string, any>[]
65
+ * }} snapshot
66
+ */
67
+ export function evaluatePrdQueuePressure(snapshot = {}) {
68
+ const decisiveRole = ACTIONABLE_ROLE_ORDER.find(
69
+ role => normalizeCount(snapshot.counts?.[role]) > 0
70
+ );
71
+
72
+ if (!decisiveRole) {
73
+ return {
74
+ allowed: true,
75
+ decisiveRole: null,
76
+ blockerItem: null,
77
+ nextStep: null,
78
+ };
79
+ }
80
+
81
+ const blockerItem =
82
+ snapshot.highlights?.find(highlight => highlight.role === decisiveRole) ??
83
+ null;
84
+
85
+ return {
86
+ allowed: false,
87
+ decisiveRole,
88
+ blockerItem,
89
+ nextStep: blockerItem?.nextStep ?? HIGHLIGHT_COPY[decisiveRole].nextStep,
90
+ };
91
+ }
92
+
58
93
  /**
59
94
  * Read a GitHub-backed PRD queue snapshot from issue payloads.
60
95
  *
@@ -393,3 +428,11 @@ function normalizeTimestamp(value) {
393
428
  const trimmed = value.trim();
394
429
  return trimmed.length > 0 ? trimmed : null;
395
430
  }
431
+
432
+ /**
433
+ * @param {unknown} value
434
+ * @returns {number}
435
+ */
436
+ function normalizeCount(value) {
437
+ return Number.isFinite(value) && value > 0 ? value : 0;
438
+ }
@@ -147,6 +147,32 @@ Rank Practical Ideas by **persona value, feasibility, verification clarity, and
147
147
  select the creation set by `max_prds` (default **1** → the single top-ranked idea; `<n>` → top n;
148
148
  `all` → every Practical Idea). Spikes and Rejected ideas are reported but never selected.
149
149
 
150
+ ## Step 5.5 — Block auto-ready writes when the PRD queue has pressure
151
+
152
+ This step runs **only** when `prd_ready=true`. A draft run (`prd_ready=false`) skips this gate and
153
+ continues to Step 6, because draft PRDs do not create immediate PRD-intake pickup pressure.
154
+
155
+ Before invoking `lisa:research` for any selected idea, inspect the configured PRD source queue with
156
+ the same PRD reader contract used by `/lisa:queue-status` and evaluate it with
157
+ `evaluatePrdQueuePressure` from `plugins/lisa/scripts/queue-status-prd-readers.mjs` (source:
158
+ `plugins/src/base/scripts/queue-status-prd-readers.mjs`). Resolve the queue from `.lisa.config.json`
159
+ the same way `lisa:intake` resolves the PRD side, and pass the matching queue argument in the
160
+ blocked outcome (for example, `github intake_mode=prd`).
161
+
162
+ If the helper returns `allowed: false`, stop before any `lisa:research`, `lisa:prd-source-write`, or
163
+ vendor PRD writer invocation. Emit **PRDs Created** as a blocked outcome, not as an empty success.
164
+ The blocked outcome must include:
165
+
166
+ - `source` and `tracker` from `.lisa.config.json`;
167
+ - the decisive PRD lifecycle `role`;
168
+ - the blocking PRD item `ref` and `url`, when the snapshot supplies them;
169
+ - the smallest next action, preferring the helper's `nextStep` and otherwise using
170
+ `/lisa:intake <PRD queue>`;
171
+ - a clear statement that no research or PRD source write was invoked.
172
+
173
+ If the helper returns `allowed: true`, continue to Step 6 normally and keep the existing draft/ready
174
+ creation behavior unchanged.
175
+
150
176
  ## Step 6 — Create a PRD per selected idea (via lisa:research)
151
177
 
152
178
  For each idea in the creation set, invoke `/lisa:research` with: