Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.
TypeScript agentic-aiai-agentsai-codinganthropicautomationclaudeclaude-codecodexcoding-agentsdevops-automationdevtoolsgithub-actionsgrokllmloop-engineeringmcpprompt-engineering
fix: remove duplicate state scan, dead safety fallback, align MCP cost ratios (#308)
Semianchuk Vitaliieaf89e94e7d0
diff --git a/tools/loop-audit/src/auditor.ts b/tools/loop-audit/src/auditor.tsindex 72b4d3e..159b711 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<string[]> {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<AuditResult> {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.tsindex 1ee0ad9..a304bf9 100644--- a/tools/mcp-server/src/index.ts+++ b/tools/mcp-server/src/index.ts@@ -412,9 +412,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