agentshekel/agentic-workflow/system-optimization-protocol

Claude Code and agent skill by agentshekel/agentic-workflow

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

[PROTOCOL] Generic system-optimization (skill-evolution) methodology shared by the three domain director-optimizers (dev / design / marketing). The SkillOpt loop adapted to a creative/dev agency: event-driven reflect → bounded edit → gate → slow-update over the agent/skill corpus, with a cross-family proposer and judge-only directors. Reference- only — loaded by `*-director` agents via skills frontmatter, not triggered by keywords.

Install

npx vskill@latest install agentshekel/agentic-workflow/system-optimization-protocol

SKILL.md

The same SKILL.md was published earlier as agentshekel/agentic-workflow/system-optimization-protocol.

System-optimization protocol (skill-evolution loop)

This is the optimizer side of the agency. It does NOT accept engagements (managers do that). It improves the skill/agent corpus itself, treating it as a trainable artefact — the adaptation of Microsoft SkillOpt's "train the procedure, not the weights" to a low-volume, subjective-output agency with no automatic scorer.

Mental model (SkillOpt mapping)

SkillOptHere
Skill document = trainable stateThe domain's ~/.claude/agents/*.md + ~/.claude/skills/*/SKILL.md
current_skill vs best_skill.md~/.claude/ (working) vs C:\releases\agentic-workflow\ (blessed mirror)
Rollout (forward)A real engagement in this domain
Loss / evaluatorValidator JSON + adversary consilium + manager acceptance verdict
Failure-trajectory analysisChannels A/B — log signals + gap reflections (corrective)
Success-trajectory analysisChannel C — - worked: reflections (reinforcement). Never a trigger
Reflect (backward)This loop, step 1 — attribute failures to a skill/agent
Edit patch (gradient)append / insert_after / replace / delete op on a skill/agent file
Learning rate / clippingedit_budget — max edits accepted per cycle, after a stated ranking
Validation gateGolden-scenario rubric judgment (Codex reads pass/fail, director adjudicates; skill-testing harness only for executable high-blast checks). A regression detector over a held-out set, not an improvement measure
round<r>__before.md snapshotPre-edit file copies under skillopt-snapshots/<ts>/ — the restore point
Momentum (anti-forgetting)Slow-update: golden-set before/after, 4-bucket categorisation, rollback on regressed>0
Meta-learningTwo-level meta (shared process + domain content), written each cycle and read by the next; lessons rest on per-edit attribution rows (helped / hurt / no observed effect / confounded) from later engagements, gate verdicts and rollbacks
Optimizer ≠ targetCodex proposes edits (cross-family); director judges. Never the same brain.

Role boundary (judge-only — non-negotiable)

The director-optimizer is a pure judge, exactly like the manager is for engagements. It authored neither the skills nor the proposed edits, so it carries zero defend-bias.

ActionWho
Run engagements / accept deliverablesmanager (NOT here)
Detect a recurring failure patterndirector-optimizer
Author edit patches to skills/agentsCodex (via codex-bridge) — never the director
Judge a proposed patch (accept/reject)director-optimizer
Run the gate (golden-set)director-optimizer (dispatches skill-testing)
Promote ~/.claude → releases mirrordirector stages a draft MR (branch + reasoning + gate evidence); human merges = ship (owned = audit-merge; commons = human decides content)
Decide a commons-protocol edithuman (commons maintainer) — director only proposes

If the director ever writes an edit itself, defend-bias returns and the gate loses its independence. Codex authors; the director judges Codex's proposal against gate evidence and the rejection buffer.

Trigger (event-driven, pattern-batched — NOT per-engagement)

This loop is expensive and out-of-band. It does NOT run after every engagement. Fire only when ONE of:

  • A manager wrote REJECT and tagged the cause as systemic (a skill gap, not a one-off

producer slip) → it appends a signal to skill-evolution-log.md.

  • An engagement needed >1 rework round in this domain.
  • anti-pattern-detector fired on a wave in this domain.
  • ≥3 engagements in this domain show the same failure class accumulated in the log.
  • ≥6 loop-actionable live signals in one domain, whatever their classes (the

domain-backlog trigger, BACKLOG_THRESHOLD in skillopt-ready.py). This fires a TRIAGE, not a cycle — see the next section. The recurrence trigger above asks whether a specific failure repeated, which is the right question for telling a systemic gap from prompt drift. It is blind to a domain producing many DIFFERENT one-off failures, where most classes are singletons and almost none reaches 3. On that shape a recurrence-only loop waits for a repeat the log does not produce, and stays silent while material piles up.

  • Reflection sweep pathway: the engagement/engagement-reflections.md files

(last 30–60 days, this domain) are clustered by `target × class`; a cycle fires on cluster size ≥3 OR (once event ledger lands) Langfuse trend Δ thresholds: reject-rate ↑ ≥20%, validator FP-rate ↑ ≥30%, P95 latency ≥2× baseline. This pathway catches slow-burn patterns sub-threshold per-engagement but supra-threshold pooled — Reflexion-style per-engagement signal feeding the SkillOpt event-driven gate. `skillopt-ready.py` now harvests this channel automatically (Channel B): it scans the reflection files, drops any reflection with a log twin (same engagement+taxonomy — the log is authoritative and carries resolution) and any resolved:/dryrun: ones, clusters the remaining orphans by (domain, target, class), and surfaces a due cluster through the same SessionStart reminder as Channel A. The director's manual pass is now the deeper review over what the checker surfaces, not the only harvest.

Optimise on a common pattern across the batch, never a single trajectory (single failures are noise; patching them overfits). This is SkillOpt's "identify COMMON failure patterns — not individual edge cases".

Channel C (success) is fuel, not a trigger. - worked: bullets in engagement-reflections.md record a behaviour that CARRIED an engagement; two on one (target, class) make it available as reinforcement. They never open a cycle. A cycle authors a bounded edit against a defect, so firing one because things went well leaves the proposer with nothing to close — and skillopt-ready.py keeps ready computed from A/B alone for that reason. What the channel changes is what a cycle that some failure already earned is allowed to do: without it, every edit this loop has ever authored made the corpus more suspicious and nothing ratcheted back. The gate's false-positive floor is the brake on that drift; this is the counterweight at the source. Emit one with reflect-emit.py --kind worked.

Triage (what a domain backlog earns, and why it is not a cycle)

A cycle authors one bounded edit against a common pattern. A pile of unrelated signals has no common pattern to author against, so firing a cycle on a backlog would ask Codex to write a patch for a cause that does not exist. A cross-family review made exactly this objection, and it is correct. What a backlog earns instead is a triage: a read, not an edit.

Run it before any cycle, and run it on its own when only the backlog trigger fired.

For each live signal in the domain, decide one of four things:

  1. Stale. The world moved and the signal's premise no longer holds. Append

resolved: <date> - STALE, not fixed. <what changed> and move on. This is not bookkeeping: an unclosed stale signal inflates every future count.

  1. Superseded. Something already closed it, often a direct fix that never came back to

update the log. Append resolved: <date> - <what closed it, with the evidence path>.

  1. Belongs to the other loop. The live half is a script or the engine. Leave it for

harness-ready.py; the skill half stays here only if a skill genuinely misled someone.

  1. Still live. Re-read the failure class against the current corpus and re-key it if the

original wording was the reason it never clustered.

Then look again. If the survivors now contain a ≥3 same-class cluster, that is a real cycle trigger and the loop proceeds normally. If they do not, the triage IS the deliverable: the log is honest again and the loop stays quiet until it has something to optimise on.

What a triage usually finds. Some signals are already dead: they point at retired doctrine, or ask for a gate that has since been built. The survivors often share no cluster, and then no cycle is warranted. The trigger does its job by saying "look here"; calling that look a cycle is the error.

The loop

1. Reflect (Codex authors, taxonomy-classified)

Dry-run signals are skipped. Before reading signals, filter skill-evolution-log.md entries with the line dryrun: true — those are synthetic exercises (seed) and must not drive real edits. A real cycle reflect step considers only signals without that marker.

Resolved signals are skipped. Signals closed by a direct fix outside a cycle carry a resolved: <date> — <how> line. Exclude them from cluster counting (the ≥3-same-class trigger) and from edit authoring — the gap is already closed. Like dryrun:, the marker is load-bearing: a fixed signal left unmarked would inflate a future cluster and trigger a redundant cycle.

Director dispatches Codex via `codex-bridge` with: the accumulated signals, acceptance-log.md, consilium-summary.md, validation-outputs/. Codex classifies each recurring finding and attributes it to a specific agents/X.md or skills/Y/SKILL.md:

  • `rule_missing` — the skill was silent on this → propose append / insert_after.
  • `rule_wrong` — an existing rule misled → propose replace.
  • `rule_ignored` — the rule was correct but the agent didn't follow it → do NOT add text;

propose a structural fix (raise it, make it a gate, tighten emphasis). Adding more text to an ignored rule just grows the file without changing behaviour.

  • Plus the domain's own failure types (see the per-domain director file).

Cross-check the target before authoring (finding F2). A signal's Traced to (and a reflection's target) names a best-guess file; it is load-bearing but fallible — a wrong trace yields a right-pattern / wrong-file edit that the gate then rejects (pure waste, the most common dry-run failure). Codex MUST verify the target points at the agent/skill whose CONTENT enforces the catch — the validator/rule that would PRODUCE the catching artefact — not the producer of the buggy output, by reading the target file itself, the signal's own evidence (validation-outputs/, acceptance-log.md) and the validation-pipeline domain matrix (which validator runs on which surface).

The proposer does not read the golden set. Golden scenarios are the held-out test set of this loop; the gate is the only step that opens them. A proposer that has read the pass-criteria writes edits that echo the scenario's wording, pass the gate on that wording, and close nothing outside it, which is the train/test leak references/anthropic-evals/eval-hillclimb.md (Step 4, "Touching the held-out set") names as the fastest route to an overfit change. The wall is partial by design: gate failures still reach the next proposer through the meta file, because negative memory is worth more than a perfect split. Meta lessons therefore describe edit shape (scope, trigger, severity, target file), never scenario content, slugs or pass-criteria. The rejection buffer may name the scenario that failed: the director reads it at select, the proposer does not.

Codex output = a JSON patch list (see edit format). Director reads the shared process-meta

  • its domain content-meta BEFORE judging, and the rejection buffer (step 2).

The reinforcement channel runs beside this one, on the same call shape and the same proposer, when Channel C carried fuel. It is deliberately the conservative half: propose only patterns the target file does not already state, prefer tightening an existing section over a new heading, and return an empty list when the corpus already says it. A reinforcement edit that adds length without changing behaviour is this channel's characteristic failure.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/agentshekel/agentic-workflow/system-optimization-protocol/badge)](https://verified-skill.com/skills/agentshekel/agentic-workflow/system-optimization-protocol)

Something wrong with this skill or its page? Tell us.