feat(analyze): actor-tagged turns + user-reaction & skill-adoption analysts#1
Merged
Conversation
…alysts - actor tag (human/subagent-spawn/injected) on user.prompt spans from isSidechain/userType + synthetic-marker precedence (src/adapters/actor.ts) - analyzeReactions: deterministic human-turn reaction classifier (correction/frustration/praise/jargon/structure) + trigger pairs - analyzeAdoption: skill penetration + explicit invocations AND loop-dispatched runs (.evolve/skill-runs.jsonl) reported separately — fixes the ~370x loop-dispatch undercount - +12 tests (58 total green), typecheck clean, no wire-contract attrs changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns
tracesfrom "how efficient was the agent" into "how is the agent serving its user, and are our skills used" — the questions a session-trace meta-audit actually needs. All deterministic, $0, no API key.What
user.promptspan (tangle.actor:human/subagent-spawn/injected/tool-result), derived from theisSidechain/userTypethe Claude adapter already parsed but discarded, with synthetic-prompt-marker precedence. Foundational — every user-facing analysis is polluted without it (subagent spawn-prompts look identical to human turns otherwise).analyzeReactions) — classifies eachactor==='human'turn that follows an assistant turn (correction / frustration / praise / jargon-complaint / structure-complaint) and surfaces the topassistant-prose → human-reactiontrigger pairs.analyzeAdoption) — skill penetration %, plus explicit invocations and loop-dispatched runs (read from.evolve/skill-runs.jsonl) reported separately, because flat counts undercount loop-dispatched skills (e.g. governor) by ~370×.Why
Built while meta-auditing 14,541 real Claude/Codex sessions; these three gaps were the difference between a clean corpus and a polluted one. New attributes only —
src/attributes.tswire-contract values untouched.Verification
pnpm typecheckclean;pnpm test58 passed (+12 new).🤖 Generated with Claude Code