Skip to content

refactor(skill): slim chief-engineer doctrine - #4

Merged
himraven merged 7 commits into
mainfrom
task/slim-chief-engineer-doctrine
Jul 28, 2026
Merged

refactor(skill): slim chief-engineer doctrine#4
himraven merged 7 commits into
mainfrom
task/slim-chief-engineer-doctrine

Conversation

@himraven

@himraven himraven commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • slim the always-loaded chief-engineer doctrine from 309 to 225 lines in the
    public package (the original local target was 341 lines)
  • move adapter, external-review, and token-report mechanics into the on-demand
    references/operations.md
  • preserve chief/worker boundaries, red-line gates, review lanes, lifecycle
    topology, and rollover criteria
  • sync the already-approved Codex runtime rule that scouts/reviewers require
    the adapter's real read-only sandbox; align README with that rule
  • stop publishing native scout/reviewer definitions; the installer explicitly
    allows only mechanic/worker/senior and fails closed on stale adapter-only
    definitions without deleting user files
  • add the approved narrow repair rule: logic/contract/config fixes require
    targeted re-verification; pure wording/comment/doc-text fixes with no
    executable semantics close through deterministic proof-surface checks and
    the GitHub bot on the new head
  • update the public README to describe progressive disclosure and the repair
    rule

Measured density

Always-loaded SKILL.md:

  • public package: 309 → 225 lines (-84, -27.2%)
  • original local target: 341 → 225 lines (-116, -34.0%)
  • final: 1,528 words / 10,764 bytes
  • on-demand operations reference: 84 lines / 446 words / 3,379 bytes

Public-package section delta:

Section Before After Delta
frontmatter/title 14 14 0
Manifesto 27 16 -11
§1 Establish reality 16 11 -5
§2 Lifecycle 42 25 -17
§3 Approval 16 12 -4
§4 Briefs 16 10 -6
§5 Routing 20 17 -3
§6 Execution path 36 33 -3
§7 Convergence 11 8 -3
§8 Review/observe 106 74 -32
Completion 5 5 0

The installable doctrine plus operations reference is 309 lines; the gain is
that only the 225-line doctrine is loaded by default.

Rule-removal audit

  • “Both failure directions” prose: folded into five manifesto imperatives; it
    restated the same architect/not-execution-pool boundary.
  • Generic “use a compact diagram” rule: removed because it had no chief-specific
    scar and presentation guidance already lives outside this skill.
  • Linear-task escape-path explanation: folded into “do not invent phases or
    persistent workstreams”; normal approval and verification remain global.
  • Objective-store examples and task-surface mechanics: folded into one
    existing/user-approved chief-state rule and the approved-topology rule.
  • Compaction/rollover condition repetitions: folded into the natural-boundary
    rule plus the explicit lost-facts/contradiction/rereading signals.
  • Approval-table field explanations: removed as self-evident mechanics; the
    explicit human gate and brief-bound approval record remain.
  • Standalone-brief field enumeration: moved to
    references/worker-brief.md; the doctrine retains the sufficiency and stop
    conditions.
  • Adapter guardrails, fallback/repeat flags, result-dir plumbing,
    fingerprinting, ignored-evidence details, and the plutil trap: moved to
    references/operations.md and adapter --help.
  • Claude/Grok command flags, safe-mode details, prompt plumbing, and tool
    allowlist mechanics: moved to references/operations.md; authorization,
    authorship independence, effort routing, and fallback order remain doctrine.
  • Token-report invocation and field semantics: moved to
    references/operations.md; the blocking pre-wave rule remains in §8.
  • Repeated impact-cone, invalidation, concurrency, and completion explanations:
    consolidated into one imperative home per rule.

No correctness gate was removed.

Considered cuts retained

  • real read-only sandbox plus the 2026-07-26 corruption scar: retained because
    a native scout inherited write access and modified seven LaunchAgent plists
  • human approval before write dispatch and all ship/deploy/publish actions:
    retained as the authority boundary
  • Sol-never-worker and zero-trust authorship independence: retained as the two
    role-integrity boundaries
  • red-line domains, focused Terra lane, targeted cross-model challenge, and
    final head-bound GitHub review: retained because each closes a distinct risk
  • coverage-first reporting and fix-the-class sweep: retained because the
    2026-07-27 audit found 67% of round-2+ findings were reachable but unreported
    in round one
  • lifecycle ranges and rollover signals: retained to prevent both endless
    context and task/session explosion

Verification

  • official skill validator
  • bash -n install.sh skill/chief-engineer/scripts/ce-dispatch.sh
  • shellcheck install.sh skill/chief-engineer/scripts/ce-dispatch.sh
  • ruff check skill/chief-engineer/scripts/ce-token-report.py tests
  • ruff format --check skill/chief-engineer/scripts/ce-token-report.py tests
  • python3 -m unittest -v (22 passed)
  • installer dry-run in an empty CODEX_HOME
  • current plutil -extract help plus before/after input hash probe
  • focused Terra-high read-only review on the exact candidate SHA
  • targeted independent Grok 4.5 challenge on the wording-only policy boundary

The installer sandbox challenge also tested stale/runtime reintroduction.
Package-controlled fresh and partial install paths are closed. This repository
cannot prevent a user or another tool from later adding arbitrary native agent
definitions to Codex runtime; adding a daemon/runtime control plane would
exceed package authority. The installer therefore detects stale exact
definitions, fails before writes, and requires explicit non-destructive
migration.

Anti-drift

This PR does not alter Claude-side role semantics or rollover policy. The
real-sandbox rule is a previously approved Codex-substrate catch-up, and the
wording-only repair exception is already present in the Claude twin, so no
additional Claude-side edit is required.

@himraven

Copy link
Copy Markdown
Owner Author

@codex review

@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: f83320c7f6

ℹ️ 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 skill/chief-engineer/SKILL.md Outdated
Comment on lines +197 to +198
- Use Claude only with repository/data authorization and only when it did not
author the affected code, design, or contract.

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 Scope the Claude authorship check to review lanes

When a Claude executor has already authored part of a change and needs a follow-up implementation, test, or debugging dispatch, this unconditional rule makes Claude ineligible for any further use on the affected code. That conflicts with the executor roles immediately above and broadens the prior review/challenge independence requirement; the README still scopes authorship independence specifically to Claude reviews (README.md lines 231-240). Restrict this condition to independent review/challenge lanes so authorized Claude workers can continue their assigned work.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 7f437c2: authorization still applies to every Claude lane, while authorship independence and Grok fallback are now explicitly scoped to review/challenge. A fresh targeted Terra-high read-only re-verification returned clean.

@himraven

Copy link
Copy Markdown
Owner Author

@codex review

@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: 7f437c212b

ℹ️ 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 on lines +111 to +112
Enforce read-only roles with a real sandbox. `scout` and `reviewer` always use
the adapter, never a Desktop native child that inherits the parent sandbox.

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 Stop installing native definitions for adapter-only roles

On a normal installation, install.sh still copies every agents/*.toml, including ce-scout.toml and ce-reviewer.toml, into the discoverable native-agent directory. An operator can therefore select these shipped agents directly even though this change says native scout/reviewer children may inherit the parent sandbox and must never be used, bypassing the adapter boundary introduced to prevent writes. Remove these definitions from installation or otherwise prevent native invocation of the adapter-only roles.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 6b54a09: native scout/reviewer definitions are deleted; install.sh now copies an explicit mechanic/worker/senior allowlist, fails closed on stale adapter-only definitions without deleting user files, and has fresh/stale installation regression tests. Full local suite: 22 passed. Focused Terra review returned clean. Residual user/manual reintroduction is outside this package’s authority and is documented rather than adding a daemon/runtime control plane.

@himraven

Copy link
Copy Markdown
Owner Author

@codex review

@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: 6b54a09866

ℹ️ 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.md Outdated
Comment on lines +174 to +176
The bundled defaults use the GPT-5.6 family available to the original setup.
Edit both the skill table and `agents/` TOML files if your Codex account exposes
different model IDs.
Edit the skill table and matching write-capable `agents/` TOML files if your
Codex account exposes different model IDs.

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 Update adapter pins when changing model IDs

When an account exposes different model IDs and uses the now-mandatory adapter path for scout or reviewer, the suggested edits have no effect on the dispatched model: ce-dispatch.sh still hardcodes the primary and fallback model IDs in its role routing. Because this change also removes the native configurations for those roles, following these instructions leaves the adapter requesting unavailable models; include the adapter's model pins (and the installed copy) in the customization steps.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 1e4e5f4. The customization guidance now requires updating the skill table, write-capable native TOMLs, and ce-dispatch.sh primary/fallback role pins, including equivalent installed copies because the installer is non-overwriting.

@himraven

Copy link
Copy Markdown
Owner Author

@codex review

@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: 1e4e5f4162

ℹ️ 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 on lines +25 to +26
- `plutil -extract KEYPATH FMT FILE` writes back to `FILE` when `-o` is omitted.
For inspection use `plutil -p` or pass `-o -`.

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 Correct the reversed plutil output semantics

For current plutil, this command is read-only when -o is omitted: plutil --help states that -extract “outputs the value” and that “by default, the output is to stdout unless -o is specified”; an extraction also leaves the input file hash unchanged. This warning therefore reverses the CLI semantics and directs users away from a safe machine-readable inspection command toward plutil -p, whose help explicitly says its format is not stable. Correct the warning so operators are not taught an inaccurate corruption mechanism.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 38864fa and mirrored to the installed runtime skill. Verified on the current host: plutil -help states -extract defaults to stdout unless -o is specified, and a before/after SHA-256 probe confirmed the input plist was unchanged. The operations reference now says exactly that and reserves -p for unstable human-readable output.

@himraven

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 38864fa5bf

ℹ️ 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".

@himraven
himraven merged commit 64e4af3 into main Jul 28, 2026
2 checks passed
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