Agent Insights
Contract
Generate a self-contained private HTML report from local development-agent metadata while keeping raw conversations out of the report and out of durable knowledge stores.
The report:
- analyzes a rolling window of locally available Claude, Codex, Gemini, Kimi, claude-mem, and Hermes activity;
- separates likely user-authored prompts from common forge, subagent, imported-session, command-wrapper, and system templates;
- reports project concentration, work modes, correction signals, friction signals, requested completion signals, and candidate workflow rules;
- writes only aggregate HTML and JSON under
~/.hermes/cache/agent-insights/ by default;
- complements token and cost telemetry rather than rebuilding it;
- labels heuristic evidence honestly and never treats generated summaries as verified outcomes.
A successful run is not merely an HTML file. The collector must complete, the report validator must pass, the generated JSON must contain no prompt bodies, and the operator must explain the main evidence limitations.
1. Choose the analysis window and sources
Default to 30 days unless the user specifies another window. A shorter window is useful for recent friction; a longer window is better for recurring patterns but increases alias and provenance noise.
Supported source selectors:
claude: ~/.claude-mem/claude-mem.db, when available;
codex: ~/.codex/session_index.jsonl, with detectable external imports excluded;
gemini: recent artifact metadata under ~/.gemini/antigravity/brain/;
kimi: collapsed metadata from ~/.kimi/sessions/;
hermes: broad usage context from ~/.hermes/state.db.
Missing sources are reported, not treated as failure. Source availability does not imply equivalent evidence quality.
2. Run the deterministic collector
Locate this skill's installed directory, then run:
python3 <skill-dir>/scripts/build_report.py --days 30
Restrict stores when requested:
python3 <skill-dir>/scripts/build_report.py \
--days 90 \
--sources claude,codex
Use --open only when a local GUI browser is appropriate. Use --output and --json-output to choose alternate private destinations.
3. Validate before interpreting
Run the built-in checks:
python3 <skill-dir>/scripts/build_report.py --self-test
python3 <skill-dir>/scripts/build_report.py \
--check ~/.hermes/cache/agent-insights/report.html
Confirm all of the following:
- the collector exited successfully;
- the HTML contains all required sections;
- the sensitive-pattern scan reports zero hits;
- aggregate JSON contains counts and labels, not prompt bodies;
- unavailable sources and parsing errors are visible;
- project aliases and orchestration containers are not presented as a clean project ranking.
If the report renderer changes, inspect the existing rendered surface before editing, then verify rendered pixels after each meaningful visual change. Preserve unrelated accepted choices.
4. Interpret evidence conservatively
Use three confidence labels:
- Observed: a directly counted aggregate or source-coverage fact.
- Inferred: a repeated pattern supported by multiple sessions or projects but still dependent on heuristic authored-prompt filtering.
- Not established: model preference, productivity gain, psychological trait, project importance, actual release, or any other claim not independently verified.
Important boundaries:
- Requests are not outcomes. Words such as
test, deploy, and release prove intent only.
- Frequency is not importance. Orchestration containers, retries, and aliases can dominate volume.
- Terse agent feedback is not evidence about human relationships or personality.
- Generated
next_steps, plans, walkthroughs, and completion claims are not user commitments or independent proof.
- A successful command is not live read-back; tests are not visual evidence; screenshots are not behavioral proof.
5. Review candidate rules instead of auto-promoting them
The report may propose workflow experiments such as rendered verification, scoped diffs, a completion matrix, one integrating owner, or a harness earning test. Treat these as candidates, not canonical truths.
Promote a rule only when it is:
- explicitly confirmed by the user, or repeated across independent periods and projects;
- supported by user-authored evidence rather than system/import/subagent/generated text;
- actionable enough to change future agent behavior;
- manually reviewed for privacy and overgeneralization;
- durable rather than a transient environment failure or one-off task narrative.
Keep each promotion cycle to a small set. Do not automatically patch personal memory, project documentation, or a knowledge base after every run.
6. Output report
Deliver:
- the absolute HTML path;
- the selected window and source coverage;
- at most five high-signal findings;
- observed versus inferred versus not-established labels;
- missing or weak sources;
- any candidate rules recommended for manual review.
Privacy and provenance
- Never emit raw transcripts, tool outputs, credentials, private URLs, or prompt bodies.
- Write report files with owner-only permissions where the operating system supports them.
- Show repository basenames, never full home-directory paths.
- Exact-text deduplicate claude-mem prompts before ranking.
- Exclude detectable Codex external imports.
- Collapse Kimi forge and retry sessions by normalized parent hash.
- Treat Gemini plans and walkthroughs as metadata coverage, not verified outcomes.
- Treat Hermes as broad usage context because it includes non-development sessions.
- Keep generated reports private even when they contain only aggregates; project labels and work patterns may still be sensitive.
Verification checklist
Anti-patterns
- Rebuilding token or cost analytics already supplied by the active harness.
- Treating orchestration containers, benchmark runs, or retry volume as real project interest.
- Treating generated summaries,
next_steps, plans, or walkthroughs as user behavior or verified completion.
- Quoting sensitive prompts for color.
- Publishing the generated report or aggregate JSON.
- Automatically writing every recommendation into personal memory or a knowledge base.
- Hardening environment-dependent failures, negative tool claims, transient errors, or one-off task narratives into permanent skill rules.
- Turning monthly review into another dashboard-maintenance project.
1---2name: agent-insights3description: Use when analyzing development-agent session patterns across Claude, Codex, Gemini, Kimi, claude-mem, and Hermes without exporting raw transcripts. Generates a private aggregate-only HTML report of project concentration, work modes, correction loops, friction, and verification gaps.4license: MIT5---67# Agent Insights89## Contract1011Generate a self-contained private HTML report from local development-agent metadata while keeping raw conversations out of the report and out of durable knowledge stores.1213The report:1415- analyzes a rolling window of locally available Claude, Codex, Gemini, Kimi, claude-mem, and Hermes activity;16- separates likely user-authored prompts from common forge, subagent, imported-session, command-wrapper, and system templates;17- reports project concentration, work modes, correction signals, friction signals, requested completion signals, and candidate workflow rules;18- writes only aggregate HTML and JSON under `~/.hermes/cache/agent-insights/` by default;19- complements token and cost telemetry rather than rebuilding it;20- labels heuristic evidence honestly and never treats generated summaries as verified outcomes.2122A successful run is not merely an HTML file. The collector must complete, the report validator must pass, the generated JSON must contain no prompt bodies, and the operator must explain the main evidence limitations.2324## 1. Choose the analysis window and sources2526Default to 30 days unless the user specifies another window. A shorter window is useful for recent friction; a longer window is better for recurring patterns but increases alias and provenance noise.2728Supported source selectors:2930- `claude`: `~/.claude-mem/claude-mem.db`, when available;31- `codex`: `~/.codex/session_index.jsonl`, with detectable external imports excluded;32- `gemini`: recent artifact metadata under `~/.gemini/antigravity/brain/`;33- `kimi`: collapsed metadata from `~/.kimi/sessions/`;34- `hermes`: broad usage context from `~/.hermes/state.db`.3536Missing sources are reported, not treated as failure. Source availability does not imply equivalent evidence quality.3738## 2. Run the deterministic collector3940Locate this skill's installed directory, then run:4142```bash43python3 <skill-dir>/scripts/build_report.py --days 3044```4546Restrict stores when requested:4748```bash49python3 <skill-dir>/scripts/build_report.py \50 --days 90 \51 --sources claude,codex52```5354Use `--open` only when a local GUI browser is appropriate. Use `--output` and `--json-output` to choose alternate private destinations.5556## 3. Validate before interpreting5758Run the built-in checks:5960```bash61python3 <skill-dir>/scripts/build_report.py --self-test62python3 <skill-dir>/scripts/build_report.py \63 --check ~/.hermes/cache/agent-insights/report.html64```6566Confirm all of the following:67681. the collector exited successfully;692. the HTML contains all required sections;703. the sensitive-pattern scan reports zero hits;714. aggregate JSON contains counts and labels, not prompt bodies;725. unavailable sources and parsing errors are visible;736. project aliases and orchestration containers are not presented as a clean project ranking.7475If the report renderer changes, inspect the existing rendered surface before editing, then verify rendered pixels after each meaningful visual change. Preserve unrelated accepted choices.7677## 4. Interpret evidence conservatively7879Use three confidence labels:8081- **Observed:** a directly counted aggregate or source-coverage fact.82- **Inferred:** a repeated pattern supported by multiple sessions or projects but still dependent on heuristic authored-prompt filtering.83- **Not established:** model preference, productivity gain, psychological trait, project importance, actual release, or any other claim not independently verified.8485Important boundaries:8687- Requests are not outcomes. Words such as `test`, `deploy`, and `release` prove intent only.88- Frequency is not importance. Orchestration containers, retries, and aliases can dominate volume.89- Terse agent feedback is not evidence about human relationships or personality.90- Generated `next_steps`, plans, walkthroughs, and completion claims are not user commitments or independent proof.91- A successful command is not live read-back; tests are not visual evidence; screenshots are not behavioral proof.9293## 5. Review candidate rules instead of auto-promoting them9495The report may propose workflow experiments such as rendered verification, scoped diffs, a completion matrix, one integrating owner, or a harness earning test. Treat these as candidates, not canonical truths.9697Promote a rule only when it is:98991. explicitly confirmed by the user, or repeated across independent periods and projects;1002. supported by user-authored evidence rather than system/import/subagent/generated text;1013. actionable enough to change future agent behavior;1024. manually reviewed for privacy and overgeneralization;1035. durable rather than a transient environment failure or one-off task narrative.104105Keep each promotion cycle to a small set. Do not automatically patch personal memory, project documentation, or a knowledge base after every run.106107## 6. Output report108109Deliver:1101111. the absolute HTML path;1122. the selected window and source coverage;1133. at most five high-signal findings;1144. observed versus inferred versus not-established labels;1155. missing or weak sources;1166. any candidate rules recommended for manual review.117118## Privacy and provenance119120- Never emit raw transcripts, tool outputs, credentials, private URLs, or prompt bodies.121- Write report files with owner-only permissions where the operating system supports them.122- Show repository basenames, never full home-directory paths.123- Exact-text deduplicate claude-mem prompts before ranking.124- Exclude detectable Codex external imports.125- Collapse Kimi forge and retry sessions by normalized parent hash.126- Treat Gemini plans and walkthroughs as metadata coverage, not verified outcomes.127- Treat Hermes as broad usage context because it includes non-development sessions.128- Keep generated reports private even when they contain only aggregates; project labels and work patterns may still be sensitive.129130## Verification checklist131132- [ ] Correct time window and source selection used133- [ ] Self-test passed134- [ ] HTML validation passed135- [ ] Sensitive-pattern scan returned zero hits136- [ ] No prompt bodies or transcripts in HTML or JSON137- [ ] Missing sources disclosed138- [ ] Imported, generated, subagent, and retry traffic excluded where detectable139- [ ] Frequency not described as project importance or personality140- [ ] Completion requests not described as completed outcomes141- [ ] Candidate rules manually reviewed before durable promotion142143## Anti-patterns144145- Rebuilding token or cost analytics already supplied by the active harness.146- Treating orchestration containers, benchmark runs, or retry volume as real project interest.147- Treating generated summaries, `next_steps`, plans, or walkthroughs as user behavior or verified completion.148- Quoting sensitive prompts for color.149- Publishing the generated report or aggregate JSON.150- Automatically writing every recommendation into personal memory or a knowledge base.151- Hardening environment-dependent failures, negative tool claims, transient errors, or one-off task narratives into permanent skill rules.152- Turning monthly review into another dashboard-maintenance project.