Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
17d28a4
docs: add Codex agent guidance
xicv Jul 8, 2026
78c6ffe
docs: add daily Codex workflow
xicv Jul 8, 2026
e541e2b
docs: add Codex MCP config example
xicv Jul 8, 2026
951c366
ci: add typecheck test build workflow
xicv Jul 8, 2026
6e6fd27
chore: expose mcp bin and add ci scripts
xicv Jul 8, 2026
6264e91
docs: document Codex daily setup and verification
xicv Jul 8, 2026
5ae9dd3
feat: version and validate goal state shape
xicv Jul 8, 2026
8c9d124
feat: add persisted goal schema parser
xicv Jul 8, 2026
11a4491
feat: validate and stamp goal ledgers
xicv Jul 8, 2026
7f49780
feat: add workflow config and additive auto-merge globs
xicv Jul 8, 2026
8bae566
feat: support configurable base branch and collision-safe goal ids
xicv Jul 8, 2026
1379eed
feat: scaffold workflow base branch config
xicv Jul 8, 2026
329a400
feat: require acknowledgement for verify policy changes
xicv Jul 8, 2026
cefed43
feat: share package version discovery
xicv Jul 8, 2026
792e3e5
feat: add codex setup assistant
xicv Jul 8, 2026
42044bf
feat: add deterministic coco eval harness
xicv Jul 8, 2026
730cee6
feat: add command descriptor registry
xicv Jul 8, 2026
0663290
feat: wire setup eval registry and safer merge CLI
xicv Jul 8, 2026
56700f8
feat: expose base branch override through MCP goal start
xicv Jul 8, 2026
989400e
feat: sync MCP server version and base schema
xicv Jul 8, 2026
2f53f1e
chore: include deterministic eval in ci
xicv Jul 8, 2026
ac23186
ci: run unified pnpm ci gate
xicv Jul 8, 2026
5ac20d2
test: cover goal schema validation
xicv Jul 8, 2026
b81372a
test: cover goal base branch and id collision
xicv Jul 8, 2026
9484ed0
test: cover workflow and additive auto-merge config
xicv Jul 8, 2026
71c24bc
test: require ack for verify policy merge changes
xicv Jul 8, 2026
e4da200
fix: surface ack merge command on auto policy fallback
xicv Jul 8, 2026
291bfa1
test: avoid verify policy change in happy path
xicv Jul 8, 2026
f0665dd
docs: update loop skill for base branch and verify policy ack
xicv Jul 8, 2026
f3e7fac
docs: refresh daily workflow for setup eval and policy ack
xicv Jul 8, 2026
d2846d9
docs: add privacy model
xicv Jul 8, 2026
000948b
docs: document platform support
xicv Jul 8, 2026
91a7004
docs: describe completed safety and productization improvements
xicv Jul 8, 2026
d24e13b
docs: update agent guidance for new gates
xicv Jul 8, 2026
fa505ac
ci: use supported Node matrix versions
xicv Jul 8, 2026
d0882b8
feat: validate audit records and add feedback events
xicv Jul 8, 2026
f35af18
feat: add audit validity and feedback summary
xicv Jul 8, 2026
0d9f588
feat: expose audit validate and feedback CLI
xicv Jul 8, 2026
a12e939
feat: surface audit validity in doctor
xicv Jul 8, 2026
6156fad
feat: feed audit validity and feedback into improve digest
xicv Jul 8, 2026
faa5ded
feat: add status edges for rich loop cards
xicv Jul 8, 2026
f6ed176
feat: enrich loop progress card for edge states
xicv Jul 8, 2026
09aea82
test: cover richer loop progress cards
xicv Jul 8, 2026
9ef7175
test: cover audit validation and feedback signals
xicv Jul 8, 2026
66fc7a9
test: keep doctor fixtures valid under goal schema
xicv Jul 8, 2026
f6cadd7
docs: register audit learning commands
xicv Jul 8, 2026
04683db
feat: add audit validity eval fixture
xicv Jul 8, 2026
3df1350
docs: document audit-backed self-evolution loop
xicv Jul 8, 2026
01d4c7e
docs: require audit validity and eval-backed improvement
xicv Jul 8, 2026
e91c320
fix: preserve feedback tag recency on tie
xicv Jul 8, 2026
bf08b0d
design: add cuter comic coco icon
xicv Jul 8, 2026
458e3f4
docs: use comic SVG coco icon
xicv Jul 8, 2026
31adff7
feat: add coco-queue skill
xicv Jul 8, 2026
83a79ed
feat: add coco-night skill
xicv Jul 8, 2026
99b397e
docs: register queue and night skills
xicv Jul 8, 2026
9cfd122
fix: correct command descriptor surface type
xicv Jul 8, 2026
c85e7f4
docs: rewrite README with modern workflow examples
xicv Jul 8, 2026
cb8d9fa
docs: add queue and night workflows
xicv Jul 8, 2026
409a53b
docs: add queue and night workflow guidance
xicv Jul 8, 2026
1c3bb0e
fix(schema): accept empty failureLoop.key sentinel on reload
xicv Jul 8, 2026
73e5534
fix(eval): repair fingerprint-loop-escalates fixture, add reload guard
xicv Jul 8, 2026
d99a836
test(improve): audit-validity signal is intentionally not sample-gated
xicv Jul 8, 2026
1a0495b
fix(ci): run `pnpm run ci`, not the built-in `pnpm ci`
xicv Jul 8, 2026
3959c8f
ci: bump actions to @v5 and fix prepublishOnly verification
xicv Jul 8, 2026
780db4a
chore(release): v0.6.0 — Codex daily productization, night/queue, sel…
xicv Jul 8, 2026
e4009a3
test(e2e): give the strict-parser e2e test the same 30s timeout
xicv Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .codex/config.toml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copy the relevant blocks into ~/.codex/config.toml.
# Keep this file secret-free: never put tokens, cookies, or browser profile data here.

[mcp_servers.coco]
command = "coco-mcp"
args = []

# Oracle is required for the full coco-loop plan/review gate.
# Replace command/args with the Oracle MCP entrypoint you installed locally.
# Leave this block out until your Oracle setup is verified.
#
# [mcp_servers.oracle]
# command = "oracle"
# args = ["mcp"]
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
verify:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
# Node 20 remains the package minimum, but GitHub-hosted Actions runners now reject
# Node 20 setup without an insecure compatibility flag. Keep CI on supported current
# runtimes while package.json documents the install floor.
node: [22, 24]

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Enable Corepack
run: corepack enable

- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Verify
# `pnpm run ci`, NOT `pnpm ci`: pnpm >=11 ships a built-in `ci` command (clean-install)
# that shadows the package script, so `pnpm ci` would silently skip typecheck/test/eval/build.
run: pnpm run ci
87 changes: 87 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Agent instructions for coco

This repository builds `coco`, a small loop-engineering referee for AI coding agents. The core product boundary is intentionally strict: the agent may plan, implement, review, and verify through the referee, but merge authority stays explicit and goal-scoped.

## Project shape

- `src/commands/**` contains CLI/domain command entry points.
- `src/gate.ts`, `src/epoch.ts`, `src/state.ts`, `src/goalSchema.ts`, `src/git.ts`, `src/lock.ts`, `src/oracleVerdict.ts`, `src/commands/goal*.ts`, `src/commands/verify.ts`, and `src/commands/merge.ts` are referee-critical.
- `src/mcp/**` exposes the same referee through MCP tools.
- `src/store/**` is the PM/knowledge layer. It must not import or mutate goal/referee state.
- `src/improve/**` implements propose-only self-improvement guards and audit-derived signals.
- `src/commands/eval.ts` contains deterministic safety-regression fixtures. Add a fixture when fixing a state-machine or false-green class.
- `skills/**` contains the user-facing Codex/Claude skills, including queue/night orchestration. Skill text is part of the safety surface.
- `.coco/**` is local runtime state and must not be committed.
- `.coco-store/**` is the local PM store. Treat audit-derived/self-improvement content as local unless code explicitly marks it shared.

## Commands

Use pnpm.

```sh
pnpm install
pnpm typecheck
pnpm test
pnpm eval
pnpm build
pnpm run ci
```

`pnpm run ci` is the expected pre-PR verification command (typecheck + test + eval + build). Use
`pnpm run ci`, not `pnpm ci`: pnpm >=11 ships a built-in `ci` command (clean-install) that shadows
the package script, so `pnpm ci` silently reinstalls instead of verifying. If a change touches a
safety-critical gate, run the most specific affected tests as well as `pnpm run ci`.

Useful local product commands:

```sh
coco commands
coco next # next ready backlog task
coco setup codex # dry-run Codex MCP + skill setup
coco setup codex --apply # apply local setup
coco eval # deterministic safety fixtures
```

## Safety invariants

Do not weaken these without an explicit, human-authored referee-change goal and tests/evals that prove the new behavior:

1. A review verdict must come from strict Oracle output parsing; never add a caller-asserted clean verdict path.
2. Verify is coco-owned. The agent must not self-report `pass`.
3. Review and verify are bound to the current HEAD/tree and require a clean working tree.
4. A tree that was blocking/failing must not be silently re-blessed without new code and fresh review/verify.
5. Persisted goal state is untrusted input; load it through `goalSchema`, not raw casts.
6. Merge requires active goal, correct branch, clean tree, implement in the current epoch, clean review, passing verify, and base ancestry.
7. A goal that changes `verify.testCommand` requires explicit human acknowledgement with `--ack-verify-policy-change`; auto-merge must fall back to the human path.
8. Auto-merge is opt-in per goal and must never loosen the human merge path.
9. Improve-origin changes must not touch protected referee, metrics, store, or improve-self paths.
10. Store/pack must preserve the privacy boundary: local cards and secret-looking files must not be sent to Oracle.
11. `$coco-night` may run at most one task and must stop at merge-gate unless the user explicitly supplied `--auto` for that one run.

## Coding style

- Keep domain rules deterministic and testable. Prefer pure derivation functions for state-machine facts.
- Keep LLM/Oracle assumptions in skills or explicit integration seams, not in the referee core.
- Fail closed at trust boundaries: malformed state, ambiguous verdicts, missing verify config, path traversal, stale/forged verify runs, and protected-path changes should stop the loop rather than infer success.
- Avoid broad rewrites of `skills/**`; make small, reviewable deltas because skill text is part of the safety surface.
- Add regression tests for every bug fix. For referee changes, include the concrete false-green or unsafe-transition scenario and consider adding a `coco eval` fixture.

## Branch and merge expectations

- Work on a branch; do not commit directly to `main`.
- Do not merge from an agent session unless the user explicitly approves the exact merge action for that goal/branch.
- If coco returns a `humanCommand`, present that exact command. If verify policy changed, the command must include `--ack-verify-policy-change`.
- A ready PR should explain the safety impact, affected commands/tools, and verification run.

## Daily Codex workflow

For normal development in Codex.app:

1. Run `coco setup codex` once as a dry-run, then `coco setup codex --apply` if the paths are correct.
2. Run `coco doctor` before a long session.
3. Use `$coco-goal` for vague or multi-step work.
4. Use `$coco-queue` or `coco next` to inspect the next ready task without implementing.
5. Use `$coco-loop` for one loop-sized implementation task.
6. Use `$coco-night` for one bounded overnight attempt; schedule it as an automation only after it works manually.
7. Use `$coco-store status` or `coco-store progress` for project state.
8. Use `$coco-improve` only to propose one evidence-backed improvement; it must not build, edit, or merge the proposal itself.
Loading
Loading