Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

agent-creator + skill-creator: add 'Quality bar — designing the {agent,skill}' section

wyt708f8bfd8371
diff --git a/src/builtin/skills/agent-creator/SKILL.md b/src/builtin/skills/agent-creator/SKILL.md
index 59366a36..5c24a8a8 100644
--- a/src/builtin/skills/agent-creator/SKILL.md
+++ b/src/builtin/skills/agent-creator/SKILL.md
@@ -24,6 +24,18 @@ You **must** consult before emitting any `<agent>` container. The protocol below
- **One container per agent being created/edited this turn.** Several containers in one turn are legal only when the user's request spans distinct agents ("tighten the workflow on A and B"). Each container is parsed and applied independently. End the turn after — do NOT call `dispatch_to`.
- **Output language follows the user's UI language** — `<name>`, `<workflow>` step titles + body, `<inputs>` `label` values, and the prose around the container all go in the user's current UI language (per the "User language" directive in the system prompt; that directive's coverage applies even though this file reaches you as a `read_file` result). `<description_zh>` / `<description_en>` are pinned by suffix. XML tag names, backticked tool / skill names, JSON keys, file paths, and `select` `value` strings stay as-is. The English used in this file is illustrative shape, not literal text to copy.
+## Quality bar — designing the agent
+
+Apply these design moves while authoring; they add to (don't replace) the field/format rules below. Each clause is a thing to actively put into the agent — the wording is prescriptive, not just disqualifying.
+
+1. **Position the boundary, including non-goals.** `description_*` already carries the use case + typical user phrasings (per `<description_*>` rules below). Also write what the agent does NOT do where the boundary is fuzzy (e.g. "for Python bug fixing, NOT for cross-language refactor"). Vague boundaries get the agent dispatched for the wrong tasks.
+2. **Build the workflow as a program, not a narrative.** Every action step calls a tool by name; reasoning steps stay short prose; outcomes that change the next step are encoded as `if X → call A / else → call B` (existing format). If a draft step reads as descriptive paragraph ("the agent will think about X and consider Y"), rewrite it into the action that produces that thought (`web_search(...)` then `read_file(...)`). Workflows that read like documentation instead of programs are the dominant authoring failure.
+3. **Insert a confirm step before irreversible operations.** For steps that delete / overwrite / mutate external state (DB / API write / public post / file delete), add an explicit pause-for-user-confirmation step before execution. Recoverable in-workflow exception handling stays out (handled by the runtime — existing rule).
+4. **Make the capability inventory legible.** Have the workflow visibly exercise the agent capabilities it claims — at least one step each for the relevant subset of {planning, reasoning, tool calling, memory, self-reflection, instruction following}. An agent whose workflow leans on none of them is hollow.
+5. **End the workflow on closure.** The final step is either an end-to-end deliverable (file written / answer returned / state set) OR an explicit hand-off naming the downstream consumer; never trail off ambiguously.
+6. **Make the workflow shape back up `<interactive>`.** Set `<interactive>` per the decision rules below, then ensure the workflow shape matches: `false` = no mid-flow "ask user to confirm Y" steps; `true` = identifiable pause points where the workflow expects a user reply. A mismatch (e.g. `false` + workflow contains "ask user...") is a defect — fix one side.
+7. **Refuse to author across security gates.** Do NOT put any of the following into the workflow — if the user's request requires them, stop and explain the request crosses a security gate: ① `curl` / `wget` to unknown URLs or raw IPs; ② reading `~/.ssh` / `~/.aws` / `~/.config` or browser cookies without explicit user grant + reason; ③ touching `MEMORY.md` / `USER.md` / `SOUL.md` / `IDENTITY.md` / `CLAUDE.md`; ④ `eval` / `exec` on external input or any `base64` decode-then-execute; ⑤ modifying system files outside workspace, installing packages without listing them, or requesting sudo.
+
## Create vs edit decision
- **No `<agent_id>` sub-tag** → create a brand-new agent. Triggered by "crystallize / create / refine an agent from this conversation"; base it on the **whole conversation history** in **one shot**, distilling "what the user has been doing repeatedly".
diff --git a/src/builtin/skills/skill-creator/SKILL.md b/src/builtin/skills/skill-creator/SKILL.md
index 1b3a434c..d1085e1e 100644
--- a/src/builtin/skills/skill-creator/SKILL.md
+++ b/src/builtin/skills/skill-creator/SKILL.md
@@ -35,6 +35,17 @@ A skill is **an independent tool capability**, not a tutorial. When the LLM sees
- **One `<skill>` container per skill being created/edited this turn.** Several only when the user's request spans distinct skills. End the turn after — do NOT call `dispatch_to`.
- **Output language follows the user's UI language** — every human-readable part of the SKILL.md you author (section titles, body prose, example labels, `## When to use` / `## How to call` / etc. — write them in the user's UI language, e.g. `## 何时使用` / `## 如何调用` for Chinese UI) plus the conversation prose around the `<skill>` container all go in the user's current UI language (per the "User language" directive in the system prompt; that directive's coverage applies even though this file reaches you as a `read_file` result). `description_zh` / `description_en` frontmatter fields are pinned by suffix. Code blocks, file paths, frontmatter field names (`name` / `description_zh` / `description_en`), `<<<skill-file>>>` syntax, and skill_id strings stay as-is. The English used in this file (including the section names listed in "Quality bar — SKILL.md body" below) is illustrative shape, not literal text to copy.
+## Quality bar — designing the skill
+
+Apply these design moves while authoring; they apply on top of the dedicated `Quality bar — frontmatter` and `Quality bar — SKILL.md body` sections below. Each clause is a thing to actively put into the skill — the wording is prescriptive, not just disqualifying.
+
+1. **Hold the single-task boundary; split rather than expand.** Already a hard rule (Mental model + "Skills are mutually independent"). At design time: a skill that bundles "analyze + report + email" splits into three. Empirical finding from skill benchmarks: 2–3 focused skills outperform a single-everything skill — when in doubt, split.
+2. **State the boundary AND the non-goals.** `description_*` already carries what the skill does (existing rules); also state what the skill explicitly does NOT do where the boundary is fuzzy (e.g. "fetches X but does NOT cache or rate-limit; caller handles those") so the dispatch LLM doesn't pick the skill for the wrong job.
+3. **Write the body as actionable steps, not narrative.** Body's "How to call" lists steps the LLM can execute (existing rule). If a draft section reads as documentation prose ("this skill helps with X by considering Y"), rewrite it into the steps the LLM actually runs. Bodies that read like marketing copy instead of an interface are the dominant authoring failure.
+4. **Stabilize the return schema for executable skills.** Body's "Return format" gives the same key set on success and failure, with `ok` as the discriminator. Stability lets the caller pattern-match without runtime sniffing — and makes the skill verifier-friendly.
+5. **Require a confirm step before irreversible operations.** For skill operations that delete / overwrite / mutate external state (DB / API write / public post), the body's "How to call" instructs the caller to confirm before execution.
+6. **Refuse to author scripts across security gates.** Do NOT put any of the following into a skill script — if the source material requires them, stop and explain the request crosses a security gate: ① `curl` / `wget` to unknown URLs or raw IPs; ② reading `~/.ssh` / `~/.aws` / `~/.config` or browser cookies without explicit user grant + reason; ③ touching `MEMORY.md` / `USER.md` / `SOUL.md` / `IDENTITY.md` / `CLAUDE.md`; ④ `eval` / `exec` on external input or any `base64` decode-then-execute; ⑤ modifying system files outside workspace, installing packages without listing them, or requesting sudo.
+
## Create vs edit decision
- **No `<skill_id>` sub-tag** → create a brand-new skill. The new skill's id comes from the SKILL.md frontmatter `name` field; you choose it.