

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# CLAUDE.md for humanlog23Essential guide for AI coding agents working on the `humanlog` Go project.45## Project Overview67`humanlog` is a Go package that provides a human-readable formatter for Go's `log/slog` output. It implements the `slog.Handler` interface to format logs with fixed-width messages, colored levels, and structured attributes.89**Core Architecture:**10- `handler.go`: Main `Handler` type implementing `slog.Handler` with custom formatting (234 lines)11- `options.go`: `Options` struct for handler configuration12- `humanlog.go`: Entry point `NewHandler()` function with nil writer panic contract13- `example/main.go`: Comprehensive usage patterns and API demonstration1415**Key Design Patterns:**16- Fixed-width message formatting (40 chars) with truncation/padding in `handler.go:57-64`17- No global state - all configuration via `Options` struct or method parameters18- Immutable handler creation via `WithAttrs()` and `WithGroup()` methods19- Structured attribute grouping with dot notation (e.g., `request.method=GET`)2021## Developer Workflows2223**Build & Test Commands:**24- **Primary**: `task build` - runs tests, linting, and formatting (`goimports -w .`)25- **Fallback**: Standard Go tools (`go test ./...`, `go build`) if no Taskfile exists26- **Example**: `go run example/main.go` to see formatted output27- **Analysis**: `go run llm-shared/utils/gofuncs/gofuncs.go -dir .` for function listing2829**Task Completion Criteria:**30- Must run `gofmt -w` on changed Go files before build attempts31- Task incomplete until `task build` succeeds32- Basic unit tests required (see `handler_test.go` for patterns)3334## Project-Specific Conventions3536**Handler Contract:**37- `NewHandler(nil, opts)` panics - enforced in `humanlog.go:16-18`38- All exported functions require doc comments39- Message width fixed at 40 characters with ellipsis truncation40- Color output enabled by default unless `DisableColor: true`4142**Attribute Formatting:**43- Strings with spaces/special chars are quoted: `key="value with spaces"`44- Time values use RFC3339 format45- Error values are quoted: `error="connection refused"`46- Go keywords (`true`, `false`, `nil`) are quoted when used as string values4748**Testing Patterns:**49- Use `bytes.Buffer` for output capture in tests50- Set `DisableColor: true` for predictable test assertions51- Test both grouped and ungrouped attribute scenarios52- Cover time formatting and attribute quoting edge cases5354## Integration Points5556**slog Integration:**57- Implements `slog.Handler` interface (Enable, Handle, WithAttrs, WithGroup)58- Uses embedded `slog.TextHandler` for level filtering and source location59- Compatible with `slog.SetDefault()` for global logger replacement6061**Dependencies:**62- Standard library only (no external dependencies in `go.mod`)63- Go 1.24.5+ required64- Module path: `github.com/lepinkainen/humanlog`6566## Development Guidelines6768**Code Quality:**69- Follow `llm-shared/` conventions for build, lint, and test standards70- Prefer standard library over third-party dependencies71- Use `llm-shared/utils/validate-docs/` to verify project structure72- Reference `llm-shared/templates/` for CI, gitignore, and build templates7374**Formatting Examples:**75```76[15:04:05] INFO User logged in successfully user_id=123 session="abc-def" request.ip=192.168.1.177[15:04:05] ERROR Connection failed error="timeout after 30s" retries=3 source=main.go:4278```
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| lepinkainen/humanlogGEMINI.md · 0 | GEMINI.md | buildteststylearch+2 | 79/100 | 14 days ago | |
| lepinkainen/humanlog.clinerules/project-rules.md · 0 | Cline rules | setupbuildtestlint-format+8 | 96/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| stacklok/toolhiveCLAUDE.md · 2.0k | CLAUDE.md | buildteststylearch+4 | 100/100 | 14 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 46 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 14 days ago | |
| microsoft/playwrightCLAUDE.md · 95k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 7 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.5k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 14 days ago | |
| tphakala/birdnet-goCLAUDE.md · 1.6k | CLAUDE.md | buildtestlint-formatstyle+8 | 100/100 | today | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 14 days ago | |
| tyrchen/geektime-bootcamp-aiw7/genslides/backend/CLAUDE.md · 230 | CLAUDE.md | testlint-formatstylearch+6 | 100/100 | 9 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 7 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/lepinkainen-humanlog-claude)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.