@gavin-hu/my-pi-agent 0.17.0 → 0.19.0
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 +61 -45
- package/README.zh-CN.md +54 -42
- package/docs/extensions/README.md +34 -0
- package/docs/extensions/board.md +344 -0
- package/{extensions/bytefly/README.md → docs/extensions/bytefly.md} +465 -416
- package/{extensions/check/README.md → docs/extensions/check.md} +83 -68
- package/{extensions/context/README.md → docs/extensions/context.md} +40 -23
- package/docs/extensions/file-browse.md +554 -0
- package/{extensions/file-open/README.md → docs/extensions/file-open.md} +31 -23
- package/{extensions/file-read/README.md → docs/extensions/file-read.md} +47 -55
- package/{extensions/goal/README.md → docs/extensions/goal.md} +115 -131
- package/{extensions/job/README.md → docs/extensions/job.md} +66 -53
- package/{extensions/memory/README.md → docs/extensions/memory.md} +74 -63
- package/docs/extensions/plan.md +976 -0
- package/{extensions/question/README.md → docs/extensions/question.md} +54 -28
- package/{extensions/rewind/README.md → docs/extensions/rewind.md} +115 -122
- package/docs/extensions/session-bus.md +285 -0
- package/{extensions/subagent/README.md → docs/extensions/subagent.md} +166 -119
- package/docs/extensions/team.md +226 -0
- package/{extensions/todo/README.md → docs/extensions/todo.md} +85 -88
- package/{extensions/watch/README.md → docs/extensions/watch.md} +60 -38
- package/{extensions/web-access/README.md → docs/extensions/web-access.md} +93 -50
- package/{extensions/wechat/README.md → docs/extensions/wechat.md} +275 -192
- package/{extensions/worktree/README.md → docs/extensions/worktree.md} +115 -72
- package/extensions/board/commands.ts +87 -0
- package/extensions/board/config.ts +36 -0
- package/extensions/board/format.ts +72 -0
- package/extensions/board/index.ts +40 -0
- package/extensions/board/input.ts +54 -0
- package/extensions/board/join.ts +42 -0
- package/extensions/board/page.ts +312 -0
- package/extensions/board/result.ts +99 -0
- package/extensions/board/rows.ts +48 -0
- package/extensions/board/schema.ts +75 -0
- package/extensions/board/seat.ts +29 -0
- package/extensions/board/snapshot.ts +41 -0
- package/extensions/board/tools.ts +279 -0
- package/extensions/board/transport/router.ts +172 -0
- package/extensions/board/transport/server.ts +149 -0
- package/extensions/board/types.ts +54 -0
- package/extensions/board/view/actions.ts +306 -0
- package/extensions/board/view/client.ts +41 -0
- package/extensions/board/view/keys.ts +121 -0
- package/extensions/board/view/live.ts +397 -0
- package/extensions/board/view/page.ts +158 -0
- package/extensions/board/view/render.ts +496 -0
- package/extensions/board/view/styles.ts +211 -0
- package/extensions/board/view/team.ts +305 -0
- package/extensions/board/writes.ts +99 -0
- package/extensions/bytefly/notify/types.ts +1 -1
- package/extensions/bytefly/panel/commands.ts +40 -7
- package/extensions/bytefly/panel/settings-runtime.ts +0 -6
- package/extensions/bytefly/panel/settings.ts +11 -21
- package/extensions/bytefly/panel/tui/settings-view.ts +1 -1
- package/extensions/bytefly/picker/discovery.ts +0 -2
- package/extensions/bytefly/picker/types.ts +0 -2
- package/extensions/bytefly/update/check.ts +39 -0
- package/extensions/bytefly/update/format.ts +15 -0
- package/extensions/bytefly/update/register.ts +73 -34
- package/extensions/bytefly/update/state.ts +6 -3
- package/extensions/context/tui.ts +1 -1
- package/extensions/file-browse/{config.ts → config/config.ts} +13 -4
- package/extensions/file-browse/{files.ts → files/files.ts} +1 -14
- package/extensions/file-browse/{paths.ts → files/paths.ts} +1 -1
- package/extensions/file-browse/{git.ts → git/git.ts} +10 -3
- package/extensions/file-browse/index.ts +4 -4
- package/extensions/file-browse/{live.ts → live/live.ts} +54 -82
- package/extensions/file-browse/live/rev.ts +42 -0
- package/extensions/file-browse/{router.ts → transport/router.ts} +44 -17
- package/extensions/file-browse/transport/server.ts +110 -0
- package/extensions/file-browse/view/chrome.ts +83 -0
- package/extensions/file-browse/{client.ts → view/client.ts} +63 -1
- package/extensions/file-browse/view/diff-html.ts +94 -0
- package/extensions/file-browse/{html.ts → view/html.ts} +32 -158
- package/extensions/file-browse/{icons.ts → view/icons.ts} +1 -1
- package/extensions/file-browse/{live-client.ts → view/live-client.ts} +47 -1
- package/extensions/file-browse/{markdown.ts → view/markdown.ts} +7 -7
- package/extensions/file-browse/{raw-html.ts → view/raw-html.ts} +1 -1
- package/extensions/file-browse/{styles.ts → view/styles.ts} +31 -5
- package/extensions/file-browse/{tree.ts → view/tree.ts} +1 -1
- package/extensions/file-browse/{urls.ts → view/urls.ts} +1 -1
- package/extensions/file-read/schema.ts +2 -1
- package/extensions/goal/plan-route.ts +8 -2
- package/extensions/job/index.ts +15 -7
- package/extensions/memory/store.ts +12 -5
- package/extensions/plan/blocks.ts +23 -2
- package/extensions/plan/commands.ts +77 -21
- package/extensions/plan/feedback.ts +409 -63
- package/extensions/plan/index.ts +7 -5
- package/extensions/plan/plan-index.ts +44 -10
- package/extensions/plan/plan-text.ts +51 -24
- package/extensions/plan/plans.ts +162 -57
- package/extensions/plan/policy.ts +20 -12
- package/extensions/plan/review-prompt.ts +93 -0
- package/extensions/plan/review.ts +51 -95
- package/extensions/plan/runtime.ts +22 -10
- package/extensions/plan/sections.ts +112 -0
- package/extensions/plan/steps.ts +63 -95
- package/extensions/plan/tools/enter.ts +8 -3
- package/extensions/plan/tools/exit.ts +13 -19
- package/extensions/plan/tools/write.ts +8 -3
- package/extensions/plan/tools.ts +1 -1
- package/extensions/plan/tui.ts +29 -15
- package/extensions/plan/types.ts +29 -3
- package/extensions/plan/web-chrome.ts +2 -1
- package/extensions/plan/web-client.ts +122 -178
- package/extensions/plan/web-collab.ts +207 -0
- package/extensions/plan/web-comments.ts +269 -0
- package/extensions/plan/web-page.ts +96 -17
- package/extensions/plan/web-router.ts +109 -47
- package/extensions/plan/web-share-session.ts +191 -0
- package/extensions/plan/web-share.ts +169 -0
- package/extensions/plan/web-streams.ts +124 -0
- package/extensions/plan/web-tokens.ts +63 -0
- package/extensions/plan/web.ts +245 -151
- package/extensions/question/dialogs.ts +91 -1
- package/extensions/question/tools.ts +2 -1
- package/extensions/rewind/{commands.ts → commands/commands.ts} +5 -5
- package/extensions/rewind/{review.ts → commands/review.ts} +13 -13
- package/extensions/rewind/{rewind.ts → commands/rewind.ts} +6 -6
- package/extensions/rewind/{config.ts → config/config.ts} +1 -1
- package/extensions/rewind/index.ts +3 -3
- package/extensions/rewind/{policy.ts → state/policy.ts} +4 -4
- package/extensions/rewind/{runtime.ts → state/runtime.ts} +11 -11
- package/extensions/rewind/{snapshot-run.ts → state/snapshot-run.ts} +1 -1
- package/extensions/rewind/{timeline.ts → state/timeline.ts} +2 -2
- package/extensions/rewind/{format.ts → text/format.ts} +3 -3
- package/extensions/rewind/{git.ts → transport/git.ts} +2 -2
- package/extensions/rewind/{restore.ts → transport/restore.ts} +2 -2
- package/extensions/rewind/{snapshot.ts → transport/snapshot.ts} +1 -1
- package/extensions/rewind/{store.ts → transport/store.ts} +1 -1
- package/extensions/rewind/{checklist.ts → view/checklist.ts} +6 -6
- package/extensions/rewind/{hunk-picker.ts → view/hunk-picker.ts} +8 -8
- package/extensions/rewind/{path-picker.ts → view/path-picker.ts} +7 -7
- package/extensions/rewind/{review-tui.ts → view/review-tui.ts} +11 -11
- package/extensions/rewind/{rewind-tui.ts → view/rewind-tui.ts} +17 -11
- package/extensions/rewind/{status.ts → view/status.ts} +4 -4
- package/extensions/session-bus/commands.ts +113 -0
- package/extensions/session-bus/format.ts +101 -0
- package/extensions/session-bus/index.ts +75 -0
- package/extensions/session-bus/join-request.ts +40 -0
- package/extensions/session-bus/mail-watch.ts +134 -0
- package/extensions/session-bus/notice.ts +86 -0
- package/extensions/session-bus/overlap.ts +36 -0
- package/extensions/session-bus/protocol.ts +104 -0
- package/extensions/session-bus/resolve.ts +67 -0
- package/extensions/session-bus/result.ts +208 -0
- package/extensions/session-bus/rows.ts +171 -0
- package/extensions/session-bus/runtime.ts +466 -0
- package/extensions/session-bus/store.ts +365 -0
- package/extensions/session-bus/tools.ts +192 -0
- package/extensions/session-bus/tui.ts +394 -0
- package/extensions/session-bus/types.ts +98 -0
- package/extensions/subagent/agents.ts +9 -8
- package/extensions/subagent/invocation.ts +4 -2
- package/extensions/team/commands.ts +112 -0
- package/extensions/team/dispatch.ts +133 -0
- package/extensions/team/format.ts +105 -0
- package/extensions/team/index.ts +33 -0
- package/extensions/team/schema.ts +29 -0
- package/extensions/team/tools.ts +246 -0
- package/extensions/team/types.ts +48 -0
- package/extensions/watch/index.ts +15 -9
- package/extensions/web-access/fetch/page.ts +4 -1
- package/extensions/web-access/fetch/structured.ts +447 -0
- package/extensions/web-access/fetch/tool.ts +2 -1
- package/extensions/web-access/search/tool.ts +2 -1
- package/extensions/wechat/bridge.ts +76 -92
- package/extensions/wechat/{commands.ts → commands/commands.ts} +26 -18
- package/extensions/wechat/{doctor.ts → commands/doctor.ts} +5 -5
- package/extensions/wechat/{history.ts → commands/history.ts} +1 -1
- package/extensions/wechat/{login.ts → commands/login.ts} +3 -3
- package/extensions/wechat/{slash.ts → commands/slash.ts} +38 -2
- package/extensions/wechat/dialog/channels.ts +136 -0
- package/extensions/wechat/{interaction.ts → dialog/interaction.ts} +66 -51
- package/extensions/wechat/{prompt.ts → dialog/prompt.ts} +40 -25
- package/extensions/wechat/{remote-ui.ts → dialog/remote-ui.ts} +1 -1
- package/extensions/wechat/index.ts +10 -10
- package/extensions/wechat/{admission.ts → peer/admission.ts} +2 -2
- package/extensions/wechat/{peer-session.ts → peer/peer-session.ts} +2 -2
- package/extensions/wechat/{peer-worker.ts → peer/peer-worker.ts} +119 -56
- package/extensions/wechat/{presence.ts → peer/presence.ts} +11 -11
- package/extensions/wechat/{reply-pipeline.ts → peer/reply-pipeline.ts} +13 -5
- package/extensions/wechat/{credentials.ts → state/credentials.ts} +2 -2
- package/extensions/wechat/{state.ts → state/state.ts} +14 -2
- package/extensions/wechat/{format.ts → text/format.ts} +3 -3
- package/extensions/wechat/{notices.ts → text/notices.ts} +15 -7
- package/extensions/wechat/tools.ts +29 -12
- package/extensions/wechat/{client.ts → transport/client.ts} +26 -2
- package/extensions/wechat/{deliver.ts → transport/deliver.ts} +104 -40
- package/extensions/wechat/{inbound.ts → transport/inbound.ts} +5 -5
- package/extensions/wechat/{media.ts → transport/media.ts} +11 -5
- package/extensions/wechat/transport/outbound.ts +142 -0
- package/extensions/wechat/{poll.ts → transport/poll.ts} +3 -3
- package/extensions/wechat/types.ts +10 -1
- package/extensions/wechat/{login-screen.ts → view/login-screen.ts} +4 -4
- package/extensions/wechat/{status-screen.ts → view/status-screen.ts} +31 -26
- package/extensions/worktree/git.ts +5 -0
- package/extensions/worktree/guard.ts +3 -5
- package/extensions/worktree/registry.ts +11 -5
- package/extensions/worktree/status.ts +1 -3
- package/lib/README.md +12 -6
- package/lib/board/card.ts +290 -0
- package/lib/board/links.ts +117 -0
- package/lib/board/page-pointer.ts +256 -0
- package/lib/board/round-text.ts +72 -0
- package/lib/board/round.ts +89 -0
- package/lib/board/rules.ts +304 -0
- package/lib/board/session.ts +105 -0
- package/lib/board/store.ts +310 -0
- package/lib/board/view.ts +150 -0
- package/lib/errors.ts +12 -4
- package/lib/format.ts +13 -0
- package/lib/http/guard.ts +112 -0
- package/lib/http/index.ts +16 -5
- package/lib/http/router.ts +40 -13
- package/lib/http/serve.ts +234 -0
- package/lib/http/server.ts +29 -13
- package/lib/http/sink.ts +110 -0
- package/lib/http/token.ts +38 -0
- package/lib/interaction.ts +10 -0
- package/lib/notice.ts +29 -2
- package/lib/plan-entry.ts +7 -2
- package/lib/policy.ts +12 -2
- package/lib/qr.ts +64 -0
- package/lib/repo-key.ts +74 -0
- package/lib/report.ts +52 -33
- package/lib/requirements.ts +7 -9
- package/lib/session-label.ts +64 -0
- package/lib/session-roster.ts +130 -0
- package/lib/session-tool.ts +184 -0
- package/lib/tool-names.ts +25 -2
- package/lib/tui/README.md +16 -2
- package/lib/tui/dock-screen.ts +85 -17
- package/lib/tui/glyphs.ts +2 -0
- package/lib/tui/line-pane.ts +15 -4
- package/lib/tui/tool.ts +23 -4
- package/lib/web/README.md +5 -2
- package/lib/web/components.ts +6 -1
- package/lib/web/runtime.ts +7 -1
- package/lib/web/tokens.ts +25 -2
- package/package.json +27 -14
- package/skills/init/SKILL.md +80 -45
- package/skills/init/references/agents-md-quality.md +26 -2
- package/skills/init/references/interview-questions.md +36 -14
- package/skills/next/SKILL.md +77 -51
- package/skills/project-docs/SKILL.md +133 -0
- package/skills/project-docs/references/audit.md +131 -0
- package/skills/project-docs/references/changelog.md +105 -0
- package/skills/project-docs/references/discovery.md +127 -0
- package/skills/project-docs/references/readme.md +80 -0
- package/skills/project-docs/references/release.md +84 -0
- package/skills/project-docs/references/roadmap.md +93 -0
- package/skills/project-docs/scripts/state.ts +316 -0
- package/skills/refactor/SKILL.md +100 -125
- package/skills/refactor/references/handoff.md +35 -0
- package/skills/refactor/references/signals.md +54 -0
- package/skills/refactor/scripts/inventory.ts +587 -0
- package/extensions/file-browse/README.md +0 -467
- package/extensions/file-browse/server.ts +0 -134
- package/extensions/plan/README.md +0 -709
- package/extensions/plan/config.ts +0 -27
- package/extensions/wechat/outbound.ts +0 -100
- package/extensions/wechat/qrcode.ts +0 -46
- package/skills/changelog/SKILL.md +0 -148
- /package/extensions/file-browse/{diff.ts → text/diff.ts} +0 -0
- /package/extensions/file-browse/{fuzzy.ts → text/fuzzy.ts} +0 -0
- /package/extensions/file-browse/{palette.ts → view/palette.ts} +0 -0
- /package/extensions/rewind/{patch.ts → text/patch.ts} +0 -0
- /package/extensions/rewind/{paths.ts → text/paths.ts} +0 -0
- /package/extensions/rewind/{queue.ts → transport/queue.ts} +0 -0
- /package/extensions/rewind/{temp-index.ts → transport/temp-index.ts} +0 -0
- /package/extensions/wechat/{lock.ts → state/lock.ts} +0 -0
- /package/extensions/wechat/{channel.ts → text/channel.ts} +0 -0
package/lib/web/tokens.ts
CHANGED
|
@@ -21,8 +21,8 @@ interface ThemeJson {
|
|
|
21
21
|
const DARK = darkTheme as unknown as ThemeJson;
|
|
22
22
|
const LIGHT = lightTheme as unknown as ThemeJson;
|
|
23
23
|
|
|
24
|
-
/** Web custom property -> Bytefly theme var. `--accent-soft`, `--on-accent`,
|
|
25
|
-
* and `--shadow` are derived, so no appearance-only colour enters the kit. */
|
|
24
|
+
/** Web custom property -> Bytefly theme var. `--accent-soft`, `--raised`, `--on-accent`,
|
|
25
|
+
* `--scrim`, and `--shadow` are derived, so no appearance-only colour enters the kit. */
|
|
26
26
|
const VAR_TOKENS: ReadonlyArray<readonly [string, string]> = [
|
|
27
27
|
["--canvas", "canvas"],
|
|
28
28
|
["--surface", "canvasSubtle"],
|
|
@@ -73,6 +73,16 @@ function resolve(theme: ThemeJson, value: string | number): string {
|
|
|
73
73
|
return theme.vars[value] ?? value;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/** `#rrggbb` mixed toward another colour: `t` of the way from `a` to `b`. */
|
|
77
|
+
function mix(a: string, b: string, t: number): string {
|
|
78
|
+
const channel = (hex: string, at: number): number => Number.parseInt(hex.replace("#", "").slice(at, at + 2), 16);
|
|
79
|
+
const between = (x: number, y: number): number => Math.round(x + (y - x) * t);
|
|
80
|
+
const r = between(channel(a, 0), channel(b, 0));
|
|
81
|
+
const g = between(channel(a, 2), channel(b, 2));
|
|
82
|
+
const bl = between(channel(a, 4), channel(b, 4));
|
|
83
|
+
return `#${[r, g, bl].map((value) => value.toString(16).padStart(2, "0")).join("")}`;
|
|
84
|
+
}
|
|
85
|
+
|
|
76
86
|
/** `#rrggbb` (or `#rgb`) plus alpha -> `rgba(r,g,b,a)`. */
|
|
77
87
|
function rgba(hex: string, alpha: number): string {
|
|
78
88
|
const raw = hex.replace("#", "");
|
|
@@ -94,6 +104,15 @@ function rgba(hex: string, alpha: number): string {
|
|
|
94
104
|
* lifts a panel off it, so each appearance needs its own alpha rather than the
|
|
95
105
|
* theme's colours.
|
|
96
106
|
*/
|
|
107
|
+
/**
|
|
108
|
+
* How far `--raised` sits above `--surface`: enough to see, not enough to shout.
|
|
109
|
+
*
|
|
110
|
+
* The light theme takes a smaller step because its accent is darker: at the dark
|
|
111
|
+
* step, `--accent` on `--raised` falls to 4.34:1 and the owner chips on a raised row
|
|
112
|
+
* stop being readable.
|
|
113
|
+
*/
|
|
114
|
+
const RAISED_STEP: Record<"dark" | "light", number> = { dark: 0.06, light: 0.03 };
|
|
115
|
+
|
|
97
116
|
const OVERLAYS: Record<"dark" | "light", { scrim: string; shadow: string }> = {
|
|
98
117
|
dark: { scrim: "rgba(0,0,0,.5)", shadow: "0 8px 24px rgba(0,0,0,.4)" },
|
|
99
118
|
light: { scrim: "rgba(15,23,42,.3)", shadow: "0 8px 24px rgba(15,23,42,.14)" },
|
|
@@ -104,6 +123,10 @@ function paletteOf(theme: ThemeJson, appearance: "dark" | "light", accentAlpha:
|
|
|
104
123
|
const palette: Record<string, string> = {};
|
|
105
124
|
for (const [token, name] of VAR_TOKENS) palette[token] = theme.vars[name];
|
|
106
125
|
palette["--accent-soft"] = rgba(palette["--accent"] ?? "#000000", accentAlpha);
|
|
126
|
+
// One step above `--surface`, for a block that must read as a plane rather than an
|
|
127
|
+
// outline: the theme offers only two neutral fills, and a surface one hairline
|
|
128
|
+
// lighter than the page is what made a dashboard look like a wireframe.
|
|
129
|
+
palette["--raised"] = mix(palette["--surface"] ?? "#000000", palette["--text"] ?? "#ffffff", RAISED_STEP[appearance]);
|
|
107
130
|
// A label on the accent fill is the canvas colour: a light blue button takes dark
|
|
108
131
|
// text, and the same derivation gives white on the light theme's darker blue.
|
|
109
132
|
palette["--on-accent"] = palette["--canvas"];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gavin-hu/my-pi-agent",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Personal Pi customizations, packaged as a Pi package: worktree isolation and rewind snapshots, question, todo, goal, plan, subagent, job, watch, web-access, file-browse, file-open, file-read, check, memory, context, wechat, and bytefly.",
|
|
3
|
+
"version": "0.19.0",
|
|
4
|
+
"description": "Personal Pi customizations, packaged as a Pi package: worktree isolation and rewind snapshots, question, todo, goal, plan, subagent, job, watch, web-access, file-browse, file-open, file-read, check, memory, context, session-bus, board, team, wechat, and bytefly.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
7
7
|
"pi",
|
|
@@ -49,6 +49,12 @@
|
|
|
49
49
|
"excel",
|
|
50
50
|
"read_doc",
|
|
51
51
|
"memory",
|
|
52
|
+
"board",
|
|
53
|
+
"cards",
|
|
54
|
+
"backlog",
|
|
55
|
+
"team",
|
|
56
|
+
"handoff",
|
|
57
|
+
"assign",
|
|
52
58
|
"cross-session",
|
|
53
59
|
"context",
|
|
54
60
|
"compaction",
|
|
@@ -74,6 +80,7 @@
|
|
|
74
80
|
},
|
|
75
81
|
"files": [
|
|
76
82
|
"extensions/**",
|
|
83
|
+
"docs/extensions/**",
|
|
77
84
|
"lib/**",
|
|
78
85
|
"skills/**",
|
|
79
86
|
"themes/**",
|
|
@@ -101,6 +108,9 @@
|
|
|
101
108
|
"./extensions/file-open/index.ts",
|
|
102
109
|
"./extensions/memory/index.ts",
|
|
103
110
|
"./extensions/context/index.ts",
|
|
111
|
+
"./extensions/board/index.ts",
|
|
112
|
+
"./extensions/team/index.ts",
|
|
113
|
+
"./extensions/session-bus/index.ts",
|
|
104
114
|
"./extensions/wechat/index.ts",
|
|
105
115
|
"./extensions/bytefly/index.ts"
|
|
106
116
|
],
|
|
@@ -110,7 +120,7 @@
|
|
|
110
120
|
"themes": [
|
|
111
121
|
"./themes/*.json"
|
|
112
122
|
],
|
|
113
|
-
"image": "https://raw.githubusercontent.com/gavin-hu/my-pi-agent/main/assets/chrome.png"
|
|
123
|
+
"image": "https://raw.githubusercontent.com/gavin-hu/my-pi-agent/main/assets/screens/chrome.png"
|
|
114
124
|
},
|
|
115
125
|
"scripts": {
|
|
116
126
|
"test": "bun test --parallel=4 --timeout 30000",
|
|
@@ -126,12 +136,15 @@
|
|
|
126
136
|
"config:migrate": "bun run scripts/migrate-config.ts",
|
|
127
137
|
"compat:versions": "bun run scripts/peer-versions.ts",
|
|
128
138
|
"bench:render": "bun run scripts/render-bench.ts",
|
|
129
|
-
"screenshot:
|
|
130
|
-
"screenshot:
|
|
131
|
-
"screenshot:
|
|
132
|
-
"screenshot:
|
|
133
|
-
"screenshot:
|
|
134
|
-
"
|
|
139
|
+
"screenshot:board": "bun run scripts/shots/board.ts",
|
|
140
|
+
"screenshot:cards": "bun run scripts/shots/cards.ts",
|
|
141
|
+
"screenshot:file-browse": "bun run scripts/shots/file-browse.ts",
|
|
142
|
+
"screenshot:plan": "bun run scripts/shots/plan-review.ts",
|
|
143
|
+
"screenshot:tools": "bun run tools:render gallery assets/screens/tool-renderings.png",
|
|
144
|
+
"screenshot:tool-pngs": "bun run tools:render tools assets/tools",
|
|
145
|
+
"probe:wechat": "bun run scripts/wechat-poll.ts",
|
|
146
|
+
"screenshots": "bun run scripts/screenshots.ts",
|
|
147
|
+
"tools:render": "bun run scripts/tools/index.ts"
|
|
135
148
|
},
|
|
136
149
|
"dependencies": {
|
|
137
150
|
"exceljs": "^4.4.0",
|
|
@@ -152,15 +165,15 @@
|
|
|
152
165
|
},
|
|
153
166
|
"devDependencies": {
|
|
154
167
|
"@biomejs/biome": "^2.5.15",
|
|
155
|
-
"@earendil-works/pi-agent-core": "^1.0
|
|
156
|
-
"@earendil-works/pi-ai": "^1.0
|
|
157
|
-
"@earendil-works/pi-coding-agent": "^1.0
|
|
158
|
-
"@earendil-works/pi-tui": "^1.0
|
|
168
|
+
"@earendil-works/pi-agent-core": "^1.4.0",
|
|
169
|
+
"@earendil-works/pi-ai": "^1.4.0",
|
|
170
|
+
"@earendil-works/pi-coding-agent": "^1.4.0",
|
|
171
|
+
"@earendil-works/pi-tui": "^1.4.0",
|
|
159
172
|
"@types/bun": "latest",
|
|
160
173
|
"@types/qrcode": "^1.5.5",
|
|
161
174
|
"get-east-asian-width": "^1.6.0",
|
|
162
175
|
"playwright-core": "^1.64.1",
|
|
163
|
-
"typebox": "^1.3
|
|
176
|
+
"typebox": "^1.4.3",
|
|
164
177
|
"typescript": "^5.6.0"
|
|
165
178
|
}
|
|
166
179
|
}
|
package/skills/init/SKILL.md
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: init
|
|
3
|
-
description: "Initialize or refresh AGENTS.md through a built-in interactive interview and a reviewed plan.
|
|
3
|
+
description: "Initialize or refresh a project's agent instructions (AGENTS.md, or AGENTS.override.md when it shadows AGENTS.md) through a built-in interactive interview and a reviewed plan. Run /skill:init to start it."
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Initialize
|
|
7
|
+
# Initialize agent instructions
|
|
8
8
|
|
|
9
|
-
Goal: create or update
|
|
9
|
+
Goal: create or update the instruction file Pi reads at the **project root** —
|
|
10
|
+
`AGENTS.md`, or `AGENTS.override.md` when one shadows it — by combining repository
|
|
10
11
|
evidence with a short, built-in interview. The interview captures intent the code
|
|
11
12
|
cannot show; the repository supplies every command, path, and convention that can
|
|
12
13
|
be verified. Plan mode is the review gate: no write happens before approval.
|
|
13
14
|
|
|
14
15
|
`/skill:init` loads this skill. If plan mode is not active, call
|
|
15
16
|
`enter_plan_mode` and wait for confirmation. Keep the interview and the plan
|
|
16
|
-
review in that order; do not write the file early to save a step.
|
|
17
|
+
review in that order; do not write the file early to save a step. A declined plan
|
|
18
|
+
mode ends the skill: stop and explain, rather than writing directly.
|
|
17
19
|
|
|
18
20
|
## Workflow
|
|
19
21
|
|
|
20
22
|
```text
|
|
21
23
|
/skill:init
|
|
22
24
|
└─> plan mode (read-only)
|
|
23
|
-
└─> recon:
|
|
24
|
-
└─> interview: one built-in question call (at most 4)
|
|
25
|
+
└─> recon: effective instruction file, sourced evidence, existing instructions
|
|
26
|
+
└─> interview: one built-in question call (at most 4), minus resolved facts
|
|
25
27
|
├─ answers ───────────────> reconcile with evidence
|
|
26
28
|
└─ unavailable/cancelled ─> evidence + recorded assumptions
|
|
27
29
|
└─> draft: new file, exact edits, or an honest no-op
|
|
28
30
|
└─> quality gate
|
|
31
|
+
└─> plan outline with ## Steps and ## Verification
|
|
29
32
|
└─> write_plan ──> exit_plan_mode
|
|
30
33
|
├─ not approved ──> refine the same plan
|
|
31
|
-
└─ approved ──────> write/edit
|
|
34
|
+
└─ approved ──────> write/edit the target
|
|
32
35
|
└─ read back + quality gate
|
|
33
36
|
```
|
|
34
37
|
|
|
@@ -37,35 +40,34 @@ before the interview. Read
|
|
|
37
40
|
[`references/agents-md-quality.md`](./references/agents-md-quality.md) before
|
|
38
41
|
drafting and again before writing the plan.
|
|
39
42
|
|
|
40
|
-
##
|
|
43
|
+
## Default question sets
|
|
41
44
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
| Empty or near-empty repository | Stack, Commands, Purpose, Priorities | Honest minimal file from the answers and known facts only. |
|
|
47
|
-
| Related instruction files exist | Swap Related docs in for Preserve or Rules | Describe the relationship; do not duplicate the other file. |
|
|
48
|
-
| Git repository with no guidance | Isolation, Verify, Done, External changes | Prefer this set over a generic workflow question. |
|
|
49
|
-
| No UI, inactive tool, or cancelled interview | Skip the call; record the gaps as assumptions | Evidence-based draft; the plan review remains the place to correct it. |
|
|
50
|
-
|
|
51
|
-
The full bank, selectable alternatives, and option wording live in
|
|
52
|
-
`references/interview-questions.md`. The table above is the default, not a menu to
|
|
53
|
-
exhaust.
|
|
45
|
+
The bank's deterministic default sets, in
|
|
46
|
+
[`references/interview-questions.md`](./references/interview-questions.md), decide
|
|
47
|
+
the first call for each repository state. They are the only copy; do not restate
|
|
48
|
+
them here. Drop a question the evidence sheet already answers.
|
|
54
49
|
|
|
55
50
|
## 1. Recon
|
|
56
51
|
|
|
57
|
-
-
|
|
58
|
-
`
|
|
59
|
-
|
|
52
|
+
- Resolve the instruction file Pi reads in this directory first. A root
|
|
53
|
+
`AGENTS.override.md` replaces `AGENTS.md` and `CLAUDE.md` in the same directory —
|
|
54
|
+
it still applies below — so it is the target; a new `AGENTS.md` beside it would
|
|
55
|
+
be dead text. Report an override above the project root or in the agent
|
|
56
|
+
directory, but never edit outside the project.
|
|
57
|
+
- Read the remaining instruction files (`CLAUDE.md`, nested `AGENTS.md` and
|
|
58
|
+
overrides) and note how they relate; do not silently absorb or replace one.
|
|
60
59
|
- Read the files that define the project: manifests, lockfiles, README, docs
|
|
61
60
|
index, source layout, tests, CI, formatter and linter configuration.
|
|
62
|
-
- Build a
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
- Build a sourced evidence sheet: stack and package manager from the manifest and
|
|
62
|
+
lockfile; every install/test/lint/typecheck command with the file that defines
|
|
63
|
+
it; generated, vendored, and build-output paths from `.gitignore` and the tree;
|
|
64
|
+
workspace packages and boundaries; purpose and audience from the README lead or
|
|
65
|
+
manifest description; validation gates, release path, and existing rules. Mark
|
|
66
|
+
each field `resolved` or `unknown`.
|
|
67
|
+
- The unknown fields are the interview gaps. Stop the first pass once the shape is
|
|
65
68
|
clear; do not investigate the whole repository before asking.
|
|
66
69
|
- In an empty or near-empty repository, record that evidence is absent. Never
|
|
67
70
|
invent a command from a language's usual tooling.
|
|
68
|
-
- Check that any command you plan to record is copied from a file that defines it.
|
|
69
71
|
- Use `read`, `grep`, `find`, and `ls`. For a large repository, delegate a
|
|
70
72
|
read-only survey to the `explorer` or `reviewer` subagent.
|
|
71
73
|
- Do not read or copy secrets, credentials, tokens, or private environment
|
|
@@ -74,14 +76,19 @@ exhaust.
|
|
|
74
76
|
## 2. Interview
|
|
75
77
|
|
|
76
78
|
Use `ask_user_question` once with at most four questions from the built-in bank.
|
|
77
|
-
Choose the deterministic default set for the repository state
|
|
79
|
+
Choose the bank's deterministic default set for the repository state, then drop
|
|
80
|
+
every question the evidence sheet already answers: `Purpose` only when README and
|
|
81
|
+
manifest are silent, `Verify` only when detected commands are missing or conflict,
|
|
82
|
+
`Sensitive` only when generated-path evidence leaves a boundary unclear. Ask the
|
|
83
|
+
bank's `Target` question when a root override exists.
|
|
78
84
|
|
|
79
85
|
- One call is the default. Make a second call only when an answer leaves a
|
|
80
86
|
material ambiguity that changes what the file says; do not ask a second round
|
|
81
87
|
merely to collect preferences.
|
|
82
88
|
- Fill option labels with evidence: the detected test command, the actual package
|
|
83
|
-
manager, the real instruction file names.
|
|
84
|
-
|
|
89
|
+
manager, the real instruction file names. Four options at most, and never one of
|
|
90
|
+
them for a free-form escape: the tool always adds Other, so an "Other" or "None of
|
|
91
|
+
these" label spends a real answer's slot.
|
|
85
92
|
- Ask only what the evidence cannot answer. Do not ask for the stack when a
|
|
86
93
|
manifest states it, or for a command already documented in CI.
|
|
87
94
|
- Never ask for secrets, credentials, tokens, environment values, or personal
|
|
@@ -103,15 +110,23 @@ Treat answers and evidence as different kinds of fact:
|
|
|
103
110
|
- If they conflict, record the conflict, what the draft uses, and the alternative
|
|
104
111
|
in the plan. Do not quietly rewrite the user's intent or invent a command to
|
|
105
112
|
match it.
|
|
113
|
+
- A command, path, or package with no source in the evidence sheet stays out or is
|
|
114
|
+
asked; it is never inferred from convention.
|
|
115
|
+
|
|
116
|
+
The target is the effective file from recon. If a root `AGENTS.override.md`
|
|
117
|
+
exists, edit it. Never write an `AGENTS.md` that the override shadows; if the user
|
|
118
|
+
chooses to consolidate into `AGENTS.md`, the plan removes or renames the override
|
|
119
|
+
in the same step and preserves its instructions.
|
|
106
120
|
|
|
107
121
|
Then choose the outcome:
|
|
108
122
|
|
|
109
|
-
- **No
|
|
123
|
+
- **No instruction file** — draft the smallest useful file. Use the sections this
|
|
110
124
|
repository needs; omit empty ones.
|
|
111
|
-
- **Existing
|
|
112
|
-
edits for the rest. If the user chose to
|
|
113
|
-
is being removed.
|
|
114
|
-
- **Accurate
|
|
125
|
+
- **Existing instruction file** — preserve correct instructions and propose exact
|
|
126
|
+
edits for the rest, shown as a fenced before/after diff. If the user chose to
|
|
127
|
+
rewrite, the plan must still list what is being removed.
|
|
128
|
+
- **Accurate instruction file** — propose no edits and explain the no-op with
|
|
129
|
+
evidence.
|
|
115
130
|
- **Empty or near-empty repository** — say plainly that it is newly initialized,
|
|
116
131
|
record the interview facts, and omit commands and architecture that do not
|
|
117
132
|
exist yet.
|
|
@@ -132,31 +147,51 @@ evidence, not as a replacement for reading the repository.
|
|
|
132
147
|
|
|
133
148
|
## 5. Plan and review
|
|
134
149
|
|
|
135
|
-
- Save the proposal with `write_plan
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
|
|
150
|
+
- Save the proposal with `write_plan` in the documented outline. The plan must
|
|
151
|
+
include:
|
|
152
|
+
- `## Goal` — the outcome for the instruction file;
|
|
153
|
+
- `## Context` — the sourced evidence sheet, the effective-file finding, and the
|
|
154
|
+
questions asked with how each answer was used;
|
|
155
|
+
- `## Approach` — the full draft for a new file, or a fenced before/after diff
|
|
156
|
+
for edits;
|
|
157
|
+
- `## Steps` — one top-level bullet per apply action: write or edit the target,
|
|
158
|
+
read it back, run the check. Without this heading approval seeds the
|
|
159
|
+
shallowest list anywhere, which is the draft rather than the actions;
|
|
160
|
+
- `## Risks` — assumptions, conflicts, and gaps from a cancelled or unavailable
|
|
140
161
|
interview;
|
|
141
|
-
-
|
|
162
|
+
- `## Verification` — the project's own check when it declares one (`run_check`,
|
|
163
|
+
or the narrower docs or structure test that guards the instruction file), then
|
|
164
|
+
reading the written file back against the checklist.
|
|
142
165
|
- Call `exit_plan_mode` with the returned path.
|
|
143
166
|
- If the user refines or rejects the plan, stay in plan mode, rewrite the same
|
|
144
167
|
plan file with `write_plan` (`plan_path`), and present it again.
|
|
145
|
-
- No
|
|
168
|
+
- No write to the target may happen before approval.
|
|
146
169
|
|
|
147
170
|
## 6. Apply and verify
|
|
148
171
|
|
|
149
|
-
- Create a new file with `write`, or update
|
|
150
|
-
- Change only
|
|
172
|
+
- Create a new file with `write`, or update the target with `edit`.
|
|
173
|
+
- Change only the instruction files the approved plan names: the target, and an
|
|
174
|
+
override the plan removes or renames while consolidating. Do not touch unrelated
|
|
175
|
+
files.
|
|
151
176
|
- Read the result back from disk and rerun the quality checklist against what is
|
|
152
177
|
actually there, not what you intended to write.
|
|
178
|
+
- Run the plan's verification step. A check that fails on the written file is the
|
|
179
|
+
report's follow-up, not a success; a check that fails for something the
|
|
180
|
+
instruction file cannot cause is named as an unrelated failure rather than
|
|
181
|
+
blamed on the draft.
|
|
153
182
|
- Report the path, what the file covers, whether the interview was answered or
|
|
154
183
|
fell back to assumptions, and any real follow-up. Name a missing fact instead of
|
|
155
184
|
inventing it.
|
|
156
185
|
|
|
157
186
|
## Boundaries
|
|
158
187
|
|
|
159
|
-
- One target
|
|
188
|
+
- One target for the instructions: the instruction file Pi reads at the project
|
|
189
|
+
root — `AGENTS.override.md` when one exists, otherwise `AGENTS.md`, as selected
|
|
190
|
+
in the plan.
|
|
191
|
+
- A consolidation edits the file it absorbs only when the approved plan names it;
|
|
192
|
+
otherwise the other file is left alone.
|
|
193
|
+
- Never leave a written `AGENTS.md` shadowed by a root override, and never edit an
|
|
194
|
+
override outside the project root.
|
|
160
195
|
- Plan mode is mandatory. If it is unavailable, stop and explain why instead of
|
|
161
196
|
writing directly.
|
|
162
197
|
- The built-in bank is the default; one custom gap question is allowed only when
|
|
@@ -9,6 +9,8 @@ invented command.
|
|
|
9
9
|
|
|
10
10
|
- [ ] The first call used the deterministic default set for the repository state.
|
|
11
11
|
- [ ] At most four questions were asked in the call.
|
|
12
|
+
- [ ] No question offered more than four options, and none spent one on a free-form
|
|
13
|
+
escape the tool already provides.
|
|
12
14
|
- [ ] Options were filled from evidence where the bank names commands, files, or
|
|
13
15
|
instruction documents.
|
|
14
16
|
- [ ] No question duplicated a fact the recon already answered.
|
|
@@ -27,12 +29,24 @@ invented command.
|
|
|
27
29
|
plan, with the chosen resolution.
|
|
28
30
|
- [ ] The plan names which questions were asked and what the user answered.
|
|
29
31
|
|
|
32
|
+
## Target file
|
|
33
|
+
|
|
34
|
+
- [ ] The plan names the instruction file Pi reads in the target directory.
|
|
35
|
+
- [ ] A root `AGENTS.override.md` is the target, or the plan removes or renames it
|
|
36
|
+
while consolidating its instructions into `AGENTS.md`.
|
|
37
|
+
- [ ] The written file is not an `AGENTS.md` that a root override shadows.
|
|
38
|
+
- [ ] An override above the project root or in the agent directory is reported,
|
|
39
|
+
not edited.
|
|
40
|
+
|
|
30
41
|
## Evidence accuracy
|
|
31
42
|
|
|
32
|
-
- [ ] Every command is
|
|
33
|
-
page that defines it. No command is guessed.
|
|
43
|
+
- [ ] Every command is paired with the file that defines it in the evidence sheet.
|
|
34
44
|
- [ ] Every path and package name exists in the repository as written.
|
|
35
45
|
- [ ] Every claimed convention is visible in the code or contributor docs.
|
|
46
|
+
- [ ] Generated and vendored exclusions name paths that exist and are backed by
|
|
47
|
+
`.gitignore` or build output.
|
|
48
|
+
- [ ] Purpose came from the README lead or manifest description, or was asked.
|
|
49
|
+
- [ ] No field marked `resolved` was asked again in the interview.
|
|
36
50
|
- [ ] Unknown facts are omitted or named as unknown. They are never filled with
|
|
37
51
|
plausible-sounding placeholders.
|
|
38
52
|
- [ ] An answer that contradicts the code is treated as intent, not as evidence
|
|
@@ -76,12 +90,20 @@ invented command.
|
|
|
76
90
|
`AGENTS.md`; the relationship is stated instead.
|
|
77
91
|
- [ ] Two sections do not give the same instruction.
|
|
78
92
|
|
|
93
|
+
## Plan and review
|
|
94
|
+
|
|
95
|
+
- [ ] The plan uses `## Steps` and `## Verification`.
|
|
96
|
+
- [ ] Each top-level step is an apply action, not a bullet from the draft.
|
|
97
|
+
- [ ] An existing-file change is shown as a before/after diff, not prose edits.
|
|
98
|
+
|
|
79
99
|
## Existing files
|
|
80
100
|
|
|
81
101
|
- [ ] Correct existing instructions are preserved.
|
|
82
102
|
- [ ] Stale instructions are changed only when the replacement is supported by
|
|
83
103
|
repository evidence or an explicit answer.
|
|
84
104
|
- [ ] The plan lists exact edits, not a wholesale rewrite.
|
|
105
|
+
- [ ] An override that is consolidated is removed or renamed in the same step, and
|
|
106
|
+
its instructions are preserved.
|
|
85
107
|
- [ ] A rewrite records what is being removed and why.
|
|
86
108
|
- [ ] A genuinely accurate file produces a no-op plan instead of churn.
|
|
87
109
|
|
|
@@ -97,6 +119,8 @@ invented command.
|
|
|
97
119
|
## Final read-back
|
|
98
120
|
|
|
99
121
|
- [ ] The written file matches the approved plan.
|
|
122
|
+
- [ ] The project's own check passed against the written file, or the report names the
|
|
123
|
+
failure it returned.
|
|
100
124
|
- [ ] The file was read back from disk, not recalled from memory.
|
|
101
125
|
- [ ] Only `AGENTS.md` changed.
|
|
102
126
|
- [ ] The report names the path, whether the interview was answered or fell back
|
|
@@ -5,6 +5,13 @@ The `init` skill selects from this bank. It is a menu, not a checklist: one
|
|
|
5
5
|
call is allowed only for a material ambiguity. Never ask for secrets,
|
|
6
6
|
credentials, tokens, environment values, or personal data.
|
|
7
7
|
|
|
8
|
+
Every select question lists its options inside `Shape`, separated by `;`, between
|
|
9
|
+
two and four of them. Anything after ` — ` is a note rather than an option, and
|
|
10
|
+
the tool's free-form **Other** is never listed as one: it is always offered, so a
|
|
11
|
+
label spent on it costs a real answer. In this package, `test/skill-bank.test.ts`
|
|
12
|
+
holds these tables to that convention, so an over-long list fails the check rather
|
|
13
|
+
than the interview.
|
|
14
|
+
|
|
8
15
|
## Consolidation rules
|
|
9
16
|
|
|
10
17
|
The bank merges questions that would otherwise create two copies of the same
|
|
@@ -14,7 +21,11 @@ answer:
|
|
|
14
21
|
first decision an agent makes.
|
|
15
22
|
- **Done** absorbs testing and documentation expectations: both define when a
|
|
16
23
|
task is complete.
|
|
17
|
-
- **Sensitive**
|
|
24
|
+
- **Sensitive** is the fallback for generated, vendored, and secret-bearing
|
|
25
|
+
boundaries that `.gitignore` and build-output evidence cannot settle.
|
|
26
|
+
- **Target** settles which file is written when a root `AGENTS.override.md`
|
|
27
|
+
exists; Related docs still covers `CLAUDE.md` and nested files once the target
|
|
28
|
+
is fixed.
|
|
18
29
|
- **External changes** absorbs dependency and network policy.
|
|
19
30
|
- **Commits** absorbs branch naming.
|
|
20
31
|
- **Scope** and **Related docs** stay separate because they decide where the file
|
|
@@ -26,25 +37,29 @@ Use the first matching row. Fill option labels with evidence before asking.
|
|
|
26
37
|
|
|
27
38
|
| Repository state | First four questions |
|
|
28
39
|
|---|---|
|
|
29
|
-
| Existing project, no `AGENTS.md` | Purpose (only if
|
|
40
|
+
| Existing project, no `AGENTS.md` | Purpose (only if README and manifest are silent; otherwise Priorities), Verify (only if commands are missing or conflict; otherwise Done), Rules, Isolation |
|
|
30
41
|
| Existing project, `AGENTS.md` present | Existing file, Preserve (only if sections are unclear), Priorities (only if stale), Rules |
|
|
31
42
|
| Empty or near-empty repository | Stack, Commands, Purpose, Priorities |
|
|
32
|
-
| Related instruction files present |
|
|
43
|
+
| Related instruction files present | Target first when a root override exists; otherwise swap Related docs in for Preserve or Rules |
|
|
33
44
|
| Git repository with no guidance | Isolation, Verify, Done, External changes |
|
|
34
45
|
| No UI, inactive tool, or cancelled interview | No call; record the gaps as assumptions |
|
|
35
46
|
|
|
47
|
+
A field the evidence sheet resolves is dropped, and the parenthesised fallback
|
|
48
|
+
keeps the call at four questions only when the field is unknown. A root
|
|
49
|
+
`AGENTS.override.md` adds `Target` before any other state question.
|
|
50
|
+
|
|
36
51
|
## Core questions
|
|
37
52
|
|
|
38
53
|
| Header | Question | Shape | Selected when |
|
|
39
54
|
|---|---|---|---|
|
|
40
55
|
| Purpose | What is this project, and who will agents work on it for? | Free-form | README and manifest do not state the purpose and audience, or the repository is empty/near-empty. |
|
|
41
|
-
| Verify | Which commands should an agent trust to verify a change? | Multi-select: detected
|
|
56
|
+
| Verify | Which commands should an agent trust to verify a change? | Multi-select: the detected full check; the detected test command; one file's test command; no reliable command yet — Other takes a command the recon missed | Detected commands conflict or are ambiguous, or no command was found. |
|
|
42
57
|
| Rules | What should an agent know that is not obvious from the code? | Free-form | No explicit conventions, invariants, style rules, or traps are found in the source, docs, or contributor files. |
|
|
43
58
|
| Isolation | How should agents isolate and land work? | Single-select: Worktree per task, then PR; Branch in the current checkout, then PR; Commit directly; Follow repository instructions | The project is a Git repository with no stated isolation or branch rule. |
|
|
44
|
-
| Done | What must be true before a task is done? | Multi-select: Tests pass; Lint and typecheck pass; Docs and changelog updated; Diff self-reviewed
|
|
45
|
-
| Sensitive | Are any files, directories, or workflows off-limits for agents? | Free-form, including generated, vendored, and secret-bearing paths |
|
|
59
|
+
| Done | What must be true before a task is done, on top of the landing rule? | Multi-select: Tests pass; Lint and typecheck pass; Docs and changelog updated; Diff self-reviewed — the pull request belongs to Isolation or Commits | No contributor guide defines done, test level, or documentation expectations. |
|
|
60
|
+
| Sensitive | Are any files, directories, or workflows off-limits for agents? | Free-form, including generated, vendored, and secret-bearing paths | Generated-path evidence leaves a boundary unclear, or a workflow boundary is not visible in the files. |
|
|
46
61
|
| External changes | May an agent add dependencies or use the network? | Single-select: Yes, when needed; Ask first; Offline and no new dependencies | A manifest exists and dependency, package-install, or network rules are unclear. |
|
|
47
|
-
| Existing file | How should the `init` skill handle the current
|
|
62
|
+
| Existing file | How should the `init` skill handle the current instruction file? | Single-select: Review and update in place; Keep it and only append missing guidance; Rewrite it from this interview | The target instruction file already exists. |
|
|
48
63
|
|
|
49
64
|
## State questions
|
|
50
65
|
|
|
@@ -52,18 +67,19 @@ Use the first matching row. Fill option labels with evidence before asking.
|
|
|
52
67
|
|---|---|---|---|
|
|
53
68
|
| Stack | What are you building, and with which language or framework? | Free-form | The repository is empty/near-empty, or no manifest or README states the stack. |
|
|
54
69
|
| Commands | What install, build, test, lint, and typecheck commands do you intend to use? | Free-form, with None yet accepted | The repository is empty/near-empty and no real command exists to copy. |
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
70
|
+
| Target | Which instruction file should `init` maintain? | Single-select: Edit `AGENTS.override.md`; Consolidate into `AGENTS.md` and remove the override — the first keeps Pi's effective file, the second unshadows `AGENTS.md` | A root `AGENTS.override.md` exists. |
|
|
71
|
+
| Related docs | How should the target instruction file relate to existing instruction files? | Single-select: Link to them and add only gaps; Consolidate them into the target file; Leave them alone | `CLAUDE.md` or a nested `AGENTS.md` exists. |
|
|
72
|
+
| Preserve | Which current instructions must stay? | Free-form | The target instruction file exists and its authoritative sections are unclear. |
|
|
73
|
+
| Scope | Where should the instruction file apply? | Single-select: Repository root only; Root plus package-level files; Follow an existing instruction file | The repository is a monorepo, has nested packages, or already has a related instruction file. |
|
|
58
74
|
|
|
59
75
|
## Optional follow-ups
|
|
60
76
|
|
|
61
77
|
| Header | Question | Shape | Selected when |
|
|
62
78
|
|---|---|---|---|
|
|
63
|
-
| Priorities | What should agents optimize for here? | Multi-select: Correctness and safety; Small, reviewable changes; Fast iteration;
|
|
79
|
+
| Priorities | What should agents optimize for here? | Multi-select: Correctness and safety; Small, reviewable changes; Fast iteration; Match existing style — test coverage belongs to Done | No instruction file yet, or the current priorities are absent or ambiguous. |
|
|
64
80
|
| Planning | When should an agent plan before acting? | Single-select: Non-trivial or multi-file work; Every task; Only when asked; Never | No plan-mode or workflow guidance exists. |
|
|
65
81
|
| Commits | What commit convention and branch naming should agents follow? | Single-select: Conventional Commits with type/scope; Plain descriptive messages; Repository-defined convention; No preference | No commit or branch guidance exists in docs or CI. |
|
|
66
|
-
| Release | What release or versioning process must an agent follow? | Single-select: Maintainer handles releases; Follow documented release steps; No release process
|
|
82
|
+
| Release | What release or versioning process must an agent follow? | Single-select: Maintainer handles releases; Follow documented release steps; No release process — Other takes a process this list misses | The project is published or versioned and the process is unclear. |
|
|
67
83
|
| Performance | Are there performance budgets or hot paths to protect? | Free-form | The project exposes performance-sensitive code or has benchmarks. |
|
|
68
84
|
| Environment | What local services or setup steps does an agent need? | Free-form, no secrets | Setup requires services, databases, or environment configuration that is not documented. |
|
|
69
85
|
| Finish | Anything else the next agent should know? | Free-form | Always optional, at most once. |
|
|
@@ -72,9 +88,15 @@ Use the first matching row. Fill option labels with evidence before asking.
|
|
|
72
88
|
|
|
73
89
|
- Ask at most four questions in one call, ordered by impact: state-specific
|
|
74
90
|
question first, then command verification, then conventions and limits.
|
|
91
|
+
- Offer at most four options per question, filled from evidence, and never spend one
|
|
92
|
+
on a free-form escape the tool already provides.
|
|
75
93
|
- Use the deterministic default set for the state. Do not pick a random subset.
|
|
76
|
-
- Never ask for something the
|
|
77
|
-
or credential.
|
|
94
|
+
- Never ask for something the evidence sheet already resolved, and never ask for a
|
|
95
|
+
secret or credential.
|
|
96
|
+
- `Purpose`, `Verify`, and `Sensitive` are fallbacks: ask each only when the
|
|
97
|
+
evidence sheet cannot answer it.
|
|
98
|
+
- When a root `AGENTS.override.md` exists, ask `Target` before drafting; a target
|
|
99
|
+
that keeps the override is edited in place, and a consolidation removes it.
|
|
78
100
|
- One custom gap question is allowed only when no bank entry covers a material
|
|
79
101
|
fact. It counts toward the four-question cap.
|
|
80
102
|
- One follow-up call is allowed only when an answer creates a material ambiguity.
|