@codyswann/lisa 1.82.2 → 1.83.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.
Files changed (74) hide show
  1. package/dist/cli/index.d.ts.map +1 -1
  2. package/dist/cli/index.js +2 -0
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/configs/vitest/base.d.ts +6 -0
  5. package/dist/configs/vitest/base.d.ts.map +1 -1
  6. package/dist/configs/vitest/base.js +11 -0
  7. package/dist/configs/vitest/base.js.map +1 -1
  8. package/dist/configs/vitest/cdk.d.ts +2 -2
  9. package/dist/configs/vitest/cdk.d.ts.map +1 -1
  10. package/dist/configs/vitest/cdk.js +3 -2
  11. package/dist/configs/vitest/cdk.js.map +1 -1
  12. package/dist/configs/vitest/nestjs.d.ts +2 -2
  13. package/dist/configs/vitest/nestjs.d.ts.map +1 -1
  14. package/dist/configs/vitest/nestjs.js +3 -2
  15. package/dist/configs/vitest/nestjs.js.map +1 -1
  16. package/dist/configs/vitest/typescript.d.ts +2 -2
  17. package/dist/configs/vitest/typescript.d.ts.map +1 -1
  18. package/dist/configs/vitest/typescript.js +3 -3
  19. package/dist/configs/vitest/typescript.js.map +1 -1
  20. package/dist/core/config.d.ts +2 -0
  21. package/dist/core/config.d.ts.map +1 -1
  22. package/dist/core/config.js +2 -0
  23. package/dist/core/config.js.map +1 -1
  24. package/dist/core/lisa.d.ts +23 -0
  25. package/dist/core/lisa.d.ts.map +1 -1
  26. package/dist/core/lisa.js +83 -28
  27. package/dist/core/lisa.js.map +1 -1
  28. package/dist/migrations/ensure-expo-postinstall.d.ts +26 -0
  29. package/dist/migrations/ensure-expo-postinstall.d.ts.map +1 -0
  30. package/dist/migrations/ensure-expo-postinstall.js +95 -0
  31. package/dist/migrations/ensure-expo-postinstall.js.map +1 -0
  32. package/dist/migrations/ensure-tsconfig-local-includes.d.ts +26 -0
  33. package/dist/migrations/ensure-tsconfig-local-includes.d.ts.map +1 -0
  34. package/dist/migrations/ensure-tsconfig-local-includes.js +125 -0
  35. package/dist/migrations/ensure-tsconfig-local-includes.js.map +1 -0
  36. package/dist/migrations/index.d.ts +32 -0
  37. package/dist/migrations/index.d.ts.map +1 -0
  38. package/dist/migrations/index.js +53 -0
  39. package/dist/migrations/index.js.map +1 -0
  40. package/dist/migrations/migration.interface.d.ts +48 -0
  41. package/dist/migrations/migration.interface.d.ts.map +1 -0
  42. package/dist/migrations/migration.interface.js +2 -0
  43. package/dist/migrations/migration.interface.js.map +1 -0
  44. package/package.json +1 -1
  45. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa/agents/jira-agent.md +17 -8
  47. package/plugins/lisa/agents/spec-conformance-specialist.md +49 -0
  48. package/plugins/lisa/agents/verification-specialist.md +1 -0
  49. package/plugins/lisa/commands/jira/read-ticket.md +7 -0
  50. package/plugins/lisa/commands/jira/write-ticket.md +7 -0
  51. package/plugins/lisa/commands/spec-conformance.md +7 -0
  52. package/plugins/lisa/skills/jira-create/SKILL.md +7 -1
  53. package/plugins/lisa/skills/jira-read-ticket/SKILL.md +180 -0
  54. package/plugins/lisa/skills/jira-write-ticket/SKILL.md +178 -0
  55. package/plugins/lisa/skills/spec-conformance/SKILL.md +161 -0
  56. package/plugins/lisa/skills/ticket-triage/SKILL.md +14 -2
  57. package/plugins/lisa/skills/verification-lifecycle/SKILL.md +21 -5
  58. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  63. package/plugins/src/base/agents/jira-agent.md +17 -8
  64. package/plugins/src/base/agents/spec-conformance-specialist.md +49 -0
  65. package/plugins/src/base/agents/verification-specialist.md +1 -0
  66. package/plugins/src/base/commands/jira/read-ticket.md +7 -0
  67. package/plugins/src/base/commands/jira/write-ticket.md +7 -0
  68. package/plugins/src/base/commands/spec-conformance.md +7 -0
  69. package/plugins/src/base/skills/jira-create/SKILL.md +7 -1
  70. package/plugins/src/base/skills/jira-read-ticket/SKILL.md +180 -0
  71. package/plugins/src/base/skills/jira-write-ticket/SKILL.md +178 -0
  72. package/plugins/src/base/skills/spec-conformance/SKILL.md +161 -0
  73. package/plugins/src/base/skills/ticket-triage/SKILL.md +14 -2
  74. package/plugins/src/base/skills/verification-lifecycle/SKILL.md +21 -5
@@ -0,0 +1,161 @@
1
+ ---
2
+ name: spec-conformance
3
+ description: "Verifies that shipped work matches its spec section-by-section — acceptance criteria, Out of Scope, Technical Approach, Validation Journey assertions, and any explicit deliverables. Builds a coverage matrix mapping each requirement to evidence, flags scope creep separately from misses, and produces a verdict (CONFORMS / PARTIAL / DIVERGES). Runs during the verification phase alongside empirical system verification."
4
+ allowed-tools: ["Read", "Glob", "Grep", "Bash", "Skill", "mcp__atlassian__getJiraIssue", "mcp__atlassian__searchJiraIssuesUsingJql", "mcp__atlassian__getAccessibleAtlassianResources"]
5
+ ---
6
+
7
+ # Spec Conformance: $ARGUMENTS
8
+
9
+ Compare shipped work against its spec section-by-section. This is the "accountant lens" — did the work ship exactly what was written, nothing more, nothing less? It is NOT UX review (that's `product-specialist`) and it is NOT empirical system verification (that's `verification-specialist`). Run it alongside those, not instead of them.
10
+
11
+ ## Phase 1 — Resolve Spec Source
12
+
13
+ Determine the source of truth for this work. Check in this order:
14
+
15
+ 1. **Explicit spec argument** — plan file path (e.g. `.claude/plans/<name>.md`), JIRA key (e.g. `PROJ-123`), Linear key, GitHub issue URL, or PRD path passed as `$ARGUMENTS`.
16
+ 2. **Linked JIRA ticket** — if the current branch or PR body references a JIRA key, use it.
17
+ 3. **PR body** — if the PR description contains a "Spec" or "Ticket" link, follow it.
18
+ 4. **Plan file on disk** — check `.claude/plans/` for an active plan matching the branch name.
19
+
20
+ If none of the above resolves, stop. Do not guess what the spec was. Report: "No spec source found — pass a plan file, ticket key, or PR URL."
21
+
22
+ Based on the source, load the full spec:
23
+
24
+ | Source | How to Load |
25
+ |--------|-------------|
26
+ | Plan file (`.md`) | `Read` the file |
27
+ | JIRA key | Invoke `/jira-read-ticket <KEY>` to get the full context bundle (primary ticket + epic + linked tickets) |
28
+ | Linear key | Fetch via Linear MCP if available; else `Bash` with Linear CLI; else report "Linear reader unavailable" |
29
+ | GitHub issue | `gh issue view <number> --json title,body,comments,labels,milestone` |
30
+ | PRD | `Read` the file or fetch via Notion MCP if it's a Notion URL |
31
+
32
+ ## Phase 2 — Extract Requirements
33
+
34
+ Parse the spec into a structured requirement list. Do NOT skip sections — every requirement becomes a row in the coverage matrix.
35
+
36
+ Sections to extract:
37
+
38
+ | Section | What to Extract | Classification |
39
+ |---------|-----------------|----------------|
40
+ | Acceptance Criteria | Each Gherkin scenario or bullet | `acceptance` |
41
+ | Out of Scope | Each excluded item | `excluded` (flags scope creep) |
42
+ | Technical Approach | Each concrete implementation commitment (not narrative) | `technical` |
43
+ | Validation Journey Assertions | Each `Assertion:` bullet | `assertion` |
44
+ | Deliverables | Each explicit deliverable (migration, doc, endpoint, script) | `deliverable` |
45
+ | Plan file tasks | Each task marked complete in the plan | `task` |
46
+ | Linked blocker resolutions | Each `is blocked by` that required work in this ticket | `blocker` |
47
+
48
+ If an acceptance criterion is not in Gherkin, still extract it as a requirement — but flag it as `LOW_SPECIFICITY` so the verdict downgrades.
49
+ Downgrade rule: if any `LOW_SPECIFICITY` requirement exists, the maximum possible verdict is `PARTIAL` unless the spec is tightened and re-evaluated.
50
+
51
+ Skip narrative prose (Context / Business Value) — it isn't directly verifiable. Reference it only when explaining a miss.
52
+
53
+ ## Phase 3 — Inspect Shipped Work
54
+
55
+ Gather evidence of what was actually shipped:
56
+
57
+ 1. **Diff scope** — the commits on the current branch vs. the default branch:
58
+ ```bash
59
+ BASE_BRANCH="$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')"
60
+ git log "${BASE_BRANCH}"..HEAD --oneline
61
+ git diff "${BASE_BRANCH}"...HEAD --stat
62
+ ```
63
+ 2. **File-level changes** — per-file diff for each changed file:
64
+ ```bash
65
+ git diff "${BASE_BRANCH}"...HEAD -- <file>
66
+ ```
67
+ 3. **Test coverage** — which tests were added/changed for the requirements:
68
+ ```bash
69
+ git diff "${BASE_BRANCH}"...HEAD -- '**/*.test.*' '**/*.spec.*'
70
+ ```
71
+ 4. **Empirical evidence** — output of `verification-specialist` if available (proof artifacts, API captures, UI screenshots, DB queries). If that report isn't in context, ask the caller for it before proceeding — do not substitute reading code for running the system.
72
+ 5. **PR description** — `gh pr view --json title,body,files` if a PR exists.
73
+ 6. **Deployed state** — if the verification phase already hit a deployed environment, use those captures.
74
+
75
+ Do NOT run the system yourself — that's the verification-specialist's job. Your job is to map their evidence to the spec.
76
+
77
+ ## Phase 4 — Build Coverage Matrix
78
+
79
+ For every requirement extracted in Phase 2, produce one row:
80
+
81
+ | Column | Value |
82
+ |--------|-------|
83
+ | Requirement ID | Stable identifier (e.g. `AC-1`, `OOS-2`, `ASSERT-3`) |
84
+ | Classification | `acceptance` / `excluded` / `technical` / `assertion` / `deliverable` / `task` / `blocker` |
85
+ | Requirement Text | Verbatim from spec |
86
+ | Evidence | Specific pointer — file:line, test name, verification report section, PR file, screenshot name |
87
+ | Status | `MATCH` / `PARTIAL` / `MISSING` / `SCOPE_CREEP_VIOLATION` |
88
+ | Notes | One line — why partial, what's missing, or where evidence is thin |
89
+
90
+ ### Status definitions
91
+
92
+ - **`MATCH`** — requirement is implemented AND there is empirical evidence it works (test + verification report).
93
+ - **`PARTIAL`** — implementation exists but evidence is incomplete (e.g. code present, no test; or test present, no run-time verification).
94
+ - **`MISSING`** — requirement has no corresponding implementation OR no evidence at all.
95
+ - **`SCOPE_CREEP_VIOLATION`** — used for `excluded` classification only. An Out-of-Scope item appears to have been shipped anyway. This is a different failure than a miss — it means the agent exceeded the spec.
96
+
97
+ ### Scope creep detection
98
+
99
+ Separately from the matrix, scan the diff for work NOT traceable to any requirement. For each such change:
100
+
101
+ - Identify the file/module
102
+ - Summarize the change in one line
103
+ - Classify as `UNTRACEABLE_CHANGE` (not necessarily wrong — refactors often land here — but MUST be surfaced)
104
+
105
+ Untraceable changes are not automatic failures. They become findings the human reviews.
106
+
107
+ ## Phase 5 — Verdict
108
+
109
+ Produce exactly one verdict:
110
+
111
+ - **`CONFORMS`** — every requirement is `MATCH`. No `SCOPE_CREEP_VIOLATION`. Untraceable changes, if any, are clearly refactors or test support.
112
+ - **`PARTIAL`** — some requirements are `PARTIAL` but none are `MISSING` or `SCOPE_CREEP_VIOLATION`. Work is mostly there but evidence is thin.
113
+ - **`DIVERGES`** — at least one requirement is `MISSING`, OR at least one `SCOPE_CREEP_VIOLATION` exists, OR there are substantive untraceable changes that materially alter behavior.
114
+
115
+ A verdict of `PARTIAL` or `DIVERGES` blocks task completion. The caller must resolve the gaps (implement the miss, remove the creep, add the missing evidence) before re-running.
116
+
117
+ ## Phase 6 — Output
118
+
119
+ Structure the report so it can be pasted into a PR comment or JIRA ticket:
120
+
121
+ ```text
122
+ ## Spec Conformance Report
123
+
124
+ **Spec source:** <plan file / JIRA key / Linear / GitHub issue / PRD>
125
+ **Shipped scope:** <N commits, M files, K tests on branch <branch> vs <default-branch>>
126
+
127
+ ### Coverage Matrix
128
+
129
+ | ID | Class | Requirement | Evidence | Status | Notes |
130
+ |----|-------|-------------|----------|--------|-------|
131
+ | AC-1 | acceptance | [text] | [pointer] | MATCH | |
132
+ | AC-2 | acceptance | [text] | — | MISSING | No corresponding code or test |
133
+ | OOS-1 | excluded | [text] | src/foo.ts:42 | SCOPE_CREEP_VIOLATION | Added anyway |
134
+ | ASSERT-1 | assertion | [text] | verification-report §2 | PARTIAL | Asserted in code, not run in verification |
135
+
136
+ ### Untraceable Changes
137
+ - src/utils/helpers.ts — extracted shared regex constant (refactor, no behavior change)
138
+ - src/auth/session.ts — added retry logic (NOT IN SPEC — verify intentional)
139
+
140
+ ### Verdict: CONFORMS | PARTIAL | DIVERGES
141
+
142
+ **Matches:** N/Total
143
+ **Partial:** N
144
+ **Missing:** N
145
+ **Scope creep violations:** N
146
+ **Untraceable changes flagged for review:** N
147
+
148
+ ### Required Actions (if PARTIAL or DIVERGES)
149
+ 1. [specific action — implement X, remove Y, add test for Z, capture evidence for W]
150
+ 2. ...
151
+ ```
152
+
153
+ ## Rules
154
+
155
+ - Never substitute "I read the code and it looks right" for empirical evidence. If verification-specialist hasn't run yet, request its report before producing a verdict.
156
+ - Never mark a requirement `MATCH` based on the presence of code alone — evidence means test + runtime observation.
157
+ - Always surface scope creep separately from misses. They are distinct failures.
158
+ - Always surface untraceable changes — even benign refactors — so the human can confirm intent.
159
+ - The Out of Scope section is load-bearing. If the spec has one, every item must appear in the matrix as `excluded`.
160
+ - If the spec has no acceptance criteria, flag the spec itself as inadequate before running the matrix. The verdict is `DIVERGES` for spec inadequacy until criteria are added.
161
+ - Do not invent requirements the spec didn't state. If the shipped work does something reasonable but unspecified, it becomes an untraceable change, not a match.
@@ -6,7 +6,7 @@ allowed-tools: ["Read", "Glob", "Grep", "Bash"]
6
6
 
7
7
  # Ticket Triage: $ARGUMENTS
8
8
 
9
- Perform analytical triage on the JIRA ticket. The caller has fetched the ticket details (summary, description, acceptance criteria, labels, status, comments) and provided them in context.
9
+ Perform analytical triage on the JIRA ticket. The caller MUST have run `jira-read-ticket` first and provided the resulting context bundle — which includes the primary ticket, all linked tickets (blocks / is blocked by / relates to / duplicates), epic parent, epic siblings, subtasks, and remote PR state. Do not triage from a bare ticket summary — if the bundle is missing link or epic context, stop and instruct the caller to run `/jira-read-ticket` first.
10
10
 
11
11
  Repository name for scoped labels and comment headers: determine via `basename $(git rev-parse --show-toplevel)`.
12
12
 
@@ -23,6 +23,18 @@ If NO relevant code is found in this repo:
23
23
 
24
24
  If relevant code IS found, proceed to Phase 2.
25
25
 
26
+ ## Phase 1.5 -- Relationship & Epic Awareness
27
+
28
+ From the context bundle, evaluate relationships before analyzing this ticket in isolation:
29
+
30
+ - **Open blockers (`is blocked by`)**: if any blocker is not `Done` or its linked PR is not merged, raise an ambiguity: "Blocker {KEY} is not shipped — work cannot meaningfully start." This is an automatic `BLOCKED` verdict unless the human confirms the blocker state is acceptable.
31
+ - **Epic siblings in progress**: if a sibling under the same epic is `In Progress` / `In Review` with a different assignee and overlapping scope, raise it as an edge case in Phase 4 ("Duplicate-work risk with {KEY}").
32
+ - **`duplicates` / `is duplicated by` links**: if this ticket is a duplicate of an open ticket, verdict is `BLOCKED` with the recommendation to close as duplicate rather than implement.
33
+ - **`relates to` links with shipped PRs**: flag the PRs in the verification methodology (Phase 5) as prior art worth reviewing before writing new code.
34
+
35
+ Do not re-fetch tickets — the bundle already has the context.
36
+ If Phase 1.5 finds an automatic blocker condition (`is blocked by` not shipped, or duplicate-of-open), emit `BLOCKED` immediately and skip to Phase 6 output formatting.
37
+
26
38
  ## Phase 2 -- Cross-Repo Awareness
27
39
 
28
40
  Parse the ticket's existing comments for triage headers from OTHER repositories. Look for patterns like:
@@ -111,7 +123,7 @@ Every verification method must be specific enough that an automated agent could
111
123
  Evaluate the findings and produce exactly one verdict:
112
124
 
113
125
  - **`NOT_RELEVANT`** -- No relevant code was found in this repository (Phase 1). The caller should add the triage label and skip implementation in this repo.
114
- - **`BLOCKED`** -- Ambiguities were found in Phase 3. Work MUST NOT proceed until the ambiguities are resolved by a human. The caller should post findings, add the triage label, and STOP.
126
+ - **`BLOCKED`** -- Blocking conditions were found in Phase 1.5 (open blockers, duplicate-of-open) and/or ambiguities were found in Phase 3. Work MUST NOT proceed until resolved by a human. The caller should post findings, add the triage label, and STOP.
115
127
  - **`PASSED_WITH_FINDINGS`** -- No ambiguities, but edge cases or verification findings were identified. Work can proceed. The caller should post findings and add the triage label.
116
128
  - **`PASSED`** -- No ambiguities, edge cases, or verification gaps found. Work can proceed. The caller should add the triage label.
117
129
 
@@ -42,9 +42,23 @@ A verification plan that only lists `bun run test`, `bun run typecheck`, or `bun
42
42
 
43
43
  After implementation, run the verification plan. Execute each verification type in order.
44
44
 
45
- ### 7. Loop
45
+ ### 7. Spec Conformance
46
46
 
47
- If any verification fails, fix the issue and re-verify. Do not declare done until all required types pass. If a verification is stuck after 3 attempts, escalate.
47
+ After empirical verification produces evidence, run spec conformance as a separate, mandatory step. Invoke the `spec-conformance` skill (or delegate to the `spec-conformance-specialist` agent) with the spec source plan file, JIRA/Linear/GitHub key, or PRD.
48
+
49
+ Spec conformance answers a question empirical verification does NOT: does the shipped work match what was asked, section-by-section? It consumes the empirical evidence from step 6 and builds a coverage matrix over every requirement (acceptance criteria, Out of Scope, technical commitments, Validation Journey assertions, deliverables).
50
+
51
+ Required outputs:
52
+ - Coverage matrix with one row per requirement
53
+ - Scope creep findings (Out-of-Scope violations, surfaced separately from misses)
54
+ - Untraceable change findings (diff not traceable to any requirement)
55
+ - Verdict: `CONFORMS`, `PARTIAL`, or `DIVERGES`
56
+
57
+ `PARTIAL` or `DIVERGES` blocks completion. Fix the gaps (implement the miss, remove the creep, capture the missing evidence) and re-run both empirical verification AND spec conformance. Never skip this step — it catches failures that empirical verification by itself does not, such as a feature that works but wasn't asked for, or a spec item that was quietly dropped.
58
+
59
+ ### 8. Loop
60
+
61
+ If any verification or spec-conformance check fails, fix the issue and re-verify. Do not declare done until all required types pass AND the spec-conformance verdict is `CONFORMS`. If a verification or conformance check is stuck after 3 attempts, escalate.
48
62
 
49
63
  ---
50
64
 
@@ -180,8 +194,9 @@ Agents must follow this sequence unless explicitly instructed otherwise:
180
194
  8. Implement the change.
181
195
  9. Execute verification plan — run the actual system and observe results.
182
196
  10. Collect proof artifacts.
183
- 11. Summarize what changed, what was verified, and remaining risk.
184
- 12. Label the result with a verification level.
197
+ 11. Run spec conformance build coverage matrix against the spec source (plan/ticket/issue), flag scope creep and untraceable changes, produce verdict.
198
+ 12. Summarize what changed, what was verified, conformance verdict, and remaining risk.
199
+ 13. Label the result with a verification level.
185
200
 
186
201
  ---
187
202
 
@@ -290,9 +305,10 @@ A task is done only when:
290
305
 
291
306
  - End user is identified
292
307
  - All applicable verification types are classified and executed
293
- - Verification lifecycle is completed (classify, check tooling, plan, execute, loop)
308
+ - Verification lifecycle is completed (classify, check tooling, plan, execute, spec conformance, loop)
294
309
  - Required verification surfaces and tooling surfaces are used or explicitly unavailable
295
310
  - Proof artifacts are captured
311
+ - Spec conformance verdict is `CONFORMS` (not `PARTIAL`, not `DIVERGES`)
296
312
  - Verification level is declared
297
313
  - Risks and gaps are documented
298
314