zelio-cli 0.1.0-beta.1 → 0.1.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -148
- package/dist/cli-main.js +521 -0
- package/dist/cli-main.js.map +1 -0
- package/dist/cli.js +17 -464
- package/dist/cli.js.map +1 -1
- package/dist/cloud/account.js +109 -0
- package/dist/cloud/account.js.map +1 -0
- package/dist/cloud/command.js +7 -2
- package/dist/cloud/command.js.map +1 -1
- package/dist/cloud/login.js +2 -1
- package/dist/cloud/login.js.map +1 -1
- package/dist/cloud/push-nudge.js +5 -3
- package/dist/cloud/push-nudge.js.map +1 -1
- package/dist/cloud/relay.js +5 -0
- package/dist/cloud/relay.js.map +1 -1
- package/dist/cloud/tunnel.js +65 -1
- package/dist/cloud/tunnel.js.map +1 -1
- package/dist/db/db.js +381 -157
- package/dist/db/db.js.map +1 -1
- package/dist/db/lifecycle.js +18 -5
- package/dist/db/lifecycle.js.map +1 -1
- package/dist/limits.js +1 -1
- package/dist/orchestrator/area-notes.js +87 -0
- package/dist/orchestrator/area-notes.js.map +1 -0
- package/dist/orchestrator/codex-session.js +10 -9
- package/dist/orchestrator/codex-session.js.map +1 -1
- package/dist/orchestrator/contract.js +30 -22
- package/dist/orchestrator/contract.js.map +1 -1
- package/dist/orchestrator/new-task-prompt.js +4 -4
- package/dist/orchestrator/pi-session.js +6 -0
- package/dist/orchestrator/pi-session.js.map +1 -1
- package/dist/orchestrator/prompt.js +4 -4
- package/dist/orchestrator/research.js +28 -13
- package/dist/orchestrator/research.js.map +1 -1
- package/dist/orchestrator/retrieval.js +333 -0
- package/dist/orchestrator/retrieval.js.map +1 -0
- package/dist/orchestrator/runtime.js +199 -36
- package/dist/orchestrator/runtime.js.map +1 -1
- package/dist/repo/code-map.js +152 -0
- package/dist/repo/code-map.js.map +1 -0
- package/dist/repo/instructions.js +9 -3
- package/dist/repo/instructions.js.map +1 -1
- package/dist/repo/linked-boards.js +20 -123
- package/dist/repo/linked-boards.js.map +1 -1
- package/dist/repo/project-repos.js +78 -0
- package/dist/repo/project-repos.js.map +1 -0
- package/dist/run/actions.js +24 -0
- package/dist/run/actions.js.map +1 -1
- package/dist/run/auto-review.js +116 -0
- package/dist/run/auto-review.js.map +1 -0
- package/dist/run/claude-runtime.js +54 -12
- package/dist/run/claude-runtime.js.map +1 -1
- package/dist/run/codex-client.js +17 -4
- package/dist/run/codex-client.js.map +1 -1
- package/dist/run/codex-planner-config.js +26 -0
- package/dist/run/codex-planner-config.js.map +1 -0
- package/dist/run/codex-runtime.js +200 -97
- package/dist/run/codex-runtime.js.map +1 -1
- package/dist/run/consult.js +109 -0
- package/dist/run/consult.js.map +1 -0
- package/dist/run/developer-sandbox.js +67 -0
- package/dist/run/developer-sandbox.js.map +1 -0
- package/dist/run/diff.js +42 -0
- package/dist/run/diff.js.map +1 -1
- package/dist/run/finish.js +53 -16
- package/dist/run/finish.js.map +1 -1
- package/dist/run/handoff.js +51 -0
- package/dist/run/handoff.js.map +1 -0
- package/dist/run/harness-runtime.js +4 -1
- package/dist/run/harness-runtime.js.map +1 -1
- package/dist/run/harnesses.js +20 -0
- package/dist/run/harnesses.js.map +1 -1
- package/dist/run/lead.js +65 -82
- package/dist/run/lead.js.map +1 -1
- package/dist/run/manager.js +1096 -68
- package/dist/run/manager.js.map +1 -1
- package/dist/run/merge-watch.js +48 -17
- package/dist/run/merge-watch.js.map +1 -1
- package/dist/run/pi-packages.js +72 -0
- package/dist/run/pi-packages.js.map +1 -0
- package/dist/run/pi-rpc.js +61 -9
- package/dist/run/pi-rpc.js.map +1 -1
- package/dist/run/piped-check.js +56 -0
- package/dist/run/piped-check.js.map +1 -0
- package/dist/run/pr-checks.js +67 -0
- package/dist/run/pr-checks.js.map +1 -0
- package/dist/run/prompt.js +64 -4
- package/dist/run/prompt.js.map +1 -1
- package/dist/run/red-check.js +130 -0
- package/dist/run/red-check.js.map +1 -0
- package/dist/run/retro.js +2 -2
- package/dist/run/retro.js.map +1 -1
- package/dist/run/settings.js +5 -2
- package/dist/run/settings.js.map +1 -1
- package/dist/run/skills.js +146 -0
- package/dist/run/skills.js.map +1 -0
- package/dist/run/tests-first.js +146 -0
- package/dist/run/tests-first.js.map +1 -0
- package/dist/run/watchdog.js +266 -0
- package/dist/run/watchdog.js.map +1 -0
- package/dist/run/workflow.js +17 -6
- package/dist/run/workflow.js.map +1 -1
- package/dist/server/app.js +1083 -300
- package/dist/server/app.js.map +1 -1
- package/dist/server/principal.js +5 -2
- package/dist/server/principal.js.map +1 -1
- package/dist/server/provider-auth.js +206 -0
- package/dist/server/provider-auth.js.map +1 -0
- package/dist/server/repo-picker.js +18 -0
- package/dist/server/repo-picker.js.map +1 -0
- package/dist/server/terminal.js +2 -2
- package/dist/server/terminal.js.map +1 -1
- package/dist/setup/config.js +0 -31
- package/dist/setup/config.js.map +1 -1
- package/dist/setup/ink-ui.js +1 -0
- package/dist/setup/ink-ui.js.map +1 -1
- package/dist/setup/onboarding.js +12 -38
- package/dist/setup/onboarding.js.map +1 -1
- package/dist/setup/run.js +4 -5
- package/dist/setup/run.js.map +1 -1
- package/dist/skills.js +151 -0
- package/dist/skills.js.map +1 -0
- package/dist/ticket-cli.js +41 -0
- package/dist/ticket-cli.js.map +1 -1
- package/dist/version.js +13 -0
- package/dist/version.js.map +1 -0
- package/dist/web/assets/index-TN5sUF2z.css +1 -0
- package/dist/web/assets/index-vB3Cucuc.js +258 -0
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +3 -1
- package/media/board.png +0 -0
- package/media/mobile.png +0 -0
- package/media/new-task.png +0 -0
- package/media/review.png +0 -0
- package/package.json +16 -7
- package/dist/web/assets/index-ChuS3qKc.js +0 -254
- package/dist/web/assets/index-DR6WkmzI.css +0 -1
|
@@ -50,15 +50,16 @@ export function oversizedCards(cards) {
|
|
|
50
50
|
export const TICKET_RULES = `## What a ticket must contain
|
|
51
51
|
|
|
52
52
|
- **title** — imperative, specific, no "improve" or "refactor".
|
|
53
|
-
- **goal** — one
|
|
54
|
-
- **out_of_scope** — at least one thing explicitly excluded. A ticket with no boundary is a wish. Never exclude a path you found that could cause what the person reported: a card that fixes one cause and scopes out another passes its checks and leaves the person's problem in place. Cover it in the card, or ask which path they used. When a needed part lives in
|
|
55
|
-
- **acceptance** —
|
|
56
|
-
- **at most four checks** — one card proves one behaviour. If the work needs a fifth check,
|
|
53
|
+
- **goal** — three short parts on one line, in the person's terms: \`Today: <what they see or do now>. After: <what changes for them>. Done when: <the one thing they can observe that shows it worked>.\` It is what the developer turns into its first tests, so it names what a person sees, never a file or a function. "Done when" is the outcome, not the activity.
|
|
54
|
+
- **out_of_scope** — at least one thing explicitly excluded. A ticket with no boundary is a wish. Never exclude a path you found that could cause what the person reported: a card that fixes one cause and scopes out another passes its checks and leaves the person's problem in place. Cover it in the card, or ask which path they used. When a needed part lives in a repository listed in \`<project-repos>\`, write it as its own card with \`board\`. When it lives in a repository not on this board, keep the card's goal and acceptance to what this board can prove, and say in \`reply\` that the person can add that repository from the project page.
|
|
55
|
+
- **acceptance** — two to four things a person could observe once the work is done, one sentence each, and one of them is a failure case. Say what is observed and where it is entered: the screen and the click, the endpoint and the response, the command and its output. Do not say how it is built: function names, data shapes and test files belong to the developer, who reads the code; a mechanism the run must use goes in \`context\`. Never "works correctly", never "is clean".
|
|
56
|
+
- **at most four checks** — one card proves one behaviour. If the work needs a fifth check, split it into cards that each stand alone, and let the person confirm every one.
|
|
57
57
|
- **the repository's own rules win** — if the repo documents how to work (\`AGENTS.md\`, \`CLAUDE.md\`), read it before writing acceptance. Its commands, tests and commit style are the person's standing preference, and a card that contradicts them is wrong.
|
|
58
58
|
- **likely_files** — paths or directories you expect to be touched, from actually reading the repo. Navigation hints, not a permission boundary; necessary supporting files remain authorized.
|
|
59
|
-
- **verify** — the commands the board runs to decide the card is done, each as \`{ "label", "command" }\`, at most six. Every acceptance criterion needs at least one command that would fail before the change and pass after it, usually an explicit-path test file the developer adds or extends. Use repo scripts or explicit test paths, never the full test suite.
|
|
60
|
-
- **process stays out of the card
|
|
61
|
-
- **context** — the facts the run would otherwise have to rediscover, one per line, as \`path:line — what is true there
|
|
59
|
+
- **verify** — the commands the board runs to decide the card is done, each as \`{ "label", "command" }\`, at most six. Every acceptance criterion needs at least one command that would fail before the change and pass after it, usually an explicit-path test file the developer adds or extends. Tests are authorized supporting work of the card, never a card of their own. Use repo scripts or explicit test paths, never the full test suite. A command outside the configured workflow must already exist in \`package.json\`, a workspace script, CI, or repo docs; never invent one. A verify command judges the tree, it never changes it: no formatter or fixer (\`pnpm fmt\`, \`lint:fix\`, \`--fix\`, \`--write\`), and none of the In Progress workflow's checks, which the board already runs after every turn.
|
|
60
|
+
- **Board-owned process stays out of the card.** Commit, push, review, and delegation behavior belongs to the board. If a person's instruction conflicts with that lifecycle (for example, "do not push" when the board publishes verified tickets automatically), say so plainly in \`reply\` before they confirm; never promise that the board will honor the instruction. Do not copy such process instructions into acceptance or \`out_of_scope\`. Preserve executable constraints on implementation when the card can enforce them: put them in the goal or acceptance if they change an observable outcome, otherwise in \`context\` (for example, a required tool or a prohibition on adding a dependency). Repository-reading and reporting preferences are not ticket behavior.
|
|
61
|
+
- **context** — the facts and executable implementation constraints the run would otherwise have to rediscover, one per line, as \`path:line — what is true there\`, \`reuse — the helper and where it lives\`, or a concise constraint from the person. Not a summary of the card; the mechanism or constraint. If the ticket names a file, the run should not have to guess why. Repo facts must come from what you read; user constraints may be copied from their request.
|
|
62
|
+
- **plan** — optional concise implementation handoff in markdown: observed code paths, invariants, user journey, risks, unknowns, and useful verification. Read relevant code first; mark unresolved facts as unknown. Keep simple tasks brief. The developer checks it against current code and may adapt it. Never copy it into project files.
|
|
62
63
|
- **rationale** — one line: why this ticket exists, in the user's terms.
|
|
63
64
|
- **assumed** — every choice you made yourself, as "field: what you assumed". Not "acceptance" — the actual assumption, e.g. "acceptance: assumed matching is case-insensitive". If you assumed nothing that changes behaviour, leave it empty. An assumption that changes how the work is built belongs in the goal or acceptance fields too: the developer run does not receive that field, so a mechanism kept only there is a mechanism the agent has to guess.
|
|
64
65
|
|
|
@@ -80,20 +81,21 @@ If the answer changes the shape of the work — which approach, which surface, w
|
|
|
80
81
|
|
|
81
82
|
If one user outcome needs multiple cards, retain its full intent and acceptance across them, state genuine dependencies, and name who owns cross-card integration and final end-to-end verification. Individual green cards do not prove the complete user flow.
|
|
82
83
|
|
|
84
|
+
**Cards that share an interface share its contract.** When one card produces a message, endpoint, event or file that another card consumes, read the code on both sides before writing either card, and write the exact shape — fields, what each value means, and what is sent when nothing succeeds — into both cards' \`context\`. Producing it belongs in the producing card's acceptance. If a consumer's acceptance needs something back (a delivery result, an error, a status) and the existing channel sends nothing back, the reply is the producer card's work, not the consumer's. A side you did not read goes in \`assumed\`.
|
|
85
|
+
|
|
83
86
|
## Before a card is ready to run
|
|
84
87
|
|
|
85
|
-
A card is permission to run an agent, not a wish.
|
|
88
|
+
A card is permission to run an agent, not a wish. Every card:
|
|
89
|
+
|
|
90
|
+
- **It has a failure case.** One criterion describes what the person sees when the work fails, is empty, is stale, or is missing. If there is genuinely no failure path, say why in \`assumed\`.
|
|
91
|
+
- **The proof matches the claim.** If a criterion says something must not happen, it asks for evidence that it did not — a call never made, a row never written — not a hidden output or a trace.
|
|
92
|
+
|
|
93
|
+
Only when the card's work calls for it — most cards need neither:
|
|
86
94
|
|
|
87
|
-
- **
|
|
88
|
-
- **The
|
|
89
|
-
- **The resource boundary is explicit.** If the work deletes, moves, renames, or retires something, acceptance names the exact resource this ticket owns and the thing that must never be touched. It includes one absence proof: another branch still exists, the default branch is untouched, or a live run stopped. If that needs a fifth check, split the card.
|
|
90
|
-
- **It names the invariant it could break.** These are the invariants, in concrete terms:
|
|
91
|
-
- **Status truth** — a run moves its own ticket only through \`ZELIO_STATUS_URL\`; the board never infers status from output, and no text may give a run another way to claim it.
|
|
92
|
-
- **Worktree boundary** — one ticket gets one worktree. Do not touch another checkout, push \`main\`, or merge anything.
|
|
93
|
-
- **Human review** — the developer commits the work on the ticket branch, completes implementation and required verification, then attempts to publish the branch and pull request. If that committed work is complete and verified and only remote push or PR publishing fails, the developer reports Review with the observed failure, branch, commit, and recovery steps recorded. If implementation is incomplete or required acceptance is unverified, the developer reports Blocked. A person reviews the work and decides whether a pull request should land.
|
|
94
|
-
If the work lets anyone — the person, a config file, a prompt, a workflow — add text an agent reads, acceptance must prove those invariants still win: no card, prompt or config may add another way to report status, a second worktree, or a way past review. "The new text takes precedence over the instructions above" is a red flag: scope precedence to the work, never to the rules that keep the board honest. A card that changes what an agent is told names the change in \`assumed\` and its acceptance still proves these invariants; it does not earn a rule of its own, and it does not skip acceptance either.
|
|
95
|
+
- **The resource boundary is explicit** when the work deletes, moves, renames, or retires something: acceptance names the exact resource this ticket owns and includes one absence proof, such as another branch still exists, the default branch is untouched, or a live run stopped.
|
|
96
|
+
- **The board's invariants still win** when the work changes text an agent reads (a prompt, a config, a workflow), how a run reports status, worktrees, or review. Acceptance proves that no card, prompt or config gains another way to report status than \`ZELIO_STATUS_URL\`, a second worktree, or a way past human review. A card that changes what an agent is told names the change in \`assumed\`; it does not skip acceptance either.
|
|
95
97
|
|
|
96
|
-
Before you put a card in the block, read it as the reviewer who has to approve it
|
|
98
|
+
Before you put a card in the block, read it as the reviewer who has to approve it: if you cannot point at the failure it handles, it is not ready.`;
|
|
97
99
|
/**
|
|
98
100
|
* What both doors read before they write a card.
|
|
99
101
|
*
|
|
@@ -106,10 +108,12 @@ export const PLANNING_METHOD = `## Read before you write
|
|
|
106
108
|
|
|
107
109
|
- **Find the nearest existing thing.** The file that already does part of this job, the test that will judge it, and the surface or command that enters it. Read all three before you draft a card.
|
|
108
110
|
- **Trace the path end to end.** Which component calls what, what stores it, what reads it back. If you cannot name the writer and the reader, acceptance is guesswork.
|
|
111
|
+
- **Identify change impact.** For changed behavior, identify affected existing workflows and their normal transitions. Specify observable evidence that those transitions remain usable, including journeys beyond the narrowly requested behavior; fit the evidence into the existing card limits.
|
|
112
|
+
- **Follow changed values to their effect.** Start at the user action or source that sets the value, then trace only the affected path through storage or transport, each consumer on that path, and the runtime behavior it controls. Use code search and supplied findings to locate the path; open the source at each handoff to confirm where the value can be dropped or transformed and what must stay true. Do not inspect unrelated consumers. A picker or saved value alone does not prove the requested behavior; acceptance must reach the consumer and observe the intended outcome.
|
|
109
113
|
- **Read the callers before reusing a shape.** A helper that looks right may belong to another surface; copy the pattern only after seeing what else depends on it.
|
|
110
114
|
- **Check the conventions where the change lands.** Naming, error handling, test style. A card that ignores them makes work for the reviewer.
|
|
111
115
|
- **Prefer evidence over coverage.** Three files read beat ten files listed. What you did not read is an assumption, not a fact.
|
|
112
|
-
- **Name the proof path.** Before you write acceptance, name the surface the change enters and the path a person takes through it: the screen and the click, the endpoint and the request, the command and its output. A criterion that cannot be reached from that path is a wish, not a check.
|
|
116
|
+
- **Name the proof path.** Before you write acceptance, name the surface the change enters and the path a person takes through it: the screen and the click, the endpoint and the request, the command and its output. For a changed value or setting, carry that same affected path through the consumer to the behavior it controls; proving only that it appears or is stored is insufficient. A criterion that cannot be reached from that path is a wish, not a check.
|
|
113
117
|
- **Send the scout when one question needs several files.** The \`explore\` tool returns cited findings from a read-only pass and keeps your own turn for synthesis. Ask it where a path starts, what stores a value, and which test would judge the change; do not ask it to write the card.
|
|
114
118
|
- **Open what the scout cites.** A citation you did not open is an assumption, not evidence. Read the two or three files that decide the mechanism before you write the card.
|
|
115
119
|
- **Agree on a verification standard.** Acceptance must say what observable evidence establishes the required behavior, not demand an unspecified absolute proof of correctness or security. Name required proofs, their properties and assumptions when relevant. Distinguish implementation verification from explicitly later independent review, audit, or deployment gates, and name the later gate's owner. A developer cannot move a required proof into later assurance or substitute passing tests for it. Ready for Review means ready for human scrutiny, never permission to merge or deploy.
|
|
@@ -147,7 +151,7 @@ Reply in plain prose for the person: what you found, what you are unsure about,
|
|
|
147
151
|
{
|
|
148
152
|
"id": "c1",
|
|
149
153
|
"title": "Add title search to the board",
|
|
150
|
-
"goal": "
|
|
154
|
+
"goal": "Today: finding a ticket means scanning every column. After: typing part of a title filters the board to matching tickets. Done when: typing 'token' leaves only tickets whose title contains it.",
|
|
151
155
|
"out_of_scope": "Full-text search over goals and comments.",
|
|
152
156
|
"acceptance": "Typing 'token' filters the board to tickets whose title matches, ignoring case; clearing the box restores all columns; a failed query keeps the previous list and shows an error.",
|
|
153
157
|
"likely_files": ["src/web/components/top-bar.tsx", "src/web/App.tsx"],
|
|
@@ -156,6 +160,7 @@ Reply in plain prose for the person: what you found, what you are unsure about,
|
|
|
156
160
|
"src/web/components/top-bar.tsx:41 — the search box already writes the filter to the URL",
|
|
157
161
|
"reuse src/web/components/search-palette.tsx:41 — the palette already matches titles"
|
|
158
162
|
],
|
|
163
|
+
"plan": "## Code paths\\n- ...\\n## Invariants\\n- ...\\n## User journey\\n- ...\\n## Risks and unknowns\\n- ...\\n## Verification\\n- ...",
|
|
159
164
|
"thinking": "low",
|
|
160
165
|
"rationale": "You said finding a ticket by title is the slow part.",
|
|
161
166
|
"assumed": ["out_of_scope: assumed comments and goals are not searched"],
|
|
@@ -172,10 +177,13 @@ Rules for the block:
|
|
|
172
177
|
- \`questions\`: what you still cannot decide without the person. At most three, each with two to four options, each option with a one-line cost. Asking and drafting in the same turn is allowed when they have asked for the draft and the cards are honest without the answer.
|
|
173
178
|
- \`decided\`: the answers the person actually gave, as "field: what they chose". It is not a place for your own reasoning: anything you decided goes in \`assumed\`. When an answer settles a field, move that line from \`assumed\` to \`decided\` and keep their wording.
|
|
174
179
|
- \`cards\`: at most 5. Empty on a discussion turn, or whenever they have not asked you to turn the work into a draft.
|
|
175
|
-
- \`thinking\`: how much effort the developer run should spend on this card, as \`low\`, \`medium\` or \`high\`.
|
|
176
|
-
-
|
|
180
|
+
- \`thinking\`: how much effort the developer run should spend on this card, as \`low\`, \`medium\` or \`high\`. Set it on every card. \`low\` is mechanical work: a rename, a copy change, a prop wired through. Choose \`high\` when being wrong is expensive and cheap checks will not catch it — concurrency, process lifecycles, native code, auth and the tunnel allowlist, money, or a behaviour a person can only confirm by hand. Choose \`medium\` for work that is mostly mechanical but has one sharp edge. Judge the card, not the size of the diff.
|
|
181
|
+
- \`model\`: the developer run's model for this card, copied exactly from the list in \`<developer-run>\`. Omit it when the default model fits, when there is no \`<developer-run>\`, or when its list is empty; a model not on the list is dropped. Prefer cheap or mid-tier models for cards at every effort level: pick the cheapest, fastest model that can reasonably handle the work (for example \`haiku\` for Claude, \`luna\` or \`terra\` for Codex), including for \`high\` effort cards. Do not escalate to strongest models such as Astra or Opus just because effort is \`high\`. Use only models from the harness named there. When you cannot tell which listed model is cheaper or mid-tier, omit it.
|
|
182
|
+
- \`skills\`: ids of skills the developer run should read for this card, copied exactly from the skills list in \`<developer-run>\`. The run gets each chosen skill's whole text, so choose only the ones this card's work needs — a frontend skill for UI work, not for a database migration — and omit the field when none fits or none is listed. An id not on the list is dropped.
|
|
183
|
+
- Field shapes: \`reply\`, every \`id\`, and the text fields are strings; \`likely_files\`, \`context\`, \`skills\`, \`assumed\` and \`decided\` are arrays of strings; \`derived\` and \`recommended\` are booleans; \`questions\` and \`options\` are arrays of objects. \`evidence\` is the repo path or fact behind a derived question, and \`cost\` is the one-line price of an option, so neither is optional when that field is present.
|
|
177
184
|
- \`context\`: at most six lines. Each is a fact you verified, not a restatement of the goal. An empty array is honest when the ticket has no surprising mechanism; do not pad it.
|
|
185
|
+
- \`plan\`: for non-trivial work, include a concise per-ticket handoff with observed code paths, invariants, user journey, risks, unknowns and useful verification. Base claims on repository reading; explicitly label unknowns. A simple task may have no plan. The plan stays as board ticket data, not a project file.
|
|
178
186
|
- \`assumed\` states each choice you made for the person, in the form "field: what you assumed". An empty array means the card needs no edit before it can run — so leave it empty when that is true, and do not pad it with fields you did not really decide.
|
|
179
187
|
- \`likely_files\` is what tells two cards apart. Guessing it badly is how parallel agents collide.
|
|
180
|
-
- \`board\`: omit it. Set it only to a name listed in \`<
|
|
188
|
+
- \`board\`: omit it. Set it only to a name listed in \`<project-repos>\`, for a card whose work lives in that repository; a card with any other board is dropped.`;
|
|
181
189
|
//# sourceMappingURL=contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/orchestrator/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAEjC;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,mFAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAkB;IACjD,OAAO,UAAU;SACd,KAAK,CAAC,sBAAsB,CAAC;SAC7B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;SAC7C,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACvC,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,cAAc,CAC5B,KAAuD;IAEvD,OAAO,KAAK;SACT,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;SACjF,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,eAAe,CAAC,CAAC;AAC5D,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,MAAM,YAAY,GAAG
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/orchestrator/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAa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"}
|
|
@@ -21,8 +21,8 @@ You are read-only. You never change files, never run builds, never implement. If
|
|
|
21
21
|
|
|
22
22
|
## This turn
|
|
23
23
|
|
|
24
|
-
- **The description and answers are the brief.** Use
|
|
25
|
-
- **One card is the normal answer.**
|
|
24
|
+
- **The description and answers are the brief.** Use findings in \`<research>\` as a starting point, but verify the consequential path yourself when a value or setting changes: selection, storage or transport, consumer, and runtime effect. Read only the source needed to confirm that path or to fill a missing fact, see what surrounds a quoted line, or replace a failed finding. If no findings exist, read the repo before drafting.
|
|
25
|
+
- **One card is the normal answer.** Split only along genuinely independent behavior boundaries: each card must have acceptance that can pass with its siblings reverted, and cards that run in parallel must not touch the same files. Sequential steps that make one behavior work stay together. Keep each card to four acceptance checks maximum; if a fifth check is needed, split into independent tickets or ask the person to choose a smaller outcome when no independent split exists. One or two cards is normal; five is an absolute ceiling, never a target.
|
|
26
26
|
- **Ask at most three questions**, and only where reading the repo cannot answer. Each option carries its cost. If both answers lead to the same card, the question is a tax — delete it.
|
|
27
27
|
- **The board is not a suggestion box.** \`<board>\` lists work that already exists. A card that repeats a ticket there is worse than no card; if the description overlaps one, say so in \`reply\` and write the card as the change on top of it.
|
|
28
28
|
- **\`reply\` is one or two sentences** about the choice you made and the sharpest thing you are unsure of. Do not tell the person where to find the card: it is in front of them.
|
|
@@ -31,7 +31,7 @@ You are read-only. You never change files, never run builds, never implement. If
|
|
|
31
31
|
|
|
32
32
|
The person is about to let an agent run this without further reading. So the acceptance criteria are the thing you must not invent: derive each one from their words or from something you read, and put every guess in \`assumed\` where they will see it before confirming. A card with an honest flag is a card they can trust; a card with confident prose is one they have to re-read the repo to check.
|
|
33
33
|
|
|
34
|
-
When findings are supplied,
|
|
34
|
+
When findings are supplied, use them for the entry point, relevant tests and reuse pattern. They do not replace targeted reading needed to trace a changed value or setting from its source through the affected consumers to its runtime effect. Open the source at each handoff on that path, including in a linked repo when relevant; a cited line is read only for that line, not its surrounding behavior. Read no unrelated files. Otherwise open only what is needed to investigate a failed finding, fill a missing fact, or see the code around a quoted line.
|
|
35
35
|
|
|
36
36
|
${PLANNING_METHOD}
|
|
37
37
|
|
|
@@ -43,7 +43,7 @@ ${OUTPUT_CONTRACT}`;
|
|
|
43
43
|
* small change, questions only the person can answer, or the reading the
|
|
44
44
|
* draft will need. It is short on purpose; the draft pass is the expensive one.
|
|
45
45
|
*/
|
|
46
|
-
export const NEW_TASK_INTAKE_PROMPT = `You are the first pass of Zelio's new-task dialog. From the person's description and the repository index only, ask at most three questions that only the person can answer and whose answers change what gets built. Otherwise ask nothing. Do not read files, write cards, or list research:
|
|
46
|
+
export const NEW_TASK_INTAKE_PROMPT = `You are the first pass of Zelio's new-task dialog. From the person's description and the repository index only, ask at most three questions that only the person can answer and whose answers change what gets built. Otherwise ask nothing. Do not read files, write cards, or list research: the repository is already being read and a later pass writes the cards.
|
|
47
47
|
|
|
48
48
|
Return a JSON block with reply, questions and cards. Cards must be [].
|
|
49
49
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
2
|
import { toolResultText } from "../run/actions.js";
|
|
3
|
+
import { piPackageExtensionArgs } from "../run/pi-packages.js";
|
|
3
4
|
import { thinkingArgs } from "../run/thinking.js";
|
|
4
5
|
const TOOLS = "read,grep,find,ls,web_search,web_fetch,explore";
|
|
5
6
|
const EXTENSION = new URL("./web.js", import.meta.url);
|
|
@@ -65,12 +66,17 @@ export class PiPlannerSession {
|
|
|
65
66
|
killTimer;
|
|
66
67
|
events;
|
|
67
68
|
constructor(options) {
|
|
69
|
+
const packageExtensionArgs = options.packageExtensionArgs ?? piPackageExtensionArgs(options.command);
|
|
68
70
|
this.child = spawn(options.command, [
|
|
69
71
|
"--mode",
|
|
70
72
|
"rpc",
|
|
71
73
|
"--no-session",
|
|
72
74
|
"--no-mcp",
|
|
73
75
|
"--no-extensions",
|
|
76
|
+
// --no-extensions also drops the user's installed pi packages, and a
|
|
77
|
+
// package can be the provider behind a picked model. Load the personal
|
|
78
|
+
// ones by path; the ticket repository's project packages stay out.
|
|
79
|
+
...packageExtensionArgs,
|
|
74
80
|
"--no-skills",
|
|
75
81
|
"--no-prompt-templates",
|
|
76
82
|
"--no-context-files",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pi-session.js","sourceRoot":"","sources":["../../src/orchestrator/pi-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAuC,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,MAAM,KAAK,GAAG,gDAAgD,CAAC;AAC/D,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,UAAU,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACvD,MAAM,aAAa,GAAG,KAAK,CAAC;AAE5B,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,GAAW,EAAU,EAAE;IAClD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,OAAO,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AACjE,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,IAAa;IACnD,MAAM,MAAM,GAAG,CAAC,IAAI,IAAI,EAAE,CAA4B,CAAC;IACvD,MAAM,IAAI,GAAG,CAAC,GAAW,EAAU,EAAE,CACnC,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAM,CAAC,GAAG,CAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAEjE,QAAQ,IAAI,EAAE,CAAC;QACb,KA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IAAI,CAAC,UAAU;YAAE,OAAO;QAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC,CAAC;IAC/E,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -42,16 +42,16 @@ A question is a decision with a price on each answer. That is the whole shape of
|
|
|
42
42
|
|
|
43
43
|
## Splitting
|
|
44
44
|
|
|
45
|
-
Default to one card. Split only
|
|
45
|
+
Default to one card. Split only along genuinely independent behavior boundaries; do not fragment one coherent outcome into file-edit chores. Each card must be verifiable with its siblings reverted. Parallel cards must be workable at the same time without touching the same files or making each other wrong.
|
|
46
46
|
|
|
47
47
|
If a goal is split, preserve the complete user outcome across the cards and state dependencies plus who owns cross-card integration and final end-to-end verification. Individual green cards do not prove the full user flow.
|
|
48
48
|
|
|
49
49
|
So, before writing a second card, check all four:
|
|
50
50
|
|
|
51
|
-
1. **File overlap.**
|
|
52
|
-
2. **Order dependence.**
|
|
51
|
+
1. **File overlap.** Parallel cards whose \`likely_files\` intersect cannot run together. If the overlapping work is one behavior, keep it in one card; otherwise state the actual dependency and integration owner.
|
|
52
|
+
2. **Order dependence.** Sequential implementation steps for one behavior stay in one ticket. A real dependency between independently useful outcomes may be separate cards only when each card's acceptance can pass on its own; state the dependency and integration owner.
|
|
53
53
|
3. **Verifiable alone.** If a card's acceptance criteria cannot pass with its siblings reverted, it is a slice, not a ticket.
|
|
54
|
-
4. **Check count.** Keep acceptance at four checks maximum.
|
|
54
|
+
4. **Check count.** Keep acceptance at four checks maximum. If a fifth check is needed, split only along independent behavior boundaries with stand-alone acceptance; when no such split exists, ask the person to choose a smaller outcome. Never evade the four-check limit by grouping several observations into one sentence.
|
|
55
55
|
|
|
56
56
|
One or two cards is the normal answer, even for a change that touches five files. Five is the ceiling for genuinely independent work, never a target. Never pad a plan — a board of artificial slices spends the person's attention, which is the scarcest thing here.
|
|
57
57
|
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import { SCOUT_MAX_ANSWER_CHARS, SCOUT_PROMPT } from "./explore.js";
|
|
1
|
+
import { SCOUT_MAX_ANSWER_CHARS, SCOUT_PROMPT, SCOUT_TOOL_BUDGET } from "./explore.js";
|
|
2
2
|
export const MAX_RESEARCH = 3;
|
|
3
3
|
export const RESEARCH_TIMEOUT_MS = 90_000;
|
|
4
4
|
export const RESEARCH_TOOLS = ["read", "grep", "find", "ls"];
|
|
5
|
+
/**
|
|
6
|
+
* The nudge sent once a scout crosses `SCOUT_TOOL_BUDGET` tool calls — the same
|
|
7
|
+
* ceiling `scoutRepo` steers at in explore.ts. Without this, a scout that keeps
|
|
8
|
+
* reading past the point of a useful answer runs silently to
|
|
9
|
+
* `RESEARCH_TIMEOUT_MS` and comes back clipped and marked as timed out, instead
|
|
10
|
+
* of answering from what it already has.
|
|
11
|
+
*/
|
|
12
|
+
export const SCOUT_STEER_MESSAGE = "You have read enough to answer. Write your cited answer now and stop.";
|
|
5
13
|
const MAX_QUESTION_CHARS = 20_000;
|
|
6
14
|
const MAX_PATHS = 6;
|
|
7
|
-
/** Deterministic, independent readings of the person's original request. */
|
|
8
|
-
export function taskResearchQuestions(description) {
|
|
9
|
-
return [
|
|
10
|
-
`Where does this change belong? Identify relevant entry points, stores and routes. Trace every path that sets or reads the behavior the task describes — UI, API routes, CLI commands, stored rows and config files — and say which one wins when they disagree.`,
|
|
11
|
-
`Which existing tests cover the relevant behavior and entry points?`,
|
|
12
|
-
`How does the closest existing feature implement similar behavior?`,
|
|
13
|
-
].map((question) => ({
|
|
14
|
-
question: `${question}\n\nTask: ${description.slice(0, MAX_QUESTION_CHARS - 200)}`,
|
|
15
|
-
paths: [],
|
|
16
|
-
}));
|
|
17
|
-
}
|
|
18
15
|
/** Keeps only well-formed questions, in order, and caps them at MAX_RESEARCH. */
|
|
19
16
|
export function normaliseResearch(value) {
|
|
20
17
|
if (!Array.isArray(value))
|
|
@@ -61,7 +58,7 @@ export function linkedBoardQuestion(board, description) {
|
|
|
61
58
|
return {
|
|
62
59
|
board,
|
|
63
60
|
paths: [],
|
|
64
|
-
question: `This repository (${board})
|
|
61
|
+
question: `This repository (${board}) is one the home repository works with. Does this task need a change in it? If so: where it enters, which stores and routes it touches, which tests cover them, and what this repository must accept from or send to the other one. If not, say so.\n\nTask: ${description.slice(0, MAX_QUESTION_CHARS - 600)}`,
|
|
65
62
|
};
|
|
66
63
|
}
|
|
67
64
|
function messageOf(error) {
|
|
@@ -78,6 +75,15 @@ function stopRun(run) {
|
|
|
78
75
|
// A run that is already gone has nothing left to stop.
|
|
79
76
|
}
|
|
80
77
|
}
|
|
78
|
+
/** Fire-and-forget: a steer that fails must not fail the scout reading it. */
|
|
79
|
+
function nudge(run, message) {
|
|
80
|
+
try {
|
|
81
|
+
void run.sendMessage?.(message)?.catch(() => { });
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// The adapter rejected the nudge; the scout still has until its timeout.
|
|
85
|
+
}
|
|
86
|
+
}
|
|
81
87
|
/** One question, one scout. Never rejects. */
|
|
82
88
|
async function scout(question, options) {
|
|
83
89
|
const started = Date.now();
|
|
@@ -105,11 +111,20 @@ async function scout(question, options) {
|
|
|
105
111
|
return finding("", messageOf(error));
|
|
106
112
|
}
|
|
107
113
|
let text = "";
|
|
114
|
+
let toolCalls = 0;
|
|
115
|
+
let steered = false;
|
|
108
116
|
const reading = (async () => {
|
|
109
117
|
try {
|
|
110
118
|
for await (const event of run.events) {
|
|
111
119
|
if (event.type === "text")
|
|
112
120
|
text += event.text;
|
|
121
|
+
if (event.type === "tool_start") {
|
|
122
|
+
toolCalls += 1;
|
|
123
|
+
if (!steered && toolCalls >= SCOUT_TOOL_BUDGET) {
|
|
124
|
+
steered = true;
|
|
125
|
+
nudge(run, SCOUT_STEER_MESSAGE);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
113
128
|
if (event.type === "exit")
|
|
114
129
|
break;
|
|
115
130
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"research.js","sourceRoot":"","sources":["../../src/orchestrator/research.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"research.js","sourceRoot":"","sources":["../../src/orchestrator/research.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGvF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAC9B,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAC1C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAU,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAC9B,uEAAuE,CAAC;AAE1E,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,SAAS,GAAG,CAAC,CAAC;AAEpB,iFAAiF;AACjF,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACrC,MAAM,SAAS,GAAuB,EAAE,CAAC;IACzC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,SAAS,CAAC,MAAM,IAAI,YAAY;YAAE,MAAM;QAC5C,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,SAAS;QAChD,MAAM,MAAM,GAAG,IAA+C,CAAC;QAC/D,MAAM,QAAQ,GAAG,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ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