Skip to content

feat!: goal lifecycle v2 — blocked state, complete-replacement, oversized-objective correction - #1

Merged
code-yeongyu merged 6 commits into
mainfrom
feat/goal-lifecycle-blocked
Jul 26, 2026
Merged

feat!: goal lifecycle v2 — blocked state, complete-replacement, oversized-objective correction#1
code-yeongyu merged 6 commits into
mainfrom
feat/goal-lifecycle-blocked

Conversation

@code-yeongyu

@code-yeongyu code-yeongyu commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces completed goals through create_goal, archiving the prior state, and safely spills oversized objectives with marker-aware truncation.
  • Adds the blocked goal lifecycle: guarded model transitions, required reasons, continuation suppression, interruption blocking, and real-user-message resume.
  • Adds streamed mid-turn usage checkpoints plus inert persisted tokenBudget wire compatibility; releases pi-goal 0.3.0.

Approved plan and evidence

  • Plan: /Users/yeongyu/local-workspaces/senpi/.omo/plans/pi-todo-goal-upgrade.md (todos 1-7, Wave 1A).
  • TDD RED-to-GREEN evidence: .omo/evidence/pi-todo-goal-upgrade/task-1.txt through task-7.txt in the task worktree.

Verification

  • npx vitest run: 9 files passed, 85 tests passed.
  • npm run check: TypeScript, Biome, and no-excuse checks passed.
  • CI workflow present at .github/workflows/ci.yml; merge only after GitHub checks are green.

Summary by cubic

Goal lifecycle v2: adds a real blocked state, safe objective handling, and mid-turn usage accounting. Improves reliability by preventing unwanted continuations, archiving completed goals, and keeping wire compatibility in pi-goal 0.3.0.

  • New Features

    • Blocked lifecycle: guarded transitions, required non-empty reason, UI label, and tool support. No auto-continue while blocked.
    • create_goal can replace a completed goal and archives the previous goal to per-thread JSONL history.
    • Oversized objectives are truncated with a clear marker; the full text is saved next to the goal store.
    • User-aborted turns auto-block the goal with a reason, suppress continuation, and resume only on the next real user message.
    • Streamed mid-turn usage checkpoints for accurate token/time accounting; tokenBudget is persisted inertly for wire compatibility.
  • Migration

    • update_goal only accepts status: "complete" or status: "blocked". A non-empty reason is required for blocked and rejected for complete.
    • create_goal({ objective }) no longer accepts token_budget. Objectives are limited to 4,000 characters.
    • Statuses are now active, paused, blocked, and complete. Pause/resume remain user/system controlled.

Written for commit aed15fb. Summary will update on new commits.

Review in cubic

@code-yeongyu
code-yeongyu merged commit 40f445d into main Jul 26, 2026
6 checks passed
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