Skip to content

feat(base2): add meta-rule 'Syntax ≠ logic' to General guidelines#873

Open
chicagoist wants to merge 1 commit into
CodebuffAI:mainfrom
chicagoist:feat/meta-rule-syntax-is-not-logic
Open

feat(base2): add meta-rule 'Syntax ≠ logic' to General guidelines#873
chicagoist wants to merge 1 commit into
CodebuffAI:mainfrom
chicagoist:feat/meta-rule-syntax-is-not-logic

Conversation

@chicagoist

Copy link
Copy Markdown

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 (#872) as the axiom
from which the JS-specific verification steps follow.

Diff

 }
+- **Syntax ≠ logic:** `node --check`, `tsc --noEmit`, or any parser
+  pass does NOT mean the code works — always verify that code
+  executes, not just that it parses.
+- **JavaScript Debugging:** After fixing JS syntax errors, do NOT
+  stop at `node --check` passing — 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant