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>
This commit is contained in:
johannesandClaude Sonnet 5.5 committed 2026-11-21 13:37:32 +01:00
1 parent 0545702fe0
commit a94632ea3d
131 files changed
+1051 -1746

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
# Compaction cut points keep roles alternating
Status: accepted
## Context
The summary must be folded into the history without breaking provider rules: roles alternate and every `tool_use` keeps its result.
## Decision
Compaction cuts at the latest user prompt and folds the summary into it. Inside one long tool loop with no prompt to cut at, it cuts before an assistant message and the summary becomes its own leading user message, so the kept history still alternates and the pending `tool_use` still has its result.
## Consequences
Summaries sit at a prompt boundary when possible; the fallback handles single huge tool loops.
Code: crates/hx-core/src/compact.rs (`plan`, `Plan`, test for the no-prompt case)