<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima/frontend/src/components/directives/DirectiveDetail.tsx, branch master</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=master</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-05-08T15:34:11+00:00</updated>
<entry>
<title>feat(directives): drop directives.goal — orchestration reads contract body (#132)</title>
<updated>2026-05-08T15:34:11+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-08T15:34:11+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=dce7f50e503dc374aaf879df33e725af16c4cc78'/>
<id>urn:sha1:dce7f50e503dc374aaf879df33e725af16c4cc78</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>feat(directives): amendment lifecycle — inactive status, new draft, before/after diff (#113)</title>
<updated>2026-04-30T16:09:45+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-04-30T16:09:45+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=c03e9a323e266c6a9a7ccb17bbbb7841296bbd5c'/>
<id>urn:sha1:c03e9a323e266c6a9a7ccb17bbbb7841296bbd5c</id>
<content type='text'>
Stage 4 of the doc-mode revamp. Closes the loop on living-spec contracts:
once a contract ships (PR raised) it becomes 'inactive', editing it kicks
off an amendment cycle, the planner sees the previously-merged content as
context, and "New draft" lets users abandon amendment and start the next
contract on a clean slate.

## inactive lifecycle

- New status `'inactive'`. Set automatically when `update_directive` detects
  a `pr_url` transition None → Some, alongside the revision snapshot
  (set_directive_inactive: idempotent, only flips active/idle/paused).
- `update_directive_goal` extends its CASE flip to include 'inactive', so
  editing a shipped contract's goal reactivates it for the planner.
- Frontend: `DirectiveStatus` gains 'inactive'; STATUS_DOT and the legacy
  STATUS_BADGEs (DirectiveDetail, DirectiveList) get color/label entries.
  Sidebar sort puts inactive after draft / before archived.

## Amendment diff to the orchestrator

`build_planning_prompt` takes a new `previous_merged_revision` parameter.
When set, it prepends an "AMENDMENT TO A PREVIOUSLY-MERGED CONTRACT" header
that shows the merged content and the amended content explicitly, with
guidance to plan a delta rather than a from-scratch rebuild. Both the
planning and replanning phases call `get_latest_merged_revision` and pass
it through.

## "New draft" affordance

- New `repository::reset_directive_for_new_draft`: clears goal to '',
  status → 'draft', detaches pr_url / pr_branch / orchestrator linkage.
  Past revisions stay in directive_revisions as history.
- New `POST /api/v1/directives/{id}/new-draft` handler.
- DirectiveContextMenu surfaces "New draft" only when status === 'inactive',
  via an optional onNewDraft callback (legacy tabular UI doesn't have to
  wire it up). After reset, the page navigates to the contract so the user
  starts typing the next iteration immediately.

## PR-state-aware updates

The user's spec — "open ⇒ update, merged ⇒ new PR, closed ⇒ new PR" — is
already implemented in `build_completion_prompt`'s `gh pr view` runtime
check, so no code change was needed here. The amendment cycle naturally
flows through it: inactive → goal save → status flips to active →
phase_replanning spawns a planner → completion task picks up the existing
pr_url, sees the GitHub state, and decides update vs new PR accordingly.

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>WIP: heartbeat checkpoint</title>
<updated>2026-03-07T02:28:19+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-03-05T23:25:40+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=ae3bc57de7a240c3c8ab15080b405e8ea3e16ccb'/>
<id>urn:sha1:ae3bc57de7a240c3c8ab15080b405e8ea3e16ccb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: task slide-out panel, 3-way reconcile toggle, daemon reauth fix (#85)</title>
<updated>2026-03-04T16:47:12+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-03-04T16:47:12+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=ec9738a069e61529be040eff065318972b8a11e2'/>
<id>urn:sha1:ec9738a069e61529be040eff065318972b8a11e2</id>
<content type='text'>
* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* feat: soryu-co/soryu - makima: Fix daemon reauth flow for new claude setup-token output format

* feat: soryu-co/soryu - makima: Update frontend reconcile toggle to three-way switch

* feat: soryu-co/soryu - makima: Add task slide-out panel to directive page</content>
</entry>
<entry>
<title>fix: resolve frontend TypeScript build errors</title>
<updated>2026-02-22T15:26:46+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-22T15:23:24+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=28f69e923cb7ee711b56fad07fb2d5b5220ce127'/>
<id>urn:sha1:28f69e923cb7ee711b56fad07fb2d5b5220ce127</id>
<content type='text'>
- DirectiveDAG: fix layer rendering (afterSteps -&gt; layer.steps with
  StepNode), remove unused imports (StepNode re-added, BEFORE_TYPES
  and OrchestratorStepNode removed)
- DirectiveDetail: remove dead virtualSteps code superseded by
  specializedSteps
- useMultiTaskSubscription: remove duplicate backfilledTasksRef
  declaration and dead backfillTask/convertTaskEventToEntry block
  referencing non-existent TaskEvent and listTaskEvents

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</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>feat: smart cleanup, order linking, and improved PR titles (#69)</title>
<updated>2026-02-17T16:48:39+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-17T16:48:39+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=aee6cda5fc8c44ebc45b274d07a1ed64052e3699'/>
<id>urn:sha1:aee6cda5fc8c44ebc45b274d07a1ed64052e3699</id>
<content type='text'>
* feat: soryu-co/soryu: Reorder navigation: move Orders before Contracts

* feat: soryu-co/soryu: Generate PR titles from step content instead of directive title

* feat: soryu-co/soryu: Add orderId field to step creation and link orders to steps

* feat: soryu-co/soryu: Handle completed orders during plan-orders flow

* WIP: heartbeat checkpoint

* Merge origin/makima/soryu-co-soryu--handle-completed-orders-during-pla-5aa9a15b (resolved conflicts)</content>
</entry>
<entry>
<title>soryu-co/soryu - makima (#66)</title>
<updated>2026-02-16T19:01:56+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-16T19:01:56+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=4bd40f047a6f4703945c6db2811d8feda27241d6'/>
<id>urn:sha1:4bd40f047a6f4703945c6db2811d8feda27241d6</id>
<content type='text'>
* feat: soryu-co/soryu - makima: Fix contracts page scrolling overflow

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint</content>
</entry>
<entry>
<title>Add PR button to directives</title>
<updated>2026-02-16T15:45:42+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-16T15:45:42+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=7d2079d7c13804766405af8044574bfc93a86897'/>
<id>urn:sha1:7d2079d7c13804766405af8044574bfc93a86897</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add pick-up-orders feature for directives (#64)</title>
<updated>2026-02-16T15:09:25+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-16T15:09:25+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=b6a29bb563499b2fd6280c742bd2106d66393112'/>
<id>urn:sha1:b6a29bb563499b2fd6280c742bd2106d66393112</id>
<content type='text'>
* WIP: heartbeat checkpoint

* WIP: heartbeat checkpoint

* feat: soryu-co/soryu - makima: Add frontend pick-up-orders button and API integration

* feat: soryu-co/soryu - makima: Add pick-up-orders backend endpoint and repository functions</content>
</entry>
</feed>
