feat(caveman): minimal cave-code personality + /caveman command#23
Open
romgenie wants to merge 1 commit into
Open
feat(caveman): minimal cave-code personality + /caveman command#23romgenie wants to merge 1 commit into
romgenie wants to merge 1 commit into
Conversation
…ed skill - Register persona_caveman.mdx in promptAssets and document in prompts/README - Add caveman to PersonalityId, PERSONALITY_OPTIONS, PERSONALITY_ALIASES (cave-code) - New /caveman slash command that switches response/thinking mode for the conversation - Bundled skill builtin/caveman/SKILL.md kept aligned with the command's mode rules - --personality cave-code accepted by letta agents create Minimal scope: no clientTools suppression on the mode-switch turn — persona and skill instruct the agent not to call tools, and the persistence is left to the model. If the model misbehaves we can add enforcement in a follow-up. Refs #21. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Minimal additive variant of #19. Ships the
cave-codepersonality preset,/cavemanslash command, and bundled skill without theclientToolssuppression plumbing and without the incidental cleanups.Closes #21.
Scope
src/agent/prompts/persona_caveman.mdxandsrc/skills/builtin/caveman/SKILL.mdpersona_caveman.mdxinpromptAssets.tsand document inprompts/README.mdcavemantoPersonalityId,PERSONALITY_OPTIONS,PERSONALITY_ALIASES(cave-code), and the existing branch-based lookups inpersonality.ts(no table-lookup refactor)src/cli/commands/caveman.tswithCAVEMAN_MODES,normalizeCavemanMode,buildCavemanCommandPrompt,isCavemanCommandInput. Exports nosuppressPreparedClientToolshelper./cavemandispatch insrc/cli/App.tsxthat callsprocessConversationwith the mode-switch prompt — no new refs, noreentryOptions, no queued-approval metadata changes, no cancel-path reset/cavemanincommands/registry.tswith a plain-string handler (noCommandResulttype widening)--personalityhelp text insubcommands/agents.tsto includecave-codepersonality.test.tsadditions + focusedcaveman-command.test.ts(mode parsing, prompt building, SKILL.md example alignment, slash-command registration)Deliberately out of scope
Left for follow-up PRs so each can be reviewed on its own merits:
clientTools: []suppression on the mode-switch turn (the persona + skill + prompt already tell the agent not to call tools; only add enforcement if the model ignores the instruction in practice)personality.tsrefactor from ternary chains toPERSONA_TEMPLATE_BY_ID/HUMAN_TEMPLATE_BY_ID/PERSONA_CONTENT_OVERRIDEStablesregistry.tshandler return-type widening tostring | CommandResultbuild.jsWindowschmodSync,reconcileExistingAgentState.tsdead helper,generate-memory-viewer.tsConversationListItemtyping,runtimeDeps.test.tsdead helperSize
11 files changed, +480/-7. Net feature is 4 new files (persona, skill, command module, test file) plus small additions in 7 existing files.
Validation
bun run typecheck— cleanbun run lint— 3 pre-existing warnings on main, none from this changebun run build— cleanbun test src/tests/agent/personality.test.ts src/tests/cli/caveman-command.test.ts— 19/19 passTest plan
bun run typecheckis cleanbun run lintshows no new warningsbun run buildproduces aletta.jsthat loadsbun test src/tests/agent/personality.test.ts src/tests/cli/caveman-command.test.tsall pass/caveman,/caveman ultra,/caveman wenyan-fullall switch modes and the agent responds in the selected style; no tool calls during the switch turnletta agents create --personality cave-codecreates an agent with the caveman persona🤖 Generated with Claude Code