Index of every page on this site: llms.txt
All skills
a2ui-project avatar

/inference-format-optimizer

@6bf4cc2
by A2UIa2ui-project/a2ui18k stars
1,430
Run it yourself

Iterative benchmarking, evaluation, and algorithmic optimization of alternative A2UI inference formats (such as Express, Atom, and Elemental). Trigger when asked to: (1) Run optimization passes or loops on an inference format, (2) Evaluate or benchmark format accuracy, latency, or token efficiency, (3) Create parallel worktree subagents for format iteration, or (4) Benchmark format trade-offs against baselines.

  • 19 files
  • 207.9 KB
  • Updated 2 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/a2ui-project/a2ui/inference-format-optimizer

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencessubagent_protocol.md

≈794 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Multi-Agent Subagent Worktree Protocol

This document specifies the execution protocol for running format optimization passes using autonomous subagents in isolated Git worktrees.


1. Worktree Isolation & Naming Convention

To prevent code conflicts and race conditions, each optimization pass runs in a dedicated Git worktree branch:

  • Branch Name Pattern: opt-<format>-pass<N> (e.g., opt-express-pass6)
  • Directory Location: worktrees/opt-<format>-pass<N> (e.g., /usr/local/google/home/gspencer/code/a2ui/worktrees/opt-express-pass6)
git worktree add -b opt-express-pass6 /usr/local/google/home/gspencer/code/a2ui/worktrees/opt-express-pass6 optimize_express

2. Subagent Launch via invoke_subagent

The parent agent launches subagents sequentially using invoke_subagent:

  • TypeName: "self"
  • Role: "Express Pass <N> Optimizer"
  • Workspace: "inherit"

3. Subagent Execution Sequence

Each subagent MUST execute the following 5-step sequence inside its worktree:

  1. Implement Hypothesis: Edit target compiler (compiler.py), prompt generator (prompt_generator.py), or parser (parser.py).
  2. Run Pytest Unit Tests:
    PYTHONPATH=python/a2ui_agent/src:python/a2ui_core/src /usr/local/google/home/gspencer/code/a2ui/iterative_optimization/.venv/bin/python -m pytest python/a2ui_agent/tests/<format>/
  3. Run Evaluation Benchmark:
    /usr/local/google/home/gspencer/code/a2ui/iterative_optimization/.venv/bin/python eval/skills/inference-format-optimizer/scripts/optimize_format.py --format <format>
  4. Evaluate Decision Rules & Archive:
    • If unit tests fail, Quality Score regresses, or Output Tokens expand $> +5%$:
      git reset --hard HEAD
      /usr/local/google/home/gspencer/code/a2ui/iterative_optimization/.venv/bin/python eval/skills/inference-format-optimizer/scripts/optimize_format.py --format <format> --archive --hypothesis "..." --status REVERT --notes "<reason>"
    • Else:
      /usr/local/google/home/gspencer/code/a2ui/iterative_optimization/.venv/bin/python eval/skills/inference-format-optimizer/scripts/optimize_format.py --format <format> --archive --hypothesis "..." --status KEEP --notes "<summary>"
  5. Synchronize History Index:
    /usr/local/google/home/gspencer/code/a2ui/iterative_optimization/.venv/bin/python eval/skills/inference-format-optimizer/scripts/sync_history.py

4. Parent Subagent Lifecycle Management

Once a subagent reports completion of its pass:

  1. Incorporate & Commit Results: If the pass is KEPT, copy modified source files and unit tests into the main working branch and IMMEDIATELY commit them (git commit -m "feat(<format>): Pass <N> <summary>"). Also stage and commit updated history run logs and summary tables.
  2. Terminate Subagent: Call manage_subagents(Action="kill", ConversationIds=[...]) for completed subagent IDs to prevent background resource accumulation.
  3. Clean Worktree: Remove the temporary pass worktree (git worktree remove --force ...) and branch (git branch -D ...).

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 6bf4cc2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago
metadata
{
  "internal": true
}

README badge

README badge for a2ui-project/a2ui/inference-format-optimizer