Commit Graph

364 Commits

Author SHA1 Message Date
Trevin Chow b595ccd170 Address PR review feedback (#476)
- Include untracked files in delegated batch commit staging
2026-04-09 00:25:38 -07:00
Trevin Chow 1213daf1af Address PR review feedback (#476)
- Resolve consent config writes from repo root via git rev-parse
2026-04-09 00:03:59 -07:00
Trevin Chow 83d9bdd2d5 fix(ce-work-beta): stage from git diff instead of trusting model's files_modified
The commit step now uses git diff --name-only HEAD to determine what
to stage, rather than the model-reported files_modified field. The
preflight guarantees a clean tree before delegation, so the diff only
contains Codex's actual changes.
2026-04-09 00:02:42 -07:00
Trevin Chow 54fd0f8972 fix(ce-work-beta): resolve config from repo root with worktree fallback
Config pre-resolution now uses git rev-parse --show-toplevel instead of
CWD-relative paths, with a fallback to the main repo root via
git-common-dir for worktrees where gitignored files don't exist.
Added "Reading Config Files from Skills" section to AGENTS.md
documenting both gotchas (CWD resolution, worktree gitignore).
2026-04-08 23:47:45 -07:00
Trevin Chow bf32ff6360 Address PR review feedback (#476)
- Set delegation_active false when auto mode routes trivial units locally
2026-04-08 23:35:45 -07:00
Trevin Chow 6971fab189 Address PR review feedback (#476)
- Warn about untracked file collisions at planned paths before delegation
2026-04-08 23:12:01 -07:00
Trevin Chow 99f32219cf Address PR review feedback (#476)
- Handle zero-exit missing-result case in polling termination
- Add explicit state transition for ask-mode delegation opt-out
2026-04-08 23:00:41 -07:00
Trevin Chow df61f93809 fix(ce-work-beta): use pre-resolution for Codex availability check
Move the availability probe from a runtime if/else to a ! backtick
pre-resolution that runs at skill load time. Breaks the pre-resolution
exception out into its own AGENTS.md checklist item with an example,
since it was buried at the end of a long bullet and easy to miss.
2026-04-08 22:51:34 -07:00
Trevin Chow 91f60c76bc Address PR review feedback (#476)
- Add missing work_delegate key to config keys list
- Replace chained availability check with if/else per AGENTS.md
- Fix polling timeout math (30 rounds × 60s = 30min, not 5min)
2026-04-08 22:45:01 -07:00
Trevin Chow 90c81b0321 refactor(ce-work): remove swarm mode support across plugin
Removes swarm mode from ce:work, deletes the orchestrating-swarms and
slfg skills, and updates README tables and contract tests. Swarm mode
added coordination overhead without delivering proportional value.
2026-04-08 20:40:48 -07:00
Trevin Chow 46e36e7d58 refactor(ce-work-beta): remove swarm mode support
Swarm mode is no longer a direction we want to pursue. Removes the
section from SKILL.md, deletes the swarm-mode reference file, and
drops the contract test. ce:work stable still has its copy — that
will be removed separately.
2026-04-08 20:32:14 -07:00
Trevin Chow 556e8ff4e0 chore(ce-work-beta): remove example config file
The example file is a stopgap that will be superseded by the config
storage redesign (/ce-setup creates the file interactively). Removing
to avoid maintaining a file that drifts from the skill's own docs.
2026-04-08 20:22:20 -07:00
Trevin Chow 6b63691938 fix(ce-work-beta): remove stale --output-schema model restriction
Tested gpt-5.3-codex with --output-schema and it works fine —
the limitation from Codex CLI bug #4181 is no longer accurate.
Reverts model setting to passthrough for any valid model name.
2026-04-08 20:09:42 -07:00
Trevin Chow b1718973f4 Address PR review feedback (#476)
- Update example config model comment to match --output-schema constraint
- Add polling failure termination for background process crash or timeout
2026-04-08 19:57:09 -07:00
Trevin Chow a042b23b27 fix(ce-work-beta): pre-resolve config file for reliable cross-platform reading
Use backtick pre-resolution to inline config.local.yaml at skill load
time in Claude Code (zero tool calls). Include explicit fallback for
other platforms to use their native file-read tool. Agents previously
had vague "open and parse" instructions that led to inconsistent reads.
2026-04-08 19:37:40 -07:00
Trevin Chow 18ad398e4d Address PR review feedback (#476)
- Bind sandbox_mode resolved state into $SANDBOX_MODE before launch snippet
- Add --output-schema compatibility warning to work_delegate_model description
- Add create-directory/create-file/merge instructions to decline branch
2026-04-08 19:05:40 -07:00
Trevin Chow 3018848ada fix(ce-work-beta): make Codex availability check unambiguous for agents
Use explicit CODEX_AVAILABLE/CODEX_NOT_FOUND sentinel output instead of
relying on command -v's path-or-empty result, which agents misread.
Include install hints (npm, brew) in the fallback message.
2026-04-08 14:14:24 -07:00
Trevin Chow 4932a2c499 refactor(ce-work-beta): move config to .compound-engineering/config.local.yaml
Migrates delegation settings from .claude/compound-engineering.local.md
(YAML frontmatter in markdown) to .compound-engineering/config.local.yaml
(plain YAML). The new path is platform-agnostic and aligns with the
planned config storage redesign.
2026-04-08 14:14:24 -07:00
Trevin Chow aac0868dba feat(ce-work-beta): surface Codex result handoff to user after delegation
Adds verification_summary to the result schema and output contract so
Codex reports what tests it ran. Adds a result handoff display step so
the orchestrator shows the user a summary, files changed, verification
outcome, and issues before committing or rolling back — addressing
feedback that delegation completion was opaque.
2026-04-08 14:14:24 -07:00
Trevin Chow 7798c3f10e fix(ce-work-beta): clarify launch vs poll as separate Bash tool calls
In testing, agents merged the background launch and polling loop into
one Bash call, hitting the 2-minute timeout. The skill now explicitly
labels Step A (launch, run_in_background: true on the tool parameter)
and Step B (poll, separate foreground calls) and warns that shell &
is not equivalent to the tool parameter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow f48cc11610 feat(ce-work-beta): background dispatch with foreground polling for codex exec
Launches codex exec with run_in_background (no timeout ceiling) then
polls every 10 seconds in a foreground bash loop to keep the agent's
turn active. User sees "Waiting for Codex..." during execution and
cannot interfere with the working tree.

Fixes the 10-minute Bash timeout ceiling that would kill long-running
batches where Codex is iterating on test fixes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 914879dfe3 feat(ce-work-beta): add model and effort settings for Codex delegation
Adds work_delegate_model (default: gpt-5.4) and work_delegate_effort
(default: high) to local.md settings. Both are passed explicitly to
codex exec via -m and -c 'model_reasoning_effort="..."' flags.

Model is passthrough (any valid codex model name). Effort is validated
against 5 values: minimal, low, medium, high, xhigh. Invalid values
fall through to defaults.

Also fixes --yolo to --dangerously-bypass-approvals-and-sandbox (the
documented flag name) and adds quoting guidance for the -c flag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 1d92821d02 Revert "refactor(ce-work-beta): rename delegate:codex to mode:codex"
This reverts commit 4c5da217588da4d19cf267b06a63fd2ed13b699f.
2026-04-08 14:14:24 -07:00
Trevin Chow 763bcf819b refactor(ce-work-beta): rename delegate:codex to mode:codex
Shorter, more natural. Users think in terms of "codex mode" not
"delegate to codex." The mode: prefix is generic enough for future
delegates. Deactivation becomes mode:local.

Fuzzy activation phrases unchanged (use codex, codex mode, etc.).

Updated across: SKILL.md, contract tests, requirements, and plan docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 68f41ce34e fix(ce-work-beta): validate local.md settings against recognized values
Unrecognized setting values (e.g., work_delegate: gemini) now fall
through to hard defaults instead of producing undefined behavior.
Each setting documents its recognized values inline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow cad749e202 refactor(ce-work-beta): normalize settings to work_delegate_* namespace
Renames for consistency across all delegation settings:
- work_codex_consent  -> work_delegate_consent
- work_codex_sandbox  -> work_delegate_sandbox
- work_delegation_decision -> work_delegate_decision

All four settings now share the work_delegate_* prefix:
  work_delegate, work_delegate_consent,
  work_delegate_sandbox, work_delegate_decision

Updated across: SKILL.md, delegation workflow reference, example
local.md, best practices doc, requirements, plan, and contract tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 181989b978 feat(ce-work-beta): add testing guidance and combined verify to Codex prompt
Adds a <testing> section to the delegation prompt template that carries
the Test Scenario Completeness guidance to Codex (cover happy path, edge
cases, error paths, integration). Closes the test quality gap observed in
evals (Codex produced 57-85% as many tests without this guidance).

Also updates <verify> to require running ALL test files in a single
command rather than per-file — catches cross-file contamination like
mocked globals leaking between test files in the same bun process.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 36d4f6371f feat(ce-work-beta): add example local.md for delegation settings
Provides a discoverable template with all available settings
(work_delegate, work_codex_consent, work_codex_sandbox,
work_delegation_decision) so users can copy to
.claude/compound-engineering.local.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 76dc118553 refactor(ce-work-beta): extract delegation and swarm to reference files
Moves ~270 lines of delegation workflow (pre-checks, prompt template,
execution loop, result classification) to references/codex-delegation-workflow.md
and ~25 lines of swarm mode to references/swarm-mode.md. SKILL.md body
drops from ~776 to ~514 lines — a 34% reduction in per-tool-call context
cost for non-delegation runs.

New in the delegation reference:
- Batched execution model (all units in one batch, split at ~5)
- Codex owns VERIFY (test-fix loop inside delegation)
- Platform gate (Claude Code only)
- Run-ID namespaced scratch files for concurrent safety
- work_delegation_decision setting (auto/ask) with user-facing prompts
- Between-batch checkpoints (flow through by default)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 06689fc0c7 fix(ce-work-beta): replace sandbox guard with correct conditional semantics
The old `test -n || test -n` returned exit code 1 on the happy path
(neither var set), which a literal agent could misread as a failed
pre-check and disable delegation in eligible environments.

Rewrote as an explicit if/else so pass/fail lives in the variable
value, not the exit code. Also refined the AGENTS.md shell-chaining
rule to distinguish action chaining (bad) from boolean conditions
in if/while guards (fine).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 6d9538045b fix(ce-work-beta): scope delegation rollback to avoid destroying untracked files
Preflight now uses `git diff --quiet HEAD` instead of `git status --short`
so untracked workspace dirs and .context/ scratch don't falsely block
delegation. Rollback uses path-scoped `git clean -fd -- <unit files>`
instead of bare `git clean -fd` which would nuke all untracked files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 08dc22b9f1 fix(ce-work-beta): keep codex delegation beta-only
Restore stable ce:work as the non-delegating execution path during the
Codex beta rollout and move the active delegation contract back to
ce:work-beta.

Also add a promotion checklist doc covering the workflow and contract
changes required when ce:work-beta is later promoted to stable.
2026-04-08 14:14:24 -07:00
Trevin Chow 5692fc4d35 fix(ce-work): resolve delegation contract mismatches from review
1. Remove stale "external delegation" per-unit posture from ce:plan
   Execution note examples — ce:work reads delegation from the global
   resolution chain, not unit metadata.

2. Fix delegation fallback to re-enter standard strategy selection.
   Pre-delegation checks now run inside the routing gate before strategy
   choice, so disabling delegation falls through to the normal
   inline/serial/parallel table instead of silently defaulting to inline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 5997c26fda feat(ce-work): add Codex delegation mode for plan execution
Adds optional `delegate:codex` mode to ce:work that delegates code
implementation to the Codex CLI (`codex exec`) using concrete bash
templates. Replaces ce-work-beta's prose-based delegation which caused
non-deterministic CLI invocations.

Key additions:
- Argument parsing with `delegate:codex`/`delegate:local` tokens and
  resolution chain (argument > local.md > default off)
- Pre-delegation gates: environment guard, availability check, one-time
  consent flow with sandbox mode selection (yolo/full-auto)
- XML-tagged prompt template following gpt-5-4-prompting best practices
- Multi-signal result classification (CLI fail/task fail/partial/verify
  fail/success) with rollback-to-HEAD safety
- Circuit breaker: 3 consecutive failures -> standard mode fallback
- Serial execution enforced, swarm mode mutual exclusion
- Frontend Design Guidance ported from ce-work-beta
- ce-work-beta delegation section marked superseded
- `Execution target: external-delegate` removed from ce:plan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:14:24 -07:00
Trevin Chow 042ee73239 feat(slack-researcher): add /ce-slack-research skill and improve agent (#538)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 11:00:00 -07:00
Trevin Chow 3208ec71f8 feat(session-historian): cross-platform session history agent and /ce-sessions skill (#534)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 07:52:26 -07:00
Trevin Chow a5ce094772 feat(ce-review): add compact returns to reduce orchestrator context during merge (#535)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 01:03:42 -07:00
Trevin Chow d37f0ed16f feat(ce-update): add plugin version check skill and ce_platforms filtering (#532)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 00:09:02 -07:00
Trevin Chow 0ae91dcc29 fix(ce-compound): explicit mode prompt and lightweight rename (#528)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 13:22:07 -07:00
github-actions[bot] 5fb6801567 chore: release main (#525)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-07 12:30:59 -07:00
Trevin Chow bafe9f0968 fix(ce-review): add recursion guard to reviewer subagent template (#527)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 12:29:48 -07:00
Trevin Chow 9a82222aba fix(document-review): widen autofix classification beyond trivial fixes (#524) 2026-04-06 22:05:27 -07:00
github-actions[bot] a6183ed000 chore: release main (#516)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-06 12:29:48 -07:00
Trevin Chow 36d8119166 fix(document-review): add recursion guard to reviewer subagent template (#523)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 12:26:22 -07:00
Trevin Chow 949bdef909 fix(review,work): omit mode parameter in subagent dispatch to respect user permissions (#522)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 12:12:31 -07:00
Trevin Chow 6f9069df7a fix(slack-researcher): make Slack research opt-in, surface workspace identity (#521)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 11:34:39 -07:00
Trevin Chow 320a045241 feat(ce-plan,ce-brainstorm): universal planning and brainstorming for non-software tasks (#519)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 23:53:13 -07:00
Trevin Chow b3960ec64b feat(slack-researcher): add Slack organizational context research agent (#495)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 18:39:25 -07:00
github-actions[bot] 6f3c841150 chore: release main (#508)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-05 14:33:40 -07:00
Trevin Chow f4e09044ba fix(ce-ideate,ce-review): reduce token cost and latency (#515)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 14:28:19 -07:00