Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/tui/assets/skills/delegate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Do not delegate tiny one-step tasks, ambiguous product decisions, destructive op

Use `agent` for a focused child run. Launch independent children together so they can run in parallel.

Prefer provider-neutral `model_strength` over hardcoded model ids — `type: "explore"` already defaults to `model_strength: "faster"` (the cheaper same-family sibling), so for read-only exploration you can usually omit it entirely:
Prefer provider-neutral `model_strength` over hardcoded model ids. Children inherit the active model by default (`model_strength: "same"`), so pass `model_strength: "faster"` explicitly for read-only exploration that can use the cheaper same-family sibling:

```json
{
Expand Down
4 changes: 2 additions & 2 deletions crates/tui/assets/skills/feishu/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Use this skill when the user asks for Feishu, Lark, or "飞书" integration work
configured.
4. For MCP, build or configure a server that exposes narrow tools such as
`send_message`, `read_doc`, `append_sheet_row`, or `query_bitable`.
5. Register the MCP server with `deepseek mcp add`, then run
`deepseek mcp validate` and `deepseek mcp tools`.
5. Register the MCP server with `codewhale mcp add`, then run
`codewhale mcp validate` and `codewhale mcp tools`.
6. Verify with a dry run, sandbox document, or read-back call before sending
externally visible messages.

Expand Down
6 changes: 4 additions & 2 deletions crates/tui/assets/skills/fleet-manager/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ and leave a ledgered receipt or a safe escalation draft.
## Authority Boundary

- Prefer typed fleet surfaces over shell spelunking: `codewhale fleet status`,
`inspect`, `logs`, `artifacts`, `interrupt`, `restart`, `stop`, and the
Runtime API fleet endpoints.
`inspect`, `logs`, `artifacts`, `interrupt`, `restart`, `resume`, `stop`,
and the Runtime API fleet endpoints.
- Do not read `.codewhale/fleet.jsonl`, host logs, or remote files directly
unless the typed command or API is missing required evidence.
- Do not send Slack, webhook, PagerDuty, email, or chat messages unless the
Expand Down Expand Up @@ -44,6 +44,8 @@ and leave a ledgered receipt or a safe escalation draft.
conflict between artifacts and verifier.
5. Choose one typed action:
- transient and retry budget remains: `codewhale fleet restart <worker-id>`.
- stale or orphaned run with no live manager: `codewhale fleet resume
<run-id>`.
- transient but unsafe to retry: draft escalation and mark needs-human.
- task failure: preserve artifacts, summarize the failure, and avoid restart
unless the task spec says retrying can produce new evidence.
Expand Down
20 changes: 10 additions & 10 deletions crates/tui/assets/skills/mcp-builder/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ or tool integration.
default unless the server explicitly requires something else.
- Add timeouts and clear error messages around external APIs.

## DeepSeek Setup
## Codewhale Setup

Common commands:

```bash
deepseek mcp init
deepseek mcp add my-server --command node --arg server.js
deepseek mcp add remote-server --url http://127.0.0.1:3000/mcp
deepseek mcp list
deepseek mcp validate
deepseek mcp tools
codewhale mcp init
codewhale mcp add my-server --command node --arg server.js
codewhale mcp add remote-server --url http://127.0.0.1:3000/mcp
codewhale mcp list
codewhale mcp validate
codewhale mcp tools
```

HTTP/SSE entries can include per-server headers in `~/.deepseek/mcp.json` when
HTTP/SSE entries can include per-server headers in `~/.codewhale/mcp.json` when
credentials or custom routing headers are required.

## Workflow

1. Define the service boundary and the minimum useful tools.
2. Choose transport and credential handling.
3. Implement the server using a maintained MCP SDK when available.
4. Add the server with `deepseek mcp add` or edit `~/.deepseek/mcp.json`.
5. Run `deepseek mcp validate`, then `deepseek mcp tools`.
4. Add the server with `codewhale mcp add` or edit `~/.codewhale/mcp.json`.
5. Run `codewhale mcp validate`, then `codewhale mcp tools`.
6. Test one happy path and one failure path before calling it done.
2 changes: 1 addition & 1 deletion crates/tui/assets/skills/pdf/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Use this skill for any task where a PDF is the primary input or output.
watermark, redact, fill forms, encrypt/decrypt, or create.
2. Preserve originals. Write outputs with explicit names.
3. Use the most reliable available tool:
- DeepSeek's file reader for basic text extraction from PDFs
- the built-in `read_file` tool for basic text extraction from PDFs
- `pdftotext`, `pdfinfo`, `qpdf`, or `mutool` when installed
- Python libraries such as `pypdf`, `pdfplumber`, `PyMuPDF`, or
`reportlab` when available
Expand Down
49 changes: 35 additions & 14 deletions crates/tui/assets/skills/plugin-creator/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ description: Scaffold codewhale local plugin directories and activation notes. U

# Plugin Creator

Use this skill when a user wants a DeepSeek plugin scaffold or a plan for a
Use this skill when a user wants a codewhale plugin scaffold or a plan for a
plugin-style extension.

DeepSeek plugins are currently a documented packaging convention, not an
auto-loaded runtime. Be explicit about that. A plugin becomes active only when
it is referenced from a skill, hook, MCP server, or future plugin loader.
Codewhale recognizes two plugin shapes under `~/.codewhale/plugins/`. A
`plugin.toml` manifest is auto-discovered (gated by its `[when]` rules) and its
`[mcp_servers]` entries merge into MCP config while the plugin is enabled. The
`PLUGIN.md` layout scaffolded by `codewhale setup --plugins` is a packaging
convention only — it becomes active when referenced from a skill, hook, or MCP
server. Be explicit about which shape you are creating.

## Workflow

1. Pick the location:
- Global user plugin: `~/.deepseek/plugins/<plugin-name>/`
- Workspace plugin: `<workspace>/plugins/<plugin-name>/`
- User plugin (auto-discovered): `~/.codewhale/plugins/<plugin-name>/`
- Workspace folder (packaging only, not auto-discovered):
`<workspace>/plugins/<plugin-name>/`
2. Normalize names to lower-case hyphen-case.
3. Create `PLUGIN.md` with frontmatter:

Expand All @@ -32,16 +36,33 @@ status: draft
What it does, how to enable it, and any scripts or MCP servers it expects.
```

For the auto-discovered shape, create `plugin.toml` instead:

```toml
[plugin]
name = "my-plugin"
description = "What this plugin packages or enables."
version = "0.1.0"

[when]
os = ["linux", "macos", "windows"]
```

Add `[skills] path = "skills"` to bundle skills and `[mcp_servers]` entries
for MCP servers the plugin provides.

4. Add companion folders only when useful:
- `skills/` for model instructions
- `scripts/` for helpers invoked by a skill or hook
- `mcp/` for an MCP server package or config notes
- `assets/` for templates, examples, or fixtures
5. Include an activation section in `PLUGIN.md` that says exactly how the user
should turn it on today.
6. Validate by listing the created files and checking that `PLUGIN.md` has
`name` and `description` frontmatter.

Do not claim that dropping a folder into `plugins/` changes runtime behavior by
itself. If the user asks for a live plugin system, propose a loader design
separately and keep the scaffold honest.
5. Include an activation section that says exactly how the user should turn it
on today (in the `PLUGIN.md` body, or as `plugin.toml` comments).
6. Validate by listing the created files and checking that the manifest
(`PLUGIN.md` frontmatter or `plugin.toml` `[plugin]` table) has `name` and
`description`.

Dropping a `plugin.toml` folder into `~/.codewhale/plugins/` does register the
plugin and merge its enabled MCP servers; a `PLUGIN.md` folder alone changes
nothing until it is wired through a skill, hook, or MCP server. Keep the
scaffold honest about which behavior applies.
10 changes: 6 additions & 4 deletions crates/tui/assets/skills/skill-creator/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ Discovery paths, in precedence order:
- `<workspace>/.opencode/skills`
- `<workspace>/.claude/skills`
- `<workspace>/.cursor/skills`
- `<workspace>/.codewhale/skills`
- `~/.agents/skills`
- `~/.claude/skills`
- `~/.deepseek/skills`
- `~/.codewhale/skills`
- `~/.deepseek/skills` (legacy fallback)

Use skills for model instructions, workflows, and lightweight conventions. Use
MCP for live external APIs or durable tools. Use hooks for automatic local
events. Use plugin folders only as packaging/scaffolding until a real plugin
loader exists.
events. Use plugin folders to package related skills, scripts, and MCP servers
behind one `plugin.toml` manifest.

## Minimum Shape

Expand Down Expand Up @@ -85,7 +87,7 @@ plain single-line values. Use lower-case hyphen-case names.
- validation checks
- safety notes
6. Add companion files only when they reduce real complexity.
7. Validate by loading the skill through `/skills` or by running the relevant
7. Validate by loading the skill through `/skill <name>` or by running the relevant
skill discovery tests if editing this repository.

## Updating Existing Skills
Expand Down
10 changes: 5 additions & 5 deletions crates/tui/assets/skills/skill-installer/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
name: skill-installer
description: Install, update, trust, or inspect DeepSeek skills from GitHub or local skill folders. Use when the user asks for available skills or wants a community skill installed.
description: Install, update, trust, or inspect codewhale skills from GitHub or local skill folders. Use when the user asks for available skills or wants a community skill installed.
---

# Skill Installer

Use this skill when the user wants to find, install, update, trust, or remove a
DeepSeek skill.
codewhale skill.

## Commands

- List installed skills: `/skills`
- Activate a skill: `/skill <name>`
- Scaffold a new skill: `/skill new`
- Install from GitHub: `/skill install github:<owner>/<repo>`
- Update installed skills: `/skill update`
- Update an installed skill: `/skill update <name>`
- Remove a skill: `/skill uninstall <name>`
- Trust a skill for script/tool use: `/skill trust <name>`

Expand All @@ -24,13 +24,13 @@ DeepSeek skill.
- Existing local folder with `SKILL.md`
- GitHub repo or registry entry
- User request for a new skill scaffold
2. Prefer DeepSeek's native `/skill` commands over ad hoc copying.
2. Prefer the built-in `/skill` commands over ad hoc copying.
3. For GitHub/community skills, inspect the `SKILL.md` before recommending
trust. Treat scripts and companion files as untrusted until reviewed.
4. After installing, tell the user to restart the session if the skill does not
appear immediately in the available-skills list.
5. If a skill conflicts by name with a workspace skill, explain that workspace
skill directories take precedence over global `~/.deepseek/skills`.
skill directories take precedence over global `~/.codewhale/skills`.

Do not execute community skill scripts unless the user explicitly asks and the
skill has been reviewed or trusted.
2 changes: 1 addition & 1 deletion crates/tui/src/core/engine/tool_catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ pub(super) fn ensure_advanced_tooling(
catalog.push(Tool {
tool_type: Some(CODE_EXECUTION_TOOL_TYPE.to_string()),
name: CODE_EXECUTION_TOOL_NAME.to_string(),
description: "Execute Python code in a local sandboxed runtime and return stdout/stderr/return_code as JSON.".to_string(),
description: "Execute Python code with the local Python interpreter in the workspace and return stdout/stderr/return_code as JSON.".to_string(),
input_schema: json!({
"type": "object",
"properties": {
Expand Down
6 changes: 4 additions & 2 deletions crates/tui/src/prompts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ pub const NEVER_APPROVAL: &str = include_str!("prompts/approvals/never.md");
/// static system-prompt prefix (preserves DeepSeek prefix cache across
/// shell-access toggles).
pub const SHELL_POLICY_DISABLED: &str = "Shell tools unavailable. For mandatory-use items referencing \
`exec_shell`, use `code_execution` (Python sandbox). For GitHub triage, use \
`exec_shell`, use `code_execution` (local Python interpreter). For GitHub triage, use \
`github_issue_context` / `github_pr_context` as primary route.";

/// Compaction relay template — written into the system prompt so the
Expand Down Expand Up @@ -2023,7 +2023,9 @@ mod tests {

let edit = EditFileTool.description();
assert!(edit.contains("read_file"));
assert!(edit.contains("apply_patch") && edit.contains("write_file"));
// apply_patch is hidden from the pinvou3 tool surface, so edit_file
// points to write_file / repeated edits instead of referencing it.
assert!(edit.contains("write_file"));

let patch = ApplyPatchTool.description();
assert!(patch.contains("unified-diff") && patch.contains("transactional"));
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/prompts/agent.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Mode: agent

Read-only tools (reads, searches, persistent RLM session tools, git inspection) run silently.
Any write, patch, shell execution, sub-agent start, or CSV batch operation will ask for approval first.
Any write, patch, shell execution, or sub-agent start will ask for approval first.

Before requesting approval for multi-step writes, lay out your work with `work_update` so the user
can see what you intend to do and approve with context. Complex changes should also get
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/prompts/approvals/suggest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##### Approval Policy: Suggest — Tier 2 (Statute)

Read-only operations run silently. Write operations (file edits, patches, shell execution, sub-agent spawns, CSV batches) require user approval before executing.
Read-only operations run silently. Write operations (file edits, patches, shell execution, sub-agent spawns) require user approval before executing.

When you need approval:
1. For multi-step changes, lay out your approach with `work_update`.
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/prompts/modes/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You are running in Agent mode — autonomous task execution with tool access.

Read-only tools (reads, searches, RLM session tools, agent status, git inspection) run silently.
Any write, patch, shell, sub-agent open, or CSV batch asks for approval first.
Any write, patch, shell, or sub-agent open asks for approval first.

Before multi-step write approvals, lay out work with `work_update`. Use `update_plan` only for Strategy metadata, not a second checklist. Simple writes: state the edit and use normal approval.

Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/skills/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ instructions when using a specific skill.\n\n",

out.push_str(
"\n### How to use skills\n\
- Skill bodies live on disk at the listed paths. When a skill is relevant, open only that skill's `SKILL.md` and the specific companion files it references.\n\
- Skill bodies live on disk at the listed paths. When a skill is relevant, load it with the `load_skill` tool, or open only that skill's `SKILL.md` and the specific companion files it references.\n\
- Trigger rules: use a skill when the user names it (`$SkillName`, `/skill <name>`, or plain text) or the task clearly matches its description. Do not carry skills across turns unless re-mentioned.\n\
- Missing/blocked: if a named skill is missing or cannot be read, say so briefly and continue with the best fallback.\n\
- Safety: do not execute scripts from a community skill unless the user explicitly asks or the skill has been trusted for script use.\n",
Expand Down
4 changes: 2 additions & 2 deletions crates/tui/src/tools/apply_patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl ToolSpec for ApplyPatchTool {
}

fn description(&self) -> &'static str {
"Apply a unified-diff patch (multi-hunk, multi-file). Use this instead of `git apply`, `patch`, or repeated `edit_file` calls in `exec_shell` — single transactional change with fuzzy matching and a rendered diff."
"Apply a unified-diff patch (multi-hunk, multi-file). Use this instead of `git apply` or `patch` in `exec_shell`, or repeated `edit_file` calls — single transactional change with fuzzy matching and a rendered diff."
}

fn input_schema(&self) -> Value {
Expand All @@ -220,7 +220,7 @@ impl ToolSpec for ApplyPatchTool {
"properties": {
"path": {
"type": "string",
"description": "Path to the file to patch (relative to workspace)"
"description": "Path to the file to patch (relative to workspace). Required when the patch has no `---`/`+++` file headers; otherwise overrides the header path."
},
"patch": {
"type": "string",
Expand Down
6 changes: 3 additions & 3 deletions crates/tui/src/tools/automation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl ToolSpec for AutomationCreateTool {
}

fn description(&self) -> &'static str {
"Create a durable scheduled automation. Creation requires approval and recurrence is constrained to supported HOURLY/WEEKLY RRULE forms. Runs enqueue normal durable tasks."
"Create a durable scheduled automation. Creation requires approval and recurrence is constrained to supported HOURLY/WEEKLY RRULE forms. Runs enqueue normal durable tasks; runs missed while the app is not running are skipped (no backfill), and a run still queued/running blocks the next slot (no overlap)."
}

fn input_schema(&self) -> Value {
Expand All @@ -40,7 +40,7 @@ impl ToolSpec for AutomationCreateTool {
"prompt": { "type": "string" },
"rrule": {
"type": "string",
"description": "Supported: FREQ=HOURLY;INTERVAL=N[;BYDAY=MO,TU] or FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=30"
"description": "Supported forms: FREQ=HOURLY[;INTERVAL=N][;BYDAY=MO,TU][;BYHOUR=H][;BYMINUTE=M] or FREQ=WEEKLY;BYDAY=MO[,TU,...];BYHOUR=9;BYMINUTE=30 (WEEKLY requires BYDAY, BYHOUR, and BYMINUTE). Times are evaluated in the machine's local timezone."
},
"cwds": { "type": "array", "items": { "type": "string" } },
"model": { "type": "string", "description": "Model name for scheduled runs. Uses the task manager default when omitted." },
Expand Down Expand Up @@ -148,7 +148,7 @@ impl ToolSpec for AutomationReadTool {
}

fn description(&self) -> &'static str {
"Read one durable automation plus recent run records."
"Read one durable automation plus up to 20 recent run records."
}

fn input_schema(&self) -> Value {
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/tools/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl ToolSpec for DiagnosticsTool {
}

fn description(&self) -> &'static str {
"Report workspace info, git detection, sandbox availability, and Rust toolchain versions."
"Report workspace info, git detection, sandbox and bubblewrap availability, cgroup version, Rust toolchain versions, and trusted external paths."
}

fn input_schema(&self) -> Value {
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/tools/fetch_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl ToolSpec for FetchUrlTool {
}

fn description(&self) -> &'static str {
"Fetch a known URL directly (HTTP GET) and return its content. Use this instead of `curl` in `exec_shell` — sandboxed, network-policy aware, and properly decoded. Plain-text endpoints (`.md`, `.txt`, `.json`, `.yaml`, `raw.githubusercontent.com`, public APIs) prefer this over the browser/automation stack. For unknown queries, use `web_search` first."
"Fetch a known URL directly (HTTP GET) and return its content. Use this instead of `curl` in `exec_shell` (whose sandbox policy may deny outbound network) — network-policy aware and properly decoded. Plain-text endpoints (`.md`, `.txt`, `.json`, `.yaml`, `raw.githubusercontent.com`, public APIs) prefer this over the browser/automation stack. For unknown queries, use `web_search` first. Follows up to 5 redirects; non-2xx responses still return the body marked as a failure. Requests to localhost, private/loopback/link-local IPs, and cloud metadata addresses are rejected (SSRF protection)."
}

fn input_schema(&self) -> Value {
Expand Down
Loading
Loading