AI Fix Prompts for Til

Copy any prompt below into Claude, ChatGPT, or your AI coding assistant to automatically fix the issue. Each prompt includes full context, code location, and step-by-step fix instructions.

1
Total Prompts
0
Critical (P0)
0
High (P1)
1
Medium (P2)
0
Low (P3)
Download All (Markdown) Download All (JSON) Feed these prompts to any AI coder: Claude Code, Cursor, Copilot, GPT, Ollama
MEDIUM ⚒ significant #1

Simplify 5 high-complexity files

complexity refactoring quality
Expected outcome: All listed files reduced to medium or low complexity
Files to modify: src/rs/ccodegen.rs, src/rs/typer.rs, src/rs/interpreter.rs, src/rs/parser.rs, src/rs/ext.rs
Prompt (copy this into your AI assistant)
These files in 'jtimon__til' have high cyclomatic complexity:

- **src/rs/ccodegen.rs**: complexity=2249, max nesting=13, longest function=133 lines
- **src/rs/typer.rs**: complexity=877, max nesting=17, longest function=155 lines
- **src/rs/interpreter.rs**: complexity=797, max nesting=19, longest function=127 lines
- **src/rs/parser.rs**: complexity=477, max nesting=18, longest function=124 lines
- **src/rs/ext.rs**: complexity=423, max nesting=13, longest function=38 lines

For each file:
1. Break large functions into smaller, focused functions
2. Reduce nesting depth (extract early returns, use guard clauses)
3. Simplify conditional logic
4. Extract complex expressions into named variables