Files
hx/docs/audit/core-a.md
T
johannesandClaude Sonnet 5.5 a94632ea3d chore: delete code comments, add ratchet lint and ADRs
Classify every comment as tautology, stale, excuse or decision record.
Tautology/stale/excuse comments are deleted (excuses filed as issues
#196-#236), decisions moved to docs/adr/0001-0034.

- scripts/lint-comments.sh + .comment-baseline: per-file comment count
  may only go down; wired into tests/all.sh
- .claude/skills/delete-comment: repeatable audit workflow
- cargo fmt applied to touched crates

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 13:37:32 +01:00

44 lines
1.7 KiB
Markdown

# Comment audit: hx-core (agent, route, window, switch, subagent, session, stats, context, approve, command)
Counts are comment blocks (consecutive lines = one comment). Kept: 0 (no SAFETY comments, shebangs or directives in these files).
| file | tautology | stale | excuse | decision | kept | lines removed |
|---|---|---|---|---|---|---|
| agent.rs | 48 | 0 | 2 | 3 | 0 | 61 |
| route.rs | 31 | 0 | 2 | 2 | 0 | 51 |
| window.rs | 25 | 0 | 1 | 1 | 0 | 50 |
| switch.rs | 31 | 0 | 1 | 2 | 0 | 44 |
| subagent.rs | 26 | 0 | 1 | 2 | 0 | 37 |
| session.rs | 26 | 0 | 1 | 1 | 0 | 32 |
| stats.rs | 18 | 0 | 0 | 0 | 0 | 27 |
| context.rs | 18 | 0 | 0 | 0 | 0 | 24 |
| approve.rs | 12 | 0 | 1 | 3 | 0 | 24 |
| command.rs | 18 | 0 | 0 | 0 | 0 | 21 |
## Excuses
- agent.rs:68 exact-match loop detector
- agent.rs:429 retry ignores retry-after
- route.rs:6 keyword heuristics
- route.rs:430 log write failure swallowed
- switch.rs:132 save failure swallowed
- window.rs:104 60k mask cap empirical
- subagent.rs:260 read-only child has bash
- session.rs:269 no session index
- approve.rs:23 reads never prompt
## Decisions
- agent.rs:528 never store empty replies
- agent.rs:666 images after tool results
- agent.rs:428 retry only before events emitted
- route.rs:346 hysteresis scales with history; Fable dropped at once
- route.rs:375 history must fit target window
- window.rs:9-15 reset invariants, monotone masking boundary
- switch.rs:313 client rebuilt to refresh credentials
- switch.rs:249 auto/overrides not pinned
- subagent.rs:122 abort re-arm per session
- subagent.rs:393 abort re-check after slot wait
- session.rs:43 skip torn last line
- approve.rs:98 unknown permission value denies
- approve.rs:301 owner stores "always"
- approve.rs:142 codemode inner tools ask themselves