Repository navigation
feat: Perch Pilot — deterministic next-action engine for the notch - #2
Merged
Merged
Conversation
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.
Perch Pilot — your single highest-leverage next action (deterministic, no AI)
Pilot turns the glance into the next move. It composes the actionable dev signals Perch already produces — your PRs, review requests, CI builds, deploy health — ranks the implied actions on one shared priority scale, and surfaces the single most urgent next action on the pill plus the ranked list (each tappable) in the panel.
Examples it shows:
Merge #120 — approved + green·CI failing on main → look·2 to resolve #118 → your move·Review #42·Deploy degraded → check.All logic is pure code — no LLM. Prioritisation is a named
PilotPriorityscale + a deterministic ranker.How it fits the architecture
pilot.actions) that mirrorsCombinedModule: it runs existing modules as members and folds their output — changing none of them.actions(for:context:)toNotchModuleas a defaulted protocol method (every existing module compiles unchanged), threaded throughModuleRendernext todetail.classifysostatus(for:)output stays bit-identical.ModuleSpecsentry; the catalog, picker and factory all follow.Honest at the edges (the "it never lies" promise)
Checking…until every source has reported (no premature green).All clearonly when ready and nothing is pending.N unavailablewhen a configured source can't be read or isn't set up (e.g. CI toggled on with no repo) — never a false "All clear".Scope
opensPanelOnCritical: false): the standalone PR/Build modules already alert, so Pilot stays a calm, glanceable to-do. Write-actions (merge, re-run) and opt-in alerts are a clean v2 seam.Concurrency
Aggregation runs in a task group; an actor accumulator owns the continuation and yields in-actor, so emissions are serialized and ordered; the risky reduce logic is a pure, table-tested function.
Testing
swift buildclean · 327 tests pass (+12 new): ranker, the pure reducer (reported/unavailable/retention), PR/Build/Deploy action mappings, pill/panel honesty, render threading, factory resolution, and end-to-end streaming.Process
Built per
docs/engineering-workflow.md: the plan was approved after 4 independent Sonnet review rounds, and the code after 2 (concurrency, output-preservingclassify, no false "All clear"). One commit per file.