@wenaixi/dsh-superpower 7.4.1 → 7.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -105
- package/README.zh.md +216 -0
- package/lib/catalog.d.ts +8 -2
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +64 -9
- package/lib/catalog.js.map +1 -1
- package/lib/client.js +68 -21
- package/lib/document.d.ts +8 -2
- package/lib/document.d.ts.map +1 -1
- package/lib/document.js +14 -4
- package/lib/document.js.map +1 -1
- package/lib/superpowers.d.ts +2 -0
- package/lib/superpowers.d.ts.map +1 -1
- package/lib/superpowers.js +8 -0
- package/lib/superpowers.js.map +1 -1
- package/lib/switches.d.ts +2 -10
- package/lib/switches.d.ts.map +1 -1
- package/lib/switches.js +29 -5
- package/lib/switches.js.map +1 -1
- package/package.json +3 -3
- package/skills/brainstorming/SKILL.md +235 -171
- package/skills/brainstorming/spec-document-reviewer-prompt.md +27 -25
- package/skills/brainstorming/visual-companion.md +65 -69
- package/skills/diagnosing-superpowers/SKILL.md +107 -43
- package/skills/diagnosing-superpowers/prompts/analyst-common.md +32 -18
- package/skills/diagnosing-superpowers/prompts/cost-and-time.md +25 -9
- package/skills/diagnosing-superpowers/prompts/plan-adherence.md +26 -12
- package/skills/diagnosing-superpowers/prompts/quality-evidence.md +23 -8
- package/skills/diagnosing-superpowers/prompts/repeated-work.md +25 -14
- package/skills/diagnosing-superpowers/prompts/request-conflicts.md +18 -9
- package/skills/diagnosing-superpowers/prompts/scrub-audit.md +23 -10
- package/skills/diagnosing-superpowers/prompts/scrub.md +25 -12
- package/skills/diagnosing-superpowers/prompts/similar-session.md +30 -22
- package/skills/diagnosing-superpowers/prompts/skill-timeline.md +26 -12
- package/skills/diagnosing-superpowers/prompts/stumbles.md +24 -12
- package/skills/diagnosing-superpowers/references/context-safety.md +15 -7
- package/skills/diagnosing-superpowers/references/github-issues.md +17 -9
- package/skills/diagnosing-superpowers/references/redaction-policy.md +27 -15
- package/skills/diagnosing-superpowers/references/session-discovery.md +31 -20
- package/skills/diagnosing-superpowers/templates/bundle-README.md +66 -40
- package/skills/diagnosing-superpowers/templates/case.md +49 -42
- package/skills/diagnosing-superpowers/templates/issue.md +32 -26
- package/skills/diagnosing-superpowers/templates/report.md +54 -48
- package/skills/dispatching-parallel-agents/SKILL.md +92 -90
- package/skills/executing-plans/SKILL.md +345 -197
- package/skills/finishing-a-development-branch/SKILL.md +107 -82
- package/skills/receiving-code-review/SKILL.md +129 -127
- package/skills/requesting-code-review/SKILL.md +52 -50
- package/skills/requesting-code-review/code-reviewer.md +132 -111
- package/skills/subagent-driven-development/SKILL.md +521 -298
- package/skills/subagent-driven-development/implementer-prompt.md +138 -117
- package/skills/subagent-driven-development/re-review-prompt.md +80 -48
- package/skills/subagent-driven-development/task-reviewer-prompt.md +189 -110
- package/skills/systematic-debugging/CREATION-LOG.md +85 -85
- package/skills/systematic-debugging/SKILL.md +221 -219
- package/skills/systematic-debugging/condition-based-waiting.md +48 -49
- package/skills/systematic-debugging/defense-in-depth.md +46 -46
- package/skills/systematic-debugging/root-cause-tracing.md +63 -63
- package/skills/systematic-debugging/test-academic.md +10 -10
- package/skills/systematic-debugging/test-pressure-1.md +40 -40
- package/skills/systematic-debugging/test-pressure-2.md +58 -58
- package/skills/systematic-debugging/test-pressure-3.md +48 -48
- package/skills/test-driven-development/SKILL.md +161 -153
- package/skills/test-driven-development/writing-good-tests.md +137 -84
- package/skills/using-git-worktrees/SKILL.md +74 -72
- package/skills/using-superpowers/SKILL.md +40 -39
- package/skills/using-superpowers/references/dsh-tools.md +36 -36
- package/skills/verification-before-completion/SKILL.md +85 -83
- package/skills/writing-plans/SKILL.md +123 -84
- package/skills/writing-skills/SKILL.md +419 -417
- package/skills/writing-skills/persuasion-principles.md +118 -118
- package/skills/writing-skills/testing-skills-with-subagents.md +190 -190
|
@@ -1,54 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Visual Companion Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Browser-based visual brainstorming companion for showing mockups, diagrams, and options, built on DSH's official document preview.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## When to Use
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Decide per-question, not per-session. The test: **would the user understand this better by seeing it than reading it?**
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Use the browser preview** when the content itself is visual:
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
11
|
+
- **UI mockups** — wireframes, layouts, navigation structures, component designs
|
|
12
|
+
- **Architecture diagrams** — system components, data flow, relationship maps
|
|
13
|
+
- **Side-by-side visual comparisons** — comparing two layouts, two color schemes, two design directions
|
|
14
|
+
- **Design polish** — when the question is about look and feel, spacing, visual hierarchy
|
|
15
|
+
- **Spatial relationships** — state machines, flowcharts, entity relationships rendered as diagrams
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
**Use the terminal** when the content is text or tabular:
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
19
|
+
- **Requirements and scope questions** — "what does X mean?", "which features are in scope?"
|
|
20
|
+
- **Conceptual A/B/C choices** — picking between approaches described in words
|
|
21
|
+
- **Tradeoff lists** — pros/cons, comparison tables
|
|
22
|
+
- **Technical decisions** — API design, data modeling, architectural approach selection
|
|
23
|
+
- **Clarifying questions** — anything where the answer is words, not a visual preference
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
A question *about* a UI topic is not automatically a visual question. "What kind of wizard do you want?" is conceptual — use the terminal. "Which of these wizard layouts feels right?" is visual — use the browser preview.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## How It Works
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
You write HTML to a convention directory in the workspace; DSH's document preview reads and renders it. The user opens the file in the document sidebar to see it.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
**Selection results are not sent back to you automatically.** The preview is an isolated iframe document and cannot deliver your user's choices to the session. So: ask the user to answer in the terminal. Never claim to have read a click inside the preview.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Writing Files
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Write every page as a self-contained HTML document. Three hard requirements:
|
|
36
36
|
|
|
37
|
-
1.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
开关打开时才被打包。写单文件最稳。
|
|
41
|
-
3. **不依赖 iframe 外的能力。** 预览文档与宿主页面不共享上下文,
|
|
42
|
-
`window.parent` 拿不到任何东西。
|
|
37
|
+
1. **Full document.** The official preview wraps nothing and provides no ready-made CSS classes. `<div class="options">` means nothing here; nothing renders on the page.
|
|
38
|
+
2. **Self-contained.** Do not reference external relative CSS or scripts — relative dependencies are bundled only when interactive preview is enabled. A single file is safest.
|
|
39
|
+
3. **No outside-iframe capabilities.** The preview document does not share the host page context; `window.parent` gets nothing.
|
|
43
40
|
|
|
44
|
-
###
|
|
41
|
+
### Minimal example
|
|
45
42
|
|
|
46
43
|
```html
|
|
47
44
|
<!DOCTYPE html>
|
|
48
|
-
<html lang="
|
|
45
|
+
<html lang="en">
|
|
49
46
|
<head>
|
|
50
47
|
<meta charset="utf-8">
|
|
51
|
-
<title
|
|
48
|
+
<title>Layout options</title>
|
|
52
49
|
<style>
|
|
53
50
|
body { font: 15px/1.7 system-ui, sans-serif; margin: 0; padding: 40px; }
|
|
54
51
|
h1 { font-size: 20px; margin: 0 0 6px; }
|
|
@@ -60,65 +57,64 @@
|
|
|
60
57
|
</style>
|
|
61
58
|
</head>
|
|
62
59
|
<body>
|
|
63
|
-
<h1
|
|
64
|
-
<p class="subtitle"
|
|
60
|
+
<h1>Which layout fits better?</h1>
|
|
61
|
+
<p class="subtitle">Consider readability and visual hierarchy</p>
|
|
65
62
|
<div class="cards">
|
|
66
63
|
<div class="card">
|
|
67
|
-
<h3>A
|
|
68
|
-
<p
|
|
64
|
+
<h3>A Single column</h3>
|
|
65
|
+
<p>Best reading experience, lowest information density</p>
|
|
69
66
|
</div>
|
|
70
67
|
<div class="card">
|
|
71
|
-
<h3>B
|
|
72
|
-
<p
|
|
68
|
+
<h3>B Two columns</h3>
|
|
69
|
+
<p>Higher space utilization, needs extra style constraints</p>
|
|
73
70
|
</div>
|
|
74
71
|
</div>
|
|
75
72
|
</body>
|
|
76
73
|
</html>
|
|
77
74
|
```
|
|
78
75
|
|
|
79
|
-
|
|
76
|
+
In dark environments, switch colors to follow `prefers-color-scheme` or use neutral grays.
|
|
80
77
|
|
|
81
|
-
##
|
|
78
|
+
## Directory and Naming
|
|
82
79
|
|
|
83
|
-
|
|
80
|
+
Convention directory: `.superpowers/brainstorm/` under the project root. Delete it yourself when the session ends.
|
|
84
81
|
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
82
|
+
- Use semantic names: `platform.html`, `visual-style.html`, `layout.html`
|
|
83
|
+
- Do not reuse filenames — write a new file each iteration, `layout-v2.html`, `layout-v3.html`
|
|
84
|
+
- The user opens the specific file they were told about; tell them the new filename when you rewrite
|
|
88
85
|
|
|
89
|
-
|
|
86
|
+
If the project's `.gitignore` does not yet include `.superpowers/`, remind the user to add it.
|
|
90
87
|
|
|
91
|
-
##
|
|
88
|
+
## Loop Flow
|
|
92
89
|
|
|
93
|
-
1.
|
|
94
|
-
2.
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
3.
|
|
99
|
-
4.
|
|
100
|
-
5.
|
|
101
|
-
|
|
102
|
-
6. 重复直至完成。
|
|
90
|
+
1. **Write HTML** to the convention directory with file tools, not `cat`/heredoc (they flood the terminal).
|
|
91
|
+
2. **Tell the user what to expect and end the turn**:
|
|
92
|
+
- Remind the file path and how to open it in the right-hand document sidebar;
|
|
93
|
+
- Summarize in words what this page shows (e.g. "showing 3 layout options for the homepage");
|
|
94
|
+
- Ask them to answer in the terminal, and say where.
|
|
95
|
+
3. **Read the user's terminal reply.** This is the only selection return channel.
|
|
96
|
+
4. **Iterate or move on** — if feedback changes the current page, write a new version file.
|
|
97
|
+
5. **Clean up when back in the terminal** — delete HTML files no longer needed, so the user does not see stale problems in the document sidebar.
|
|
98
|
+
6. Repeat until done.
|
|
103
99
|
|
|
104
|
-
##
|
|
100
|
+
## Per-Question Decisions
|
|
105
101
|
|
|
106
|
-
|
|
102
|
+
Even after the user accepts the preview, decide per question whether it is worth drawing:
|
|
107
103
|
|
|
108
|
-
-
|
|
109
|
-
-
|
|
104
|
+
- **Use preview** for visual content — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
|
|
105
|
+
- **Use terminal** for text content — requirement questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
|
|
110
106
|
|
|
111
|
-
|
|
107
|
+
A question about a UI topic is not necessarily visual. "What does personality mean in this context?" is conceptual — use the terminal. "Which wizard layout feels better?" is visual — use the preview.
|
|
112
108
|
|
|
113
|
-
##
|
|
109
|
+
## Design Advice
|
|
114
110
|
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
111
|
+
- **Match fidelity to the question** — wireframes for layout questions, polish only for visual-fidelity questions
|
|
112
|
+
- **State the question on each page** — "Which looks more professional?" rather than just "pick one"
|
|
113
|
+
- **Iterate before pushing** — if feedback changes the page, write a new version first
|
|
114
|
+
- **At most 2-4 options per screen**
|
|
115
|
+
- **Use real content for important scenarios** — real copy and colors expose problems better than placeholder text
|
|
116
|
+
- **Keep mockups lean** — focus on layout and structure, not pixel perfection
|
|
121
117
|
|
|
122
|
-
##
|
|
118
|
+
## Cleanup
|
|
123
119
|
|
|
124
|
-
|
|
120
|
+
Delete every HTML file written this session. If a project directory was used, remind the user that the directory is in `.gitignore`.
|
|
@@ -1,58 +1,122 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: diagnosing-superpowers
|
|
3
|
-
description: "Superpower Skill
|
|
3
|
+
description: "Superpower Skill: Use when a superpowers session went wrong and your human partner wants to know why - repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, it took too long, why is it so expensive, what is it doing - or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness."
|
|
4
|
+
description_zh: "Superpower Skill:当 superpowers 会话出错、human partner 想查原因(重复工作、忽略计划、技能未触发、耗时过长、成本过高、结果不佳)或想为维护者建缺陷报告时,适用当前或历史会话。"
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# 诊断 superpowers
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
# Diagnosing Superpowers
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Overview
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Pin down with your human partner what went wrong in a session, read the
|
|
13
|
+
transcripts on disk, and report what happened with evidence. You report;
|
|
14
|
+
you do not diagnose superpowers. Whoever triages the bundle or the issue
|
|
15
|
+
decides whether superpowers changes.
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
**Core principle:** Every finding cites `path:line`. No citation, no
|
|
18
|
+
finding. Every number comes from the transcript or from a command you ran,
|
|
19
|
+
never from memory.
|
|
15
20
|
|
|
16
|
-
|
|
21
|
+
## Workflow
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
2. **定位。** 使用 `references/session-discovery.md` 把每个会话解析为经过验证的绝对文件系统路径。通过引用其首个 prompt 与时间戳来确认历史会话,并列出你拒绝的每个候选及其原因,没有则写"无"。枚举 subagent transcript。创建 `~/.superpowers/diagnosing-superpowers/<session-id>/`,把路径告诉你的 human partner,并按 `templates/case.md` 在其中填写 case 文件,遵循其对环境与技能观察的来源(provenance)规则。
|
|
20
|
-
3. **分诊。** 亲自阅读报告问题周围的区域。然后按维度并行派出分析师 subagent,每个 subagent 获得 case 文件路径、`prompts/analyst-common.md` 以及 `prompts/` 中的一个维度文件:`skill-timeline.md`、`plan-adherence.md`、`repeated-work.md`、`stumbles.md`、`quality-evidence.md`、`request-conflicts.md`、`cost-and-time.md`。transcript 较长时按回合范围拆分维度。丢弃任何缺少 `path:line` 的返回发现。
|
|
21
|
-
4. **报告。** 按顺序填满 `templates/report.md` 的每一节,写入 workspace,展示并给出路径。检查引用的内容实际证明了什么,并保留支撑性 case;符号链接别名不是冗余副本。
|
|
22
|
-
5. **GitHub issues** — 当报告 §7 显示"可能(possible)"或"很可能(likely)",或你的 human partner 要求时。按 `references/github-issues.md` 搜索已开与已关闭 issue 中的症状。展示匹配项并建议把报告附加到最接近的一条。若无匹配,填写 `templates/issue.md`,写入 workspace,展示确切文本,仅在批准后创建 issue。`gh` 无法附加文件;若存在 bundle,把路径交给你的 human partner 在浏览器中附加。
|
|
23
|
-
6. **导出** — 仅当你的 human partner 要求 bundle 时;绝不未经要求构建。若收集阶段的目标是缺陷报告,说一次"可按需提供已脱敏的 bundle",然后等待。询问脱敏级别,说明各级包含什么:skeleton(无工具结果正文)、evidence(仅被引用事件有正文)、full。按 `templates/bundle-README.md` 构建 bundle,派出 `prompts/scrub.md`,然后 `prompts/scrub-audit.md`,重复两者直到审计返回 CLEAN。完成 bundle 模板的证据检查与对账后,再展示最终脱敏日志、文件清单与隐私和证据结论。仅在批准后归档(`zip -r` 或 `tar -czf`)。给出归档路径时,说明其包含内容、指出脱敏日志中的替换,并说明脱敏可能遗漏:他们必须在分享前审阅每个文件。
|
|
24
|
-
7. **相似会话** — 应要求时。把已确认的发现转为签名(signature),按 mtime 与大小列出候选,找出标记行号,对每个候选并行派出 `prompts/similar-session.md`,并把报告 §9 追加进去。
|
|
23
|
+
Create a todo per step. Steps 5–7 run only on their stated condition.
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
1. **Problem intake.** Ask one question at a time until you can write a
|
|
26
|
+
statement naming the session(s), the turn range if known, what your
|
|
27
|
+
partner expected, what happened, and the observable they care about
|
|
28
|
+
(wall-clock, tokens, repeated actions, one specific action). "It took
|
|
29
|
+
too long" is a complaint, not a problem statement. Note whether the
|
|
30
|
+
goal is a superpowers bug report.
|
|
31
|
+
2. **Locate.** Resolve each session to verified absolute filesystem paths using
|
|
32
|
+
`references/session-discovery.md`. Confirm a past session by quoting its
|
|
33
|
+
first prompt and timestamp, and list every candidate you rejected with the
|
|
34
|
+
reason, or "none". Enumerate subagent transcripts. Create
|
|
35
|
+
`~/.superpowers/diagnosing-superpowers/<session-id>/`, tell your
|
|
36
|
+
partner the path, and fill `templates/case.md` there, following its
|
|
37
|
+
provenance rules for environment and skill observations.
|
|
38
|
+
3. **Triage.** Read the region around the reported problem yourself. Then
|
|
39
|
+
dispatch one analyst subagent per dimension in parallel, each given the
|
|
40
|
+
case file path, `prompts/analyst-common.md`, and one dimension file from
|
|
41
|
+
`prompts/`: `skill-timeline.md`,
|
|
42
|
+
`plan-adherence.md`, `repeated-work.md`, `stumbles.md`,
|
|
43
|
+
`quality-evidence.md`, `request-conflicts.md`, `cost-and-time.md`.
|
|
44
|
+
Split a dimension by turn range when the transcript is long. Discard
|
|
45
|
+
any returned finding without `path:line`.
|
|
46
|
+
4. **Report.** Fill every section of `templates/report.md` in order, write
|
|
47
|
+
it to the workspace, show it, and give the path. Check what cited content
|
|
48
|
+
actually proves and preserve the supporting case; a symlink alias is not a
|
|
49
|
+
redundant copy.
|
|
50
|
+
5. **GitHub issues** — when report §7 says possible or likely, or your
|
|
51
|
+
partner asks. Search open and closed issues for the symptoms per
|
|
52
|
+
`references/github-issues.md`. Show matches and suggest adding the
|
|
53
|
+
report to the closest. If none match, fill `templates/issue.md`, write
|
|
54
|
+
it to the workspace, show the exact text, and create the issue only
|
|
55
|
+
after approval. `gh` cannot attach files; if a bundle exists, give
|
|
56
|
+
your partner its path to attach in the browser.
|
|
57
|
+
6. **Export** — only when your partner asks for a bundle; never build one
|
|
58
|
+
unprompted. If the intake goal was a bug report, say once that a
|
|
59
|
+
scrubbed bundle is available on request, then wait. Ask the redaction
|
|
60
|
+
level, stating what each includes: skeleton (no tool-result bodies),
|
|
61
|
+
evidence (bodies only for cited events), full. Build the bundle per
|
|
62
|
+
`templates/bundle-README.md`, dispatch `prompts/scrub.md`, then
|
|
63
|
+
`prompts/scrub-audit.md`, repeating both until the audit returns CLEAN.
|
|
64
|
+
Complete the bundle template's evidence check and reconciliation before
|
|
65
|
+
showing the final scrub log, file list, and privacy and evidence outcomes.
|
|
66
|
+
Archive (`zip -r` or `tar -czf`) only after approval. With the archive
|
|
67
|
+
path, state what it contains, point at the scrub log for replacements, and
|
|
68
|
+
say scrubbing can miss things: they must review every file before sharing.
|
|
69
|
+
7. **Similar sessions** — when asked. Turn confirmed findings into a
|
|
70
|
+
signature, list candidates by mtime and size, find marker line numbers,
|
|
71
|
+
dispatch `prompts/similar-session.md` per candidate in parallel, and
|
|
72
|
+
append report §9.
|
|
27
73
|
|
|
28
|
-
|
|
74
|
+
## Quick reference
|
|
29
75
|
|
|
30
|
-
|
|
76
|
+
All seven analysts always run. This table says which region to read
|
|
77
|
+
yourself in step 3 and which findings to lead with in the verdict.
|
|
78
|
+
|
|
79
|
+
| Complaint | Read first, lead with |
|
|
31
80
|
|---|---|
|
|
32
|
-
| "
|
|
33
|
-
| "
|
|
34
|
-
| "
|
|
35
|
-
| "
|
|
36
|
-
| "
|
|
37
|
-
| "
|
|
38
|
-
|
|
39
|
-
##
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
81
|
+
| "It took too long" | cost-and-time, stumbles |
|
|
82
|
+
| "Why did it do this extra work?" | repeated-work, plan-adherence |
|
|
83
|
+
| "Why is it so expensive?" | cost-and-time |
|
|
84
|
+
| "What the hell is it doing?" (still running) | skill-timeline; note in-progress in coverage |
|
|
85
|
+
| "It ignored the plan" | plan-adherence, compaction lines first |
|
|
86
|
+
| "Skill X never fired" | skill-timeline |
|
|
87
|
+
|
|
88
|
+
## Hard rules
|
|
89
|
+
|
|
90
|
+
- **Context safety.** One transcript line can be a megabyte. Follow
|
|
91
|
+
`references/context-safety.md` on every session file, every time.
|
|
92
|
+
- **Read-only.** Never modify, move, or delete a session file.
|
|
93
|
+
- **Exact paths to subagents.** A subagent's "current session" is its
|
|
94
|
+
own. Pass absolute paths and ids.
|
|
95
|
+
- **Human prompts only.** Hook output, system reminders, and tool results
|
|
96
|
+
are not your partner's words. In a subagent transcript, "user" is the
|
|
97
|
+
parent agent.
|
|
98
|
+
- **No superpowers diagnosis.** Report §7 states involvement and stops.
|
|
99
|
+
Never name a defect in a skill or propose a change. Your partner
|
|
100
|
+
pressing for a fix does not waive this; point at the issue step and
|
|
101
|
+
mention that a bundle is available on request. No advice to your
|
|
102
|
+
partner either.
|
|
103
|
+
- **Approval gates.** No archive before your partner has seen the scrub
|
|
104
|
+
log and file list. No issue or comment before they approve the exact
|
|
105
|
+
text.
|
|
106
|
+
- **Intake before analysis.** Nothing in steps 2–7 starts until your
|
|
107
|
+
partner has answered. If they are away, write the questions and stop.
|
|
108
|
+
A statement you reconstructed for them is not an answer. An
|
|
109
|
+
already-scoped request — one specific event, what is running now, or
|
|
110
|
+
the analysis to run — is itself the statement: answer it, then ask.
|
|
111
|
+
A whole-session "why" is a complaint.
|
|
112
|
+
|
|
113
|
+
## Red Flags
|
|
114
|
+
|
|
115
|
+
| Thought | Reality |
|
|
52
116
|
|---------|---------|
|
|
53
|
-
| "
|
|
54
|
-
| "
|
|
55
|
-
| "
|
|
56
|
-
| "
|
|
57
|
-
| "
|
|
58
|
-
| "
|
|
117
|
+
| "The problem is obvious, skip intake" | The problem statement scopes everything. Ask. |
|
|
118
|
+
| "They're away, so I'll reconstruct the statement" | You cannot reconstruct what they wanted. Write the questions and stop. |
|
|
119
|
+
| "I'll sweep everything now and ask at the end" | An unscoped sweep spends their budget on the wrong question. Ask first. |
|
|
120
|
+
| "They want a bug report, so I'll build the bundle now" | The bundle is their session data, packaged. Build it only when they ask for it. |
|
|
121
|
+
| "Small, targeted edit, no restructuring needed" | Not your call, however small. Report the evidence; the triager decides. |
|
|
122
|
+
| "The price per token is well known" | Numbers you did not compute from the transcript are invented. Cite or drop. |
|
|
@@ -1,24 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
You are an analyst subagent. You read a coding-agent session transcript on
|
|
2
|
+
disk and return findings with evidence. You do not fix anything, you do not
|
|
3
|
+
modify any file under the session store, and you do not say what
|
|
4
|
+
superpowers should change.
|
|
5
|
+
|
|
6
|
+
Inputs (from your dispatcher):
|
|
7
|
+
- CASE: absolute path of the case file. Read it first. It names the session
|
|
8
|
+
files, the discovered sources and record meanings to use, and the
|
|
9
|
+
context-safety rules you must follow. Use the recorded meanings rather than
|
|
10
|
+
repeating discovery or assuming a harness format.
|
|
11
|
+
- RANGE (optional): a turn range or line range. If present, analyze only
|
|
12
|
+
that range and say so in your Checked line.
|
|
13
|
+
|
|
14
|
+
Context safety: follow `references/context-safety.md`, named in CASE, on
|
|
15
|
+
every file before reading it, and extract fields with the recorded commands or
|
|
16
|
+
queries. "The current session" is not a thing you can look at: use only the
|
|
17
|
+
paths in CASE.
|
|
18
|
+
|
|
19
|
+
Human prompts are the records the case file identifies as human-typed. Hook
|
|
20
|
+
output, system reminders, and tool results are not human prompts. In a subagent
|
|
21
|
+
transcript, "user" is the parent agent.
|
|
22
|
+
|
|
23
|
+
Return format (nothing else):
|
|
12
24
|
|
|
13
25
|
```
|
|
14
|
-
##
|
|
26
|
+
## <Dimension> findings
|
|
15
27
|
|
|
16
|
-
- finding:
|
|
17
|
-
evidence:
|
|
18
|
-
turns:
|
|
19
|
-
confidence:
|
|
28
|
+
- finding: <one sentence, what happened>
|
|
29
|
+
evidence: <absolute path>:<line> — "<quote, at most 200 characters>"
|
|
30
|
+
turns: <first human turn>–<last human turn>
|
|
31
|
+
confidence: high | medium | low
|
|
20
32
|
|
|
21
|
-
Checked:
|
|
33
|
+
Checked: <what you examined: files, line ranges, commands used>
|
|
22
34
|
```
|
|
23
35
|
|
|
24
|
-
|
|
36
|
+
The dispatcher discards any finding without a `path:line`, so do not
|
|
37
|
+
write one. If you found nothing, return `- none found` and the Checked
|
|
38
|
+
line.
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
Read `prompts/analyst-common.md` first; it gives your role, inputs,
|
|
2
|
+
context-safety rules, and the return format. This file adds the dimension.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
Dimension: Cost and time
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Account for where tokens and wall-clock went.
|
|
6
7
|
|
|
7
|
-
1.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
1. Tokens. Use only the usage records and counter meanings established in the
|
|
9
|
+
case file. State whether each counter is incremental or cumulative before
|
|
10
|
+
calculating totals; difference cumulative observations without turning a
|
|
11
|
+
missing observation into zero. Report the five turns with the largest
|
|
12
|
+
supported totals and the supported totals per associated session.
|
|
13
|
+
2. Wall-clock. Use the evidenced timestamp fields, event boundaries, and units
|
|
14
|
+
recorded in the case file. Report the five longest supported turns and any
|
|
15
|
+
gap longer than ten minutes between consecutive events (idle, waiting on an
|
|
16
|
+
associated session, or waiting on your human partner; say which only when
|
|
17
|
+
the records show it).
|
|
18
|
+
3. Largest tool results: use the case file's evidenced tool-result records to
|
|
19
|
+
report the ten largest results with their tool and turn. Measure records
|
|
20
|
+
before extracting bounded content.
|
|
21
|
+
4. Compactions: count and locate records whose meaning as compaction events was
|
|
22
|
+
established during discovery. Report available before/after counters and
|
|
23
|
+
what the session was doing when each fired; mark unsupported fields absent.
|
|
24
|
+
5. Associated sessions: count them and report supported usage, duration, and
|
|
25
|
+
dispatching turn for each.
|
|
26
|
+
6. Report the turns, subagents, tools, or repeats that dominate the
|
|
27
|
+
totals, with numbers. Do not speculate about why a
|
|
28
|
+
turn was expensive beyond what the transcript shows.
|
|
@@ -1,15 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
Read `prompts/analyst-common.md` first; it gives your role, inputs,
|
|
2
|
+
context-safety rules, and the return format. This file adds the dimension.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
Dimension: Plan adherence
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Recover the plan the session agreed to, then map each plan step to what
|
|
7
|
+
happened. "Plan" here means any agreed course of action, not git commits.
|
|
6
8
|
|
|
7
|
-
1.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
1. Find the agreed plan: a design or plan agreed in chat (look for the
|
|
10
|
+
assistant text preceding a human "yes/ok/go ahead"), a spec or plan file
|
|
11
|
+
written during the session (tool calls that write under `docs/`,
|
|
12
|
+
`plans/`, `specs/`, or any file the human named), a todo-list record whose
|
|
13
|
+
meaning was established in the case file, or any numbered checklist in
|
|
14
|
+
assistant text. Quote each plan step with its `path:line`.
|
|
15
|
+
2. Mark structural events between the plan and its execution: compaction
|
|
16
|
+
events identified during discovery, resumes, aborted turns, and associated
|
|
17
|
+
session dispatches. Note their line numbers; plan drift right after one of
|
|
18
|
+
these is a distinct finding.
|
|
19
|
+
3. For each plan step, find the tool calls and assistant text that
|
|
20
|
+
executed it, or establish that none did. Report:
|
|
21
|
+
- steps skipped (no execution found; quote the plan step);
|
|
22
|
+
- steps executed out of order (line numbers show the order);
|
|
23
|
+
- steps silently changed (execution differs from the plan step in a
|
|
24
|
+
way the assistant never announced; quote both);
|
|
25
|
+
- steps invented (work done that no plan step covers);
|
|
26
|
+
- drift immediately after a structural event (cite the event line and
|
|
27
|
+
the first divergent action).
|
|
28
|
+
4. If there is no recoverable plan, say so as the only finding, with
|
|
29
|
+
the lines you checked.
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
Read `prompts/analyst-common.md` first; it gives your role, inputs,
|
|
2
|
+
context-safety rules, and the return format. This file adds the dimension.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
Dimension: Quality evidence
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Judge the process against its own claims. This is not a code review; do
|
|
7
|
+
not evaluate the code the session produced.
|
|
6
8
|
|
|
7
|
-
1.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
1. Tests: every test run (commands containing `test`, `pytest`, `npm test`,
|
|
10
|
+
`cargo test`, `go test`, `bats`, `bash tests/…`, or the project's runner
|
|
11
|
+
named in instruction files) with its result line. Report runs that
|
|
12
|
+
failed and what the assistant did next.
|
|
13
|
+
2. Verification behind claims: find assistant text claiming done, fixed,
|
|
14
|
+
passing, verified, works, complete. For each, look backward in the same
|
|
15
|
+
turn for a tool result that shows it (a test run, a command output, a
|
|
16
|
+
diff). Report claims with no supporting result in that turn.
|
|
17
|
+
3. Commits: every `git commit` with its message; compare each message to
|
|
18
|
+
the tool calls in the preceding turn(s). Report commits whose message
|
|
19
|
+
claims work that no tool call performed, and work performed that was
|
|
20
|
+
never committed when the agreed plan said it would be.
|
|
21
|
+
4. Review feedback: where a reviewer (human or subagent) raised points,
|
|
22
|
+
find the response. Report points acknowledged but not acted on, and
|
|
23
|
+
points dismissed without a stated reason.
|
|
24
|
+
5. Acceptance criteria: if the case file's problem statement or the
|
|
25
|
+
agreed plan states criteria, report each as met / not met /
|
|
26
|
+
not checked with the evidence line.
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
Read `prompts/analyst-common.md` first; it gives your role, inputs,
|
|
2
|
+
context-safety rules, and the return format. This file adds the dimension.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
Dimension: Repeated work
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Find work the session did more than once.
|
|
6
7
|
|
|
7
|
-
1.
|
|
8
|
-
|
|
8
|
+
1. Extract every tool call as `(line, turn, tool, key)` where `key` is: the
|
|
9
|
+
file path for reads/edits/writes; the command text for shell calls (strip
|
|
10
|
+
trailing whitespace; keep the whole command); the `description` plus the
|
|
11
|
+
first 80 characters of the prompt for subagent dispatches; the query for
|
|
12
|
+
searches.
|
|
13
|
+
2. Group by `(tool, key)` and report the groups at or over threshold:
|
|
9
14
|
|
|
10
|
-
|
|
|
15
|
+
| Category | Threshold | Exempt |
|
|
11
16
|
|---|---|---|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
| shell
|
|
15
|
-
| subagent
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
| reads, searches | 3 | |
|
|
18
|
+
| edits | 2 | |
|
|
19
|
+
| shell commands | 2 | status checks and test runs (`git status`, `ls`, `pwd`, test runners) |
|
|
20
|
+
| subagent dispatches | 2 with the same description | |
|
|
21
|
+
3. For each group, check whether anything changed between repetitions (a
|
|
22
|
+
write to that file, a compaction, a human correction). Say which case
|
|
23
|
+
it is; a re-read after an edit is not a finding, a re-read after a
|
|
24
|
+
compaction is a finding attributed to the compaction, a re-read with
|
|
25
|
+
nothing in between is a finding on its own.
|
|
26
|
+
4. Look for re-derived decisions: assistant text that reaches a conclusion
|
|
27
|
+
already stated earlier in the session (same file, same design choice,
|
|
28
|
+
same command to run). Quote both places.
|
|
29
|
+
5. One finding per group, with the first and last line numbers and the
|
|
30
|
+
count.
|