@xynogen/pix-skills 0.10.6 → 0.10.7
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 +1 -0
- package/package.json +2 -2
- package/skills/report.md +90 -0
- package/src/index.ts +10 -1
- package/src/picker.ts +15 -2
package/README.md
CHANGED
|
@@ -169,6 +169,7 @@ as `/skill:<name>` slash commands.
|
|
|
169
169
|
| `long-task` | Multi-session build state in files: `init.sh`, `features.json`, `PROGRESS.md`, one commit per feature |
|
|
170
170
|
| `lsp` | Select, install with consent, and configure a language server in `.pi/lsp.json` |
|
|
171
171
|
| `readme` | Create or update a deployment-focused README in a fixed style |
|
|
172
|
+
| `report` | Short terminal-friendly report — verdict, one-line findings, star ratings, compact tables, ASCII diagrams |
|
|
172
173
|
| `review` | Strict code review by severity, ending in a Pass / Pass with suggestions / Fail verdict |
|
|
173
174
|
| `runner` | Generate or convert a task runner (just/make/mise/task/npm/sh; bundle with references) |
|
|
174
175
|
| `search` | Deep code discovery and project context mapping with grep, graph, and LSP |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-skills",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.7",
|
|
4
4
|
"description": "Pi extension \u2014 agent skill loader (skill tool + skills bundle)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@xynogen/pix-gate": "^0.4.0",
|
|
51
|
-
"@xynogen/pix-pretty": "^1.
|
|
51
|
+
"@xynogen/pix-pretty": "^1.36.0",
|
|
52
52
|
"@xynogen/pix-runtime": "^0.16.0"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/skills/report.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: report
|
|
3
|
+
description: Writes a short visual report that reads well in a terminal — verdict first, grouped one-line findings with file:line, star ratings, compact tables, small ASCII diagrams — with no wall of text. Use when the user asks for a "report", "laporan", "status report", or "write up what we did".
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
# Report
|
|
7
|
+
|
|
8
|
+
Goal: the reader sees the verdict and every real problem at a glance, in an 80-column terminal.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Collect facts from the conversation, code, and commands. Never report from memory.
|
|
13
|
+
2. Print the report in chat, in the user's language. Target 20 lines; never exceed 35.
|
|
14
|
+
|
|
15
|
+
## Format
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
**Verdict:** [status emoji] [one sentence: state + what blocks done]
|
|
19
|
+
|
|
20
|
+
**🔴 High**
|
|
21
|
+
- [symptom] — `file:line`
|
|
22
|
+
|
|
23
|
+
**🟡 Medium**
|
|
24
|
+
- [symptom] — `file:line`
|
|
25
|
+
|
|
26
|
+
[optional: star ratings, compact table, or ASCII diagram]
|
|
27
|
+
|
|
28
|
+
**Tests:** ✅ [n] pass · ✅ lint · ⚠️ [problem]
|
|
29
|
+
**Untested:** [area], [area], [area]
|
|
30
|
+
|
|
31
|
+
**Next:** [step] → [step] → [step]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Rules
|
|
35
|
+
|
|
36
|
+
Readers scan. They do not read every word. Write for the scan.
|
|
37
|
+
|
|
38
|
+
1. **Front-load.** Put the verdict on line 1. Start each line with its key word or number. Readers look most at the top and at the start of lines.
|
|
39
|
+
2. **Chunk.** Use at most 4 groups and at most 5 items in a group. Show the top 5 and add `+N more`. People keep about 4 items in mind at one time.
|
|
40
|
+
3. **Signal only what matters.** Use bold only for labels. When everything has a mark, nothing stands out.
|
|
41
|
+
4. **One mark per meaning.** Show severity with one emoji: ✅ ❌ ⚠️ 🔴 🟡 🟢. Put a text label next to it. People read emoji differently.
|
|
42
|
+
5. **Evidence beside the claim.** Put `file:line` on the same line as the symptom. Do not state a fact two times. The eye must not jump.
|
|
43
|
+
6. **Bars for judgments.** Show quality with stars out of 5: `Tests ★★☆☆☆`. People read length faster than words. Keep exact counts as numbers.
|
|
44
|
+
7. **Fit the terminal.** Keep lines to 80 characters or less. Do not use `#` headings or nested bullets. Put one blank line between groups.
|
|
45
|
+
|
|
46
|
+
**Language:** write in the user's language with STE100 rules (common words, short active sentences, one fact per sentence), in that language's own grammar. Keep standard English technical terms as-is (`signature resistance`, `passive PoE`, `race condition`); never translate them literally. Keep code names, paths, and errors exact.
|
|
47
|
+
|
|
48
|
+
## Visual tools
|
|
49
|
+
|
|
50
|
+
Use one only when it beats a bullet.
|
|
51
|
+
|
|
52
|
+
| Data | Tool | Limit |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| Quality, fit, confidence | Stars `★★★☆☆` | Out of 5 |
|
|
55
|
+
| Same fields over 3+ items | Compact table | ≤ 4 columns, ≤ 80 chars, no sentences |
|
|
56
|
+
| Flow, layers, before/after | ASCII diagram | ≤ 8 lines, ≤ 70 chars, code block, mark the problem |
|
|
57
|
+
|
|
58
|
+
## Content
|
|
59
|
+
|
|
60
|
+
- One line per finding: symptom, then `file:line`. No cause or fix advice in it.
|
|
61
|
+
- No paragraphs, no intro, no outro. Strengths go in a star rating, not a list.
|
|
62
|
+
- Keep exact numbers, paths, status codes, names. Cut everything else.
|
|
63
|
+
- Mark unchecked facts `(unverified)`. Never invent results.
|
|
64
|
+
- Drop empty groups. If nothing is broken, write `**Fix:** ✅ none`.
|
|
65
|
+
- The user asks for more on one item ("detail #1") → explain only that item.
|
|
66
|
+
|
|
67
|
+
## Example
|
|
68
|
+
|
|
69
|
+
````markdown
|
|
70
|
+
**Verdict:** ⚠️ Intrusion feature (6 commits) is sound; 4 fixes before prod.
|
|
71
|
+
|
|
72
|
+
**🔴 High**
|
|
73
|
+
- Worker can resolve another camera's event — `intrusion_service.py:209`
|
|
74
|
+
- Concurrent uploads overwrite MinIO evidence — `intrusion_service.py:236`
|
|
75
|
+
|
|
76
|
+
**🟡 Medium**
|
|
77
|
+
- Re-resolve returns 200, not 409 — `intrusion_repository.py:216`
|
|
78
|
+
- Config upsert not atomic; parallel PUT → 500 — `intrusion_repository.py:59`
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
worker ─▶ service ─▶ PostgreSQL ✅ tx
|
|
82
|
+
└──────▶ MinIO 🔴 same key, no lock
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Quality:** Design ★★★★☆ · Tests ★★☆☆☆ · Consistency ★★★☆☆
|
|
86
|
+
**Tests:** ✅ 584 pass · ✅ ruff · ⚠️ 6 files unformatted
|
|
87
|
+
**Untested:** monitoring, analytics, roles, concurrency, PG + MinIO
|
|
88
|
+
|
|
89
|
+
**Next:** fix 🔴 → regression tests → align types with height/thermal
|
|
90
|
+
````
|
package/src/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { copyFile, mkdir, readFile, realpath, rename, rm, stat } from "node:fs/p
|
|
|
16
16
|
import { dirname, isAbsolute, join, relative, resolve, win32 } from "node:path";
|
|
17
17
|
import { type ExtensionAPI, stripFrontmatter } from "@earendil-works/pi-coding-agent";
|
|
18
18
|
import { Text } from "@earendil-works/pi-tui";
|
|
19
|
+
import { type FadeTheme, fadeTextRow } from "@xynogen/pix-pretty/text";
|
|
19
20
|
import {
|
|
20
21
|
dotJoin,
|
|
21
22
|
formatCollapsedToolRow,
|
|
@@ -737,8 +738,16 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
737
738
|
component.setText(formatRemoteSkillSearchSummary(details.query, details.results, theme));
|
|
738
739
|
return options.isPartial ? component : frameToolResult(component, theme, false);
|
|
739
740
|
}
|
|
741
|
+
const body = formatSkillSummary(formatExpandedSkillResult(details, text ?? ""), theme);
|
|
742
|
+
// Long skill bodies collapse to a fading preview; ctrl+o shows the full text.
|
|
740
743
|
component.setText(
|
|
741
|
-
|
|
744
|
+
options.expanded
|
|
745
|
+
? body
|
|
746
|
+
: fadeTextRow(body, theme as FadeTheme, (n) =>
|
|
747
|
+
renderCtx.keyHint
|
|
748
|
+
? renderCtx.keyHint("app.tools.expand", `+${n} lines`)
|
|
749
|
+
: theme.fg("muted", `+${n} lines (ctrl+o to expand)`),
|
|
750
|
+
),
|
|
742
751
|
);
|
|
743
752
|
return options.isPartial ? component : frameToolResult(component, theme, false);
|
|
744
753
|
}
|
package/src/picker.ts
CHANGED
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { CustomEditor, type ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
10
|
-
import { fuzzyFilter, matchesKey, type TUI
|
|
10
|
+
import { fuzzyFilter, matchesKey, mixColors, type TUI } from "@earendil-works/pi-tui";
|
|
11
11
|
import { chipTag, SKILL_TAG } from "@xynogen/pix-pretty/chips";
|
|
12
12
|
import { frameLines, modalWidth } from "@xynogen/pix-pretty/modal-frame";
|
|
13
|
+
import { fadeLine } from "@xynogen/pix-pretty/text";
|
|
13
14
|
import { showTransientMessage } from "@xynogen/pix-pretty/transient-error";
|
|
14
15
|
import type { ThemeLike } from "@xynogen/pix-pretty/types";
|
|
15
16
|
import { getErrorMessage } from "@xynogen/pix-pretty/utils";
|
|
@@ -174,6 +175,18 @@ export class SkillPicker {
|
|
|
174
175
|
}`,
|
|
175
176
|
"",
|
|
176
177
|
];
|
|
178
|
+
// Overflow fades into the modal background instead of ending in "…".
|
|
179
|
+
const { colors, style } = theme as Partial<{
|
|
180
|
+
colors: Record<string, Parameters<typeof mixColors>[0]>;
|
|
181
|
+
style: (text: string, options: { fg: ReturnType<typeof mixColors> }) => string;
|
|
182
|
+
}>;
|
|
183
|
+
const muted = colors?.muted;
|
|
184
|
+
const base = colors?.customMessageBg;
|
|
185
|
+
// Ease in over a wide ramp and stop short of the background: a quiet fade, not a cutoff.
|
|
186
|
+
const fade = (text: string, amount: number) =>
|
|
187
|
+
muted && base && style
|
|
188
|
+
? style.call(theme, text, { fg: mixColors(muted, base, amount ** 1.6 * 0.8) })
|
|
189
|
+
: theme.fg(amount < 0.5 ? "dim" : "muted", text);
|
|
177
190
|
if (!results.length) rows.push(theme.fg("muted", " no matching skills"));
|
|
178
191
|
for (const [i, item] of results.slice(start, start + MAX_VISIBLE).entries()) {
|
|
179
192
|
const isSel = start + i === this.selected;
|
|
@@ -181,7 +194,7 @@ export class SkillPicker {
|
|
|
181
194
|
const name = theme.fg(isSel ? "accent" : "dim", item.name);
|
|
182
195
|
const tag = theme.fg("muted", item.source ? "skills.sh" : "local");
|
|
183
196
|
rows.push(
|
|
184
|
-
|
|
197
|
+
fadeLine(`${marker} ${name} ${tag} ${theme.fg("muted", item.detail)}`, inner, fade, 12),
|
|
185
198
|
);
|
|
186
199
|
}
|
|
187
200
|
if (this.status) rows.push("", theme.fg("muted", ` ${this.status}`));
|