127 lines
5.8 KiB
Markdown
127 lines
5.8 KiB
Markdown
# 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:
|
|
|
|
```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.
|
|
|
|
## 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:
|
|
|
|
```text
|
|
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:
|
|
|
|
```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 require a recorded handoff. The new owner reruns contract and feature tests and records acceptance before implementation continues.
|
|
|
|
## Delivery sequence
|
|
|
|
1. Codex completes TASK-002A and records implementation, checks, limitations, and the next handoff.
|
|
2. The assigned reviewer inspects TASK-002A read-only; Codex resolves findings and records completion.
|
|
3. Codex completes TASK-002B, TASK-004, and TASK-005 one accepted task at a time using the same review cycle.
|
|
4. Claude may then receive TASK-006A and TASK-006 sequentially, recording each result before Codex integrates it.
|
|
5. TASK-009, TASK-007, TASK-010, and TASK-008 continue in dependency order, one writer at a time.
|
|
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.
|
|
|
|
## 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.
|