@codyswann/lisa 8.0.1 → 8.1.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/all/copy-overwrite/scripts/lib/completion-authorization.mjs +28 -0
- package/all/copy-overwrite/scripts/lib/completion-proof-adapters.mjs +21 -0
- package/all/copy-overwrite/scripts/lib/completion-proof-projection.mjs +25 -41
- package/all/copy-overwrite/scripts/lib/completion-proof-shape.mjs +23 -0
- package/all/copy-overwrite/scripts/lib/npm-update-helper-inventory.mjs +6 -0
- package/all/copy-overwrite/scripts/lib/tracker-row-fold.mjs +48 -0
- package/all/copy-overwrite/scripts/lib/work-item-estimate-actual.mjs +131 -0
- package/all/copy-overwrite/scripts/lib/work-item-estimate-calibration.mjs +16 -33
- package/all/copy-overwrite/scripts/lib/work-item-estimate-check.mjs +26 -5
- package/all/copy-overwrite/scripts/lib/work-item-estimate-config.mjs +21 -0
- package/all/copy-overwrite/scripts/lib/work-item-estimate-tally.mjs +272 -0
- package/all/copy-overwrite/scripts/lib/work-item-estimate.mjs +60 -31
- package/all/copy-overwrite/scripts/lisa-estimate.mjs +60 -9
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +61 -8
- package/dist/core/lisa-owned-hash-ledger.json +88 -4
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.json +32 -17
- package/dist/utils/usage-accounting-totals.d.ts.map +1 -1
- package/dist/utils/usage-accounting-totals.js +6 -1
- package/dist/utils/usage-accounting-totals.js.map +1 -1
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-usage-accounting/SKILL.md +2 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-usage-accounting/references/estimate.md +49 -0
- package/plugins/lisa/rules/reference/work-item-definition-of-ready.md +5 -2
- package/plugins/lisa/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-usage-accounting/SKILL.md +2 -1
- package/plugins/lisa/skills/lisa-usage-accounting/references/estimate.md +49 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-usage-accounting/SKILL.md +2 -1
- package/plugins/lisa-agy/skills/lisa-usage-accounting/references/estimate.md +49 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/rules/reference/work-item-definition-of-ready.md +5 -2
- package/plugins/lisa-copilot/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-usage-accounting/SKILL.md +2 -1
- package/plugins/lisa-copilot/skills/lisa-usage-accounting/references/estimate.md +49 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/work-item-definition-of-ready-reference.mdc +5 -2
- package/plugins/lisa-cursor/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-usage-accounting/SKILL.md +2 -1
- package/plugins/lisa-cursor/skills/lisa-usage-accounting/references/estimate.md +49 -0
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/rules/reference/work-item-definition-of-ready.md +5 -2
- package/plugins/lisa-devin/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa-devin/skills/lisa-usage-accounting/SKILL.md +2 -1
- package/plugins/lisa-devin/skills/lisa-usage-accounting/references/estimate.md +49 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/rules/reference/work-item-definition-of-ready.md +5 -2
- package/plugins/src/base/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-usage-accounting/SKILL.md +2 -1
- package/plugins/src/base/skills/lisa-usage-accounting/references/estimate.md +49 -0
- package/scripts/two-channel-couplings.json +1 -1
- package/typescript/copy-overwrite/.prettierignore +3 -0
|
@@ -195,8 +195,11 @@ missing estimate fails: the claiming agent estimates the item, calibrated
|
|
|
195
195
|
against comparable finished items, and writes it before any work. If
|
|
196
196
|
estimating itself fails, the work still goes ahead: the item stays claimed, the
|
|
197
197
|
result records `estimate_outcome: failed` with the reason, and a plain-English
|
|
198
|
-
comment on the item says why (`lisa-track` step 4).
|
|
199
|
-
|
|
198
|
+
comment on the item says why (`lisa-track` step 4). At done time
|
|
199
|
+
`lisa-work-item complete` refuses the item until its usage ledger has an entry
|
|
200
|
+
and the section shows that ledger's actual tokens and cost beside the estimate
|
|
201
|
+
(`lisa-estimate.mjs tally`). It is `N/A` when the project turns the
|
|
202
|
+
requirement off. Nobody is ever asked for an estimate.
|
|
200
203
|
|
|
201
204
|
## Relationship to the lifecycle
|
|
202
205
|
|
|
@@ -23,6 +23,7 @@ omit the plugin rules tree; do not assume a runtime-specific rules directory.
|
|
|
23
23
|
Then, when an installed stack plugin ships a `journey-guidance` skill (the Expo and Rails plugins do), invoke it and carry its guidance — how the stack names its evidence files — into the vendor skill below. It is tracker-neutral, so it applies to `jira`, `github`, and `linear` alike. When no stack plugin ships one, continue with the base behaviour; that is not an error.
|
|
24
24
|
2. Missing / empty → stop and report `"No tracker configured in .lisa.config.json. Run /lisa:setup:jira, /lisa:setup:github, or /lisa:setup:linear first."`
|
|
25
25
|
3. Before dispatching, update the generated evidence artifact through `lisa-usage-accounting` so the comment body / PR evidence section carries a direct `lisa-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.
|
|
26
|
+
Then, unless `workItem.estimate.required` is `false`, tally the actual beside the estimate: run `node scripts/lisa-estimate.mjs tally --body-file <work-item-body.md>` (add one `--usage-file <comment.md>` for every comment on the item that holds a usage ledger, the evidence comment included), write the printed body back to the work item through `lisa-tracker-write`, read it back, and run `node scripts/lisa-estimate.mjs check --phase done --body-file <stored-body.md>` with the same `--usage-file` flags the tally got, so the check reads the ledgers the tally counted. `lisa-work-item complete` refuses an item whose tally is missing or stale. See the usage-accounting skill's `references/estimate.md`.
|
|
26
27
|
4. Dispatch:
|
|
27
28
|
- `jira` → invoke `lisa-jira-evidence` with `$ARGUMENTS` verbatim. Arg shape: `<TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>`.
|
|
28
29
|
- `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.
|
|
@@ -195,7 +195,8 @@ failures into a generic "usage update failed."
|
|
|
195
195
|
A work item's token estimate and recommended model live in their own managed `## Lisa Estimate`
|
|
196
196
|
section, beside this ledger, never inside it. The contract, config (`workItem.estimate`) and
|
|
197
197
|
pricing are in the [estimate reference](references/estimate.md); render and check the section
|
|
198
|
-
with `node scripts/lisa-estimate.mjs`.
|
|
198
|
+
with `node scripts/lisa-estimate.mjs`. At done, `lisa-estimate.mjs tally` copies this ledger's
|
|
199
|
+
rollup total into that section as the actual; it reads the ledger and never writes to it.
|
|
199
200
|
|
|
200
201
|
## Rules
|
|
201
202
|
|
|
@@ -91,4 +91,53 @@ goes into the section. Items whose actual is unknown or partial — no ledger, a
|
|
|
91
91
|
the sum of only the known runs. With
|
|
92
92
|
no usable history the range is unchanged and the basis says "no calibration history".
|
|
93
93
|
|
|
94
|
+
## Done: the actual beside the estimate
|
|
95
|
+
|
|
96
|
+
When the work is done, the section also shows what it really cost (CodySwannGT/lisa#4956). The
|
|
97
|
+
actual is the item's `## Lisa Usage` ledgers, on the body and on any comment — the same ledger
|
|
98
|
+
every flow already records into, not a second one. Each distinct run is counted once, by its entry
|
|
99
|
+
id, wherever it is recorded: a comment that repeats the body's runs and adds its own Verify run adds
|
|
100
|
+
only that run. Child work arrives as each ledger's aggregate; the total is `unknown` only when two
|
|
101
|
+
ledgers share some, but not all, of the same child runs, because that aggregate cannot be split:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
| Estimate | 2M–4M | $3.14–$6.28 USD | claude-opus-5-5 |
|
|
105
|
+
| Actual | 3M | $4.71 USD | — |
|
|
106
|
+
|
|
107
|
+
Actual: the Lisa Usage ledger total over 2 usage entries (source: observed); 1x the estimate's midpoint.
|
|
108
|
+
|
|
109
|
+
<!-- lisa:estimate-actual tokens=3000000 cost=4.71 currency=USD sources=observed entries=2 ratio=1 -->
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
After the Verify usage entry is written (`lisa-tracker-evidence` step 3) and before the accepted
|
|
113
|
+
completion proof is published, tally it and write the body back:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
node scripts/lisa-estimate.mjs tally --body-file <body.md> [--usage-file <comment.md>]...
|
|
117
|
+
node scripts/lisa-estimate.mjs check --phase done --body-file <stored-body.md> [--usage-file <comment.md>]...
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Pass every comment that holds a ledger, each with its own `--usage-file`, to both commands. `complete`
|
|
121
|
+
reads every comment, so the check must read the same ledgers the tally counted. A total that any run
|
|
122
|
+
leaves unknown (`unavailable` telemetry, a `measured-subset` entry, a child run with no token count
|
|
123
|
+
or no cost) is shown as
|
|
124
|
+
`unknown`, never as zero, never as the sum of only the known runs, and never guessed. A `## Lisa
|
|
125
|
+
Usage` section that cannot be read in full (an entry or rollup token the parser refuses or cannot
|
|
126
|
+
match) is never dropped: it makes every total `unknown` and names `unreadable-ledger` among the
|
|
127
|
+
sources, until the section is repaired through `lisa-usage-accounting`. A section without a rollup
|
|
128
|
+
token still has its direct entries counted. An item that
|
|
129
|
+
reached done with no estimate shows `none recorded` in the estimate row rather than an invented
|
|
130
|
+
range.
|
|
131
|
+
|
|
132
|
+
`lisa-work-item complete` enforces it: when `required` is true, it refuses (as `pending-proof`) an
|
|
133
|
+
item with no usage entry, with no tally, or with a tally that no longer matches the ledger. The
|
|
134
|
+
estimate section is machine-owned metadata, so rewriting it does not change the specification
|
|
135
|
+
digest the accepted completion proof is bound to. Only the exact lines `lisa-estimate` writes are
|
|
136
|
+
left out; every other line a person adds inside it still counts, even one that starts with
|
|
137
|
+
`Actual:` or `Basis:`.
|
|
138
|
+
|
|
139
|
+
## When the config is off
|
|
140
|
+
|
|
141
|
+
Nothing about estimates blocks. Every check reports `N/A`, and `complete` skips the done gate.
|
|
142
|
+
|
|
94
143
|
The recommended model is recorded only. It does not choose which model or agent runs the work.
|
|
@@ -265,14 +265,17 @@ scripts/lib/push-timing.mjs
|
|
|
265
265
|
scripts/lib/reusable-workflow-load-adapter.mjs
|
|
266
266
|
scripts/lib/reusable-workflow-load-failure.mjs
|
|
267
267
|
scripts/lib/reusable-workflow-load-scan.mjs
|
|
268
|
+
scripts/lib/tracker-row-fold.mjs
|
|
268
269
|
scripts/lib/usage-artifact-ref.mjs
|
|
269
270
|
scripts/lib/usage-effectiveness.mjs
|
|
270
271
|
scripts/lib/usage-ledger-integrity.mjs
|
|
271
272
|
scripts/lib/usage-ledger.mjs
|
|
272
273
|
scripts/lib/windows-process-job.mjs
|
|
274
|
+
scripts/lib/work-item-estimate-actual.mjs
|
|
273
275
|
scripts/lib/work-item-estimate-calibration.mjs
|
|
274
276
|
scripts/lib/work-item-estimate-check.mjs
|
|
275
277
|
scripts/lib/work-item-estimate-config.mjs
|
|
278
|
+
scripts/lib/work-item-estimate-tally.mjs
|
|
276
279
|
scripts/lib/work-item-estimate.mjs
|
|
277
280
|
scripts/lib/worktree-dependencies.mjs
|
|
278
281
|
scripts/lisa-hooks/worktree-binding-guard.mjs
|