@staff0rd/assist 0.654.1 → 0.656.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 +3 -3
- package/claude/advice/filename-convention.md +6 -0
- package/claude/advice/refactor.md +12 -0
- package/claude/advice/settings-json.md +6 -0
- package/claude/advice/verify.md +6 -0
- package/codex/config.toml +7 -1
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/index.js +1290 -1183
- package/package.json +1 -1
- package/pi/advice.ts +24 -0
- package/claude/CLAUDE.md +0 -45
package/package.json
CHANGED
package/pi/advice.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
|
|
4
|
+
function compose(cwd: string): string {
|
|
5
|
+
try {
|
|
6
|
+
const result = spawnSync("assist", ["advise"], { cwd, encoding: "utf8" });
|
|
7
|
+
return result.stdout?.trim() ?? "";
|
|
8
|
+
} catch {
|
|
9
|
+
return "";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default function (pi: ExtensionAPI) {
|
|
14
|
+
let advice = "";
|
|
15
|
+
|
|
16
|
+
pi.on("session_start", (_event, ctx) => {
|
|
17
|
+
advice = compose(ctx.cwd);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
pi.on("before_agent_start", (event) => {
|
|
21
|
+
if (!advice || event.systemPrompt.includes(advice)) return undefined;
|
|
22
|
+
return { systemPrompt: `${event.systemPrompt}\n\n${advice}` };
|
|
23
|
+
});
|
|
24
|
+
}
|
package/claude/CLAUDE.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
After any code change, run `/verify` to ensure all checks pass. Run it bare — never pipe it through `head`, `tail`, `grep`, `rg` or `wc`, as it already prints only what failed.
|
|
2
|
-
|
|
3
|
-
`assist` is installed globally. Use it directly (e.g., `assist commit "message"`).
|
|
4
|
-
|
|
5
|
-
## Editing files
|
|
6
|
-
|
|
7
|
-
Always edit files with the Write and Edit tools. Never edit a file by shelling out — no `sed -i`, no heredoc rewrites, no Python or Node scripts that write the file. This overrides any session instruction that says to prefer Bash for file changes.
|
|
8
|
-
|
|
9
|
-
## Writing markdown
|
|
10
|
-
|
|
11
|
-
Do not hard-wrap markdown. One line per paragraph, per bullet, per heading — let it soft-wrap. Never break a line at some column width.
|
|
12
|
-
|
|
13
|
-
When renaming TypeScript files or symbols, use the refactor commands instead of doing it manually:
|
|
14
|
-
|
|
15
|
-
- `assist refactor rename file <source> <destination>` — rename/move a file and update all imports
|
|
16
|
-
- `assist refactor rename symbol <file> <oldName> <newName>` — rename a variable, function, class, or type across the project
|
|
17
|
-
- `assist refactor extract <file> <functionName> <destination>` — extract a function and its private dependencies to a new file
|
|
18
|
-
All default to dry-run; add `--apply` to execute.
|
|
19
|
-
When using extract, name the destination file after the exported function (e.g. `updateWorkerCapacity.ts` for `updateWorkerCapacity`) to satisfy the `oxlint-rules/filenameConvention.ts` lint rule.
|
|
20
|
-
|
|
21
|
-
Do not modify `claude/settings.json` without asking the user first. Only read-only commands should be added to the allow list — write operations (add, remove, set, delete) must require confirmation.
|
|
22
|
-
|
|
23
|
-
## Fetching Jira context
|
|
24
|
-
|
|
25
|
-
When the user mentions a Jira issue key (e.g. `BAD-671`, `PROJ-123`), use the Atlassian MCP to fetch context.
|
|
26
|
-
|
|
27
|
-
## Editing Jira issues with Smart Links
|
|
28
|
-
|
|
29
|
-
When editing a Jira issue whose description (or comment) contains Smart Links — rendered issue-key/URL chips, stored as ADF `inlineCard` nodes — edit via `editJiraIssue` with `contentFormat: "adf"` and emit real `inlineCard` nodes. Never round-trip such content through `contentFormat: "markdown"`: markdown has no representation for `inlineCard`, so every existing Smart Link is flattened to a plain browse URL and lost. Jira does not auto-promote plain browse URLs back into Smart Links, so the damage is not self-healing. Inspect the current stored ADF first and preserve existing `inlineCard` nodes when making a small edit. For anything beyond a trivial edit, build the ADF programmatically (a small script) rather than hand-authoring it inline — full-description ADF is verbose and easy to get wrong.
|
|
30
|
-
|
|
31
|
-
## Drafting messages to send on the user's behalf
|
|
32
|
-
|
|
33
|
-
When drafting a message to send on the user's behalf (Slack, PR, email, comment): state only the confirmed conclusion and the facts behind it. No hedging, no speculative next-steps, no fixes not agreed to, no pleasantries. Match the scope of what was asked — nothing added.
|
|
34
|
-
|
|
35
|
-
## Commenting code
|
|
36
|
-
|
|
37
|
-
Do not include comments for standard logic or syntax. Only comment if the specific line involves unintuitive complexity or a hack.
|
|
38
|
-
|
|
39
|
-
## Backlog item IDs
|
|
40
|
-
|
|
41
|
-
A bare `a` followed by hex (e.g. `a791`, `a3f0`) is an assist backlog item ID, not a git SHA. Read it with `assist backlog view <id>`.
|
|
42
|
-
|
|
43
|
-
## Backlog items, PRs, and commits
|
|
44
|
-
|
|
45
|
-
Do not mention assist backlog items in PR descriptions or PR comments. The reference goes the other way: mention the relevant commits or PRs in the assist backlog item.
|