Skip to content

feat(caveman): minimal cave-code personality + /caveman command#23

Open
romgenie wants to merge 1 commit into
mainfrom
cave-code-minimal
Open

feat(caveman): minimal cave-code personality + /caveman command#23
romgenie wants to merge 1 commit into
mainfrom
cave-code-minimal

Conversation

@romgenie
Copy link
Copy Markdown

Summary

Minimal additive variant of #19. Ships the cave-code personality preset, /caveman slash command, and bundled skill without the clientTools suppression plumbing and without the incidental cleanups.

Closes #21.

Scope

  • New src/agent/prompts/persona_caveman.mdx and src/skills/builtin/caveman/SKILL.md
  • Register persona_caveman.mdx in promptAssets.ts and document in prompts/README.md
  • Add caveman to PersonalityId, PERSONALITY_OPTIONS, PERSONALITY_ALIASES (cave-code), and the existing branch-based lookups in personality.ts (no table-lookup refactor)
  • New src/cli/commands/caveman.ts with CAVEMAN_MODES, normalizeCavemanMode, buildCavemanCommandPrompt, isCavemanCommandInput. Exports no suppressPreparedClientTools helper.
  • /caveman dispatch in src/cli/App.tsx that calls processConversation with the mode-switch prompt — no new refs, no reentryOptions, no queued-approval metadata changes, no cancel-path reset
  • Register /caveman in commands/registry.ts with a plain-string handler (no CommandResult type widening)
  • Update --personality help text in subcommands/agents.ts to include cave-code
  • personality.test.ts additions + focused caveman-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:

  • Hard 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.ts refactor from ternary chains to PERSONA_TEMPLATE_BY_ID / HUMAN_TEMPLATE_BY_ID / PERSONA_CONTENT_OVERRIDES tables
  • registry.ts handler return-type widening to string | CommandResult
  • Incidental cleanups bundled into Add cave-code command and skill support #19: build.js Windows chmodSync, reconcileExistingAgentState.ts dead helper, generate-memory-viewer.ts ConversationListItem typing, runtimeDeps.test.ts dead helper

Size

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 — clean
  • bun run lint — 3 pre-existing warnings on main, none from this change
  • bun run build — clean
  • bun test src/tests/agent/personality.test.ts src/tests/cli/caveman-command.test.ts — 19/19 pass

Test plan

  • bun run typecheck is clean
  • bun run lint shows no new warnings
  • bun run build produces a letta.js that loads
  • bun test src/tests/agent/personality.test.ts src/tests/cli/caveman-command.test.ts all pass
  • Interactive smoke test: /caveman, /caveman ultra, /caveman wenyan-full all switch modes and the agent responds in the selected style; no tool calls during the switch turn
  • letta agents create --personality cave-code creates an agent with the caveman persona

🤖 Generated with Claude Code

…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>
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.

Minimal cave-code personality + /caveman command (no tool suppression)

1 participant