Skip to content

feat(engine): transaction family — topic cancel/reactivate, inbox lifecycle, scoped commit#386

Open
leeovery wants to merge 5 commits into
feat/engine-map-writesfrom
feat/engine-transactions
Open

feat(engine): transaction family — topic cancel/reactivate, inbox lifecycle, scoped commit#386
leeovery wants to merge 5 commits into
feat/engine-map-writesfrom
feat/engine-transactions

Conversation

@leeovery

Copy link
Copy Markdown
Owner

What

PR 4 of the engine stack (on #385). The multi-step state changes Claude hand-executed across 3–5 tool calls each — with prose-specified error tolerance — become single engine commands with decision-ready JSON responses.

  • engine topic cancel/reactivate — the five-step epic flows (stash status → set cancelled → drop map order → KB remove → scoped commit; and the reverse with re-indexing). KB steps are warn-don't-block, reported in the response's warnings; the .md renders the warning block only when present. The read-previous_status-and-pipe-it-back-by-hand plumbing is gone.
  • engine inbox archive/restore/delete — the working-set and archived-view transactions (mkdir/mv/git rm + scoped commit), strict all-or-nothing path validation, existing commit-message conventions preserved.
  • engine commit {wu} -m … (+ --inbox) — scoped stage+commit helper; clean tree returns ok/nothing-to-commit. Wired into discussion-session's commit sites.
  • kernel/git.cjs — scoped stage+commit as mechanism (no workflow vocabulary); domain rings compose it.
  • .md collapses: epic cancel 109→94 lines, reactivate 90→69, inbox archive 26→18; allowed-tools updated (nothing removed — Bash(mv .workflows/.inbox/) and Bash(git rm) in workflow-start are now call-site-free and can be dropped in a later cleanup).

Judgment calls to review

  • Session-loop step-5 commit message template written as discussion({wu}/{topic}): {what changed} (step 5 previously had no template; prefix derived from the existing F-block messages).
  • commitScoped stages the pathspec then commits the index — pre-staged unrelated changes ride along, identical to the previous hand-run git add -- … && git commit behaviour.
  • No lib.cjs exports for transitions/inbox — consumers are CLI-only skill prose (added when a real consumer lands).

Tests

98/98 (npm test, +16 transaction tests on hermetic temp-dir git fixtures — KB warn-don't-block proven against an unconfigured fixture); epic discovery suite 98/98 unchanged; migration 045 15/15; typecheck clean.

🤖 Generated with Claude Code

leeovery added a commit that referenced this pull request Jun 12, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
leeovery and others added 5 commits June 12, 2026 17:34
Multi-step state changes previously hand-orchestrated across several tool
calls become single engine commands that are atomic from the caller's
perspective and report what they did in one decision-ready JSON line.

- kernel/git.cjs: scoped stage+commit (clean index reports null, never fails)
- domain/transitions.cjs: epic topic cancel/reactivate — manifest write,
  KB sync as warn-don't-block warnings, scoped conventional commit
- domain/inbox.cjs: archive/restore/delete sets with strict path validation
  and the existing inbox commit-message forms
- engine commit {wu}|--inbox -m: the scoped commit helper

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Covers topic cancel/reactivate (manifest fields, discovery order drop,
commit messages, KB warn-don't-block with no KB configured), inbox
archive/restore/delete (single and multi, message forms, strict path
rejections, all-or-nothing validation), and engine commit (scoped stage,
clean-tree null, --inbox, argument validation).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sections E and F collapse their hand-orchestrated manifest writes, KB
sync, and commit into one engine command each; the KB warning block now
renders only when the response carries warnings. Frontmatter gains the
engine CLI allowance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ctions

The working-set archive and the archived-view restore/delete flows each
become one engine command — file moves and the set-scoped commit included.
Frontmatter gains the engine CLI allowance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The session-loop write commit and the pivot/reroute commit blocks call
the scoped commit helper; messages unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant