@codyswann/lisa 2.116.1 → 2.117.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/dist/codex/hooks-installer.js +60 -16
- package/dist/codex/hooks-installer.js.map +1 -1
- package/dist/codex/scripts/inject-rules.sh +14 -2
- package/dist/configs/eslint/base.d.ts.map +1 -1
- package/dist/configs/eslint/base.js +1 -0
- package/dist/configs/eslint/base.js.map +1 -1
- package/package.json +3 -2
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/hooks/inject-rules.sh +14 -3
- package/plugins/lisa/rules/eager/base-rules.md +70 -0
- package/plugins/lisa/rules/eager/coding-philosophy.md +27 -0
- package/plugins/lisa/rules/eager/config-resolution.md +28 -0
- package/plugins/lisa/rules/eager/documentation-source-paths.md +13 -0
- package/plugins/lisa/rules/eager/empirical-inquiry.md +22 -0
- package/plugins/lisa/rules/eager/intent-routing.md +18 -0
- package/plugins/lisa/rules/eager/leaf-only-lifecycle.md +39 -0
- package/plugins/lisa/rules/eager/prd-lifecycle-rollup.md +31 -0
- package/plugins/lisa/rules/eager/repo-scope-split.md +39 -0
- package/plugins/lisa/rules/eager/security-audit-handling.md +29 -0
- package/plugins/lisa/rules/eager/usage-accounting.md +28 -0
- package/plugins/lisa/rules/eager/verification.md +21 -0
- package/plugins/lisa/rules/eager/wiki-knowledge-source.md +16 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-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-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-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-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-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/src/base/hooks/inject-rules.sh +14 -3
- package/plugins/src/base/rules/eager/base-rules.md +70 -0
- package/plugins/src/base/rules/eager/coding-philosophy.md +27 -0
- package/plugins/src/base/rules/eager/config-resolution.md +28 -0
- package/plugins/src/base/rules/eager/documentation-source-paths.md +13 -0
- package/plugins/src/base/rules/eager/empirical-inquiry.md +22 -0
- package/plugins/src/base/rules/eager/intent-routing.md +18 -0
- package/plugins/src/base/rules/eager/leaf-only-lifecycle.md +39 -0
- package/plugins/src/base/rules/eager/prd-lifecycle-rollup.md +31 -0
- package/plugins/src/base/rules/eager/repo-scope-split.md +39 -0
- package/plugins/src/base/rules/eager/security-audit-handling.md +29 -0
- package/plugins/src/base/rules/eager/usage-accounting.md +28 -0
- package/plugins/src/base/rules/eager/verification.md +21 -0
- package/plugins/src/base/rules/eager/wiki-knowledge-source.md +16 -0
- package/scripts/check-rules-pairing.sh +91 -0
- /package/plugins/lisa/rules/{base-rules.md → reference/base-rules.md} +0 -0
- /package/plugins/lisa/rules/{coding-philosophy.md → reference/coding-philosophy.md} +0 -0
- /package/plugins/lisa/rules/{config-resolution.md → reference/config-resolution.md} +0 -0
- /package/plugins/lisa/rules/{documentation-source-paths.md → reference/documentation-source-paths.md} +0 -0
- /package/plugins/lisa/rules/{empirical-inquiry.md → reference/empirical-inquiry.md} +0 -0
- /package/plugins/lisa/rules/{intent-routing.md → reference/intent-routing.md} +0 -0
- /package/plugins/lisa/rules/{leaf-only-lifecycle.md → reference/leaf-only-lifecycle.md} +0 -0
- /package/plugins/lisa/rules/{prd-lifecycle-rollup.md → reference/prd-lifecycle-rollup.md} +0 -0
- /package/plugins/lisa/rules/{repo-scope-split.md → reference/repo-scope-split.md} +0 -0
- /package/plugins/lisa/rules/{security-audit-handling.md → reference/security-audit-handling.md} +0 -0
- /package/plugins/lisa/rules/{usage-accounting.md → reference/usage-accounting.md} +0 -0
- /package/plugins/lisa/rules/{verification.md → reference/verification.md} +0 -0
- /package/plugins/lisa/rules/{wiki-knowledge-source.md → reference/wiki-knowledge-source.md} +0 -0
- /package/plugins/src/base/rules/{base-rules.md → reference/base-rules.md} +0 -0
- /package/plugins/src/base/rules/{coding-philosophy.md → reference/coding-philosophy.md} +0 -0
- /package/plugins/src/base/rules/{config-resolution.md → reference/config-resolution.md} +0 -0
- /package/plugins/src/base/rules/{documentation-source-paths.md → reference/documentation-source-paths.md} +0 -0
- /package/plugins/src/base/rules/{empirical-inquiry.md → reference/empirical-inquiry.md} +0 -0
- /package/plugins/src/base/rules/{intent-routing.md → reference/intent-routing.md} +0 -0
- /package/plugins/src/base/rules/{leaf-only-lifecycle.md → reference/leaf-only-lifecycle.md} +0 -0
- /package/plugins/src/base/rules/{prd-lifecycle-rollup.md → reference/prd-lifecycle-rollup.md} +0 -0
- /package/plugins/src/base/rules/{repo-scope-split.md → reference/repo-scope-split.md} +0 -0
- /package/plugins/src/base/rules/{security-audit-handling.md → reference/security-audit-handling.md} +0 -0
- /package/plugins/src/base/rules/{usage-accounting.md → reference/usage-accounting.md} +0 -0
- /package/plugins/src/base/rules/{verification.md → reference/verification.md} +0 -0
- /package/plugins/src/base/rules/{wiki-knowledge-source.md → reference/wiki-knowledge-source.md} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Usage Accounting (load-bearing)
|
|
2
|
+
|
|
3
|
+
Lisa attaches AI usage and cost telemetry to every artifact it creates/updates. The format is a single canonical managed section.
|
|
4
|
+
|
|
5
|
+
## Managed section
|
|
6
|
+
|
|
7
|
+
Every artifact with inline body content gets exactly one section:
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
## Lisa Usage
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**Canonical. Rewrite in place; never append a second usage section.** If the host can't safely edit body, write the same section in a comment and treat that comment as the managed artifact for future rewrites.
|
|
14
|
+
|
|
15
|
+
## Required field semantics
|
|
16
|
+
|
|
17
|
+
Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is the stable dedupe key — rewriting the same logical run with the same `entry_id` updates in place; a different run gets a different `entry_id`.
|
|
18
|
+
|
|
19
|
+
- **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `unavailable`.
|
|
20
|
+
- **`pricing_status`**: same trinary plus `missing` (cost not known but should be).
|
|
21
|
+
- **Absence ≠ zero.** `null` means unknown; `0` means explicitly zero. Always write the entry — never silently omit.
|
|
22
|
+
- Do NOT replace observed counts with estimates.
|
|
23
|
+
|
|
24
|
+
## Rollup
|
|
25
|
+
|
|
26
|
+
Container artifacts (Epic, PRD, etc.) roll up usage from their direct children. Roll-up is recursive — a parent's `## Lisa Usage` aggregates its descendants' direct entries. Re-writes are idempotent: re-running an intake or lifecycle skill must not duplicate entries.
|
|
27
|
+
|
|
28
|
+
Full schema (all 17 fields, pricing semantics, rollup math, idempotent-rewrite rules): [reference/usage-accounting.md](../reference/usage-accounting.md).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Empirical Verification (load-bearing)
|
|
2
|
+
|
|
3
|
+
**Verification is not linting, typechecking, or testing.** Those are *quality checks* — necessary prerequisites, but NOT verification.
|
|
4
|
+
|
|
5
|
+
**Verification is using the resulting software the way a user would** — interacting with the UI, calling the API, running the CLI, observing behavior. Tests pass in isolation; verification proves the system works as a whole.
|
|
6
|
+
|
|
7
|
+
## Mandatory
|
|
8
|
+
|
|
9
|
+
- **Never claim success without runtime evidence.** "The code looks correct" is not evidence.
|
|
10
|
+
- **If all you did was run tests, typecheck, and lint — you have NOT verified.**
|
|
11
|
+
- **Before starting implementation, state your verification plan** — how you will USE the resulting software to prove it works. A plan that only lists `test`/`typecheck`/`lint` commands is not a plan. Do not begin until confirmed.
|
|
12
|
+
- **After verifying empirically, codify it as a regression test** via the `codify-verification` skill — Playwright for UI, integration test for API/DB/auth, benchmark for performance. Codification is mandatory for every verification type except PR/Documentation/Deploy and Investigate-Only spikes.
|
|
13
|
+
- **Every PR must include reviewer replay steps** — the exact human steps to use the software and confirm the change works. Not test commands. If a reviewer can't reproduce from the PR description alone, the PR is incomplete.
|
|
14
|
+
|
|
15
|
+
## Roles
|
|
16
|
+
|
|
17
|
+
- **Builder agent** — implements the change.
|
|
18
|
+
- **Verifier agent** — acts as the end user / API client / operator. Independent from Builder when possible.
|
|
19
|
+
- **Human overseer** — approves risky operations and anything agents cannot fully verify.
|
|
20
|
+
|
|
21
|
+
Full operational contract (verification types, evidence formats, escalation protocol): [reference/verification.md](../reference/verification.md).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Wiki as Knowledge Source (load-bearing)
|
|
2
|
+
|
|
3
|
+
If the project has an LLM Wiki (a `wiki/` directory with `index.md`), treat it as the canonical source of durable project knowledge.
|
|
4
|
+
|
|
5
|
+
Before researching background, conventions, ownership, architecture, glossary, or "how/why does X work here":
|
|
6
|
+
|
|
7
|
+
1. **Consult the wiki first.** Start from `wiki/index.md` or use the wiki query skill (`/lisa-wiki-query`).
|
|
8
|
+
2. **Use what the wiki says** as the authoritative answer when it covers the question — do not re-derive it from raw sources.
|
|
9
|
+
3. **Fall back to primary sources** (code, tickets, commit history, external docs) only when the wiki is silent, ambiguous, or contradicted by what you observe.
|
|
10
|
+
4. **Surface gaps.** If the wiki is wrong, stale, or missing knowledge that belongs there, flag it — and where the workflow supports it, capture the correction via `/lisa-wiki-ingest`.
|
|
11
|
+
|
|
12
|
+
The wiki documents knowledge; it does NOT override executable behavior. When wiki and running code disagree about what the system does, trust the code and treat the wiki as out of date.
|
|
13
|
+
|
|
14
|
+
If the project has no `wiki/`, this rule does not apply.
|
|
15
|
+
|
|
16
|
+
Full prose: [reference/wiki-knowledge-source.md](../reference/wiki-knowledge-source.md).
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Fails if any plugin's rules/eager/X.md is missing its rules/reference/X.md
|
|
3
|
+
# pair (or vice versa). The eager/reference split documents the contract that
|
|
4
|
+
# every eager head points at a reference body for the long-form detail; an
|
|
5
|
+
# unpaired file means either a head without a body (broken breadcrumb) or a
|
|
6
|
+
# body without a head (orphaned, never injected).
|
|
7
|
+
#
|
|
8
|
+
# Bootstrap files are exempt: rules/eager/00-bootstrap.md (and any other file
|
|
9
|
+
# matching rules/eager/00-*.md) is allowed to have no reference pair. The
|
|
10
|
+
# leading "00-" prefix marks files that are eager-only by design.
|
|
11
|
+
#
|
|
12
|
+
# Skip rule: a rule may opt out of pairing by listing its basename in
|
|
13
|
+
# rules/.pair-exempt — one filename per line, comments start with `#`. Use
|
|
14
|
+
# sparingly; the default expectation is that every eager file pairs.
|
|
15
|
+
set -euo pipefail
|
|
16
|
+
|
|
17
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
18
|
+
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
19
|
+
cd "$ROOT_DIR"
|
|
20
|
+
|
|
21
|
+
failed=0
|
|
22
|
+
|
|
23
|
+
check_plugin() {
|
|
24
|
+
local rules_dir="$1"
|
|
25
|
+
local eager_dir="$rules_dir/eager"
|
|
26
|
+
local reference_dir="$rules_dir/reference"
|
|
27
|
+
|
|
28
|
+
# Skip plugins that haven't adopted the split yet (no eager/ subdir).
|
|
29
|
+
[ -d "$eager_dir" ] || return 0
|
|
30
|
+
|
|
31
|
+
# Build the opt-out list, if present.
|
|
32
|
+
local exempt_file="$rules_dir/.pair-exempt"
|
|
33
|
+
local exempt_pattern=""
|
|
34
|
+
if [ -f "$exempt_file" ]; then
|
|
35
|
+
exempt_pattern="$(grep -v '^[[:space:]]*#' "$exempt_file" | grep -v '^[[:space:]]*$' || true)"
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# Every eager/X.md (except 00-bootstrap-style files and explicit exemptions)
|
|
39
|
+
# must have a reference/X.md pair.
|
|
40
|
+
while IFS= read -r eager_file; do
|
|
41
|
+
local base
|
|
42
|
+
base="$(basename "$eager_file")"
|
|
43
|
+
# Built-in exemption for bootstrap files.
|
|
44
|
+
case "$base" in
|
|
45
|
+
00-*) continue ;;
|
|
46
|
+
esac
|
|
47
|
+
# User-declared exemptions.
|
|
48
|
+
if [ -n "$exempt_pattern" ] && echo "$exempt_pattern" | grep -qxF "$base"; then
|
|
49
|
+
continue
|
|
50
|
+
fi
|
|
51
|
+
if [ ! -f "$reference_dir/$base" ]; then
|
|
52
|
+
echo "✗ Missing reference body for eager rule: $eager_file" >&2
|
|
53
|
+
echo " Expected: $reference_dir/$base" >&2
|
|
54
|
+
failed=1
|
|
55
|
+
fi
|
|
56
|
+
done < <(find "$eager_dir" -maxdepth 1 -type f -name '*.md' | sort)
|
|
57
|
+
|
|
58
|
+
# Every reference/X.md must have an eager/X.md pair (catch orphans on the
|
|
59
|
+
# other side: a reference body with no breadcrumb pointing to it is dead).
|
|
60
|
+
if [ -d "$reference_dir" ]; then
|
|
61
|
+
while IFS= read -r ref_file; do
|
|
62
|
+
local base
|
|
63
|
+
base="$(basename "$ref_file")"
|
|
64
|
+
if [ -n "$exempt_pattern" ] && echo "$exempt_pattern" | grep -qxF "$base"; then
|
|
65
|
+
continue
|
|
66
|
+
fi
|
|
67
|
+
if [ ! -f "$eager_dir/$base" ]; then
|
|
68
|
+
echo "✗ Orphaned reference body (no eager head): $ref_file" >&2
|
|
69
|
+
echo " Expected: $eager_dir/$base" >&2
|
|
70
|
+
failed=1
|
|
71
|
+
fi
|
|
72
|
+
done < <(find "$reference_dir" -maxdepth 1 -type f -name '*.md' | sort)
|
|
73
|
+
fi
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
# Check every plugins/*/rules and plugins/src/*/rules directory.
|
|
77
|
+
while IFS= read -r rules_dir; do
|
|
78
|
+
check_plugin "$rules_dir"
|
|
79
|
+
done < <(find "$ROOT_DIR/plugins" -type d -name rules | sort)
|
|
80
|
+
|
|
81
|
+
if [ "$failed" -ne 0 ]; then
|
|
82
|
+
echo "" >&2
|
|
83
|
+
echo " Every rules/eager/X.md must have a paired rules/reference/X.md" >&2
|
|
84
|
+
echo " (and vice versa) so the eager head's breadcrumb to the full" >&2
|
|
85
|
+
echo " reference body resolves. To exempt a file, either name it" >&2
|
|
86
|
+
echo " 00-*.md (bootstrap convention) or list its basename in" >&2
|
|
87
|
+
echo " <plugin>/rules/.pair-exempt (one per line)." >&2
|
|
88
|
+
exit 1
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
echo "✓ Every eager rule has its paired reference body (and vice versa)."
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/plugins/lisa/rules/{security-audit-handling.md → reference/security-audit-handling.md}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/plugins/src/base/rules/{prd-lifecycle-rollup.md → reference/prd-lifecycle-rollup.md}
RENAMED
|
File without changes
|
|
File without changes
|
/package/plugins/src/base/rules/{security-audit-handling.md → reference/security-audit-handling.md}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/plugins/src/base/rules/{wiki-knowledge-source.md → reference/wiki-knowledge-source.md}
RENAMED
|
File without changes
|