Commit Graph

29 Commits

Author SHA1 Message Date
Levi Neely e31d1abd1e u/cascade: add session name to results; sync schema with actual fields 2026-05-17 13:36:59 +02:00
Levi Neely 204e0e7a9d u/cascade: validate -retries; add attempts field to results
- Reject non-positive-integer -retries early
- Each worker records attempt count; results JSON includes
  'attempts' field for retry observability
2026-05-17 13:35:39 +02:00
Levi Neely 8895150f94 u/cascade: add -retries N for transient worker failure recovery
Workers retry with linear backoff (attempt*2s). Each retry uses a
unique session name suffix (-r2, -r3, ...) to avoid collisions.
Default: 1 (no retry).
2026-05-17 13:34:37 +02:00
Levi Neely 7f8421691f u/cascade: validate -max-workers; truncate large worker outputs
- Reject non-positive-integer -max-workers early
- Per-worker output capped at OLLIE_CASCADE_MAX_OUTPUT (default 8000 chars)
  to prevent synthesis prompt blowup
2026-05-17 13:33:25 +02:00
Levi Neely 42929b4c57 u/cascade: pass JSON results directly to planner synthesis prompt 2026-05-17 13:32:43 +02:00
Levi Neely 04bed6189f u/cascade: structured JSON results, worker throttling via -max-workers
- Results gathered as JSON array [{id, status, output}]
- Default output is pretty-printed JSON (no synthesis)
- -max-workers N (default 8) throttles concurrent workers
- Synthesis renders JSON to text for planner prompt
2026-05-17 13:31:23 +02:00
Levi Neely 9ca6b9de8a u/cascade: strict plan schema validation; clarify exit code contract
- Validate all entries have non-empty string id and instruction
- No synthesis: exit 1 on worker failures (partial results)
- Synthesis: exit 0 — planner accounts for failures in its answer
2026-05-17 13:27:56 +02:00
Levi Neely 664b9e7f93 u/cascade: invert synthesis default — off unless -synthesize is passed 2026-05-17 13:25:17 +02:00
Levi Neely 77efded76d u/cascade: add -json-output flag for structured synthesis output
Schema: {summary, answer, worker_results[], errors[]}
2026-05-17 13:24:28 +02:00
Levi Neely 8d78c6a7bc u/cascade: validate plan schema (require .id and .instruction per entry) 2026-05-17 13:22:14 +02:00
Levi Neely c29cf7dcdc u/cascade: track per-worker failures, annotate status, exit non-zero 2026-05-17 13:22:00 +02:00
Levi Neely 87fb50f207 u/cascade: use private tmpdir for worker output isolation 2026-05-17 13:21:34 +02:00
Levi Neely 3d513790f9 u/cascade: add -no-synthesize flag to skip expensive synthesis step 2026-05-17 13:21:10 +02:00
Levi Neely b4be3a01d9 add cascade tool and script-driven orchestrator
tools/cascade: fire-and-forget delegation to cheap model; worker
reports back to parent prompt when done. Parallelizable.

scripts/u/cascade: script-driven hub-and-spoke orchestrator for
terminal use — planner decomposes, workers execute in parallel,
planner synthesizes.
2026-05-17 13:16:18 +02:00
Levi Neely 4888db8e12 u/complete: add -cwd flag; acme submodule update (type resolution) 2026-05-11 16:50:43 +02:00
Levi Neely 6ae476355a u/complete: stronger prompt (no reasoning output); drop :: echo to stderr 2026-05-11 16:15:27 +02:00
Levi Neely bb13c24ef2 u/complete: prompt says implement, not complete; reject stub echoing 2026-05-11 15:48:52 +02:00
Levi Neely 51fc98ccdf u/complete: add -context flag, increase prefix to 12K chars 2026-05-11 14:07:58 +02:00
Levi Neely 1c26a19c0a update acme, scripts 2026-05-08 17:41:55 +02:00
Levi Neely 45d1b6b77e readme: add "What you get" section; update submodules
- README.md: add feature summary with bulleted list
- acme: add README documenting ollie-acme and Kmpl
- el: refactor completion to shell out to u/complete
- u/complete: improve prompt and strip leaked tags
2026-05-03 22:03:01 +02:00
Levi Neely ed178dfad0 u/complete: prompt to complete logical unit, not just minimal insertion 2026-05-03 21:32:40 +02:00
Levi Neely 410335cb51 u/complete: split into completion engine + acme glue (Kmpl)
u/complete is now acme-free: reads prefix from stdin, takes -suffix,
-file, -model, -backend flags. Prints completion to stdout.

acme/scripts/Kmpl is the thin acme wrapper that extracts prefix/suffix
from the window and pipes to u/complete.

Also fixes prefix truncation bug (bash substring returning empty when
string is shorter than offset) and updates core submodule with
interrupt handling improvements.
2026-05-03 21:10:57 +02:00
Levi Neely 2f7107d44c u/complete: strip markdown fences, insert at cursor, info to stderr
Also set tools:false on copilot agent and update core submodule
with the new tools config field.
2026-05-03 14:59:05 +02:00
Levi Neely ebea90d5f7 u/complete: fix TOCTOU race spawning duplicate copilot sessions
Use deterministic session ID derived from cwd hash instead of
timestamp. Concurrent invocations for the same directory now
converge on the same session name, and the server rejects the
duplicate atomically.
2026-05-03 14:08:15 +02:00
Levi Neely 3c03faed3a u/complete: persistent copilot session per cwd; add freeloader hook
- Replace per-invocation s/bfg calls with a persistent *-copilot session
  looked up from s/idx; first call in a cwd spawns the session, subsequent
  calls reuse it, skipping s/new overhead
- Clear context after each completion so inference stays fast
- Fix session lookup to read s/idx instead of globbing the 9P mount
- Add x/freeloader turnError hook to copilot.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 13:54:29 +02:00
Levi Neely cddda76a3f u/complete: add model/backend flags and env var support; fix winid=0
- Add -model and -backend flags; read OLLIE_COMPLETE_MODEL /
  OLLIE_COMPLETE_BACKEND as defaults; error if neither is set
- Guard against winid=0 (acme column tag / +Errors window)
- Document OLLIE_COMPLETE_MODEL and OLLIE_COMPLETE_BACKEND in
  README.md and doc/env.sample

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 13:43:30 +02:00
Levi Neely 2c8e59e7f5 acme: add u/complete for AI ghost-text code completion
Adds a u/complete script that reads prefix/suffix from the current acme
window via dot position, submits a fill-in-the-middle prompt to ollie
via s/bfg, and writes the completion to a new ollie/complete window.

Also adds a minimal copilot agent config (no system prompt, no tools)
for use by u/complete, and wires both into the install target in mkfile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 13:30:26 +02:00
Levi Neely f4c340c2cb unify s/ and b/ namespaces: batch jobs now live under s/
Option C implementation: single namespace with composable file tables.
Batch jobs are sessions with a reduced file set — the directory
contents declare the capability.

- core: SessionStore absorbs BatchStore; s/new detects batch format
- 9p: /b/ removed entirely; all routing through /s/
- scripts/b/* moved to scripts/s/*; paths updated
- subagent_spawn, optimize: /b/q -> /s/q
- scripts/b/ removed
2026-04-23 18:50:05 +02:00
Levi Neely 106bd6410e scripts: move optimize to u/ (utility) namespace
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 12:00:39 +02:00