Repository navigation
feat(setup): first-run welcome guide for the utilities family (#1663) #1669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+170
−7
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
plugins/magpie-setup/skills/setup/setup_preflight/guides/utilities.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| <!-- SPDX-License-Identifier: Apache-2.0 | ||
| https://www.apache.org/licenses/LICENSE-2.0 --> | ||
|
|
||
| # 🐦 Magpie here — your skill-authoring sidekick | ||
|
|
||
| A one-minute tour, then straight back to what you asked for. | ||
|
|
||
| ## 🔄 The typical flow | ||
|
|
||
| 1. 📋 **List** the skills installed here, grouped by family — *"list skills"* | ||
| 2. ✍️ **Write** a new skill against framework conventions, with evals — *"write a skill"* | ||
| 3. ⚡ **Optimize** an existing skill for brevity and token efficiency — *"optimize a skill"* | ||
| 4. 🐛 **Report a framework issue** from where you hit it, after checking duplicates — *"report an issue"* | ||
| 5. 🔁 **Reconcile** two near-duplicate skills and classify where they drifted — *"reconcile <skill-A> and <skill-B>"* | ||
|
|
||
| Nothing is written, modified, or posted without your OK. | ||
|
|
||
| ## ⚙️ Configure it | ||
|
|
||
| Nothing here has to be configured: | ||
|
|
||
| - 🛠️ **Authoring & help** — meta-skills work straight away in any directory or worktree | ||
| - 📖 **Optional project settings** — reads `project.md` when present, otherwise uses built-in framework defaults | ||
|
|
||
| Two ways to run Magpie when you are ready: personal install (`/magpie-setup:setup config`) or project adoption (`/magpie-setup:setup adopt`). | ||
|
|
||
| ## 💬 Just ask | ||
|
|
||
| Talk to Magpie in plain language: | ||
|
|
||
| - *"what skills are installed here?"* | ||
| - *"write a skill that drafts PR release notes"* | ||
| - *"optimize the write-skill instructions"* | ||
| - *"file a bug about preflight caching"* | ||
| - *"have these two skill copies drifted?"* | ||
|
|
||
| ## 🎨 Make it yours | ||
|
|
||
| Magpie ships default workflows and conventions. | ||
| Change them by describing the change: | ||
|
|
||
| - *"from now on, always add a smoke test when writing a skill"* | ||
| - *"group the skill list by capability instead of family"* | ||
|
|
||
| Each becomes an override for the utility skill it changes. | ||
| Useful to everyone? *"Upstream this change to Magpie"* opens a generic `apache/magpie` PR for you to review first. | ||
|
|
||
| <!-- welcome footer: generated from guides/_footer.md --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ill-evals/evals/setup/preflight-floor/fixtures/case-10-utilities-first-run/case-meta.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"tags":["local-smoke"]} |
1 change: 1 addition & 0 deletions
1
...kill-evals/evals/setup/preflight-floor/fixtures/case-10-utilities-first-run/expected.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"action": "welcome", "commands": [], "blocks": false} |
37 changes: 37 additions & 0 deletions
37
...vals/evals/setup/preflight-floor/fixtures/case-10-utilities-first-run/report.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <!-- SPDX-License-Identifier: Apache-2.0 | ||
| https://www.apache.org/licenses/LICENSE-2.0 --> | ||
|
|
||
| There is no `.apache-magpie.lock`, no `.apache-magpie-overrides/` and no | ||
| `.apache-magpie-local/` at the repo root. The running agent is Claude Code | ||
| with magpie-setup 0.4.0 and magpie-utilities 0.4.0 installed. | ||
|
|
||
| The user has already seen the initial general welcome guide on an earlier run. | ||
| The invoked skill's own frontmatter reads `name: list-skills` and | ||
| `surface_hash: sha256:2edc90a1b7f3440d`; it belongs to the utilities family. | ||
| This is the first time a utilities skill has run here. | ||
| The user asked it to "list skills". | ||
|
|
||
| The pre-flight command printed: | ||
|
|
||
| ```json | ||
| { | ||
| "findings": [ | ||
| { | ||
| "code": "welcome", | ||
| "facts": { | ||
| "family": "utilities", | ||
| "guide": "# \ud83d\udc26 Magpie here \u2014 your skill-authoring sidekick\n\nA one-minute tour, then straight back to what you asked for.\n\n## \ud83d\udd04 The typical flow\n\n1. \ud83d\udccb **List** the skills installed here, grouped by family \u2014 *\"list skills\"*\n2. \u270d\ufe0f **Write** a new skill against framework conventions, with evals \u2014 *\"write a skill\"*\n3. \u26a1 **Optimize** an existing skill for brevity and token efficiency \u2014 *\"optimize a skill\"*\n4. \ud83d\udc1b **Report a framework issue** from where you hit it, after checking duplicates \u2014 *\"report an issue\"*\n5. \ud83d\udd01 **Reconcile** two near-duplicate skills and classify where they drifted \u2014 *\"reconcile <skill-A> and <skill-B>\"*\n\nNothing is written, modified, or posted without your OK.\n\n## \u2699\ufe0f Configure it\n\nNothing here has to be configured:\n\n- \ud83d\udee0\ufe0f **Authoring & help** \u2014 meta-skills work straight away in any directory or worktree\n- \ud83d\udcd6 **Optional project settings** \u2014 reads `project.md` when present, otherwise uses built-in framework defaults\n\nTwo ways to run Magpie when you are ready: personal install (`/magpie-setup:setup config`) or project adoption (`/magpie-setup:setup adopt`).\n\n## \ud83d\udcac Just ask\n\nTalk to Magpie in plain language:\n\n- *\"what skills are installed here?\"*\n- *\"write a skill that drafts PR release notes\"*\n- *\"optimize the write-skill instructions\"*\n- *\"file a bug about preflight caching\"*\n- *\"have these two skill copies drifted?\"*\n\n## \ud83c\udfa8 Make it yours\n\nMagpie ships default workflows and conventions.\nChange them by describing the change:\n\n- *\"from now on, always add a smoke test when writing a skill\"*\n- *\"group the skill list by capability instead of family\"*\n\nEach becomes an override for the utility skill it changes.\nUseful to everyone? *\"Upstream this change to Magpie\"* opens a generic `apache/magpie` PR for you to review first.\n\n## \ud83d\udc4b About this guide\n\n- **Continue** \u2014 show it again next time (three times at most)\n- **Dismiss** \u2014 hide it until the next Magpie upgrade\n- **Don't show again** \u2014 hide it for good; say *\"show the utilities welcome again\"* to bring it back\n\nShow this again any time: `/magpie-setup:welcome-guide utilities`\n(`/magpie-setup-welcome-guide utilities` on a pinned snapshot).\n\n\ud83c\udf08 Prefer it in colour? Run this yourself \u2014 the `!` prefix runs it as a shell command:\n\n```text\n! PYTHONPATH=\".apache-magpie-local:$(git rev-parse --git-common-dir)/../.apache-magpie-local:$(git rev-parse --git-common-dir)/apache-magpie\" python3 -m setup_preflight.welcome show --family utilities --color=always\n```\n", | ||
| "max_shown": 3, | ||
| "reason": "first-run", | ||
| "shown": 0 | ||
| }, | ||
| "scope": "family", | ||
| "section": "welcome" | ||
| } | ||
| ], | ||
| "rules": { | ||
| "welcome": "## welcome \u2014 a first-run welcome guide is due\n\nA welcome guide is due on this run: `facts.family` names it\n(`general`, for the first Magpie skill this user runs here, or the skill's own family),\nand `facts.reason` says why (`first-run`, `again`, or `upgraded` after a dismissal).\n`facts.guide` is the guide. The checker shows at most one guide per run and has already picked it.\n\n1. **Show `facts.guide` to the user verbatim**, as Markdown, before the work they asked for.\n Do not summarise, reword, trim, or add to it, and substitute nothing in it:\n its placeholders (`<security-list>`, `<tracker>`, `<family>`, \u2026) are meant to be read as written.\n2. **Offer the three choices in one line**:\n **Continue** (show again next time) \u00b7 **Dismiss** (hide until the next Magpie upgrade) \u00b7 **Don't show again**.\n3. **Record `seen` at once**, which is what no answer means, then carry on with the user's request in the same turn.\n Never block the requested work on the guide, and never wait for an answer before starting it.\n4. **When the user picks Dismiss or Don't show again** \u2014 now or later in the session \u2014 record that choice;\n it replaces `seen`. Continue needs nothing further.\n\n```bash\nPYTHONPATH=\".apache-magpie-local:$(git rev-parse --git-common-dir)/../.apache-magpie-local:$(git rev-parse --git-common-dir)/apache-magpie\" \\\n python3 -m setup_preflight.welcome record --family <facts.family> --choice <seen|dismiss|never>\n```\n\n`seen` brings the guide back on a later run, `facts.max_shown` recorded showings in all (`facts.shown` so far);\n`dismiss` hides it until the framework version changes; `never` hides it until re-enabled.\nEvery write merges into the personal layer's `reconciled.json` under `welcome.<facts.family>`, keeping every other key;\nnever write it by hand.\nIf the command exits non-zero, say nothing more about it and carry on.\n\nAny guide can be shown again on request with `/magpie-setup:welcome-guide [<family>]`,\nwhich also turns a hidden one back on." | ||
| }, | ||
| "verdict": "action" | ||
| } | ||
| ``` |
23 changes: 23 additions & 0 deletions
23
...s/skill-evals/evals/setup/preflight-floor/fixtures/case-10-utilities-first-run/state.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "lock": null, | ||
| "plugins": [ | ||
| [ | ||
| "magpie-setup", | ||
| "0.4.0" | ||
| ], | ||
| [ | ||
| "magpie-utilities", | ||
| "0.4.0" | ||
| ] | ||
| ], | ||
| "reconciled": { | ||
| "welcome": { | ||
| "general": { | ||
| "choice": "seen", | ||
| "shown": 1 | ||
| } | ||
| } | ||
| }, | ||
| "skill": "list-skills", | ||
| "welcome": true | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.