Repository navigation
Description
Parent
Refs #16428: Ship the plugin-profiles plugin and remove the core bundle (sibling effort; this item ships as its own pull request after the container's)
Depends on
Outcome
harness-ops' session-wide hooks split by responsibility into two hook-only plugins a user switches on or off as a whole: session-telemetry collects telemetry about each session, and plugin-diagnostics reports why installed plugins cannot run. guardrails takes the settings-write ask and the connected-page gate. The always-on profile swaps harness-ops and context-budget for the two units, and harness-ops moves to harness-upkeep.
Demo: with harness-ops off, a session still records skill use and hook runs, and a hook that fails to launch is still reported at the end of the turn.
Decisions
- Q68 / D10: two hook units split by reason to change; the recorder changes with the hook-telemetry contract, the diagnostics unit with the prerequisites contract.
- Q71 (owner): names
session-telemetry("Collects telemetry about each Claude Code session (hook runs, session events and skill use) from this plugin's hooks and from any plugin's hook-telemetry producers, for later analysis.") andplugin-diagnostics("Detects and reports why installed plugins cannot run: hooks that fail to launch, and missing runtimes or prerequisite tools."). - Q72 (a): the prerequisites notices move into plugin-diagnostics with their own synced copy of the check code; running each plugin's declared probe through the prerequisites contract counts as using a contract.
- Q73 (a):
@harness-opsstays a valid sink value resolving through session-telemetry; a new value is added; everyhook-utils.shcopy is resynced. - Q75 (b) (owner, 2026-11-15: "go w/ recomendations"): harness-ops does not declare session-telemetry as a dependency (plan D9 dropped), since a disabled dependency stops its dependent loading. Its readers check whether session-telemetry is enabled; when not, they say so with its install line and carry on.
- D3 (owner): session-telemetry is not on by default; plugin-diagnostics is.
- D12:
skill-usage.jsonlgets a 10 MiB cap with one rotated copy. - Hook-unit rule (owner): a hook unit never depends on a skill, an agent or any file of another plugin.
Key interfaces
The hook-telemetry contract (sink values), the prerequisites contract, a new session-telemetry data-path contract (sink options and launcher) that harness-ops' observability, audit-skill-visibility and setup skills read with a fallback. Pre-flight: list every reader of the moved data and options, every @harness-ops resolver, the node-notice references, and CI lanes that load harness-ops.
Review criterion (owner): "Make sure we're applying solid principles: Single Responsibility Principle, DRY, Single Source of Truth principle, so no duplication. Make sure we're adhering to general good practice, best practice, and software engineering principles: low coupling, high cohesion; things that change together live together; feature vertical slice architecture."
Done when
- AC24, AC25: always-on lists both units; the setup's hook-plugin question covers them.
- Neither unit's hooks reference another plugin's files (grep of their
hooks/folders finds no other plugin path). -
scripts/sync-shared-copies.sh --checkexits 0. - guardrails' suite passes, including a headless settings-write ask returning a block with a reason.
- plugin-diagnostics launches
nodeonly throughnode-or-skipon the prerequisites row. - Q75 (b): with session-telemetry off, harness-ops' observability, audit-skill-visibility and setup skills each say it is not enabled, print its install line, and carry on with what they can still do;
plugins/harness-ops/.claude-plugin/plugin.jsondeclares no dependency on it. - AC7 (process criterion of the effort): carried by the container's PR.
Out of scope
- Renaming the published
-audittelemetry hook ids (recorded in the ADR instead).
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 15, 2026
Size: Large
Complexity: Medium
Uncertainty: Knowable
Flags: none
Blocked by: #16429
I read this as a request to split harness-ops' session-wide hooks into two hook-only plugins:
session-telemetry(collects telemetry about each session) andplugin-diagnostics(reports why installed plugins cannot run). guardrails takes the settings-write ask and the connected-page gate. The always-on profile swaps harness-ops and context-budget for the two new plugins, and harness-ops moves to harness-upkeep.The outcome and done-when list are exact, so I'm not asking the owner anything.
The work depends on #16429, which is still open, so I listed it as blocking. It also needs the pre-flight inventory the issue names: every reader of the moved data and options, every
@harness-opsresolver, the node-notice references, and CI lanes that load harness-ops. The work is large enough that it may need splitting into several pull requests.I found no duplicate among the open issues and no merged pull request that already covers this. It is a sibling of #16428.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 15, 2026
Not admitted to the issue lane yet: Size large: the split into sub-issues at intake is pending (owner Q93).
melodic-automation-lanes commentedon Nov 15, 2026
Split at intake (owner Q93). This issue is Size Large, so its done-when is split into 3 sub-issues, each holding its task-list lines as written.
Automated split by the lanes App. Admission waits on this issue while a sub-issue is open; work-unblock closes it as completed once every sub-issue is closed as completed by a merge or a listed human and its done-when is covered.
kyle-sexton commentedon Nov 16, 2026
The three parts filed by the intake size-split (#16438, #16439, #16441) are built host-run, as one pull request under this issue, by the background session
plugin-profiles-build-3(branchfeat/hook-units). That follows the owner's decision of three pull requests in this repository for the plugin-profiles work, and this issue's ownhost-runlabel.The split left no part with the work of creating
session-telemetryandplugin-diagnostics: each part only checks properties of those units, which is why the issue lane stopped on #16439 as an intent change. The parts did not inherithost-run, so the lane took #16438 once #16429 closed.Done by the control-hub session "Plugin Presets" on 2026-11-16:
host-runadded to Split harness-ops session hooks into session-telemetry and plugin-diagnostics - part 1 of 3 #16438, Split harness-ops session hooks into session-telemetry and plugin-diagnostics - part 2 of 3 #16439 and Split harness-ops session hooks into session-telemetry and plugin-diagnostics - part 3 of 3 #16441, so lanes stay off them.The hook-unit pull request will close the three parts with this issue when it delivers their done-when items. Please do not re-split or re-admit them.
kyle-sexton commentedon Nov 16, 2026
Decision recorded. Owner, 2026-11-16: "go w/ recomendations". The recommendation was to close #16517, #16438 and #16437 on guardrails' unit suites plus the #16438 headless transcript, with the criterion "a headless settings-write ask returning a block with a reason" reworded to "the guard fires with its reason and the write is blocked".
dceb40c8b5d6e6704850c0416adf28e16f249563.plugins/guardrails/hooks/on main holdssettings-write-ask.mjsandconnected-page-gate.mjswith their test files, and no check run failed at the merged head859539c87a294bbd6b4eb48e94a60c4924f3ecfd.always-on.yamlno longer lists context-budget;harness-upkeep.yamllists it.859539c8, sessioned867279-4407-4ac6-8858-edbf3cc29564): a write to a.claude/settings.jsonwas tried; the hook returnedaskwith its reason; Claude Code's own settings-file check then rejected the write with its own text; the file was not written. The transcript is kept on the owner's machine.askreaching a person as a prompt, since Claude Code's own check rejected the write first. That is why the criterion was reworded. The guard's probe note is updated to say what this run measured in a follow-up pull request.The hook-unit split itself (session-telemetry and plugin-diagnostics) shipped in #16519, merged as
24e622cf.