miantiao_me on X (after v0.1.4189): 「之前在 Pi 定义的可以导入吗?」. Library ›
Slash commands now has a "Find in agents" card at the top. It reads the
command files each agent already has, from the same places magpie writes
them (Pi prompts/*.md, Claude commands/*.md, OpenCode command/ and
commands/, Gemini and Qwen .toml, Qwen .md, Droid), and lists them to
import, the way Subagents' import does.
- Parsing: frontmatter description plus body; for TOML, description and
prompt. Arguments go back to magpie's form: Claude's $ARGUMENTS[n] and
$n (0-based) become $n+1, Gemini/Qwen {{args}} becomes $ARGUMENTS,
Pi's $@ becomes $ARGUMENTS (${@:N} is left as written).
- Files magpie wrote itself are skipped. The same content in several
agents is one command; a name with different bodies per agent shows
"Differs by agent" and one of them is picked; a name the library has
with other content is "Name taken" and can't be picked.
- An imported command keeps its source agents ticked, and magpie adopts
each original file byte for byte (Command.Taken): sync writes the same
bytes at the same path, so the file is never doubled or rewritten.
After an edit the agent gets magpie's render at that path; a rename
drops Taken. Taken never leaves the machine (Collect strips it, Put
keeps the local one).
- API: POST /api/library/commands/probe, and commands/import through
the library change route. internal/cli's parity test names the probe
as stage 3, like subagents/probe.
- Docs: docs/subsystems/library.md has the new row.
Run at 039e25752 (on origin/main dd89f1255), on mote:
- go test ./internal/library/ ./internal/cli/: ok. ./internal/gui/: only
TestCoreScriptBudget red (app.js 10 bytes over), red on main, #6733;
this commit doesn't touch app.js.
- gofmt clean; GOOS=linux and GOOS=windows go vet -tags nogui ./...: ok
(at fb01ae2bb, base 028b07b4b; the two later main commits are Windows
hook code in internal/gui).
- GUI: library-commands-import (new: chromium + webkit, en/zh/zh-TW/ja/de,
420 and 1100 wide, no sideways scroll, press stays in place),
library-commands, library-subagents-import, i18n-keys, i18n-en-no-cjk:
64 of 64.
Earlier, at 1a70f31b6 (base 6af327e2b):
- go test -timeout 45m ./...: every package ok except internal/cli's
TestEveryRouteHasACommandOrIsNamed, which named the missing probe route;
fixed here and green since.
- Whole GUI suite (--test-concurrency=8, mote at load 17 to 44 with
another session's go suite and GUI runs): 26887 pass, 1005 fail in 109
files, none of them library-commands. The 109 files run alone at
99719df19 and at origin/main 5bd41301b: 1145/996 vs 1144/997, the
same tests red apart from language/width variants that flip between
runs. Recorded on #6709.
Tests use a sandbox HOME with real Pi prompt files from Pi's repo
(internal/library/testdata/pi-prompts). Broken by hand: with syncCommands'
Taken branch off, all four import tests go red ("has a slash command of
its own"); with Put's Taken keep off, TestCommandImportNotCarried goes red.
Not tried: a real Pi install on a live HOME (by rule), or Windows/Linux
runs of the Go tests.
2.1 KiB
2.1 KiB
description, argument-hint
| description | argument-hint |
|---|---|
| Review PRs from URLs with structured issue and code analysis | <PR-URL> |
You are given one or more GitHub PR URLs: $@
For each PR URL, do the following in order:
- Add the
inprogresslabel to the PR via GitHub CLI before analysis starts. If adding the label fails, report that explicitly and continue. - Read the PR page in full. Include description, all comments, all commits, and all changed files.
- Identify any linked issues referenced in the PR body, comments, commit messages, or cross links. Read each issue in full, including all comments.
- Analyze the PR diff without checking out or switching to the PR branch. Use
gh pr diff,gh pr view,gh api, and local main-branch files; if PR file contents are needed, use fetched refs withgit show <ref>:<path>or temporary files. Read all relevant code files in full with no truncation and compare against the diff. Do not fetch PR file blobs unless a file is missing on main or the diff context is insufficient. Include related code paths that are not in the diff but are required to validate behavior. - Do not check for a changelog entry. Per CONTRIBUTING.md, contributor PRs must not edit
CHANGELOG.md— the maintainer adds the entry when merging. - Check if packages/coding-agent/README.md, packages/coding-agent/docs/.md, packages/coding-agent/examples/**/.md require modification. This is usually the case when existing features have been changed, or new features have been added.
- Provide a structured review with these sections:
- What it does: one short paragraph describing the change and its intent.
- Good: solid choices or improvements.
- Bad: concrete issues, regressions, missing tests, or risks.
- Ugly: subtle or high impact problems.
- Tests: what is covered, what is missing, and whether existing tests are adequate.
- Open questions for you: only things blocking a merge decision that need the user's input. Omit the section entirely if there are none.
Output format per PR: PR: What it does:
- ... Good:
- ... Bad:
- ... Ugly:
- ... Tests:
- ... Open questions for you:
- ...
If no issues are found, say so under Bad and Ugly.