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
8 changes: 4 additions & 4 deletions .dev-brain/STATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# State — agents-platform
Updated: 2026-11-03 · Branch: improve/token-budget-and-review (uncommitted edits; main has the same tree)
Updated: 2026-11-03 · Branch: ci/offline-check (PR #5; main has plugin 2.2.0)

## 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)
- Plugin 2.2.0 prepared, not committed: minimal `start`, review passes the Goal line, reviewer checks weakened tests — evidence: `python3 evals/offline/check.py` ALL PASS; external studies in `evals/results.md` 2026-11-03
- 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
- Review no longer pays the diff three times (7005 → 1101 chars on hph) — evidence: `evals/results.md` 2026-10-25

## In progress / blockers
- Benefit of the rules on real code — status: NOT RUN; user postponed the benchmark
Expand All @@ -19,6 +19,6 @@ Claude Code plugin for readable, maintainable code at the lowest context cost
- none

## Next (max 3)
1. When the user decides: commit 2.2.0 on a new branch from main, push, then `claude plugin marketplace update dev-brain`; also review hph PR #10 (its `AGENTS.md` predates the minimal `start`).
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.
34 changes: 34 additions & 0 deletions .github/workflows/offline-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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.
on:
pull_request:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: offline-check-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
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
# 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
- name: Offline check
run: python3 evals/offline/check.py
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. 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 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.

## Layout

Expand Down
8 changes: 8 additions & 0 deletions evals/results.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ 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-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.

Evidence: pull request #5, run `offline-check`: success, 11 checks ALL PASS on a clean runner (about 13 s). Before that, `main` at 0d01d2b (plugin 2.2.0) was cloned into an empty directory and gave ALL PASS locally. The script exits with 1 when a check fails, so the job fails with it; a failing run on CI was not provoked.

Limits: the version is pinned, so a newer Claude Code release is not tested until the pin is bumped; actions are referenced by major tag (`@v4`), not commit SHA; a red check does not block a merge unless branch protection requires it (not set); the check still does not judge model answers.

## 2026-11-03 — Minimal `start`, review against the goal, weakened-test check (plugin 2.2.0)

Changes: (1) `start` writes `AGENTS.md` as a draft under 40 lines with only commands, tooling, deviations from defaults and gotchas; no purpose line, stack list or architecture overview. Overview lines already in an existing file are listed for deletion, never removed. For names like `.env` or `input/` it prints the permission deny rules for the user to add. (2) `review` passes the state's Goal line to the reviewer as unverified requirements. (3) The reviewer also checks that no test was deleted, skipped, loosened or special-cased to pass. (4) When the repository has a fast check, `start` prints a Stop-hook line (exit code 2 blocks the turn) for the user to add; the plugin enforces nothing there.
Expand Down
Loading