akm-cli 0.9.16 → 0.9.17-alpha.2
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/CHANGELOG.md +504 -0
- package/dist/assets/prompts/consolidate-system.md +4 -11
- package/dist/assets/prompts/graph-extract-user-prompt.md +5 -5
- package/dist/commands/health/accept-rate.js +6 -0
- package/dist/commands/health/checks.js +54 -0
- package/dist/commands/health/improve-metrics.js +1 -5
- package/dist/commands/health/report-view-model.js +0 -1
- package/dist/commands/health.js +10 -0
- package/dist/commands/improve/consolidate/chunking.js +19 -35
- package/dist/commands/improve/consolidate/merge.js +6 -9
- package/dist/commands/improve/consolidate.js +104 -91
- package/dist/commands/improve/distill/promote-memory.js +40 -2
- package/dist/commands/improve/distill/quality-gate.js +186 -23
- package/dist/commands/improve/distill.js +42 -8
- package/dist/commands/improve/eligibility.js +13 -3
- package/dist/commands/improve/improve-cli.js +32 -9
- package/dist/commands/improve/improve-strategies.js +23 -1
- package/dist/commands/improve/improve.js +121 -84
- package/dist/commands/improve/loop-stages.js +241 -108
- package/dist/commands/improve/preparation.js +50 -17
- package/dist/commands/improve/reflect.js +16 -5
- package/dist/commands/improve/shared.js +0 -10
- package/dist/commands/proposal/drain.js +79 -10
- package/dist/commands/proposal/proposal-types.js +21 -0
- package/dist/commands/proposal/repository.js +108 -29
- package/dist/commands/tasks/tasks.js +19 -2
- package/dist/core/asset/frontmatter.js +106 -1
- package/dist/core/config/config.js +5 -2
- package/dist/core/config/retired-experimental-keys-shim.js +62 -0
- package/dist/core/config/schema/improve-processes.js +29 -2
- package/dist/core/improve-result.js +9 -0
- package/dist/core/paths.js +7 -0
- package/dist/core/write-source.js +10 -2
- package/dist/indexer/ensure-index.js +52 -7
- package/dist/indexer/graph/graph-extraction.js +82 -8
- package/dist/indexer/passes/memory-inference.js +16 -1
- package/dist/llm/client.js +16 -2
- package/dist/llm/graph-extract.js +162 -18
- package/dist/scripts/akm-migrate-node.js +97 -36
- package/dist/scripts/akm-migrate.js +97 -36
- package/dist/storage/repositories/index-entries-repository.js +43 -0
- package/dist/storage/repositories/proposals-repository.js +4 -1
- package/dist/storage/state-db-integrity.js +123 -0
- package/dist/workflows/program/schema.js +1 -0
- package/docs/reference/cli.md +17 -7
- package/docs/reference/data-and-telemetry.md +1 -0
- package/package.json +1 -1
- package/schemas/akm-config.json +44 -0
- package/schemas/akm-workflow.json +1 -0
- package/dist/commands/improve/eval-cases.js +0 -52
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
-
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
-
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
4
|
-
import fs from "node:fs";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import { writeFileAtomic } from "../../core/common.js";
|
|
7
|
-
import { getEvalCasesDir } from "../../core/paths.js";
|
|
8
|
-
import { recordWrittenPath } from "../../core/write-provenance.js";
|
|
9
|
-
export function writeEvalCase(stashDir, evalCase) {
|
|
10
|
-
const evalDir = getEvalCasesDir(stashDir);
|
|
11
|
-
fs.mkdirSync(evalDir, { recursive: true });
|
|
12
|
-
const fileName = `${evalCase.slug}.md`;
|
|
13
|
-
const filePath = path.join(evalDir, fileName);
|
|
14
|
-
const content = `---
|
|
15
|
-
ref: ${evalCase.ref}
|
|
16
|
-
failureReason: ${evalCase.failureReason}
|
|
17
|
-
assetType: ${evalCase.assetType}
|
|
18
|
-
rejectedAt: ${evalCase.rejectedAt}
|
|
19
|
-
source: ${evalCase.source}
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
# Eval Case: ${evalCase.ref}
|
|
23
|
-
|
|
24
|
-
**Failure reason:** ${evalCase.failureReason}
|
|
25
|
-
**Source:** ${evalCase.source}
|
|
26
|
-
**Asset type:** ${evalCase.assetType}
|
|
27
|
-
|
|
28
|
-
This case was automatically captured when a distillation or proposal was rejected.
|
|
29
|
-
Use it as a regression test: future improve runs on this ref should not produce
|
|
30
|
-
output that would be rejected for the same reason.
|
|
31
|
-
`;
|
|
32
|
-
writeFileAtomic(filePath, content);
|
|
33
|
-
// itlackey/akm#890: journal it even though it now lands under `$STATE`,
|
|
34
|
-
// outside the stash's git repo — `result.writtenPaths` still reports it
|
|
35
|
-
// (as an absolute path; see describeRunWrittenPaths in improve.ts), and
|
|
36
|
-
// the auto-sync commit's own containment check already excludes anything
|
|
37
|
-
// outside the stash from what gets staged, so recording it here cannot
|
|
38
|
-
// cause it to be committed.
|
|
39
|
-
recordWrittenPath(filePath);
|
|
40
|
-
return filePath;
|
|
41
|
-
}
|
|
42
|
-
export function countEvalCases(stashDir) {
|
|
43
|
-
const evalDir = getEvalCasesDir(stashDir);
|
|
44
|
-
if (!fs.existsSync(evalDir))
|
|
45
|
-
return 0;
|
|
46
|
-
try {
|
|
47
|
-
return fs.readdirSync(evalDir).filter((f) => f.endsWith(".md")).length;
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
return 0;
|
|
51
|
-
}
|
|
52
|
-
}
|