Finish Codex productization, self-evolution, night mode, and modern README#1
Merged
Conversation
The fingerprint tracker returns key:'' (count:0) as the "no active failure" sentinel after a resolve or an initial non-failure event. The new goalSchema required key to be non-empty, so every goal persisted with a reset failure-loop failed to reload — a false-block that broke the plan→implement→review→verify path (58 tests). Allow an empty top-level key; history entries stay non-empty since only real failure signatures are ever appended there. Claude-Session: https://claude.ai/code/session_01UQ775a5fjQWYUF522M7snK
Two eval fixes surfaced once CI actually ran the suite: - fingerprint-loop-escalates asserted escalate-human but supplied no plan event, so nextAction short-circuited to 'plan' and never reached the fingerprint branch. Add the missing plan precondition. - Add reset-failure-loop-survives-reload: rounds a goal with the empty-key sentinel through parseGoalState so the schema false-block cannot regress. Claude-Session: https://claude.ai/code/session_01UQ775a5fjQWYUF522M7snK
The thin-history test asserted every signal is insufficient-data, but the added audit-validity signal deliberately fires regardless of window size (a corrupt audit substrate must halt self-improvement). Assert the real invariant — no signal is actionable on a thin history — and exempt audit-validity from the sample-gate check while keeping it non-actionable. Claude-Session: https://claude.ai/code/session_01UQ775a5fjQWYUF522M7snK
pnpm >=11 ships a built-in `ci` command (clean-install) that shadows the package script, so `pnpm ci` silently reinstalls instead of running typecheck/test/eval/build. The GitHub Actions gate was therefore green without ever verifying anything, masking real test and eval failures. Switch the workflow and all docs (AGENTS.md, README, codex-daily-workflow) to `pnpm run ci`, and fix a `$coco audit validate` README typo (CLI command, no skill prefix). Claude-Session: https://claude.ai/code/session_01UQ775a5fjQWYUF522M7snK
- actions/checkout and actions/setup-node → @v5 (they target Node 24 natively, clearing the Node-20-deprecation annotation forced onto the v4 actions). - prepublishOnly: `pnpm run ci`, not `pnpm ci` — the built-in `pnpm ci` (clean-install) shadows the script, so publish would otherwise skip typecheck/test/eval/build. Claude-Session: https://claude.ai/code/session_01UQ775a5fjQWYUF522M7snK
…f-evolution Adds $coco-night (one-task overnight), $coco-queue (read-only next-task triage), coco setup codex, audit validate/feedback, improve digest, configurable base branch, richer progress cards, and a modern README — plus the false-green CI fix that makes the gate actually verify. Claude-Session: https://claude.ai/code/session_01UQ775a5fjQWYUF522M7snK
The strict-Oracle-parser e2e test spawns ~6 tsx subprocesses but relied on vitest's default 5s timeout, so it flaked on the loaded macOS Node 24 runner (the sibling happy-path test already uses 30s). Align them. Claude-Session: https://claude.ai/code/session_01UQ775a5fjQWYUF522M7snK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch now applies the full improvement set from the review in one draft PR, plus follow-up audit/self-evolution hardening, a comic-style icon,
$coco-queue,$coco-night, and a modern README rewrite.Daily Codex.app productization
AGENTS.mdwith durable repo/agent guidance, commands, safety invariants, and merge expectations..codex/config.toml.examplefor local Codex MCP wiring.docs/codex-daily-workflow.mdfor the daily Codex.app operating path.coco setup codexwith dry-run/apply support for Codex MCP config + skill sync.coco-mcpas a package binary and aligned Node support to Node >=20.Queue and night workflows
$coco-queueto inspect the next ready backlog task without implementing.$coco-nightas a safe one-task overnight workflow: queue + loop, no daemon, no batch, stops at merge-gate unless explicitly invoked with--auto.$coco-night --plan-nextfor the case where the queue is empty and the user wants coco to plan one small next task first.AGENTS.md,docs/codex-daily-workflow.md, command registry, and README with queue/night usage and safety rules.Referee safety hardening
.coco/goals/*.jsonstate.workflow.baseBranch, repo default detection, or explicit--base.verify.testCommandchanges: merge now requires explicit--ack-verify-policy-change; auto-merge falls back to the human path.Audit-backed self-evolution
coco audit validatefor shape + cross-record invariant checks before self-improvement trusts the corpus.coco audit feedback --kind ... --rating ... --tags ....coco audit reportwith audit validity and feedback summaries.coco improve digestwith audit validity, goal-quality feedback, status-clarity feedback, and implementation-quality diagnostics.$coco-improveso self-evolution starts with audit validation and follows “no eval, no improvement.”docs/self-evolution.mdto document the trace → feedback → digest → eval-backed proposal loop.Rich loop status / edge handling
goalStatuswith base/branch/currentBranch, warning level, edge metadata, recovery commands, and a stable progress key.Branding and README
assets/coco-icon.svg, a cuter comic-style coco mascot icon.Extensibility / eval foundations
coco commands.coco evalsafety-regression fixtures, including audit invalidity detection.pnpm evalinpnpm ciand GitHub Actions.Verification
CI passed on the current head (
409a53b7ae834d6e76c1a6288d70c4ba947c0b60) with:Matrix: Node 22/24 on Ubuntu and macOS.
Research/design basis
AGENTS.md, reusable skills, MCP, tests/review, and only turn stable repeated workflows into automations.Review focus
$coco-nightshould stay skill-only for now rather than adding a scheduler/daemon.$coco-night --autois acceptable as per-goal forward consent, still risk-gated.$coco-queueis the right user-facing name for next-task triage.>=20remains the intended package support floor. CI runs Node 22/24 because GitHub-hosted Actions runners reject Node 20 setup without an insecure compatibility flag.coco setup codexdefaults are right for your Codex.app setup (~/.codex/config.toml,~/.agents/skills).Review hardening (follow-up)
A follow-up production-quality pass found that the CI gate was false-green and
fixed three real defects plus documentation drift.
pnpm run cinow passes locally(327 tests, 8 eval fixtures, build) on Node 22 and the workflow now actually verifies.
Root cause — false-green CI. pnpm ≥11 ships a built-in
pnpm cicommand(clean-install) that shadows the package
ciscript. The workflow and docs ranpnpm ci, which silently reinstalled instead of running typecheck/test/eval/build —so GitHub Actions was green without ever running the suite. Switched the workflow and
all docs to
pnpm run ci.Defects the false-green hid:
key:''as the"no active failure" sentinel, but the new
goalSchemarequired a non-empty key, soany goal persisted with a reset failure-loop failed to reload. Loosened the top-level
key(history entries stay non-empty) and added acoco evalreload-guard fixture.fingerprint-loop-escalatesassertedescalate-humanbutomitted the
planevent, sonextActionshort-circuited toplanand never testedescalation. Added the missing precondition.
insufficient-data; the addedaudit-validitysignal is intentionally notsample-gated. Rewrote the assertion around the real invariant (nothing actionable on
a thin history) while keeping
audit-validitynon-actionable.Also: fixed a
$coco audit validateREADME typo (CLI command, no$skill prefix).Verified unchanged: referee invariants, propose-only self-improvement guards,
$coco-nightone-task/merge-gate bounds,$coco-queueread-only behavior, new skillspublished via
files: ["dist","skills"], and the old PNG icons retained as fallbacks.