Single-source flows: ~/.pi/agent/pi-flow.json via /pi-flow:setup - #10
Merged
Conversation
…ow:setup Flows now come solely from a dedicated ~/.pi/agent/pi-flow.json file the user owns; built-ins are no longer merged at runtime. /pi-flow:setup seeds the three starter flows into that file on demand (and never rewrites it after); /pi-flow:help prints the flow schema, replacing /pi-flow:show. Reading moves off the settings.json pi-flow key onto the dedicated file. Updates ADR-0001, CONTEXT.md, and README to match. 56 tests passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #9, driven by real first-run UX feedback: built-in flows were invisible (they lived in code and were merged at runtime), and user flows squatted a
pi-flowkey in pi's sharedsettings.json. Two textures for one concept.This makes flows single-source: every flow — starter or custom — lives in one file the user owns,
~/.pi/agent/pi-flow.json(alongside pi's ownmodels.json/settings.json).Changes
resolveFlowsno longer merges built-ins; flows come solely frompi-flow.json.BUILTIN_FLOWSremains as seed content only./pi-flow:setupwrites the three starter flows intopi-flow.jsonon demand (opt-in; never rewrites an existing file)./pi-flow:helpprints the flow schema, replacing/pi-flow:show.settings.jsonpi-flowkey onto the dedicated file./pi-flow:setup.Trade explicitly accepted
A seeded built-in is the user's frozen copy — a future package improvement to it won't reach an existing
pi-flow.json. For a small, stable set of starter flows, that's the right call (recorded in ADR-0001).Tests
56 passing (
vitest run), through the existing pure-function and fake-ExtensionAPIseams.Context: #1 (PRD), #9 (merged v2). No issues to close.
🤖 Generated with Claude Code