the-mindscape-of-bro-tsong/docs/ROUND_AUTOMATION_PROTOCOL.md

256 lines
8.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Round Automation Protocol
version: 0.1
last_updated: 2026-06-19
status: Round 05 trial protocol
## 1. Purpose
This document defines the project-local Round Conductor protocol for reducing manual work around Local CCRA review loops.
It does not define the `ccra-local-reviewer` Agent, CCPE Agent Runtime, or reusable automation Skills.
The goal is to automate low-value file handling, validation, review submission, pass tracking, and Web bundle preparation while keeping Owner judgment at the required gates.
## 2. Scope
Round automation v0.1 covers local review orchestration:
```text
Owner / Web CCRA defines a public round goal
-> Codex creates a round charter and local review pass
-> Codex prepares context, helper outputs, invocation packet, and prompts
-> Codex invokes the real Local CCRA child review session
-> Local CCRA writes review and planning outputs
-> Codex extracts Chinese Owner-facing confirmation items
-> Owner decides which findings are accepted, rejected, deferred, or escalated
```
Round automation v0.2 extends the loop after Owner decision:
```text
Owner accepts findings for Codex repair
-> Codex applies only accepted fixes
-> Codex runs validation and before/after checks
-> Codex opens the next local pass when needed
-> loop stops by explicit stopping conditions
-> Codex prepares the formal Web CCRA bundle when Owner requests it
```
## 3. Roles
### Owner / Web CCRA
Owner and Web CCRA define the public round goal, non-goals, and product judgment questions.
Owner decides:
- whether a finding is accepted for Codex repair;
- whether a finding is rejected;
- whether a finding is deferred to a later round;
- whether a finding needs Web CCRA escalation;
- whether the local loop is complete enough for formal Web review;
- whether a Local CCRA report should be included in a Web upload package.
### Codex Main Session
The main Codex session is the Round Conductor.
It may:
- create round-charter and local-pass files;
- run deterministic helper Skills and project validation;
- invoke a real child Local CCRA session;
- summarize Local CCRA findings into Chinese confirmation items;
- implement Owner-accepted fixes;
- run post-fix validation and behavior comparisons;
- prepare a Web CCRA bundle after Owner direction.
It must not:
- treat Local CCRA output as Owner approval;
- repair findings before Owner decision;
- expand round scope without confirmation;
- upgrade model lifecycle status;
- replace Web CCRA review at key product gates.
### Local CCRA Child Session
The Local CCRA child session is the reviewer.
It is read-only with respect to product files and writes review outputs into the local review run directory.
## 4. Round Charter
Before starting a public round, Codex should create or update a round charter in `reports/` when the Owner / Web CCRA guidance is concrete enough to execute.
Recommended filename:
```text
reports/Round05_round_conductor_charter_YYYY-MM-DD.md
```
The charter should include:
- public round label;
- source of Owner / Web CCRA guidance;
- round goal;
- explicit non-goals;
- in-scope files or asset areas;
- required validation;
- expected Local CCRA pass path;
- stopping conditions;
- open product questions.
The charter is a process record. It is not a model asset and does not override canonical model JSON, model cards, selector rules, or regression cases.
## 5. Local Pass File Contract
Each Local CCRA pass follows the existing path rule:
```text
local_ccra_reviews/<public-round>/<local-pass>/
```
In addition to the existing Local CCRA files, each formal automated pass should contain:
```text
findings-confirmation.md
```
`findings-confirmation.md` is written by the Codex main session after reading:
- `04_LOCAL_CCRA_REVIEW_REPORT.md`
- `next-review-requirements.md`
- `returned-output.md`
It is not a replacement for the full review report.
## 6. Findings Confirmation Format
`findings-confirmation.md` must be written in Chinese and should extract only the core Owner decision items.
Each item should use this shape:
```text
### F-001: <中文短标题>
- 核心确认事项:
- Local CCRA 建议:
- Codex 建议处理:
- 建议决策accept_for_codex_fix | reject | defer_to_future_round | escalate_to_web_ccra | owner_clarification_required | accept_as_known_limit
- 若接受Codex 可改范围:
- 若不接受,影响:
- 证据路径:
- 需要 Owner 回答:
```
Rules:
- Do not copy the whole Local CCRA report.
- Do not hide uncertainty; if the report is unclear, mark `owner_clarification_required`.
- Preserve the distinction between Local CCRA recommendation and Codex implementation recommendation.
- Include enough evidence paths for the Owner to open the original report when needed.
- Use plain Chinese decision language, not long audit prose.
## 7. Owner Decision Gate
Codex may not start repair for a Local CCRA finding until `owner-decision.md` records the Owner decision.
Allowed decision states:
```text
accept_for_codex_fix
reject
defer_to_future_round
escalate_to_web_ccra
owner_clarification_required
accept_as_known_limit
```
Codex may only implement findings marked `accept_for_codex_fix`.
For all other states, Codex should preserve the item in the next handoff or Web bundle questions when relevant.
## 8. Repair Loop
After Owner decision, Codex may enter the v0.2 repair loop.
Allowed repair behavior:
- modify only files in the confirmed round scope;
- keep model JSON, cards, selector rules, regression cases, and reports synchronized;
- run index checks, model validation, selector checks, routing before/after comparisons, and whitespace checks as applicable;
- document every change in the round conductor status or handoff report;
- open the next local pass when validation or Local CCRA requirements call for it.
Forbidden repair behavior:
- adding a third model;
- adding an LLM selector, RAG system, database, frontend, backend, user system, or platform service;
- upgrading lifecycle or stability status based only on Local CCRA;
- modifying Local CCRA reviewer outputs;
- treating dry-run gates as executed validation;
- treating helper warnings as automatic blockers without triage.
## 9. Stopping Conditions
The local loop should stop when one of these is true:
- Local CCRA reports no current-scope blocker or major finding, and remaining findings are rejected, deferred, escalated, or accepted as known limits by Owner.
- The current pass identifies only Web CCRA or product judgment questions.
- Owner decides the round is ready for Web review.
- Owner decides to pause the round.
- The loop reaches three local passes for the same public round without clearing the same blocking class.
If the three-pass limit is reached, Codex should summarize the repeated blocker and ask Owner whether to continue, defer, or escalate.
## 10. Web Bundle Preparation
After the local loop stops and Owner requests Web review, Codex prepares the formal Web CCRA bundle under:
```text
ccra_review_bundle/round-NN_YYYY-MM-DD_topic/
```
The Web bundle should summarize:
- public round goal;
- changes made in the public round and local passes;
- validation and routing-diff evidence;
- unresolved Owner / Web CCRA questions;
- explicit non-goals and deferred items.
By default, do not include `04_LOCAL_CCRA_REVIEW_REPORT.md` in the Web bundle.
Include a Local CCRA report only when Owner explicitly asks Web CCRA to review local findings.
## 11. Supplier Boundary
This protocol is project-local.
Route future needs as follows:
- CCPE: reviewer contract, runtime invocation, session continuation, review rubric, lifecycle authority, stopping-condition governance.
- skills-vault: only deterministic, reusable automation extracted from repeated project use.
- this repository: product-specific round state, local pass records, Owner decisions, applied fixes, validation outputs, and Web bundle assembly.
Do not create a reusable Skill merely because this protocol exists. Extract only after repeated use proves a deterministic cross-project operation.
## 12. Round 05 Startup Checklist
At the start of Round 05, the new Codex session should:
1. Read `AGENTS.md`.
2. Read `reports/Codex新会话交接文档_LocalCCRA自动化讨论上下文_2026-06-19.md`.
3. Read this protocol.
4. Read `local_ccra_reviews/README.md`.
5. Read `knowledge_assets/10_本地CCRA评审机制说明.md`.
6. Create the Round 05 charter from Owner / Web CCRA guidance.
7. Confirm the first Local CCRA pass path.
8. Prepare helper policy fields for v0.1.2.
9. Run the Local CCRA pass through a real child session.
10. Produce `findings-confirmation.md` before asking Owner to decide findings.