feat: add human-agent work continuity - #1223
Draft
Teingi wants to merge 3 commits into
Draft
Conversation
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue or RFC does this PR close?
Closes #1224.
This PR introduces RFC 1223: Human-Agent Work Continuity.
Rationale for this change
PowerContext already has Prepared Handoffs, immutable committed revisions, evidence checks, Continue semantics, and Handoff Report. The missing layer is a small user-facing work-continuity loop that distinguishes new delegation from transfer of work already in progress and records whether the receiver understood the handoff and what happened afterward.
This keeps human-to-human, human-to-Agent, and Agent-to-Agent transfer on one evidence-bearing Handoff core without introducing a parallel task database, workflow engine, or mandatory session-end hook.
What changes are included in this PR?
Work Contract -> Handoff -> Acknowledge -> Task Outcomeloop.create_work_contracthandoff_current_workacknowledge_handoffrecord_task_outcomeacceptedacknowledgements when Handoff evidence is unavailable.metadata.kind="task-outcome"so outcomes remain compatible with reviewed Experience incubation.Are there any user-facing changes?
Yes. Integrations can use four new
/v1/work/...endpoints, matching Python Client methods, and MCP tools to create a delegation baseline, prepare current work for transfer, acknowledge a resolved Handoff, and record a completion-aware result.The change is additive. Existing Handoff, Memory, PreparedContext, Experience Review, and Report behavior remains available. Work records are untrusted input or observation and do not grant tool, network, credential, or execution authority. Persisting a Handoff milestone still requires explicit
commit_handoff.How was this change tested?
make checkmake test— 439 passed, 7 environment-dependent tests skippedmake contract-test— 25 passedmake docs-testmake buildThe SQLite Server end-to-end test exercises Work Contract creation, temporary and committed Handoff acknowledgement, and Task Outcome recording. Live OceanBase validation was not performed.
AI usage statement
Codex with OpenAI GPT-5 was used to analyze the existing contracts, draft the bilingual RFC, implement the feature, add tests, and run validation. The resulting code and documentation were reviewed against the repository guidelines and generated API contract.