<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima, branch contract-drag-reorder</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=contract-drag-reorder</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=contract-drag-reorder'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-05-08T11:16:46+00:00</updated>
<entry>
<title>feat(contracts): drag-to-reorder active contract rows in sidebar</title>
<updated>2026-05-08T11:16:46+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-08T11:16:46+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=788b54b36d876c93bd42a171e87e2bccfd1ed311'/>
<id>urn:sha1:788b54b36d876c93bd42a171e87e2bccfd1ed311</id>
<content type='text'>
HTML5 drag/drop on active contract rows. Dragging a row over
another in the same directive folder shows a green top-border drop
indicator; dropping calls reorderDirectiveContract(id, targetPosition)
and refreshes the folder. Shipped/archived rows aren't draggable
(historical, ordering is fixed).

Implementation:
- DocumentRow gains optional draggable + drag event props.
- DirectiveFolder owns the drag/over state and handleReorder
  callback; computes target position from the drop-target row's
  current position.
- Repository's reorder endpoint already exists from the backbone PR
  and handles sibling shift in a transaction.

Co-Authored-By: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat(contracts): lifecycle — Lock/Start/Pause/Complete/Unlock + queue scheduler (#129)</title>
<updated>2026-05-08T11:12:51+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-08T11:12:51+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=6690b714c64aaef5781bc0aac41b777ab72e9070'/>
<id>urn:sha1:6690b714c64aaef5781bc0aac41b777ab72e9070</id>
<content type='text'>
Adds the contract lifecycle layer on top of the unified-contracts
backbone (#128). State machine:

    draft → queued → active → shipped → archived

At most one contract per directive sits in `active` at any time —
the queue is serialised because each directive owns a single shared
worktree. Repository helpers handle the transition checks AND
auto-promote the next-up `queued` contract whenever the active slot
frees (pause / complete / unlock-from-active / archive-from-active).

Endpoints (all under /api/v1/contracts/{id}):
  POST /start    draft → queued | active (depending on slot)
  POST /pause    active → queued; promotes next queued
  POST /complete active → shipped; optional pr_url + pr_branch
  POST /unlock   queued | active → draft; promotes if was active

Frontend wiring:
  * `DirectiveContractStatus` now includes `queued`.
  * Migration adds `queued` to the CHECK constraint on
    directive_documents.status.
  * `ContractHeader` component renders breadcrumb + status pill +
    status-driven action buttons + a merge-mode (shared / own_pr)
    radio. Merge mode is editable only while draft / queued so a
    running flow's branch target can't change mid-stream.
  * RepositoryError gains a `Validation(String)` arm; the three
    existing exhaustive matches (files, mesh, versions) get a
    400 BAD_REQUEST response for it.

Drag-to-reorder UI deferred to a small follow-up — the backend
endpoint already exists from the backbone PR.

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>feat(directives): unified contracts surface — backbone (#128)</title>
<updated>2026-05-08T10:29:56+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-08T10:29:56+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=e00be74c8b575c725829677aadeb755ee81454d0'/>
<id>urn:sha1:e00be74c8b575c725829677aadeb755ee81454d0</id>
<content type='text'>
This is the backbone PR for the unified directive workflow. A directive
holds a sequence of contracts; each contract is a spec body whose
execution drives tasks in the directive's shared worktree. Lifecycle
(Lock &amp; Start, queue scheduler, drag-reorder) lands in follow-ups.

What's in this PR:
- Migration adds `position` (queue order) and `merge_mode`
  (shared|own_pr) columns to directive_documents. The actual table
  rename is deferred — the legacy `contracts` table from the old
  contracts system still exists, and the rename collision waits for
  Phase 5 to drop legacy contracts.
- Repository: list orders by position; create assigns next-position;
  update accepts merge_mode; new reorder_directive_document_position
  shifts siblings inside a transaction.
- HTTP: endpoints aliased under /api/v1/directives/{id}/contracts and
  /api/v1/contracts/{id}/... with a new /contracts/{id}/reorder.
- Frontend: api types renamed `DirectiveContract*` (avoiding the
  legacy `Contract` type collision); document-directives.tsx imports
  via aliases so the rest of the file is untouched.

Internal struct + table names stay `DirectiveDocument` /
`directive_documents` until the legacy contracts cleanup.

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>fix(doc-mode): make task rows clickable and render live transcript (#125)</title>
<updated>2026-05-05T15:30:46+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-05T15:30:46+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=928598b1b8399a95918dc1b315274a9d175eb8d9'/>
<id>urn:sha1:928598b1b8399a95918dc1b315274a9d175eb8d9</id>
<content type='text'>
Task rows in the directive sidebar's `tasks/` subfolder were rendered as
inert `&lt;div&gt;` elements with no click handler, and EditorShell had no
branch for `selection.taskId` — so clicking a task did nothing visible.

- StepRow and TaskRow are now `&lt;button&gt;` elements that call
  `onSelect(directiveId, taskId)` and navigate to
  `/directives/&lt;dirId&gt;?task=&lt;taskId&gt;`.
- EditorShell renders DocumentTaskStream with a breadcrumb when
  `selection.taskId` is set (winning over the document path).
- Step rows whose backing task hasn't been spawned yet stay disabled.

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>fix(doc-mode): flatten sidebar list + restore right-click context menu (#124)</title>
<updated>2026-05-02T16:47:24+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-02T16:47:24+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=cd09103183139788ba4297eaaa6f75d51a154c8a'/>
<id>urn:sha1:cd09103183139788ba4297eaaa6f75d51a154c8a</id>
<content type='text'>
Two regressions reported by the user:

1. The sidebar was grouping contracts under per-status sub-folders
   (active/idle/archived). The user explicitly does not want that —
   they want a flat list with status indicated by a colored dot on the
   right of each row.

2. The right-click context menu on contract rows was missing —
   start/pause/archive/delete/create-PR/update-PR are no longer
   reachable through the UI.

Fixes:

* Drop the SidebarGroup/bucketOf/GROUP_LABEL helpers; replace the
  grouped render with a flat sort by status precedence
  (active → paused → idle → draft → inactive → archived) then alpha
  by title within the same status. The existing dot-color palette is
  unchanged; the dot just moved from the LEFT of the contract title
  to the RIGHT (after the orchestrator-running pulse, when present).

* Wire `onContextMenu` through SidebarProps → DirectiveFolderProps →
  the folder header `&lt;button&gt;`. Page-level state captures the click
  position and the targeted directive; the existing
  DirectiveContextMenu component (start/pause/archive/delete/PR/
  Advance/Cleanup/PickUpOrders) renders on top.

* runAction helper centralises error handling: dispatches the API
  call, refreshes the sidebar list + bumps the document-folder
  refresh nonce on success, surfaces an alert on failure.

* Delete confirms via window.confirm and clears the URL when the
  deleted contract was the one selected.

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>fix(frontend): regenerate pnpm-lock.yaml as v6 format + pin packageManager (#123)</title>
<updated>2026-05-02T15:50:06+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-02T15:50:06+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=2c3b0e3926b8c535fb610092301f8621440b51ed'/>
<id>urn:sha1:2c3b0e3926b8c535fb610092301f8621440b51ed</id>
<content type='text'>
Build env's pnpm warned "Ignoring not compatible lockfile" against the v9
lockfile produced by my last regen — older pnpm (8.x and below, which
some build images still ship) only understands v6 lockfiles, and falls
back to "no lockfile" mode which then errors under --frozen-lockfile:

    WARN  Ignoring not compatible lockfile at /app/pnpm-lock.yaml
    ERR_PNPM_NO_LOCKFILE  Cannot install with "frozen-lockfile" because
    pnpm-lock.yaml is absent

Two-pronged fix:

1. Regenerate the lockfile in v6 format using pnpm 8.15.4 via corepack
   (`corepack pnpm@8.15.4 install`). The lockfile now starts with
   `lockfileVersion: '6.0'` again — readable by both old and new pnpm.

2. Pin `packageManager: "pnpm@8.15.4"` in package.json so build envs
   that respect corepack/Volta install the right version automatically
   instead of falling back to whatever's globally installed.

Verified locally with `corepack pnpm@8.15.4 install --frozen-lockfile`
(the CI command). \`tsc --noEmit\` passes.

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>fix(frontend): regenerate corrupted pnpm-lock.yaml (#122)</title>
<updated>2026-05-02T15:33:51+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-02T15:33:51+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=5b00a6a91aa8c876e042aca123e053b1e8a4ee99'/>
<id>urn:sha1:5b00a6a91aa8c876e042aca123e053b1e8a4ee99</id>
<content type='text'>
The committed lockfile was a manual frankenstein of pnpm v6 metadata
(`lockfileVersion: '6.0'` + `resolution:` blocks at the top) and v9-style
snapshot entries appended below. pnpm 9 read it as a single packages: map
and tripped on duplicate mapping keys (\`@floating-ui/core@1.7.5\` appeared
twice; same for \`@floating-ui/utils@0.2.11\`, plus dozens of \`@lexical/*\`
and \`@babel/*\` entries duplicated across the v6/v9 sections).

This blew up Docker / Caddy builds:

    ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "/app/pnpm-lock.yaml" is broken:
    duplicated mapping key (688:3)

Regenerated with \`pnpm install --no-frozen-lockfile\` against the existing
package.json — net -1605 / +545 lines. \`pnpm install --frozen-lockfile\` now
succeeds (the CI check), \`tsc --noEmit\` passes, \`vite build\` produces a
clean bundle.

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>feat(doc-mode): + New contract sidebar header + + New ephemeral task per folder (#121)</title>
<updated>2026-05-02T15:11:05+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-02T15:11:05+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=08d2ea6a685e248146b30f70421b853ff404b9ad'/>
<id>urn:sha1:08d2ea6a685e248146b30f70421b853ff404b9ad</id>
<content type='text'>
The unified surface didn't expose any way to create a new contract or a
new ephemeral task — the only paths were `/directives/&lt;id&gt;?document=...`
or right-click context menus that no longer existed in the documents-per-
directive sidebar restructure. Two new affordances:

* **Sidebar header gains a "+ New" button** that opens NewContractModal
  (title + goal + optional repository_url). On submit calls
  `useDirectives.create` and navigates the user into the new directive.
  Header label updated from "Documents" to "Contracts" so the button's
  intent reads naturally.

* **Each open directive folder gets a "+ New ephemeral task" button**
  alongside the existing "+ New document" affordance. Opens
  NewEphemeralTaskModal (name + plan), calls the existing
  `createDirectiveTask` API, navigates the user into the new task's
  transcript at `?task=&lt;id&gt;`.

NewContractModal and NewEphemeralTaskModal are local to the page —
mirror the styling of the older NewTaskModal that lived here pre-
restructure. ⌘/Ctrl+Enter submits.

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>build(server): split Dockerfiles, make ML model paths optional (#120)</title>
<updated>2026-05-02T14:26:39+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-02T14:26:39+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=70a83104292c4e1fe5f43dd5f50e5214928c8dd6'/>
<id>urn:sha1:70a83104292c4e1fe5f43dd5f50e5214928c8dd6</id>
<content type='text'>
Existing Dockerfile (with LLM/STT/TTS model download) is now `Dockerfile.full`.
The new top-level `Dockerfile` builds a slim image without python, without
huggingface_hub, without the model download step. The slim image is the new
default for users who only want the orchestration surface — the directive
folder UI, the mesh/task system, the API.

## Slim Dockerfile
* No python / huggingface_hub / model downloads.
* Same runtime tooling as `k8s/daemon/Dockerfile` (git, gh CLI, ssh, jq,
  curl, ca-certs, libssl3).
* Embeds the daemon binary at /app/daemon-binaries/makima-linux-x86_64
  for the in-server download endpoint.
* PARAKEET_MODEL_DIR / SORTFORMER_MODEL_PATH / CHATTERBOX_MODEL_DIR are
  intentionally NOT set — Listen and Speak return "ML models not
  configured" if a client tries to use them.

## ML model paths now optional
`ServerArgs.parakeet_model_dir`, `parakeet_eou_dir`, `sortformer_model_path`,
`chatterbox_model_dir` are now `Option&lt;String&gt;` (no defaults). The bin
constructor inspects them: if all four are present, configures
`AppState::new`; if all four are absent, uses the new
`AppState::new_slim()` which leaves `model_config = None`. The lazy load
path in `get_ml_models` already returned a clean error for None.

Speak (TTS) was already optional via `model_config.as_ref()` — still works.

Mixed configurations log a warning and degrade to slim mode.

## Ops note
The old `Dockerfile.full` retains the original behaviour for anyone who
needs STT/diarization/TTS in production. CI still builds the daemon image
from `k8s/daemon/Dockerfile` (untouched).

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>feat: multi-document directives with ephemeral task lifecycle (#119)</title>
<updated>2026-05-02T14:07:33+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-02T14:07:33+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=760516b2e7b97fa389fb3902e8d2314eea052ff0'/>
<id>urn:sha1:760516b2e7b97fa389fb3902e8d2314eea052ff0</id>
<content type='text'>
* feat: soryu-co/soryu - makima: Fix folder/file naming and breadcrumb hash bugs

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* feat: soryu-co/soryu - makima: Frontend: render multiple documents per directive folder

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* Fix DirectiveRevision import in openapi.rs after merge

* Fix document-directives.tsx merge artifacts and add inactive status</content>
</entry>
</feed>
