Commit Graph
100 Commits
Author SHA1 Message Date
alex 33bf16ef2f Wiki: 0.4.0 released 2026-12-01 12:14:48 +00:00
alex 8dd5fb0fad Release 0.4.0: run state, supervisor seam, and bounded observation 2026-12-01 12:14:43 +00:00
alex d6a11b32e5 Wiki: merged to main, spec #20 closed 2026-12-01 12:09:25 +00:00
alex e25f733dce Merge architecture-deepening: run state, the supervisor seam, bounded observation (spec #20) 2026-12-01 12:08:24 +00:00
alex af420e818c Retro: architecture-deepening pipeline findings and follow-ups 2026-12-01 12:02:07 +00:00
alex c5df57dda1 Wiki: review and fix pass complete, pipeline closed pending merge 2026-12-01 12:01:40 +00:00
alex 5cc066052b Merge ticket/arch-review-fixes: two-axis review fixes (restored-run wait, start-plan rename, FIFO-cancel pin) 2026-12-01 12:00:20 +00:00
alex 628fcb2ff4 Scope the presentation rulebook comment to task rows 2026-12-01 11:57:00 +00:00
alex 3c8712eb4b Record the pre-terminal loop death in ADR 0004 2026-12-01 11:56:58 +00:00
alex dcc66a4b26 Thread the load-time child environment into the runner 2026-12-01 11:56:55 +00:00
alex e623dae30c Store the bare skip reason and own its format in present 2026-12-01 11:56:52 +00:00
alex b4090c22d7 Tag wait results with a job-or-run discriminant 2026-12-01 11:56:49 +00:00
alex 5a44640ef3 Pin single finalization when a run is cancelled in the FIFO 2026-12-01 11:56:46 +00:00
alex 6f7f9d2a3b Keep a reloaded run's bounded answer and cover the wait fallback 2026-12-01 11:56:43 +00:00
alex 55752dd3bb Drop the unused expansion validator import from prepare 2026-12-01 11:56:40 +00:00
alex b442cf0ebf Finish the start-plan rename in identifiers and docs 2026-12-01 11:56:37 +00:00
alex 9ba089a545 Wiki: wave 4 complete (#25, #26 merged); frontier is the review pass 2026-12-01 11:46:43 +00:00
alex 79f9df84a0 Merge ticket/t6-presentation: presentation rulebook in present.ts (#26) 2026-12-01 11:42:52 +00:00
alex 78e13dcb1b Merge ticket/t5-observation: job event seam, terminal checkpoints, bounded run wait (#25) 2026-12-01 11:41:29 +00:00
alex d94c2795a7 Guard the observation seam at 256 children and across crash restore 2026-12-01 11:39:54 +00:00
alex df929590e8 Emit job events, checkpoint at terminal, and bound the run wait 2026-12-01 11:39:54 +00:00
alex 466915b13d Delete the unreachable workflow result renderer 2026-12-01 11:35:46 +00:00
alex 3781f0e041 Own task and start presentation rules in present.ts 2026-12-01 11:35:45 +00:00
alex bf70be5729 Wiki: wave 3 complete (#23, #24 merged) 2026-12-01 11:29:13 +00:00
alex e15c86f007 Merge ticket/t4-step-mirrors: step schemas, whole-plan hash v2, record schemas (#24)
# Conflicts:
#	test/workflow-journal.test.ts
2026-12-01 11:26:53 +00:00
alex c48e25b26f Merge ticket/t3-run-module: project the workflow journal from run state (#23) 2026-12-01 11:23:19 +00:00
alex ed59a748cb Own persisted record shapes with TypeBox schemas
TaskSnapshot, JobSnapshot, the workflow journal record, and their entry
envelopes are TypeBox schemas whose Static types are the persisted types.
persistence.ts restores with Value.Check, so the hand-written validators
(and their drift: validTask skipped step, validJob skipped timings and
errors) are gone. A fast-check property holds persist -> restore equal
over generated records.
2026-12-01 11:21:40 +00:00
alex fa747145ce Hash whole plan steps under payload version 2
workflowStepInputHash and workflowItemInputHash feed the canonical
serializer the plan with provenance stripped, so every step field is
hashed by default and a new one cannot vanish from the replay contract.
The payload marker moves 1 -> 2 to separate hash eras; nothing replays
today (ADR 0004).
2026-12-01 11:19:33 +00:00
alex 1fcc6130c7 Make the step schema the one field list
Parse steps with Value.Check against a TypeBox WorkflowStepSchema, derive
the allowed field names from it, and keep full steps in the start plan:
model and cwd ride along, so ExpandedWorkflowStep has no shape to copy.
PreparedWorkflowStep projects the canonical step type instead of
re-declaring id, needs, and each.
2026-12-01 11:19:33 +00:00
alex 8bc08bd08a Project the workflow journal from run state
The journal rebuilt the step/item graph from the flat job record: rows
were grouped by stepId, an each-step's coordinator row was picked out of
the collision with its item children, and a positional fallback covered
rows without step ids. After the seam (#22) the supervisor owns the DAG
index, so the record is a projection of that state instead.

- WorkflowSupervisor.journal(execution) projects the record from its
  stepTasks/itemTasks index and the run spec while the run is live.
- journal.ts keeps the pure row builders, now over the shared InternalTask
  record, and builds the record from plan order plus the index; itemsByStep,
  the byStep collision handling, and the positional fallback are gone.
- The manager calls the run's projection at finalize and passes it to
  onWorkflowJournal; interrupted runs project at shutdown as before.
- jobUsage() moves the usage summation into job-state.ts so the snapshot
  and the journal read one number.

Journal tests that hand-built flat snapshots to exercise the
reverse-engineering are replaced by run-state-driven ones; a cancelled
run's journal is now covered too.

Part of #23.
2026-12-01 11:18:13 +00:00
alex a3fc182cb5 Wiki: wave 2 complete (#22 merged) 2026-12-01 11:12:36 +00:00
alex 437ac3da68 Merge ticket/t2-seam: make the workflow supervisor host seam real (#22) 2026-12-01 11:10:08 +00:00
alex 1176537b32 Test the workflow supervisor through a fake host
Add a second WorkflowSupervisorHost adapter and drive release order, transitive skips, fail-soft items, zero-item failure, cancellation with pending items, stall detection, and injected cap limits without a manager or temp agent directories.
2026-12-01 11:09:26 +00:00
alex 621f6e2579 Make the workflow supervisor host seam real
Move Execution, InternalTask, and the status predicates into job-state.ts; the supervisor now creates, schedules, and settles shared rows only through its host. Concentrate cancellation and shutdown settlement in one supervisor policy, make restored rows honest (no fabricated AgentConfig), and thread load-time cap limits through WorkflowRunSpec so release enforcement and the review card share one value. Agent discovery is memoized per cwd within a prepare call.
2026-12-01 11:09:26 +00:00
alex 23c9f84650 Wiki: wave 1 complete (#21 merged) 2026-12-01 10:59:29 +00:00
alex 1b48b726e8 Merge ticket/t1-file-split: split workflow modules by concern and rename the start plan (#21) 2026-12-01 10:57:27 +00:00
alex 4cadd04680 Rename ExpandedWorkflowPlan to StartPlan 2026-12-01 10:56:01 +00:00
alex 7114650aed Split workflow modules by concern: plan, run, command 2026-12-01 10:55:35 +00:00
alex cfec14e515 Wiki: open the architecture-deepening goal (spec #20, tickets #21-#26) 2026-12-01 10:51:18 +00:00
alex e1dc44225e Wiki: 0.3.0 released 2026-11-30 20:16:04 +00:00
alex bd1fccfdc3 Release 0.3.0: live dashboard and the ultra layer 2026-11-30 20:15:02 +00:00
alex fd10ef93f1 Retro: ultra-layer pipeline findings and rule promotions 2026-11-30 20:03:47 +00:00
alex 2b382eb842 Ignore node_modules symlinks in worktrees 2026-11-30 20:03:24 +00:00
alex 298cb39847 Merge ultra-layer: the ultra layer — inline plans, ultra mode, keyword trigger, completion notices (#14) 2026-11-30 20:01:42 +00:00
alex 2c66fd0c61 Wiki: review and fix pass complete, pipeline closed pending merge 2026-11-30 17:46:35 +00:00
alex 6db0fd8c75 Merge ticket/ultra-review-fixes: two-axis review fixes for the ultra layer 2026-11-30 17:43:44 +00:00
alex ee53b7ef18 Cover the mode/no-UI cell, start cwd resolution, and the over-cap warning 2026-11-30 17:42:25 +00:00
alex 90297c9229 Thread load-time ultra config through the formatters and rename advisory targets 2026-11-30 17:42:25 +00:00
alex e77e783737 Replace dead keyword helpers with property coverage of the matcher 2026-11-30 17:42:25 +00:00
alex d830733e91 Extract the shared ultra on/off config cascade 2026-11-30 17:42:24 +00:00
alex 2dca0106ea Scope ADR 0005's review card to UI sessions without mode consent 2026-11-30 17:42:24 +00:00
alex 29dec6ea7c Merge ticket/ultra-t5: document the ultra layer (#19) 2026-11-30 17:34:36 +00:00
alex 8a4c225386 Document the ultra layer 2026-11-30 17:33:59 +00:00
alex 2c1dbb6344 Wiki: wave 3 complete (#18 merged) 2026-11-30 17:30:49 +00:00
alex 3ec4c211c5 Merge ticket/ultra-t4: ultracode keyword trigger (#18) 2026-11-30 17:29:53 +00:00
alex 325711f098 Test the keyword with ultra mode on and no-keyword input 2026-11-30 17:28:42 +00:00
alex 431ce1c135 Wire the keyword trigger into input and run hooks 2026-11-30 17:27:34 +00:00
alex 4fcfe85d0c Add the ultracode keyword trigger 2026-11-30 17:27:34 +00:00
alex 8f8fe92089 Add ultra keyword configuration 2026-11-30 17:27:34 +00:00
alex 8e392ee140 Wiki: wave 2 complete (#16, #17 merged) 2026-11-30 17:25:52 +00:00
alex 7cf6a3cc2c Merge ticket/ultra-t3: ultra mode with injected guidance and size guideline (#17) 2026-11-30 17:24:41 +00:00
alex 44e1fd2367 Merge ticket/ultra-t2: completion notices for ultra runs (#16) 2026-11-30 17:22:55 +00:00
alex d7f345ac04 Add completion notices for ultra runs 2026-11-30 17:21:35 +00:00
alex d7c311139c Add ultra mode with injected guidance and size guideline 2026-11-30 17:20:47 +00:00
alex a867d9460a Wiki: wave 1 complete (#15 merged) 2026-11-30 17:17:44 +00:00
alex 964c60d030 Merge ticket/ultra-t1: inline plans and the ultra tool (#15) 2026-11-30 17:16:14 +00:00
alex b89ba63fd0 Document inline plans in ADR 0005 2026-11-30 17:14:59 +00:00
alex d78d6fc31b Add inline plans and the ultra tool 2026-11-30 17:14:59 +00:00
alex 4e0e737ba3 Wiki: open the ultra-layer goal (spec #14, tickets #15-#19) 2026-11-30 17:11:36 +00:00
alex 03036c5903 Add ultracode research and proposal 2026-11-30 17:10:56 +00:00
alex b8e5c7eab5 Add live subagent dashboard and default to 16 workers 2026-11-26 20:43:59 +00:00
alex 7b3686f55d Wiki: #13 merged, frontier clear 2026-11-26 20:13:03 +00:00
alex 355fe866f1 Merge ticket/t13-journal-items: journal per-item rows for each-steps (#13) 2026-11-26 20:12:20 +00:00
alex 90c179a8b9 Describe per-item records in the journal docs 2026-11-26 20:11:09 +00:00
alex c6dae27ec4 Journal each-step items as per-item rows
Each `pi-workflow-run-v1` step record now carries `items`: one row per
fanned-out child with its source line, a stable per-item input hash, status,
attempt count, bounded output, and timings, alongside the step's aggregate
record. The format has shipped nowhere, so it is extended in place.

Item identity (`itemValue`) now rides the task identity into the child's
snapshot instead of living only on the manager's internal task, so the
journal reads the line the child actually ran rather than re-deriving it
from the source output. Item hashes key the plan, step, args, and item line
— never prior outputs — so identical items hash alike across runs, and item
outputs use the same bound and truncation marker as step outputs.

Persistence validates the rows (one-based index, required fields) and the
optional item identity on job snapshots. Round-trip tests cover restore,
bounding, and hash stability, plus a property test for the hash inputs.
2026-11-26 20:09:54 +00:00
alex 626b82c4ee Wiki: record the pipeline retro and its follow-ups 2026-11-26 20:05:39 +00:00
alex 2f09d007ce Require workers to paste the merge output in their reports
The t2 implementer claimed a merge it had not made; briefs since carried the verification wording per-brief. The rule belongs in the standing worker rules once, with a checkable criterion.
2026-11-26 20:05:39 +00:00
alex 01cea75342 Add an append-only state-log check as a verify gate
The 2026-11-26 pipeline session mangled committed wiki state-log bullets three times with prefix-anchored edits, each silent at edit time. scripts/check-state-log.ts fails when a state-log line present in HEAD is missing or modified in the working tree; additions pass. Wired as npm run wikicheck, on_settle in .pi/verify.json.
2026-11-26 20:05:39 +00:00
alex 8108628a1c Ignore .scratch/ (local working files: handoffs, draft tickets) 2026-11-26 20:00:21 +00:00
alex e38f45d4e3 Wiki: #12 merged, frontier is #13 2026-11-26 19:58:19 +00:00
alex 29b3e4c6a9 Merge ticket/t12-manager-split: extract the DAG workflow supervisor (#12) 2026-11-26 19:57:37 +00:00
alex d30afe89c1 Split workflow DAG supervision out of the manager
Move ready-step release, skip propagation, item fan-out and settle, the per-run cap, and workflow cancellation settlement into src/workflow-supervisor.ts. The manager keeps the FIFO pool, worker accounting, admission, and the job/task lifecycle, and hands a run to the supervisor through a small host seam. Behavior-preserving move; spec/SubagentJobs.tla untouched.
2026-11-26 19:56:43 +00:00
alex 298ebe79d3 Wiki: merge to main, 0.2.0 release, follow-ups #12/#13 filed 2026-11-26 19:52:50 +00:00
alex 908d6fda87 Make the smoke gate hermetic: isolate the agent dir so worktree runs don't collide with the user-scope install 2026-11-26 19:52:38 +00:00
alex 20414d5fb2 Release 0.2.0: declarative workflow layer 2026-11-26 19:51:46 +00:00
alex c0eae0c150 Merge workflow-layer: declarative workflow layer (spec #4, closes the implementation) 2026-11-26 19:50:52 +00:00
alex 9eded8da3c Wiki: review pass, pipeline closure, follow-ups and retro due 2026-11-26 19:46:30 +00:00
alex d4eb164b03 Fix workflow-layer review findings
Correctness: exclude workflow dispatch from child sessions, surface invalid workflow item configuration, reject {item} outside each-steps, and confirm every untrusted project directory once per workflow start. Refactors: share task settlement, status icons, validation failures, task identity construction, and workflow run state; normalize item counts to a map. Document YAML repair leniency and glossary wording.
2026-11-26 19:44:12 +00:00
alex 688ae96dfe Merge ticket/t7-authoring-docs: document workflow authoring skill and README section 2026-11-26 19:35:50 +00:00
alex 99bccb7091 Document workflows in the README 2026-11-26 19:34:42 +00:00
alex 35d8bb34a2 Add the workflow authoring skill 2026-11-26 19:34:41 +00:00
alex 52d0843df6 Wiki: wave 3 merged, follow-ups noted, frontier is #11 2026-11-26 19:31:18 +00:00
alex 5baa7f4508 Merge ticket/t6-journal: journal workflow runs as resume-ready entries
Resolve the t4/t6 overlap in index.ts by keeping the trust-gated workflow
start path and adding the journal persistence hook and entry renderer.

Adapt journal step lookup to the item engine: an each-step's item children
share their step's id, so the run journal records one row per plan step from
the coordinator's aggregate status and joined output. Per-item journal rows
remain a follow-up. Adds a regression test for the seam.
2026-11-26 19:30:47 +00:00
alex 9a42c809d5 Merge ticket/t5-start-surface: add the workflow start surface and trust gate 2026-11-26 19:28:39 +00:00
alex 96095f9a10 Merge ticket/t4-each-fanout: execute each-step fan-out with fail-soft item semantics 2026-11-26 19:27:07 +00:00
alex f4e1535eec Execute each-step fan-out with fail-soft item semantics 2026-11-26 19:25:52 +00:00
alex cfa4a2389b Add the each-step split, template, and bound pipeline 2026-11-26 19:25:52 +00:00
alex e6f062f402 Journal workflow runs as resume-ready entries 2026-11-26 19:24:14 +00:00
alex 5922d8a8bc Add workflow start surface with trust gate 2026-11-26 19:23:38 +00:00
alex 798fa52847 Wiki: wave 2 merged, frontier is #8/#9/#10 2026-11-26 19:20:31 +00:00