Repository navigation
Agents as a primitive kind; listing cost and budget in doctor; review fixes - #11
Merged
Merged
Conversation
A new `agent` kind: primitives/agents/<name>.yaml plus a <name>/ folder holding the author's ready claude.md and/or codex.toml. Loadouts and profiles get an `agents:` list with set semantics like skills. Kit copies the file for each harness as an owned whole file (LF), reusing the skill-directory machinery: .claude/agents/<name>.md and .codex/agents/<name>.toml, moved under ~/.claude and $CODEX_HOME in user scope. It never converts formats. Codex project agents carry an unverified gap (only $CODEX_HOME/agents has been seen loading); Cursor gets an unsupported gap. validate reports a missing folder or harness file, TOML that does not parse, a missing Codex name/description/developer_instructions and a claude.md frontmatter name that differs from the target file. Inventory lists agent files, init makes primitives/agents/, and forge and vendor refuse agents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012DwdRhzK229skW1NZca5wm
doctor now estimates what each harness lists in every session for the active
set (--loadout plus every loadout in the kit.yaml of an inspected root, user
scope included): the instruction block, each model-invocable skill and each
agent as `name: description`, at ceil(chars / 4), the method Gestalt uses.
Warehouse skills read their SKILL.md frontmatter; a plugin's skills are read
from the installed Claude Code plugin when home is a root. Skills with
disable-model-invocation: true and skills the loadout disables cost nothing.
What doctor cannot read (plugin skills it cannot see, MCP tool lists) is named
under not_measured instead of guessed. Without --loadout, a Kit-managed repo
still gets its listing cost.
A loadout or profile `budget: {tokens, skills}` (positive integers) caps the
listing; each number comes from the most specific layer or profile. Over the
strictest budget in force, doctor adds a `budget` warning naming the number
and the excess. It is never an error, so exit codes do not change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012DwdRhzK229skW1NZca5wm
From an adversarial review of this branch and of the 0.1.0 work (init, skill copying and setup steps, user scope). Each fix has a test that fails without it. - eject refused any entry whose value mentions "kitctl", so the starter loadout (whose instructions name `kitctl status`) could never be ejected. Only a JSON/TOML value that runs kitctl is a dependency now. - A malformed kit.yaml raised a ruamel traceback from status, use, off and (new on this branch) doctor; it is an EngineError with the parse error now. - Two primitives whose names end alike (acme/review, team/review) both claimed the same whole file; the second overwrote the first in one plan and the ledger recorded two owners. It is a conflict now. - A folder where Kit would write a file passed planning and failed in the middle of apply, leaving a journal that recovery could not finish. Doc now reports a non-regular target as a conflict before anything is written. - A .git folder inside a warehouse skill (a skill cloned in place) was copied, and its binary objects blocked the apply; the content hash already skips it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012DwdRhzK229skW1NZca5wm
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 35
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Two of Gestalt's upstream asks, folded into the unpublished 0.1.0 (version unchanged), plus fixes from a review of the 0.1.0 commits that CodeRabbit never covered.
agentkindprimitives/agents/<name>.yaml, plus<name>/claude.mdand/or<name>/codex.tomlrendered by the author. Loadouts and profiles list them underagents:..claude/agents/<name>.mdand.codex/agents/<name>.toml, under~with--user. They are owned whole files with LF line endings, and update, drift, conflict andoffbehave as they do for skills.unverifiedgap.unsupportedgap.initcreatesprimitives/agents/, and forge and vendor refuse agents with a clear message.Listing cost and
budgetkitctl doctorreports an estimated always-on listing cost (ceil(chars/4), the same method as Gestalt) for each harness. It counts:name: description;It doesn't count skills that run only by name or skills the loadout disables. MCP servers, and plugin skills it can't read, are listed as not measured.
budget: {tokens, skills}is a new loadout and profile field. The strictest budget across the active set produces abudgetwarning, never an error.Review fixes (each with a test that fails without the fix)
ejectrefused the starter loadout.kit.yamlcrashed status, use and off with a traceback..gitfolder inside a warehouse skill was copied.Verification
agent:linear):usewrote 14 files, including.claude/agents/linear.md,.codex/agents/linear.tomland the vendored humanizer skill.statusshowed all 18 entriesok.doctorprinted the listing cost.offleft the repo byte-identical.use, thenoff, left home byte-identical.The
docs/publishing.mdtag SHA changes to this PR's merge commit.Generated by Claude Code
Summary by CodeRabbit
kitctl doctorreports listing-cost estimates and warns when configured budgets are exceeded..githandling.