Enable copy-first document handoffs across local and cloud hosts

Merged
BI
9d ago
+598-6

Routine document edits currently stall on ownership approval even when drafting can proceed independently. This change publishes the reviewed standing handoff rule and a portable copy-first helper, preserving project safeguards and the existing integrator's responsibility for claims, serial writes and current-file hash checks.

The helper retains baseline/draft/merge candidates and exports a hash-pinned proposal without writing originals. Repository guidance makes it available on local and cloud hosts, and a bounded Linux workflow exercises its synthetic safety and three-way merge tests. Existing project-specific context is preserved.

Validation:

  • The repository helper passed all 17 tests locally; its bytes match the reviewed shared helper (SHA-256 44c3105999475492fd8fea7f21a188a3748ece28aedbc7fc3f571522ead9d947).
  • Owned Markdown/YAML formatting and Git whitespace checks passed.
  • Hosted results are pending until observed. No application, provider, database, deployment or access behaviour changes.

Rollout: a cloud checkout must select this branch or a main revision containing it. Publication does not refresh existing chats or prove rule compliance. No merge, deployment or automatic merge is requested by this PR.


Summary by cubic

Enables copy-first document handoffs on local and cloud hosts so routine document edits no longer stall on ownership approval. Agents can draft exact authorised documents outside the source checkout, reconcile them against the current source, and export a hash-pinned proposal without ever writing originals; the integrator keeps responsibility for claims, serial writes, and fresh current-hash checks.

What changed

  • Publishes the standing handoff rule in AGENTS.md and shared-context docs so routine exact-file releases and isolated takeovers need no renewed approval; the reconcile example now passes an explicit source root.
  • Adds the portable scripts/document-drafts.py helper (prepare/status/reconcile/export) with immutable baselines, preserved candidates, fail-closed path checks, and a lock that is never reclaimed by age.
  • Documents native task coordination via list_threads, read_thread and send_message_to_thread with destination-authority rules, and allows a five-fact memory digest after long conversations.
  • Adds a Python test suite and a Linux workflow that runs the same 17 safety and merge tests after relevant PR changes. No application, provider, database, deployment, or access behaviour changes.

Validation and rollout

  • The helper passed all 17 tests locally and its bytes match the reviewed shared helper, SHA-256 44c3105999475492fd8fea7f21a188a3748ece28aedbc7fc3f571522ead9d947; owned formatting and Git whitespace checks passed.
  • Hosted results are pending; a cloud checkout must select this branch or a main revision containing it, and publication does not refresh existing chats or prove rule compliance.
  • No merge, deployment, or automatic merge is requested by this PR.

Summary by Gitar

  • Memory digest:
    • Allows up to five separate settled facts in a final-response digest after long conversations, each with its own topic key
  • Native task coordination:
    • Adds list_threads, read_thread and send_message_to_thread guidance with destination authority and acknowledgement rules
  • Access authority:
    • Clarifies that an explicitly requested access repair covers supported settings within that scope, subject to host approvals

This will update automatically on new commits.