@codyswann/lisa 2.116.2 → 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/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
|
@@ -260,33 +260,77 @@ function resolveBundledScript(filename) {
|
|
|
260
260
|
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
261
261
|
return path.join(moduleDir, "scripts", filename);
|
|
262
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Subdirectories under each plugin's rules/ that carry rule .md files.
|
|
265
|
+
* The split is:
|
|
266
|
+
* - eager/ — load-bearing prescriptions injected at every SessionStart
|
|
267
|
+
* - reference/ — long-form bodies mirrored alongside; loaded on demand via
|
|
268
|
+
* the breadcrumb the eager head points to
|
|
269
|
+
* For backward compatibility with older plugin builds, .md files directly
|
|
270
|
+
* under rules/ (flat, no subdir) are also mirrored.
|
|
271
|
+
*/
|
|
272
|
+
const RULE_SUBDIRS = ["eager", "reference"];
|
|
263
273
|
/**
|
|
264
274
|
* Copy every .md file from Lisa's base and detected stack plugin `rules/`
|
|
265
|
-
* directories into the host's `.codex/lisa-rules
|
|
275
|
+
* directories into the host's `.codex/lisa-rules/`, preserving the
|
|
276
|
+
* `eager/` and `reference/` subdir structure.
|
|
266
277
|
* @param lisaDir - Absolute path to the Lisa repo / installed package
|
|
267
278
|
* @param rulesDestDir - Absolute path to `<destDir>/.codex/lisa-rules/`
|
|
268
279
|
* @param detectedTypes - Project types Lisa detected for the host
|
|
269
|
-
* @returns
|
|
280
|
+
* @returns Relative paths (subdir/file or file) of every rule .md file copied
|
|
270
281
|
*/
|
|
271
282
|
async function mirrorRules(lisaDir, rulesDestDir, detectedTypes) {
|
|
272
283
|
const pluginNames = ["lisa", ...detectedTypes.map(type => `lisa-${type}`)];
|
|
273
|
-
// First pass: list all .md files per plugin
|
|
284
|
+
// First pass: list all .md files per plugin (eager/, reference/, and flat
|
|
285
|
+
// root for backward compat) without copying. Entries are built immutably
|
|
286
|
+
// with flatMap/concat so each plugin's collected files are a derived value
|
|
287
|
+
// rather than a mutated buffer (project functional/immutable-data rule).
|
|
274
288
|
const filesByPlugin = await Promise.all(pluginNames.map(async (pluginName) => {
|
|
275
|
-
const
|
|
276
|
-
if (!(await fse.pathExists(
|
|
277
|
-
return {
|
|
289
|
+
const rulesRoot = path.join(lisaDir, "plugins", pluginName, "rules");
|
|
290
|
+
if (!(await fse.pathExists(rulesRoot))) {
|
|
291
|
+
return { rulesRoot, entries: [] };
|
|
278
292
|
}
|
|
279
|
-
|
|
280
|
-
|
|
293
|
+
// Subdir entries: eager/*.md, reference/*.md
|
|
294
|
+
const subdirEntriesByDir = await Promise.all(RULE_SUBDIRS.map(async (sub) => {
|
|
295
|
+
const subDir = path.join(rulesRoot, sub);
|
|
296
|
+
if (!(await fse.pathExists(subDir))) {
|
|
297
|
+
return [];
|
|
298
|
+
}
|
|
299
|
+
const subFiles = (await readdir(subDir)).filter(name => name.endsWith(".md"));
|
|
300
|
+
return subFiles.map(file => ({
|
|
301
|
+
absSource: path.join(subDir, file),
|
|
302
|
+
relPath: path.join(sub, file),
|
|
303
|
+
}));
|
|
304
|
+
}));
|
|
305
|
+
// Backward-compat: flat rules/*.md (older plugin builds that haven't
|
|
306
|
+
// adopted the eager/reference split yet). Only direct .md children
|
|
307
|
+
// count; files inside subdirs are handled by the subdir pass.
|
|
308
|
+
const rootChildren = await readdir(rulesRoot, { withFileTypes: true });
|
|
309
|
+
const flatEntries = rootChildren
|
|
310
|
+
.filter(d => d.isFile() && d.name.endsWith(".md"))
|
|
311
|
+
.map(d => ({
|
|
312
|
+
absSource: path.join(rulesRoot, d.name),
|
|
313
|
+
relPath: d.name,
|
|
314
|
+
}));
|
|
315
|
+
const entries = [
|
|
316
|
+
...subdirEntriesByDir.flat(),
|
|
317
|
+
...flatEntries,
|
|
318
|
+
];
|
|
319
|
+
return { rulesRoot, entries };
|
|
281
320
|
}));
|
|
282
|
-
// Detect
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
321
|
+
// Detect relative-path collisions before performing any copies. Subdir
|
|
322
|
+
// structure is preserved, so two plugins shipping "eager/base-rules.md"
|
|
323
|
+
// would collide, but "eager/foo.md" and "reference/foo.md" do not.
|
|
324
|
+
const allRelPaths = filesByPlugin.flatMap(({ entries }) => entries.map(e => e.relPath));
|
|
325
|
+
if (new Set(allRelPaths).size !== allRelPaths.length) {
|
|
326
|
+
const duplicate = allRelPaths.find((name, index) => allRelPaths.indexOf(name) !== index);
|
|
327
|
+
throw new Error(`Duplicate Lisa rule path "${duplicate ?? "unknown"}" across plugin rules/ directories`);
|
|
287
328
|
}
|
|
288
|
-
//
|
|
289
|
-
|
|
290
|
-
|
|
329
|
+
// Ensure destination subdirs exist before copying. fs-extra's ensureDir is
|
|
330
|
+
// idempotent and cheap.
|
|
331
|
+
await Promise.all(RULE_SUBDIRS.map(sub => fse.ensureDir(path.join(rulesDestDir, sub))));
|
|
332
|
+
// Second pass: copy files now that we know there are no collisions.
|
|
333
|
+
await Promise.all(filesByPlugin.flatMap(({ entries }) => entries.map(entry => copyFile(entry.absSource, path.join(rulesDestDir, entry.relPath)))));
|
|
334
|
+
return Object.freeze(allRelPaths);
|
|
291
335
|
}
|
|
292
336
|
//# sourceMappingURL=hooks-installer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-installer.js","sourceRoot":"","sources":["../../src/codex/hooks-installer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAIL,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,kEAAkE;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAEvD,kFAAkF;AAClF,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAE9C,+DAA+D;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAE3C;;;;GAIG;AACH,MA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AAW,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,MAAM,EAAE,CAAC;QACrD,MAAM,SAAS,GAAG,WAAW,CAAC,IAAI,CAChC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CACrD,CAAC;QACF,MAAM,IAAI,KAAK,CACb,6BAA6B,SAAS,IAAI,SAAS,oCAAoC,CACxF,CAAC;IACJ,CAAC;IAED,2EAA2E;IAC3E,wBAAwB;IACxB,MAAM,OAAO,CAAC,GAAG,CACf,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,CACrE,CAAC;IAEF,oEAAoE;IACpE,MAAM,OAAO,CAAC,GAAG,CACf,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAClB,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAClE,CACF,CACF,CAAC;IAEF,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Lisa-managed Codex hook script.
|
|
3
|
-
# Reads all .md files from .codex/lisa-rules/ and injects them into the
|
|
3
|
+
# Reads all .md files from .codex/lisa-rules/eager/ and injects them into the
|
|
4
4
|
# session context via additionalContext.
|
|
5
5
|
#
|
|
6
6
|
# Wired by Lisa's installer as a SessionStart hook in .codex/hooks.json.
|
|
7
7
|
# Codex sets the hook script's cwd to the session cwd (NOT the repo root),
|
|
8
8
|
# so we resolve paths against `git rev-parse --show-toplevel`.
|
|
9
|
+
#
|
|
10
|
+
# The split between eager and reference rules: eager carries load-bearing
|
|
11
|
+
# prescriptions injected at every SessionStart; reference bodies under
|
|
12
|
+
# .codex/lisa-rules/reference/ are mirrored alongside but loaded only when
|
|
13
|
+
# the eager breadcrumb points to them.
|
|
9
14
|
set -euo pipefail
|
|
10
15
|
|
|
11
16
|
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
12
|
-
|
|
17
|
+
RULES_BASE="${REPO_ROOT}/.codex/lisa-rules"
|
|
18
|
+
RULES_DIR="${RULES_BASE}/eager"
|
|
19
|
+
|
|
20
|
+
# Backward compatibility: if the eager subdir is absent (older Lisa install),
|
|
21
|
+
# fall back to the flat lisa-rules/ directory so partial installs still ship.
|
|
22
|
+
if [ ! -d "$RULES_DIR" ]; then
|
|
23
|
+
RULES_DIR="$RULES_BASE"
|
|
24
|
+
fi
|
|
13
25
|
|
|
14
26
|
# Bail silently if the rules dir is absent (e.g., Lisa was uninstalled)
|
|
15
27
|
[ -d "$RULES_DIR" ] || exit 0
|
package/package.json
CHANGED
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"lisa:update:local": "bash scripts/lisa-update-local.sh",
|
|
30
30
|
"lisa:commit-and-pr:local": "bash scripts/lisa-commit-and-pr-local.sh",
|
|
31
31
|
"prepublishOnly": "$npm_execpath run build",
|
|
32
|
-
"check:plugins": "bash scripts/check-plugins-sync.sh"
|
|
32
|
+
"check:plugins": "bash scripts/check-plugins-sync.sh",
|
|
33
|
+
"check:rules-pairing": "bash scripts/check-rules-pairing.sh"
|
|
33
34
|
},
|
|
34
35
|
"engines": {
|
|
35
36
|
"npm": "please-use-bun",
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
"lodash": ">=4.18.1"
|
|
83
84
|
},
|
|
84
85
|
"name": "@codyswann/lisa",
|
|
85
|
-
"version": "2.
|
|
86
|
+
"version": "2.117.0",
|
|
86
87
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
87
88
|
"main": "dist/index.js",
|
|
88
89
|
"exports": {
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Reads all .md files from the plugin's rules/ directory and injects them
|
|
2
|
+
# Reads all .md files from the plugin's rules/eager/ directory and injects them
|
|
3
3
|
# into the session context via additionalContext.
|
|
4
4
|
# Used by SessionStart and SubagentStart hooks.
|
|
5
|
+
#
|
|
6
|
+
# The split between eager and reference rules is documented in
|
|
7
|
+
# rules/eager/00-bootstrap.md (or the equivalent README). Reference bodies
|
|
8
|
+
# under rules/reference/ are installed alongside but loaded only when the
|
|
9
|
+
# eager breadcrumb points to them.
|
|
5
10
|
set -euo pipefail
|
|
6
11
|
|
|
7
|
-
RULES_DIR="${CLAUDE_PLUGIN_ROOT}/rules"
|
|
12
|
+
RULES_DIR="${CLAUDE_PLUGIN_ROOT}/rules/eager"
|
|
8
13
|
|
|
9
|
-
#
|
|
14
|
+
# Backward compatibility: if the eager subdir is absent (older Lisa install),
|
|
15
|
+
# fall back to the flat rules/ directory so a partial upgrade still ships rules.
|
|
16
|
+
if [ ! -d "$RULES_DIR" ]; then
|
|
17
|
+
RULES_DIR="${CLAUDE_PLUGIN_ROOT}/rules"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
# Bail silently if no rules directory at all
|
|
10
21
|
[ -d "$RULES_DIR" ] || exit 0
|
|
11
22
|
|
|
12
23
|
CONTEXT=""
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Base Rules (load-bearing)
|
|
2
|
+
|
|
3
|
+
These are mandatory disciplines that apply to every session. Full prose, JIRA dev-status query, ADF templates, etc. live in [reference/base-rules.md](../reference/base-rules.md).
|
|
4
|
+
|
|
5
|
+
## Requirement Verification
|
|
6
|
+
|
|
7
|
+
Treat every request as potentially underspecified. Before starting any work:
|
|
8
|
+
|
|
9
|
+
1. Identify ambiguities that would prevent completion. If any exist, stop and ask.
|
|
10
|
+
2. Identify open questions whose answers would change your approach. If any exist, stop and ask.
|
|
11
|
+
3. Define how you will empirically verify the work is complete by USING the resulting software, not just running tests. If you cannot define this, stop and ask.
|
|
12
|
+
4. If a request contradicts existing code/architecture/conventions, raise the contradiction and confirm intent before proceeding.
|
|
13
|
+
|
|
14
|
+
Do not begin work if there are blockers, ambiguities, access requirements, or unanswered questions. Identify these before starting, not during implementation.
|
|
15
|
+
|
|
16
|
+
## Code Quality
|
|
17
|
+
|
|
18
|
+
- Atomic commits with conventional commit messages.
|
|
19
|
+
- Document the **why**, not the what.
|
|
20
|
+
- Add new imports and their first usage in the same edit (the lint-on-edit hook strips unused imports).
|
|
21
|
+
- Delete old code completely when replacing it. No deprecation comments unless asked.
|
|
22
|
+
- Fix bugs at root cause. Never work around them or assume a failure is "pre-existing."
|
|
23
|
+
- Test empirically. Never assume test expectations before observing actual behavior.
|
|
24
|
+
|
|
25
|
+
## Git Discipline
|
|
26
|
+
|
|
27
|
+
- **Never use `--no-verify`** or bypass any git hook.
|
|
28
|
+
- **Never bypass branch protection** — no `--admin`, `--force`, no merging a PR with failing CI. "Green in CI" is the definition of done.
|
|
29
|
+
- Never commit directly to environment branches (`dev`, `staging`, `main`).
|
|
30
|
+
- Prefix `git push` with `GIT_SSH_COMMAND="ssh -o ServerAliveInterval=30 -o ServerAliveCountMax=5"`.
|
|
31
|
+
- When opening a PR, watch it. Fix every failing check and every valid bot review comment. Resolve threads. Loop until merged.
|
|
32
|
+
- After merging into an environment branch, watch the deploy. If it fails, fix it and open a new PR.
|
|
33
|
+
- **Promotion PRs** (env→env) MUST use `gh pr merge --merge` (regular merge commit), NEVER squash. Squashing strips `[skip ci]` markers and breaks promotion detection. Feature PRs also use `--merge`.
|
|
34
|
+
- Always include the PR URL when referencing a PR.
|
|
35
|
+
|
|
36
|
+
## Testing Discipline
|
|
37
|
+
|
|
38
|
+
- Never skip or disable tests. Never add skip directives without explicit instruction.
|
|
39
|
+
- Never lower coverage thresholds to pass a hook — raise coverage instead.
|
|
40
|
+
|
|
41
|
+
## JIRA Discipline
|
|
42
|
+
|
|
43
|
+
- Read **all** comments on a ticket, not just the description.
|
|
44
|
+
- When clarifying, comment via ADF and @mention the Reporter.
|
|
45
|
+
- Establish issue link relationships (`blocks`, `is blocked by`, `relates to`) — search git history AND Jira before declaring "no related work."
|
|
46
|
+
- Single-repo invariant: Bug/Task/Sub-task MUST be single-repo. Epic/Story/Spike MAY span repos. Cross-repo leaves are split per the `repo-scope-split` rule.
|
|
47
|
+
- Pre-flight gate: BLOCK + reassign-to-Reporter if a ticket is missing target backend env, sign-in credentials, Gherkin acceptance criteria, epic parent (non-bug/non-epic), or relationship discovery evidence.
|
|
48
|
+
|
|
49
|
+
## Pace
|
|
50
|
+
|
|
51
|
+
Never rush. A fast wrong answer is worse than a slow correct one. Surface difficulty to the user instead of compressing the work.
|
|
52
|
+
|
|
53
|
+
## NEVER
|
|
54
|
+
|
|
55
|
+
- Modify this file directly.
|
|
56
|
+
- Touch files inside `node_modules`, `.venv`, `vendor`, `target`.
|
|
57
|
+
- Delete anything untracked, or anything outside this project.
|
|
58
|
+
- Create placeholders, TODOs, versioned copies (`V2`, `processNew`, `handleOld`).
|
|
59
|
+
- Write migration code unless explicitly requested.
|
|
60
|
+
- Update CHANGELOG yourself.
|
|
61
|
+
|
|
62
|
+
## ASK FIRST
|
|
63
|
+
|
|
64
|
+
- Before adding a lint/formatter suppression (`eslint-disable`, `biome-ignore`, `noqa`, etc.).
|
|
65
|
+
- Before adding a type-check suppression (`ts-ignore`, `ts-expect-error`, `# type: ignore`).
|
|
66
|
+
- Lint suppression in test files is OK without asking only when comprehensive coverage genuinely requires it.
|
|
67
|
+
|
|
68
|
+
## Multi-Repository Awareness
|
|
69
|
+
|
|
70
|
+
If you see imports that don't resolve, API calls without a contract, shared libs not present, env vars naming foreign services, stack traces pointing out-of-repo, or ticket references to other components — stop guessing. Identify the repo, add it to the session, or ask.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Coding Philosophy (load-bearing)
|
|
2
|
+
|
|
3
|
+
When writing or modifying code, follow these principles. Examples, hook structure templates, and anti-pattern catalogs live in [reference/coding-philosophy.md](../reference/coding-philosophy.md).
|
|
4
|
+
|
|
5
|
+
## Principle priority
|
|
6
|
+
|
|
7
|
+
**KISS is the tiebreaker.** When principles conflict, choose the simpler solution.
|
|
8
|
+
|
|
9
|
+
1. **YAGNI** — Don't build features, abstractions, or flexibility you don't need right now. Solve today's problem.
|
|
10
|
+
2. **KISS** — Choose the simpler option.
|
|
11
|
+
3. **DRY** — Extract only when (a) the same logic appears 3+ times, (b) the abstraction is simpler than the duplication, and (c) the extracted code has a clear single purpose.
|
|
12
|
+
4. **SOLID** — Apply pragmatically. Split a function only when it does 2+ unrelated things AND splitting reduces complexity. Use composition over inheritance.
|
|
13
|
+
|
|
14
|
+
## Mandatory practices
|
|
15
|
+
|
|
16
|
+
- **Immutability first.** Never mutate. Spread/clone to create new references.
|
|
17
|
+
- **TDD is mandatory.** Write the failing test BEFORE the implementation. Red → Green → Refactor.
|
|
18
|
+
- **Function structure order**: (1) variables & derived state, (2) side effects, (3) return. Never interleave.
|
|
19
|
+
- **Functional transformations.** Prefer `map`/`filter`/`reduce` over imperative loops with mutation.
|
|
20
|
+
- **Clean deletion.** When replacing code, delete the old version completely. No `V2`/`Old`/`New` suffixes, no `@deprecated` comments, no migration shims unless explicitly requested. Trust git history.
|
|
21
|
+
|
|
22
|
+
## What NOT to write
|
|
23
|
+
|
|
24
|
+
- Comments that explain WHAT the code does (well-named identifiers do that).
|
|
25
|
+
- Error handling, fallbacks, or validation for scenarios that can't happen.
|
|
26
|
+
- Backwards-compatibility shims, feature flags, or unused `_var` renames when you can just change the code.
|
|
27
|
+
- Half-finished implementations, placeholders, or TODOs.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Config Resolution (load-bearing)
|
|
2
|
+
|
|
3
|
+
Lisa configuration lives in `.lisa.config.json` (committed) and `.lisa.config.local.json` (gitignored, per-developer). The local file wins where they overlap. Developer-specific identity (`atlassian.email`, etc.) MUST live in the local file, never committed.
|
|
4
|
+
|
|
5
|
+
## Atlassian access — assistant-level rule
|
|
6
|
+
|
|
7
|
+
When the user asks about Atlassian (Jira / Confluence) connection state, or you are about to run a Jira/Confluence operation, and `acli` is installed:
|
|
8
|
+
|
|
9
|
+
1. Run `acli auth status` and read the active `Site:`.
|
|
10
|
+
2. Read `atlassian.site` from `.lisa.config.json` (and `atlassian.email` from `.lisa.config.local.json` if present).
|
|
11
|
+
3. **If the active site does not match config, do NOT report "not connected." Run:**
|
|
12
|
+
```sh
|
|
13
|
+
acli auth switch --site "$ATLASSIAN_SITE" --email "$ATLASSIAN_EMAIL"
|
|
14
|
+
```
|
|
15
|
+
acli supports multiple authenticated profiles; the switch is fast and non-interactive when a profile already exists.
|
|
16
|
+
4. Only after the switch fails (no matching profile) should you report not-connected and suggest `/lisa:setup:atlassian` to add one.
|
|
17
|
+
|
|
18
|
+
This applies before declaring connection state, before running any `acli jira *` / `acli confluence *` command, and before falling back to the Atlassian MCP or curl substrates. Identity mismatch is treated as silent-misroute risk, not as a hard not-connected.
|
|
19
|
+
|
|
20
|
+
## Tracker selection
|
|
21
|
+
|
|
22
|
+
Project tracker (`jira` / `github` / `linear`) is read from `.lisa.config.json` `tracker`. Vendor-neutral skills MUST dispatch through the configured tracker, never infer it from arguments. Missing `tracker` → stop and instruct the user to run the matching `/lisa:setup:*` skill.
|
|
23
|
+
|
|
24
|
+
## Repo identity
|
|
25
|
+
|
|
26
|
+
`repo:<name>` is the canonical label for which repo a work item belongs to. Resolve current-repo identity in this priority order: `.lisa.config.local.json` `repo` → `.lisa.config.json` `repo` → `.lisa.config.json` `github.repo` → `basename -s .git "$(git remote get-url origin)"`. If none resolve, stop with a clear error.
|
|
27
|
+
|
|
28
|
+
Full reference: [reference/config-resolution.md](../reference/config-resolution.md).
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Documentation Source Paths (load-bearing)
|
|
2
|
+
|
|
3
|
+
Do not treat `docs/`, `research/`, `transcripts/`, or other source-material directories as disposable duplicates just because a project also has a `wiki/`. They may be ingestion inputs, executable fixtures, runtime inputs, or historical evidence.
|
|
4
|
+
|
|
5
|
+
Before moving, absorbing, or deleting documentation-like paths:
|
|
6
|
+
|
|
7
|
+
1. Classify each path: durable wiki content, reader-safe source note, executable test fixture, runtime scratch/input, generated output, or obsolete.
|
|
8
|
+
2. Use `rg` to find every code, test, script, config, README, rule, skill, agent, and wiki reference to the path.
|
|
9
|
+
3. Preserve executable fixtures and runtime inputs OUTSIDE the wiki — they are project behavior, not documentation.
|
|
10
|
+
4. When absorbing into `wiki/`, update source notes, indexes, logs, README links, rule references, and runtime defaults that pointed at the old path.
|
|
11
|
+
5. Delete a path only AFTER references are updated and verification proves the project no longer reads it.
|
|
12
|
+
|
|
13
|
+
Full context (Lisa-wiki specifics, `wiki/sources/` evidence layout): [reference/documentation-source-paths.md](../reference/documentation-source-paths.md).
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Empirical Inquiry — Test, Don't Guess (load-bearing)
|
|
2
|
+
|
|
3
|
+
When a decision depends on a fact you are not certain of — how a tool, API, harness, runtime, or dependency actually behaves — **find out empirically before you act.** Run the smallest experiment that settles the question, observe the real result, and proceed from what you observed.
|
|
4
|
+
|
|
5
|
+
Do not reason your way to a confident-sounding answer from documentation, prior assumption, or training knowledge when the real system is right there and a quick probe would tell you the truth.
|
|
6
|
+
|
|
7
|
+
## How to apply
|
|
8
|
+
|
|
9
|
+
1. **State the uncertain fact** explicitly, so you know what the experiment must resolve.
|
|
10
|
+
2. **Run the cheapest probe** that produces real evidence — a single command, a one-shot subagent, a tiny script, a direct API call against a scratch input.
|
|
11
|
+
3. **Report the raw result** (verbatim output or error), then your conclusion. Distinguish observation from inference.
|
|
12
|
+
4. **Encode the verified fact**, and when non-obvious or contradicting docs, record WHY so the next agent inherits the finding.
|
|
13
|
+
|
|
14
|
+
## Forbidden
|
|
15
|
+
|
|
16
|
+
- Presenting a guess, recollection, or doc summary as established fact when it was cheap to verify and you did not.
|
|
17
|
+
- "Should work" / "probably" / "the docs say" as the basis for a load-bearing decision an experiment could have settled.
|
|
18
|
+
- Skipping the probe because the answer "seems obvious" — those are exactly the ones that quietly drift from reality.
|
|
19
|
+
|
|
20
|
+
This is the inquiry counterpart to the `verification` rule (which proves completed work behaves correctly). Both reject "it looks correct" as evidence.
|
|
21
|
+
|
|
22
|
+
Full prose: [reference/empirical-inquiry.md](../reference/empirical-inquiry.md).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Intent Routing (load-bearing)
|
|
2
|
+
|
|
3
|
+
**On the first user message of a session**, before responding to the substance of the request, before running any tool, before asking any clarifying question:
|
|
4
|
+
|
|
5
|
+
1. **Classify the flow.** One of: Research, Plan, Implement (Build/Fix/Improve/Investigate-Only), Verify, Monitor, Intake, Debrief, or No flow. If a slash command was invoked, the flow is already determined.
|
|
6
|
+
2. **Echo the chosen flow** with a one-sentence justification. Example:
|
|
7
|
+
> **Flow: Implement/Fix** — bug report with reproduction steps.
|
|
8
|
+
3. **Echo orchestration mode in the same message.** One of:
|
|
9
|
+
> **Orchestration: agent team** — Research, Plan, Implement, Intake, Debrief, and any flow that invokes Review.
|
|
10
|
+
> **Orchestration: single agent** — Verify (standalone), Monitor (standalone), product-walkthrough standalone, debrief-apply, one-off diagnostic sessions.
|
|
11
|
+
4. **Check the readiness gate.** If gate fails interactively, ask for what's missing with recommended answers; do not start work. Headless/`-p` sessions infer from available context instead of blocking.
|
|
12
|
+
5. **Cascade rule.** If you are already inside an agent team (a TeamCreate succeeded earlier this session, or you were spawned into a team context), do **not** create a second team. Add specialists through the existing lead. On Claude, teams are flat — message the lead with teammate + assignment. On Codex, use `multi_agent_v1.spawn_agent`.
|
|
13
|
+
|
|
14
|
+
Once a flow is established, **do not re-classify** on later messages, even if a follow-up looks vague ("now run the tests", "thanks"). Subsequent messages inherit the established flow unless the user explicitly changes scope.
|
|
15
|
+
|
|
16
|
+
Skipping classification or orchestration echo leads to unstructured responses that bypass readiness gates.
|
|
17
|
+
|
|
18
|
+
Full reference (flow definitions, readiness gates, orchestration matrix, sub-flows): [reference/intent-routing.md](../reference/intent-routing.md).
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Leaf-Only Build-Ready Invariant (load-bearing)
|
|
2
|
+
|
|
3
|
+
**Build-ready means a directly implementable leaf work unit.** Containers never carry build-ready.
|
|
4
|
+
|
|
5
|
+
A leaf is structurally defined: **no child work** AND a leaf-typed item (Bug, Task, Sub-task, Improvement). A container is a parent with children — Epic, Story, Spike, or any item that has acquired sub-items.
|
|
6
|
+
|
|
7
|
+
## Invariant
|
|
8
|
+
|
|
9
|
+
- **At decomposition/write time** — only leaves receive the `ready` role. Parent containers are created in their non-ready state.
|
|
10
|
+
- **At validate time** — `*-validate-*` FAILs any container carrying the build-ready role.
|
|
11
|
+
- **At claim time** — build-intake claims leaves only. A container with a stale build-ready role is rolled up or safe-blocked, NEVER implemented.
|
|
12
|
+
|
|
13
|
+
## Childless-parent exception
|
|
14
|
+
|
|
15
|
+
A container *type* with no children is structurally a leaf — and may be build-ready iff its type is itself a leaf type:
|
|
16
|
+
|
|
17
|
+
- **Task or Bug with no children** → leaf → may be build-ready.
|
|
18
|
+
- **Epic, Story, or Spike with no children** → still NOT build-ready. These are coordination containers by design; an empty one is incomplete decomposition. Repair: decompose into leaves, or reclassify to a leaf type.
|
|
19
|
+
|
|
20
|
+
## Parent state rollup (priority order, first match wins)
|
|
21
|
+
|
|
22
|
+
1. Any leaf is **blocked** → parent rolls up to **blocked / attention-needed**.
|
|
23
|
+
2. Else any leaf is **claimed or in review** → parent is **in-progress**.
|
|
24
|
+
3. Else all required leaves are **terminal (`done`)** → parent reaches the configured rollup terminal (env-keyed `done`).
|
|
25
|
+
4. Else (leaves exist but none started) → parent unchanged.
|
|
26
|
+
|
|
27
|
+
**Blocked dominates.** Optional/won't-do children do not hold a parent open. Rollup is recursive — bottom-up. The parent never carries `ready`.
|
|
28
|
+
|
|
29
|
+
## Terminal native closure
|
|
30
|
+
|
|
31
|
+
When a leaf reaches the true terminal `done` (the production / final-env value), also finalize via the tracker's native completion mechanism:
|
|
32
|
+
|
|
33
|
+
- **GitHub** — `gh issue close <n> --reason completed` after the terminal label.
|
|
34
|
+
- **Linear** — move workflow `state` to the team's Done.
|
|
35
|
+
- **JIRA** — transition to terminal Done/Resolved/Closed; verify `statusCategory = Done`.
|
|
36
|
+
|
|
37
|
+
Intermediate env-keyed states (`status:on-dev`, `On Stg`, etc.) remain open. Idempotent — if already closed, report and continue.
|
|
38
|
+
|
|
39
|
+
Full vendor mechanics + the state machine in prose: [reference/leaf-only-lifecycle.md](../reference/leaf-only-lifecycle.md).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# PRD Lifecycle Rollup & Generated-Top-Level-Work Contract (load-bearing)
|
|
2
|
+
|
|
3
|
+
The vendor-neutral source of truth for how a PRD owns the work it generated and how its lifecycle rolls up to `shipped`. Companion to `leaf-only-lifecycle` (which governs build-lifecycle of leaves); this rule governs PRD lifecycle and rollup from generated top-level children.
|
|
4
|
+
|
|
5
|
+
## Generated top-level work (the contract)
|
|
6
|
+
|
|
7
|
+
A PRD owns the work units it created **at the top of the hierarchy** — the Epic(s) and any top-level Story it created directly. It does NOT own descendants (Sub-tasks, Stories under an Epic, leaves under a top-level unit) — those are owned by their top-level parent and roll up via `leaf-only-lifecycle`.
|
|
8
|
+
|
|
9
|
+
Leaf Sub-tasks are **never** direct children of a PRD when a top-level Epic/Story hierarchy exists.
|
|
10
|
+
|
|
11
|
+
## How each vendor records the PRD→child link
|
|
12
|
+
|
|
13
|
+
**Native hierarchy first**, machine-readable fallback section always written:
|
|
14
|
+
|
|
15
|
+
- **GitHub Issues** — native sub-issues when source and tracker are the same repo + supports sub-issues.
|
|
16
|
+
- **Linear** — `parentId` or generated Project grouping where the PRD also lives in Linear.
|
|
17
|
+
- **JIRA** — Epic link / parent field, or documented issue-link type.
|
|
18
|
+
- **Confluence / Notion** — no native issue hierarchy; the documented `## Tickets` / `## Generated Work` section IS the source of truth.
|
|
19
|
+
- **Cross-vendor** (e.g. Notion PRD → JIRA tracker) — always documented section in the PRD source.
|
|
20
|
+
|
|
21
|
+
The documented `## Tickets` section is ALWAYS written (additive to native links) so the generated set is readable without parsing comments.
|
|
22
|
+
|
|
23
|
+
## Rollup transition
|
|
24
|
+
|
|
25
|
+
PRD rolls from `ticketed` to `shipped` when every required generated top-level child is terminal. The PRD remains open for `/lisa:verify-prd` after `shipped` — verified PASS performs native closure (archive/close/transition), verified FAIL re-opens to `ticketed` with build-ready fix tickets (never `blocked`).
|
|
26
|
+
|
|
27
|
+
## Idempotency dedupe key
|
|
28
|
+
|
|
29
|
+
Re-runs of intake/backlink must dedupe by child-ref identity (e.g. `owner/repo#number` for GitHub, Linear issue UUID, JIRA key) — never by URL string, which varies by formatting.
|
|
30
|
+
|
|
31
|
+
Full vendor matrix, predicate definitions, non-goals: [reference/prd-lifecycle-rollup.md](../reference/prd-lifecycle-rollup.md).
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Repo Scope & Work-Time Splitting (load-bearing)
|
|
2
|
+
|
|
3
|
+
**Leaf work units are single-repo.** A leaf is an individually implementable ticket with no children — types **Bug, Task, Sub-task, Improvement**. Each names exactly one repo. **Epic, Story, Spike** are coordination containers and may span repos.
|
|
4
|
+
|
|
5
|
+
Enforced at four points: gate **S10** (`*-validate-*`, write time), `task-decomposition` step 1.5 (PRD-decomposition time), claim-time repo scoping (`*-build-intake`), and the work-time split procedure (an existing ticket about to be implemented).
|
|
6
|
+
|
|
7
|
+
## Choose the right strategy
|
|
8
|
+
|
|
9
|
+
- **Decomposition-time (no tickets exist yet):** use `task-decomposition` step 1.5 — one work unit per repo under a parent Story.
|
|
10
|
+
- **Work-time (a ticket already exists):** narrow the original to one repo, spin off a sibling per additional repo, link by dependency. Do NOT invent a new parent — siblings inherit the original's existing parent.
|
|
11
|
+
|
|
12
|
+
## Work-time split (pre-flight gate, agent-performed)
|
|
13
|
+
|
|
14
|
+
1. **Detect repos.** Parse description + AC + approach, confirm against actual code surfaces. If single-repo, no split.
|
|
15
|
+
2. **Pick the keeper.** Default: the original keeps the consumer / user-facing repo.
|
|
16
|
+
3. **Create one sibling per extra repo**, cloning metadata (re-prefix summary, scope AC, carry parent, env, sign-in).
|
|
17
|
+
4. **Link by dependency.** Producer **blocks** consumer (`is blocked by` on consumer / `blocks` on producer). No clear direction → `relates to`.
|
|
18
|
+
5. **Narrow the original.** Edit summary prefix, Repository section, AC; remove cross-repo references.
|
|
19
|
+
6. **Comment** on the original noting the split, linking each sibling.
|
|
20
|
+
7. **Re-validate.** Run `tracker-verify` (S10) on the original and every sibling. All must PASS single-repo.
|
|
21
|
+
8. **Proceed in dependency order.** Producer siblings first.
|
|
22
|
+
|
|
23
|
+
## When to BLOCK instead of split
|
|
24
|
+
|
|
25
|
+
Fall back to the standard BLOCK + reassign-to-Reporter path when:
|
|
26
|
+
|
|
27
|
+
- Repos cannot be determined confidently from ticket + code.
|
|
28
|
+
- Splitting would strand stakeholder context only the reporter can re-scope.
|
|
29
|
+
- Required clone metadata (parent, env, credentials) is itself missing.
|
|
30
|
+
|
|
31
|
+
## Claim-time repo scoping (build-intake)
|
|
32
|
+
|
|
33
|
+
A tracker can oversee multiple repos. Build-intake claims only current-repo tickets. Resolve current repo per `config-resolution` (config `repo` → `github.repo` → git remote basename). For each ready candidate:
|
|
34
|
+
|
|
35
|
+
1. **Read `repo:<name>` label.** Wrong repo → skip. Current repo → leaf-only gate + claim. Unlabeled → determine + stamp + re-apply.
|
|
36
|
+
2. **Multi-repo leaf → split, never claim.** Each split sibling is created build-ready and stamped with its own `repo:<name>`.
|
|
37
|
+
3. **Wrong-repo single-repo leaf → skip** (label keeps it cheap next cycle).
|
|
38
|
+
|
|
39
|
+
Vendor mechanics (JIRA/GitHub/Linear) and full procedure: [reference/repo-scope-split.md](../reference/repo-scope-split.md).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Security Audit Handling (load-bearing)
|
|
2
|
+
|
|
3
|
+
If `git push` fails because the pre-push hook reports security vulnerabilities, follow the rules below. **Never use `--no-verify`** to bypass the security audit.
|
|
4
|
+
|
|
5
|
+
## Core rule
|
|
6
|
+
|
|
7
|
+
Override the actually-vulnerable **leaf package**, not its parent. The audit chain shows `parent › intermediate › vulnerable` — only the vulnerable leaf needs the override.
|
|
8
|
+
|
|
9
|
+
**Never override a parent package to force a lower major version.** Other packages may depend on the newer major; a forced downgrade breaks them.
|
|
10
|
+
|
|
11
|
+
Before adding any override, verify:
|
|
12
|
+
- You are targeting the actually-vulnerable package, not a parent in the chain.
|
|
13
|
+
- The override is compatible with all dependents (check via `bun why <pkg>` or `npm ls <pkg>`).
|
|
14
|
+
- The override does not downgrade across a major version boundary other deps require.
|
|
15
|
+
|
|
16
|
+
## Node.js (GHSA)
|
|
17
|
+
|
|
18
|
+
1. Note GHSA ID, package, advisory URL.
|
|
19
|
+
2. If a patched version exists: add a resolution AND override in `package.json` for the leaf package, regenerate the lockfile, commit, retry.
|
|
20
|
+
3. If no patch but safe (transitive, no untrusted input, dev/build only): add an exclusion to `audit.ignore.local.json` with `{"id", "package", "reason"}`, commit, retry.
|
|
21
|
+
|
|
22
|
+
## Rails (bundler-audit)
|
|
23
|
+
|
|
24
|
+
1. Note advisory ID, gem, URL.
|
|
25
|
+
2. If direct dep with patch: update Gemfile constraint, `bundle update <gem>`, commit, retry.
|
|
26
|
+
3. If transitive with patch: `bundle update <gem>` to bump the lockfile only, commit, retry.
|
|
27
|
+
4. If no patch but safe: document the exception, retry.
|
|
28
|
+
|
|
29
|
+
Full procedure with examples: [reference/security-audit-handling.md](../reference/security-audit-handling.md).
|
|
@@ -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).
|