Skip to content

ak2k/ce-lite

Repository files navigation

ce-lite

Lightweight-delegation variant of compound-engineering-plugin.

Drops the persistent agent registrations (~2k idle tokens per registered agent — ~88k of idle context on upstream v3.8.4, gone) and dispatches every specialist via a single resolver shim instead. Specialist prompts move to references/agent-prompts/; the resolver (bin/ce-lite-persona) loads them on demand. Same coverage as upstream CE, near-zero idle cost, and a UserPromptSubmit hook restores proactive specialist invocation across all 49 personas.

Install

/plugins marketplace add github:ak2k/ce-lite
/plugins install ce-lite@ce-lite

During trial, slash commands are namespaced under /ce-lite:* so the original compound-engineering plugin can be installed alongside for direct comparison. Daily upstream-watch.yml auto-bumps the plugin as EveryInc tags new releases.

Trade-offs vs. upstream CE

Measured via interactive /context (Opus 4.7 1M-context, isolated CLAUDE_CONFIG_DIRs, identical state except the installed plugin), upstream compound-engineering-v3.8.4 vs ce-lite:

Context slot Upstream CE (v3.8.4) ce-lite Δ
Custom agents ~88k (measured) 0 (no registrations) ≈ −88k
System tools 28.2k 14.7k −13.5k
Skills 4.6k 12.1k +7.5k
Net idle ≈ −94k

Claude Code loads each registered subagent's full body into idle context (~2k tokens per agent — the "Custom agents" slot above) so the model can proactively select it; ce-lite ships zero registrations, emptying that slot. The total scales with how many agents upstream registers (~2k each); an isolated /context on v3.8.4 measured ~88k. ce-lite trades a +7.5k skills bump (88 SKILL.md descriptions vs upstream's 38) for eliminating the agent slot — while keeping all 49 specialist personas addressable.

Behavior Upstream CE ce-lite
Specialist coverage 49 personas 49 personas (prompts moved to references/agent-prompts/, dispatched via bin/ce-lite-persona)
Proactive specialist invocation ✅ Any conversation can pull security-sentinel via registered subagent UserPromptSubmit hook keyword-matches every prompt against all 49 personas and injects suggestions (~70-84% activation per cited research, vs ~20% baseline for description-only routing)
Tool-restriction enforcement Enforced by harness on registered subagent Advisory only — dispatch via general-purpose subagent. See caveat below.
Maintenance Anthropic / EveryInc Auto-regenerated by upstream-watch.yml cron when EveryInc tags a new release

Caveat: tool restrictions are advisory

Each persona declares a tools: [Read, Grep, ...] set in the upstream manifest. In upstream CE these are enforced by the harness — Claude Code refuses to grant a non-listed tool to that agent type. In ce-lite, dispatch happens via subagent_type: "general-purpose" (because ce-lite intentionally ships zero persistent agent registrations to preserve the idle-context savings), and the harness can't enforce the manifest's tools field on a general-purpose subagent. The [ce-persona=NAME via=SOURCE] preamble emitted by the resolver tells the sub-agent to self-police, but it's advisory — strong agents honor it, the rule isn't bulletproof.

This matches Anthropic's 2026 platform position on allowed-tools in SKILL.md frontmatter (also advisory). If you need hard enforcement for a specific persona, add a PreToolUse hook that rejects tool calls outside the manifest's set — runs at trigger time, not into idle context, so it doesn't reverse the ce-lite trade-off.

Build pipeline

Five deterministic Python stages, no LLM in CI. Run by publish-dist.yml against each upstream tag; validate.py --upstream enforces a round-trip byte-equivalence property (the converter is a monotone projection — only pure additions and pure removals are allowed, no in-place mutation of upstream content).

  1. converter/extract.py — read agents/*.agent.md from upstream, relocate bodies to dist/references/agent-prompts/<name>.md, build manifest.json, copy non-agent files (skills/, .claude-plugin/, etc.) through.
  2. converter/rewrite.py — insert the ce-lite dispatch protocol preamble into every orchestrator SKILL.md that mentions a manifest agent. Fail loud on unrecognized agent mentions (upstream-drift canary — extends DISPATCH_PATTERNS.PERSONA_SUFFIXES when upstream introduces a new agent role).
  3. converter/generate_wrappers.py — emit 49 ce-ask-<persona> wrapper skills + the ce-ask discovery meta-skill + ce-ask-panel parallel dispatch + the UserPromptSubmit keyword-routing hook (auto-derived rules per persona via Pass A; overlaid with Pass B refinement in converter/overrides/persona-keywords.yaml).
  4. converter/generate_commands.py — emit dist/commands/<name>.md slash-command wrappers, one per skill. Without these the /ce-plan, /ce-work, /ce-ask-* entry points only appear in autocomplete; submit doesn't reliably dispatch.
  5. converter/validate.py — structural assertions over the output: no orphan references, every --via target in DISPATCH_SOURCES, every persona in skill-rules.json exists in the manifest, manifest count matches file count, every skill has a matching command wrapper, and (in --upstream mode) byte-equivalence between upstream and dist for agent bodies + SKILL.md bodies.

Run locally:

nix develop                 # devshell with python + pyyaml + pytest + ruff + actionlint
nix flake check             # treefmt (nixpkgs-fmt + ruff-format + ruff-check) + actionlint + pytest
nix run .#integration-eval  # opt-in routing probe via `claude -p` (quota-spending; headless routing is noisy — a rough signal, not a reliable test/gate)

Re-refine the UserPromptSubmit keyword rules with claude -p (sonnet) before a release:

nix develop -c python converter/refine-keyword-rules.py --skip-existing

Output lands in converter/overrides/persona-keywords.yaml; commit alongside the converter changes.

Versioning

plugin.json version is <upstream-tag>-lite[.N], auto-derived from git history by extract.lite_suffix_from_git:

  • Cross-upstream bump: N resets to bare -lite.
  • Same upstream, converter-touching commits since the last .last-processed change: -lite.N (N counts those commits).

To ship a converter-only change between upstream releases, merge the PR to main then trigger publish-dist:

gh workflow run publish-dist --field upstream_tag=$(cat .last-processed)

The auto-PR that opens has the bumped version; merge it and users get the bump via /plugin update.

Why not just use Anthropic's pr-review-toolkit or code-review?

Both are excellent and cheaper than CE. Choose them if you don't need CE's opinionated personas (DHH-Rails-reviewer, kieran-Python-reviewer, etc.) or specialists like architecture-strategist, data-integrity-guardian, performance-oracle.

ce-lite exists for users who want CE's coverage at near-zero idle context cost, with all 49 specialists addressable via /ce-lite:ce-ask-<persona> slash commands.

License

Inherits from EveryInc/compound-engineering-plugin.

About

Lightweight-delegation converter for compound-engineering-plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors