@codyswann/lisa 2.73.0 → 2.74.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 (35) hide show
  1. package/package.json +1 -1
  2. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  3. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  4. package/plugins/lisa/rules/intent-routing.md +19 -10
  5. package/plugins/lisa/skills/debrief/SKILL.md +5 -0
  6. package/plugins/lisa/skills/implement/SKILL.md +11 -10
  7. package/plugins/lisa/skills/intake/SKILL.md +1 -1
  8. package/plugins/lisa/skills/plan/SKILL.md +1 -1
  9. package/plugins/lisa/skills/research/SKILL.md +7 -2
  10. package/plugins/lisa/skills/tracker-evidence/SKILL.md +4 -2
  11. package/plugins/lisa/skills/verify/SKILL.md +2 -1
  12. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  15. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  16. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  18. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  19. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  20. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  22. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  24. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  26. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  28. package/plugins/src/base/rules/intent-routing.md +19 -10
  29. package/plugins/src/base/skills/debrief/SKILL.md +5 -0
  30. package/plugins/src/base/skills/implement/SKILL.md +11 -10
  31. package/plugins/src/base/skills/intake/SKILL.md +1 -1
  32. package/plugins/src/base/skills/plan/SKILL.md +1 -1
  33. package/plugins/src/base/skills/research/SKILL.md +7 -2
  34. package/plugins/src/base/skills/tracker-evidence/SKILL.md +4 -2
  35. package/plugins/src/base/skills/verify/SKILL.md +2 -1
package/package.json CHANGED
@@ -82,7 +82,7 @@
82
82
  "lodash": ">=4.18.1"
83
83
  },
84
84
  "name": "@codyswann/lisa",
85
- "version": "2.73.0",
85
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.1",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -70,7 +70,8 @@ Sequence:
70
70
  5. Synthesize findings into a PRD containing: problem statement, user stories, acceptance criteria, technical constraints, open questions, and proposed scope
71
71
  6. **Plan Phase Tooling** -- review all available skills and agents (project-defined, plugin-provided, and built-in) and determine which ones the Plan phase will need. For each recommended skill or agent, state why it is needed. If no skills or agents beyond the defaults are identified, explicitly justify why the standard set is sufficient. Include this as a "Recommended Tooling for Plan Phase" section in the PRD.
72
72
  7. **Create the PRD in the configured source** -- invoke `lisa:prd-source-write` with the synthesized PRD (`title`, `body`, `initial_role` resolved from the caller's `prd_ready` flag — `draft` by default, `ready` when `prd_ready=true`, plus any `dedupe_key`/`marker`/`source_ref` the caller passed). The PRD **lives in the source** (Notion page / Confluence page / GitHub issue / Linear project per `.lisa.config.json` `source`); there is no separate document artifact. A `source` must be configured — if it is not, stop and report it. `prd-source-write` dedupes by marker, so re-running against the same idea references the existing PRD instead of creating a duplicate.
73
- 8. `learner` -- capture discoveries for future sessions
73
+ 8. **Record Research usage on the PRD artifact** -- invoke `lisa:usage-accounting` against the created PRD/source artifact so it gains a direct `research` usage entry in the canonical `## Lisa Usage` section at creation time. If the runtime cannot provide trustworthy usage, still write the row with `source: unavailable` and nullable token/cost fields; missing usage is never treated as zero or silently omitted.
74
+ 9. `learner` -- capture discoveries for future sessions
74
75
 
75
76
  Output: A PRD created in the configured source, carrying a "Recommended Tooling for Plan Phase" section, in the `draft` role by default (or `ready` when `prd_ready=true`, so `lisa:intake` auto-claims it). If there is not enough context to produce a complete PRD, stop and report what is missing rather than creating an incomplete one. If no `source` is configured, stop and report it rather than emitting a loose document.
76
77
 
@@ -97,8 +98,10 @@ Sequence:
97
98
  - Dependencies
98
99
  - Skills and agents required (from step 5)
99
100
  7. Create work items in the tracker (JIRA, Linear, GitHub) with acceptance criteria, dependencies, and recommended skills/agents
100
- 8. **PRD back-link** -- update the source PRD with a `## Tickets` section listing every created work item (key, title, type, link), so the PRD becomes the canonical anchor for downstream flows (notably **Debrief**). Invoke `lisa:prd-backlink` with the PRD source and the created ticket list. The section is regenerated on each run, not appended, so re-planning never produces stale links.
101
- 9. `learner` -- capture discoveries for future sessions
101
+ 8. **Record Plan usage on the PRD and created work items** -- route all direct usage writes through `lisa:usage-accounting`: attach a `plan` entry to the source PRD/spec artifact and to each created work item. If runtime usage is unavailable, still write an explicit `source: unavailable` row with nullable token/cost fields instead of omitting the entry.
102
+ 9. **PRD back-link** -- update the source PRD with a `## Tickets` section listing every created work item (key, title, type, link), so the PRD becomes the canonical anchor for downstream flows (notably **Debrief**). Invoke `lisa:prd-backlink` with the PRD source and the created ticket list. The section is regenerated on each run, not appended, so re-planning never produces stale links.
103
+ 10. **Refresh the PRD usage rollup** -- re-invoke `lisa:usage-accounting` on the source PRD after `lisa:prd-backlink` regenerates child refs so the PRD `## Lisa Usage` rollup reflects the created ticket set.
104
+ 11. `learner` -- capture discoveries for future sessions
102
105
 
103
106
  Output: Work items in a tracker with acceptance criteria and recommended skills/agents, ordered by dependency. The source PRD carries a `## Tickets` section linking back to every created item. If the specification cannot be decomposed without further clarification, stop and report what is missing.
104
107
 
@@ -124,8 +127,9 @@ Determine the work type and execute the matching variant:
124
127
  6. Run quality gates: lint, typecheck, tests (these are prerequisites, NOT verification)
125
128
  7. `verification-specialist` -- verify locally (run the software, observe behavior)
126
129
  8. `verification-specialist` -- invoke `codify-verification` skill per passing verification (Playwright for UI, integration test for API/DB/auth, etc.); commit each test in the same PR
127
- 9. **Review sub-flow**
128
- 10. `learner` -- capture discoveries
130
+ 9. **Record Implement usage on the work artifact** -- invoke `lisa:usage-accounting` against the originating work item or implementation artifact so it gains a direct `implement` usage entry in the canonical `## Lisa Usage` section. If the hierarchy / parent refs are already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise record the direct entry and leave rollup for the next caller that has the child refs. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of omitting the row.
131
+ 10. **Review sub-flow**
132
+ 11. `learner` -- capture discoveries
129
133
 
130
134
  #### Fix (bugs)
131
135
 
@@ -138,8 +142,9 @@ Determine the work type and execute the matching variant:
138
142
  7. Run quality gates: lint, typecheck, tests (these are prerequisites, NOT verification)
139
143
  8. `verification-specialist` -- verify locally (prove the bug is fixed)
140
144
  9. `verification-specialist` -- invoke `codify-verification` skill to encode the fix as a regression test (mandatory for bug fixes — the test must fail against the pre-fix commit and pass against the fix); commit in the same PR
141
- 10. **Review sub-flow**
142
- 11. `learner` -- capture discoveries
145
+ 10. **Record Implement usage on the work artifact** -- invoke `lisa:usage-accounting` against the originating work item or implementation artifact so it gains a direct `implement` usage entry in the canonical `## Lisa Usage` section. If the hierarchy / parent refs are already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise record the direct entry and leave rollup for the next caller that has the child refs. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of omitting the row.
146
+ 11. **Review sub-flow**
147
+ 12. `learner` -- capture discoveries
143
148
 
144
149
  #### Improve (refactoring, optimization, coverage improvement)
145
150
 
@@ -150,8 +155,9 @@ Determine the work type and execute the matching variant:
150
155
  5. Run quality gates: lint, typecheck, tests (these are prerequisites, NOT verification)
151
156
  6. `verification-specialist` -- measure again, prove improvement over baseline
152
157
  7. `verification-specialist` -- invoke `codify-verification` skill (typically a benchmark asserting against baseline for performance work, or a regression test for behavioral refactors); commit in the same PR
153
- 8. **Review sub-flow**
154
- 9. `learner` -- capture discoveries
158
+ 8. **Record Implement usage on the work artifact** -- invoke `lisa:usage-accounting` against the originating work item or implementation artifact so it gains a direct `implement` usage entry in the canonical `## Lisa Usage` section. If the hierarchy / parent refs are already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise record the direct entry and leave rollup for the next caller that has the child refs. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of omitting the row.
159
+ 9. **Review sub-flow**
160
+ 10. `learner` -- capture discoveries
155
161
 
156
162
  #### Investigate Only (spikes)
157
163
 
@@ -190,6 +196,8 @@ Sequence:
190
196
  - `verification-specialist` -- verify in target environment (same checks as local verification, but on remote)
191
197
  - `ops-specialist` -- post-deploy health check, smoke test, monitor for errors in first minutes
192
198
  - If remote verification fails -- fix, open new PR, return to step 3
199
+ 7. **Record Verify usage on the evidence artifact** -- invoke `lisa:usage-accounting` against the generated evidence artifact (comment body, PR evidence section, or markdown proof) so it gains a direct `verify` usage entry in the canonical `## Lisa Usage` section. If the originating work item or PRD parentage is known, prefer `record_and_rollup` so ancestor totals refresh in the same pass. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of omitting the row.
200
+ 8. **Post evidence via the tracker surface** -- invoke `lisa:tracker-evidence` after the usage write so the same canonical evidence artifact is uploaded / posted without hand-editing a second format.
193
201
 
194
202
  Output: Merged PR, successful deploy, remote verification passing.
195
203
 
@@ -215,7 +223,8 @@ Sequence:
215
223
  - **Tooling gap** — missing skill, wrong agent assignment, broken hook, missing automation
216
224
  - **Convention drift** — an unwritten rule revealed by review comments that should be codified
217
225
  4. **Produce the human-triage document** — a markdown file with one row per candidate learning showing: category, summary, evidence (links to the source ticket comment / PR comment / commit), recommended persistence destination, and a checkbox-style disposition field the human will mark (Accept / Reject / Defer). Surface step-1 anomalies (work items missing PRs, etc.) in a separate section. The document is exhaustive — it lists every candidate, even ones the synthesizer rates low confidence — because the human, not the agent, decides what is worth keeping.
218
- 5. **Stop and hand the document to the human.** Debrief does NOT persist accepted learnings itself. The human triages, marks dispositions, and runs the **`/lisa:debrief:apply`** command (skill: `debrief-apply`) to route the accepted items to their destinations.
226
+ 5. **Record Debrief usage on the triage document** invoke `lisa:usage-accounting` against the generated markdown artifact so the document carries its own direct `debrief` usage entry in the canonical `## Lisa Usage` section. If runtime usage is unavailable, write the entry with `source: unavailable` and nullable token/cost fields rather than skipping it.
227
+ 6. **Stop and hand the document to the human.** Debrief does NOT persist accepted learnings itself. The human triages, marks dispositions, and runs the **`/lisa:debrief:apply`** command (skill: `debrief-apply`) to route the accepted items to their destinations.
219
228
 
220
229
  Output: A triage-ready learnings document covering every work item and PR in the initiative, with structured evidence and disposition fields. Persistence is deferred to `debrief-apply`, which the human invokes after triage.
221
230
 
@@ -69,6 +69,11 @@ A markdown triage document at `./debrief/<initiative-slug>-<YYYY-MM-DD>.md` (or
69
69
  - `Disposition` — empty checkbox-style field the human will fill: `[ ] Accept` / `[ ] Reject` / `[ ] Defer` plus a free-text reason
70
70
  4. **Source map** — appendix listing every work item and PR walked, so the human can verify completeness.
71
71
 
72
+ Before returning, write the Debrief run's direct usage onto the triage document through
73
+ `lisa:usage-accounting` so the markdown artifact carries its own `## Lisa Usage` section separate
74
+ from delivery-time usage. If runtime usage is unavailable, record a debrief entry with
75
+ `source: unavailable` and nullable token/cost fields instead of skipping the row.
76
+
72
77
  The skill's terminal output is the path to the triage document and a one-line summary of counts per category. Persistence does not happen here — that is `lisa:debrief-apply`'s job.
73
78
 
74
79
  ## Hand-off
@@ -127,13 +127,14 @@ Before shutting down the team, execute the Verify flow:
127
127
  1. Run quality gates: lint, typecheck, tests — all must pass. These are prerequisites, NOT verification.
128
128
  2. `verification-specialist`: verify locally by running the actual system and observing results (empirical proof that the change works). This is the real verification step.
129
129
  3. Write e2e test encoding the verification
130
- 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).
131
- 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
132
- 6. Open a pull request with auto-merge on via `lisa:git-submit-pr`, targeting the **base branch resolved from the ticket's environment** (`target_branch=<base>`, per the branch step above), and including the work-item ref when one exists so the PR can be linked natively to the source issue.
133
- 7. PR Watch Loop: Monitor the PR using `git-submit-pr`'s drive-to-merge behavior. 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. If the PR is `BEHIND`, blocked by stale review state, or cannot enable auto-merge, follow the harness-agnostic `git-submit-pr` re-sync, review-gate, and direct-merge fallback loop until the PR is actually merged or a blocking failure is surfaced.
134
- 8. Merge the PR
135
- 9. Monitor the deploy action that triggers automatically from the successful merge
136
- 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
137
- 11. Remote verification: `verification-specialist` verifies in target environment (same checks as local verification, but on remote)
138
- 12. `ops-specialist`: post-deploy health check, monitor for errors in first minutes
139
- 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)
130
+ 4. Record Implement usage on the originating work artifact via `lisa:usage-accounting` so the work item (or other implementation-owned artifact) gains a direct `implement` usage entry in the canonical `## Lisa Usage` section. If the parent / child graph is already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise still write the direct entry, and if runtime usage is unavailable, use `source: unavailable` with nullable token/cost fields instead of skipping the row.
131
+ 5. 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).
132
+ 6. 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
133
+ 7. Open a pull request with auto-merge on via `lisa:git-submit-pr`, targeting the **base branch resolved from the ticket's environment** (`target_branch=<base>`, per the branch step above), and including the work-item ref when one exists so the PR can be linked natively to the source issue.
134
+ 8. PR Watch Loop: Monitor the PR using `git-submit-pr`'s drive-to-merge behavior. 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. If the PR is `BEHIND`, blocked by stale review state, or cannot enable auto-merge, follow the harness-agnostic `git-submit-pr` re-sync, review-gate, and direct-merge fallback loop until the PR is actually merged or a blocking failure is surfaced.
135
+ 9. Merge the PR
136
+ 10. Monitor the deploy action that triggers automatically from the successful merge
137
+ 11. 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
138
+ 12. Remote verification: `verification-specialist` verifies in target environment (same checks as local verification, but on remote)
139
+ 13. `ops-specialist`: post-deploy health check, monitor for errors in first minutes
140
+ 14. If remote verification fails, create a task for the agent team to find out why it failed, fix it and return to step 5 (repeat until you get all the way through)
@@ -102,7 +102,7 @@ The single-item skills (`lisa:plan`, `lisa:implement`) and the per-vendor batch
102
102
  - GitHub build issues (when `tracker = github`) → `lisa:tracker-build-intake` → `lisa:github-build-intake` handles per-item: optional ready-queue assignee filtering, claim (relabel to `status:in-progress`), dispatch to `lisa:github-agent`, relabel to `status:on-dev` on success
103
103
  - **Closing the PRD loop:** beyond claiming one Ready PRD, every PRD scanner also runs the closure rollup (`ticketed → shipped`, Phase 3f) and **dispatches `lisa:verify-prd` for one shipped PRD** (Phase 3g) each cycle — so a shipped PRD does not sit unverified. On pass the PRD goes `shipped → verified`; on fail it is re-opened `shipped → ticketed` with **build-ready fix tickets** that auto-build and trigger a re-verify (never `blocked`). The scanner only dispatches; `lisa:verify-prd` owns the transition (per the `prd-lifecycle-rollup` rule's "Closing the loop" section), and the self-healing loop continues until the PRD verifies.
104
104
  5. **Stop after one item** — a claimed Ready item, a safe-blocked container, or a per-item error ends the *ready-claim* portion of the cycle. The per-vendor PRD scanner still runs its rollup and one verify-prd dispatch. Remaining Ready items stay untouched for later scheduler invocations.
105
- 6. **Summary report** — the single processed/skipped/error item, total processed, total errors.
105
+ 6. **Summary report** — the single processed/skipped/error item, total processed, total errors. Before returning, record intake usage on the persisted cycle-summary artifact via `lisa:usage-accounting` so the summary carries a direct `intake` entry in the canonical `## Lisa Usage` section. If the claimed / skipped work item's parent-child graph is already known, prefer `record_and_rollup` so ancestor totals refresh in the same cycle; otherwise still write the direct entry, and if runtime usage is unavailable, use `source: unavailable` with nullable token/cost fields instead of skipping the row.
106
106
 
107
107
  ## Schedule examples
108
108
 
@@ -52,4 +52,4 @@ Execute the **Plan** flow as defined in the `intent-routing` rule (loaded via th
52
52
 
53
53
  ## Output
54
54
 
55
- Work items in the configured tracker (JIRA, GitHub Issues, or Linear, per `.lisa.config.json` `tracker`) with acceptance criteria, dependencies, and recommended skills/agents per item. Ordered by dependency. If the specification cannot be decomposed without further clarification, stop and report what is missing.
55
+ Work items in the configured tracker (JIRA, GitHub Issues, or Linear, per `.lisa.config.json` `tracker`) with acceptance criteria, dependencies, and recommended skills/agents per item. Ordered by dependency. Before finishing, route usage writes through `lisa:usage-accounting`: record the Plan run as a direct entry on the source PRD/spec artifact, attach a plan usage entry (or an explicit `source: unavailable` entry with nullable token/cost fields) to each created work item, and refresh the PRD rollup after `lisa:prd-backlink` regenerates the `## Tickets` child refs. Do not invent plan-specific ledger formats or omit missing usage silently. If the specification cannot be decomposed without further clarification, stop and report what is missing.
@@ -45,5 +45,10 @@ feasibility notes, open questions, and the "Recommended Tooling for Plan Phase"
45
45
  flow step invokes `lisa:prd-source-write`, which creates the PRD in the configured `source` (Notion
46
46
  page in the PRD database, Confluence page under the lifecycle parent, GitHub issue, or Linear
47
47
  project) in the `draft` role by default or `ready` when `prd_ready=true`. **The PRD lives in the
48
- source — there is no loose document artifact.** A `source` must be configured; if it is not, stop and
49
- report it rather than emitting a document. The Plan flow consumes the created PRD next.
48
+ source — there is no loose document artifact.** Before handing the synthesized PRD to
49
+ `lisa:prd-source-write`, record the Research run's direct usage on that artifact through
50
+ `lisa:usage-accounting` so the PRD body carries the canonical `## Lisa Usage` ledger from creation
51
+ time onward. If the runtime does not expose trustworthy usage, the direct entry must still be
52
+ written with `source: unavailable` and nullable token/cost fields rather than silently omitting the
53
+ Research row. A `source` must be configured; if it is not, stop and report it rather than emitting
54
+ a document. The Plan flow consumes the created PRD next.
@@ -13,17 +13,19 @@ See the `config-resolution` rule for configuration and dispatch table.
13
13
  ## Workflow
14
14
 
15
15
  1. Resolve tracker config (same logic as `lisa:tracker-write`).
16
- 2. Dispatch:
16
+ 2. Before dispatching, update the generated evidence artifact through `lisa:usage-accounting` so the comment body / PR evidence section carries a direct `verify` usage entry in the canonical `## Lisa Usage` section. If the originating work item's parentage or child refs are already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise still write the direct entry, and if trustworthy runtime usage is unavailable, write `source: unavailable` with nullable token/cost fields instead of skipping the row.
17
+ 3. Dispatch:
17
18
  - `jira` → invoke `lisa:jira-evidence` with `$ARGUMENTS` verbatim. Arg shape: `<TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>`.
18
19
  - `github` → invoke `lisa:github-evidence` with `$ARGUMENTS` verbatim. Arg shape: `<ISSUE_REF> <EVIDENCE_DIR> <PR_NUMBER>` where `ISSUE_REF` is `org/repo#<number>` or a GitHub issue URL.
19
20
  - `linear` → invoke `lisa:linear-evidence` with `$ARGUMENTS` verbatim. Arg shape: `<IDENTIFIER> <EVIDENCE_DIR>` where `IDENTIFIER` is a Linear Issue identifier (e.g., `ENG-123`).
20
21
  - Anything else → stop and report `"Unknown tracker '<value>' in .lisa.config.json. Expected 'jira', 'github', or 'linear'."`
21
- 3. Pass through the vendor skill's output.
22
+ 4. Pass through the vendor skill's output.
22
23
 
23
24
  ## Rules
24
25
 
25
26
  - The GitHub `pr-assets` release lives on the implementation repo (the one with the PR), regardless of which tracker hosts the ticket/issue. All vendor skills upload there.
26
27
  - Never post evidence to a different ticket than the one named — `$ARGUMENTS` is the source of truth.
28
+ - Never invent a verify-specific usage footer. Evidence artifact usage must flow through `lisa:usage-accounting`, preserve the canonical `## Lisa Usage` section, and surface `source: unavailable` explicitly when the runtime cannot provide trustworthy numbers.
27
29
  - **Evidence-manifest gate (leaf work units).** Before dispatching to a vendor skill that transitions the ticket, confirm `EVIDENCE_DIR` contains a non-empty artifact for every `[EVIDENCE: name]` marker declared in the ticket's Validation Journey. If any declared marker has no captured artifact (or only an empty one), stop and report the missing markers by name instead of posting — a leaf work unit (Bug / Task / Sub-task / Improvement) may not advance to its review/Done state with an unsatisfied manifest (see the "Per-Work-Unit Evidence Contract" in the `verification` rule). Epics / Stories / Spikes, and leaf units without a Validation Journey, are exempt.
28
30
 
29
31
  ## UI Evidence Checklist (when work is UI-visible)
@@ -34,7 +34,8 @@ Execute the **Verify** flow as defined in the `intent-routing` rule (loaded via
34
34
  4. **Review loop** — handle CodeRabbit / human review comments via `lisa:pull-request-review`
35
35
  5. **Merge** when CI is green
36
36
  6. **Remote verification** — invoke the `lisa:monitor` skill against the target environment to confirm the deploy actually works (health endpoints, recent logs/errors, Validation Journey replay if defined). If remote verification surfaces a behavioral gap that the existing codified tests do not guard, invoke `codify-verification` to add coverage and open a follow-up PR.
37
- 7. **Evidence** — post results to the originating ticket via `lisa:tracker-evidence` (vendor-neutral; dispatches to `lisa:jira-evidence`, `lisa:github-evidence`, or `lisa:linear-evidence` per `.lisa.config.json` `tracker`), including the list of codified tests added on this branch. **If the work is UI-visible** (any verification step ran in a browser, or the change touches a user-facing surface), author `evidence/comment.md` per the **UI Evidence Checklist** in `lisa:tracker-evidence` numbered live-session steps, one Playwright-MCP screenshot per step uploaded to the GitHub `pr-assets` release as plain URLs, and an explicit invitation to be corrected.
37
+ 7. **Evidence usage** — before posting, route the generated evidence artifact through `lisa:usage-accounting` so the comment body / PR evidence section / markdown proof carries a direct `verify` usage entry in the canonical `## Lisa Usage` section. If the originating work item or PRD parentage is known, prefer `record_and_rollup` so ancestor totals refresh in the same pass. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of skipping the row.
38
+ 8. **Evidence** — post results to the originating ticket via `lisa:tracker-evidence` (vendor-neutral; dispatches to `lisa:jira-evidence`, `lisa:github-evidence`, or `lisa:linear-evidence` per `.lisa.config.json` `tracker`), including the list of codified tests added on this branch. **If the work is UI-visible** (any verification step ran in a browser, or the change touches a user-facing surface), author `evidence/comment.md` per the **UI Evidence Checklist** in `lisa:tracker-evidence` — numbered live-session steps, one Playwright-MCP screenshot per step uploaded to the GitHub `pr-assets` release as plain URLs, and an explicit invitation to be corrected.
38
39
 
39
40
  The rule contains the canonical step sequence. Change it there, propagate everywhere.
40
41
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.1",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint 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-typescript",
3
- "version": "2.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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.73.0",
3
+ "version": "2.74.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"
@@ -70,7 +70,8 @@ Sequence:
70
70
  5. Synthesize findings into a PRD containing: problem statement, user stories, acceptance criteria, technical constraints, open questions, and proposed scope
71
71
  6. **Plan Phase Tooling** -- review all available skills and agents (project-defined, plugin-provided, and built-in) and determine which ones the Plan phase will need. For each recommended skill or agent, state why it is needed. If no skills or agents beyond the defaults are identified, explicitly justify why the standard set is sufficient. Include this as a "Recommended Tooling for Plan Phase" section in the PRD.
72
72
  7. **Create the PRD in the configured source** -- invoke `lisa:prd-source-write` with the synthesized PRD (`title`, `body`, `initial_role` resolved from the caller's `prd_ready` flag — `draft` by default, `ready` when `prd_ready=true`, plus any `dedupe_key`/`marker`/`source_ref` the caller passed). The PRD **lives in the source** (Notion page / Confluence page / GitHub issue / Linear project per `.lisa.config.json` `source`); there is no separate document artifact. A `source` must be configured — if it is not, stop and report it. `prd-source-write` dedupes by marker, so re-running against the same idea references the existing PRD instead of creating a duplicate.
73
- 8. `learner` -- capture discoveries for future sessions
73
+ 8. **Record Research usage on the PRD artifact** -- invoke `lisa:usage-accounting` against the created PRD/source artifact so it gains a direct `research` usage entry in the canonical `## Lisa Usage` section at creation time. If the runtime cannot provide trustworthy usage, still write the row with `source: unavailable` and nullable token/cost fields; missing usage is never treated as zero or silently omitted.
74
+ 9. `learner` -- capture discoveries for future sessions
74
75
 
75
76
  Output: A PRD created in the configured source, carrying a "Recommended Tooling for Plan Phase" section, in the `draft` role by default (or `ready` when `prd_ready=true`, so `lisa:intake` auto-claims it). If there is not enough context to produce a complete PRD, stop and report what is missing rather than creating an incomplete one. If no `source` is configured, stop and report it rather than emitting a loose document.
76
77
 
@@ -97,8 +98,10 @@ Sequence:
97
98
  - Dependencies
98
99
  - Skills and agents required (from step 5)
99
100
  7. Create work items in the tracker (JIRA, Linear, GitHub) with acceptance criteria, dependencies, and recommended skills/agents
100
- 8. **PRD back-link** -- update the source PRD with a `## Tickets` section listing every created work item (key, title, type, link), so the PRD becomes the canonical anchor for downstream flows (notably **Debrief**). Invoke `lisa:prd-backlink` with the PRD source and the created ticket list. The section is regenerated on each run, not appended, so re-planning never produces stale links.
101
- 9. `learner` -- capture discoveries for future sessions
101
+ 8. **Record Plan usage on the PRD and created work items** -- route all direct usage writes through `lisa:usage-accounting`: attach a `plan` entry to the source PRD/spec artifact and to each created work item. If runtime usage is unavailable, still write an explicit `source: unavailable` row with nullable token/cost fields instead of omitting the entry.
102
+ 9. **PRD back-link** -- update the source PRD with a `## Tickets` section listing every created work item (key, title, type, link), so the PRD becomes the canonical anchor for downstream flows (notably **Debrief**). Invoke `lisa:prd-backlink` with the PRD source and the created ticket list. The section is regenerated on each run, not appended, so re-planning never produces stale links.
103
+ 10. **Refresh the PRD usage rollup** -- re-invoke `lisa:usage-accounting` on the source PRD after `lisa:prd-backlink` regenerates child refs so the PRD `## Lisa Usage` rollup reflects the created ticket set.
104
+ 11. `learner` -- capture discoveries for future sessions
102
105
 
103
106
  Output: Work items in a tracker with acceptance criteria and recommended skills/agents, ordered by dependency. The source PRD carries a `## Tickets` section linking back to every created item. If the specification cannot be decomposed without further clarification, stop and report what is missing.
104
107
 
@@ -124,8 +127,9 @@ Determine the work type and execute the matching variant:
124
127
  6. Run quality gates: lint, typecheck, tests (these are prerequisites, NOT verification)
125
128
  7. `verification-specialist` -- verify locally (run the software, observe behavior)
126
129
  8. `verification-specialist` -- invoke `codify-verification` skill per passing verification (Playwright for UI, integration test for API/DB/auth, etc.); commit each test in the same PR
127
- 9. **Review sub-flow**
128
- 10. `learner` -- capture discoveries
130
+ 9. **Record Implement usage on the work artifact** -- invoke `lisa:usage-accounting` against the originating work item or implementation artifact so it gains a direct `implement` usage entry in the canonical `## Lisa Usage` section. If the hierarchy / parent refs are already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise record the direct entry and leave rollup for the next caller that has the child refs. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of omitting the row.
131
+ 10. **Review sub-flow**
132
+ 11. `learner` -- capture discoveries
129
133
 
130
134
  #### Fix (bugs)
131
135
 
@@ -138,8 +142,9 @@ Determine the work type and execute the matching variant:
138
142
  7. Run quality gates: lint, typecheck, tests (these are prerequisites, NOT verification)
139
143
  8. `verification-specialist` -- verify locally (prove the bug is fixed)
140
144
  9. `verification-specialist` -- invoke `codify-verification` skill to encode the fix as a regression test (mandatory for bug fixes — the test must fail against the pre-fix commit and pass against the fix); commit in the same PR
141
- 10. **Review sub-flow**
142
- 11. `learner` -- capture discoveries
145
+ 10. **Record Implement usage on the work artifact** -- invoke `lisa:usage-accounting` against the originating work item or implementation artifact so it gains a direct `implement` usage entry in the canonical `## Lisa Usage` section. If the hierarchy / parent refs are already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise record the direct entry and leave rollup for the next caller that has the child refs. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of omitting the row.
146
+ 11. **Review sub-flow**
147
+ 12. `learner` -- capture discoveries
143
148
 
144
149
  #### Improve (refactoring, optimization, coverage improvement)
145
150
 
@@ -150,8 +155,9 @@ Determine the work type and execute the matching variant:
150
155
  5. Run quality gates: lint, typecheck, tests (these are prerequisites, NOT verification)
151
156
  6. `verification-specialist` -- measure again, prove improvement over baseline
152
157
  7. `verification-specialist` -- invoke `codify-verification` skill (typically a benchmark asserting against baseline for performance work, or a regression test for behavioral refactors); commit in the same PR
153
- 8. **Review sub-flow**
154
- 9. `learner` -- capture discoveries
158
+ 8. **Record Implement usage on the work artifact** -- invoke `lisa:usage-accounting` against the originating work item or implementation artifact so it gains a direct `implement` usage entry in the canonical `## Lisa Usage` section. If the hierarchy / parent refs are already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise record the direct entry and leave rollup for the next caller that has the child refs. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of omitting the row.
159
+ 9. **Review sub-flow**
160
+ 10. `learner` -- capture discoveries
155
161
 
156
162
  #### Investigate Only (spikes)
157
163
 
@@ -190,6 +196,8 @@ Sequence:
190
196
  - `verification-specialist` -- verify in target environment (same checks as local verification, but on remote)
191
197
  - `ops-specialist` -- post-deploy health check, smoke test, monitor for errors in first minutes
192
198
  - If remote verification fails -- fix, open new PR, return to step 3
199
+ 7. **Record Verify usage on the evidence artifact** -- invoke `lisa:usage-accounting` against the generated evidence artifact (comment body, PR evidence section, or markdown proof) so it gains a direct `verify` usage entry in the canonical `## Lisa Usage` section. If the originating work item or PRD parentage is known, prefer `record_and_rollup` so ancestor totals refresh in the same pass. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of omitting the row.
200
+ 8. **Post evidence via the tracker surface** -- invoke `lisa:tracker-evidence` after the usage write so the same canonical evidence artifact is uploaded / posted without hand-editing a second format.
193
201
 
194
202
  Output: Merged PR, successful deploy, remote verification passing.
195
203
 
@@ -215,7 +223,8 @@ Sequence:
215
223
  - **Tooling gap** — missing skill, wrong agent assignment, broken hook, missing automation
216
224
  - **Convention drift** — an unwritten rule revealed by review comments that should be codified
217
225
  4. **Produce the human-triage document** — a markdown file with one row per candidate learning showing: category, summary, evidence (links to the source ticket comment / PR comment / commit), recommended persistence destination, and a checkbox-style disposition field the human will mark (Accept / Reject / Defer). Surface step-1 anomalies (work items missing PRs, etc.) in a separate section. The document is exhaustive — it lists every candidate, even ones the synthesizer rates low confidence — because the human, not the agent, decides what is worth keeping.
218
- 5. **Stop and hand the document to the human.** Debrief does NOT persist accepted learnings itself. The human triages, marks dispositions, and runs the **`/lisa:debrief:apply`** command (skill: `debrief-apply`) to route the accepted items to their destinations.
226
+ 5. **Record Debrief usage on the triage document** invoke `lisa:usage-accounting` against the generated markdown artifact so the document carries its own direct `debrief` usage entry in the canonical `## Lisa Usage` section. If runtime usage is unavailable, write the entry with `source: unavailable` and nullable token/cost fields rather than skipping it.
227
+ 6. **Stop and hand the document to the human.** Debrief does NOT persist accepted learnings itself. The human triages, marks dispositions, and runs the **`/lisa:debrief:apply`** command (skill: `debrief-apply`) to route the accepted items to their destinations.
219
228
 
220
229
  Output: A triage-ready learnings document covering every work item and PR in the initiative, with structured evidence and disposition fields. Persistence is deferred to `debrief-apply`, which the human invokes after triage.
221
230
 
@@ -69,6 +69,11 @@ A markdown triage document at `./debrief/<initiative-slug>-<YYYY-MM-DD>.md` (or
69
69
  - `Disposition` — empty checkbox-style field the human will fill: `[ ] Accept` / `[ ] Reject` / `[ ] Defer` plus a free-text reason
70
70
  4. **Source map** — appendix listing every work item and PR walked, so the human can verify completeness.
71
71
 
72
+ Before returning, write the Debrief run's direct usage onto the triage document through
73
+ `lisa:usage-accounting` so the markdown artifact carries its own `## Lisa Usage` section separate
74
+ from delivery-time usage. If runtime usage is unavailable, record a debrief entry with
75
+ `source: unavailable` and nullable token/cost fields instead of skipping the row.
76
+
72
77
  The skill's terminal output is the path to the triage document and a one-line summary of counts per category. Persistence does not happen here — that is `lisa:debrief-apply`'s job.
73
78
 
74
79
  ## Hand-off
@@ -127,13 +127,14 @@ Before shutting down the team, execute the Verify flow:
127
127
  1. Run quality gates: lint, typecheck, tests — all must pass. These are prerequisites, NOT verification.
128
128
  2. `verification-specialist`: verify locally by running the actual system and observing results (empirical proof that the change works). This is the real verification step.
129
129
  3. Write e2e test encoding the verification
130
- 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).
131
- 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
132
- 6. Open a pull request with auto-merge on via `lisa:git-submit-pr`, targeting the **base branch resolved from the ticket's environment** (`target_branch=<base>`, per the branch step above), and including the work-item ref when one exists so the PR can be linked natively to the source issue.
133
- 7. PR Watch Loop: Monitor the PR using `git-submit-pr`'s drive-to-merge behavior. 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. If the PR is `BEHIND`, blocked by stale review state, or cannot enable auto-merge, follow the harness-agnostic `git-submit-pr` re-sync, review-gate, and direct-merge fallback loop until the PR is actually merged or a blocking failure is surfaced.
134
- 8. Merge the PR
135
- 9. Monitor the deploy action that triggers automatically from the successful merge
136
- 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
137
- 11. Remote verification: `verification-specialist` verifies in target environment (same checks as local verification, but on remote)
138
- 12. `ops-specialist`: post-deploy health check, monitor for errors in first minutes
139
- 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)
130
+ 4. Record Implement usage on the originating work artifact via `lisa:usage-accounting` so the work item (or other implementation-owned artifact) gains a direct `implement` usage entry in the canonical `## Lisa Usage` section. If the parent / child graph is already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise still write the direct entry, and if runtime usage is unavailable, use `source: unavailable` with nullable token/cost fields instead of skipping the row.
131
+ 5. 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).
132
+ 6. 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
133
+ 7. Open a pull request with auto-merge on via `lisa:git-submit-pr`, targeting the **base branch resolved from the ticket's environment** (`target_branch=<base>`, per the branch step above), and including the work-item ref when one exists so the PR can be linked natively to the source issue.
134
+ 8. PR Watch Loop: Monitor the PR using `git-submit-pr`'s drive-to-merge behavior. 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. If the PR is `BEHIND`, blocked by stale review state, or cannot enable auto-merge, follow the harness-agnostic `git-submit-pr` re-sync, review-gate, and direct-merge fallback loop until the PR is actually merged or a blocking failure is surfaced.
135
+ 9. Merge the PR
136
+ 10. Monitor the deploy action that triggers automatically from the successful merge
137
+ 11. 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
138
+ 12. Remote verification: `verification-specialist` verifies in target environment (same checks as local verification, but on remote)
139
+ 13. `ops-specialist`: post-deploy health check, monitor for errors in first minutes
140
+ 14. If remote verification fails, create a task for the agent team to find out why it failed, fix it and return to step 5 (repeat until you get all the way through)
@@ -102,7 +102,7 @@ The single-item skills (`lisa:plan`, `lisa:implement`) and the per-vendor batch
102
102
  - GitHub build issues (when `tracker = github`) → `lisa:tracker-build-intake` → `lisa:github-build-intake` handles per-item: optional ready-queue assignee filtering, claim (relabel to `status:in-progress`), dispatch to `lisa:github-agent`, relabel to `status:on-dev` on success
103
103
  - **Closing the PRD loop:** beyond claiming one Ready PRD, every PRD scanner also runs the closure rollup (`ticketed → shipped`, Phase 3f) and **dispatches `lisa:verify-prd` for one shipped PRD** (Phase 3g) each cycle — so a shipped PRD does not sit unverified. On pass the PRD goes `shipped → verified`; on fail it is re-opened `shipped → ticketed` with **build-ready fix tickets** that auto-build and trigger a re-verify (never `blocked`). The scanner only dispatches; `lisa:verify-prd` owns the transition (per the `prd-lifecycle-rollup` rule's "Closing the loop" section), and the self-healing loop continues until the PRD verifies.
104
104
  5. **Stop after one item** — a claimed Ready item, a safe-blocked container, or a per-item error ends the *ready-claim* portion of the cycle. The per-vendor PRD scanner still runs its rollup and one verify-prd dispatch. Remaining Ready items stay untouched for later scheduler invocations.
105
- 6. **Summary report** — the single processed/skipped/error item, total processed, total errors.
105
+ 6. **Summary report** — the single processed/skipped/error item, total processed, total errors. Before returning, record intake usage on the persisted cycle-summary artifact via `lisa:usage-accounting` so the summary carries a direct `intake` entry in the canonical `## Lisa Usage` section. If the claimed / skipped work item's parent-child graph is already known, prefer `record_and_rollup` so ancestor totals refresh in the same cycle; otherwise still write the direct entry, and if runtime usage is unavailable, use `source: unavailable` with nullable token/cost fields instead of skipping the row.
106
106
 
107
107
  ## Schedule examples
108
108
 
@@ -52,4 +52,4 @@ Execute the **Plan** flow as defined in the `intent-routing` rule (loaded via th
52
52
 
53
53
  ## Output
54
54
 
55
- Work items in the configured tracker (JIRA, GitHub Issues, or Linear, per `.lisa.config.json` `tracker`) with acceptance criteria, dependencies, and recommended skills/agents per item. Ordered by dependency. If the specification cannot be decomposed without further clarification, stop and report what is missing.
55
+ Work items in the configured tracker (JIRA, GitHub Issues, or Linear, per `.lisa.config.json` `tracker`) with acceptance criteria, dependencies, and recommended skills/agents per item. Ordered by dependency. Before finishing, route usage writes through `lisa:usage-accounting`: record the Plan run as a direct entry on the source PRD/spec artifact, attach a plan usage entry (or an explicit `source: unavailable` entry with nullable token/cost fields) to each created work item, and refresh the PRD rollup after `lisa:prd-backlink` regenerates the `## Tickets` child refs. Do not invent plan-specific ledger formats or omit missing usage silently. If the specification cannot be decomposed without further clarification, stop and report what is missing.
@@ -45,5 +45,10 @@ feasibility notes, open questions, and the "Recommended Tooling for Plan Phase"
45
45
  flow step invokes `lisa:prd-source-write`, which creates the PRD in the configured `source` (Notion
46
46
  page in the PRD database, Confluence page under the lifecycle parent, GitHub issue, or Linear
47
47
  project) in the `draft` role by default or `ready` when `prd_ready=true`. **The PRD lives in the
48
- source — there is no loose document artifact.** A `source` must be configured; if it is not, stop and
49
- report it rather than emitting a document. The Plan flow consumes the created PRD next.
48
+ source — there is no loose document artifact.** Before handing the synthesized PRD to
49
+ `lisa:prd-source-write`, record the Research run's direct usage on that artifact through
50
+ `lisa:usage-accounting` so the PRD body carries the canonical `## Lisa Usage` ledger from creation
51
+ time onward. If the runtime does not expose trustworthy usage, the direct entry must still be
52
+ written with `source: unavailable` and nullable token/cost fields rather than silently omitting the
53
+ Research row. A `source` must be configured; if it is not, stop and report it rather than emitting
54
+ a document. The Plan flow consumes the created PRD next.
@@ -13,17 +13,19 @@ See the `config-resolution` rule for configuration and dispatch table.
13
13
  ## Workflow
14
14
 
15
15
  1. Resolve tracker config (same logic as `lisa:tracker-write`).
16
- 2. Dispatch:
16
+ 2. Before dispatching, update the generated evidence artifact through `lisa:usage-accounting` so the comment body / PR evidence section carries a direct `verify` usage entry in the canonical `## Lisa Usage` section. If the originating work item's parentage or child refs are already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise still write the direct entry, and if trustworthy runtime usage is unavailable, write `source: unavailable` with nullable token/cost fields instead of skipping the row.
17
+ 3. Dispatch:
17
18
  - `jira` → invoke `lisa:jira-evidence` with `$ARGUMENTS` verbatim. Arg shape: `<TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>`.
18
19
  - `github` → invoke `lisa:github-evidence` with `$ARGUMENTS` verbatim. Arg shape: `<ISSUE_REF> <EVIDENCE_DIR> <PR_NUMBER>` where `ISSUE_REF` is `org/repo#<number>` or a GitHub issue URL.
19
20
  - `linear` → invoke `lisa:linear-evidence` with `$ARGUMENTS` verbatim. Arg shape: `<IDENTIFIER> <EVIDENCE_DIR>` where `IDENTIFIER` is a Linear Issue identifier (e.g., `ENG-123`).
20
21
  - Anything else → stop and report `"Unknown tracker '<value>' in .lisa.config.json. Expected 'jira', 'github', or 'linear'."`
21
- 3. Pass through the vendor skill's output.
22
+ 4. Pass through the vendor skill's output.
22
23
 
23
24
  ## Rules
24
25
 
25
26
  - The GitHub `pr-assets` release lives on the implementation repo (the one with the PR), regardless of which tracker hosts the ticket/issue. All vendor skills upload there.
26
27
  - Never post evidence to a different ticket than the one named — `$ARGUMENTS` is the source of truth.
28
+ - Never invent a verify-specific usage footer. Evidence artifact usage must flow through `lisa:usage-accounting`, preserve the canonical `## Lisa Usage` section, and surface `source: unavailable` explicitly when the runtime cannot provide trustworthy numbers.
27
29
  - **Evidence-manifest gate (leaf work units).** Before dispatching to a vendor skill that transitions the ticket, confirm `EVIDENCE_DIR` contains a non-empty artifact for every `[EVIDENCE: name]` marker declared in the ticket's Validation Journey. If any declared marker has no captured artifact (or only an empty one), stop and report the missing markers by name instead of posting — a leaf work unit (Bug / Task / Sub-task / Improvement) may not advance to its review/Done state with an unsatisfied manifest (see the "Per-Work-Unit Evidence Contract" in the `verification` rule). Epics / Stories / Spikes, and leaf units without a Validation Journey, are exempt.
28
30
 
29
31
  ## UI Evidence Checklist (when work is UI-visible)
@@ -34,7 +34,8 @@ Execute the **Verify** flow as defined in the `intent-routing` rule (loaded via
34
34
  4. **Review loop** — handle CodeRabbit / human review comments via `lisa:pull-request-review`
35
35
  5. **Merge** when CI is green
36
36
  6. **Remote verification** — invoke the `lisa:monitor` skill against the target environment to confirm the deploy actually works (health endpoints, recent logs/errors, Validation Journey replay if defined). If remote verification surfaces a behavioral gap that the existing codified tests do not guard, invoke `codify-verification` to add coverage and open a follow-up PR.
37
- 7. **Evidence** — post results to the originating ticket via `lisa:tracker-evidence` (vendor-neutral; dispatches to `lisa:jira-evidence`, `lisa:github-evidence`, or `lisa:linear-evidence` per `.lisa.config.json` `tracker`), including the list of codified tests added on this branch. **If the work is UI-visible** (any verification step ran in a browser, or the change touches a user-facing surface), author `evidence/comment.md` per the **UI Evidence Checklist** in `lisa:tracker-evidence` numbered live-session steps, one Playwright-MCP screenshot per step uploaded to the GitHub `pr-assets` release as plain URLs, and an explicit invitation to be corrected.
37
+ 7. **Evidence usage** — before posting, route the generated evidence artifact through `lisa:usage-accounting` so the comment body / PR evidence section / markdown proof carries a direct `verify` usage entry in the canonical `## Lisa Usage` section. If the originating work item or PRD parentage is known, prefer `record_and_rollup` so ancestor totals refresh in the same pass. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of skipping the row.
38
+ 8. **Evidence** — post results to the originating ticket via `lisa:tracker-evidence` (vendor-neutral; dispatches to `lisa:jira-evidence`, `lisa:github-evidence`, or `lisa:linear-evidence` per `.lisa.config.json` `tracker`), including the list of codified tests added on this branch. **If the work is UI-visible** (any verification step ran in a browser, or the change touches a user-facing surface), author `evidence/comment.md` per the **UI Evidence Checklist** in `lisa:tracker-evidence` — numbered live-session steps, one Playwright-MCP screenshot per step uploaded to the GitHub `pr-assets` release as plain URLs, and an explicit invitation to be corrected.
38
39
 
39
40
  The rule contains the canonical step sequence. Change it there, propagate everywhere.
40
41