Skip to content

Add cave-code command and skill support#19

Open
romgenie wants to merge 9 commits into
mainfrom
cavecode-command-skill-cleanup-v13
Open

Add cave-code command and skill support#19
romgenie wants to merge 9 commits into
mainfrom
cavecode-command-skill-cleanup-v13

Conversation

@romgenie
Copy link
Copy Markdown

Summary

  • sync CompleteTech-LLC-AI-Research/letta-code main with upstream Letta through 31469dfc
  • add the cave-code persona prompt and register it as the caveman internal personality preset
  • include the cave-code bundled skill with parseable frontmatter
  • add a built-in /caveman slash command that ships with installed Letta Code
  • keep /caveman as a conversation-local mode switch and send its mode-switch request without advertised client tools
  • preserve /caveman no-tools behavior through direct reentry, manual approval-result continuations, and queued approval continuations after interrupts
  • support lite, full, ultra, wenyan-lite, wenyan-full, and wenyan-ultra as public modes, with wenyan kept as an alias for wenyan-full
  • accept cave-code as the public nickname alias for the caveman internal personality preset
  • update CLI help and personality tests for the new preset
  • address PR Add cave-code command and skill support #14/Add cave-code command and skill support #15/Add cave-code command and skill support #16/Add cave-code command and skill support #17/Add cave-code command and skill support #18 cleanup: export caveman mode rules for alignment tests, bind each SKILL.md mode example to its matching quoted example, align bundled skill examples, document persona_caveman.mdx, remove redundant human-content overrides, make the non-interactive /caveman result explicit, remove the brittle server-tool denylist from the mode-switch prompt, document advertised-tool suppression and pending-approval lifecycle, fix Windows bun run build, clear existing lint warnings, split ref lifecycle comments, and reset cancelled approval queues back to normal client-tool advertising

Validation

  • bun test src\tests\agent\personality.test.ts src\tests\cli\caveman-command.test.ts src\tests\channels\runtimeDeps.test.ts src\tests\cli\approval-recovery-wiring.test.ts
  • bun run typecheck
  • bun run lint
  • bun run build

Replaces #18.
Replaces #17.
Replaces #16.
Replaces #15.
Replaces #14.
Replaces #13.
Closes #1

Copy link
Copy Markdown
Author

@romgenie romgenie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #18 carryover is addressed:

  • pendingTranscriptStartLineIndexRef and pendingApprovalSuppressClientToolsRef each now have their own one-liner comment (src/cli/App.tsx:1197-1202), with the transcript ref described as "set at user-turn start and kept through approval reentry" and the suppression ref scoped to the requires_approval → approval-result window.
  • handleCancelApprovals explicitly resets both the ref and the queue metadata to suppressClientTools: false, and approval-recovery-wiring.test.ts pins that behavior with a new assertion.
  • The SKILL.md alignment test now requires both opening and closing quotes ("${example}"), the server-tool denylist is gone from the mode-switch prompt (test asserts server-side tools such as is absent), the non-interactive /caveman branch returns success: false with an explicit "must be used inside the interactive CLI" message, and suppressPreparedClientTools carries a comment explaining why the context snapshot is preserved.
  • Windows chmodSync in build.js, dead areToolSetsEqual dropped from reconcileExistingAgentState.ts, ConversationListItem replaces any in generate-memory-viewer.ts, and the persona_caveman.mdx row is in prompts/README.md.
  • The personality.ts refactor from ternary chains to PERSONA_TEMPLATE_BY_ID / HUMAN_TEMPLATE_BY_ID lookups with a PERSONA_CONTENT_OVERRIDES map for codex/claude is a nice cleanup and keeps the caveman wiring symmetrical with the other presets.

One small observation, not blocking:

Comment thread src/cli/App.tsx
@@ -11815,6 +11918,8 @@ ${SYSTEM_REMINDER_CLOSE}
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The queued-approval path now preserves suppressClientTools across an interrupt + new-user-message resubmission by reading from queuedApprovalMetadataRef. That's correct as a preservation of state, but it does mean: if a /caveman turn ever reached requires_approval and the user interrupted with a fresh regular message, that fresh message's turn would inherit the suppression flag and be sent with clientTools: [].

In practice this can't happen — /caveman submits with empty clientTools, so the agent has no client-side tools to request approval for, and server-side tools don't route through this approval path. So this is preserving correctness for a case that shouldn't arise rather than a live bug.

If you ever widen suppressClientTools to a mode that can legitimately trigger approvals, this branch will silently extend the suppression into the interrupting message. Worth a short comment near suppressClientToolsForSubmission = queuedSuppressClientTools; that the flag intentionally rides along with the queued continuation — or, if you prefer, gating the carry-over on initialInput.length === 1 (queued-only, no user message appended) so a new user message always starts fresh. Either one is fine; happy to leave as-is.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f54f3cd7ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli/App.tsx
Comment on lines +12317 to +12319
allowReentry: true,
suppressClientTools: pendingApprovalSuppressClientToolsRef.current,
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve tool suppression when resuming restored approvals

This continuation path reads pendingApprovalSuppressClientToolsRef.current, but restored approval flows (recoverRestoredPendingApprovals) never initialize that ref from the restored batch before users continue approvals. In a resumed conversation where pending approvals originated from a /caveman mode-switch turn, this call can send suppressClientTools: false and re-advertise client tools, letting the model invoke tools during a continuation that should remain tool-suppressed. Please carry suppression metadata through restored approval recovery (or pass it explicitly) before this reentry call.

Useful? React with 👍 / 👎.

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.

Add cave_code caveman personality preset

1 participant