Repository navigation
feat: the Skills page shows the flow of the hooks and the agents' activity (ADR-0098) - #483
Merged
Merged
Conversation
…ivity (ADR-0098) A tab Flow on the Skills page draws the hooks of the skills switched on by when they give their text, with a tooltip per hook (when, condition, how often, agents, the start of its text) and why a hook is not given. Beside it, what devstack did for the agent: the dispatcher records each session start, each hook it gave and each session end kept; `devstack mcp` each tool call (name, ms, ok). One file per process and day in the hub's state, kept for a week; never a prompt, a text, an argument or an answer. GET /hub/activity puts a record without a session to the latest session started in its working tree; /hub/skills carries hook_details; the activity event tells the page to read again. Closes #482 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two skills naming the same upstream listed its calls twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The node's opacity dimmed the tooltip inside it too; the node's parts are dimmed instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
What and why
A developer could not see what devstack does for their coding agent while it works: the Skills page listed how many hooks a skill carries, not when they give their text, under which condition, or what followed; a silent hook (an upstream not accepted) said nothing about why.
devstack mcp(time, ms, ok/failed); a click on a hook narrows the list to it (its firings, its upstream's calls,lane_stopfor a lane-stop hook).devstack hookwrites a line per session start, per prompt it gave text for, persession-endkept, perlane-stoptext;devstack mcpone pertools/call. Each process appends to its ownactivity/<day>-<pid>.jsonlin the hub's state; a write error goes to the hub's log, never to the hook or the call. Files older than seven days go.GET /hub/activity?tree=&session=&since=(sessions and records; a record without a session is put to the latest session started in its working tree),hook_detailsper skill on/hub/skills, and anactivityevent on/hub/events(the hub looks at the folder every two seconds while a dashboard listens).Review card
session_idfrom a hook's input; a tool call (and a lane's stop) is put to the latest session that started in its working tree before it.GET /hub/skillscarries per hook its event, condition and the start of its text;GET /hub/activityis new, and/hub/eventssendsactivity.Approved by the owner in the conversation on 2026-11-06: points 1, 2, 3 and 4.
Decided on my own: a prompt's hooks are grouped by their pattern within one phase (no guessing what a pattern means); a session start is recorded even when it gave no text (else its tool calls could not be put to it); record times are Unix ms as
u64(an internally tagged record cannot read au128back); at most the latest 500 records per answer; the text preview is 160 characters. Recorded as ADR-0098. Stage 3 of #482 (the agent's built-in tools throughPostToolUse) is not part of it.Checked
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test -p devstack-hub -p devstack-node,cargo test -p devstack --bin devstack; inui/:typecheck,vitest(newflow.test.ts,SkillsFlow.test.ts),build.LOCALAPPDATApointed at a temp folder):devstack hook session-start,prompt-submit(a prompt with a word to look for),session-end, and an MCPtools/callover stdio each wrote their line in their own file; the prompt's words and the hook texts are not in them.GET /hub/activityfrom a running hub of this build. A hub started against the temporary state would sync the skills there and could take the real hook entries out of~/.claude/settings.json; the view is covered by the unit test of the attribution.SkillsFlow.test.ts.Closes #482
🤖 Generated with Claude Code