Repository navigation
Description
Refs: #7581
Refs: #7555
Blocked by #9193
Summary
/debugging:analyze-profile should only analyze. Today it also records profiles: a Capture mode
that picks a profiler by symptom, launches or attaches to a process, and runs elevated commands
through a shown script. The design moves capture to /app-control:drive capture --kind ..., which
is on main (plugins/app-control/skills/drive/SKILL.md:3, :35). This slice removes capture from
analyze-profile and points capture requests at drive.
Slice D3 of PLAN Phase 13 (topic poteto-review), "Debugging: /debugging:analyze-profile only
analyzes (drop capture)". D1 (#8824, compare and retainers) and D2 (#8825, debug minimize,
pristine-copy diff, HITL note) are closed. compare already ships
(plugins/debugging/skills/analyze-profile/SKILL.md:152), so this slice adds no query feature.
Attended build (not lane). It removes skill text, and a cut to an existing skill ships only
when its evals show no loss (plugins/playbooks/skills/skill-authoring/reference/skill-criteria.md:21,
AGENTS.md Code Review Rules). The before/after eval runs and their comparison need a person to
read and accept them.
Predicted pr-merge risk: HIGH, for two reasons.
- The diff edits
scripts/em-dash-purged-paths.txt(see Fix step 7), andscripts/**is on the
HIGH floor (plugins/source-control/skills/babysit-prs/scripts/babysit_risk.py:214). - It deletes the eval case
plugins/debugging/evals/capture-asks-before-profiling/. At the base,
that case'scase.yamlnamesscaffold_script: scaffold.sh(case.yaml:7), and its
scaffold.shis mode 100755. A case that names a scaffold "at the base ... or on either side of
the diff", or any mode 100755 file underplugins/<plugin>/evals/, rates HIGH as
eval-scaffold-review-required(babysit_risk.py:48-57).
The frontmatter change itself touches only description and argument-hint, which are not
capability keys (babysit_risk.py:748).
Current behavior (origin/main ba598f0)
- Description advertises capture mode and the trigger
'profile this process'
(plugins/debugging/skills/analyze-profile/SKILL.md:2); argument-hint is
[<artifact path>|capture <symptom and process>](:3); the arguments example shows a capture
call (:11-12). - The mode table has a "Capture, then load" row (
:37-43). ## Capture mode(:93-113): human-present rule, pick by symptom, launch under the profiler,
attach only with consent, elevation through a script file, then load.- "What this skill does NOT do" names capture mode twice (
:130-132). reference/capture-by-symptom.md(45 lines) is loaded only by capture mode
(capture-by-symptom.md:3; referenced fromSKILL.md:102).- Skill evals 4, 5 and 6 test capture:
capture-asks-before-launching,
capture-refuses-with-no-one-present,elevated-attach-goes-through-a-shown-script
(plugins/debugging/skills/analyze-profile/evals/evals.json:45-84). - Plugin eval cases
plugins/debugging/evals/capture-asks-before-profiling/and
plugins/debugging/evals/capture-refuses-unattended/test capture
(capture-asks-before-profiling/case.yaml:3-4,capture-refuses-unattended/case.yaml:3-4). plugins/debugging/README.md:18says "or record one first with your approval".plugins/debugging/prerequisites.jsonlists profilers forskill:analyze-profile. Some only
record: py-spy (:37-42), jcmd (:57-62), dotnet-stack (:103-108), heaptrack (:136-141),
gdb (:146-151), sample (:166-171), spindump (:176-181), leaks (:186-191). Some also
read or convert an existing file in load mode: jfr (:67-72), go (:116-121), perf
(:126-131), addr2line (:156-161);other-formats.md:10usesperf report/perf script.
Some degrade lines mix both: node (:27), memray (:52), dotnet-trace (:82), dotnet-gcdump
(:95).
Callers that stay valid: /debugging:debug hands an artifact to analyze-profile
(plugins/debugging/skills/debug/SKILL.md:152, :228, :347), /performance:target
(plugins/performance/skills/target/SKILL.md:111), /testing:diagnose
(plugins/testing/skills/diagnose/SKILL.md:2), and drive's ## Next
(plugins/app-control/skills/drive/SKILL.md:83). None of them call capture mode.
Fix
SKILL.md: drop the capture clause and the'profile this process'trigger from the
description, add a Skip clause routing a capture request to/app-control:drive capture,
make argument-hint[<artifact path>], and drop the capture example. Replace the mode table
with one line: no artifact means/app-control:drive capture --kind <trace|cpu|heap>, then
come back with the file. Delete## Capture mode. Reword the two "does NOT" bullets so the
skill never starts the program and sends new recordings to drive. Load mode text stays.- Delete
reference/capture-by-symptom.md. - Delete skill evals 4-6 and the two plugin eval cases above. Add one case where a capture
request ("profile this process", no artifact) routes to/app-control:drive captureand runs
no profiler. README.md:18: drop "or record one first with your approval".prerequisites.json: remove the record-only entries; for the read-or-convert entries and the
mixed ones, keep the entry and reworddegradeto the load-mode use only.- Changelog fragment for
debugging. - Remove
plugins/debugging/skills/analyze-profile/reference/*.mdfrom
scripts/em-dash-purged-paths.txt:219. After step 2 that glob matches no tracked file (the
format pages sit underreference/formats/, which line 220 covers), and the em-dash gate fails
on a stale entry (scripts/check-purged-em-dashes.sh:36,:250).
Open questions (decide before building)
- Q1. Where does the symptom-to-capture table go? Drive "implements no capture and picks no
tool of its own" and reports a gap when the control skill names no tool
(plugins/app-control/skills/drive/SKILL.md:62-65)./app-control:mapis not on main (only
skills/drive/exists underplugins/app-control/). Options: (a) delete the table outright;
(b) move it to drive'sreference/control-skill.mdas guidance for authoring a control skill's
## Capturesection (control-skill.md:20); (c) park it until/app-control:maplands and
generates## Capture. Recommendation: (b). Basis: judgment; it keeps the knowledge where a
control skill's## Capturegets written, without drive picking a tool. - Q2. Consent coverage moves or is lost. Evals 4-6 assert ask-before-launch, refuse when no
one is present, and elevation through a shown script. Drive's evals cover unattended no-attach
(plugins/app-control/skills/drive/evals/evals.json:6-15) and a heap gap
(:18-31), but no attended ask-per-capture or elevated-attach case, and drive has no--attach
on main (drive/SKILL.md:3,:11). Options: (a) land drive's attended--attachbehind a
script (PLAN Phase 13 drive line; no issue for it exists yet: searchesapp-control attachand
drive --attachreturn only app-control: new plugin plus testing and debugging changes #7581, app-control: Electron and mobile capture #7562 and feat(app-control): add the app-control plugin with /app-control:drive #8816) first, then D3; (b) ship D3 now and record the consent gap in
the PR; (c) port evals 4-6 into drive's suite in this slice. Recommendation: (a). Basis: judgment;
removing the only consent-gated capture path before its replacement exists drops a guarded
behavior.
Verification
-
git grep -n -i -E 'capture mode|capture-by-symptom|record one first' -- plugins/debugging/skills/analyze-profile/SKILL.md plugins/debugging/README.md plugins/debugging/prerequisites.json
exits 1 (no match). -
bash scripts/check-purged-em-dashes.sh --checkexits 0. -
test ! -e plugins/debugging/skills/analyze-profile/reference/capture-by-symptom.md && test ! -e plugins/debugging/evals/capture-asks-before-profiling && test ! -e plugins/debugging/evals/capture-refuses-unattended
exits 0. -
jq -e '[.evals[].name | select(startswith("capture-") or . == "elevated-attach-goes-through-a-shown-script")] | length == 0' plugins/debugging/skills/analyze-profile/evals/evals.json
exits 0 (exits 1 on main). -
python3 -m pytest plugins/debugging/skills/analyze-profile/scriptsexits 0. -
bash plugins/skill-quality/scripts/check-skill.sh plugins/debugging/skills/analyze-profile
exits 0 (invocation perplugins/skill-quality/skills/check/SKILL.md:39,:105). - Before/after evals per
skill-criteria.md:173-190: before and after run concurrently with the
same flags; probe trigger rate with/skill-quality:check measure-invocation, and the load
cases (skill evals 1-3, plugin casesload-mode-stops-at-mechanism,
debug-hands-artifact-to-analyze-profile). Ship only on non-inferiority within 5 points on
mean case score and trigger rate, with no lost case. Both reports and
/docs-hygiene:compress compareoutput are linked in the PR. - The new routing case passes: a capture request names
/app-control:drive captureand runs no
profiler.
Related
- Parent thread: app-control: new plugin plus testing and debugging changes #7581 (app-control, testing and debugging), epic Epic: absorb Lauren Tan's and Matt Pocock's agent workflows (poteto-review) #7555. Source: PLAN Phase 13,
"Debugging" item and "Eval evidence: ... analyze-profile lose[s] text (... capture removal)". - Earlier slices: feat(debugging): add compare and shortest GC-root path to /debugging:analyze-profile's query script #8824 (D1), feat(debugging): add minimize, pristine-copy diff and HITL template note to /debugging:debug #8825 (D2), feat(app-control): add the app-control plugin with /app-control:drive #8816 (app-control drive).
Activity
github-actions commentedon Oct 22, 2026
Proposed work class: work-class: structural
Basis: automated intake triage; a maintainer confirms or changes it.
#9183 (comment)
This decision settles Q1 and Q2, so I'm not asking anything new. The remaining work still needs a person. The issue calls this an attended build, and someone has to read and accept the before/after eval comparison. It is also blocked by #9193. I've applied
needs-humanfor that. I found no likely duplicates.Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 22, 2026
Decision recorded. The owner accepted the recommendations (2026-10-22, "Yes, go with recommended."): Q1, the symptom-to-capture table moves to drive's
reference/control-skill.md; Q2, drive's attended--attachwith consent evals lands first, filed as #9193. This issue is blocked by #9193.test(debugging): freeze an invocation probe set for analyze-profile
fix(debugging): let analyze-profile find a writable work dir when mkt…
fix(debugging): stop at a named drive command and always mktemp the w…
test(debugging): relabel capture probes and add drive as a competitor
docs(app-control): date the macOS profiler record in control-skill
docs(upstream): re-derive analyze-profile line cites in cursor-pstack
test(debugging): state when the analyze-profile probe set was committed
docs(app-control): anchor the profiler manual pointers to their sections