Skip to content

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

@romgenie

Description

@romgenie

Goal

Ship the cave-code personality preset, /caveman slash command, and bundled skill as a minimal additive PR. Treat the hard clientTools suppression path in #19 as a separate follow-up that can be added if the persona alone proves insufficient to stop tool calls on the mode-switch turn.

Scope (what's in)

  • src/agent/prompts/persona_caveman.mdx
  • src/skills/builtin/caveman/SKILL.md
  • Register the new prompt in src/agent/promptAssets.ts, document in src/agent/prompts/README.md
  • Add caveman to PersonalityId, PERSONALITY_OPTIONS, PERSONALITY_ALIASES (cave-code), and the existing content/human/block-definition branches in src/agent/personality.ts (no table-lookup refactor — minimal branches only)
  • New src/cli/commands/caveman.ts with CAVEMAN_MODES, normalizeCavemanMode, buildCavemanCommandPrompt, isCavemanCommandInput. Does not export suppressPreparedClientTools.
  • /caveman dispatch in src/cli/App.tsx that calls processConversation with the mode-switch prompt. No new refs, no queued-approval metadata changes, no approval-cancel reset.
  • Register /caveman in src/cli/commands/registry.ts with a plain string output for non-interactive use (no CommandResult type change).
  • Update --personality help in src/cli/subcommands/agents.ts to list cave-code.
  • Tests: personality.test.ts additions for the new preset + a focused caveman-command.test.ts that covers mode parsing, prompt building, and SKILL.md example alignment.

Scope (what's out — defer as separate PRs if needed)

  • Hard clientTools: [] suppression during the mode-switch turn (pending-approval metadata, cancel-path reset, suppressPreparedClientTools). The persona + skill + prompt already instruct the agent not to call tools; only add enforcement if we observe the model calling tools on the switch turn anyway.
  • 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.
  • Unrelated cleanups bundled into Add cave-code command and skill support #19: build.js Windows chmodSync fix, reconcileExistingAgentState.ts dead areToolSetsEqual, generate-memory-viewer.ts ConversationListItem typing, runtimeDeps.test.ts dead helper.

Tradeoff

Without clientTools suppression, the agent could occasionally attempt a tool call on the /caveman turn despite the persona telling it not to. If this happens in practice, open a follow-up adding the suppression plumbing.

Validation

  • bun run typecheck
  • bun run lint
  • bun run build
  • bun test src/tests/agent/personality.test.ts src/tests/cli/caveman-command.test.ts

Related: #19 (larger variant — replaces #13#18).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions