feat(pi): first-class pi package with harness scaffolding and fleet subagent dispatch - #173
Open
rafmacalaba wants to merge 2 commits into
Open
feat(pi): first-class pi package with harness scaffolding and fleet subagent dispatch#173rafmacalaba wants to merge 2 commits into
rafmacalaba wants to merge 2 commits into
Conversation
…ubagent dispatch - pi extension: armada_dispatch tool (single + parallel fleet subagent dispatch via isolated pi subprocesses), resources_discover contributing bundled skills + prompt templates in armada-managed repos - manifest: project.harnesses field (opencode default, pi opt-in), validated, rendered into armada.yaml - scaffold: .pi/agents/<ship-name>.md per role when pi harness enabled; openrouter models pinned, opencode-* inherit dispatcher; edit boundaries appended to the prompt body (pi has no SDK permission globs) - uninstall: removes .pi/agents armada-owned files - tests: tests/pi-harness.test.js (8); suite 605/605 green - docs: README pi integration section, TODO wave-2 log
- renderPiAgentFile maps every role to its catalog OpenRouter fallback (opencode-* IDs are unusable in pi); openrouterModelFor helper - scaffold writes .pi/settings.json with defaultProvider=defaultModel for the orchestrator session; merges into existing settings - uninstall removes the armada-owned model keys - verified live: subprocess JSON events report the pinned openrouter model; end-to-end dispatch receipt at $0.0016/turn - tests: 606/606 green
Owner
Author
|
Follow-up (4b82856): fleet defaults to OpenRouter in the pi harness Previously pi subagents silently inherited the dispatching session's model (opencode-* IDs are unusable in pi, so budget tiers were ignored). Now:
Evidence: subprocess JSON events report the pinned model ( |
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.
Summary
Completes armada as a first-class pi extension and enables the fleet subagent workflow inside pi.
pi/extensions/armada.ts): newarmada_dispatchLLM tool dispatches fleet roles (backend-dev, qa, adversary, ... or ship names galleon, corvette, ...) as isolated pi subprocesses — single{role, task}and parallel{tasks: [...]}modes (max 8, 4 concurrent) so the orchestrator can run independent phases concurrently.resources_discovercontributes the 14 bundled skills + prompt templates (/voyage,/contract,/fleet,/armada-status) in armada-managed repos.project.harnessesmanifest field (opencodedefault,piopt-in, validated + deduped, rendered into armada.yaml). Whenpiis enabled, scaffold emits.pi/agents/<ship-name>.mdper role: pi frontmatter (name, description, model where mappable), filled prompt body, and an Edit boundaries section derived from the permission matrix (pi has no SDK permission globs, so armada's file-ownership rules ride in the prompt body).openrouter/*IDs pin the subagent model;opencode-*IDs are opencode-only and are omitted so agents inherit the dispatching session's model..pi/agents/files.Verification
tests/pi-harness.test.js(manifest validation, renderer, scaffold/uninstall wiring).pi -esmoke run).harnesses: ["opencode", "pi"], dispatcheddocs(single) anddocs+architect(parallel) viaarmada_dispatchfrom a real pi session — both returned verbatim replies; parallel reported2/2 succeeded.