Enable copy-first document handoffs across local and cloud hosts
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
Routine document edits currently stall on ownership approval even when drafting can proceed independently. This change publishes the reviewed copy-first handoff rule and a portable helper so agents can draft exact documents outside the source checkout on local and cloud hosts, while keeping project safeguards and the existing integrator's role intact.
- Adds
scripts/document-drafts.pyto prepare, reconcile, and export hash-pinned draft proposals; it never writes originals, and claims, serial writes, and fresh source-hash checks stay with the existing integrator. - Adds
scripts/test-document-drafts.pyand the Document drafts workflow to run 17 synthetic safety and three-way merge tests on a hosted Linux runner. - Updates
AGENTS.mdanddocs/agents/shared-context-and-memory.mdto prefer task-owned draft copies and avoid re-asking approval when another agent claims a document; addsdocs/agents/document-drafts.mdas the maintained operational guide.
Rollout: cloud checkouts must select this branch or a main revision containing it; publication does not refresh existing chats or prove rule compliance. The helper passed all tests locally and its bytes match the reviewed shared helper, but hosted results are pending. No application, provider, database, deployment, or access behavior changes.