6.2 KiB
Codex and Claude serial workstream
Operating rule
Codex and Claude work serially. Only the current task owner may modify the working tree. A task must name one writer, one reviewer, and writable paths before implementation starts. Ownership transfers only after the current owner commits or identifies an exact diff, records verification evidence, appends a handoff to docs/development-log.md, and stops writing.
Branches
- Codex branch prefix:
codex/ - Claude branch prefix:
claude/ - Only one active implementation branch and working tree is used at a time.
- A reviewer remains read-only while reviewing the active implementation.
The next owner may edit a path used by the previous owner only after accepting the recorded handoff. Generated build output is never handed off or committed.
Feature resources use mandatory name prefixes even when stored in separate XML files: repositories_, codebrowser_, history_, and workitems_. The final integration gate builds merged resources to detect collisions.
Codex ownership
Codex owns security-sensitive foundations and final integration:
- OAuth, PKCE, App Links, secure token storage, logout, and account state.
- Gitea base configuration, HTTP client, authentication injection, DTO mapping, pagination, and typed failures.
- Shared domain contracts and repository interfaces.
- Repository and branch list feature.
- Application navigation, dependency wiring, manifests, Gradle files, and shared design system.
- Final integration build, secret scan, and release evidence.
Default writable paths:
app/build.gradle.kts
app/src/main/AndroidManifest.xml
app/src/main/java/com/ubisam/ubgitea/core/
app/src/main/java/com/ubisam/ubgitea/data/
app/src/main/java/com/ubisam/ubgitea/domain/
app/src/main/java/com/ubisam/ubgitea/feature/auth/
app/src/main/java/com/ubisam/ubgitea/feature/repositories/
app/src/main/java/com/ubisam/ubgitea/ui/navigation/
app/src/main/java/com/ubisam/ubgitea/ui/theme/
app/src/test/java/com/ubisam/ubgitea/core/
app/src/test/java/com/ubisam/ubgitea/data/
app/src/test/java/com/ubisam/ubgitea/domain/
app/src/test/java/com/ubisam/ubgitea/feature/auth/
app/src/test/java/com/ubisam/ubgitea/feature/repositories/
Claude ownership
Claude owns independent read-only feature implementations after Codex freezes the required domain/API contract:
- Repository tree and source-code viewer UI.
- Content classification for text, binary, Git LFS pointers, symlinks, submodules, unsupported encodings, and oversized files.
- Commit history, changed-file list, bounded diff presentation, and branch comparison UI.
- Pull request and issue read-only UI after their contracts are supplied.
- Feature-specific accessibility and Compose tests.
Default writable paths:
app/src/main/java/com/ubisam/ubgitea/feature/codebrowser/
app/src/main/java/com/ubisam/ubgitea/feature/history/
app/src/main/java/com/ubisam/ubgitea/feature/workitems/
app/src/test/java/com/ubisam/ubgitea/feature/codebrowser/
app/src/test/java/com/ubisam/ubgitea/feature/history/
app/src/test/java/com/ubisam/ubgitea/feature/workitems/
app/src/main/res/values/strings_codebrowser.xml
app/src/main/res/values/strings_history.xml
app/src/main/res/values/strings_workitems.xml
Claude must not modify shared Gradle, manifest, navigation, domain, data, or generic strings.xml files. Needed shared changes are reported as a handoff request for Codex.
Shared development log
Both agents append task-completion and handoff entries to docs/development-log.md. They must not rewrite or delete earlier entries except to correct a factual error in a new follow-up entry. Every entry records:
Date and task:
Agent and role:
Commit/diff:
Features implemented:
How it was implemented:
Files changed:
Checks and results:
Review findings and resolutions:
Known limitations:
Next recommended task:
Next owner:
The log is not permission to work concurrently. An agent may append only while it owns the current task or its explicitly assigned review handoff.
Contract changes
A Claude task starts from an exact reviewed Codex commit recorded in the task evidence and development log. A shared-contract request must state:
Requesting task:
Required domain/API/navigation change:
Acceptance tests:
Requested owner:
Blocking: yes | no
Codex handles the request only under an existing acceptance-criteria task with matching writable paths or a new task. Breaking shared-contract changes require a recorded handoff. The new owner reruns contract and feature tests and records acceptance before implementation continues.
Delivery sequence
- TASK-001, TASK-002A, TASK-002B, TASK-003, and the TASK-011 login/repository-list slice are complete and recorded.
- Claude implements the independent pure-Kotlin TASK-006A classifier from the exact TASK-012 handoff baseline, then stops for Codex review.
- Codex completes the TASK-004 API remainder and TASK-005 branch/navigation remainder, one accepted task at a time, and records the reviewed contract-freeze commit.
- Claude implements TASK-006 against that frozen contract, then Codex reviews and integrates it.
- Codex TASK-009 precedes Claude TASK-007; Codex TASK-010 precedes Claude TASK-008. Work remains serial and each contract is frozen before its dependent UI task.
- Codex performs final integration and all repository-wide gates.
TASK-006A is intentionally scheduled before the TASK-004/005 remainder because it consumes only the already-frozen TASK-003 byte-content contract and does not edit shared API, navigation, Gradle, or manifest files. This exception does not authorize TASK-006 UI work early.
Cross-review
- Claude reviews Codex-owned tasks read-only.
- Codex reviews Claude-owned tasks read-only before integration.
- The implementing agent resolves findings in its own branch.
- Codex performs the final merged build, tests, lint, secret scan, and acceptance-criteria review.
Ownership transfer
When a task passes its checks and review, its handoff names the exact commit and next owner. The current owner stops writing before the next owner starts. Integration fixes require an acceptance-criteria task with exact writable paths. Failures discovered after handoff are recorded with reproduction evidence before ownership transfers back.