akm-cli 0.9.0-beta.57 → 0.9.0-beta.59
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/assets/prompts/extract-session.md +5 -1
- package/dist/cli/config-migrate.js +7 -1
- package/dist/commands/config-cli.js +8 -11
- package/dist/commands/health/stash-exposure.js +46 -0
- package/dist/commands/health/windows.js +6 -7
- package/dist/commands/health.js +31 -10
- package/dist/commands/improve/collapse-detector.js +2 -1
- package/dist/commands/improve/consolidate/eligibility.js +0 -17
- package/dist/commands/improve/consolidate.js +209 -167
- package/dist/commands/improve/distill/promote-memory.js +4 -3
- package/dist/commands/improve/distill/quality-gate.js +7 -4
- package/dist/commands/improve/distill-promotion-policy.js +826 -167
- package/dist/commands/improve/distill.js +26 -12
- package/dist/commands/improve/extract-prompt.js +16 -2
- package/dist/commands/improve/extract.js +16 -8
- package/dist/commands/improve/improve-auto-accept.js +22 -1
- package/dist/commands/improve/loop-stages.js +7 -2
- package/dist/commands/improve/memory/memory-belief.js +14 -15
- package/dist/commands/improve/memory/memory-contradiction-detect.js +60 -32
- package/dist/commands/improve/memory/memory-improve.js +27 -27
- package/dist/commands/improve/preparation.js +6 -5
- package/dist/commands/improve/procedural.js +1 -0
- package/dist/commands/improve/recombine.js +3 -11
- package/dist/commands/improve/reflect-noise.js +1 -1
- package/dist/commands/improve/reflect.js +4 -3
- package/dist/commands/improve/shared.js +9 -6
- package/dist/commands/proposal/drain-policies.js +4 -2
- package/dist/commands/read/remember-cli.js +1 -1
- package/dist/commands/read/show.js +15 -0
- package/dist/commands/remember.js +11 -12
- package/dist/commands/sources/init.js +5 -1
- package/dist/commands/sources/stash-skeleton.js +34 -0
- package/dist/commands/tasks/default-tasks.js +3 -2
- package/dist/core/asset/frontmatter.js +22 -0
- package/dist/core/common.js +1 -15
- package/dist/core/config/config-io.js +10 -1
- package/dist/core/config/config-migration.js +2 -15
- package/dist/core/config/config-schema.js +15 -3
- package/dist/core/config/config.js +22 -14
- package/dist/core/paths.js +4 -4
- package/dist/core/time.js +53 -0
- package/dist/indexer/db/db.js +51 -46
- package/dist/indexer/graph/graph-extraction.js +1 -13
- package/dist/indexer/indexer.js +77 -65
- package/dist/indexer/search/db-search.js +41 -6
- package/dist/indexer/search/ranking-contributors.js +14 -8
- package/dist/indexer/search/search-source.js +15 -3
- package/dist/llm/feature-gate.js +4 -8
- package/dist/output/renderers.js +4 -0
- package/dist/scripts/migrate-storage.js +83 -59
- package/dist/scripts/migrations/import-fs-improve-runs-to-db.js +6 -0
- package/dist/storage/repositories/registry-cache.js +2 -1
- package/dist/storage/repositories/registry-index-cache-repository.js +46 -0
- package/dist/workflows/runtime/runs.js +6 -1
- package/package.json +1 -1
- package/dist/assets/tasks/core/update-stashes.yml +0 -4
|
@@ -107,14 +107,17 @@ export function buildJudgePrompt(lessonContent, sourceContent, similarLessons) {
|
|
|
107
107
|
* `profiles.improve.default.processes.distill.qualityGate.enabled` (and the
|
|
108
108
|
* corresponding `.reflect.qualityGate.enabled` for proposals).
|
|
109
109
|
*
|
|
110
|
-
* Fail-
|
|
110
|
+
* Fail-CLOSED (07 P0-2): returns `pass: false` (score -1) on timeout, parse
|
|
111
|
+
* failure, or missing LLM. Minted content that cannot be judged is rejected,
|
|
112
|
+
* not passed through — an unverifiable judge must never wave content into the
|
|
113
|
+
* stash. The rejection is `quality_rejected`, not `review_needed`.
|
|
111
114
|
*/
|
|
112
115
|
export async function runLessonQualityJudge(config, lessonContent, sourceContent, chat,
|
|
113
116
|
/** D-4 / #390: top-3 similar existing lessons for dedup check. */
|
|
114
117
|
similarLessons) {
|
|
115
118
|
const llmConfig = getDefaultLlmConfig(config);
|
|
116
119
|
if (!llmConfig) {
|
|
117
|
-
return { pass:
|
|
120
|
+
return { pass: false, score: -1, reason: "no LLM configured — cannot judge, failing closed" };
|
|
118
121
|
}
|
|
119
122
|
const judgeLlmConfig = llmConfig.judgeModel ? { ...llmConfig, model: llmConfig.judgeModel } : llmConfig;
|
|
120
123
|
const JUDGE_TIMEOUT_MS = 8_000;
|
|
@@ -128,7 +131,7 @@ similarLessons) {
|
|
|
128
131
|
]);
|
|
129
132
|
const parsed = parseEmbeddedJsonResponse(raw);
|
|
130
133
|
if (!parsed || typeof parsed.score !== "number") {
|
|
131
|
-
return { pass:
|
|
134
|
+
return { pass: false, score: -1, reason: "judge parse failed — cannot judge, failing closed" };
|
|
132
135
|
}
|
|
133
136
|
// D-5 / #388: Three-band system (MT-Bench arXiv:2306.05685 — ~±0.5 judge variance).
|
|
134
137
|
// >= 3.5: auto-queue as pending (pass: true)
|
|
@@ -146,7 +149,7 @@ similarLessons) {
|
|
|
146
149
|
return { pass: false, score, reason };
|
|
147
150
|
}
|
|
148
151
|
catch {
|
|
149
|
-
return { pass:
|
|
152
|
+
return { pass: false, score: -1, reason: "judge timeout/error — cannot judge, failing closed" };
|
|
150
153
|
}
|
|
151
154
|
}
|
|
152
155
|
// ── Quality-rejection helper ─────────────────────────────────────────────────
|