feat: v0.4.0 — observability for organic lens growth#3
Conversation
Closes the half-loop from v0.3.0. The substrate that lets the roles/
registry expand from real telemetry instead of speculative authoring.
Added:
- `role-x suggest [--since 7d --threshold N --limit M]` — analyze
events.jsonl over a window; reports fire-rate (lens-fired vs
_meta-only), per-lens drift (fires + sessions + avg prompt length),
and (when sanitized capture is on) emergent keyword clusters in
_meta-only events with suggested lens names. Read-only.
- `role-x init <name> [--keywords --paths --branch-patterns --threshold
--extends --mode --force]` — scaffold a status: candidate lens under
roles/<name>.md from CLI flags. Generated file passes validate
immediately. Author promotes to status: active after ≥3 positive-
outcome uses (P16).
- Opt-in sanitized prompt capture via ~/.config/broomva/role/config.json:
- capture_sanitized_prompt: bool (default false)
- sanitization_strategy: "keywords" | "first_chars"
- sanitization_top_n_keywords: int (default 5)
- sanitization_first_chars: int (default 80)
When enabled, intake events get optional `prompt_sanitized: {strategy,
value}` field. When absent, behavior is identical to v0.3.0 — only
prompt_digest (sha256) is recorded.
- 10 new tests (20 → 30 total) covering suggest fire-rate, lens drift,
cluster discovery, config hint, empty log, init success, invalid name
rejection, overwrite refusal, sanitized capture on/off.
- references/observability.md (NEW, 168 LOC) — full data substrate
documentation: event schema, sanitized strategies, privacy guarantees,
operational notes, v0.5.0+ roadmap.
Privacy invariant: absent config = no sanitized capture. Existing
v0.1.0/v0.2.0/v0.3.0 installations are byte-for-byte unaffected. Sha256
prompt_digest remains the only required-capture field.
Verified against live events.jsonl (36 events, 14% lens-fired, 86%
_meta-only) — rust-systems lens drift summary shows 5 fires across 5
sessions averaging 11 words.
Roadmap reshuffle:
- v0.5.0 — role-x tune <lens> + role-x propose-lens <cluster> (PR diffs)
- v0.6.0 (M5) — role-x-replay.py full P13 dream cycle with auto-promote
- v0.7.0 — PostToolUse + Stop outcome hooks (quality signals)
- v0.8.0 — Lens decay + auto-demotion
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Closes the half-loop from v0.3.0. Ships the data substrate that lets the `roles/` registry expand from real telemetry instead of speculative authoring.
Added
Verified against live data
```
$ role-x suggest --since 7d
[role-x suggest] window: --since 7d, events: 36
fired ≥1 lens: 5 (14%)
_meta only: 31 (86%)
Cluster discovery requires sanitized prompt capture (privacy-by-default off).
→ To enable, write:
/Users/broomva/.config/broomva/role/config.json
{"capture_sanitized_prompt": true, "sanitization_strategy": "keywords"}
Active lens drift summary:
rust-systems: 5 fires, 5 sessions, avg prompt 11 words
```
Real telemetry from the past week. 14% coverage rate suggests the registry needs Tier-1 expansion (`ts-nextjs`, `docs-research`, `security-review`, `bstack-governance`). v0.4.0 enables data-driven decisions on what to author.
Privacy invariant
Absent config = no sanitized capture. v0.1.0-v0.3.0 installations are byte-for-byte unaffected. `prompt_digest` (sha256) remains the only required-capture field. Sanitized capture is opt-in per-workstation via the config file.
Test plan
Roadmap
🤖 Generated with Claude Code