107 lines
5.5 KiB
Markdown
107 lines
5.5 KiB
Markdown
# Codex and Claude workstreams
|
|
|
|
## Operating rule
|
|
|
|
Codex and Claude may work concurrently only in separate Git worktrees and branches. A task must name one writer, one reviewer, and exclusive writable paths before implementation starts. Shared build files, navigation, manifests, domain contracts, and integration are Codex-owned unless a later task explicitly transfers them.
|
|
|
|
## Branches and worktrees
|
|
|
|
- Codex branch prefix: `codex/`
|
|
- Claude branch prefix: `claude/`
|
|
- Codex working tree: the primary repository worktree
|
|
- Claude working tree: a separate worktree created from a reviewed contract commit
|
|
|
|
Neither agent may edit files owned by the other active workstream. 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:
|
|
|
|
```text
|
|
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:
|
|
|
|
```text
|
|
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.
|
|
|
|
## Contract freeze and change requests
|
|
|
|
A Claude task starts from an exact reviewed Codex commit recorded in that task's evidence as its contract-freeze commit. A shared-contract request must state:
|
|
|
|
```text
|
|
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 are prohibited during the freeze unless both owners approve them. After an approved change, Codex records the new freeze commit, Claude rebases its worktree, reruns contract and feature tests, and records acceptance before implementation continues.
|
|
|
|
## Delivery waves
|
|
|
|
1. Claude may immediately build TASK-006A from freeze commit `0929282` while Codex builds TASK-002A and TASK-002B.
|
|
2. Codex completes TASK-004 API foundations and TASK-005 repository/ref selection; TASK-006A is reviewed and integrated independently.
|
|
3. After TASK-005's reviewed contract commit, Claude builds the remaining TASK-006 UI in a separate worktree while Codex builds TASK-009 history/diff contracts.
|
|
4. After both are reviewed, Claude builds TASK-007 while Codex builds TASK-010 work-item contracts and integrates TASK-006.
|
|
5. After TASK-010's reviewed contract commit, Claude builds TASK-008 while Codex verifies merged history/navigation behavior.
|
|
6. Codex performs final integration and all repository-wide gates.
|
|
|
|
## 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.
|
|
|
|
## Integration ownership transfer
|
|
|
|
When a Claude task passes its checks and Codex review, its handoff names the exact commit and explicitly transfers the task's feature paths to the Codex integration task. Codex may then wire navigation and dependencies and make only integration-scoped fixes listed in that task. Feature-behavior defects are returned to Claude's branch unless a new integration task explicitly grants Codex the affected feature paths. Merged-only failures must be recorded with reproduction evidence before either owner edits them.
|