@codyswann/lisa 1.79.2 → 1.81.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 (52) hide show
  1. package/cdk/package-lisa/package.lisa.json +1 -0
  2. package/nestjs/package-lisa/package.lisa.json +1 -0
  3. package/package.json +3 -2
  4. package/plugins/lisa/.claude-plugin/plugin.json +14 -10
  5. package/plugins/lisa/agents/bug-fixer.md +1 -1
  6. package/plugins/lisa/agents/builder.md +1 -1
  7. package/plugins/lisa/agents/jira-agent.md +10 -9
  8. package/plugins/lisa/commands/build.md +3 -3
  9. package/plugins/lisa/commands/fix.md +3 -3
  10. package/plugins/lisa/commands/improve.md +8 -8
  11. package/plugins/lisa/commands/investigate.md +1 -1
  12. package/plugins/lisa/commands/monitor.md +2 -2
  13. package/plugins/lisa/commands/plan/create.md +3 -1
  14. package/plugins/lisa/commands/plan/execute.md +1 -1
  15. package/plugins/lisa/commands/plan.md +3 -1
  16. package/plugins/lisa/commands/research.md +8 -0
  17. package/plugins/lisa/commands/review.md +2 -2
  18. package/plugins/lisa/commands/ship.md +2 -4
  19. package/plugins/lisa/commands/verify.md +10 -0
  20. package/plugins/lisa/hooks/inject-flow-context.sh +12 -0
  21. package/plugins/lisa/rules/base-rules.md +4 -0
  22. package/plugins/lisa/rules/intent-routing.md +204 -82
  23. package/plugins/lisa/rules/verification.md +11 -0
  24. package/plugins/lisa/skills/plan-execute/SKILL.md +36 -19
  25. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  30. package/plugins/src/base/.claude-plugin/plugin.json +6 -10
  31. package/plugins/src/base/agents/bug-fixer.md +1 -1
  32. package/plugins/src/base/agents/builder.md +1 -1
  33. package/plugins/src/base/agents/jira-agent.md +10 -9
  34. package/plugins/src/base/commands/build.md +3 -3
  35. package/plugins/src/base/commands/fix.md +3 -3
  36. package/plugins/src/base/commands/improve.md +8 -8
  37. package/plugins/src/base/commands/investigate.md +1 -1
  38. package/plugins/src/base/commands/monitor.md +2 -2
  39. package/plugins/src/base/commands/plan/create.md +3 -1
  40. package/plugins/src/base/commands/plan/execute.md +1 -1
  41. package/plugins/src/base/commands/plan.md +3 -1
  42. package/plugins/src/base/commands/research.md +8 -0
  43. package/plugins/src/base/commands/review.md +2 -2
  44. package/plugins/src/base/commands/ship.md +2 -4
  45. package/plugins/src/base/commands/verify.md +10 -0
  46. package/plugins/src/base/hooks/inject-flow-context.sh +12 -0
  47. package/plugins/src/base/rules/base-rules.md +4 -0
  48. package/plugins/src/base/rules/intent-routing.md +204 -82
  49. package/plugins/src/base/rules/verification.md +11 -0
  50. package/plugins/src/base/skills/plan-execute/SKILL.md +36 -19
  51. package/rails/create-only/.github/workflows/claude-code-review-response.yml +30 -0
  52. package/scripts/test-intent-routing.sh +221 -0
@@ -20,6 +20,7 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "aws-cdk": "^2.1104.0",
23
+ "vite": "^8.0.5",
23
24
  "vitest": "^4.1.0",
24
25
  "@vitest/coverage-v8": "^4.1.0"
25
26
  },
@@ -80,6 +80,7 @@
80
80
  "serverless": "^4.30.0",
81
81
  "serverless-esbuild": "^1.57.0",
82
82
  "serverless-offline": "^14.4.0",
83
+ "vite": "^8.0.5",
83
84
  "vitest": "^4.1.0",
84
85
  "@vitest/coverage-v8": "^4.1.0"
85
86
  }
package/package.json CHANGED
@@ -76,7 +76,7 @@
76
76
  "lodash": ">=4.18.1"
77
77
  },
78
78
  "name": "@codyswann/lisa",
79
- "version": "1.79.2",
79
+ "version": "1.81.0",
80
80
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
81
81
  "main": "dist/index.js",
82
82
  "exports": {
@@ -182,7 +182,8 @@
182
182
  "vitest": "^4.1.0"
183
183
  },
184
184
  "devDependencies": {
185
- "@codyswann/lisa": "^1.78.2"
185
+ "@codyswann/lisa": "^1.78.2",
186
+ "vite": "^8.0.5"
186
187
  },
187
188
  "type": "module"
188
189
  }
@@ -1,27 +1,22 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "1.79.2",
3
+ "version": "1.81.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
7
7
  },
8
8
  "hooks": {
9
9
  "UserPromptSubmit": [
10
- {
11
- "matcher": "",
12
- "hooks": [
13
- {
14
- "type": "command",
15
- "command": "${CLAUDE_PLUGIN_ROOT}/hooks/enforce-plan-rules.sh"
16
- }
17
- ]
18
- },
19
10
  {
20
11
  "matcher": "",
21
12
  "hooks": [
22
13
  {
23
14
  "type": "command",
24
15
  "command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code user-prompt-submit || true"
16
+ },
17
+ {
18
+ "type": "prompt",
19
+ "prompt": "Classify this user request into exactly one flow. Output ONLY valid JSON.\n\nFlows:\n- Research: User needs requirements defined, wants a PRD, exploring a problem space, open-ended feature idea\n- Plan: User has requirements and wants them broken into tickets/work items\n- Implement/Build: User has a specific feature/story/task to code\n- Implement/Fix: User has a bug to fix, something is broken\n- Implement/Improve: User wants to refactor, optimize, or improve existing code\n- Implement/Investigate: User wants to understand why something works a certain way (spike)\n- Verify: User has code ready to ship (PR, deploy, merge)\n- None: Simple question, config change, one-off task, or not enough context to classify\n\nOutput format: {\"hookSpecificOutput\":{\"hookEventName\":\"UserPromptSubmit\",\"additionalContext\":\"Flow classification: [FLOW]. Reason: [one sentence].\"}}\n\nUser request: $ARGUMENTS"
25
20
  }
26
21
  ]
27
22
  }
@@ -133,6 +128,15 @@
133
128
  "command": "${CLAUDE_PLUGIN_ROOT}/hooks/inject-rules.sh"
134
129
  }
135
130
  ]
131
+ },
132
+ {
133
+ "matcher": "",
134
+ "hooks": [
135
+ {
136
+ "type": "command",
137
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/inject-flow-context.sh"
138
+ }
139
+ ]
136
140
  }
137
141
  ],
138
142
  "SessionEnd": [
@@ -14,7 +14,7 @@ You are a bug fix specialist. Your job is to turn a diagnosed bug into a verifie
14
14
 
15
15
  ## Prerequisites
16
16
 
17
- You receive a diagnosed bug from the Fix flow with:
17
+ You receive a diagnosed bug from the **Implement** flow (Fix work type) with:
18
18
  - **Root cause** — what is causing the bug and where (file:line)
19
19
  - **Reproduction** — how to trigger the bug reliably
20
20
  - **Test strategy** — what regression tests to write (from `test-specialist`)
@@ -14,7 +14,7 @@ You are a feature build specialist. Your job is to turn acceptance criteria into
14
14
 
15
15
  ## Prerequisites
16
16
 
17
- You receive a task from the Build flow with:
17
+ You receive a task from the **Implement** flow (Build or Improve work type) with:
18
18
  - **Acceptance criteria** — what the feature must do (from `product-specialist`)
19
19
  - **Architecture plan** — which files to create/modify, design decisions, reusable code (from `architecture-specialist`)
20
20
  - **Test strategy** — coverage targets, edge cases, TDD sequence (from `test-specialist`)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jira-agent
3
- description: JIRA lifecycle agent. Reads tickets, determines intent (Bug → Fix, Story/Task → Build, Epic → Plan), delegates to the appropriate flow, syncs progress at milestones, and posts evidence at completion.
3
+ description: JIRA lifecycle agent. Reads tickets, determines intent (Bug → Implement/Fix, Story/Task → Implement/Build, Epic → Plan, Spike → Implement/Investigate), delegates to the appropriate flow, syncs progress at milestones, and posts evidence at completion.
4
4
  tools: Read, Grep, Glob, Bash
5
5
  skills:
6
6
  - jira-sync
@@ -55,15 +55,16 @@ If not triaged:
55
55
 
56
56
  Map the ticket type to a flow:
57
57
 
58
- | Ticket Type | Flow | Entry Agent |
59
- |-------------|------|-------------|
60
- | Bug | Fix | `git-history-analyzer` → `debug-specialist` → `bug-fixer` |
61
- | Story | Build | `product-specialist` → `architecture-specialist` → `builder` |
62
- | Task | Build | `product-specialist` → `architecture-specialist` → `builder` |
63
- | Epic | Plan | `product-specialist` → `architecture-specialist` → break down |
64
- | Spike | Investigate | `git-history-analyzer` `debug-specialist` |
58
+ | Ticket Type | Flow | Work Type |
59
+ |-------------|------|-----------|
60
+ | Epic | Plan | -- |
61
+ | Story | Implement | Build |
62
+ | Task | Implement | Build |
63
+ | Bug | Implement | Fix |
64
+ | Spike | Implement | Investigate Only |
65
+ | Improvement | Implement | Improve |
65
66
 
66
- If the ticket type is ambiguous, read the description to classify. A "Task" that describes broken behavior is a Fix, not a Build.
67
+ If the ticket type is ambiguous, read the description to classify. A "Task" that describes broken behavior is a Fix, not a Build. A "Bug" that requests new functionality is a Build.
67
68
 
68
69
  ### 5. Delegate to Flow
69
70
 
@@ -1,10 +1,10 @@
1
1
  ---
2
- description: "Build a feature. Defines acceptance criteria, researches codebase, implements via TDD, reviews, verifies, and ships."
2
+ description: "Build a feature. Defines acceptance criteria, researches codebase, implements via TDD, verifies locally, and reviews."
3
3
  argument-hint: "<description-or-ticket-id-or-url>"
4
4
  ---
5
5
 
6
- Read `.claude/rules/intent-routing.md` and execute the **Build** flow.
6
+ Read `.claude/rules/intent-routing.md` and execute the **Implement** flow with the **Build** work type.
7
7
 
8
- If the argument is a JIRA ticket ID or URL, hand off to the `jira-agent` which will read the ticket, extract context, and delegate back to the Build flow.
8
+ If the argument is a JIRA ticket ID or URL, hand off to the `jira-agent` which will read the ticket, extract context, and delegate back to the Implement flow.
9
9
 
10
10
  $ARGUMENTS
@@ -1,10 +1,10 @@
1
1
  ---
2
- description: "Fix a bug. Analyzes git history, reproduces, finds root cause, implements fix via TDD, verifies, and ships."
2
+ description: "Fix a bug. Reproduces, analyzes git history, finds root cause, implements fix via TDD, verifies locally, and reviews."
3
3
  argument-hint: "<description-or-ticket-id-or-url>"
4
4
  ---
5
5
 
6
- Read `.claude/rules/intent-routing.md` and execute the **Fix** flow.
6
+ Read `.claude/rules/intent-routing.md` and execute the **Implement** flow with the **Fix** work type.
7
7
 
8
- If the argument is a JIRA ticket ID or URL, hand off to the `jira-agent` which will read the ticket, extract context, and delegate back to the Fix flow.
8
+ If the argument is a JIRA ticket ID or URL, hand off to the `jira-agent` which will read the ticket, extract context, and delegate back to the Implement flow.
9
9
 
10
10
  $ARGUMENTS
@@ -1,16 +1,16 @@
1
1
  ---
2
- description: "Improve existing code. Identifies target, measures baseline, implements improvements via TDD, measures again, and ships."
2
+ description: "Improve existing code. Measures baseline, implements improvements via TDD, measures again, and reviews."
3
3
  argument-hint: "<target-description>"
4
4
  ---
5
5
 
6
- Read `.claude/rules/intent-routing.md` and execute the **Improve** flow.
6
+ Read `.claude/rules/intent-routing.md` and execute the **Implement** flow with the **Improve** work type.
7
7
 
8
8
  For specific improvement types, you can also use:
9
- - `/lisa:plan:add-test-coverage` increase test coverage
10
- - `/lisa:plan:fix-linter-error` fix lint rule violations
11
- - `/lisa:plan:lower-code-complexity` reduce cognitive complexity
12
- - `/lisa:plan:reduce-max-lines` reduce file length
13
- - `/lisa:plan:reduce-max-lines-per-function` reduce function length
14
- - `/lisa:plan:improve-tests` improve test quality
9
+ - `/lisa:plan:add-test-coverage` -- increase test coverage
10
+ - `/lisa:plan:fix-linter-error` -- fix lint rule violations
11
+ - `/lisa:plan:lower-code-complexity` -- reduce cognitive complexity
12
+ - `/lisa:plan:reduce-max-lines` -- reduce file length
13
+ - `/lisa:plan:reduce-max-lines-per-function` -- reduce function length
14
+ - `/lisa:plan:improve-tests` -- improve test quality
15
15
 
16
16
  $ARGUMENTS
@@ -3,7 +3,7 @@ description: "Investigate an issue. Analyzes git history, reproduces, traces exe
3
3
  argument-hint: "<description-or-ticket-id-or-url>"
4
4
  ---
5
5
 
6
- Read `.claude/rules/intent-routing.md` and execute the **Investigate** flow.
6
+ Read `.claude/rules/intent-routing.md` and execute the **Implement** flow with the **Investigate Only** work type (spike).
7
7
 
8
8
  If the argument is a JIRA ticket ID or URL, hand off to the `jira-agent` which will read the ticket and extract context.
9
9
 
@@ -3,8 +3,8 @@ description: "Monitor application health. Checks health endpoints, logs, errors,
3
3
  argument-hint: "[environment]"
4
4
  ---
5
5
 
6
- Read `.claude/rules/intent-routing.md` and execute the **Monitor** flow.
6
+ Read `.claude/rules/intent-routing.md` and execute the **Monitor** sub-flow.
7
7
 
8
- Delegates to `ops-specialist` for health checks, log inspection, error monitoring, and performance analysis.
8
+ This sub-flow is also invoked as part of the Verify flow's remote verification step. Delegates to `ops-specialist` for health checks, log inspection, error monitoring, and performance analysis.
9
9
 
10
10
  $ARGUMENTS
@@ -3,4 +3,6 @@ description: "Creates an implementation plan from a ticket URL, file path, or te
3
3
  argument-hint: "<ticket-url | @file-path | description>"
4
4
  ---
5
5
 
6
- Read `.claude/rules/intent-routing.md` and execute the **Plan** flow on $ARGUMENTS
6
+ Read `.claude/rules/intent-routing.md` and execute the **Plan** flow on $ARGUMENTS.
7
+
8
+ If requirements are ambiguous or no specification exists, suggest running the **Research** flow first.
@@ -3,4 +3,4 @@ description: "Deploys an agent team to research, implement, review and deploy a
3
3
  argument-hint: "<ticket-url | @file-path | description>"
4
4
  ---
5
5
 
6
- Read `.claude/rules/intent-routing.md` and determine the appropriate flow for $ARGUMENTS. Execute the full flow including implementation, review, and ship sub-flows.
6
+ Read `.claude/rules/intent-routing.md` and determine the appropriate flow for $ARGUMENTS. Execute the full flow including implementation, review, and verify flows.
@@ -1,10 +1,12 @@
1
1
  ---
2
- description: "Plan work. Defines acceptance criteria, researches codebase, maps dependencies, and breaks down into ordered tasks."
2
+ description: "Plan work. Defines acceptance criteria, researches codebase, maps dependencies, and breaks down into ordered work items."
3
3
  argument-hint: "<description-or-ticket-id-or-url>"
4
4
  ---
5
5
 
6
6
  Read `.claude/rules/intent-routing.md` and execute the **Plan** flow.
7
7
 
8
+ If no PRD or specification exists, suggest running the **Research** flow first to produce one.
9
+
8
10
  If the argument is a JIRA ticket ID or URL, hand off to the `jira-agent` which will read the ticket and extract context.
9
11
 
10
12
  $ARGUMENTS
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "Research a problem space and produce a PRD. Investigates codebase, defines user flows, assesses technical feasibility."
3
+ argument-hint: "<problem-statement-or-feature-idea>"
4
+ ---
5
+
6
+ Read `.claude/rules/intent-routing.md` and execute the **Research** flow.
7
+
8
+ $ARGUMENTS
@@ -3,8 +3,8 @@ description: "Review code changes. Runs quality, security, performance, product,
3
3
  argument-hint: "[pr-link-or-branch]"
4
4
  ---
5
5
 
6
- Read `.claude/rules/intent-routing.md` and execute the **Review** flow.
6
+ Read `.claude/rules/intent-routing.md` and execute the **Review** sub-flow.
7
7
 
8
- Runs `quality-specialist`, `security-specialist`, and `performance-specialist` in parallel, followed by `product-specialist` and `test-specialist`. Consolidates all findings ranked by severity.
8
+ This sub-flow is also invoked automatically by the Implement flow. It runs `quality-specialist`, `security-specialist`, and `performance-specialist` in parallel, followed by `product-specialist` and `test-specialist`. Consolidates all findings ranked by severity.
9
9
 
10
10
  $ARGUMENTS
@@ -1,10 +1,8 @@
1
1
  ---
2
- description: "Ship current changes. Commits, opens PR, handles review feedback loop, deploys, verifies, and monitors."
2
+ description: "Ship current changes. Alias for /verify."
3
3
  argument-hint: "[commit-message-hint]"
4
4
  ---
5
5
 
6
- Read `.claude/rules/intent-routing.md` and execute the **Ship** flow.
7
-
8
- This includes: atomic commits, PR creation, review-fix loop (fix failed checks, resolve merge conflicts, handle bot review feedback until mergeable), merge, deploy, post-deploy verification, and monitoring.
6
+ Read `.claude/rules/intent-routing.md` and execute the **Verify** flow.
9
7
 
10
8
  $ARGUMENTS
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: "Ship and verify code. Commits, opens PR, handles review loop, merges, deploys, and verifies in target environment."
3
+ argument-hint: "[commit-message-hint]"
4
+ ---
5
+
6
+ Read `.claude/rules/intent-routing.md` and execute the **Verify** flow.
7
+
8
+ This includes: atomic commits, PR creation, CI/review-fix loop, merge, deploy monitoring, and remote verification.
9
+
10
+ $ARGUMENTS
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env bash
2
+ # Tells subagents not to ask users for flow selection.
3
+ # The parent agent has already determined the flow and work type.
4
+ # Used by SubagentStart hook.
5
+ set -euo pipefail
6
+
7
+ jq -n '{
8
+ "hookSpecificOutput": {
9
+ "hookEventName": "SubagentStart",
10
+ "additionalContext": "You are a subagent operating within an established flow. Your parent agent has already determined the flow and work type. Do NOT ask the user to choose a flow or classify the request. Execute your assigned work within the context provided by your parent agent."
11
+ }
12
+ }'
@@ -1,3 +1,7 @@
1
+ Intent Routing (FIRST — before anything else):
2
+
3
+ Before starting any work in a session, classify the user's initial request using the Intent Routing rule. Determine which flow applies (Research, Plan, Implement, Verify, or None) and check its readiness gate. Once a flow is established, all subsequent messages operate within it. Do not skip this step — even if the request seems simple. See the `intent-routing` rule for the full protocol.
4
+
1
5
  Requirement Verification:
2
6
 
3
7
  Never assume the person providing instructions has given you complete, correct, or technically precise requirements. Treat every request as potentially underspecified. Before starting any work: