Add insights plugin for private local task reports (0.1.0) - #62
Merged
Merged
Conversation
- /insights:report [free text] records a mid-task, blocked, finished or task-less report: verbatim user feedback or an agent snapshot - insights.report/v1 schema: trigger vs task status, main-checkout project identity, standalone work summary, reporter/participant models and evidenced plugin versions, explicit unknowns with reasons - insights.py: single validate/write/read/list path; private XDG store, atomic no-overwrite publication, idempotent retries, loud collisions, honest malformed-file reporting, URL sanitizing, credential rejection - Hermetic tests plus three historical incident fixtures; contract and retrospective docs; marketplace, README, CHANGELOG, CLAUDE.md entries Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156cvkkQ57b813ESqkKmmiX
- Pass drafts as files written by the host tool; never a shell heredoc (a terminator line in user feedback would execute as shell commands) - Redact credential shapes, incl. token query params, instead of rejecting them, so verbatim feedback stays storable; report count - Refuse symlinked, foreign or group/other-readable store dirs instead of chmod'ing an existing override directory - Parse URLs without .port/.hostname (no crash on bad ports, keep IPv6) - fullmatch IDs/timestamps, whole seconds only, exclusive Fact variants, reject bidi controls and Unicode line separators - One size-capped load path for read/list; positive --limit only - Add `skeleton`: complete draft with observed values that fails validation until filled Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156cvkkQ57b813ESqkKmmiX
- Redact to a fixpoint, keep trailing punctuation, redact a bare key header only, and exempt helper-derived identifiers (an sk- repo path broke project.key); redact before URL sanitizing so counts are honest - Parse URLs with an anchored regex instead of urlsplit - Read stored reports through one bounded fd: regular files only, no symlinks, no FIFO hangs; also for ID-collision comparison - skeleton embeds the resolved project and falls back to the task/ branch name; skill removes the draft right after write - Knowledge entry for the insights store decisions Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156cvkkQ57b813ESqkKmmiX
Outside ~/.claude so reports survive plugin uninstalls and stay reachable for non-Claude producers; drops the XDG resolution and the path-level v1 (the schema version lives in each report). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156cvkkQ57b813ESqkKmmiX
gering
force-pushed
the
task/add-plugin-insights-report
branch
from
September 17, 2026 10:29
804c661 to
043e297
Compare
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.
Summary
New standalone insights plugin (0.1.0).
/insights:report [free text]records a private, local report on the work so far: mid-task, blocked, finished, or with no task at all. The goal is process and plugin learning, not worker ranking.insights.report/v1.report_triggerandtask_statusare separate fields. The project is identified by its canonical main checkout, so worktrees group together while same-named repos stay distinct (a labelled directory fallback covers non-git projects). Each report carries a standalone work summary, the reporter's and other participants' models, runtime and effort, and the skills that actually ran with their execution-time plugin versions. Every unknown value is explicit ({value: null, reason}). The retrospective covers outcome, domain vs. tooling difficulty, what worked, friction (causes stay hypotheses), interventions, and model-authored suggestions. Plugin-specific details (swarm, work-system, pr-flow, knowledge-system) are included only when that plugin was used.scripts/insights.py(Python stdlib) is the single write, read, and list path for this producer and for later ones. Reports go to~/.gering-plugins/insights/reports/(outside~/.claude, so they survive plugin uninstalls and non-Claude workers can reach them later):link()publication that never overwrites; an identical retry returnsunchanged, a collision exits 3skeletonproduces a complete draft that fails validation until filled indocs/REPORT-CONTRACT.md(schema, provenance rules, producer contract) anddocs/RETROSPECTIVE.md(adaptive, evidence-only prompts). Registered in the marketplace, the README files, CHANGELOG and CLAUDE.md. A knowledge entry records the design decisions.integrate-insights-handoffs. This PR adds no hooks, always-loaded rules, ratings or analytics.Verification
python3 plugins/insights/scripts/test_insights.py: 23/23 hermetic tests pass. HOME, XDG and the store point to a sandbox, and the tests never touch the real store. Coverage:Three historical incident fixtures validate (partial swarm voice loss, repeat question vs. new approval, dispatch timeout with a worker that kept running). They are labelled as history, not as current bug status.
Mutation check: making the collision check fail-open, or replacing
linkwithos.replace, makes 2 and 3 tests fail respectively.python3 scripts/check-structure.py: OK (0 errors; the only warning is the existing pr-flowopendescription length).Demonstration in an isolated store (
INSIGHTS_STORE_DIR), following the documented helper path:ref_source=cwd)skeleton→ draft file →writeAll three were read back and listed; the files are
0600in a0700directory.Not verified: the actual installed
/insights:reportslash command. The plugin isn't installed in this session's plugin cache; the skill flow was exercised by hand through the same helper calls.Review
Two local
/swarm:review --fixrounds (Claude, codex and grok; Kimi not opted in). The mandate budget of 2 is now used up.skeletonsubcommandproject.keyforsk-…paths; now fixpoint redaction that skips identifier fieldscontext/skeleton. The cost is milliseconds on a manual command, so clarity wins.🤖 Generated with Claude Code
https://claude.ai/code/session_0156cvkkQ57b813ESqkKmmiX