@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.
- package/cdk/package-lisa/package.lisa.json +1 -0
- package/nestjs/package-lisa/package.lisa.json +1 -0
- package/package.json +3 -2
- package/plugins/lisa/.claude-plugin/plugin.json +14 -10
- package/plugins/lisa/agents/bug-fixer.md +1 -1
- package/plugins/lisa/agents/builder.md +1 -1
- package/plugins/lisa/agents/jira-agent.md +10 -9
- package/plugins/lisa/commands/build.md +3 -3
- package/plugins/lisa/commands/fix.md +3 -3
- package/plugins/lisa/commands/improve.md +8 -8
- package/plugins/lisa/commands/investigate.md +1 -1
- package/plugins/lisa/commands/monitor.md +2 -2
- package/plugins/lisa/commands/plan/create.md +3 -1
- package/plugins/lisa/commands/plan/execute.md +1 -1
- package/plugins/lisa/commands/plan.md +3 -1
- package/plugins/lisa/commands/research.md +8 -0
- package/plugins/lisa/commands/review.md +2 -2
- package/plugins/lisa/commands/ship.md +2 -4
- package/plugins/lisa/commands/verify.md +10 -0
- package/plugins/lisa/hooks/inject-flow-context.sh +12 -0
- package/plugins/lisa/rules/base-rules.md +4 -0
- package/plugins/lisa/rules/intent-routing.md +204 -82
- package/plugins/lisa/rules/verification.md +11 -0
- package/plugins/lisa/skills/plan-execute/SKILL.md +36 -19
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/.claude-plugin/plugin.json +6 -10
- package/plugins/src/base/agents/bug-fixer.md +1 -1
- package/plugins/src/base/agents/builder.md +1 -1
- package/plugins/src/base/agents/jira-agent.md +10 -9
- package/plugins/src/base/commands/build.md +3 -3
- package/plugins/src/base/commands/fix.md +3 -3
- package/plugins/src/base/commands/improve.md +8 -8
- package/plugins/src/base/commands/investigate.md +1 -1
- package/plugins/src/base/commands/monitor.md +2 -2
- package/plugins/src/base/commands/plan/create.md +3 -1
- package/plugins/src/base/commands/plan/execute.md +1 -1
- package/plugins/src/base/commands/plan.md +3 -1
- package/plugins/src/base/commands/research.md +8 -0
- package/plugins/src/base/commands/review.md +2 -2
- package/plugins/src/base/commands/ship.md +2 -4
- package/plugins/src/base/commands/verify.md +10 -0
- package/plugins/src/base/hooks/inject-flow-context.sh +12 -0
- package/plugins/src/base/rules/base-rules.md +4 -0
- package/plugins/src/base/rules/intent-routing.md +204 -82
- package/plugins/src/base/rules/verification.md +11 -0
- package/plugins/src/base/skills/plan-execute/SKILL.md +36 -19
- package/rails/create-only/.github/workflows/claude-code-review-response.yml +30 -0
- package/scripts/test-intent-routing.sh +221 -0
|
@@ -1,114 +1,211 @@
|
|
|
1
1
|
# Intent Routing
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
MANDATORY: Before starting any work in a session, classify the user's initial request using the Flow Classification Protocol below. Do not respond, do not start work, do not ask questions until you have determined which flow applies. Once a flow is established, all subsequent messages operate within that flow — do not re-classify. This is not optional — skipping classification leads to unstructured responses that bypass readiness gates.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Each flow has a readiness gate that MUST pass before work begins. If the gate fails, stop and ask for what is missing.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
When: Bug reports, broken behavior, error messages, JIRA bug tickets.
|
|
7
|
+
## Flow Classification Protocol
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
1. `git-history-analyzer` — understand why affected code exists, find related past fixes/reverts
|
|
12
|
-
2. `debug-specialist` — reproduce the bug, prove root cause with evidence
|
|
13
|
-
3. `architecture-specialist` — assess fix risk, identify files to change, check for ripple effects
|
|
14
|
-
4. `test-specialist` — design regression test strategy
|
|
15
|
-
5. `bug-fixer` — implement fix via TDD (reproduction becomes failing test)
|
|
16
|
-
6. **Verify sub-flow**
|
|
17
|
-
7. **Ship sub-flow**
|
|
18
|
-
8. `learner` — capture discoveries for future sessions
|
|
19
|
-
|
|
20
|
-
### Build
|
|
21
|
-
When: New features, stories, tasks, JIRA story/task tickets.
|
|
9
|
+
A `UserPromptSubmit` prompt hook uses a fast model to pre-classify the user's request and injects the result as `additionalContext`. Use this classification as a strong hint but verify it against the flow definitions below.
|
|
22
10
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
7. **Ship sub-flow**
|
|
31
|
-
8. `learner` — capture discoveries
|
|
11
|
+
1. If the user invoked a slash command (`/fix`, `/build`, `/plan`, etc.), the flow is already determined -- skip classification.
|
|
12
|
+
2. If a flow hint was injected by the hook, verify it matches the request. If it does, proceed with that flow.
|
|
13
|
+
3. If the classification is "None" or you disagree with the hint:
|
|
14
|
+
- **Interactive session** (user is present): present a multiple choice using AskUserQuestion with options: Research, Plan, Implement, Verify, No flow.
|
|
15
|
+
- **Headless/non-interactive session** (running with `-p` flag, in a CI pipeline, or as a scheduled agent): do NOT ask the user. Classify to the best of your ability from available context (ticket content, prompt text, current branch state). If you truly cannot classify, default to "No flow" and proceed with the request as-is.
|
|
16
|
+
4. Once a flow is selected, check its readiness gate before proceeding.
|
|
17
|
+
5. If you are a subagent: your parent agent has already determined the flow -- do NOT ask the user to choose a flow. Execute your assigned work within the established flow context.
|
|
32
18
|
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
## Readiness Gate Protocol
|
|
20
|
+
|
|
21
|
+
Every flow begins with a gate check. The gate defines what information must be present before the flow can begin.
|
|
22
|
+
|
|
23
|
+
If the gate fails:
|
|
24
|
+
- **Interactive session** (user is present):
|
|
25
|
+
1. Identify exactly what is missing
|
|
26
|
+
2. Before asking the user, attempt to answer the questions yourself from available context (source code, docs, git history, project structure, config files). Only ask the user about information you genuinely cannot determine.
|
|
27
|
+
3. When you do ask the user, provide recommended answers to choose from based on what you found in the codebase. Do not ask open-ended questions when you can offer specific options.
|
|
28
|
+
4. Tell the user what is needed and why
|
|
29
|
+
5. Do NOT proceed until the missing information is provided or resolved
|
|
30
|
+
6. If the missing information can be obtained by running a preceding flow (e.g., Research before Plan), suggest that instead
|
|
31
|
+
- **Headless/non-interactive session** (running with `-p` flag, in a CI pipeline, or as a scheduled agent): do NOT block on missing information. Infer what you can from available context (ticket content, prompt text, codebase state, git history). Proceed with best effort using what is available. If critical information is truly unobtainable, fail with a clear error message explaining what was missing.
|
|
32
|
+
|
|
33
|
+
## Main Flows
|
|
34
|
+
|
|
35
|
+
### Research
|
|
36
|
+
|
|
37
|
+
When: "I need a PRD", "What should we build?", product discovery, requirements gathering, feature exploration, understanding a problem space, open-ended feature ideas.
|
|
38
|
+
|
|
39
|
+
Gate:
|
|
40
|
+
- A problem statement, feature idea, or business objective must be provided
|
|
41
|
+
- If none is provided, ask: "What problem are you trying to solve or what capability are you trying to add?"
|
|
35
42
|
|
|
36
43
|
Sequence:
|
|
37
|
-
1.
|
|
38
|
-
2. `
|
|
39
|
-
3. `
|
|
40
|
-
4.
|
|
44
|
+
1. **Investigate sub-flow** -- gather context from codebase, git history, existing behavior, and external sources
|
|
45
|
+
2. `product-specialist` -- define user goals, user flows (Gherkin), acceptance criteria, error states, UX concerns, and out-of-scope items
|
|
46
|
+
3. `architecture-specialist` -- assess technical feasibility, identify constraints, map existing system boundaries
|
|
47
|
+
4. Synthesize findings into a PRD document containing: problem statement, user stories, acceptance criteria, technical constraints, open questions, and proposed scope
|
|
48
|
+
5. `learner` -- capture discoveries for future sessions
|
|
49
|
+
|
|
50
|
+
Output: A PRD document. If there is not enough context to produce a complete PRD, stop and report what is missing rather than producing an incomplete one.
|
|
41
51
|
|
|
42
52
|
### Plan
|
|
43
|
-
|
|
53
|
+
|
|
54
|
+
When: "Break this down", "Create tickets", epic planning, large scope work, JIRA epic tickets, "Turn this PRD into work items".
|
|
55
|
+
|
|
56
|
+
Gate:
|
|
57
|
+
- A PRD, specification document, or equivalent detailed description must be provided
|
|
58
|
+
- The specification must contain: clear scope, acceptance criteria, and enough detail to decompose into work items
|
|
59
|
+
- If no specification exists, stop and suggest running the **Research** flow first
|
|
60
|
+
- If the specification has unresolved ambiguities, stop and list them
|
|
44
61
|
|
|
45
62
|
Sequence:
|
|
46
|
-
1.
|
|
47
|
-
2. `
|
|
48
|
-
3.
|
|
63
|
+
1. **Investigate sub-flow** -- explore codebase for architecture, patterns, dependencies relevant to the spec
|
|
64
|
+
2. `product-specialist` -- validate and refine acceptance criteria for the whole scope
|
|
65
|
+
3. `architecture-specialist` -- map dependencies, identify cross-cutting concerns, determine execution order
|
|
66
|
+
4. Decompose into ordered work items (epics, stories, tasks, spikes, bugs), each with:
|
|
67
|
+
- Type (epic, story, task, spike, bug)
|
|
68
|
+
- Acceptance criteria
|
|
69
|
+
- Verification method
|
|
70
|
+
- Dependencies
|
|
71
|
+
- Skills required
|
|
72
|
+
5. Create work items in the tracker (JIRA, Linear, GitHub) with acceptance criteria and dependencies
|
|
73
|
+
6. `learner` -- capture discoveries for future sessions
|
|
74
|
+
|
|
75
|
+
Output: Work items in a tracker with acceptance criteria, ordered by dependency. If the specification cannot be decomposed without further clarification, stop and report what is missing.
|
|
76
|
+
|
|
77
|
+
### Implement
|
|
78
|
+
|
|
79
|
+
When: Working on a specific ticket (story, task, bug, spike), implementing a well-defined piece of work.
|
|
80
|
+
|
|
81
|
+
Gate:
|
|
82
|
+
- A well-defined work item with acceptance criteria must be provided (ticket URL, file spec, or detailed description)
|
|
83
|
+
- The work item must have clear scope, expected behavior, and verification method
|
|
84
|
+
- If acceptance criteria are missing or ambiguous, stop and ask before proceeding
|
|
85
|
+
- If the work item is too large (epic-level), stop and suggest running the **Plan** flow first
|
|
86
|
+
|
|
87
|
+
Determine the work type and execute the matching variant:
|
|
88
|
+
|
|
89
|
+
#### Build (features, stories, tasks)
|
|
90
|
+
|
|
91
|
+
1. **Investigate sub-flow** -- explore codebase for related code, patterns, dependencies
|
|
92
|
+
2. `product-specialist` -- define acceptance criteria, user flows, error states
|
|
93
|
+
3. `architecture-specialist` -- design approach, map files to modify, identify reusable code
|
|
94
|
+
4. `test-specialist` -- design test strategy (coverage, edge cases, TDD sequence)
|
|
95
|
+
5. `builder` -- implement via TDD (acceptance criteria become tests)
|
|
96
|
+
6. Run validation: lint, typecheck, tests
|
|
97
|
+
7. `verification-specialist` -- verify locally (run the software, observe behavior)
|
|
98
|
+
8. Write e2e test encoding the verification
|
|
99
|
+
9. **Review sub-flow**
|
|
100
|
+
10. `learner` -- capture discoveries
|
|
101
|
+
|
|
102
|
+
#### Fix (bugs)
|
|
103
|
+
|
|
104
|
+
1. **Reproduce sub-flow** -- write failing test or script that demonstrates the bug (MANDATORY before any fix is attempted)
|
|
105
|
+
2. **Investigate sub-flow** -- git history, root cause analysis
|
|
106
|
+
3. `debug-specialist` -- prove root cause with evidence
|
|
107
|
+
4. `architecture-specialist` -- assess fix risk, identify files to change, check for ripple effects
|
|
108
|
+
5. `test-specialist` -- design regression test strategy
|
|
109
|
+
6. `bug-fixer` -- implement fix via TDD (reproduction becomes failing test)
|
|
110
|
+
7. Run validation: lint, typecheck, tests
|
|
111
|
+
8. `verification-specialist` -- verify locally (prove the bug is fixed)
|
|
112
|
+
9. Write e2e test encoding the verification
|
|
113
|
+
10. **Review sub-flow**
|
|
114
|
+
11. `learner` -- capture discoveries
|
|
115
|
+
|
|
116
|
+
#### Improve (refactoring, optimization, coverage improvement)
|
|
117
|
+
|
|
118
|
+
1. **Investigate sub-flow** -- understand current state, measure baseline
|
|
119
|
+
2. `architecture-specialist` -- identify target, plan approach
|
|
120
|
+
3. `test-specialist` -- ensure existing test coverage before refactoring (safety net)
|
|
121
|
+
4. `builder` -- implement improvements via TDD
|
|
122
|
+
5. Run validation: lint, typecheck, tests
|
|
123
|
+
6. `verification-specialist` -- measure again, prove improvement over baseline
|
|
124
|
+
7. Write e2e test encoding the verification (if applicable)
|
|
125
|
+
8. **Review sub-flow**
|
|
126
|
+
9. `learner` -- capture discoveries
|
|
127
|
+
|
|
128
|
+
#### Investigate Only (spikes)
|
|
129
|
+
|
|
130
|
+
1. **Investigate sub-flow** -- full investigation
|
|
131
|
+
2. Report findings with evidence
|
|
132
|
+
3. Recommend next action (Research, Plan, Implement, or escalate)
|
|
133
|
+
4. `learner` -- capture discoveries
|
|
134
|
+
|
|
135
|
+
Output: Code passing all validation + local empirical verification + e2e test (except for spikes, which produce findings only).
|
|
49
136
|
|
|
50
137
|
### Verify
|
|
51
|
-
When: Pre-ship quality gate. Used as a sub-flow by Fix and Build.
|
|
52
138
|
|
|
53
|
-
|
|
54
|
-
1. Run full test suite — all tests must pass before proceeding
|
|
55
|
-
2. Run quality checks — lint, typecheck, and format
|
|
56
|
-
3. `verification-specialist` — verify acceptance criteria are met empirically
|
|
139
|
+
When: Code is ready to ship. All local validation passes. Moving from "works on my machine" to "works in production".
|
|
57
140
|
|
|
58
|
-
|
|
59
|
-
|
|
141
|
+
Gate:
|
|
142
|
+
- Code must pass local validation (lint, typecheck, tests)
|
|
143
|
+
- Local empirical verification must be complete
|
|
144
|
+
- If local validation fails, go back to **Implement**
|
|
145
|
+
- If no code changes exist, there is nothing to verify
|
|
60
146
|
|
|
61
147
|
Sequence:
|
|
62
|
-
1. Commit
|
|
63
|
-
2. PR
|
|
64
|
-
3.
|
|
65
|
-
|
|
66
|
-
- If
|
|
67
|
-
- If merge conflicts → resolve and push
|
|
148
|
+
1. Commit -- atomic conventional commits via `git-commit` skill
|
|
149
|
+
2. PR -- create/update pull request via `git-submit-pr` skill
|
|
150
|
+
3. PR Watch Loop (repeat until mergeable):
|
|
151
|
+
- If status checks fail -- fix and push
|
|
152
|
+
- If merge conflicts -- resolve and push
|
|
68
153
|
- If bot review feedback (CodeRabbit, etc.):
|
|
69
|
-
- Valid feedback
|
|
70
|
-
- Invalid feedback
|
|
154
|
+
- Valid feedback -- implement fix, push, resolve comment
|
|
155
|
+
- Invalid feedback -- reply explaining why, resolve comment
|
|
71
156
|
- Repeat until all checks pass and all comments are resolved
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
157
|
+
4. Merge the PR
|
|
158
|
+
5. Monitor deploy (watch the deployment action triggered by merge):
|
|
159
|
+
- If deploy fails -- fix, open new PR, return to step 3
|
|
160
|
+
6. Remote verification:
|
|
161
|
+
- `verification-specialist` -- verify in target environment (same checks as local verification, but on remote)
|
|
162
|
+
- `ops-specialist` -- post-deploy health check, smoke test, monitor for errors in first minutes
|
|
163
|
+
- If remote verification fails -- fix, open new PR, return to step 3
|
|
76
164
|
|
|
77
|
-
|
|
78
|
-
|
|
165
|
+
Output: Merged PR, successful deploy, remote verification passing.
|
|
166
|
+
|
|
167
|
+
## Sub-flows
|
|
168
|
+
|
|
169
|
+
Sub-flows are reusable sequences invoked by main flows. When a flow says "Investigate sub-flow", execute the full Investigate sequence.
|
|
170
|
+
|
|
171
|
+
### Investigate
|
|
172
|
+
|
|
173
|
+
Purpose: Gather context and evidence about code, behavior, or systems.
|
|
79
174
|
|
|
80
175
|
Sequence:
|
|
81
|
-
1.
|
|
82
|
-
2. `
|
|
83
|
-
3. `
|
|
84
|
-
4.
|
|
176
|
+
1. `git-history-analyzer` -- understand why affected code exists, find related past changes
|
|
177
|
+
2. `debug-specialist` -- reproduce if applicable, trace execution, prove findings with evidence
|
|
178
|
+
3. `ops-specialist` -- check logs, errors, health (if runtime issue)
|
|
179
|
+
4. Report findings with evidence
|
|
180
|
+
|
|
181
|
+
### Reproduce
|
|
85
182
|
|
|
86
|
-
|
|
87
|
-
When: Refactoring, optimization, coverage improvement, complexity reduction.
|
|
183
|
+
Purpose: Create a reliable reproduction that demonstrates a bug before fixing it.
|
|
88
184
|
|
|
89
185
|
Sequence:
|
|
90
|
-
1.
|
|
91
|
-
2.
|
|
92
|
-
3.
|
|
93
|
-
4.
|
|
94
|
-
5. **Ship sub-flow**
|
|
95
|
-
6. `learner` — capture discoveries
|
|
186
|
+
1. Execute the exact scenario that triggers the bug
|
|
187
|
+
2. Capture complete error output and evidence
|
|
188
|
+
3. Write a failing test that captures the bug (preferred) or a minimal reproduction script
|
|
189
|
+
4. Verify the reproduction is reliable (runs multiple times, consistently fails)
|
|
96
190
|
|
|
97
|
-
|
|
98
|
-
|
|
191
|
+
A bug MUST be reproduced before any fix is attempted. If reproduction fails, report what was tried and stop.
|
|
192
|
+
|
|
193
|
+
### Review
|
|
194
|
+
|
|
195
|
+
Purpose: Multi-dimensional code review before shipping.
|
|
99
196
|
|
|
100
197
|
Sequence:
|
|
101
|
-
1. `
|
|
102
|
-
2. `
|
|
103
|
-
3.
|
|
104
|
-
4.
|
|
105
|
-
5. `learner` — capture discoveries
|
|
198
|
+
1. Run in parallel: `quality-specialist`, `security-specialist`, `performance-specialist`
|
|
199
|
+
2. `product-specialist` -- verify acceptance criteria are met empirically
|
|
200
|
+
3. `test-specialist` -- verify test coverage and quality
|
|
201
|
+
4. Consolidate findings, ranked by severity
|
|
106
202
|
|
|
107
203
|
### Monitor
|
|
108
|
-
|
|
204
|
+
|
|
205
|
+
Purpose: Check application health and operational status. Can be invoked standalone or as part of Verify.
|
|
109
206
|
|
|
110
207
|
Sequence:
|
|
111
|
-
1. `ops-specialist`
|
|
208
|
+
1. `ops-specialist` -- health checks, log inspection, error monitoring, performance analysis
|
|
112
209
|
2. Report findings, escalate if action needed
|
|
113
210
|
|
|
114
211
|
## JIRA Entry Point
|
|
@@ -116,11 +213,36 @@ Sequence:
|
|
|
116
213
|
When the request references a JIRA ticket (ticket ID like PROJ-123 or a JIRA URL):
|
|
117
214
|
|
|
118
215
|
1. Hand off to `jira-agent`
|
|
119
|
-
2. `jira-agent` reads the ticket
|
|
120
|
-
3.
|
|
121
|
-
4. `jira-agent`
|
|
122
|
-
5. `jira-agent`
|
|
216
|
+
2. `jira-agent` reads the ticket fully (description, comments, attachments, linked issues)
|
|
217
|
+
3. `jira-agent` validates ticket quality via `jira-verify` skill
|
|
218
|
+
4. `jira-agent` runs analytical triage via `ticket-triage` skill
|
|
219
|
+
5. If triage finds unresolved ambiguities (`BLOCKED` verdict), `jira-agent` posts findings and STOPS -- no work begins
|
|
220
|
+
6. `jira-agent` determines intent and delegates to the appropriate flow:
|
|
221
|
+
|
|
222
|
+
| Ticket Type | Flow | Work Type |
|
|
223
|
+
|-------------|------|-----------|
|
|
224
|
+
| Epic | Plan | -- |
|
|
225
|
+
| Story | Implement | Build |
|
|
226
|
+
| Task | Implement | Build |
|
|
227
|
+
| Bug | Implement | Fix |
|
|
228
|
+
| Spike | Implement | Investigate Only |
|
|
229
|
+
| Improvement | Implement | Improve |
|
|
230
|
+
|
|
231
|
+
If the ticket type is ambiguous, read the description to classify. A "Task" that describes broken behavior is a Fix. A "Bug" that requests new functionality is a Build.
|
|
232
|
+
|
|
233
|
+
7. `jira-agent` syncs progress at milestones via `jira-sync` skill
|
|
234
|
+
8. `jira-agent` posts evidence at completion via `jira-evidence` skill
|
|
235
|
+
|
|
236
|
+
## Flow Chaining
|
|
237
|
+
|
|
238
|
+
Flows can chain naturally:
|
|
239
|
+
- Research produces a PRD -- hand it to Plan
|
|
240
|
+
- Plan produces work items -- hand each to Implement
|
|
241
|
+
- Implement produces verified code -- hand to Verify
|
|
242
|
+
- If any flow discovers it lacks what it needs, it stops and suggests the preceding flow
|
|
243
|
+
|
|
244
|
+
The full lifecycle for a large initiative: Research -> Plan -> Implement (per item) -> Verify (per item).
|
|
123
245
|
|
|
124
246
|
## Sub-flow Usage
|
|
125
247
|
|
|
126
|
-
Flows reference sub-flows by name. When a flow says "
|
|
248
|
+
Flows reference sub-flows by name. When a flow says "Investigate sub-flow", execute the full Investigate sub-flow sequence. When it says "Review sub-flow", execute the full Review sequence. Sub-flows can be invoked by any main flow.
|
|
@@ -90,4 +90,15 @@ Every change requires one or more verification types. Classify the change first,
|
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
93
|
+
## Local vs Remote Verification
|
|
94
|
+
|
|
95
|
+
Verification happens at two stages in the workflow:
|
|
96
|
+
|
|
97
|
+
- **Local verification** (part of the Implement flow): Run the full test suite, typecheck, lint, and empirically verify the change in a local or preview environment. This proves the change works before shipping. After local verification succeeds, encode it as an e2e test.
|
|
98
|
+
- **Remote verification** (part of the Verify flow): After the PR is merged and deployed, repeat the same empirical verification against the target environment. This proves the change works in production, not just locally. If remote verification fails, fix and re-deploy.
|
|
99
|
+
|
|
100
|
+
Both levels use the same verification types table above. The difference is the environment, not the rigor.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
93
104
|
For the full verification lifecycle (classify, check tooling, plan, execute, loop), surfaces, escalation protocol, and proof artifact requirements, see the `verification-lifecycle` skill loaded by the `verification-specialist` agent.
|
|
@@ -35,17 +35,28 @@ Using the general-purpose agent in Team Lead session, Determine what branch to u
|
|
|
35
35
|
2. Are we on a feature branch without an open pull request? Use the branch, but ask the human what branch to target for the PR
|
|
36
36
|
3. Are we on an environment branch (dev, staging, main, prod, production)? Check out a feature branch named for this plan and set the target branch of the PR to the environment branch
|
|
37
37
|
|
|
38
|
-
Using the general-purpose agent in Team Lead session, Determine
|
|
39
|
-
1.
|
|
40
|
-
2.
|
|
41
|
-
3.
|
|
42
|
-
4.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
Using the general-purpose agent in Team Lead session, Determine which flow applies:
|
|
39
|
+
1. Research -- needs a PRD (no specification exists)
|
|
40
|
+
2. Plan -- needs decomposition (specification exists but no work items)
|
|
41
|
+
3. Implement -- has a well-defined work item
|
|
42
|
+
4. Verify -- has code ready to ship
|
|
43
|
+
|
|
44
|
+
If Implement, determine the work type:
|
|
45
|
+
1. Build (feature, story, task)
|
|
46
|
+
2. Fix (bug -- mandatory Reproduce sub-flow before investigation)
|
|
47
|
+
3. Improve (refactoring, optimization, coverage improvement)
|
|
48
|
+
4. Investigate Only (spike -- no code changes, just findings)
|
|
49
|
+
|
|
50
|
+
Run the readiness gate check for the selected flow as defined in `.claude/rules/intent-routing.md`. If the gate fails, stop and report what is missing.
|
|
51
|
+
|
|
52
|
+
IF it is a Fix (bug), execute the Reproduce sub-flow FIRST:
|
|
53
|
+
1. Write a failing test that demonstrates the bug (preferred)
|
|
54
|
+
2. If a failing test is not possible, write a minimal reproduction script
|
|
55
|
+
3. Verify the reproduction is reliable (consistent failure)
|
|
56
|
+
4. The reproduction MUST succeed before any investigation or fix attempt begins
|
|
57
|
+
5. Examples of reproduction methods:
|
|
47
58
|
1. Write a simple API client and call the offending API
|
|
48
|
-
2. Start the server on localhost and
|
|
59
|
+
2. Start the server on localhost and use the Playwright CLI or Chrome DevTools
|
|
49
60
|
|
|
50
61
|
Using the general-purpose agent in Team Lead session, determine how you will know that the task is fully complete
|
|
51
62
|
1. Examples
|
|
@@ -78,12 +89,18 @@ Before any task is implemented, the agent team must explore the codebase for rel
|
|
|
78
89
|
Each task must be reviewed by the team to make sure their verification passes.
|
|
79
90
|
Each task must have their learnings reviewed by the learner subagent.
|
|
80
91
|
|
|
81
|
-
Before shutting down the team:
|
|
82
|
-
|
|
83
|
-
1.
|
|
84
|
-
2.
|
|
85
|
-
3.
|
|
86
|
-
4.
|
|
87
|
-
5.
|
|
88
|
-
6.
|
|
89
|
-
7.
|
|
92
|
+
Before shutting down the team, execute the Verify flow:
|
|
93
|
+
|
|
94
|
+
1. Run local validation: lint, typecheck, tests — all must pass
|
|
95
|
+
2. `verification-specialist`: verify locally (empirical proof that the change works)
|
|
96
|
+
3. Write e2e test encoding the verification
|
|
97
|
+
4. Commit ALL outstanding changes in logical batches on the branch (minus sensitive data/information) — not just changes made by the agent team. This includes pre-existing uncommitted changes that were on the branch before the plan started. Do NOT filter commits to only "task-related" files. If it shows up in git status, it gets committed (unless it contains secrets).
|
|
98
|
+
5. Push the changes - if any pre-push hook blocks you, create a task for the agent team to fix the error/problem whether it was pre-existing or not
|
|
99
|
+
6. Open a pull request with auto-merge on
|
|
100
|
+
7. PR Watch Loop: Monitor the PR. Create a task for the agent team to resolve any code review comments by either implementing the suggestions or commenting why they should not be implemented and close the comment. Fix any failing checks and repush. Continue until all checks pass.
|
|
101
|
+
8. Merge the PR
|
|
102
|
+
9. Monitor the deploy action that triggers automatically from the successful merge
|
|
103
|
+
10. If deploy fails, create a task for the agent team to fix the failure, open a new PR and then go back to step 7
|
|
104
|
+
11. Remote verification: `verification-specialist` verifies in target environment (same checks as local verification, but on remote)
|
|
105
|
+
12. `ops-specialist`: post-deploy health check, monitor for errors in first minutes
|
|
106
|
+
13. If remote verification fails, create a task for the agent team to find out why it failed, fix it and return to step 4 (repeat until you get all the way through)
|
|
@@ -5,21 +5,16 @@
|
|
|
5
5
|
"author": { "name": "Cody Swann" },
|
|
6
6
|
"hooks": {
|
|
7
7
|
"UserPromptSubmit": [
|
|
8
|
-
{
|
|
9
|
-
"matcher": "",
|
|
10
|
-
"hooks": [
|
|
11
|
-
{
|
|
12
|
-
"type": "command",
|
|
13
|
-
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/enforce-plan-rules.sh"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
},
|
|
17
8
|
{
|
|
18
9
|
"matcher": "",
|
|
19
10
|
"hooks": [
|
|
20
11
|
{
|
|
21
12
|
"type": "command",
|
|
22
13
|
"command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code user-prompt-submit || true"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "prompt",
|
|
17
|
+
"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"
|
|
23
18
|
}
|
|
24
19
|
]
|
|
25
20
|
}
|
|
@@ -63,7 +58,8 @@
|
|
|
63
58
|
{ "matcher": "", "hooks": [{ "type": "command", "command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code session-start || true" }] }
|
|
64
59
|
],
|
|
65
60
|
"SubagentStart": [
|
|
66
|
-
{ "matcher": "", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/inject-rules.sh" }] }
|
|
61
|
+
{ "matcher": "", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/inject-rules.sh" }] },
|
|
62
|
+
{ "matcher": "", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/inject-flow-context.sh" }] }
|
|
67
63
|
],
|
|
68
64
|
"SessionEnd": [
|
|
69
65
|
{ "matcher": "", "hooks": [{ "type": "command", "command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code session-end || true" }] }
|
|
@@ -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
|
|
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
|
|
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 |
|
|
59
|
-
|
|
60
|
-
|
|
|
61
|
-
| Story |
|
|
62
|
-
| Task |
|
|
63
|
-
|
|
|
64
|
-
| Spike |
|
|
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,
|
|
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**
|
|
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
|
|
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.
|
|
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**
|
|
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
|
|
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.
|
|
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**
|
|
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`
|
|
10
|
-
- `/lisa:plan:fix-linter-error`
|
|
11
|
-
- `/lisa:plan:lower-code-complexity`
|
|
12
|
-
- `/lisa:plan:reduce-max-lines`
|
|
13
|
-
- `/lisa:plan:reduce-max-lines-per-function`
|
|
14
|
-
- `/lisa:plan:improve-tests`
|
|
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
|