@codyswann/lisa 2.349.1 → 2.350.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/cli/doctor-learnings-ledger.d.ts +23 -0
- package/dist/cli/doctor-learnings-ledger.d.ts.map +1 -0
- package/dist/cli/doctor-learnings-ledger.js +67 -0
- package/dist/cli/doctor-learnings-ledger.js.map +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +6 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/core/learnings-file-safety.d.ts +12 -1
- package/dist/core/learnings-file-safety.d.ts.map +1 -1
- package/dist/core/learnings-file-safety.js +20 -1
- package/dist/core/learnings-file-safety.js.map +1 -1
- package/dist/core/learnings-location.d.ts +40 -0
- package/dist/core/learnings-location.d.ts.map +1 -0
- package/dist/core/learnings-location.js +89 -0
- package/dist/core/learnings-location.js.map +1 -0
- package/dist/core/learnings-stray-ledger.d.ts +24 -0
- package/dist/core/learnings-stray-ledger.d.ts.map +1 -0
- package/dist/core/learnings-stray-ledger.js +155 -0
- package/dist/core/learnings-stray-ledger.js.map +1 -0
- package/dist/core/project-config.d.ts +1 -13
- package/dist/core/project-config.d.ts.map +1 -1
- package/dist/core/project-config.js +5 -53
- package/dist/core/project-config.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +6 -0
- package/dist/core/upstream-evidence-manifest.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-agy/plugin.json +1 -1
- 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-cursor/.claude-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-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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Name of the ledger check as doctor reports it. */
|
|
2
|
+
export declare const LEARNINGS_LEDGER_CHECK_NAME = "Single learnings ledger?";
|
|
3
|
+
/** Shape of one doctor check result (structurally identical to doctor's). */
|
|
4
|
+
interface LedgerCheckResult {
|
|
5
|
+
name: string;
|
|
6
|
+
status: "ok" | "warn" | "fail";
|
|
7
|
+
detail: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Report whether a project has a second learnings ledger outside its
|
|
11
|
+
* configured path, with the repair steps spelled out.
|
|
12
|
+
*
|
|
13
|
+
* An empty stray warns: it is residue with nothing to lose, and failing on it
|
|
14
|
+
* would redden every project that carries a leftover placeholder. A stray with
|
|
15
|
+
* entries — or one whose entries cannot be counted — fails, because content is
|
|
16
|
+
* stranded outside the ledger every Lisa flow reads and one bad merge deletes
|
|
17
|
+
* it with no error.
|
|
18
|
+
* @param targetPath - Project path to inspect
|
|
19
|
+
* @returns Doctor check result
|
|
20
|
+
*/
|
|
21
|
+
export declare function checkLearningsLedger(targetPath: string): Promise<LedgerCheckResult>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=doctor-learnings-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-learnings-ledger.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-learnings-ledger.ts"],"names":[],"mappings":"AAiBA,qDAAqD;AACrD,eAAO,MAAM,2BAA2B,6BAA6B,CAAC;AAEtE,6EAA6E;AAC7E,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB;AAeD;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,iBAAiB,CAAC,CA8B5B"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `lisa doctor` check: is there exactly ONE project-learnings ledger?
|
|
3
|
+
*
|
|
4
|
+
* The ledger used to be scaffolded into `.claude/rules/`. Projects upgraded
|
|
5
|
+
* across the move to the cold `.lisa/` path can end up with two files, and
|
|
6
|
+
* nothing ever noticed: one fleet project kept capturing into the rules-tree
|
|
7
|
+
* copy until a merge resolved it to empty and destroyed 19 entries, in silence.
|
|
8
|
+
* The write path now refuses an eager-tree ledger outright; this check covers
|
|
9
|
+
* the files that already exist, because a guard added today cannot un-strand
|
|
10
|
+
* yesterday's captures.
|
|
11
|
+
* @module cli/doctor-learnings-ledger
|
|
12
|
+
*/
|
|
13
|
+
import { findStrayLearningsLedgers, } from "../core/learnings-stray-ledger.js";
|
|
14
|
+
/** Name of the ledger check as doctor reports it. */
|
|
15
|
+
export const LEARNINGS_LEDGER_CHECK_NAME = "Single learnings ledger?";
|
|
16
|
+
/**
|
|
17
|
+
* Describe one stray in a single operator-readable clause.
|
|
18
|
+
* @param stray - Stray ledger found by the scan
|
|
19
|
+
* @returns Path plus what is stranded in it
|
|
20
|
+
*/
|
|
21
|
+
function describeStray(stray) {
|
|
22
|
+
if (stray.entryCount === undefined) {
|
|
23
|
+
return `${stray.path} (unreadable format — entry count unknown)`;
|
|
24
|
+
}
|
|
25
|
+
const plural = stray.entryCount === 1 ? "entry" : "entries";
|
|
26
|
+
return `${stray.path} (${stray.entryCount} ${plural})`;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Report whether a project has a second learnings ledger outside its
|
|
30
|
+
* configured path, with the repair steps spelled out.
|
|
31
|
+
*
|
|
32
|
+
* An empty stray warns: it is residue with nothing to lose, and failing on it
|
|
33
|
+
* would redden every project that carries a leftover placeholder. A stray with
|
|
34
|
+
* entries — or one whose entries cannot be counted — fails, because content is
|
|
35
|
+
* stranded outside the ledger every Lisa flow reads and one bad merge deletes
|
|
36
|
+
* it with no error.
|
|
37
|
+
* @param targetPath - Project path to inspect
|
|
38
|
+
* @returns Doctor check result
|
|
39
|
+
*/
|
|
40
|
+
export async function checkLearningsLedger(targetPath) {
|
|
41
|
+
try {
|
|
42
|
+
const { canonicalFile, strays } = await findStrayLearningsLedgers(targetPath);
|
|
43
|
+
if (strays.length === 0) {
|
|
44
|
+
return {
|
|
45
|
+
name: LEARNINGS_LEDGER_CHECK_NAME,
|
|
46
|
+
status: "ok",
|
|
47
|
+
detail: `One ledger only (${canonicalFile})`,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const atRisk = strays.some(stray => stray.entryCount !== 0);
|
|
51
|
+
return {
|
|
52
|
+
name: LEARNINGS_LEDGER_CHECK_NAME,
|
|
53
|
+
status: atRisk ? "fail" : "warn",
|
|
54
|
+
detail: `Found ${strays.length} learnings ledger(s) outside the configured path: ${strays
|
|
55
|
+
.map(describeStray)
|
|
56
|
+
.join("; ")}. The canonical ledger is ${canonicalFile} — copy any entries worth keeping into it, then delete the stray file(s). A ledger inside an auto-loaded rules tree is also read raw into every agent session, which is what the cold ${canonicalFile} location exists to avoid.`,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
return {
|
|
61
|
+
name: LEARNINGS_LEDGER_CHECK_NAME,
|
|
62
|
+
status: "fail",
|
|
63
|
+
detail: `Could not inspect learnings ledgers: ${error instanceof Error ? error.message : String(error)}`,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=doctor-learnings-ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-learnings-ledger.js","sourceRoot":"","sources":["../../src/cli/doctor-learnings-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,yBAAyB,GAE1B,MAAM,mCAAmC,CAAC;AAE3C,qDAAqD;AACrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,0BAA0B,CAAC;AAStE;;;;GAIG;AACH,SAAS,aAAa,CAAC,KAA2B;IAChD,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,GAAG,KAAK,CAAC,IAAI,4CAA4C,CAAC;IACnE,CAAC;IACD,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5D,OAAO,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,UAAU,IAAI,MAAM,GAAG,CAAC;AACzD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,UAAkB;IAElB,IAAI,CAAC;QACH,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAC7B,MAAM,yBAAyB,CAAC,UAAU,CAAC,CAAC;QAC9C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO;gBACL,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,IAAI;gBACZ,MAAM,EAAE,oBAAoB,aAAa,GAAG;aAC7C,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC;QAC5D,OAAO;YACL,IAAI,EAAE,2BAA2B;YACjC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;YAChC,MAAM,EAAE,SAAS,MAAM,CAAC,MAAM,qDAAqD,MAAM;iBACtF,GAAG,CAAC,aAAa,CAAC;iBAClB,IAAI,CACH,IAAI,CACL,6BAA6B,aAAa,yLAAyL,aAAa,4BAA4B;SAChR,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,IAAI,EAAE,2BAA2B;YACjC,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,wCACN,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE;SACH,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/cli/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAUnE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,mDAAmD;AACnD,KAAK,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAO3C,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,sCAAsC;AACtC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED,wCAAwC;AACxC,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,KAAK,CAAC;IACxB,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,mBAAmB,EAAE,OAAO,mBAAmB,CAAC;CACjD;AAaD;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,EAChD,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,WAAW,CAAC,CAyBtB;AA4MD;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,aAAa,EACtB,YAAY,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC7C,OAAO,CAAC,YAAY,CAAC,CA4CvB"}
|
package/dist/cli/doctor.js
CHANGED
|
@@ -8,6 +8,7 @@ import { probeKaneReadiness } from "../core/kane-cli.js";
|
|
|
8
8
|
import { probeSonarReadiness } from "../core/sonar-integration.js";
|
|
9
9
|
import { createDetectorRegistry } from "../detection/index.js";
|
|
10
10
|
import { checkKaneProvider } from "./doctor-kane.js";
|
|
11
|
+
import { checkLearningsLedger } from "./doctor-learnings-ledger.js";
|
|
11
12
|
import { checkSonarProvider } from "./doctor-sonar.js";
|
|
12
13
|
import { checkLegacyCodexOverlay } from "./doctor-legacy-overlay.js";
|
|
13
14
|
import { checkLegacyMonitorThresholds } from "./doctor-monitor-thresholds.js";
|
|
@@ -254,6 +255,11 @@ export async function runDoctor(targetPath, options, dependencies = {}) {
|
|
|
254
255
|
await checkLegacyMonitorThresholds(resolvedTarget),
|
|
255
256
|
await checkProjectType(resolvedTarget),
|
|
256
257
|
await checkInstructionFiles(resolvedTarget),
|
|
258
|
+
// Runs AFTER the instruction-files check because that check performs the
|
|
259
|
+
// legacy ledger relocation. A project whose ledger merely needs moving is
|
|
260
|
+
// repaired first and passes here; only a genuine second ledger survives to
|
|
261
|
+
// be reported.
|
|
262
|
+
await checkLearningsLedger(resolvedTarget),
|
|
257
263
|
await checkWorkerEpoch(resolvedTarget),
|
|
258
264
|
checkLegacyCodexOverlay(resolvedTarget),
|
|
259
265
|
await checkStarterHealth(deps, options.offline === true),
|
package/dist/cli/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACn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AAC,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Resolve the configured target without permitting project-root escape
|
|
2
|
+
* Resolve the configured target without permitting project-root escape, and
|
|
3
|
+
* without permitting an auto-loaded rules tree.
|
|
4
|
+
*
|
|
5
|
+
* The eager-tree arm is the write boundary's own guard, deliberately duplicated
|
|
6
|
+
* from `learnings.file` config validation rather than delegated to it. Lisa
|
|
7
|
+
* 2.232.0 scaffolded the ledger into `.claude/rules/` and every downstream
|
|
8
|
+
* project happily wrote there: the raw ledger entered eager context in every
|
|
9
|
+
* session, and a merge-hostile file sat where nothing watched it until 19
|
|
10
|
+
* captured learnings vanished in a silent merge. Every writer — ledger,
|
|
11
|
+
* overflow, apply's relocation — funnels through this function, so failing
|
|
12
|
+
* loudly HERE means no future caller can reintroduce that placement by
|
|
13
|
+
* synthesizing a path that never passed through config validation.
|
|
3
14
|
* @param projectRoot - Host project root
|
|
4
15
|
* @param relativeFile - Configured project-relative file
|
|
5
16
|
* @returns Resolved root and target paths
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learnings-file-safety.d.ts","sourceRoot":"","sources":["../../src/core/learnings-file-safety.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"learnings-file-safety.d.ts","sourceRoot":"","sources":["../../src/core/learnings-file-safety.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAkBpD;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAyC7B;AAkBD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAYf"}
|
|
@@ -4,8 +4,20 @@ import { lstat, open, realpath } from "node:fs/promises";
|
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
import { LEARNINGS_CONTRACT } from "./learnings-contract.js";
|
|
6
6
|
import { conflictMarkerError, findConflictMarkerInBytes, } from "./learnings-document.js";
|
|
7
|
+
import { eagerContextRejection, findEagerContextSurface, } from "./learnings-location.js";
|
|
7
8
|
/**
|
|
8
|
-
* Resolve the configured target without permitting project-root escape
|
|
9
|
+
* Resolve the configured target without permitting project-root escape, and
|
|
10
|
+
* without permitting an auto-loaded rules tree.
|
|
11
|
+
*
|
|
12
|
+
* The eager-tree arm is the write boundary's own guard, deliberately duplicated
|
|
13
|
+
* from `learnings.file` config validation rather than delegated to it. Lisa
|
|
14
|
+
* 2.232.0 scaffolded the ledger into `.claude/rules/` and every downstream
|
|
15
|
+
* project happily wrote there: the raw ledger entered eager context in every
|
|
16
|
+
* session, and a merge-hostile file sat where nothing watched it until 19
|
|
17
|
+
* captured learnings vanished in a silent merge. Every writer — ledger,
|
|
18
|
+
* overflow, apply's relocation — funnels through this function, so failing
|
|
19
|
+
* loudly HERE means no future caller can reintroduce that placement by
|
|
20
|
+
* synthesizing a path that never passed through config validation.
|
|
9
21
|
* @param projectRoot - Host project root
|
|
10
22
|
* @param relativeFile - Configured project-relative file
|
|
11
23
|
* @returns Resolved root and target paths
|
|
@@ -16,6 +28,13 @@ export function resolveSafeLearningTarget(projectRoot, relativeFile) {
|
|
|
16
28
|
if (target === root || !target.startsWith(`${root}${path.sep}`)) {
|
|
17
29
|
throw new Error("Unsafe projectRulesFile: learnings path escapes project root");
|
|
18
30
|
}
|
|
31
|
+
// Re-derive the relative path from the RESOLVED target rather than trusting
|
|
32
|
+
// the caller's string: `.lisa/../.claude/rules/x.md` is an eager-tree write
|
|
33
|
+
// that no prefix test on the raw input would catch.
|
|
34
|
+
const surface = findEagerContextSurface(path.relative(root, target));
|
|
35
|
+
if (surface !== undefined) {
|
|
36
|
+
throw new Error(`Refusing to use ${relativeFile} as a learnings ledger: ${eagerContextRejection(surface)}`);
|
|
37
|
+
}
|
|
19
38
|
return { root, target };
|
|
20
39
|
}
|
|
21
40
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learnings-file-safety.js","sourceRoot":"","sources":["../../src/core/learnings-file-safety.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACL,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AAEjC
|
|
1
|
+
{"version":3,"file":"learnings-file-safety.js","sourceRoot":"","sources":["../../src/core/learnings-file-safety.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACL,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,yBAAyB,CACvC,WAAmB,EACnB,YAAoB;IAEpB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,C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Ed,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,MAAM,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1C,IACE,UAAU,KAAK,QAAQ;QACvB,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,EAChD,CAAC;QACD,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,oBAAoB,CAAC,SAAiB;IACnD,IAAI,MAAM,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACvC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Fixed filename for the machine-managed project-learnings ledger. */
|
|
2
|
+
export declare const PROJECT_LEARNINGS_FILENAME = "PROJECT_LEARNINGS.md";
|
|
3
|
+
/**
|
|
4
|
+
* Default location for the machine-managed learnings ledger.
|
|
5
|
+
*
|
|
6
|
+
* The ledger lives beside other machine-managed state under `.lisa/`, NOT in an
|
|
7
|
+
* auto-loaded rules tree. Anything under `.claude/rules/` (and the equivalents
|
|
8
|
+
* other runtimes inject) is read raw into every session — placing the ledger
|
|
9
|
+
* there double-loads it and bypasses the executable contract's budget and
|
|
10
|
+
* validation. `.lisa/` is cold: the ledger is consumed only through the
|
|
11
|
+
* contract's bounded projection.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_PROJECT_LEARNINGS_FILE: string;
|
|
14
|
+
/**
|
|
15
|
+
* Directory prefixes that one or more runtimes inject raw at session start. The
|
|
16
|
+
* learnings ledger must never resolve inside any of them, or the relocation's
|
|
17
|
+
* whole point — keeping the raw file out of eager context — is defeated. Kept
|
|
18
|
+
* conservative and explicit rather than agent-exhaustive; extend it as new
|
|
19
|
+
* eager rule trees are added.
|
|
20
|
+
*/
|
|
21
|
+
export declare const AUTO_LOADED_RULES_DIR_PREFIXES: readonly [".claude/rules", ".cursor/rules", ".github/instructions", ".agents/rules"];
|
|
22
|
+
/**
|
|
23
|
+
* Identify the eager-context surface a project-relative path falls inside, if
|
|
24
|
+
* any. One matcher shared by config validation and the write-time containment
|
|
25
|
+
* check, so "is this path eagerly injected?" can never be answered two
|
|
26
|
+
* different ways by two layers.
|
|
27
|
+
*
|
|
28
|
+
* Accepts platform separators and unnormalized segments — the caller may be
|
|
29
|
+
* handing over a path derived from `path.relative`, not a config literal.
|
|
30
|
+
* @param relativePath - Project-relative candidate path
|
|
31
|
+
* @returns The matched eager surface, or undefined when the path is cold
|
|
32
|
+
*/
|
|
33
|
+
export declare function findEagerContextSurface(relativePath: string): string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Build the shared operator-readable reason a learnings path was rejected.
|
|
36
|
+
* @param surface - The eager surface the path landed in
|
|
37
|
+
* @returns Sentence naming the surface, the full surface list, and the default
|
|
38
|
+
*/
|
|
39
|
+
export declare function eagerContextRejection(surface: string): string;
|
|
40
|
+
//# sourceMappingURL=learnings-location.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learnings-location.d.ts","sourceRoot":"","sources":["../../src/core/learnings-location.ts"],"names":[],"mappings":"AAYA,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AAEjE;;;;;;;;;GASG;AACH,eAAO,MAAM,8BAA8B,QAG1C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,sFAKjC,CAAC;AAkBX;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,GACnB,MAAM,GAAG,SAAS,CAuBpB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAO7D"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the machine-managed learnings ledger may and may not live.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `project-config.ts` so the two layers that must agree —
|
|
5
|
+
* `learnings.file` config validation and the write-time containment check in
|
|
6
|
+
* `learnings-file-safety.ts` — share one definition of "eagerly injected"
|
|
7
|
+
* without the second importing the whole config module (and without pushing
|
|
8
|
+
* `project-config.ts` past its 300-line cap).
|
|
9
|
+
* @module core/learnings-location
|
|
10
|
+
*/
|
|
11
|
+
import * as path from "node:path";
|
|
12
|
+
/** Fixed filename for the machine-managed project-learnings ledger. */
|
|
13
|
+
export const PROJECT_LEARNINGS_FILENAME = "PROJECT_LEARNINGS.md";
|
|
14
|
+
/**
|
|
15
|
+
* Default location for the machine-managed learnings ledger.
|
|
16
|
+
*
|
|
17
|
+
* The ledger lives beside other machine-managed state under `.lisa/`, NOT in an
|
|
18
|
+
* auto-loaded rules tree. Anything under `.claude/rules/` (and the equivalents
|
|
19
|
+
* other runtimes inject) is read raw into every session — placing the ledger
|
|
20
|
+
* there double-loads it and bypasses the executable contract's budget and
|
|
21
|
+
* validation. `.lisa/` is cold: the ledger is consumed only through the
|
|
22
|
+
* contract's bounded projection.
|
|
23
|
+
*/
|
|
24
|
+
export const DEFAULT_PROJECT_LEARNINGS_FILE = path.posix.join(".lisa", PROJECT_LEARNINGS_FILENAME);
|
|
25
|
+
/**
|
|
26
|
+
* Directory prefixes that one or more runtimes inject raw at session start. The
|
|
27
|
+
* learnings ledger must never resolve inside any of them, or the relocation's
|
|
28
|
+
* whole point — keeping the raw file out of eager context — is defeated. Kept
|
|
29
|
+
* conservative and explicit rather than agent-exhaustive; extend it as new
|
|
30
|
+
* eager rule trees are added.
|
|
31
|
+
*/
|
|
32
|
+
export const AUTO_LOADED_RULES_DIR_PREFIXES = [
|
|
33
|
+
".claude/rules",
|
|
34
|
+
".cursor/rules",
|
|
35
|
+
".github/instructions",
|
|
36
|
+
".agents/rules",
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* Repo-root instruction files that runtimes auto-load whole at session start
|
|
40
|
+
* (AGENTS.md for Codex/Cursor/Copilot/agy/OpenCode; CLAUDE.md for Claude). A
|
|
41
|
+
* `learnings.file` override must never resolve to one of these, or the ledger
|
|
42
|
+
* would again be injected raw.
|
|
43
|
+
*/
|
|
44
|
+
const ROOT_EAGER_INSTRUCTION_FILES = ["AGENTS.md", "CLAUDE.md"];
|
|
45
|
+
/**
|
|
46
|
+
* Non-root instruction files the generators maintain and runtimes auto-load
|
|
47
|
+
* (Copilot reads `.github/copilot-instructions.md`). Matched by exact path.
|
|
48
|
+
*/
|
|
49
|
+
const EAGER_INSTRUCTION_FILE_PATHS = [
|
|
50
|
+
".github/copilot-instructions.md",
|
|
51
|
+
];
|
|
52
|
+
/**
|
|
53
|
+
* Identify the eager-context surface a project-relative path falls inside, if
|
|
54
|
+
* any. One matcher shared by config validation and the write-time containment
|
|
55
|
+
* check, so "is this path eagerly injected?" can never be answered two
|
|
56
|
+
* different ways by two layers.
|
|
57
|
+
*
|
|
58
|
+
* Accepts platform separators and unnormalized segments — the caller may be
|
|
59
|
+
* handing over a path derived from `path.relative`, not a config literal.
|
|
60
|
+
* @param relativePath - Project-relative candidate path
|
|
61
|
+
* @returns The matched eager surface, or undefined when the path is cold
|
|
62
|
+
*/
|
|
63
|
+
export function findEagerContextSurface(relativePath) {
|
|
64
|
+
const normalized = path.posix.normalize(relativePath.split(path.sep).join("/"));
|
|
65
|
+
const lowered = normalized.toLowerCase();
|
|
66
|
+
const treePrefix = AUTO_LOADED_RULES_DIR_PREFIXES.find(prefix => normalized === prefix || normalized.startsWith(`${prefix}/`));
|
|
67
|
+
if (treePrefix !== undefined) {
|
|
68
|
+
return treePrefix;
|
|
69
|
+
}
|
|
70
|
+
const rootFile = path.posix.dirname(normalized) === "."
|
|
71
|
+
? ROOT_EAGER_INSTRUCTION_FILES.find(name => name.toLowerCase() === lowered)
|
|
72
|
+
: undefined;
|
|
73
|
+
return (rootFile ??
|
|
74
|
+
EAGER_INSTRUCTION_FILE_PATHS.find(filePath => filePath.toLowerCase() === lowered));
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Build the shared operator-readable reason a learnings path was rejected.
|
|
78
|
+
* @param surface - The eager surface the path landed in
|
|
79
|
+
* @returns Sentence naming the surface, the full surface list, and the default
|
|
80
|
+
*/
|
|
81
|
+
export function eagerContextRejection(surface) {
|
|
82
|
+
const surfaces = [
|
|
83
|
+
...AUTO_LOADED_RULES_DIR_PREFIXES,
|
|
84
|
+
...ROOT_EAGER_INSTRUCTION_FILES,
|
|
85
|
+
...EAGER_INSTRUCTION_FILE_PATHS,
|
|
86
|
+
].join(", ");
|
|
87
|
+
return `the ledger must not live in an auto-loaded rules tree or instruction file — this one resolves inside ${surface} (auto-loaded surfaces: ${surfaces}); the default ${DEFAULT_PROJECT_LEARNINGS_FILE} is the recommended location`;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=learnings-location.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learnings-location.js","sourceRoot":"","sources":["../../src/core/learnings-location.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,uEAAuE;AACvE,MAAM,CAAC,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAC3D,OAAO,EACP,0BAA0B,CAC3B,CAAC;AA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QACjC,GAAG,4BAA4B;QAC/B,GAAG,4BAA4B;KAChC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACb,OAAO,wGAAwG,OAAO,2BAA2B,QAAQ,kBAAkB,8BAA8B,8BAA8B,CAAC;AAC1O,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** One learnings ledger found somewhere other than the configured path. */
|
|
2
|
+
export interface StrayLearningsLedger {
|
|
3
|
+
/** Project-relative posix path to the stray file. */
|
|
4
|
+
readonly path: string;
|
|
5
|
+
/**
|
|
6
|
+
* Entries currently stranded in the stray, or undefined when the file is not
|
|
7
|
+
* in the contract's format (so a count cannot be claimed honestly).
|
|
8
|
+
*/
|
|
9
|
+
readonly entryCount: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
/** Result of scanning one project for stray ledgers. */
|
|
12
|
+
export interface StrayLearningsScan {
|
|
13
|
+
/** The configured (canonical) ledger path — never reported as a stray. */
|
|
14
|
+
readonly canonicalFile: string;
|
|
15
|
+
/** Every stray found, sorted by path for deterministic reporting. */
|
|
16
|
+
readonly strays: readonly StrayLearningsLedger[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Scan a project for learnings ledgers outside its configured path.
|
|
20
|
+
* @param projectRoot - Absolute path to the host project root
|
|
21
|
+
* @returns The canonical path plus every stray ledger found
|
|
22
|
+
*/
|
|
23
|
+
export declare function findStrayLearningsLedgers(projectRoot: string): Promise<StrayLearningsScan>;
|
|
24
|
+
//# sourceMappingURL=learnings-stray-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learnings-stray-ledger.d.ts","sourceRoot":"","sources":["../../src/core/learnings-stray-ledger.ts"],"names":[],"mappings":"AA8CA,2EAA2E;AAC3E,MAAM,WAAW,oBAAoB;IACnC,qDAAqD;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED,wDAAwD;AACxD,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,qEAAqE;IACrE,QAAQ,CAAC,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAClD;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,kBAAkB,CAAC,CAyB7B"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { lstat, readdir, readFile, stat } from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { AUTO_LOADED_RULES_DIR_PREFIXES, PROJECT_LEARNINGS_FILENAME, readProjectConfig, resolveLegacyProjectLearningsFile, resolveProjectLearningsFile, } from "./project-config.js";
|
|
4
|
+
import { resolveLearningsOverflowFile } from "./learnings-overflow.js";
|
|
5
|
+
/** Ledger-shaped filenames the scan recognizes. */
|
|
6
|
+
const LEDGER_FILENAMES = new Set([
|
|
7
|
+
PROJECT_LEARNINGS_FILENAME,
|
|
8
|
+
resolveLearningsOverflowFile(PROJECT_LEARNINGS_FILENAME),
|
|
9
|
+
]);
|
|
10
|
+
/**
|
|
11
|
+
* How deep to walk inside a rules tree. Rules directories are shallow by
|
|
12
|
+
* convention; a bounded walk keeps doctor's cost fixed and cannot wander into
|
|
13
|
+
* a large vendored tree that happens to sit under a rules directory.
|
|
14
|
+
*/
|
|
15
|
+
const MAX_TREE_DEPTH = 3;
|
|
16
|
+
/** Largest file the scan will read to count entries. */
|
|
17
|
+
const MAX_COUNTABLE_BYTES = 1_000_000;
|
|
18
|
+
/**
|
|
19
|
+
* Scan a project for learnings ledgers outside its configured path.
|
|
20
|
+
* @param projectRoot - Absolute path to the host project root
|
|
21
|
+
* @returns The canonical path plus every stray ledger found
|
|
22
|
+
*/
|
|
23
|
+
export async function findStrayLearningsLedgers(projectRoot) {
|
|
24
|
+
const config = await readProjectConfig(projectRoot);
|
|
25
|
+
const canonicalFile = toPosix(resolveProjectLearningsFile(config));
|
|
26
|
+
const canonical = new Set([
|
|
27
|
+
canonicalFile,
|
|
28
|
+
toPosix(resolveLearningsOverflowFile(canonicalFile)),
|
|
29
|
+
]);
|
|
30
|
+
const found = await Promise.all([
|
|
31
|
+
...AUTO_LOADED_RULES_DIR_PREFIXES.map(prefix => collectLedgersInTree(projectRoot, prefix, MAX_TREE_DEPTH)),
|
|
32
|
+
...flatDirectories(config).map(directory => collectLedgersInTree(projectRoot, directory, 1)),
|
|
33
|
+
]);
|
|
34
|
+
const candidates = [...new Set(found.flat())]
|
|
35
|
+
.filter(relative => !canonical.has(relative))
|
|
36
|
+
.sort((left, right) => left.localeCompare(right));
|
|
37
|
+
const strays = await Promise.all(candidates.map(async (relative) => ({
|
|
38
|
+
path: relative,
|
|
39
|
+
entryCount: await countLedgerEntries(path.join(projectRoot, relative)),
|
|
40
|
+
})));
|
|
41
|
+
return { canonicalFile, strays };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Non-recursive directories a ledger can be stranded in besides a rules tree:
|
|
45
|
+
* the legacy project-rules sibling, the repository root, and the `.lisa/`
|
|
46
|
+
* default (a stray when the project configured a different `learnings.file`).
|
|
47
|
+
* @param config - Parsed project configuration
|
|
48
|
+
* @returns Project-relative directories to scan one level deep
|
|
49
|
+
*/
|
|
50
|
+
function flatDirectories(config) {
|
|
51
|
+
const legacyDirectory = path.posix.dirname(toPosix(resolveLegacyProjectLearningsFile(config)));
|
|
52
|
+
return [...new Set([legacyDirectory, ".", ".lisa"])];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Collect ledger-shaped files inside one directory, bounded by depth.
|
|
56
|
+
*
|
|
57
|
+
* Symlinked directories are not followed: a link is a way out of the project
|
|
58
|
+
* and re-entering it under another name would double-report the same file.
|
|
59
|
+
* @param projectRoot - Absolute project root
|
|
60
|
+
* @param relativeDirectory - Project-relative directory to scan
|
|
61
|
+
* @param depth - Remaining directory levels to descend
|
|
62
|
+
* @returns Project-relative posix paths of ledger-shaped files
|
|
63
|
+
*/
|
|
64
|
+
async function collectLedgersInTree(projectRoot, relativeDirectory, depth) {
|
|
65
|
+
const absolute = path.join(projectRoot, relativeDirectory);
|
|
66
|
+
const entries = await readDirectoryEntries(absolute);
|
|
67
|
+
const nested = await Promise.all(entries.map(async (entry) => {
|
|
68
|
+
const childRelative = path.posix.join(toPosix(relativeDirectory), entry.name);
|
|
69
|
+
if (entry.isFile() && LEDGER_FILENAMES.has(entry.name)) {
|
|
70
|
+
return [normalizeRelative(childRelative)];
|
|
71
|
+
}
|
|
72
|
+
if (entry.isDirectory() && depth > 1) {
|
|
73
|
+
return collectLedgersInTree(projectRoot, childRelative, depth - 1);
|
|
74
|
+
}
|
|
75
|
+
return [];
|
|
76
|
+
}));
|
|
77
|
+
return nested.flat();
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Read one directory, treating an absent or unreadable directory as empty.
|
|
81
|
+
* @param absolute - Absolute directory path
|
|
82
|
+
* @returns Directory entries, or none when the directory cannot be read
|
|
83
|
+
*/
|
|
84
|
+
async function readDirectoryEntries(absolute) {
|
|
85
|
+
try {
|
|
86
|
+
if (!(await lstat(absolute)).isDirectory()) {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
return await readdir(absolute, { withFileTypes: true });
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Count the entries stranded in a stray ledger.
|
|
97
|
+
*
|
|
98
|
+
* Deliberately tolerant: a stray is reported whether or not it parses, so this
|
|
99
|
+
* counts JSONL rows inside the fenced block without revalidating them against
|
|
100
|
+
* the current contract. An older or hand-edited ledger still has recoverable
|
|
101
|
+
* content, and refusing to count it would hide exactly the file most at risk.
|
|
102
|
+
* @param absolute - Absolute path to the stray ledger
|
|
103
|
+
* @returns Row count, or undefined when the file is not in ledger format
|
|
104
|
+
*/
|
|
105
|
+
async function countLedgerEntries(absolute) {
|
|
106
|
+
try {
|
|
107
|
+
if ((await stat(absolute)).size > MAX_COUNTABLE_BYTES) {
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
const content = await readFile(absolute, "utf8");
|
|
111
|
+
const payload = /```jsonl\n([\s\S]*?)```/u.exec(content)?.[1];
|
|
112
|
+
if (payload === undefined) {
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
return payload
|
|
116
|
+
.split("\n")
|
|
117
|
+
.filter(line => line.trim() !== "")
|
|
118
|
+
.filter(line => isJsonObject(line)).length;
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Report whether one JSONL row is a JSON object.
|
|
126
|
+
* @param line - Candidate row
|
|
127
|
+
* @returns True when the row parses to a non-array object
|
|
128
|
+
*/
|
|
129
|
+
function isJsonObject(line) {
|
|
130
|
+
try {
|
|
131
|
+
const parsed = JSON.parse(line);
|
|
132
|
+
return (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed));
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Normalize a project-relative path to a stable posix form.
|
|
140
|
+
* @param relative - Project-relative path in any form
|
|
141
|
+
* @returns Normalized posix path without a leading `./`
|
|
142
|
+
*/
|
|
143
|
+
function normalizeRelative(relative) {
|
|
144
|
+
const normalized = path.posix.normalize(toPosix(relative));
|
|
145
|
+
return normalized.startsWith("./") ? normalized.slice(2) : normalized;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Convert platform separators to posix ones.
|
|
149
|
+
* @param value - Path in platform form
|
|
150
|
+
* @returns Path in posix form
|
|
151
|
+
*/
|
|
152
|
+
function toPosix(value) {
|
|
153
|
+
return value.split(path.sep).join("/");
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=learnings-stray-ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learnings-stray-ledger.js","sourceRoot":"","sources":["../../src/core/learnings-stray-ledger.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,iBAAiB,EACjB,iCAAiC,EACjC,2BAA2B,GAE5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE,mDAAmD;AACnD,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,0BAA0B;IAC1B,4BAA4B,CAAC,0BAA0B,CAAC;CACzD,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,cAAc,GAAG,CAAC,CAAC;AAEzB,wDAAwD;AACxD,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAqBtC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,WAAmB;IAEnB,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACpD,MAAM,aAAa,GAAG,OAAO,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;QACxB,aAAa;QACb,OAAO,CAAC,4BAA4B,CAAC,aAAa,CAAC,CAAC;KACrD,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC9B,GAAG,8BAA8B,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAC7C,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,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;;GAIG;AACH,SAAS,OAAO,CAAC,KAAa;IAC5B,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import { type Harness } from "./config.js";
|
|
2
2
|
import { type VerificationConfig } from "./project-config-kane.js";
|
|
3
|
+
export { AUTO_LOADED_RULES_DIR_PREFIXES, DEFAULT_PROJECT_LEARNINGS_FILE, PROJECT_LEARNINGS_FILENAME, } from "./learnings-location.js";
|
|
3
4
|
export type { BrowserVerificationConfig, KaneBrowserConfig, VerificationConfig, } from "./project-config-kane.js";
|
|
4
5
|
/** Filename of the per-project config, relative to the destination root */
|
|
5
6
|
export declare const PROJECT_CONFIG_FILENAME = ".lisa.config.json";
|
|
6
7
|
/** Default durable project-rules destination used by governance skills. */
|
|
7
8
|
export declare const DEFAULT_PROJECT_RULES_FILE = ".claude/rules/PROJECT_RULES.md";
|
|
8
|
-
/** Fixed filename for the machine-managed project-learnings ledger. */
|
|
9
|
-
export declare const PROJECT_LEARNINGS_FILENAME = "PROJECT_LEARNINGS.md";
|
|
10
|
-
/**
|
|
11
|
-
* Default location for the machine-managed learnings ledger.
|
|
12
|
-
*
|
|
13
|
-
* The ledger lives beside other machine-managed state under `.lisa/`, NOT in an
|
|
14
|
-
* auto-loaded rules tree. Anything under `.claude/rules/` (and the equivalents
|
|
15
|
-
* other runtimes inject) is read raw into every session — placing the ledger
|
|
16
|
-
* there double-loads it and bypasses the executable contract's budget and
|
|
17
|
-
* validation. `.lisa/` is cold: the ledger is consumed only through the
|
|
18
|
-
* contract's bounded projection.
|
|
19
|
-
*/
|
|
20
|
-
export declare const DEFAULT_PROJECT_LEARNINGS_FILE: string;
|
|
21
9
|
/** Optional `learnings` configuration block in `.lisa.config.json`. */
|
|
22
10
|
export interface LearningsConfig {
|
|
23
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-config.d.ts","sourceRoot":"","sources":["../../src/core/project-config.ts"],"names":[],"mappings":"AAYA,OAAO,EAML,KAAK,OAAO,EACb,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"project-config.d.ts","sourceRoot":"","sources":["../../src/core/project-config.ts"],"names":[],"mappings":"AAYA,OAAO,EAML,KAAK,OAAO,EACb,MAAM,aAAa,CAAC;AAOrB,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAElC,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAE3D,2EAA2E;AAC3E,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E,uEAAuE;AACvE,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,yDAAyD;IACzD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,mEAAmE;IACnE,QAAQ,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC;IACrC,8DAA8D;IAC9D,QAAQ,CAAC,YAAY,CAAC,EAAE,kBAAkB,CAAC;CAC5C;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAKrE;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAQzE;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EA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