Commit Graph

3 Commits

Author SHA1 Message Date
teernisse
3668ae7f70 docs: improve installation guide with PATH setup
README changes:
- Add go install github.com/...@latest as primary install method
- Add git clone instructions as alternative
- Add PATH setup instructions for bash/zsh and fish shells
- Fix cache database filename (sessions.db -> metrics_v2.db)

CLAUDE.md:
- Fix cache database filename to match actual implementation

New users on fresh Go installations often miss that ~/go/bin needs
to be in PATH. This was causing "command not found" errors after
successful installation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-23 10:09:37 -05:00
teernisse
96d464a2c0 docs: add architectural insights for ANSI width and JSON type detection
Document two hard-won patterns in CLAUDE.md's new Architectural
Insights section:

- ANSI Width Calculation: lipgloss.Width() must be used instead of
  len() for styled strings, since ANSI escape codes add ~20 bytes per
  color code. fmt.Sprintf padding is similarly affected.

- JSON Top-Level Type Detection: bytes.Contains matches nested strings
  in JSONL with embedded JSON. Correct approach tracks brace depth and
  skips quoted strings to find actual top-level fields.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:38:18 -05:00
teernisse
479c250a92 chore: add project tooling with Makefile, golangci-lint config, and CLAUDE.md
Establish the quality infrastructure for the cburn project:

- Makefile: standardized targets for build, install, lint, test, test-race,
  bench, and fuzz. Uses explicit Go path (/usr/local/go/bin/go) for
  reproducibility. Fuzz defaults to 30s with FUZZ_TIME override.

- .golangci.yml (v2 format): enables gosec (security), revive (style),
  gocritic (bugs/perf), errcheck, nilerr, perfsprint, prealloc, and
  standard static analysis. Disables noisy rules (exported doc requirement,
  ifElseChain, deferred .Close() gosec G104). Includes gofmt + goimports
  formatters.

- CLAUDE.md: comprehensive project guide covering architecture overview,
  data flow diagram, package map, build/test commands, key design decisions
  (byte-level parsing, mtime-based caching, async TUI loading), and
  configuration reference.

- .gitignore: add pipeline.test to ignored test artifacts.
2026-02-20 16:06:53 -05:00