Skip to content

feat(bench): JIT arm from real aj compile (not a hardcoded skill)#13

Merged
Poytr1 merged 2 commits into
mainfrom
feat/aj-bench-real-compile
Jul 7, 2026
Merged

feat(bench): JIT arm from real aj compile (not a hardcoded skill)#13
Poytr1 merged 2 commits into
mainfrom
feat/aj-bench-real-compile

Conversation

@Poytr1

@Poytr1 Poytr1 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Answers "is the benchmark's JIT skill actually compiled by AgentJIT?" — now yes, for compilable workflows. (Previously the JIT arm installed a hand-written SKILL.md.)

What's here

  • CompilableFixture interface (SeedSessions + SkillName) and ShellSeqFixture — a repetitive shell workflow (mkdir -p out + N touch) that AgentJIT's deterministic compiler turns into a real shell-script skill.
  • CompileSkill: seeds the workflow's session logs into an isolated AJ_HOME, runs the real aj compile, copies the generated skill into the JIT arm's .claude/skills/, and returns the true compile cost (0 on the deterministic path).
  • runGenCompare: for a CompilableFixture the JIT arm now runs real aj compile; break-even uses the actual compile cost unless --compile-cost overrides. nullcheck (Edit-based) keeps its hand-written skill — the deterministic backend only emits Bash steps, so it isn't compilable and would route to the LLM.

Tests / verification

  • TestCompileSkillProducesRealSkill builds the aj binary and runs the real compile end-to-end: seed → aj compile → generated skill script installed, cost 0. golangci-lint clean.
  • Live run (--gen shellseq --n 2 --compare): the JIT arm received a genuine aj compile skill (mkdir-out/scripts/mkdir-out.sh), both arms solved at iso-accuracy.

Honest caveat on numbers

Deterministic compile is zero-token, so break-even is immediate by that measure. But single-rollout A/B token numbers are noisy — baseline T2S is dominated by prompt-cache state that carries across the two sequential episodes (one run showed baseline 0 vs jit 46k; isolated baseline ~93k). Use --rollouts ≥ 3 (the harness already reports mean/median/spread). The harness faithfully reports what claude returns; this is a measurement property, not a harness bug.

Addresses the "hardcoded skill" limitation noted in docs/superpowers/specs/2026-07-06-benchmark-findings.md.

🤖 Generated with Claude Code

Poytr1 and others added 2 commits July 7, 2026 10:42
Answers "is the benchmark's skill actually compiled by AgentJIT?" — now,
yes, for compilable workflows.

- CompilableFixture interface: SeedSessions (writes workflow session logs)
  + SkillName. ShellSeqFixture: a repetitive shell sequence (mkdir + N
  touches) that AgentJIT's deterministic compiler turns into a real
  shell-script skill.
- CompileSkill: seeds logs into an isolated AJ_HOME, runs the real
  `aj compile`, copies the generated skill into the task's .claude/skills,
  and returns the true compile cost (0 on the deterministic path).
- runGenCompare: for a CompilableFixture the JIT arm now runs real
  aj compile; break-even uses the actual compile cost unless --compile-cost
  overrides. NullCheckFixture (Edit-based) keeps its hand-written skill —
  the deterministic compiler only emits Bash steps, so it isn't compilable.

Tests build the aj binary and run the real compile end-to-end: seed ->
`aj compile` -> generated skill script installed, cost 0.

Note on results: deterministic compile is zero-token, so break-even is
immediate — but single-rollout A/B numbers are noisy because baseline T2S
is dominated by prompt cache state that carries across sequential episodes.
Use --rollouts >= 3 (harness already reports mean/median/spread).

Refs: benchmark sandbox design; addresses the "hardcoded skill" limitation
in docs/superpowers/specs/2026-07-06-benchmark-findings.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Records the trustworthy --rollouts 3 numbers for the genuinely compiled
skill: shellseq n=2 saves 35/use, n=4 saves 19/use (~0% on a ~93k
baseline), both at iso-accuracy. Confirms the "trivial workflow → skill
doesn't pay off" conclusion holds for a real compiled skill, not just the
hand-written one. Marks the hardcoded-skill and rollouts=1 limitations as
addressed; the exploration-heavy shape remains the open question.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Poytr1 Poytr1 merged commit 7fea6d4 into main Jul 7, 2026
2 checks passed
@Poytr1 Poytr1 deleted the feat/aj-bench-real-compile branch July 7, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant