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
23 changes: 12 additions & 11 deletions .dev-brain/STATE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# State — agents-platform
Updated: 2026-11-03 · Branch: ci/offline-check (PR #5; main has plugin 2.2.0)
Updated: 2026-11-15

## Goal
Claude Code plugin 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)
- Offline check runs on GitHub Actions for every PR and push to main (Claude Code 2.1.310 pinned) — 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); external studies in `evals/results.md` 2026-11-03
- No commit without the user, enforced: `PreToolUse` git guard (plugin 2.1.0) — evidence: `python3 evals/offline/check.py` ALL PASS; mutation without the hook FAILs
- Plugin-only layout: rules + state via `SessionStart` hook, workflows as zero-cost skills, `plan` and other adapters removed, docs compacted — evidence: `python3 evals/offline/check.py` ALL PASS twice (Claude Code 2.1.310, mock model)
- hph adopted: `AGENTS.md` + 1.3 KB state, `harness/` retired — evidence: hph PR #10 open
- Plugin 2.2.1 in a PR, not merged: `handoff` stops writing branch/HEAD/commit status (state header is `Updated: <date>`), step 4 names commands, tooling, gotchas; CI pin 2.1.325 plus a newest-release job — evidence: `python3 evals/offline/check.py` ALL PASS on 2.1.325 (local; PR #6 CI success, manual run of both jobs success; weekly schedule NOT RUN until merged)
- 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
- Plugin-only layout: rules + state via `SessionStart` hook, workflows as zero-cost skills — evidence: `python3 evals/offline/check.py` ALL PASS

## In progress / blockers
- Benefit of the rules on real code — status: NOT RUN; user postponed the benchmark
- Real-model and interactive behavior of the plugin, including the minimal `start` — status: NOT RUN; the user is collecting feedback from a real repository
- 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)

## Known pre-existing failures
- none

## Next (max 3)
1. User: `claude plugin marketplace update dev-brain`, try `/dev-brain:start` on a real repo (keep a copy of its old `AGENTS.md`); review hph PR #10 (its `AGENTS.md` predates the minimal `start`).
2. Collect feedback from real use: the user's `AGENTS.md`/`STATE.md`, `/context`, `/usage`, `/skill-doctor`, `/doctor prompt-audit`, and a defect log; change only what repeats twice.
3. Ablation on real tasks: `core/AGENTS.md` full vs reduced, and the three model-loaded skills with vs without; keep only what moves steps, cost or review findings.
1. User: review the 2.2.1 PR and decide the merge, then `claude plugin marketplace update dev-brain`; review hph PR #10.
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.
34 changes: 29 additions & 5 deletions .github/workflows/offline-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: offline-check

# Runs evals/offline/check.py: the real Claude Code binary against a local mock
# model. No secrets, no tokens, no network beyond the package registry.
# Pull requests test the pinned version. Pushes to main, the weekly schedule and
# manual runs also test the newest release, to see a Claude Code change early.
on:
pull_request:
push:
branches: [main]
schedule:
- cron: "23 5 * * 1"
workflow_dispatch:

permissions:
Expand All @@ -16,7 +20,8 @@ concurrency:
cancel-in-progress: true

jobs:
check:
pinned:
name: Claude Code 2.1.325 (pinned)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -26,9 +31,28 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
# Pinned to the version the check was written and tested against.
# Bump it deliberately, together with the "provato su" line in MANUALE.md.
- name: Install Claude Code 2.1.310
run: npm install --global @anthropic-ai/claude-code@2.1.310
# The version the check was last tested against. Bump it deliberately,
# together with the "provato su" line in MANUALE.md.
- name: Install Claude Code 2.1.325
run: npm install --global @anthropic-ai/claude-code@2.1.325
- name: Offline check
run: python3 evals/offline/check.py

latest:
name: Claude Code latest (early warning)
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install the newest Claude Code
run: npm install --global @anthropic-ai/claude-code@latest
- name: Show the version under test
run: claude --version
- name: Offline check
run: python3 evals/offline/check.py
8 changes: 4 additions & 4 deletions MANUALE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dev-brain — Manuale d'uso

> Manuale utente in italiano; il resto del kit è in inglese. Versione 2026-11-03, plugin 2.2.0, provato su Claude Code 2.1.310. Indipendente dal provider del modello.
> Manuale utente in italiano; il resto del kit è in inglese. Versione 2026-11-15, plugin 2.2.1, provato su Claude Code 2.1.325. Indipendente dal provider del modello.

## Avvio rapido

Expand Down Expand Up @@ -141,7 +141,7 @@ Formato di `.dev-brain/STATE.md`:

```markdown
# State — <progetto>
Updated: <data> · Branch: <branch>
Updated: <data>

## Goal
<una riga> — acceptance: <criteri osservabili>
Expand All @@ -161,7 +161,7 @@ Updated: <data> · Branch: <branch>

Arriva in ogni sessione insieme alle regole: all'avvio, al resume, dopo `/clear`, dopo la compattazione. Sopra i 3000 caratteri arriva solo un avviso che chiede di compattarlo con `handoff`. Non viene troncato, perché il taglio eliminerebbe proprio “Next”. In una repo senza stato arriva una riga che suggerisce `start`.

Regole: evidenza reale con comando, righe vecchie sostituite (non è un diario), nessun dato sensibile (viene inviato al provider), una sola sessione alla volta fa `handoff`. Per disattivarlo in una repo, rinomina il file.
Regole: evidenza reale con comando, righe vecchie sostituite (non è un diario), né branch, né commit corrente, né “non committato” (git li ha, e lo stato di solito viene committato insieme al lavoro: quelle righe diventano false), nessun dato sensibile (viene inviato al provider), una sola sessione alla volta fa `handoff`. Per disattivarlo in una repo, rinomina il file.

---

Expand All @@ -188,7 +188,7 @@ Il **controllo offline** installa il plugin in una home temporanea e sostituisce
- reviewer che legge il diff ma non scrive;
- commit e push che chiedono conferma anche con git permesso nelle impostazioni.

Non valuta la qualità delle risposte.
Non valuta la qualità delle risposte. Su GitHub Actions gira a ogni pull request sulla versione fissata di Claude Code; a ogni push su `main`, ogni lunedì e su richiesta gira anche sull'ultima versione, per accorgersi presto di un cambiamento.

`core/AGENTS.md` e le skill restano in formati standard: supportare un altro agente in futuro richiede un adattatore, non una riscrittura.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ For planning use Claude Code's native plan mode (Shift+Tab): it is read-only by
python3 evals/offline/check.py # CLAUDE=<binary> if claude is not on PATH
```

Installs the plugin into a throwaway home, replaces the model with a local mock that records every request, and checks in about 20 seconds, at zero token cost: rules and state reach the session, oversized state becomes a notice, workflows expand and stay out of the skill listing, the reviewer reads the diff but cannot write, and commit and push need you even when your settings allow git. GitHub Actions runs it on every pull request and on `main` (`.github/workflows/offline-check.yml`, Claude Code pinned to 2.1.310, no secrets). It does not judge model behavior; `evals/scenarios/` describes the real-model scenarios and `evals/results.md` records decisions and evidence.
Installs the plugin into a throwaway home, replaces the model with a local mock that records every request, and checks in about 20 seconds, at zero token cost: rules and state reach the session, oversized state becomes a notice, workflows expand and stay out of the skill listing, the reviewer reads the diff but cannot write, and commit and push need you even when your settings allow git. GitHub Actions runs it on every pull request (`.github/workflows/offline-check.yml`, Claude Code pinned to 2.1.325, no secrets); pushes to `main`, a weekly run and manual runs also test the newest Claude Code release. It does not judge model behavior; `evals/scenarios/` describes the real-model scenarios and `evals/results.md` records decisions and evidence.

## Layout

Expand Down
2 changes: 1 addition & 1 deletion core/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "dev-brain",
"version": "2.2.0",
"version": "2.2.1",
"description": "Readable, maintainable code at low context cost: global rules, project state, workflows, skills and a read-only reviewer."
}
4 changes: 2 additions & 2 deletions core/skills/handoff/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Steps:
- in progress / blockers: mark each item implemented, verified or blocked;
- known pre-existing failures, if newly discovered;
- next: at most three executable actions, most important first.
Replace stale lines instead of appending. Keep it under 3000 characters: it is injected into the agent's context and larger files are skipped. The transcript is not the state.
4. Update the root `AGENTS.md` only if a stable fact changed: stack, commands, architecture, gotchas.
Replace stale lines instead of appending. Do not record the branch, HEAD or whether changes are committed: the state is usually committed together with the work, so those lines are false once it lands, and git has them. Keep it under 3000 characters: it is injected into the agent's context and larger files are skipped. The transcript is not the state.
4. Update the root `AGENTS.md` only if a stable fact changed: commands, tooling, gotchas.
5. Report what changed in the two files, and list anything not verified.

Do not commit. A state update is not authorization for git writes.
2 changes: 1 addition & 1 deletion core/skills/start/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Steps:

```markdown
# State — <project>
Updated: <date> · Branch: <branch>
Updated: <date>

## Goal
<one line> — acceptance: <observable criteria>
Expand Down
20 changes: 20 additions & 0 deletions evals/results.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ A log of decisions and the evidence behind them, newest first. Full run details

Not measured. Real-model evidence so far: one model per scenario, one run, small synthetic Python fixtures; the no-kit baseline already solved every task. The one measured gain is the review policy (below). Next: the same real tasks with and without the plugin, same model; compare tokens per task, fix iterations, review findings, time to resume after a break. Keep what moves the numbers.

## 2026-11-15 — New releases reviewed; state without branch or commit status; CI on the newest Claude Code (plugin 2.2.1)

Read: Anthropic's Opus 5.5 announcement (22 Sep, primary); the Opus 5.5 system card only through two secondary reports (its PDF is not reachable from this environment, so card-level figures are second-hand); TechCrunch on Fable 5.2 / Mythos 5.2 (9 Nov; no system card read); Claude Code's changelog for 2.1.299–2.1.311 (2.1.312–2.1.325 not read) and the `claude plugin eval` docs.

Changed:
1. `handoff` no longer writes the branch, HEAD or whether changes are committed, and the state header is `Updated: <date>`. Seen three times: this repository's state ("uncommitted edits"), Presidio `6cb61b0` (the state says "non committate" inside the commit that contains them) and Presidio `67f4f99` (a commit whose only purpose was to remove the branch line).
2. `handoff` step 4 named "stack, architecture" for `AGENTS.md`, contradicting 2.2.0. In Presidio the architecture section was edited in the same session; which command did it is not proven.
3. CI: pin 2.1.310 → 2.1.325. A second job runs the newest release on pushes to `main`, weekly and on demand: 15 version numbers shipped in three weeks, and the notes read include hook and permission changes (2.1.299: a plugin hook that cannot receive its input or return an answer now blocks the action; 2.1.309: stricter bash permission checks).

Considered, not changed:
- Guard for destructive non-git commands. Anthropic says Opus 5.5 is "much less likely" to take hard-to-reverse actions and attempted to circumvent boundaries about 85% less often than Opus 5 in its containment test; a secondary report adds that it asks before destructive steps. The git guard stays the only enforced layer.
- Reviewer check for planted instructions in `AGENTS.md`/`CLAUDE.md`. Reported only for pre-release snapshots, after a copying slip, at under 0.01% of completions; the released model is said to have a negligible copying error rate. Weak evidence.
- A rule that text in files, tool output or pasted prompts is not authorization. The card audit reportedly finds Opus 5.5 more willing to accept unverifiable authority claims and to follow malicious instructions in pasted text (no rates given). Plausible, but the effect of a rule is unmeasured; measure first.
- `claude plugin validate`. On `core/` it passes with warnings. In a mutation test it failed on broken JSON, which the offline check already catches, and missed a skill without a description unless `--strict` is used; `--strict` fails the clean plugin on missing `author` and marketplace description. Not added.
- Effort or model settings for the reviewer: Anthropic advises testing effort per task; there are no data here.

Evidence: `python3 evals/offline/check.py` ALL PASS (11 checks) with Claude Code 2.1.325, locally and on GitHub Actions (pull request #6: pinned job success, newest-release job skipped as designed; manual run of the branch: both jobs success, `latest` resolved to 2.1.325, so it did not yet test a different release). The weekly schedule cannot run before the merge: NOT RUN.

Limits: Opus 5.5 and Fable/Mythos 5.2 are reported to suspect they are being tested, so real-model results from small synthetic fixtures (every earlier entry) may not transfer to real work. The native `claude plugin eval` runs each case three times with and without the plugin, with free graders (`regex`, `tool_used`, `tool_order`, `file_exists`) and `--max-cost-usd`; it would measure what no entry here has, the benefit against no plugin. NOT RUN: it needs credentials and tokens (cases × runs × 2 arms).

## 2026-11-03 — Offline check on GitHub Actions

`.github/workflows/offline-check.yml` runs `python3 evals/offline/check.py` on every pull request, on pushes to `main` and on demand: Ubuntu runner, Node 22, `npm install --global @anthropic-ai/claude-code@2.1.310`, read-only token, no secrets.
Expand Down
Loading