refactor(wire,features,database,service,host,desktop): free the name "task": a coding agent's prompt, an ask's revision, and the inbox's to-do (LUKE-369 1/7)
Merged
CH
5d ago+362+362+012345678901234567890123456789-199-199-012345678901234567890123456789
Summary
LUKE-369, PR 1 of 6: rename the product concept "plan" to "task". This PR frees the word first. "Task" is about to name the unit of work that a plan is today, so the three other things the code called a task get their own names. The wire and stored values don't change.
- A coding agent's prompt. An agent started on the developer's own words is handed a prompt:
CodingAgent.task,CodingAgentBriefText,StartPlace, the draft (AgentDraft.prompt,startPrompt), the act payload, and the automation run's words (automationPrompt) are all renamed.- The
coding_agent.taskcolumn keeps its SQL name (prompt: text("task")) until PR 6 renames the columns. CODING_AGENT_BRIEF.TASKbecomesPROMPT. Its value stays"task", because released desktops decode it.- The Start request's key stays
taskon the wire. The newwireKeysmaps it topromptat the edge (below). start_coding_agent's model input keeps itstaskkey. The model-facing wording is PR 2's.
- An ask's revision.
asks.taskRevisionbecomesaskRevisionin TypeScript. The column follows in PR 6. - The inbox's to-do.
INBOX_RESPONSE.TASKbecomesTODO. Its value stays"task"because stored items, the model's enum, and released desktops all use that spelling. The orchestrator agreed to this. PR 2 rewords the prose around it. wireKeys(@luke/wire/effect): a struct key that reads in code under one name and travels under the wire's name. Effect's ownencodeKeysencodes each field throughtoEncoded, which drops every bound from the emitted JSON Schema, so the wire golden would have changed.wireKeyskeeps the real fields on the wire side and decodes totoType(self), so the golden stays byte-identical. PRs 4 and 5 will use it forplanId→taskId.
What did not change, and why
- eve's
task_wait/task_cancel, itstaskId, and its subagent tasks. The plan asked forask_wait/ask_cancel, but eve 0.74.0 hardcodes these names (eve/dist/src/protocol/task-tools.js) and dispatches on them. Its receipts ("Started task ") and<task_result>messages use the same word. Renaming them on our side would break delegation. The orchestrator agreed to leave them, with a note at each constant (EVE_TOOL,EVE_DELEGATION_TOOL,CODER_TASK_TOOL,CHILD_TASK, the scripted model) that they are eve's subagent tasks, not a Luke task. So the planned test for a storedtask_waitstill rendering has nothing new to prove. The existingtool-call-model.test.tscase still covers it. - Model-facing prose is left for PR 2, and user-facing copy and docs for PR 3.
Evidence
pnpm check:affected: exit 0.- New test
coding-agent-client.test.ts: "a Start's prompt travels under the key a released service reads, task, trimmed as it is bounded". It fails without the mapping, because the body would carryprompt. - New test
packages/wire/src/effect/json-schema.test.ts:wireKeysreads and writes the wire's key, refuses the code's key, keeps the bounds, and emits the wire's keys with every field's bounds. coding-agents-app.test.tsstill poststaskover HTTP and reads the agent's mentioned servers off it, which shows the service reads the released key.
Invariants
-
./scripts/check.shgreen. (CI) - JSON Schema goldens. Every hosted wire golden is unchanged,
coding-agent-wire-codingAgentStartRequestSchema.jsonincluded. One golden was re-recorded withLUKE_UPDATE_FIXTURES=1:coding-agent-view-codingAgentStartParamsSchema.json, where"task"becomes"prompt". That is the renderer-to-host act payload and the in-process gateway's parameters, which are one build on both sides, so no released desktop reads it. - Every behavior change has its test in this PR: the wire mapping and
wireKeys. The rest is renaming. - Gateway envelope goldens unchanged.
- No
asbeyond two SAFETY-commented single assertions inwireKeys.as unknown asis refused by anti-slop, and this uses none. - No
Effect.run*outside the edges. - No new raw async primitives.
- No discarded Effect.
- Test count: +3 (one client test, two
wireKeystests). - No hand-rolled file replaced.
- No CLAUDE.md/AGENTS.md sentence names a renamed part. Docs are PR 3's.
-
PRIVACY.mdunchanged. - Deps unchanged.
- Barrel/door rule unaffected.
Notes
- Stack: 1/6 (free "task") → 2/6 model prose → 3/6 copy and docs → 4/6 package identifiers → 5/6 app identifiers → 6/6 database.
🤖 Generated with Claude Code
Summary by cubic
Reserves the name "task" for what a plan is about to become (LUKE-369, first step): the developer's own words a coding agent is started on are now a prompt, a spoken ask's taskRevision is askRevision, and the inbox's INBOX_RESPONSE.TASK is TODO. Nothing changes on the wire or in storage, so released desktops and stored rows are unaffected.
Wire compatibility
- The Start request's
taskkey, the coding agent brief's"task"value, the inbox's stored"task"value, and thetask_revisioncolumn keep their old names; the columns are renamed later in the series. - Reads the wire's
taskintopromptvia a newwireKeysstruct mapping in@luke/wire/effect, which preserves each field's bounds in the emitted JSON Schema, so the hosted golden is unchanged; a mapping that would put two fields under one wire key is refused at declaration. - eve's own
task_wait/task_canceltools and subagenttaskIds keep their names and are now documented as eve's subagent tasks, not a Luke task.