Repository navigation
Description
Overview
Make ordinary ChatGPT Chat a first-class orchestration surface for the existing PyAutoScientist development workflow without making ChatGPT a new organ or creating a second task-state system.
The route keeps PyAutoMind as intent/lifecycle state and PyAutoBrain as the reasoning/routing authority. Brain decides phase-by-phase whether the capabilities exposed by the current conversation are sufficient. Repository/GitHub work stays in Chat when possible; only the smallest coherent phase that genuinely needs a local/runtime/remote execution capability is handed to Codex/Work/local/HPC, and its evidence returns to the same Mind task.
This follows the completed 2026-09-19 Claude/Codex harness-agnostic programme rather than replacing it.
Architecture decision
Do not add a ChatGPT organ, a parallel lifecycle, or a persistent Lane: chatgpt.
Separate two transient questions:
- Orchestration capabilities available now — repository read/write, GitHub operations, local filesystem, shell/runtime, test execution, worktrees, independent reviewer, remote compute.
- Evidence required by the current phase — source inspection, implementation, exact-head tests/smoke, independent review, Heart verdict, scientific/runtime measurement, etc.
Provider/product names do not imply capabilities. Probe the actual surface once and fail closed.
Existing GitHub Actions may provide required execution evidence when the repository already exposes the relevant check on the exact branch head. Do not create throwaway workflows merely to obtain a shell. CI evidence never substitutes for the authoritative Heart verdict.
Plan
- Make Brain's shared workflow explicitly capability/evidence based while preserving existing organ, autonomy, review, Heart and human-merge boundaries.
- Support a genuine GitHub-API-only development surface with no clone/worktree: branch, edit, commit, issue/PR/review/CI operations through the current GitHub capability.
- Keep
Lane:as an intrinsic scheduling requirement (any/local-dev), not the name of the orchestrating product. - Generalize GitHub instructions to operation-first semantics; keep
ghand tool/MCP mappings as adapters. - Extend bounded delegation to cross-environment execution and independent-review phases. Chat remains the top-level orchestrator; handoffs receive the existing Mind task, exact branch/commit, bounded scope and required evidence.
- Allow exact-head existing CI to supply applicable test evidence where the current workflow permits it; never conflate CI with Heart.
- Add a safe
chatgpt/**Mind ledger branch namespace so Chat-originated lifecycle writes can use the same default-deny auto-merge gate as Claude/Codex ledger-only changes. - Keep the PyAutoScientist front-door adapter thin and pointed at Brain's canonical policy.
- Add doctrine/contract tests and use existing GitHub CI for runtime validation.
Detailed implementation plan
Affected repositories
- PyAutoBrain — primary: canonical workflow/routing/delegation instructions and contract tests.
- PyAutoMind — Chat ledger branch namespace + workflow/test/docs updates.
- PyAutoScientist — thin ChatGPT entry adapter already staged in draft PR feat: intake formalise mode — retroactively header the backlog #33.
Branches
- PyAutoBrain:
feature/chatgpt-orchestrator-routing - PyAutoMind:
feature/chatgpt-orchestrator-routing - PyAutoScientist: existing
feature/chatgpt-orchestrator-route/ PR feat: intake formalise mode — retroactively header the backlog #33
Brain touch points
-
skills/WORKFLOW.md- define orchestration vs execution;
- capability vocabulary;
- evidence-first phase routing;
- current-surface capability probe;
- no new Mind state or Chat lane;
- existing CI vs Heart boundary.
-
skills/start_dev/start_dev.md+reference.md- GitHub-API-only start/resume;
- read
active.mdrepo claims even without the worktree helper; - branch state through GitHub operations;
- no local-worktree fiction.
-
skills/start_library/start_library.mdandstart_workspace/start_workspace.md- create/use remote feature branch through GitHub operations when no clone;
- register real harness/session metadata and repo claims, no fake
worktree:; - later execution environments resume the same branch/commit.
-
skills/GITHUB_ACCESS.md- operation-first contract;
- current
gh/MCP details remain adapter evidence; - ordinary Chat GitHub capabilities may be read-only or read/write depending on the connected surface, so probe actions/permissions rather than product names.
-
skills/MODEL_DELEGATION.md- cross-environment bounded handoff;
- exact starting branch/commit;
- independent review is a capability; the author conversation cannot self-certify independence.
-
skills/ship_library/ship_library.md+ship_workspace/ship_workspace.md- exact-head existing CI may supply applicable test/smoke evidence;
- if no execution evidence is available, delegate only that validation phase;
- CI never replaces Heart;
- no weakening of RED/YELLOW/autonomy/merge rules.
-
Tests
- pin capability/evidence doctrine;
- pin API-only no-worktree semantics;
- pin CI != Heart and independent-review requirements;
- reject a new Chat-specific lifecycle/lane.
Mind touch points
-
.github/workflows/mind_ledger_merge.yml- accept
chatgpt/**alongsideclaude/**andcodex/**; - unchanged default-deny
ledger_merge.pyclassification.
- accept
-
tests/test_ledger_merge.py- namespace and workflow-trigger coverage for ChatGPT;
- existing code-path denial unchanged.
-
REFERENCE.md/ active metadata wording only where needed- real harness/session identifiers, never a fabricated resume command.
Validation
- Brain full/focused CI and contract tests.
- Mind ledger/workflow tests.
- Independent review remains required by the canonical faculty contract.
- Fresh Heart evidence remains a separate gate.
- Human merge remains separate.
Product capability findings
As of 2026-09-20, OpenAI documents the ordinary GitHub connection as generally read-oriented and directs direct repository edits toward Codex, while ChatGPT plugins/connectors can expose write actions depending on the connected app and permissions. The GitHub capability actually exposed in this Chat conversation has authenticated branch/file/commit/issue/PR/review/CI write/read actions. Therefore Brain must route on the actual available actions, not on the product name.
OpenAI also documents Work/Codex as agentic execution surfaces distinct from ordinary conversational Chat usage. This design does not automate the ChatGPT web client, steal session credentials, or pretend an interactive Chat session is an API.
Representative task check
Recent Mind records support three resulting shapes without hard-coding them as architecture:
- Chat/GitHub-heavy: PyAutoScientist README/docs; the 2026-09-20 network-independent small-dataset repair already demonstrates a Chat-initiated GitHub+CI flow.
- Hybrid: ordinary bugs/refactors where Chat can inspect/implement/review GitHub state and delegates only targeted tests/generation/runtime evidence.
- Execution-first: Euclid JAX/Numba/HPC work where the scientific/runtime measurement is itself the task evidence.
Original request
The human asked to investigate and implement a route in which ordinary ChatGPT Chat is always the top-level PyAutoScientist orchestrator, with PyAutoMind and PyAutoBrain retaining intent/reasoning/routing/lifecycle/safety, while Codex/Work is used only for phases that genuinely require its execution environment. The request explicitly forbids unsupported web-client automation or treating Chat as an API, asks for capability-based harness independence, bounded delegation, preservation of all current safety/scientific gates, empirical checks against real task shapes, and a concrete end-user ChatGPT entry workflow.
Activity
Jammy2211 commentedon Sep 20, 2026
Additional hard invariant from the human (2026-09-20): the ChatGPT route must have no OpenAI API billing path at all.
Implementation consequence:
OPENAI_API_KEYfallback;OpenAI currently documents ChatGPT and API Platform billing as separate; this architecture does not rely on the user's account billing settings to enforce the separation. The code/instructions themselves must make API use impossible in this route.
Jammy2211 commentedon Sep 20, 2026
Bounded independent-review handoff
Implementation is complete and exact-head CI is green. The authoring Chat cannot satisfy the independent-review capability itself.
Review only these PRs:
chatgpt/**ledger-only transportStarting heads:
571048531ca14ce80f48314547463cc87712d6d169fb67e8624a44e6b745199dd927131d63bce926ba7294b46138ab64be2e64a4aee1c42c193ad81eReview questions
Lane:still intrinsicany | local-dev, with no Chat/Codex/Claude lane?OPENAI_API_KEYfallback, browser/session automation, or programmatic ChatGPT launch?Do not redesign unrelated workflow policy. Return CLEAN, FINDINGS, or BLOCKED, with only decision-relevant findings.
Existing execution evidence
Heart was STALE · 65 when implementation began; this is not a GREEN/release claim.
Jammy2211 commentedon Sep 20, 2026
Human merge authorization recorded
The human gave the current instruction “Go i approve” on 2026-09-20 after the implementation and validation summary.
Interpretation for this task:
Only remaining gate: review-faculty-equivalent independent review returning CLEAN (or findings resolved + re-review). The authoring Chat cannot self-certify it.
A fresh ordinary ChatGPT Chat with the GitHub connector can use the bounded review packet in the preceding comment and return the verdict without using Codex/Work or the OpenAI API. Once CLEAN is recorded, the human merge authorization above is already current for this task.
Jammy2211 commentedon Sep 20, 2026
Merged + review-rule correction
Human merge approval was given explicitly. The three implementation PRs have now merged:
0d9ceedf3b7f08d85ae0529c1bf5793dbf819a07029bcfa1a0cb07fda1b6dfb2a679554a935b09269c2d1ec60193a5299955f716a1c2d853df692073Important doctrine correction discovered during close-out:
AUTONOMY.mdexplicitly requires review-facultyCLEANas a leg of the autonomous-ship gate.ship_library/ship_workspacelikewise name review-facultyCLEANunder--auto.WORKFLOW.mdsaying independent review is part of the ship gate is broader/ambiguous and was over-interpreted here as a universal human-merge prerequisite.CLEANfaculty verdict is not an additional universal blocker unless another repo/branch rule explicitly requires it.The attempted GitHub Copilot reviewer requests produced no registered reviewer/review and were not counted as evidence.
This task therefore merged without inventing an independent-review requirement for the normal human-approved flow.