From 7e47236267c317150fd1717fabeb50f56291b41d Mon Sep 17 00:00:00 2001 From: "vitalii.semianchuk" Date: Fri, 17 Jul 2026 13:36:25 +0100 Subject: [PATCH] fix: remove duplicate STATE.md scan, dead safety check, and align MCP cost ratios with estimator --- tools/loop-audit/src/auditor.ts | 5 +---- tools/mcp-server/src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/loop-audit/src/auditor.ts b/tools/loop-audit/src/auditor.ts index 72b4d3e3..159b711c 100644 --- a/tools/loop-audit/src/auditor.ts +++ b/tools/loop-audit/src/auditor.ts @@ -210,7 +210,7 @@ async function findSkills(root: string): Promise { async function detectLoopActivity(root: string): Promise<{ present: boolean; evidence: string[] }> { const evidence: string[] = []; - const stateCandidates = [...STATE_FILES, 'STATE.md']; + const stateCandidates = [...STATE_FILES]; // 1. Look for "Last run" timestamps or dated entries inside state files (strong real-usage signal) for (const sf of stateCandidates) { @@ -375,9 +375,6 @@ export async function auditProject(target: string): Promise { for (const f of SAFETY_FILES) { if (await fileExists(path.join(root, f))) { safetyDocPresent = true; break; } } - if (!safetyDocPresent) { - safetyDocPresent = await fileExists(path.join(root, 'docs', 'safety.md')); - } const mcpPresent = (await Promise.all(MCP_FILES.map(f => fileExists(path.join(root, f))))).some(Boolean) || /MCP|mcp server|plugins & connectors/i.test(loopMdContent); diff --git a/tools/mcp-server/src/index.ts b/tools/mcp-server/src/index.ts index 3a33cea7..1c1910d6 100644 --- a/tools/mcp-server/src/index.ts +++ b/tools/mcp-server/src/index.ts @@ -392,9 +392,9 @@ server.tool( const { cost } = pattern; const mix = level === 'L1' - ? { noop: 0.7, report: 0.3, action: 0 } + ? { noop: 0.6, report: 0.4, action: 0 } : level === 'L2' - ? { noop: 0.6, report: 0.25, action: 0.15 } + ? { noop: 0.5, report: 0.3, action: 0.2 } : { noop: 0.4, report: 0.35, action: 0.25 }; const realisticPerRun = cost.tokens_noop * mix.noop