feat(kun): Anthropic optimization sweep — model routing, caps, hooks, vocabulary#109
Open
abdout wants to merge 7 commits into
Open
feat(kun): Anthropic optimization sweep — model routing, caps, hooks, vocabulary#109abdout wants to merge 7 commits into
abdout wants to merge 7 commits into
Conversation
Settings hygiene aligned with current Claude Code schema. Drops project hooks that duplicate user-level hooks (with worse prettier implementation that lacked project-root + config presence checks). Adds project $schema reference and Notification-only hook block (the kun-specific Captain notification). CLAUDE.md Tier 2 list now splits project commands from user skills so the source of each /name is unambiguous; new "skills shadow commands" note explains the precedence rule. Creates the long-missing ship.md (referenced in Tier 1 pipeline but never existed). Stub chains build → check → push → PR → Vercel deploy → autofix-pr (Theme 4 will add the autofix-pr command). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the user-level CLAUDE_CODE_SUBAGENT_MODEL=claude-opus-4-7 env
override (every subagent paid Opus prices regardless of work). New policy:
- Haiku 4.5: mechanical agents (none at project scope — git/github/etc.
are user-level and updated separately)
- Sonnet 4.6: product coding agents (report, support, package, hogwarts,
mkan, shifa, souq) — most volume, doesn't need Opus reasoning
- Opus 4.7 + effort: xhigh + memory: user: strategic agents (captain,
tech-lead, learn, analyze, growth, revenue, product, quality-engineer,
guardian, analyst, ops) — depth + cross-session continuity
Captain keeps its bespoke memory: [...file list...] (already in place);
just adds effort: xhigh. Expected subagent cost drop 40-70%; tracked via
/costs after this lands.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds YAML frontmatter to all 13 Tier-2b sweep commands with three fields
the kun engine never used:
- description: now appears in skill listings (was just markdown heading)
- model: explicit Sonnet/Haiku per workload (cheap sweeps on Haiku)
- paths: glob patterns so each sweep auto-loads only when relevant
files are in context (e.g., prisma activates on schema.prisma + db/**;
react on *.tsx; tailwind on *.css + tailwind.config.*)
Paths gating reduces skill-listing context budget without changing
behavior when invoked explicitly via /<name>. argument-hint clarifies
each command's accepted args.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each agent declares only the MCP servers it actually needs, instead of inheriting the full 25-server project + 19-server user list every prompt. Frees roughly 30-40% of MCP description budget at the parent context. - revenue: stripe, notion, linear, github - analyst: posthog, linear, notion, ref - growth: notion, posthog, slack, linear, ref - product: linear, notion, github, posthog - learn: github, notion, linear, slack, memory-bank, filesystem, git - report: github, linear, sentry - analyze: github, git, filesystem - support: linear, notion, slack, github - ops: vercel, sentry, posthog, neon, stripe, gcloud - tech-lead: github, neon, vercel, ref, context7 - quality-engineer: linear, sentry, github, a11y - guardian: sentry, github, neon - hogwarts: neon, stripe, github, postgres - package: github, git Captain keeps its bespoke 8-server allowlist (already in place). Product agents mkan/shifa/souq scoped to product DB + github only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Five new commands close the largest documented capability gap. Each is a
small wrapper that delegates to a feature Anthropic already ships but kun
had no command for.
- /batch — Batch API at 50% discount; Tier-2b sweeps queue overnight,
finish in <1h, cost half as much
- /cache-audit — scan API call sites, score caching opportunities,
suggest cache_control breakpoint placement
- /memory-bridge — pair memory tool (memory_20250818) with kun's
~/.claude/memory/; unifies storage for Claude Code, API, Managed Agents
- /sandbox — four named presets (captain/dev/strict/off) for Bash
sandbox so /captain autonomous loops have a real safety net
- /autofix-pr — hand a PR to a web session that babysits CI; chained
from /ship by default
Skipped commands for built-in features kun shouldn't redundantly wrap:
/schedule, /loop, /code-review, /verify, /claude-api, /run, /ultraplan,
/ultrareview, /insights, /team-onboarding all already exist as built-in
skills. These are now Tier-3 vocabulary in Theme 6 instead.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Node 24.16.0 Krypton is the current Active LTS as of 2026-05-24; v22 Jod moved to Maintenance. Updates onboarding.mdx (3 sites), all 3 OS install scripts, wizard-steps.json, self-hosting.mdx NodeSource pin, and mcp.mdx Playwright support line. Mac now pins node@24 (was unpinned brew install node); Windows pins OpenJS.NodeJS.LTS (was unpinned OpenJS.NodeJS); Linux stays on nvm install --lts (auto-resolves to current LTS). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extends Tier 3 vocabulary with four new categories spanning every
Anthropic capability that kun now exposes:
- Cost/perf: cache, batch, think, fork, compact, route
- Tools: memory, web-search, web-fetch, code-exec, bash-tool,
text-editor, files
- Workflow: goal, routine, schedule, sandbox, team, teleport,
ultraplan, ultrareview, autofix-pr, channel
- Insight: insights, team-onboarding, agent-view, verify
Each keyword maps to either a Theme-4 kun wrapper (/batch, /cache-audit,
/memory-bridge, /sandbox, /autofix-pr) or a built-in Claude Code skill
(/schedule, /goal, /insights, /verify, /loop, /code-review). Closes the
documented gap of "user says X, kun has no route".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Six-theme sweep aligning kun with Anthropic's latest shipped surface (Claude Code, Claude API, Agent SDK as of 2026-05-24). Closes the audit gap where kun had zero first-class wrappers for prompt caching, extended thinking, the memory tool, Batch API, sandboxing, routines, autofix-pr, output styles, MCP channels, and a handful of other capabilities.
Outcome targets (track via /costs over the next 2 weeks):
Themes (one commit each)
What changed where (representative paths)
.claude/settings.json— $schema reference, redundant hooks removed (kept Notification).claude/commands/ship.md— created (chains build → check → push → PR → deploy → autofix-pr).claude/commands/{batch,cache-audit,memory-bridge,sandbox,autofix-pr}.md— new.claude/commands/{prisma,nextjs,react,tailwind,...}.md— frontmatter (name, description, model, paths, argument-hint).claude/agents/*.md— model + effort + memory + mcpServers per per-agent policy.claude/CLAUDE.md— Tier 2 split into commands vs skills; Tier 3 adds Anthropic-native vocabularyTest plan
Notes for reviewers
🤖 Generated with Claude Code