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

-4
View File
@@ -1,6 +1,4 @@
#!/bin/sh
# M6 e2e: model discovers an MCP tool via the lazy index, describes and calls it; `hx mcp` reports costs;
# `hx mcp-serve` answers another MCP client (hx itself, configured as a server) with lens tools.
set -eu
root=$(cd "$(dirname "$0")/.." && pwd)
tmp=$(mktemp -d)
@@ -20,14 +18,12 @@ export HOME="$tmp/home" HX_BASE_URL="http://127.0.0.1:$port"
grep -q "FINISHED OK:42" "$tmp/out" || { echo "--- out"; cat "$tmp/out"; echo "--- log"; curl -s "http://127.0.0.1:$port/"; echo "--- err"; cat "$tmp/err"; exit 1; }
"$root/target/debug/hx" mcp > "$tmp/st"
grep -q "f: 5 tools.*lazy (index ~[0-9]* tok, eager schemas ~[0-9]* tok)" "$tmp/st" || { cat "$tmp/st"; exit 1; }
# mcp-serve: hx as MCP server, consumed by hx as MCP client
printf 'fn main() {}\n' > main.rs
cat > "$tmp/repo/.hx/mcp.json" <<EOF
{"mcpServers": {"hx": {"command": "$root/target/debug/hx", "args": ["mcp-serve"], "eager": false}}}
EOF
"$root/target/debug/hx" mcp > "$tmp/st2"
grep -q "hx.lsp: Language server queries" "$tmp/st2" || { cat "$tmp/st2"; exit 1; }
# a foreign client (python, raw JSON-RPC) gets pyright diagnostics through hx mcp-serve
if command -v pyright-langserver >/dev/null; then
printf 'x: int = "no"\n' > bad.py
python3 - "$root/target/debug/hx" > "$tmp/diag" <<'PY'