Context
src/coding_scaffold/writers.py is ~864 lines, of which roughly 700 are multi-line string literals. src/coding_scaffold/adapters.py follows the same pattern with embedded TypeScript and Markdown. Real logic is buried under template walls, diffs are noisy, and the templates themselves can't be linted, syntax-highlighted properly, or previewed standalone.
Recommendation
- Move templates into
src/coding_scaffold/templates/ as real .md, .json, .yaml, .ts, and .txt files.
- Load via
importlib.resources.files("coding_scaffold.templates").joinpath(...).
- Use
str.format or a small placeholder helper for variable substitution ({weak_model}, {strong_model}, {routine_threshold}).
- Keep modules focused on orchestration (read inputs, pick template, fill placeholders, write output).
Verification
writers.py and adapters.py shrink to a few hundred lines each.
- All 51 tests still pass.
git grep -n '\"\"\"' src/coding_scaffold/writers.py src/coding_scaffold/adapters.py returns far fewer matches.
- Templates are visible/editable without scrolling through Python.
Carry-over from prior code review (F4).
Context
src/coding_scaffold/writers.py is ~864 lines, of which roughly 700 are multi-line string literals. src/coding_scaffold/adapters.py follows the same pattern with embedded TypeScript and Markdown. Real logic is buried under template walls, diffs are noisy, and the templates themselves can't be linted, syntax-highlighted properly, or previewed standalone.
Recommendation
src/coding_scaffold/templates/as real.md,.json,.yaml,.ts, and.txtfiles.importlib.resources.files("coding_scaffold.templates").joinpath(...).str.formator a small placeholder helper for variable substitution ({weak_model},{strong_model},{routine_threshold}).Verification
writers.pyandadapters.pyshrink to a few hundred lines each.git grep -n '\"\"\"' src/coding_scaffold/writers.py src/coding_scaffold/adapters.pyreturns far fewer matches.Carry-over from prior code review (F4).