com um clique
paren-debug
Debug parenthesis balance issues in Scheme files. Invoke when encountering "unexpected end-of-file reading list" or "unexpected close parenthesis" errors, or when manually counting parens.
Menu
Debug parenthesis balance issues in Scheme files. Invoke when encountering "unexpected end-of-file reading list" or "unexpected close parenthesis" errors, or when manually counting parens.
API quick-reference for key lattice subsystems (FP, Game Theory, SAT, Optics, Statistics, CLP). Use when you need function signatures, module contents, or usage examples for a specific subsystem. Invoke when working with game theory, constraint solving, optics, parsers, or other advanced lattice features.
Search and navigate The Fold's skill lattice using meta-tooling. Use for finding functions, exploring dependencies, type-aware queries, and cross-reference analysis. Invoke when searching for capabilities, exploring the codebase structure, or finding how functions relate.
Troubleshooting guide for The Fold - daemon issues, session corruption, file locations, and common problems. Use when ./fold isn't working, the daemon won't start, or you need to find system files.
Invoke Google's Gemini AI via CLI in headless mode for AI-powered analysis, code generation, and reasoning tasks. Use when you need a second opinion, the user mentions Gemini, needs Google AI capabilities, or requests multi-modal analysis beyond Claude's scope.
Manage issues with The Fold's CAS-native BBS (Bulletin Board System). Use for creating, updating, searching, and tracking issues. Invoke when the user wants to create tickets, find work, check issue status, or manage dependencies.
Developer tools for The Fold - protocols (extensible dispatch), protocol bundles, refactoring toolkit (rename, move, dead code), and template DSL. Use when defining new protocols, refactoring code, or generating S-expressions.
| name | paren-debug |
| description | Debug parenthesis balance issues in Scheme files. Invoke when encountering "unexpected end-of-file reading list" or "unexpected close parenthesis" errors, or when manually counting parens. |
| allowed-tools | Bash(scheme:*, ./fold:*), Read, Grep |
Invoke this skill when you encounter:
Exception in read: unexpected end-of-file reading list at line NException in read: unexpected close parenthesis at line Nparen-locate - Primary Tool (Stack-Based)The most useful tool. Shows exact locations of paren errors:
scheme -q <<'EOF'
(load "boundary/tools/paren-check.ss")
(paren-locate "path/to/file.ss")
EOF
Output format is compiler-friendly (file:line:col):
path/to/file.ss:46:1: error: unclosed '(' - never closed
path/to/file.ss:61:19: error: mismatched brackets: opened '[' at line 61 col 12, closed with ')'
paren-ok? - Quick CheckReturns #t if file is balanced, #f otherwise:
scheme -q <<'EOF'
(load "boundary/tools/paren-check.ss")
(paren-ok? "path/to/file.ss")
EOF
paren-errors - Programmatic AccessReturns list of error structs for further processing:
scheme -q <<'EOF'
(load "boundary/tools/paren-check.ss")
(paren-errors "path/to/file.ss")
EOF
paren-check - Legacy Balance ReportLine-by-line balance report (less precise but shows running totals):
scheme -q <<'EOF'
(load "boundary/tools/paren-check.ss")
(paren-check "path/to/file.ss")
EOF
./fold -c / ./fold --check-syntax - Quick CLI CheckFast paren check from command line (no daemon needed):
./fold -c path/to/file.ss
./fold --check-syntax path/to/file.ss
Output:
# Success:
path/to/file.ss: ✓ All parentheses balanced
# Error:
path/to/file.ss:46:1: error: unclosed '(' - never closed
Exit codes: 0 = balanced, 1 = errors found.
paren-locate firstparen-ok? to confirm the fix# 1. You edited exports.ss and get:
# Exception in read: unexpected end-of-file reading list at line 46
# 2. Run paren-locate
scheme -q <<'EOF'
(load "boundary/tools/paren-check.ss")
(paren-locate "boundary/introspect/exports.ss")
EOF
# Output:
# boundary/introspect/exports.ss:46:1: error: unclosed '(' - never closed
# 3. The error is at line 46, column 1 - that's where the unclosed ( is!
# NOT at the end of the file where Scheme complained.
# 4. Fix and verify:
scheme -q <<'EOF'
(load "boundary/tools/paren-check.ss")
(paren-ok? "boundary/introspect/exports.ss")
EOF
# Output: #t
| Type | Message Pattern | Meaning |
|---|---|---|
unclosed | unclosed '(' - never closed | Opener at this location has no matching closer |
extra-close | unexpected ')' - no matching opener | Closer with no corresponding opener |
mismatch | opened '[' at line X, closed with ')' | Wrong bracket type used to close |
paren-locate(foo] style errors that pure counting missesboundary/tools/paren-check.ss - Load this to access all paren-checking functions.