check-parens: standalone paren balance checker for lisp blocks in org files

Scans #+begin_src lisp ... #+end_src blocks, strips strings and
comments, reports unbalanced parens per-block with line numbers.
Detects unterminated blocks (no matching #+end_src).

Zero dependencies (stdlib Python). Called from AGENTS.md step:
  projects/check-parens/check-parens org/file.org
This commit is contained in:
2026-05-13 12:02:52 -04:00
parent 3a65052641
commit fc7bc2fef8
3 changed files with 194 additions and 0 deletions

View File

@@ -167,6 +167,8 @@ when the runtime itself cannot start.
## Rules
- After copying code from the REPL to the .org file, run ~../check-parens/check-parens <file.org>~ to verify all Lisp blocks have balanced parentheses. This catches mismatched parens before tangling:
~projects/check-parens/check-parens org/channel-tui-view.org~
- .org is source of truth; .lisp is generated — never edit .lisp directly
- Every code change starts with a contract and a failing test
- Prove RED before writing implementation