Skip to content

docs: simplify workflow contract documentation - #102

Merged
Honguan merged 1 commit into
mainfrom
agent/issue-99-docs-contract-simplification
Aug 3, 2026
Merged

docs: simplify workflow contract documentation#102
Honguan merged 1 commit into
mainfrom
agent/issue-99-docs-contract-simplification

Conversation

@Honguan

@Honguan Honguan commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • simplify and correct the Chinese and English recovery contract documentation
  • align the four-stage workflow description with the latest diagrams and implementation
  • simplify PLAN.md ownership and cleanup lifecycle wording
  • add a bilingual README consistency test

Images are intentionally unchanged because the current diagrams are the latest version.

Validation

  • npm test — 94/94 passed
  • npm run check — passed
  • git diff --check — passed

Related: #99

@Honguan
Honguan marked this pull request as ready for review August 3, 2026 09:04
@Honguan
Honguan merged commit 56189c7 into main Aug 3, 2026
13 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 724cc1b645

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.en.md
All role TOML files have workspace-write capability, but stage and flags gate writes: Sol is read-only before `SOL_FULL_TAKEOVER`, and a disabled primary remains coord-only permanently. There are at most two children, no child matching the primary model, and spawning occurs only when required by the stage. The primary thread performs atomic flush/close/rename; failure retains prior state, publishes no partial state, and performs no dependent action. This is a declarative host contract, not a runtime API, CLI, or live E2E implementation.
## Workflow escalation state machine

Each task stores its state at `WORKFLOW_STATE_PATH=<ARTIFACT_DIR>/workflow-state.v1.json`, separate from the recovery registry. It records versions, stage, verdict, primary, counters, execution flags, role ownership, and `blocked_reason`. A same-task primary switch preserves these values; a new workflow resets them.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude the new primary from preserved switch values

On a same-task primary switch, primary_model must change to the newly selected model; only the remaining workflow state is preserved. The PRIMARY_SWITCH transition and its tests explicitly update this field while preserving the others, so saying that the switch preserves all listed values—including primary—can cause a host implementing this documented contract to retain a stale primary and route coordination or the final reply incorrectly. Clarify that the primary is updated while versions, stage, verdict, counters, flags, and ownership are preserved.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant