My agentic slop goes here. Not intended for anyone else!
1# Dancer - Self-Modifying OCaml Services 2 3Dancer is an ambitious OCaml library that enables long-running services to automatically improve themselves through AI-assisted code generation, with comprehensive logging, pattern detection, and safe deployment mechanisms. 4 5## Components 6 7### dancer-logs 8 9Comprehensive structured logging with SQLite backend. Features: 10- Full structured logging with no truncation 11- SQLite storage with FTS5 full-text search 12- Pattern detection and normalization 13- Eio fiber and domain tracking 14- Rich context capture (sessions, requests, traces, performance metrics) 15- OCaml Logs reporter integration 16- Colorful CLI for log analysis 17 18## Installation 19 20```bash 21# Install dependencies 22make deps 23 24# Build the project 25make build 26 27# Run the CLI 28make run-cli 29``` 30 31## Usage 32 33```ocaml 34(* Initialize logging *) 35let db = Dancer_logs.init ~path:"app.db" () in 36let reporter = Dancer_logs.reporter db in 37Logs.set_reporter reporter; 38 39(* Log with context *) 40let ctx = Dancer_logs.Context.( 41 empty_context 42 |> with_session "session-123" 43 |> with_request "req-456" 44) in 45 46Dancer_logs.log db ~level:Logs.Error ~source:"MyApp" 47 ~message:"Connection failed" ~context:ctx () 48``` 49 50## CLI Usage 51 52```bash 53# View recent errors 54dancer-logs errors 55 56# Search logs 57dancer-logs search "connection refused" 58 59# View patterns 60dancer-logs patterns --min-count 10 61 62# Export for Claude 63dancer-logs export -f claude -o context.txt 64``` 65 66## Architecture 67 68See [CLAUDE.md](CLAUDE.md) for detailed architecture and design decisions. 69 70## License 71 72MIT