I3411 — A task records the captured prompt it followed, so the join from prompt to task is a recorded fact rather than a time adjacency
When majordomus start writes task.started (lib/start.sh:158), add an optional prompt key. It holds the provider and provider prompt id of the newest capture record that the starting episode captured before the start. The record is found through a helper in lib/capture.sh over the same two day-globs I3406 bounds. Write no key when the episode captured nothing, and never any prompt text. Document the optional key in share/events.yaml's note for task.started, and leave requires unchanged.
BLOCKED wave 1 · p2 · implementation profile · parallel safe
Blocked. This issue cannot start until I3406, milestone:a-prompt-reaches-the-work-it-serves are done. The status is derived from that, not declared.
Objective
When majordomus start writes task.started (lib/start.sh:158), add an optional prompt key. It holds the provider and provider prompt id of the newest capture record that the starting episode captured before the start. The record is found through a helper in lib/capture.sh over the same two day-globs I3406 bounds. Write no key when the episode captured nothing, and never any prompt text. Document the optional key in share/events.yaml's note for task.started, and leave requires unchanged.
Why
The owner's 2026-10-19 Cognitive Fabric pack (campaigns/prismatic-way-cognitive-fabric-prompt-pack/prompts/00_MASTER.md, contracts/EVENT_CONTRACT.md) requires that an event reach the existing task identity and change validated state through its canonical owner, with a causal parent. The task lifecycle is that owner, and the ledger is its record.
Current state
When the binding was asked, task.started carries task_id, profile, owner, scope and requires, plus issue, intent, exemption, binding and plan_revision (lib/start.sh:158-160). A capture record names its episode (lib/capture.sh:583-586), and nothing links it to a task. The ledger is .ai/local/state/ledger.jsonl, which is gitignored and machine-local (lib/common.sh:1657).
Desired state
Every task started after a captured prompt names that prompt's identity. The prompt to task join reads as recorded; it is inferred only for lines written before this change.
Scope
- lib/start.sh
- lib/capture.sh
- share/events.yaml
- test/cases/960_a_task_starts_bound_to_what_it_serves.sh
Out of scope
- Any prompt text in the ledger
- Matching the prompt inside start
- Changing session.started (I3142)
Dependencies
What waits on this
Acceptance criteria
- A start after a captured prompt of the same episode writes task.started with that prompt's provider and id
- A start in an episode with no capture writes no prompt key
- A capture from another episode is never named
- The line carries no prompt text, and majordomus history --event task.started still reads older lines
Validation
- bash test/run.sh 960_a_task_starts_bound_to_what_it_serves 29_prompt_capture
- majordomus shell check
Evidence required
- case_a_task_names_the_prompt_it_followed (an assertion block added to test/cases/960_a_task_starts_bound_to_what_it_serves.sh)
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Timeline
- started
- —
- verified
- —
- completed
- —
Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.
Canonical record: .ai/repo/project/issues/I3411.yaml. Read it back with majordomus plan show I3411.