Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 5 additions & 6 deletions .dev-brain/STATE.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# State — agents-platform
Updated: 2026-11-20
Updated: 2026-11-23

## Goal
Plugin (Claude Code; Codex CLI and Copilot read it too) for readable, maintainable code at the lowest context cost — acceptance: installs from GitHub with two commands, every claim backed by `evals/` evidence, measured benefit on real tasks.
Plugin (Claude Code, plus an OpenCode adapter) for readable, maintainable code at the lowest context cost — acceptance: installs from GitHub with two commands, every claim backed by `evals/` evidence, measured benefit on real tasks.

## Done (latest first, max 5)
- Plugin 2.3.0 merged (PR #7): Codex 0.171.0 and Copilot CLI 1.0.114 support (six `agents/openai.yaml`, guard denies on Codex, Copilot context key) — evidence: `python3 evals/offline/check.py` ALL PASS (24 checks, local), six mutations each FAIL the intended check; PR #7 CI success, manual run of both jobs success (newest: Claude Code 2.1.329, Codex 0.171.0, Copilot CLI 1.0.114); install from GitHub run as written on Codex and Copilot
- Plugin 2.4.0 on branch `feat/opencode-adapter`, PR #9 open and not merged: Codex and Copilot support removed (user decision), OpenCode adapter `adapters/opencode/index.ts` added — evidence: `python3 evals/offline/check.py` ALL PASS (20 checks: 11 Claude Code 2.1.325, 9 OpenCode 2.3.2), six adapter mutations each FAIL the intended check; PR #9 CI success on both jobs (newest: Claude Code 2.1.330, OpenCode 2.4.0)
- Plugin 2.2.1 merged (PR #6): `handoff` stops writing branch/HEAD/commit status, CI pin 2.1.325 plus a newest-release job — evidence: CI success on both jobs; weekly schedule NOT RUN until it first fires
- Offline check on GitHub Actions for every PR — evidence: PR #5 run `offline-check` success, ALL PASS on a clean runner
- Plugin 2.2.0 merged (PR #4): minimal `start`, review passes the Goal line, reviewer checks weakened tests — evidence: `python3 evals/offline/check.py` ALL PASS on a clean clone of main (0d01d2b)
- No commit without the user, enforced: `PreToolUse` git guard (2.1.0) — evidence: `python3 evals/offline/check.py` ALL PASS; mutation without the hook FAILs

## In progress / blockers
- Benefit of the rules on real code — status: NOT RUN; `claude plugin eval` (with/without plugin) would measure it but needs the user's credentials and tokens
- Minimal `start` with a real model — status: partly seen on Presidio (deny rules and Stop hook adopted, `AGENTS.md` kept, not trimmed); its deletion-candidate list not seen
- Opus 5.5 system card read only through secondary reports (PDF unreachable here)
- VS Code Copilot, interactive Copilot prompts and the Codex `/hooks` trust screen — status: NOT RUN (cannot be driven here)
- OpenCode TUI (the interactive ask prompt, `@start`) and OpenCode 1.x — status: NOT RUN (the TUI cannot be driven here)

## Known pre-existing failures
- none

## Next (max 3)
1. User: try 2.3.0 in VS Code Copilot (do the rules arrive? do the workflows list?) and in Codex (`/hooks` trust), then `claude plugin marketplace update dev-brain`; review hph PR #10; delete remote branch `improve/state-and-ci-2-2-1` (the proxy blocks it here).
1. User: review the PR; after merging, add `adapters/opencode` to `plugins` in `opencode.json`, run `opencode debug agents` (must list `reviewer`), then try `@start` and a commit in the TUI.
2. User decision: draft a `claude plugin eval` suite (authorization, weakened tests, `start` size) and run it with `--max-cost-usd`.
3. Collect Presidio feedback: `/context all` from a fresh session, the `start` candidate list; change only what repeats twice.
21 changes: 9 additions & 12 deletions .github/workflows/offline-check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: offline-check

# Runs evals/offline/check.py: the real Claude Code, Codex CLI and Copilot CLI
# binaries against a local mock model. No secrets, no tokens, no network beyond the
# Runs evals/offline/check.py: the real Claude Code and OpenCode binaries
# against a local mock model. No secrets, no tokens, no network beyond the
# package registry. Pull requests test the pinned versions. Pushes to main, the
# weekly schedule and manual runs also test the newest releases, to see a change early.
on:
Expand All @@ -21,7 +21,7 @@ concurrency:

jobs:
pinned:
name: Pinned versions (Claude Code 2.1.325, Codex 0.171.0, Copilot CLI 1.0.114)
name: Pinned versions (Claude Code 2.1.325, OpenCode 2.3.2)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -34,12 +34,11 @@ jobs:
# The versions the check was last tested against. Bump them deliberately,
# together with the "provato su" line in MANUALE.md.
- name: Install the agents
run: npm install --global @anthropic-ai/claude-code@2.1.325 @openai/codex@0.171.0 @github/copilot@1.0.114
# CODEX and COPILOT make those checks required: a missing binary fails the job.
run: npm install --global @anthropic-ai/claude-code@2.1.325 @opencode/cli@2.3.2
# OPENCODE makes that check required: a missing binary fails the job.
- name: Offline check
env:
CODEX: codex
COPILOT: copilot
OPENCODE: opencode
run: python3 evals/offline/check.py

latest:
Expand All @@ -55,14 +54,12 @@ jobs:
with:
node-version: 22
- name: Install the newest agents
run: npm install --global @anthropic-ai/claude-code@latest @openai/codex@latest @github/copilot@latest
run: npm install --global @anthropic-ai/claude-code@latest @opencode/cli@latest
- name: Show the versions under test
run: |
claude --version
codex --version
copilot --version
opencode --version
- name: Offline check
env:
CODEX: codex
COPILOT: copilot
OPENCODE: opencode
run: python3 evals/offline/check.py
14 changes: 7 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Maintaining dev-brain

This repository is a plugin marketplace with one plugin, `dev-brain`, in `core/`, built for Claude Code. Codex CLI and Copilot read the same marketplace and plugin unchanged; the few host differences are listed below. It is not an application.
This repository is a plugin marketplace with one plugin, `dev-brain`, in `core/`, built for Claude Code, with an adapter for OpenCode in `adapters/opencode/`. It is not an application.
Its primary goal is readable, maintainable code across languages and frameworks. Workflows and saved state support that goal.

## What belongs where

- `core/AGENTS.md` — the global rules, injected into every session by the `SessionStart` hook. Keep it short: only instructions that change default behavior.
- `core/skills/` — Agent Skills. User-invoked workflows (`start`, `resume`, `handoff`, `impact`, `learn`, `review`) set `disable-model-invocation: true`, so they cost no context until invoked; `debugging`, `engineering-risk`, `review-feedback` are loaded by the model when relevant.
- `core/agents/reviewer.md` — the read-only reviewer; its `tools` line is the enforcement.
- `core/hooks/hooks.json` + `core/bin/dev-brain-context` — inject rules and the project state (3000-character budget). Copilot CLI also needs a top-level `additionalContext`, which Codex rejects, so the script adds it only when `COPILOT_PLUGIN_ROOT` is set.
- `core/bin/dev-brain-guard` — `PreToolUse` hook that answers "ask" for git commands changing history, branches or the remote; keep its list in sync with the Authorization rules in `core/AGENTS.md`. Codex cannot ask (an "ask" fails the hook and the command runs), so there it answers "deny".
- `core/skills/<workflow>/agents/openai.yaml` — Codex ignores `disable-model-invocation`; this file (`allow_implicit_invocation: false`) keeps the six workflows out of its skill listing. Add one to every new workflow skill.
- `core/hooks/hooks.json` + `core/bin/dev-brain-context` — inject rules and the project state (3000-character budget).
- `core/bin/dev-brain-guard` — `PreToolUse` hook that answers "ask" for git commands changing history, branches or the remote; keep its list in sync with the Authorization rules in `core/AGENTS.md`.
- `adapters/opencode/index.ts` — OpenCode has no plugin marketplace, so this one file runs `dev-brain-context` and `dev-brain-guard`, registers `core/skills` and builds the reviewer from `core/agents/reviewer.md`. It holds no rule of its own: change the rule in `core/`, not here. Its one extra line of policy is the reviewer's denial of redirections, which OpenCode's shell matcher does not parse.
- `core/.claude-plugin/plugin.json` — bump `version` on every change so installed copies refresh. `.claude-plugin/marketplace.json` at the root lists the plugin.
- `evals/` — scenarios, measured results, and `offline/check.py` with `offline/mock_model.py`, a zero-token check against the real Claude Code, Codex CLI and Copilot CLI binaries. VS Code cannot run here, so it is untested.
- `evals/` — scenarios, measured results, and `offline/check.py` with `offline/mock_model.py`, a zero-token check against the real Claude Code and OpenCode binaries. The OpenCode TUI cannot run here, so it is untested.

## Changing the harness

Expand All @@ -27,7 +27,7 @@ Never add rules by intuition alone. A rule that the model already follows is pur
## Constraints

- All kit content is English. Exception: `MANUALE.md` is the Italian user manual.
- Runtime dependencies: Claude Code, `python3`, `git`.
- Skills and rules stay in standard formats (`AGENTS.md`, `SKILL.md`) with no absolute paths, so another agent is supported with an adapter instead of a rewrite. Host-specific code stays limited to the items above.
- Runtime dependencies: Claude Code or OpenCode, `python3`, `git`.
- Skills and rules stay in standard formats (`AGENTS.md`, `SKILL.md`) with no absolute paths, so another agent is supported with an adapter instead of a rewrite. Host-specific code stays limited to `adapters/`.
- Do not duplicate a rule or template across files: `core/` holds each once.
- Do not copy project facts (stack, commands, state) from a destination repository into this source repository.
Loading
Loading