<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima/src/daemon/cli/mod.rs, branch drop-directive-goal</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=drop-directive-goal</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=drop-directive-goal'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-05-08T15:33:36+00:00</updated>
<entry>
<title>feat(directives): drop directives.goal — orchestration reads contract body</title>
<updated>2026-05-08T15:33:36+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-08T15:33:36+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=7af816032fbc54d5e0a8e94d4a000f307cd3b370'/>
<id>urn:sha1:7af816032fbc54d5e0a8e94d4a000f307cd3b370</id>
<content type='text'>
Hard cut. The unified contracts surface owns spec text now; the
directive itself is just a folder. The orchestrator daemon reads the
active contract's body when it spawns, replans, or runs completion.

Schema (migration 20260510000000):
  - DROP TABLE directive_goal_history
  - ALTER TABLE directives DROP COLUMN goal
  - ALTER TABLE directives DROP COLUMN goal_updated_at

New repo helper:
  - get_active_contract_body(directive_id) — picks the
    active|queued|draft contract (in that order), most-recent first.

Backend cuts:
  - Directive / DirectiveSummary / CreateDirectiveRequest /
    UpdateDirectiveRequest lose goal &amp; goalUpdatedAt.
  - CreateDirectiveRequest gains optional `contractBody` — when
    provided, create_directive_for_owner auto-creates a first contract
    with that body in the same transaction.
  - Removed: update_directive_goal, update_directive_goal_keep_orchestrator,
    save_directive_goal_history, get_directive_goal_history,
    DirectiveGoalHistory model, UpdateGoalRequest.
  - Removed handlers::directives::update_goal + the
    /directives/{id}/goal route.
  - orchestration::directive::build_planning_prompt /
    build_completion_prompt / build_order_pickup_prompt now take a
    `contract_body: &amp;str` instead of `goal_history`. classify_goal_change
    + try_interrupt_planner_with_goal_edit + GoalChangeKind +
    GoalEditInterruptResult removed (they were only useful for the
    small-vs-large goal-edit interrupt cycle).

CLI:
  - `makima directive update-goal` removed (UpdateGoalArgs deleted,
    Commands enum trimmed, ApiClient::directive_update_goal +
    UpdateGoalRequest deleted).

Frontend:
  - Directive / DirectiveSummary / CreateDirectiveRequest types lose
    goal &amp; goalUpdatedAt; CreateDirectiveRequest gains `contractBody`.
  - useDirective drops updateGoal helper.
  - api.ts updateDirectiveGoal removed.
  - Legacy DirectiveList + DirectiveDetail components deleted; the
    /directives route now always renders the document-mode page.
    The user-settings documentModeEnabled flag is no longer
    consulted at the route level.
  - NewContractModal passes body via contractBody.

Co-Authored-By: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>chore(cleanup): Phase 5 contracts removal + tmp directive + 30-day expiry + scroll fix (#118)</title>
<updated>2026-05-01T22:56:51+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-01T22:56:51+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=e11759447b1ac00becfb1e979e488f7f9c9cf478'/>
<id>urn:sha1:e11759447b1ac00becfb1e979e488f7f9c9cf478</id>
<content type='text'>
Sweeping cleanup across the surface and the wire. Net: -14k LOC of legacy
contracts code, plus the tmp/scroll/UX fixes the user asked for.

## Sidebar/editor independent scroll
Replace `height: calc(100vh - 80px)` (which assumed an 80px masthead and
quietly clipped or pushed the whole page below the fold when the masthead
was taller) with `h-screen + overflow-hidden` on the page root and proper
`flex-1 min-h-0` sizing on `&lt;main&gt;`. Sidebar and editor pane now manage
their own scroll independently; the page itself never scrolls.

Same fix in /tmp/:taskId.

## tmp directive — real backing for orphans/ephemerals

New migration `20260501100000_tmp_directive_and_clear_orphans.sql`:
  * Adds `directives.is_tmp` BOOLEAN NOT NULL DEFAULT false.
  * Partial unique index `(owner_id) WHERE is_tmp` — at most ONE tmp
    directive per owner.
  * Hard-deletes every existing orphan task (`directive_id IS NULL`).
    Per the user spec: "ALSO there are TOO MANY old tasks in tmp, we
    need to remove all of them as well."

New repository helpers:
  * `get_or_create_tmp_directive(pool, owner_id) -&gt; Directive`
    INSERT ON CONFLICT DO NOTHING + fallback SELECT, race-safe.
  * `list_all_tmp_directives` — drives the expiry sweep.
  * `delete_expired_tmp_tasks(tmp_directive_id) -&gt; u64`.
  * `list_tmp_tasks_for_owner` (replaces `list_orphan_tasks_for_owner`).

`mesh::create_task`: every top-level task must have a directive. If a
caller doesn't supply `directive_id` and isn't a subtask, attach to the
caller's tmp directive (auto-creating it on first use).

`list_directives_for_owner` filters out `is_tmp=true` so the scratchpad
directive doesn't pollute the contract list — surfaced via the sidebar's
`tmp/` folder instead.

## 30-day expiry on tmp tasks

New `phase_tmp_expiry` in the directive reconciler. Throttled to once per
hour: enumerates every tmp directive, calls `delete_expired_tmp_tasks`,
logs the count. The actual delete is `WHERE created_at &lt; NOW() - INTERVAL
'30 days'` and is fast on the existing index. Subtasks die via FK cascade.

## Phase 5 — contracts removed

### Frontend
Deleted entire `/contracts` surface:
  * routes: `contracts.tsx`, `contract-file.tsx`
  * components/contracts: ContractList, ContractDetail, ContractCliInput,
    ContractContextMenu, CommandModePanel, PhaseBadge, PhaseHint,
    PhaseDeliverablesPanel, PhaseProgressBar, QuickActionButtons,
    RepositoryPanel, TaskDerivationPreview
  * (Kept `PhaseConfirmationModal` — used outside the contracts surface
    by `TaskOutput` and `PhaseConfirmationNotification`.)
  * Routes deregistered from `main.tsx`; nav entry removed from
    `NavStrip`.

### Backend handlers
Deleted: `contracts.rs` (2.4k LOC), `contract_chat.rs` (3.2k LOC),
`contract_daemon.rs` (~940 LOC), `contract_discuss.rs` (~590 LOC),
`transcript_analysis.rs` (~690 LOC). All `/api/v1/contracts/*` routes
deregistered. OpenAPI entries dropped. Module declarations removed from
`server/handlers/mod.rs`.

### CLI
Removed `makima contract` and `makima supervisor` subcommands. Deleted
`daemon/cli/contract.rs` and `daemon/cli/supervisor.rs`. Bin dispatch
trimmed (~377 LOC).

### Orchestrator
Removed the contract-spawn path from `phase_execution`
(`spawn_step_contract` and its caller). `directive_steps.contract_type`
now logs a warning and falls through to standalone-task spawn. Column
itself stays — old data still reads, just no longer triggers a
contract+supervisor spawn.

### TUI
`Action::PerformCreateContract` is now a no-op that surfaces a status
message: "Contracts have been removed. Use directives instead." The TUI
form is dead code pending a wider refresh.

## Out of scope (deliberately left)

* Contracts DB tables (`contracts`, `contract_repositories`,
  `contract_chat_history`, `contract_events`, `contract_templates`) are
  retained for historical data + because some peripheral code still
  joins to them in TaskSummary queries.
* `mesh_supervisor` handlers are retained — they aren't only used by
  contracts (some mesh-level supervisor behaviour persists), and the
  cross-cutting cleanup is bigger than this PR.
* `directive_steps.contract_type` column itself isn't dropped; just no
  longer functional.

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>revert PRs #93-#98; enforce strict-linear-DAG + mandatory directive verify (#100)</title>
<updated>2026-04-28T20:26:11+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-04-28T20:26:11+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=5bde7c2d7e099fd9c8b2615602ab1d096bd9b6be'/>
<id>urn:sha1:5bde7c2d7e099fd9c8b2615602ab1d096bd9b6be</id>
<content type='text'>
* revert: roll back PRs #93-#98 to pre-Lexical baseline

Reverts the entire chain of directive document UI work and the homepage redesign,
restoring the working tree to the state at 3679ceb (before c8b169d / PR #93).

PRs reverted:
- #93 c8b169d feat: Document UI for directive orchestration with Lexical editor
- #94 d6f01a6 fix: compilation error and warnings already merged via PR #93
- #95 5aa3faf fix: resolve compilation error and warnings in Rust backend
- #97 d513f93 feat: document UI with contract blocks, expandable logs, and interaction controls
- #96 6366941 feat: Redesign homepage with professional PC-98 styling
- #98 d1fdfb1 feat: revert broken directive PRs, re-implement Lexical document orchestrator

The directive Document UI experiments produced fragile output and merge artifacts;
follow-up commits in this PR change orchestration to favor strictly linear DAGs and
add goal/conflict verification so future runs do not require this kind of cleanup.

Co-Authored-By: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;

* feat(directive): strict-linear-DAG planning + mandatory `directive verify`

Tightens directive orchestration so the final PR almost never needs a hand-merge:

1. Planning prompts now strongly bias toward strictly linear DAGs.
   Parallel steps are reserved for genuinely independent work (e.g. disjoint
   modules); the default for "in doubt" is sequential. Linear chains inherit
   each previous step's worktree, so the final merge is typically just a
   rebase against the base branch.

2. New CLI command `makima directive verify` does a local in-memory
   `git merge-tree` of HEAD against `&lt;remote&gt;/&lt;base&gt;` and exits non-zero
   with a list of conflicting files if the PR would not merge cleanly.
   Pure-local — no API call, no working-tree mutation.

3. Completion / PR-creation prompts now mandate three pre-push checks:
   a. build (`cargo check` and/or `tsc --noEmit`),
   b. `makima directive verify --base &lt;base_branch&gt;` must exit 0, and
   c. an explicit goal-alignment self-check against the diff.
   The orchestrator is told NOT to push, create the PR, or call
   `makima directive update` until all three pass. Skipping any of them
   is documented as a directive failure.

The combination means that with a linear DAG the final PR-creation task
should almost never see a real conflict — when it does, that is treated as
a planning bug to escalate rather than something to paper over with
`-X theirs`.

Co-Authored-By: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;

* fix(frontend): TS errors pre-existing on master

- TaskSlideOutPanel: declare missing `selectedFileDiff` / `selectedFilePath`
  state hooks that were referenced everywhere but never created, and
  re-balance the JSX so the `&lt;&gt;...&lt;/&gt;` fragment in the non-diff branch is
  closed (the previous indentation/braces would not parse).
- api.ts: add a `getWorktreeDiff` thin wrapper around `getTaskDiff` so
  TaskDetail's per-file click handler type-checks (the per-file slice is a
  future improvement; today both return the full task diff).
- WorktreeFilesPanel: remove unused `isClickable` local; the gating already
  reads `onFileClick` directly inline.

Run after revert: `npx tsc --noEmit` exits 0.

Co-Authored-By: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;

---------

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>feat: non-blocking reconcile polling, directive CLI orders &amp; cleanup (#82)</title>
<updated>2026-02-24T23:37:44+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-24T23:37:44+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=5d1fbed2733e93cc2be2e1a89ca022d88bef613f'/>
<id>urn:sha1:5d1fbed2733e93cc2be2e1a89ca022d88bef613f</id>
<content type='text'>
* feat: soryu-co/soryu - makima: Remove aarch64-unknown-linux-gnu from release workflow

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* feat: soryu-co/soryu - makima: Implement non-blocking ask with client-side polling for reconcile mode</content>
</entry>
<entry>
<title>feat: add directive ask command, log backfill &amp; specialized DAG steps (#75)</title>
<updated>2026-02-21T19:33:44+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-21T19:33:44+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=d670dcb72984cfa483063d161bb468704038895c'/>
<id>urn:sha1:d670dcb72984cfa483063d161bb468704038895c</id>
<content type='text'>
* feat: soryu-co/soryu - makima: Add makima directive ask CLI command

* feat: soryu-co/soryu - makima: Update directive skill docs and planning prompt to support asking questions

* feat: soryu-co/soryu - makima: Add log stream backfill for directive tasks

* feat: soryu-co/soryu - makima: Update planning prompts to inform tasks they can ask questions

* WIP: heartbeat checkpoint

* feat: soryu-co/soryu - makima: Add ask command to directive SKILL.md documentation

* feat: soryu-co/soryu - makima: Add log stream backfill for directive task output history

* feat: soryu-co/soryu - makima: Update planning prompt to tell planning tasks they can ask questions

* WIP: heartbeat checkpoint

* feat: soryu-co/soryu - makima: Show Planning, PR, and Cleanup tasks as specialized steps in DAG</content>
</entry>
<entry>
<title>Fix worktree branching for directive tasks and remove memories</title>
<updated>2026-02-13T19:19:39+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-13T19:19:39+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=a6677bafe52d9988c9948df34c1635e4411c9591'/>
<id>urn:sha1:a6677bafe52d9988c9948df34c1635e4411c9591</id>
<content type='text'>
</content>
</entry>
<entry>
<title>makima: Add an optional memory system for directives (#59)</title>
<updated>2026-02-12T02:29:45+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-12T02:29:45+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=355f10964c4dbec24a244a00caba5c17ed23fc65'/>
<id>urn:sha1:355f10964c4dbec24a244a00caba5c17ed23fc65</id>
<content type='text'>
* feat: makima: Add an optional memory system for directives: Add directive_memories database table and migration

* feat: makima: Add an optional memory system for directives: Update directive skill documentation with memory commands

* feat: makima: Add an optional memory system for directives: Add repository functions for directive memory CRUD

* feat: makima: Add an optional memory system for directives: Add frontend API functions and types for directive memory

* feat: makima: Add an optional memory system for directives: Add Rust models for directive memory

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* feat: makima: Add an optional memory system for directives: Add memory panel to frontend DirectiveDetail component

* Merge remote-tracking branch 'origin/makima/makima--add-an-optional-memory-system-for-directiv-5de1e06d' into combined branch

* Merge remote-tracking branch 'origin/makima/makima--add-an-optional-memory-system-for-directiv-c8298c6c' into combined branch

* feat: makima: Add an optional memory system for directives: Create useMultiTaskSubscription hook for multi-output WebSocket streaming

* feat: makima: Add an optional memory system for directives: Create DirectiveLogStream component for stern-like multi-task output viewing

* feat: makima: Add an optional memory system for directives: Integrate log stream panel into directive detail page</content>
</entry>
<entry>
<title>Add auto-PR creation for remote repos in directives</title>
<updated>2026-02-10T14:50:07+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-10T14:50:07+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=15b6e5fba161a194fe5427d7d29b0c4286423260'/>
<id>urn:sha1:15b6e5fba161a194fe5427d7d29b0c4286423260</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add directive init</title>
<updated>2026-02-09T02:35:36+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-09T02:35:36+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=a2646a828febbdac798a206655a15eae7e463bca'/>
<id>urn:sha1:a2646a828febbdac798a206655a15eae7e463bca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add new directive mechanism v3</title>
<updated>2026-02-09T00:11:51+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-09T00:11:51+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=8c23b3ab6f7fabca01b0468911bae073aa5ced32'/>
<id>urn:sha1:8c23b3ab6f7fabca01b0468911bae073aa5ced32</id>
<content type='text'>
</content>
</entry>
</feed>
