@codyswann/lisa 2.239.1 → 2.241.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/core/learnings-entry.d.ts +9 -0
- package/dist/core/learnings-entry.d.ts.map +1 -1
- package/dist/core/learnings-entry.js +4 -2
- package/dist/core/learnings-entry.js.map +1 -1
- package/dist/core/learnings-writer.d.ts +33 -0
- package/dist/core/learnings-writer.d.ts.map +1 -1
- package/dist/core/learnings-writer.js +75 -1
- package/dist/core/learnings-writer.js.map +1 -1
- package/dist/sync/registry.d.ts.map +1 -1
- package/dist/sync/registry.js +7 -0
- package/dist/sync/registry.js.map +1 -1
- package/package.json +1 -1
- 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-attribute-failure/SKILL.md +142 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-attribute-failure/agents/openai.yaml +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-doctor/SKILL.md +28 -77
- package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +18 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +18 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +18 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +61 -8
- package/plugins/lisa/commands/attribute-failure.md +6 -0
- package/plugins/lisa/commands/persist-learning.md +1 -1
- package/plugins/lisa/rules/eager/claim-archaeology.md +37 -0
- package/plugins/lisa/rules/reference/claim-archaeology.md +142 -0
- package/plugins/lisa/rules/reference/project-learnings.md +18 -0
- package/plugins/lisa/skills/lisa-attribute-failure/SKILL.md +142 -0
- package/plugins/lisa/skills/lisa-attribute-failure/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/lisa-doctor/SKILL.md +28 -77
- package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +18 -0
- package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +18 -0
- package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +18 -0
- package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +62 -9
- package/plugins/lisa-agy/commands/lisa/attribute-failure.md +6 -0
- package/plugins/lisa-agy/commands/lisa/persist-learning.md +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-attribute-failure/SKILL.md +142 -0
- package/plugins/lisa-agy/skills/lisa-doctor/SKILL.md +28 -77
- package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +18 -0
- package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +18 -0
- package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +18 -0
- package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +62 -9
- 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-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/commands/lisa/attribute-failure.md +6 -0
- package/plugins/lisa-copilot/commands/lisa/persist-learning.md +1 -1
- package/plugins/lisa-copilot/rules/eager/claim-archaeology.md +37 -0
- package/plugins/lisa-copilot/rules/reference/claim-archaeology.md +142 -0
- package/plugins/lisa-copilot/rules/reference/project-learnings.md +18 -0
- package/plugins/lisa-copilot/skills/lisa-attribute-failure/SKILL.md +142 -0
- package/plugins/lisa-copilot/skills/lisa-doctor/SKILL.md +28 -77
- package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +18 -0
- package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +18 -0
- package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +18 -0
- package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +62 -9
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/commands/lisa/attribute-failure.md +6 -0
- package/plugins/lisa-cursor/commands/lisa/persist-learning.md +1 -1
- package/plugins/lisa-cursor/rules/claim-archaeology-reference.mdc +147 -0
- package/plugins/lisa-cursor/rules/claim-archaeology.mdc +42 -0
- package/plugins/lisa-cursor/rules/project-learnings-reference.mdc +18 -0
- package/plugins/lisa-cursor/skills/lisa-attribute-failure/SKILL.md +142 -0
- package/plugins/lisa-cursor/skills/lisa-doctor/SKILL.md +28 -77
- package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +18 -0
- package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +18 -0
- package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +18 -0
- package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +62 -9
- 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-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-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-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-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-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-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-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/src/base/commands/attribute-failure.md +6 -0
- package/plugins/src/base/commands/persist-learning.md +1 -1
- package/plugins/src/base/rules/eager/claim-archaeology.md +37 -0
- package/plugins/src/base/rules/reference/claim-archaeology.md +142 -0
- package/plugins/src/base/rules/reference/project-learnings.md +18 -0
- package/plugins/src/base/skills/lisa-attribute-failure/SKILL.md +142 -0
- package/plugins/src/base/skills/lisa-doctor/SKILL.md +28 -77
- package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +18 -0
- package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +18 -0
- package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +18 -0
- package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +62 -9
|
@@ -6,4 +6,13 @@ import { type LearningEntry } from "./learnings-contract.js";
|
|
|
6
6
|
* @returns Validated learning entry
|
|
7
7
|
*/
|
|
8
8
|
export declare function validateLearningEntry(candidate: unknown): LearningEntry;
|
|
9
|
+
/**
|
|
10
|
+
* Require a real calendar date in ISO date form. Exported so the surgical
|
|
11
|
+
* `last_confirmed` writer can validate a caller-supplied date up front instead
|
|
12
|
+
* of duplicating the calendar check.
|
|
13
|
+
* @param value - Untrusted date value
|
|
14
|
+
* @param field - Field name for errors
|
|
15
|
+
* @returns Valid ISO date
|
|
16
|
+
*/
|
|
17
|
+
export declare function requireIsoDate(value: unknown, field: string): string;
|
|
9
18
|
//# sourceMappingURL=learnings-entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learnings-entry.d.ts","sourceRoot":"","sources":["../../src/core/learnings-entry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAOjC;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,aAAa,CA0BvE"}
|
|
1
|
+
{"version":3,"file":"learnings-entry.d.ts","sourceRoot":"","sources":["../../src/core/learnings-entry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAOjC;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,aAAa,CA0BvE;AAkND;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAWpE"}
|
|
@@ -190,12 +190,14 @@ function requireNonBlankText(value, field) {
|
|
|
190
190
|
return value.trim();
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
|
-
* Require a real calendar date in ISO date form.
|
|
193
|
+
* Require a real calendar date in ISO date form. Exported so the surgical
|
|
194
|
+
* `last_confirmed` writer can validate a caller-supplied date up front instead
|
|
195
|
+
* of duplicating the calendar check.
|
|
194
196
|
* @param value - Untrusted date value
|
|
195
197
|
* @param field - Field name for errors
|
|
196
198
|
* @returns Valid ISO date
|
|
197
199
|
*/
|
|
198
|
-
function requireIsoDate(value, field) {
|
|
200
|
+
export function requireIsoDate(value, field) {
|
|
199
201
|
const result = requireNonEmptyString(value, field);
|
|
200
202
|
const date = new Date(`${result}T00:00:00.000Z`);
|
|
201
203
|
if (!ISO_DATE.test(result) ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learnings-entry.js","sourceRoot":"","sources":["../../src/core/learnings-entry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EACL,kBAAkB,EAClB,0BAA0B,GAG3B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AACvC,MAAM,SAAS,GAAG,gCAAgC,CAAC;AAInD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAAkB;IACtD,MAAM,WAAW,GAAG,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACvD,MAAM,KAAK,GAAG,CAAC,KAAiB,EAAW,EAAE,CAC3C,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACvC,MAAM,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,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,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,kBAAkB,CAAC,SAAS,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,sBAAsB,kBAAkB,CAAC,SAAS,EAAE,CAC7D,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,4BAA4B,CAAC,KAAa;IACjD,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;QACxC,MAAM,IAAI,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACrC,OAAO,CACL,IAAI,IAAI,CAAC;YACT,IAAI,KAAK,EAAE;YACX,IAAI,KAAK,EAAE;YACX,CAAC,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC;YAC1B,IAAI,KAAK,GAAG,CACb,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -27,6 +27,39 @@ export declare function persistLearningEntry(projectRoot: string, candidate: unk
|
|
|
27
27
|
* @returns Absolute path to the persisted learnings file
|
|
28
28
|
*/
|
|
29
29
|
export declare function persistConsolidatedLearning(projectRoot: string, candidate: unknown, options?: ConsolidatedLearningOptions): Promise<string>;
|
|
30
|
+
/** Outcome vocabulary for {@link confirmLearningEntry}. */
|
|
31
|
+
export type ConfirmLearningStatus = "confirmed" | "unchanged" | "not-found";
|
|
32
|
+
/** Structured no-throw outcome of a surgical `last_confirmed` bump. */
|
|
33
|
+
export interface ConfirmLearningResult {
|
|
34
|
+
/** What happened: written, already-current no-op, or missing-target no-op. */
|
|
35
|
+
readonly status: ConfirmLearningStatus;
|
|
36
|
+
/** The entry id the caller asked to confirm. */
|
|
37
|
+
readonly id: string;
|
|
38
|
+
/**
|
|
39
|
+
* Absolute learnings file path whenever the file exists — including an
|
|
40
|
+
* in-file `not-found` id — so callers can report a consistent target.
|
|
41
|
+
* Absent only when the learnings file itself does not exist.
|
|
42
|
+
*/
|
|
43
|
+
readonly file?: string;
|
|
44
|
+
/** Previous `last_confirmed` value when the entry was advanced. */
|
|
45
|
+
readonly previous?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Surgically advance ONLY one entry's `last_confirmed` timestamp — the
|
|
49
|
+
* claim-time "this rule demonstrably applied" confirmation (#1579). Uses the
|
|
50
|
+
* same lock/safety/atomic machinery as the persist writers, but is monotonic
|
|
51
|
+
* and non-blocking by design: a missing file or unknown id returns a
|
|
52
|
+
* structured no-op result instead of throwing, and a date at or before the
|
|
53
|
+
* stored `last_confirmed` never rewrites the file (idempotent within a claim,
|
|
54
|
+
* never regresses). Every other entry field is preserved byte-for-byte; the
|
|
55
|
+
* updated entry is re-validated so the `last_confirmed >= first_learned`
|
|
56
|
+
* invariant and all budgets still hold.
|
|
57
|
+
* @param projectRoot - Absolute path to the host project root
|
|
58
|
+
* @param id - Stable id of the entry to confirm
|
|
59
|
+
* @param date - Confirmation date (real ISO `YYYY-MM-DD`)
|
|
60
|
+
* @returns Structured outcome; never throws for a missing entry or file
|
|
61
|
+
*/
|
|
62
|
+
export declare function confirmLearningEntry(projectRoot: string, id: string, date: string): Promise<ConfirmLearningResult>;
|
|
30
63
|
export { parseLearningsFile, renderLearningsFile, } from "./learnings-document.js";
|
|
31
64
|
export { validateLearningEntry } from "./learnings-entry.js";
|
|
32
65
|
//# sourceMappingURL=learnings-writer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learnings-writer.d.ts","sourceRoot":"","sources":["../../src/core/learnings-writer.ts"],"names":[],"mappings":"AAsBA,gFAAgF;AAChF,MAAM,WAAW,2BAA2B;IAC1C,gEAAgE;IAChE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,GACjB,O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AAoB,CACxC,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,qBAAqB,CAAC,CAmDhC;AAED,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import * as fse from "fs-extra";
|
|
|
3
3
|
import { rename, writeFile } from "node:fs/promises";
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
import { assertDocumentBudget, parseLearningsFile, renderLearningsFile, } from "./learnings-document.js";
|
|
6
|
-
import { validateLearningEntry } from "./learnings-entry.js";
|
|
6
|
+
import { requireIsoDate, validateLearningEntry } from "./learnings-entry.js";
|
|
7
7
|
import { assertSafeLearningParents, readExistingLearnings, resolveSafeLearningTarget, } from "./learnings-file-safety.js";
|
|
8
8
|
import { withLearningTargetLock } from "./learnings-lock.js";
|
|
9
9
|
import { readProjectConfig, resolveProjectLearningsFile, } from "./project-config.js";
|
|
@@ -59,8 +59,82 @@ export async function persistConsolidatedLearning(projectRoot, candidate, option
|
|
|
59
59
|
return target;
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Surgically advance ONLY one entry's `last_confirmed` timestamp — the
|
|
64
|
+
* claim-time "this rule demonstrably applied" confirmation (#1579). Uses the
|
|
65
|
+
* same lock/safety/atomic machinery as the persist writers, but is monotonic
|
|
66
|
+
* and non-blocking by design: a missing file or unknown id returns a
|
|
67
|
+
* structured no-op result instead of throwing, and a date at or before the
|
|
68
|
+
* stored `last_confirmed` never rewrites the file (idempotent within a claim,
|
|
69
|
+
* never regresses). Every other entry field is preserved byte-for-byte; the
|
|
70
|
+
* updated entry is re-validated so the `last_confirmed >= first_learned`
|
|
71
|
+
* invariant and all budgets still hold.
|
|
72
|
+
* @param projectRoot - Absolute path to the host project root
|
|
73
|
+
* @param id - Stable id of the entry to confirm
|
|
74
|
+
* @param date - Confirmation date (real ISO `YYYY-MM-DD`)
|
|
75
|
+
* @returns Structured outcome; never throws for a missing entry or file
|
|
76
|
+
*/
|
|
77
|
+
export async function confirmLearningEntry(projectRoot, id, date) {
|
|
78
|
+
if (typeof id !== "string" || id.trim() === "") {
|
|
79
|
+
throw new Error("Invalid learning id: expected a non-empty string");
|
|
80
|
+
}
|
|
81
|
+
const confirmedDate = requireIsoDate(date, "last_confirmed");
|
|
82
|
+
const config = await readProjectConfig(projectRoot);
|
|
83
|
+
const relativeFile = resolveProjectLearningsFile(config);
|
|
84
|
+
const { root, target } = resolveSafeLearningTarget(projectRoot, relativeFile);
|
|
85
|
+
await assertSafeLearningParents(root, path.dirname(target));
|
|
86
|
+
// Probe outside the lock so a missing file creates no directories or locks.
|
|
87
|
+
const probe = await readExistingLearnings(target);
|
|
88
|
+
if (probe === undefined) {
|
|
89
|
+
return { status: "not-found", id };
|
|
90
|
+
}
|
|
91
|
+
return withLearningTargetLock(target, async () => {
|
|
92
|
+
await assertSafeLearningParents(root, path.dirname(target));
|
|
93
|
+
const existing = await readExistingLearnings(target);
|
|
94
|
+
const entries = existing === undefined ? [] : parseLearningsFile(existing);
|
|
95
|
+
const current = entries.find(entry => entry.id === id);
|
|
96
|
+
if (current === undefined) {
|
|
97
|
+
return { status: "not-found", id, file: target };
|
|
98
|
+
}
|
|
99
|
+
if (confirmedDate <= current.last_confirmed) {
|
|
100
|
+
return { status: "unchanged", id, file: target };
|
|
101
|
+
}
|
|
102
|
+
const confirmed = validateLearningEntry({
|
|
103
|
+
...current,
|
|
104
|
+
last_confirmed: confirmedDate,
|
|
105
|
+
});
|
|
106
|
+
const nextEntries = entries.map(entry => entry.id === id ? confirmed : entry);
|
|
107
|
+
const rendered = renderConfirmedDocument(nextEntries);
|
|
108
|
+
const temporary = path.join(path.dirname(target), `.${path.basename(target)}.${process.pid}.${crypto.randomUUID()}.tmp`);
|
|
109
|
+
try {
|
|
110
|
+
await writeFile(temporary, rendered, { encoding: "utf8", flag: "wx" });
|
|
111
|
+
await assertSafeLearningParents(root, path.dirname(target));
|
|
112
|
+
await rename(temporary, target);
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
await fse.remove(temporary);
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
status: "confirmed",
|
|
119
|
+
id,
|
|
120
|
+
file: target,
|
|
121
|
+
previous: current.last_confirmed,
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
}
|
|
62
125
|
export { parseLearningsFile, renderLearningsFile, } from "./learnings-document.js";
|
|
63
126
|
export { validateLearningEntry } from "./learnings-entry.js";
|
|
127
|
+
/**
|
|
128
|
+
* Render and budget-check the post-confirmation document so the write path
|
|
129
|
+
* stays a pure definitions-then-write sequence.
|
|
130
|
+
* @param entries - Entries with the confirmed entry already substituted
|
|
131
|
+
* @returns Next canonical document
|
|
132
|
+
*/
|
|
133
|
+
function renderConfirmedDocument(entries) {
|
|
134
|
+
const rendered = renderLearningsFile(entries);
|
|
135
|
+
assertDocumentBudget(rendered, entries.length, "Learnings file");
|
|
136
|
+
return rendered;
|
|
137
|
+
}
|
|
64
138
|
/**
|
|
65
139
|
* Build and budget-check the next canonical document, dropping superseded
|
|
66
140
|
* entries before the new entry is added so consolidation and the budget
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learnings-writer.js","sourceRoot":"","sources":["../../src/core/learnings-writer.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,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AAG,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACvD,uEAAuE;IACvE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAChD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,8DAA8D;AAC9D,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAoCD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAoJjD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EA0C/C,CAAC"}
|
package/dist/sync/registry.js
CHANGED
|
@@ -100,6 +100,13 @@ export const SYNC_REGISTRY = [
|
|
|
100
100
|
defaultValue: { staleAfterHours: 2, maxCandidates: 100 },
|
|
101
101
|
description: "Repair-intake stall window and candidate cap",
|
|
102
102
|
},
|
|
103
|
+
{
|
|
104
|
+
// Semantics documented in one place: the claim-archaeology rule pair
|
|
105
|
+
// (plugins/src/base/rules/{eager,reference}/claim-archaeology.md).
|
|
106
|
+
key: "archaeology",
|
|
107
|
+
defaultValue: { maxSteps: 8 },
|
|
108
|
+
description: "Claim-time archaeology cost budget (max tracker/git queries per claim)",
|
|
109
|
+
},
|
|
103
110
|
{
|
|
104
111
|
key: "monitor",
|
|
105
112
|
defaultValue: {
|
|
@@ -1 +1 @@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,CAAC,mBAAmB,CAAC;QACnC,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,oBAAoB;QACzB,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,sBAAsB;QAC3B,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,SAAS,EAAE,oBAAoB;KAChC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"form-data": ">=4.0.6"
|
|
103
103
|
},
|
|
104
104
|
"name": "@codyswann/lisa",
|
|
105
|
-
"version": "2.
|
|
105
|
+
"version": "2.241.0",
|
|
106
106
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
107
107
|
"main": "dist/index.js",
|
|
108
108
|
"exports": {
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lisa-attribute-failure
|
|
3
|
+
description: "Event-triggered root-cause…"
|
|
4
|
+
allowed-tools: ["Skill", "Bash", "Read", "Glob", "Grep"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Attribute Failure
|
|
8
|
+
|
|
9
|
+
Attribute ONE failure event to Lisa or the project, with cited evidence. Failure event: $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
Before a Lisa-caused failure can be routed upstream, something has to say — with evidence — "this was Lisa's fault, not the project's." A failure has two possible causes: the project drifted, or **Lisa itself changed or shipped the defect**. This skill must distinguish them instead of blaming the project by default, and equally must never blame Lisa without conclusive evidence. Wrong attribution in either direction is the failure mode; **inconclusive evidence is always `ambiguous`, and ambiguous stays local and low-confidence — never upstream.**
|
|
12
|
+
|
|
13
|
+
## Input — the failure event
|
|
14
|
+
|
|
15
|
+
Accept the event as JSON or `key=value` fields. This procedure is **event-triggered, not version-window-keyed**: any failure can be attributed, not only a doctor config-audit finding.
|
|
16
|
+
|
|
17
|
+
- `defect` — what went wrong, in plain language (required)
|
|
18
|
+
- `implicated_files` — the file paths where the defect lives or manifests (required when known)
|
|
19
|
+
- `surface_in_play` — the Lisa rule / skill / hook / template / workflow involved, if any
|
|
20
|
+
- `installed_version` / `latest_version` — the Lisa version window, when the caller knows it; otherwise resolve it as signal 3 describes
|
|
21
|
+
- `failure_class` — a short slug naming the class of failure (used by downstream filing for the root-cause key)
|
|
22
|
+
|
|
23
|
+
## Output — the verdict
|
|
24
|
+
|
|
25
|
+
Return exactly one verdict — `lisa` | `project` | `ambiguous` — plus the evidence it relied on:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
## Attribution: [lisa | project | ambiguous]
|
|
29
|
+
|
|
30
|
+
**Signal:** [managed-surface | shipped-artifact-behavior | upstream-history | none-conclusive]
|
|
31
|
+
**Lisa surface at fault:** [path or rule/skill/hook name | n/a]
|
|
32
|
+
**Cited evidence:**
|
|
33
|
+
- [each item names the signal it came from and the concrete citation: file path + ownership proof, shipped artifact text, or commit sha/subject/version]
|
|
34
|
+
**Confidence note:** [why the evidence is conclusive, or exactly what was inconclusive]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Verdict rules:
|
|
38
|
+
|
|
39
|
+
- **`lisa`** — at least one signal conclusively pins the defect on a Lisa-shipped surface or upstream change, and the evidence names that surface. Never emit `lisa` from degraded, truncated, or unverified history.
|
|
40
|
+
- **`project`** — the implicated files are project-owned, no shipped Lisa artifact drove the behavior, and the upstream-history window shows no relevant Lisa change. Cite the absence explicitly (which paths were checked, which window showed no relevant change).
|
|
41
|
+
- **`ambiguous`** — anything else: unresolvable version window, unreachable history, partial ownership, conflicting signals. Ambiguous is treated as local and low-confidence; nothing is escalated upstream from it.
|
|
42
|
+
|
|
43
|
+
## The three signals (evaluate in order)
|
|
44
|
+
|
|
45
|
+
### Signal 1 — the defect lives in a Lisa-managed surface
|
|
46
|
+
|
|
47
|
+
Resolve ownership of each implicated file the way doctor's config audit does:
|
|
48
|
+
|
|
49
|
+
- **Copy-overwrite / managed**: the path is populated by `lisa apply` from a stack template (`typescript/`, `expo/`, `nestjs/`, `cdk/`, `harper-fabric/`, `rails/` copy-overwrite trees), is a plugin-distributed rule/skill/hook/agent/command surface, carries Lisa governance markers or a Lisa version stamp, or is governed by `package.lisa.json` `force` keys. A defect in the shipped content of such a surface is **Lisa's fault** — any local edit would be overwritten on the next `lisa apply`.
|
|
50
|
+
- **Create-only**: the local copy is project-owned after scaffolding, but if the defect is faithful to the template as shipped, the template is still Lisa's fault (every newly scaffolded repo inherits it). Cite the template origin, and note the local copy will not be overwritten.
|
|
51
|
+
- **Project-owned**: not from a Lisa template and not Lisa-managed — signal 1 is negative; continue.
|
|
52
|
+
|
|
53
|
+
If the project locally modified a managed surface and the defect lives in the local modification, that is project drift, not a Lisa defect — signal 1 is negative for `lisa` and positive evidence for `project`.
|
|
54
|
+
|
|
55
|
+
### Signal 2 — a shipped Lisa rule/skill/hook drove the wrong behavior
|
|
56
|
+
|
|
57
|
+
Read the shipped artifact named in `surface_in_play` (the plugin-distributed rule, skill, hook, agent, or CI workflow as Lisa ships it — not a local fork). If following its instructions or configuration as shipped produces the observed defect, the verdict is `lisa`: cite the artifact path and the specific shipped text or configuration that drove the behavior. If the artifact is shipped correct and was misapplied locally, that is evidence for `project`.
|
|
58
|
+
|
|
59
|
+
### Signal 3 — the upstream-history window shows Lisa changed the relevant contract
|
|
60
|
+
|
|
61
|
+
This is the #1494 doctor procedure, unchanged in behavior — here it is the third signal, not the trigger. Whenever signals 1-2 are not conclusive on their own — and always before a definitive `project` verdict — pull Lisa's own git history for the version window and read what actually changed:
|
|
62
|
+
|
|
63
|
+
1. **Resolve the version window.** Use the caller-supplied `installed_version`/`latest_version` when present; otherwise determine the project's installed Lisa version (the `@codyswann/lisa` entry in `package.json`/lockfile, or the plugin version stamp on the active runtime) and the latest published version (`npm view @codyswann/lisa version`, or the update check's cached result). An unresolvable window makes this signal inconclusive — it can support `ambiguous`, never `lisa`.
|
|
64
|
+
2. **Pull the upstream history for that window** (read-only; no clone required when `gh` is available):
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
gh api "repos/CodySwannGT/lisa/compare/v<installed>...v<latest>" \
|
|
68
|
+
--paginate --slurp |
|
|
69
|
+
jq '{total_commits: .[0].total_commits, files: [.[0].files[]?.filename], commits: [.[].commits[]? | {sha, subject: (.commit.message | split("\n")[0]), api_url: .url, html_url, parents: [.parents[]?.sha]}]}'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`--paginate` fetches every page of commits, and `--slurp` gathers those pages into a single
|
|
73
|
+
array before the external `jq` projection runs. GitHub CLI does not permit its built-in `--jq`
|
|
74
|
+
flag together with `--slurp`, so keep the pipe as shown; without `--slurp`, paginated responses
|
|
75
|
+
are not one merged input. `total_commits` and `files` only need the first page
|
|
76
|
+
(files are capped at 300 and not repeated on later pages); `commits` flattens across all pages
|
|
77
|
+
while retaining each commit SHA and URLs needed for accurate follow-up.
|
|
78
|
+
|
|
79
|
+
After path-scoping identifies a candidate commit, fetch its targeted file-level diff context by
|
|
80
|
+
the retained SHA rather than attributing from the subject alone:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
gh api "repos/CodySwannGT/lisa/commits/<sha>" \
|
|
84
|
+
--jq '{sha, files: [.files[]? | select(.filename == "<relevant-path>" or (.filename | startswith("<relevant-prefix>/"))) | {filename, status, additions, deletions, changes, patch}]}'
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Preserve the returned filename, status, counts, and available patch with the SHA in the
|
|
88
|
+
upstream-history projection. A missing or truncated `patch` is not proof of no relevant change;
|
|
89
|
+
use the compare diff fallback below or downgrade the attribution to `ambiguous` when
|
|
90
|
+
commit-level context cannot be established.
|
|
91
|
+
|
|
92
|
+
The compare endpoint paginates commits (250 without `--paginate`) and only lists changed files
|
|
93
|
+
on the first page, capped at 300 total — a large version window can silently drop commits or
|
|
94
|
+
files. If `total_commits` or the file count looks truncated, re-run with the
|
|
95
|
+
`application/vnd.github.diff` accept header (`gh api ... -H "Accept: application/vnd.github.diff"`)
|
|
96
|
+
to pull the full patch text, or fall back to the bounded-fetch `git log` below. When completeness
|
|
97
|
+
still can't be established, say so in the evidence and return `ambiguous` rather than attributing
|
|
98
|
+
with unverified confidence.
|
|
99
|
+
|
|
100
|
+
Fallbacks, in order: `gh api repos/CodySwannGT/lisa/commits?path=<template-path>` for a
|
|
101
|
+
path-scoped view — note this endpoint has no way to bound results to the `v<installed>..v<latest>`
|
|
102
|
+
window, so treat its output as best-effort context only, not authoritative attribution; a
|
|
103
|
+
finite-depth, explicit-tag fetch, which is bounded to the two version refs and should be preferred
|
|
104
|
+
for definitive attribution; or the local marketplace/plugin cache checkout when the runtime has
|
|
105
|
+
one. For the fetch fallback, use a temporary directory and a fixed history ceiling:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
lisa_history_dir="$(mktemp -d)"
|
|
109
|
+
git init "$lisa_history_dir"
|
|
110
|
+
git -C "$lisa_history_dir" remote add origin https://github.com/CodySwannGT/lisa.git
|
|
111
|
+
git -C "$lisa_history_dir" fetch --no-tags --filter=blob:none --depth=256 origin \
|
|
112
|
+
refs/tags/v<installed>:refs/tags/v<installed> \
|
|
113
|
+
refs/tags/v<latest>:refs/tags/v<latest>
|
|
114
|
+
git -C "$lisa_history_dir" merge-base --is-ancestor v<installed> v<latest>
|
|
115
|
+
git -C "$lisa_history_dir" log --format='%H%x09%s' v<installed>..v<latest> -- <paths>
|
|
116
|
+
git -C "$lisa_history_dir" show --format=fuller --stat --patch <relevant-sha> -- <paths>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The explicit tag refspecs, `--no-tags`, and finite `--depth=256` make this fetch bounded. Do not
|
|
120
|
+
silently deepen beyond that ceiling. If `merge-base --is-ancestor` fails, the shallow window is
|
|
121
|
+
incomplete (or the tags are not on one ancestry line): do not make definitive attribution from
|
|
122
|
+
it. If none of the bounded sources are reachable, or only the unbounded path-scoped fallback is
|
|
123
|
+
reachable, report the gap in the evidence and return `ambiguous` — never fail the caller's flow
|
|
124
|
+
because history was unavailable or incomplete, and never let a degraded history produce `lisa`.
|
|
125
|
+
3. **Scope the reading to what the failure touches.** Filter the commit list to the paths that
|
|
126
|
+
generate the failing surface: the detected stacks' template dirs (`typescript/`, `expo/`, …),
|
|
127
|
+
`plugins/src/base/` for skills/hooks/rules, `scripts/` for governance scripts, and the shipped
|
|
128
|
+
config factories (`src/configs/`). A failure about a lint rule reads the lint-config commits,
|
|
129
|
+
not the whole log.
|
|
130
|
+
4. **Attribute.** When the upstream history shows Lisa changed the relevant contract (a tightened
|
|
131
|
+
lint rule, a renamed check context, a new required config key), the verdict is `lisa` — cite the
|
|
132
|
+
commit subject/version. When history shows no relevant upstream change and signals 1-2 are also
|
|
133
|
+
negative, the project drifted — the verdict is `project`, citing the absence of a relevant
|
|
134
|
+
upstream change as the evidence.
|
|
135
|
+
|
|
136
|
+
## Rules
|
|
137
|
+
|
|
138
|
+
- **Read-only.** This skill reads the project and Lisa's repository; it never writes to either, never files issues, and never remediates. Filing the upstream ticket on a `lisa` verdict is the caller's flow (`lisa-persist-learning`, `handoff-upstream` disposition); doctor maps verdicts into its findings; remediation stays with whoever called.
|
|
139
|
+
- **Never block.** Attribution failure, missing tooling (`gh` unavailable), or degraded history degrades to `ambiguous` with the gap named in the evidence — it never raises an error that stops the caller's build or audit.
|
|
140
|
+
- **Every verdict cites its evidence.** An attribution without a named signal and concrete citation is invalid — return `ambiguous` instead. Evidence destined for upstream surfaces quotes ONLY Lisa-owned surface text (never host env values, tokens/credentials, PII, or proprietary host code — link the host issue instead of quoting it); the binding redaction procedure lives in `lisa-persist-learning`'s `handoff-upstream` step.
|
|
141
|
+
- **Ambiguous never escalates.** `ambiguous` is a terminal local verdict: low-confidence, no upstream filing, no durable local rule derived from it.
|
|
142
|
+
- **Headless-safe and idempotent**: no prompts, no side effects, same event in → same verdict out.
|
|
@@ -296,88 +296,39 @@ without turning the base doctor into a second `lisa-wiki-doctor`.
|
|
|
296
296
|
A failing or warning check has two possible causes: the project drifted, or **Lisa itself changed
|
|
297
297
|
upstream** since this project last updated. Doctor must distinguish them instead of blaming the
|
|
298
298
|
project by default. Whenever findings need explanation — and always before proposing repairs —
|
|
299
|
-
|
|
299
|
+
attribute the finding with real evidence.
|
|
300
|
+
|
|
301
|
+
The attribution procedure itself is shared: it lives in the `lisa-attribute-failure` skill
|
|
302
|
+
(extracted from this section so any failure event can be attributed, not only doctor findings).
|
|
303
|
+
Doctor invokes it per finding:
|
|
300
304
|
|
|
301
305
|
1. **Resolve the version window.** Determine the project's installed Lisa version (the
|
|
302
306
|
`@codyswann/lisa` entry in `package.json`/lockfile, or the plugin version stamp on the active
|
|
303
307
|
runtime) and the latest published version (`npm view @codyswann/lisa version`, or the update
|
|
304
308
|
check's cached result).
|
|
305
|
-
2. **
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
Preserve the returned filename, status, counts, and available patch with the SHA in the
|
|
330
|
-
upstream-history projection. A missing or truncated `patch` is not proof of no relevant change;
|
|
331
|
-
use the compare diff fallback below or downgrade attribution to `WARN` when commit-level context
|
|
332
|
-
cannot be established.
|
|
333
|
-
|
|
334
|
-
The compare endpoint paginates commits (250 without `--paginate`) and only lists changed files
|
|
335
|
-
on the first page, capped at 300 total — a large version window can silently drop commits or
|
|
336
|
-
files. If `total_commits` or the file count looks truncated, re-run with the
|
|
337
|
-
`application/vnd.github.diff` accept header (`gh api ... -H "Accept: application/vnd.github.diff"`)
|
|
338
|
-
to pull the full patch text, or fall back to the bounded-fetch `git log` below. When completeness
|
|
339
|
-
still can't be established, say so in the finding and mark it `WARN` rather than attributing
|
|
340
|
-
drift with unverified confidence.
|
|
341
|
-
|
|
342
|
-
Fallbacks, in order: `gh api repos/CodySwannGT/lisa/commits?path=<template-path>` for a
|
|
343
|
-
path-scoped view — note this endpoint has no way to bound results to the `v<installed>..v<latest>`
|
|
344
|
-
window, so treat its output as best-effort context only, not authoritative attribution; a
|
|
345
|
-
finite-depth, explicit-tag fetch, which is bounded to the two version refs and should be preferred
|
|
346
|
-
for definitive attribution; or the local marketplace/plugin cache checkout when the runtime has
|
|
347
|
-
one. For the fetch fallback, use a temporary directory and a fixed history ceiling:
|
|
348
|
-
|
|
349
|
-
```bash
|
|
350
|
-
lisa_history_dir="$(mktemp -d)"
|
|
351
|
-
git init "$lisa_history_dir"
|
|
352
|
-
git -C "$lisa_history_dir" remote add origin https://github.com/CodySwannGT/lisa.git
|
|
353
|
-
git -C "$lisa_history_dir" fetch --no-tags --filter=blob:none --depth=256 origin \
|
|
354
|
-
refs/tags/v<installed>:refs/tags/v<installed> \
|
|
355
|
-
refs/tags/v<latest>:refs/tags/v<latest>
|
|
356
|
-
git -C "$lisa_history_dir" merge-base --is-ancestor v<installed> v<latest>
|
|
357
|
-
git -C "$lisa_history_dir" log --format='%H%x09%s' v<installed>..v<latest> -- <paths>
|
|
358
|
-
git -C "$lisa_history_dir" show --format=fuller --stat --patch <relevant-sha> -- <paths>
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
The explicit tag refspecs, `--no-tags`, and finite `--depth=256` make this fetch bounded. Do not
|
|
362
|
-
silently deepen beyond that ceiling. If `merge-base --is-ancestor` fails, the shallow window is
|
|
363
|
-
incomplete (or the tags are not on one ancestry line): do not make definitive attribution from
|
|
364
|
-
it. If none of the bounded sources are reachable, or only the unbounded path-scoped fallback is
|
|
365
|
-
reachable, report the gap as a `WARN`-level observability note — never fail the audit because
|
|
366
|
-
history was unavailable or incomplete.
|
|
367
|
-
3. **Scope the reading to what the finding touches.** Filter the commit list to the paths that
|
|
368
|
-
generate the failing surface: the detected stacks' template dirs (`typescript/`, `expo/`, …),
|
|
369
|
-
`plugins/src/base/` for skills/hooks/rules, `scripts/` for governance scripts, and the shipped
|
|
370
|
-
config factories (`src/configs/`). A finding about a lint rule failure reads the lint-config
|
|
371
|
-
commits, not the whole log.
|
|
372
|
-
4. **Attribute the finding.** When the upstream history shows Lisa changed the contract (a
|
|
373
|
-
tightened lint rule, a renamed check context, a new required config key), say so in `Observed:`
|
|
374
|
-
with the commit subject/version, and let `Remediation:` point at the sanctioned adoption path
|
|
375
|
-
(e.g. `lisa update` + re-apply, a documented config opt-out) rather than hand-editing managed
|
|
376
|
-
files. When history shows no relevant upstream change, the project drifted — remediate on the
|
|
377
|
-
project side.
|
|
378
|
-
|
|
379
|
-
This history pull is part of doctor's read-only contract: it reads Lisa's repository, never writes
|
|
380
|
-
to it, and repair suggestions stay suggestions.
|
|
309
|
+
2. **Invoke `lisa-attribute-failure`** with the finding as the failure event: the defect
|
|
310
|
+
description, the implicated template/config paths, the rule/skill/hook in play, and the
|
|
311
|
+
resolved version window. The skill evaluates its three ordered signals — Lisa-managed surface
|
|
312
|
+
ownership, shipped rule/skill/hook behavior, and the upstream change-history window (the
|
|
313
|
+
version-window compare procedure formerly documented inline here, preserved verbatim in that
|
|
314
|
+
skill: pagination/`--slurp` handling, targeted per-SHA diff context, truncation caveats, and
|
|
315
|
+
the bounded explicit-tag fetch fallback) — and returns `lisa` | `project` | `ambiguous` plus
|
|
316
|
+
the cited evidence.
|
|
317
|
+
3. **Map the verdict into the finding.**
|
|
318
|
+
- `lisa` — Lisa changed the contract (a tightened lint rule, a renamed check context, a new
|
|
319
|
+
required config key) or shipped the defective surface. Say so in `Observed:` with the cited
|
|
320
|
+
evidence (commit subject/version or managed-surface proof), and let `Remediation:` point at
|
|
321
|
+
the sanctioned adoption path (e.g. `lisa update` + re-apply, a documented config opt-out)
|
|
322
|
+
rather than hand-editing managed files.
|
|
323
|
+
- `project` — history shows no relevant upstream change and the surface is project-owned: the
|
|
324
|
+
project drifted, so remediate on the project side.
|
|
325
|
+
- `ambiguous` — history was unavailable, truncated, or otherwise inconclusive: report the gap
|
|
326
|
+
as a `WARN`-level observability note with the evidence gap named — never fail the audit
|
|
327
|
+
because history was unavailable or incomplete, and never attribute drift with unverified
|
|
328
|
+
confidence.
|
|
329
|
+
|
|
330
|
+
This diagnosis remains part of doctor's read-only contract: the attribution skill reads Lisa's
|
|
331
|
+
repository, never writes to it, and repair suggestions stay suggestions.
|
|
381
332
|
|
|
382
333
|
## Output contract
|
|
383
334
|
|