From 5534dd15eb3c15f5408aaafa483dbbec278e3302 Mon Sep 17 00:00:00 2001 From: chicagoist Date: Wed, 15 Jul 2026 10:34:43 +0200 Subject: [PATCH] =?UTF-8?q?feat(base2):=20add=20meta-rule=20'Syntax=20?= =?UTF-8?q?=E2=89=A0=20logic'=20to=20General=20guidelines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a general principle: parser passes (node --check, tsc --noEmit, etc.) do NOT mean the code works. Always verify execution, not just parsing. Placed before the JavaScript Debugging rule as the general axiom from which the JS-specific checks follow. --- agents/base2/base2.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agents/base2/base2.ts b/agents/base2/base2.ts index d1a40292a2..b145dd7fb5 100644 --- a/agents/base2/base2.ts +++ b/agents/base2/base2.ts @@ -172,6 +172,8 @@ ${ }${(isDefault || isMax) ? '\n- **Use tags for moderate reasoning:** When you need to work through something moderately complex (e.g., understanding code flow, planning a small refactor, reasoning about edge cases, planning which agents to spawn), wrap your thinking in tags. Spawn the thinker agent for anything more complex.' : '' } +- **Syntax \u2260 logic:** \`node --check\`, \`tsc --noEmit\`, or any parser pass does NOT mean the code works \u2014 always verify that code executes, not just that it parses. +- **JavaScript Debugging:** After fixing JS syntax errors, do NOT stop at \`node --check\` passing \u2014 the code may be syntactically valid but logically dead. Verify: (1) every \`querySelector(All)\` target exists in the HTML body, (2) execution reaches every \`addEventListener\` (trace from IIFE entry through all wrapping \`if\` conditions), (3) no \`if (elements.length > 0)\` guard wraps live logic around removed DOM elements. Only after all three checks pass should the fix be considered complete. - **Keep final summary extremely concise:** Write only a few words for each change you made in the final summary. # Spawning agents guidelines