Skip to content
This repository was archived by the owner on Mar 14, 2026. It is now read-only.

refactor: split renderer.ts into per-command-group modules (#170)#174

Merged
cdot65 merged 2 commits intomainfrom
cdot65/refactor-renderer-split-170
Mar 14, 2026
Merged

refactor: split renderer.ts into per-command-group modules (#170)#174
cdot65 merged 2 commits intomainfrom
cdot65/refactor-renderer-split-170

Conversation

@cdot65
Copy link
Owner

@cdot65 cdot65 commented Mar 14, 2026

Summary

  • Split 1266-line renderer.ts monolith into 7 focused modules under src/cli/renderer/
  • common.ts (6), generate.ts (161), redteam.ts (435), runtime.ts (305), modelsecurity.ts (328), audit.ts (48), index.ts (6)
  • Barrel re-export preserves all existing imports
  • Updated CLAUDE.md directory structure

Closes #170

Test plan

  • All 537 tests pass
  • Lint, format, type check clean
  • No behavioral changes — pure file reorganization

🤖 Generated with Claude Code

cdot65 and others added 2 commits March 14, 2026 05:09
1266-line monolith → 7 focused modules under src/cli/renderer/:
- common.ts (6 lines) — renderError
- generate.ts (161 lines) — guardrail loop rendering
- redteam.ts (435 lines) — red team scan/target/prompt rendering
- runtime.ts (305 lines) — runtime scan + config management rendering
- modelsecurity.ts (328 lines) — model security rendering
- audit.ts (48 lines) — audit rendering
- index.ts (6 lines) — barrel re-exports

All command files updated to import from renderer/index.js.

Closes #170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cdot65 cdot65 merged commit 2048423 into main Mar 14, 2026
4 checks passed
@cdot65 cdot65 deleted the cdot65/refactor-renderer-split-170 branch March 14, 2026 10:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: split renderer.ts into per-command-group modules

1 participant