JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix(skills): replace the built-in teamskill-creator with the swarmskill-creator
z2tngd2d909e2b577
diff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/SKILL.md b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/SKILL.mdsimilarity index 86%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/SKILL.mdrename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/SKILL.mdindex 849c6b98e7..296592ad1d 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/SKILL.md+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/SKILL.md@@ -1,15 +1,15 @@----name: teamskill-creator+name: swarmskill-creatordescription: |- Creates, converts, or modifies Teamskills — the multi-role extension of the Skills standard (specialized roles + workflow + bind constraints).+ Creates, converts, or modifies Swarm Skills — the multi-role extension of the Skills standard (specialized roles + workflow + bind constraints).Use when the user wants to author a multi-role agent team, convert a single-agent skill into one, or refactor an existing team.Do NOT use for single-agent Skills — use create-skill instead.version: "0.2"----# Teamskill Creator+# Swarm Skill Creator-Authoring tool for Teamskills — the multi-role extension of the Anthropic Skills standard. Encodes the Teamskill spec into a repeatable workflow with templates, decision trees, and an automated validator.+Authoring tool for Swarm Skills — the multi-role extension of the Anthropic Skills standard. Encodes the Swarm Skill spec into a repeatable workflow with templates, decision trees, and an automated validator.## Workflow@@ -17,23 +17,23 @@ This skill has **three modes**. Pick one based on the user's request, then follo| Mode | Trigger | Output ||---|---|---|-| **CREATE** | User has a fresh need ("build a team for X") | New `<teamskill-name>/` directory with the full 5-file set |-| **CONVERT** | User points at an existing single-agent skill | Transformed `<teamskill-name>/` directory + a delta report explaining what the team adds |-| **MODIFY** | User edits an existing Teamskill (add/remove role, change workflow, adjust bind, fix validator errors) | Updated files in the existing `<teamskill-name>/` directory |+| **CREATE** | User has a fresh need ("build a team for X") | New `<swarmskill-name>/` directory with the full 5-file set |+| **CONVERT** | User points at an existing single-agent skill | Transformed `<swarmskill-name>/` directory + a delta report explaining what the team adds |+| **MODIFY** | User edits an existing Swarm Skill (add/remove role, change workflow, adjust bind, fix validator errors) | Updated files in the existing `<swarmskill-name>/` directory |> **All three modes share Stages 2–6**. CONVERT differs only in Stage 1 (decomposition replaces fresh design). MODIFY skips Stage 0 and Stage 1 (justification and pattern are already settled — re-open them only if the change alters the pattern, e.g. adding a parallel role to a pipeline team), touches only the affected stages in 2–5, and **MUST run Stage 6 (validator) — this is the most-skipped, most-critical step in MODIFY mode**. See the [MODIFY impact matrix](#modify-impact-matrix) for which stages to re-run per change type.-### Stage 0: Triage — is a Teamskill even justified?+### Stage 0: Triage — is a Swarm Skill even justified?-A Teamskill is **only justified** when at least one of these is true:+A Swarm Skill is **only justified** when at least one of these is true:1. **Adversarial blind spot** — a single agent role-playing N personas produces converging outputs because it cannot escape its own analytical priors. Examples: PR review, security audit, design critique.2. **Parallel decomposition gain** — N independent sub-tasks can run concurrently and the integration is non-trivial. Examples: multi-angle research, multi-perspective due diligence.3. **Specialization pipeline with hard handoffs** — sequential stages with quality gates where blurring stage boundaries causes regressions. Examples: marketing copy (brief → draft → edit → audit), incident response (declare → triage → mitigate → postmortem).-**If none apply → STOP. Recommend a single-agent skill instead.** Teamskills cost more tokens, more wall-clock, and more authoring overhead. Do not build one out of novelty.+**If none apply → STOP. Recommend a single-agent skill instead.** Swarm Skills cost more tokens, more wall-clock, and more authoring overhead. Do not build one out of novelty.-Ask the user: *"Which of these failure modes does a single agent hit on this task today?"* If they cannot answer, the Teamskill is premature.+Ask the user: *"Which of these failure modes does a single agent hit on this task today?"* If they cannot answer, the Swarm Skill is premature.### Stage 1a (CREATE only): Pattern selection@@ -53,10 +53,10 @@ Read [reference/pattern-selection.md](reference/pattern-selection.md) before comRead the source SKILL.md and identify natural role boundaries. Use this checklist:-1. **Find embedded personas** — does the skill ask one agent to "act as" multiple roles (e.g., "Persona 1: Saboteur / Persona 2: New Hire / Persona 3: Security Auditor")? Each embedded persona is a Teamskill role candidate.+1. **Find embedded personas** — does the skill ask one agent to "act as" multiple roles (e.g., "Persona 1: Saboteur / Persona 2: New Hire / Persona 3: Security Auditor")? Each embedded persona is a Swarm Skill role candidate.2. **Find sequential stages with quality gates** — does the skill have phases like "first do X, then validate Y, then produce Z"? Each phase is a pipeline stage candidate.3. **Find checklists that branch by category** — a checklist like "[ ] security [ ] performance [ ] readability" is parallel-decomposition fuel.-4. **Identify what's lost in single-agent form** — the answer becomes the Teamskill's "why" (the Stage 0 justification). If you cannot articulate this, the conversion is not worth it.+4. **Identify what's lost in single-agent form** — the answer becomes the Swarm Skill's "why" (the Stage 0 justification). If you cannot articulate this, the conversion is not worth it.Full conversion methodology: [reference/conversion-guide.md](reference/conversion-guide.md).@@ -69,7 +69,7 @@ Default role counts by pattern (soft heuristics, not hard limits — see [refere- **C. Specialization pipeline**: 3–5 stages- **Mixed (A+B / A+C)**: 4–6 roles total-If you need more, prefer splitting into multiple sequential Teamskills over one mega-team.+If you need more, prefer splitting into multiple sequential Swarm Skills over one mega-swarm.For each role, write 5 mandatory sections:@@ -93,7 +93,7 @@ After all role files are written, automatically match each role with locally ava- **System prompt / context injection**: many frameworks inject an `available_skills` list at startup — this is the most reliable source.- **Workspace-level convention scan**: glob for `**/SKILL.md` under known skill directories.- **CLI query**: if the framework provides a skill listing command (e.g., `npx skills list -g`), use it.- - **Do NOT hardcode paths for a specific framework** — the Teamskill spec is framework-agnostic.+ - **Do NOT hardcode paths for a specific framework** — the Swarm Skill spec is framework-agnostic.2. **Scan local tools** — probe CLI tools available in the current environment (e.g., `gh`, `python`, `rg`, `jq`, `curl`, `docker`). Use `where` (Windows) or `which` (Unix).3. **Match and assign** — for each role, read its `purpose`, `Success Criteria`, and `Boundary`. Evaluate whether any discovered skill/tool would materially help fulfil the role's purpose (a match = removing it would force the role into a significantly weaker operating mode). Assign matches to the correct field with `source: local` in `dependencies.yaml`.@@ -131,7 +131,7 @@ The remaining two files. Write them last because they reference content produced**5b. `SKILL.md`** — use [templates/SKILL.md.template](templates/SKILL.md.template). This is the entry point that ties together all other files. Body MUST contain `## Workflow` + `## Roles` + `## Files`.**Naming rules** (enforced by the validator):-- Directory name = `name` field in SKILL.md frontmatter (kebab-case, ends with `-team` by convention).+- Directory name = `name` field in SKILL.md frontmatter (kebab-case, ends with `-swarm` by convention).- Each `roles/<id>.md` filename MUST equal the corresponding `roles[].id` in SKILL.md frontmatter.- All 5 files are mandatory (the validator fails on any missing file).@@ -143,35 +143,35 @@ The remaining two files. Write them last because they reference content produced- NO Stage 0 justification rationale → that belongs in the body's intro paragraph.- Per-role `purpose:` field has a ≤150 char HARD CAP. Detail belongs in `roles/<id>.md`, not in SKILL.md frontmatter.-**Calibration benchmark**: aim for **≤ 500 chars** (platform hard cap: 1024). Teamskills are inherently more complex than single-agent skills — multi-role composition, workflow scope, and trigger scenarios may need more words. Stay concise, but don't sacrifice clarity for arbitrary brevity.+**Calibration benchmark**: aim for **≤ 500 chars** (platform hard cap: 1024). Swarm Skills are inherently more complex than single-agent skills — multi-role composition, workflow scope, and trigger scenarios may need more words. Stay concise, but don't sacrifice clarity for arbitrary brevity.### Stage 6: ValidateRun the automated validator:```bash-python scripts/validate_teamskill.py path/to/<teamskill-name>/+python scripts/validate_swarmskill.py path/to/<swarmskill-name>/```The validator checks:- **Structural**: 5 files present, role file names match `roles[].id`, no orphan role files-- **Frontmatter**: `name` / `description` / `version` / `kind: team-skill` / `roles[]` present; each role has `id` + `purpose`; `name` == directory name+- **Frontmatter**: `name` / `description` / `version` / `kind: swarm-skill` / `roles[]` present; each role has `id` + `purpose`; `name` == directory name- **Section presence**: SKILL.md body has `## Workflow` / `## Roles` / `## Files`; each `roles/*.md` has all 5 mandatory sections; `workflow.md` has `## Overview` / `## Detailed Steps` / `## Acceptance Criteria` (and at least one mermaid block); `bind.md` has all 3 mandatory sections- **Cross-file consistency**: every `roles[].skills` and `roles[].tools` in SKILL.md appears in `dependencies.yaml`; every `## Identity` in roles starts with a `> *"..."*` motto line- **Output discipline**: `## Inline Persona for Teammate` present in each role file; `dependencies.yaml` skills/tools segments present even if empty**Exit code 0 = compliant**. Non-zero exit prints the failing checks with file:line references.-The manual checklist (for design-time judgment calls the script cannot automate, like "is this content really redundant?") lives in [reference/compliance-checklist.md](reference/compliance-checklist.md). Read it before declaring the Teamskill done.+The manual checklist (for design-time judgment calls the script cannot automate, like "is this content really redundant?") lives in [reference/compliance-checklist.md](reference/compliance-checklist.md). Read it before declaring the Swarm Skill done.### Post-generation: Creation Summary + Community Enrichment-After Stage 6 passes, present a **creation summary** to the user. This is the natural point to assess capability coverage and offer community enrichment — the Teamskill is already complete and functional, so community search is a zero-risk enhancement.+After Stage 6 passes, present a **creation summary** to the user. This is the natural point to assess capability coverage and offer community enrichment — the Swarm Skill is already complete and functional, so community search is a zero-risk enhancement.**Summary format:**```-Teamskill: <name>+Swarm Skill: <name>Pattern: <A | B | C | Mixed>Roles: <count> (<list of role ids>)Validator: PASS@@ -199,7 +199,7 @@ The default must be **recommend**, with the burden of proof on **not** recommend> **Anti-pattern: "通用即覆盖" (generic = covered)**>-> In `ecommerce-compare-debate-team`, three platform shopper roles (`taobao-shopper`, `pinduoduo-shopper`, `jingdong-shopper`) each had `web-research` assigned. The agent concluded "already covered — no community search needed." This is wrong: `web-research` is general-purpose retrieval; it knows nothing about Taobao store tiers, PDD subsidy eligibility, or JD self-operated logistics. Community registries carry platform-specific shopping and buyer-agent skills that fill exactly this gap.+> In `ecommerce-compare-debate-swarm`, three platform shopper roles (`taobao-shopper`, `pinduoduo-shopper`, `jingdong-shopper`) each had `web-research` assigned. The agent concluded "already covered — no community search needed." This is wrong: `web-research` is general-purpose retrieval; it knows nothing about Taobao store tiers, PDD subsidy eligibility, or JD self-operated logistics. Community registries carry platform-specific shopping and buyer-agent skills that fill exactly this gap.>> **Rule**: if a role's identity is tied to a specific platform or professional domain, a generic utility skill does NOT count as coverage — always recommend community search for domain-specific skills.@@ -218,7 +218,7 @@ If one or more roles are marked "Recommend: Yes", ask:> *"The following roles have no domain-specific skills and could benefit from community skill enhancement:*> *[table: Role | Current skills (if any) | What domain-specific skill would help]*-> *Shall I search community skill registries? The Teamskill is already complete — this is an optional enhancement. (Y/N)"*+> *Shall I search community skill registries? The Swarm Skill is already complete — this is an optional enhancement. (Y/N)"*If user says **Yes**:@@ -233,9 +233,9 @@ Read [reference/community-search.md](reference/community-search.md) and follow i4. **Role-skill fit test** — verify capability match and run the removal test: "would removing this skill significantly degrade the role's output?" (see §4).5. **Present enrichment summary** to the user with the standardized format (see §5) — full transparency on what was searched, found, selected, and rejected.6. Install approved skills, update `roles[].skills` in SKILL.md frontmatter + `dependencies.yaml` with `source: <community-url>`.-7. Re-run `python scripts/validate_teamskill.py` to confirm consistency.+7. Re-run `python scripts/validate_swarmskill.py` to confirm consistency.-If user says **No** → done. The Teamskill is fully functional as-is.+If user says **No** → done. The Swarm Skill is fully functional as-is.**Decision rules:**- **Default: recommend** — empty `skills: []` = recommend community search; **also recommend** when a role only has generic utility skills (e.g. `web-research`) but lacks domain-specific skills matching its identity. Burden of proof is on NOT recommending.@@ -246,7 +246,7 @@ If user says **No** → done. The Teamskill is fully functional as-is.## Roles-This skill has no Teamskill roles itself — it is a **single-agent skill** that authors Teamskills. The agent loading this skill plays the author/architect role.+This skill has no Swarm Skill roles itself — it is a **single-agent skill** that authors Swarm Skills. The agent loading this skill plays the author/architect role.## Files@@ -254,11 +254,11 @@ This skill has no Teamskill roles itself — it is a **single-agent skill** that|---|---|---|| [reference/pattern-selection.md](reference/pattern-selection.md) | A/B/C/Mixed pattern decision tree with worked examples | Stage 1a (before committing to a pattern) || [reference/role-design.md](reference/role-design.md) | How to author the 5 mandatory role sections; gate design between stages; anti-convergence techniques | Stage 2 + Stage 3 |-| [reference/conversion-guide.md](reference/conversion-guide.md) | Step-by-step methodology for converting a single-agent skill into a Teamskill, with a worked example | Stage 1b (CONVERT mode only) |+| [reference/conversion-guide.md](reference/conversion-guide.md) | Step-by-step methodology for converting a single-agent skill into a Swarm Skill, with a worked example | Stage 1b (CONVERT mode only) || [reference/compliance-checklist.md](reference/compliance-checklist.md) | Responsibility-attribution tests + manual-review checklist; explains what the validator can and cannot catch | Stage 6 (after the script passes) || [reference/community-search.md](reference/community-search.md) | Multi-source search strategy (keyword derivation, quality gates, role-skill fit test) for finding community skills | Post-generation (community enrichment step) || [templates/](templates/) | 5 file skeletons with placeholders and inline guidance comments | Stages 2–5 (each stage references its template) |-| [scripts/validate_teamskill.py](scripts/validate_teamskill.py) | Automated structural + frontmatter + section + cross-file consistency checks | Stage 6 (run on every Teamskill before declaring done) |+| [scripts/validate_swarmskill.py](scripts/validate_swarmskill.py) | Automated structural + frontmatter + section + cross-file consistency checks | Stage 6 (run on every Swarm Skill before declaring done) |## Common pitfalls@@ -282,7 +282,7 @@ For a CREATE request:2. Read [reference/pattern-selection.md](reference/pattern-selection.md) and pick A / B / C / mixed3. Write all `roles/<id>.md` files (motto, boundary, schema, inline persona) + auto-match local skills/tools4. Write `workflow.md` → `bind.md` → `dependencies.yaml` → `SKILL.md` (each using its template)-5. Run `python scripts/validate_teamskill.py <teamskill-name>/` until exit 0+5. Run `python scripts/validate_swarmskill.py <swarmskill-name>/` until exit 06. Present creation summary with per-role capability coverage → recommend community search for roles lacking **domain-specific** skills (default: recommend; generic utility skills do NOT satisfy the threshold)7. Manual review with [reference/compliance-checklist.md](reference/compliance-checklist.md)@@ -292,13 +292,13 @@ For a CONVERT request:2. Apply [reference/conversion-guide.md](reference/conversion-guide.md) decomposition checklist3. Articulate "what is lost in single-agent form" — this is the Stage 0 justification4. Continue from CREATE step 2 (pattern selection) onward-5. Add a `MIGRATION.md` (optional) to the new Teamskill explaining the source skill, the decomposition rationale, and the team-vs-single delta+5. Add a `MIGRATION.md` (optional) to the new Swarm Skill explaining the source skill, the decomposition rationale, and the team-vs-single deltaFor a MODIFY request:1. Identify the change type from the impact matrix below2. Re-run the indicated stages; apply edits honoring the section + structure rules (mottos, Forbidden+Mandatory, Inline Persona, gates, numeric bind constraints)-3. Run `python scripts/validate_teamskill.py <teamskill-name>/` — **Stage 6 is mandatory regardless of edit size**+3. Run `python scripts/validate_swarmskill.py <swarmskill-name>/` — **Stage 6 is mandatory regardless of edit size**#### MODIFY impact matrixdiff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/community-search.md b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/community-search.mdsimilarity index 97%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/community-search.mdrename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/community-search.mdindex 2ac8c26ecf..1464d0badd 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/community-search.md+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/community-search.md@@ -1,6 +1,6 @@# Community Skill Search Guide-How to find, evaluate, and install community skills for Teamskill roles. Read this file when executing the Post-generation community enrichment step.+How to find, evaluate, and install community skills for Swarm Skill roles. Read this file when executing the Post-generation community enrichment step.## 1. Keyword Derivation@@ -75,7 +75,7 @@ When CLI + web search return no good matches, browse these human-curated lists:|---|---|---|| **awesome-agent-skills** | [github.com/heilcheng/awesome-agent-skills](https://github.com/heilcheng/awesome-agent-skills) | Cross-agent (Claude, Cursor, Copilot), tutorials + directories || **awesome-claude-skills** | [github.com/ComposioHQ/awesome-claude-skills](https://github.com/ComposioHQ/awesome-claude-skills) | Claude ecosystem deep-dive |-| **Antigravity awesome-skills** | [github.com/antigravity-ai/awesome-skills](https://github.com/antigravity-ai/awesome-skills) | 1200+ skills organized by **role bundles** (Web Wizard, Security Engineer, etc.) — particularly useful for Teamskill roles since the bundles map to role archetypes |+| **Antigravity awesome-skills** | [github.com/antigravity-ai/awesome-skills](https://github.com/antigravity-ai/awesome-skills) | 1200+ skills organized by **role bundles** (Web Wizard, Security Engineer, etc.) — particularly useful for Swarm Skill roles since the bundles map to role archetypes |### Search procedure (step by step)diff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/compliance-checklist.md b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/compliance-checklist.mdsimilarity index 88%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/compliance-checklist.mdrename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/compliance-checklist.mdindex 99b073f13a..21a5488e9c 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/compliance-checklist.md+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/compliance-checklist.md@@ -6,7 +6,7 @@The validator handles:- Five-file structure (SKILL.md / roles/ / workflow.md / bind.md / dependencies.yaml)-- Frontmatter required fields (`name`, `description`, `version`, `kind: team-skill`, `roles[]`)+- Frontmatter required fields (`name`, `description`, `version`, `kind: swarm-skill`, `roles[]`)- Each `roles[].id` has matching `roles/<id>.md`- Each role file has the 5 mandatory sections- Each Identity starts with `> *"..."*`@@ -33,11 +33,11 @@ Before declaring two things "redundant", verify their **consumers and timing** a### Test 2 — Registry / store concern?-If the candidate field is about discovery, recommendation, download counts, tier, popularity → **registry concern, not Teamskill spec**. Examples: `tier`, `downloads`, `category` for browsing.+If the candidate field is about discovery, recommendation, download counts, tier, popularity → **registry concern, not Swarm Skill spec**. Examples: `tier`, `downloads`, `category` for browsing.### Test 3 — Runtime / framework concern?-If the candidate field is about how the framework wires dependencies, dispatches teammates, or implements messaging → **framework concern, not Teamskill spec**. Examples: `teammate_mode`, `install_command`, message format. The Teamskill MAY declare a **preference order** for inter-member communication (e.g., direct peer-to-peer > shared blackboard > Leader-relay), but MUST NOT mandate a specific mechanism.+If the candidate field is about how the framework wires dependencies, dispatches teammates, or implements messaging → **framework concern, not Swarm Skill spec**. Examples: `teammate_mode`, `install_command`, message format. The Swarm Skill MAY declare a **preference order** for inter-member communication (e.g., direct peer-to-peer > shared blackboard > Leader-relay), but MUST NOT mandate a specific mechanism.### Test 4 — Tutorial / docs concern?@@ -150,17 +150,17 @@ A description that omits "when not to use" causes the skill to over-trigger. A d----## Part C: Cross-Teamskill consistency (only when publishing multiple together)+## Part C: Cross-Swarm-Skill consistency (only when publishing multiple together)-When publishing a batch of Teamskills as a coherent set:+When publishing a batch of Swarm Skills as a coherent set:-- [ ] Naming convention: all Teamskills end with `-team` suffix+- [ ] Naming convention: all Swarm Skills end with `-swarm` suffix- [ ] Frontmatter `version` consistent across the batch- [ ] Description structure follows the same template ("Use when..." / "DO NOT use for..." / "Triggers...")-- [ ] No two Teamskills overlap in trigger conditions (they would compete in the trigger system)-- [ ] All Teamskills produce structurally similar Final Reports (tiered, schema-based) so users learn one mental model+- [ ] No two Swarm Skills overlap in trigger conditions (they would compete in the trigger system)+- [ ] All Swarm Skills produce structurally similar Final Reports (tiered, schema-based) so users learn one mental model-Cross-Teamskill consistency is a usability concern, not a per-skill compliance rule.+Cross-Swarm-Skill consistency is a usability concern, not a per-skill compliance rule.---@@ -169,7 +169,7 @@ Cross-Teamskill consistency is a usability concern, not a per-skill compliance rOnce all above checks pass, write a 2-line sign-off in the conversation (not in any file):```-Teamskill: <name>+Swarm Skill: <name>Pattern: <A | B | C | A+B | B+C | C+A | C+B+A | Debate>Roles: <count> (<list of role ids>)Validator: PASS@@ -177,4 +177,4 @@ Manual checks: PASS (all responsibility-attribution and content-quality tests)Justification: <1-line Stage 0 reason this team beats single-agent>```-This forces a final articulation of the Teamskill's reason to exist.+This forces a final articulation of the Swarm Skill's reason to exist.diff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/conversion-guide.md b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/conversion-guide.mdsimilarity index 89%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/conversion-guide.mdrename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/conversion-guide.mdindex 2c4415e885..0e771b08c3 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/conversion-guide.md+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/conversion-guide.md@@ -1,4 +1,4 @@-# Conversion Guide: Single-agent Skill → Teamskill+# Conversion Guide: Single-agent Skill → Swarm Skill> Read this in **Stage 1b** when the user points at an existing single-agent skill and asks to convert it. After this stage, return to the main SKILL.md workflow at Stage 1a (pattern selection) onward.@@ -35,11 +35,11 @@ Write a one-paragraph **conversion rationale** answering:If you cannot answer crisply, conversion is premature. Examples of crisp answers:-- **`adversarial-reviewer` → `pr-review-team`**: "The single agent role-plays 3 personas serially, but its outputs converge because it cannot escape its own analytical priors. Independent parallel agents produce genuinely different findings."+- **`adversarial-reviewer` → `pr-review-swarm`**: "The single agent role-plays 3 personas serially, but its outputs converge because it cannot escape its own analytical priors. Independent parallel agents produce genuinely different findings."- A multi-stage incident-response skill → team form: "The single agent skips the postmortem after mitigation succeeds, because the user's perceived crisis is over. Separating roles + gating mitigation→postmortem enforces the discipline."- A copywriting skill → team form: "The single agent collapses brief and copy into one pass, losing the audit trail and the discipline of editing without rewriting."-This rationale becomes the Stage 0 justification and gets cited in the new Teamskill's SKILL.md `description` (use case) + workflow.md Overview.+This rationale becomes the Stage 0 justification and gets cited in the new Swarm Skill's SKILL.md `description` (use case) + workflow.md Overview.### Step 3: Decompose into roles@@ -65,7 +65,7 @@ Use [pattern-selection.md](pattern-selection.md). For converted skills, the patt| Multi-step workflow with adversarial review at one step | C + A || Multi-step workflow with parallel research at one step | C + B |-### Step 5: Generate the new Teamskill via the standard pipeline+### Step 5: Generate the new Swarm Skill via the standard pipelineContinue from main SKILL.md **Stage 2 onward** (Role design → Workflow → Bind → Dependencies → Templates → Validate).@@ -82,13 +82,13 @@ When filling in templates, **port content from the source skill aggressively**:| Tool lists (`gh`, `grep`, `python`) | `roles[].tools` in SKILL.md frontmatter + `dependencies.yaml` `tools` segment || Required Skills (cross-references) | `roles[].skills` in SKILL.md frontmatter + `dependencies.yaml` `skills` segment with `source: <URL>` if external |-## Worked example: `adversarial-reviewer` → `pr-review-team`+## Worked example: `adversarial-reviewer` → `pr-review-swarm`This is the canonical conversion. Walk through it as a template.### Source structure-A real public single-agent skill `adversarial-reviewer` (an engineering-team skill that runs 3 review personas serially inside a single SKILL.md):+A real public single-agent skill `adversarial-reviewer` (an engineering-swarm skill that runs 3 review personas serially inside a single SKILL.md):```---@@ -142,7 +142,7 @@ Priorities: ...### Result-`pr-review-team`. The conversion preserves all source content while adding:+`pr-review-swarm`. The conversion preserves all source content while adding:- **True parallelism** (3 isolated agents instead of 1 serial agent)- **Anti-overlap boundaries** (each role's `**Forbidden**:` block names the other roles)@@ -163,5 +163,5 @@ Before declaring a conversion done, verify:- [ ] **All source tools** declared in `roles[].tools` + `dependencies.yaml > tools`- [ ] **All source cross-referenced Skills** declared in `roles[].skills` + `dependencies.yaml > skills`- [ ] **`bind.md` Behavioral Constraints** explicitly state isolation rule (A-pattern teams)-- [ ] **Validator passes** on the new Teamskill directory-- [ ] **Optional: `MIGRATION.md`** at the root of the new Teamskill, documenting the source skill, the conversion rationale, and the team-vs-single delta (useful for the user to understand what they gained)+- [ ] **Validator passes** on the new Swarm Skill directory+- [ ] **Optional: `MIGRATION.md`** at the root of the new Swarm Skill, documenting the source skill, the conversion rationale, and the team-vs-single delta (useful for the user to understand what they gained)diff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/pattern-selection.md b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/pattern-selection.mdsimilarity index 79%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/pattern-selection.mdrename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/pattern-selection.mdindex c9dfaea43e..9b15eb999a 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/pattern-selection.md+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/pattern-selection.md@@ -14,7 +14,7 @@**Identity test**: each role's 1-line motto should be **mutually antagonistic**. If two mottos could be spoken by the same person, the roles will converge.-**Example mottos that work** (from `pr-review-team`):+**Example mottos that work** (from `pr-review-swarm`):- Code reviewer: *"I am looking for what this code does well and how to ship it."*- Adversarial critic: *"I am trying to break this change before it reaches production."*- Architect: *"I care about whether this fits the system five years from now."*@@ -25,7 +25,7 @@**Integration rule**: ≥2 roles agree → MUST-FIX. 1 role flags + others silent → SHOULD-FIX. Roles directly contradict → surface verbatim, **do not mediate**.-**Examples**: `pr-review-team`, `paper-peer-review-team`, `contract-review-team` (buyer counsel vs seller counsel + neutral reviewer).+**Examples**: `pr-review-swarm`, `paper-peer-review-swarm`, `contract-review-swarm` (buyer counsel vs seller counsel + neutral reviewer).### B. Parallel decomposition@@ -35,7 +35,7 @@**Disjointness test**: each role must have a non-overlapping "assignment" (an angle, a category, a region, a layer). If two roles could produce the same finding, the decomposition is broken.-**Example assignments that work** (from `research-to-ppt-team`):+**Example assignments that work** (from `research-to-ppt-swarm`):- Angle researcher #1: market dynamics- Angle researcher #2: technology landscape- Angle researcher #3: regulatory environment@@ -46,7 +46,7 @@**Integration rule**: collect outputs by slice, deduplicate cross-slice findings, flag gaps where coverage is missing.-**Examples**: pure-B is rare in practice; usually combined with A or C. See `systematic-debug-team` (B for parallel hypothesis generation across distinct theory classes).+**Examples**: pure-B is rare in practice; usually combined with A or C. See `systematic-debug-swarm` (B for parallel hypothesis generation across distinct theory classes).### C. Specialization pipeline@@ -56,7 +56,7 @@**Boundary test**: each role must have an explicit `**Forbidden**: do NOT redo upstream work` clause. Without it, roles drift back into earlier stages.-**Example stage chain** (from `marketing-copy-team`):+**Example stage chain** (from `marketing-copy-swarm`):- Stage 1 brief-strategist → produces strategy brief (gate: brief approved)- Stage 2 copywriter → produces draft (gate: draft matches brief)- Stage 3 copy-editor → enhances draft (gate: no rewrites of brief or draft structure)@@ -64,39 +64,39 @@**Gate rule**: a stage outputs a structured deliverable; the next stage refuses to start unless the gate passes; failed gates trigger explicit retry / kick-back paths declared in `bind.md` Failure Handling.-**Examples**: `marketing-copy-team`, `incident-response-team`, `seo-growth-team`.+**Examples**: `marketing-copy-swarm`, `incident-response-swarm`, `seo-growth-swarm`.## Mixed patterns (when to combine)-Most non-trivial Teamskills combine 2 patterns. The combinations and their use cases:+Most non-trivial Swarm Skills combine 2 patterns. The combinations and their use cases:### A + B (parallel adversarial)**Use when**: you need both adversarial breadth AND parallel coverage. Multiple parallel investigators with non-overlapping assignments + an adversarial reviewer at the end.-**Example**: `systematic-debug-team` (3 parallel hypothesis-generators with forced theory-class diversity + 1 evidence collector + 1 adversarial root-cause-analyst + 1 fix-validator).+**Example**: `systematic-debug-swarm` (3 parallel hypothesis-generators with forced theory-class diversity + 1 evidence collector + 1 adversarial root-cause-analyst + 1 fix-validator).-**Example**: `security-audit-team` (3 parallel auditors: threat-modeler / vulnerability-scanner / dependency-auditor + 1 adversarial attack-chain-synthesizer who must connect their findings into exploit paths).+**Example**: `security-audit-swarm` (3 parallel auditors: threat-modeler / vulnerability-scanner / dependency-auditor + 1 adversarial attack-chain-synthesizer who must connect their findings into exploit paths).### B + C (parallel research → pipeline finalization)**Use when**: parallel breadth is needed early, then a sequential editorial pipeline finalizes the output.-**Example**: `research-to-ppt-team` (2–4 parallel angle-researchers → 1 content-curator → 1 slide-designer).+**Example**: `research-to-ppt-swarm` (2–4 parallel angle-researchers → 1 content-curator → 1 slide-designer).### C + A (pipeline with adversarial gate)**Use when**: a sequential pipeline benefits from an adversarial reviewer at one or more gates.-**Example**: `design-review-team` (analyst → critic → architect, where critic is the adversarial slot).+**Example**: `design-review-swarm` (analyst → critic → architect, where critic is the adversarial slot).-**Example**: `travel-planning-team` (planner-builder produces itinerary; budget-optimizer and experience-maximizer adversarially critique it; logistics-validator ratifies feasibility).+**Example**: `travel-planning-swarm` (planner-builder produces itinerary; budget-optimizer and experience-maximizer adversarially critique it; logistics-validator ratifies feasibility).### C + B + A (full stack)**Use when**: a hard quality gate at entry, then parallel multi-method analysis, then adversarial critique. Reserved for high-stakes analysis pipelines.-**Example**: `data-analysis-team` (Stage 0: data-quality-auditor as hard gate → Stage 1: 3 parallel analysts (descriptive / inferential / causal) → Stage 2: 1 adversarial critique-reviewer).+**Example**: `data-analysis-swarm` (Stage 0: data-quality-auditor as hard gate → Stage 1: 3 parallel analysts (descriptive / inferential / causal) → Stage 2: 1 adversarial critique-reviewer).### Debate (B → Cross-exam → C)@@ -108,9 +108,9 @@ Most non-trivial Teamskills combine 2 patterns. The combinations and their use c**Rounds**: Debate supports 1–N cross-exam rounds (each round = all roles receive prior round's outputs and produce structured responses). Round count is a **resource/quality tradeoff** — declare it in `bind.md`, not here. Most scenarios converge in 1–2 rounds.-**Visibility semantics**: the Teamskill declares **who sees whose output at which phase**. How this is delivered is a **framework-level implementation choice**, not a Teamskill concern — but with a **recommended preference order**: (1) **direct peer-to-peer exchange** (most efficient, lowest information distortion); (2) shared blackboard / shared state; (3) Leader-relay (fallback when the framework does not support peer communication). Frameworks SHOULD implement the highest-priority mechanism they support.+**Visibility semantics**: the Swarm Skill declares **who sees whose output at which phase**. How this is delivered is a **framework-level implementation choice**, not a Swarm Skill concern — but with a **recommended preference order**: (1) **direct peer-to-peer exchange** (most efficient, lowest information distortion); (2) shared blackboard / shared state; (3) Leader-relay (fallback when the framework does not support peer communication). Frameworks SHOULD implement the highest-priority mechanism they support.-**Example**: `china-ecommerce-compare-debate-team` (3 platform experts produce isolated position papers → cross-exam with mutual visibility → value-synthesizer produces verdict with unresolved disputes preserved).+**Example**: `china-ecommerce-compare-debate-swarm` (3 platform experts produce isolated position papers → cross-exam with mutual visibility → value-synthesizer produces verdict with unresolved disputes preserved).## Decision tree@@ -171,7 +171,7 @@ Combining A+B+C because "more is better". Result: 6 roles, 3 integration nodes,**Fix**: only combine patterns when each one is independently justified by Stage 0. If C+B alone solves the problem, do not add A.-## How to record the pattern in the Teamskill+## How to record the pattern in the Swarm SkillThe spec **does not have a `pattern: A/B/C` frontmatter field** — declaring the pattern as a string would duplicate what the mermaid diagram already expresses, and the diagram is more precise. Instead, the pattern is expressed implicitly through:diff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/role-design.md b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/role-design.mdsimilarity index 94%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/role-design.mdrename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/role-design.mdindex 4185ebf434..9c380ca9e0 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/reference/role-design.md+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/reference/role-design.md@@ -114,7 +114,7 @@ A role with only Forbidden tends to output empty findings. A role with only Mand### Examples-**A-pattern role** (`pr-review-team` adversarial-critic):+**A-pattern role** (`pr-review-swarm` adversarial-critic):```markdown**Forbidden**:@@ -126,7 +126,7 @@ A role with only Forbidden tends to output empty findings. A role with only MandIf you found nothing, you didn't look hard enough — recheck error paths and edge cases.```-**C-pattern role** (`marketing-copy-team` copy-editor):+**C-pattern role** (`marketing-copy-swarm` copy-editor):```markdown**Forbidden**:@@ -170,7 +170,7 @@ A role with only Forbidden tends to output empty findings. A role with only Mand### Schema design rules1. Always include a **Verdict / Decision / Output** terminal section that uses an **enum**, not free text. The Leader uses this for routing/integration.-2. Use **JSON** instead of Markdown if the output is consumed programmatically (rare for Teamskills — most consumers are LLMs reading Markdown).+2. Use **JSON** instead of Markdown if the output is consumed programmatically (rare for Swarm Skills — most consumers are LLMs reading Markdown).3. Match the schema 1:1 with what `Inline Persona` tells the teammate to produce. Drift between the two = teammate output that doesn't match the schema = Leader integration failure.---@@ -179,7 +179,7 @@ A role with only Forbidden tends to output empty findings. A role with only Mand### Why this section exists-> Most adopting agents do NOT auto-load role files when dispatching teammates. The Leader must extract this section verbatim and inline it into the dispatch prompt. **Without this section, Teamskills do not run on the majority of adopting agents.**+> Most adopting agents do NOT auto-load role files when dispatching teammates. The Leader must extract this section verbatim and inline it into the dispatch prompt. **Without this section, Swarm Skills do not run on the majority of adopting agents.**### Format@@ -187,7 +187,7 @@ A role with only Forbidden tends to output empty findings. A role with only Mand## Inline Persona for Teammate\`\`\`-ROLE: <Role Name> in a Teamskill.+ROLE: <Role Name> in a Swarm Skill.[1-2 sentences: who you are, what your default mode is]@@ -221,7 +221,7 @@ When 2+ roles in an A-pattern team risk producing similar outputs, apply these t### Technique 1: Forced theory class assignment-Each role is assigned a **fixed category** at dispatch time. Used in `systematic-debug-team`:+Each role is assigned a **fixed category** at dispatch time. Used in `systematic-debug-swarm`:- Hypothesis-generator-1 → "Data/State theories only"- Hypothesis-generator-2 → "Concurrency/Timing theories only"@@ -245,7 +245,7 @@ The methodology constrains the output shape, preventing convergence.### Technique 4: Adversarial dispatch order (rare)-For C-patterns with an adversarial gate, dispatch the adversary **after** seeing the prior stage's output, with explicit instruction to disagree. Used in `data-analysis-team` critique-reviewer: *"Your job is to find the analysis's failure modes, not to validate it."*+For C-patterns with an adversarial gate, dispatch the adversary **after** seeing the prior stage's output, with explicit instruction to disagree. Used in `data-analysis-swarm` critique-reviewer: *"Your job is to find the analysis's failure modes, not to validate it."*---@@ -264,12 +264,12 @@ Every gate has 4 parts (declared in `workflow.md` Detailed Steps):### Gate examples-**Brief gate** (`marketing-copy-team`, between Stage 1 and Stage 2):+**Brief gate** (`marketing-copy-swarm`, between Stage 1 and Stage 2):> **Pass criteria**: brief contains audience definition, value proposition, message hierarchy, CTA, success metrics. All 5 sections must be present and ≥3 sentences each.> **Fail action**: kick back to brief-strategist with the missing sections listed. Max 2 retries; on 3rd failure, surface to user with partial brief and ask how to proceed.-**Data quality gate** (`data-analysis-team`, before Stage 1 starts):+**Data quality gate** (`data-analysis-swarm`, before Stage 1 starts):> **Pass criteria**: Data Quality Score (DQS) ≥ 0.7 across completeness, consistency, validity. GO verdict from data-quality-auditor.> **Fail action** (NO-GO): halt the pipeline. Return DQS report to user with specific defects. Do not allow analysts to start.diff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/scripts/validate_teamskill.py b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/scripts/validate_swarmskill.pysimilarity index 92%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/scripts/validate_teamskill.pyrename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/scripts/validate_swarmskill.pyindex 70e4b39f37..28ceaebf84 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/scripts/validate_teamskill.py+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/scripts/validate_swarmskill.py@@ -1,9 +1,9 @@#!/usr/bin/env python3"""-validate_teamskill.py — Compliance checker for Teamskills (v0.1 spec).+validate_swarmskill.py — Compliance checker for Swarm Skills (v0.1 spec).Usage:- python validate_teamskill.py <path/to/teamskill-name/>+ python validate_swarmskill.py <path/to/swarmskill-name/>Exit codes:0 = PASS (no errors; warnings may still print)@@ -32,7 +32,7 @@ What this script does NOT catch (judgment calls — see reference/compliance-che- Whether mottos are mutually antagonistic (anti-convergence quality)- Whether Boundary lists really cover all sibling territories- Whether bind.md numbers actually match the workflow's needs- - Whether the Teamskill is even justified vs a single-agent skill (Stage 0)+ - Whether the Swarm Skill is even justified vs a single-agent skill (Stage 0)"""from __future__ import annotations@@ -50,7 +50,7 @@ try:import yamlexcept ImportError:logger.info("[USAGE ERROR] PyYAML is required. Install with: pip install pyyaml")- sys.exit(2)+ raise# ---------------------------------------------------------------------------@@ -58,6 +58,7 @@ except ImportError:# ---------------------------------------------------------------------------class Report:+def __init__(self) -> None:self.errors: list[str] = []self.warnings: list[str] = []@@ -89,7 +90,6 @@ class Report:len(self.warnings),)-# ---------------------------------------------------------------------------# Frontmatter + section parsing helpers# ---------------------------------------------------------------------------@@ -164,16 +164,13 @@ def validate_skill_md(path: Path, report: Report) -> tuple[dict | None, list[strif field not in fm:report.err("SKILL.md", f"frontmatter missing required field `{field}`")- if fm.get("kind") != "team-skill":- report.err("SKILL.md", f"frontmatter `kind` must be `team-skill` (got: {fm.get('kind')!r})")+ if fm.get("kind") != "swarm-skill":+ report.err("SKILL.md", f"frontmatter `kind` must be `swarm-skill` (got: {fm.get('kind')!r})")# name == directory namedir_name = path.parent.nameif fm.get("name") != dir_name:- report.err(- "SKILL.md",- f"frontmatter `name` ({fm.get('name')!r}) must equal directory name ({dir_name!r})",- )+ report.err("SKILL.md", f"frontmatter `name` ({fm.get('name')!r}) must equal directory name ({dir_name!r})")# description discipline (the trigger blob the model reads BEFORE loading the body)desc = fm.get("description")@@ -185,7 +182,7 @@ def validate_skill_md(path: Path, report: Report) -> tuple[dict | None, list[str"SKILL.md",f"description is {desc_chars} chars — HARD CAP is 500 (platform limit: 1024). ""Strip synonym enumeration / scope thresholds / Stage-0 rationale; see "- "../teamskill-creator/SKILL.md Stage 5 for the discipline rules.",+ "../swarmskill-creator/SKILL.md Stage 5 for the discipline rules.",)if len(desc_lines) > 4:report.warn(@@ -214,6 +211,14 @@ def validate_skill_md(path: Path, report: Report) -> tuple[dict | None, list[strreport.err("SKILL.md", f"roles[{i}] missing required field `id`")else:role_ids.append(role["id"])+ if "kind" not in role:+ report.err("SKILL.md", f"roles[{i}] (id={role.get('id')!r}) missing required field `kind`")+ elif role["kind"] not in ("ai_agent", "human_agent"):+ report.err(+ "SKILL.md",+ f"roles[{i}] (id={role.get('id')!r}) `kind` must be "+ f"`ai_agent` or `human_agent` (got: {role['kind']!r})"+ )if "purpose" not in role:report.err("SKILL.md", f"roles[{i}] (id={role.get('id')!r}) missing required field `purpose`")else:@@ -226,12 +231,13 @@ def validate_skill_md(path: Path, report: Report) -> tuple[dict | None, list[strf"chars — HARD CAP is 150. Move detail into roles/{role.get('id')}.md.",)- # Check if all roles have empty skills and tools (suggests auto-matching was skipped)+ # Check if all AI roles have empty skills and tools (suggests auto-matching was skipped).+ # Human-agent roles are excluded — they legitimately have no skills/tools.if isinstance(roles, list) and roles:- all_empty = all(+ ai_roles = [r for r in roles if isinstance(r, dict) and r.get("kind", "ai_agent") != "human_agent"]+ all_empty = ai_roles and all((not role.get("skills")) and (not role.get("tools"))- for role in roles- if isinstance(role, dict)+ for role in ai_roles)if all_empty and len(role_ids) > 0:report.warn(@@ -317,10 +323,7 @@ def validate_role_file(path: Path, role_id: str, report: Report) -> dict[str, liif not has_forbidden:report.err(file_label, "## Boundary missing `**Forbidden**` (or `**禁止**`) block")if not has_mandatory:- report.err(- file_label,- "## Boundary missing `**Mandatory**` (or `**必须**` / `**必做**`) block",- )+ report.err(file_label, "## Boundary missing `**Mandatory**` (or `**必须**` / `**必做**`) block")# Inline Persona must be non-trivially long (sanity check — empty section is the# most common authoring error)@@ -480,10 +483,7 @@ def check_orphan_role_files(roles_dir: Path, declared_role_ids: list[str], reporfor f in roles_dir.glob("*.md"):role_id = f.stemif role_id not in declared_role_ids:- report.warn(- "roles/",- f"orphan file `roles/{f.name}` — not declared in SKILL.md frontmatter `roles[]`",- )+ report.warn("roles/", f"orphan file `roles/{f.name}` — not declared in SKILL.md frontmatter `roles[]`")# ---------------------------------------------------------------------------@@ -495,7 +495,7 @@ def validate(root: Path) -> int:logger.info("[USAGE ERROR] %s is not a directory", root)return 2- logger.info("Validating Teamskill: %s\n", root.resolve())+ logger.info("Validating Swarmskill: %s\n", root.resolve())report = Report()diff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/SKILL.md.template b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/SKILL.md.templatesimilarity index 88%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/SKILL.md.templaterename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/SKILL.md.templateindex c48a944ba7..2ac41d5f7a 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/SKILL.md.template+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/SKILL.md.template@@ -1,25 +1,34 @@----name: <teamskill-name>+name: <swarmskill-name>description: |- <One-line WHAT: this Teamskill does X via N-role pattern Y. e.g., "3-role adversarial PR review (Reviewer + Critic + Architect) that surfaces inter-role conflicts instead of papering over them">.+ <One-line WHAT: this Swarm Skill does X via N-role pattern Y. e.g., "3-role adversarial PR review (Reviewer + Critic + Architect) that surfaces inter-role conflicts instead of papering over them">.Use when <one-line WHEN: the natural-language situation that should trigger — do NOT enumerate synonym phrases; semantic match handles variants>.Do NOT use for <one-line NOT: explicit non-cases that prevent over-firing on adjacent skills>.version: "0.1"-kind: team-skill+kind: swarm-skillroles:- id: <role-id-1>+ kind: ai_agent # mandatory. Use `human_agent` if Stage 0.5 confirmed human participation.purpose: <≤150 chars HARD CAP: 1-line role responsibility — what this role does and why. Detail belongs in roles/<id>.md, not here>skills: [<dependent-skill-name>] # populated from Stage 2 auto-matching; mirror in dependencies.yamltools: [<tool-name>] # populated from Stage 2 auto-matching; mirror in dependencies.yaml- id: <role-id-2>+ kind: ai_agentpurpose: <...>skills: [] # [] = Stage 2 auto-matching confirmed no skill matches for this roletools: []- id: <role-id-3>+ kind: ai_agentpurpose: <...>+ # Example human role (omit if all-AI swarm):+ # - id: <human-role-id>+ # kind: human_agent # human-in-the-loop; skills/tools usually empty+ # purpose: <≤150 chars: what input the human is asked to provide and when>+ # skills: []+ # tools: []----# <Teamskill Display Name>+# <Swarm Skill Display Name><1-2 sentences: an in-context introduction for an Agent that has already triggered this skill. Different from `description` (which gates the trigger). State the team's pattern (parallel adversarial / sequential pipeline / mixed) and the single failure mode it solves.>diff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/bind.md.template b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/bind.md.templatesimilarity index 93%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/bind.md.templaterename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/bind.md.templateindex c6ee8f4690..233fa72bd8 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/bind.md.template+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/bind.md.template@@ -22,12 +22,12 @@ Behavioral Constraints govern what Leader and the team-as-a-whole must / must noA-pattern: "Teammates MUST NOT see each other's output during their work — isolation is the value of adversarial review."C-pattern: "Each stage MUST NOT modify upstream stage outputs — only enhance / annotate."B-pattern: "Each parallel role works on its assigned slice ONLY — slices are dispatch-time fixed, not negotiated."- Debate-pattern: "Round 1 teammates are isolated (no cross-visibility). Round 2+ teammates receive prior-round outputs from all other roles (mutual visibility). The Teamskill declares who sees whose output at which phase; how it is delivered is a framework-level choice with recommended preference: (1) direct peer-to-peer exchange; (2) shared blackboard; (3) Leader-relay as fallback.">+ Debate-pattern: "Round 1 teammates are isolated (no cross-visibility). Round 2+ teammates receive prior-round outputs from all other roles (mutual visibility). The Swarm Skill declares who sees whose output at which phase; how it is delivered is a framework-level choice with recommended preference: (1) direct peer-to-peer exchange; (2) shared blackboard; (3) Leader-relay as fallback.">- **Contradiction handling**: when roles disagree, Leader surfaces contradictions verbatimin the Final Report. Leader NEVER mediates / picks a winner / averages opinions.Resolution is the human user's call.- <Domain-specific behavioral rule, e.g., "no live-system testing without authorization"- for security-audit-team, "blameless language only" for incident-response-team, etc.>+ for security-audit-swarm, "blameless language only" for incident-response-swarm, etc.>## Failure Handlingdiff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/dependencies.yaml.template b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/dependencies.yaml.templatesimilarity index 97%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/dependencies.yaml.templaterename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/dependencies.yaml.templateindex 028a42ea8c..ce31a07e7f 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/dependencies.yaml.template+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/dependencies.yaml.template@@ -1,4 +1,4 @@-# dependencies.yaml — Teamskill startup dependency check+# dependencies.yaml — Swarm Skill startup dependency check## Agent reads this file in SKILL.md Workflow Step 0 (pre-flight).# Each entry is checked. Results are reported to the user, who decides go/no-go.diff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/role.md.template b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/role.md.templatesimilarity index 99%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/role.md.templaterename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/role.md.templateindex 73fd6023de..d98996a135 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/role.md.template+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/role.md.template@@ -53,7 +53,7 @@ patterns, implicit type conversions, resource leaks">.## Inline Persona for Teammate```-ROLE: <Display Name> in a Teamskill.+ROLE: <Display Name> in a Swarm Skill.You are <1-sentence in-character description matching the Identity motto>.<1-2 sentences: your default mode, what you prioritize examining>.diff --git a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/workflow.md.template b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/workflow.md.templatesimilarity index 93%rename from jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/workflow.md.templaterename to jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/workflow.md.templateindex c81909e96a..34fcf56107 100644--- a/jiuwenclaw/resources/agent/workspace/skills/teamskill-creator/templates/workflow.md.template+++ b/jiuwenclaw/resources/agent/workspace/skills/swarmskill-creator/templates/workflow.md.template@@ -34,7 +34,7 @@ Include retry loops (back-edges) if roles can be re-dispatched on failure.><If Debate pattern, keep the following note (delete this instruction line, keep the content):>-- **Inter-member communication preference** (Debate pattern): this Teamskill declares **who sees whose output at which phase** (visibility semantics). Frameworks SHOULD implement the highest-priority delivery mechanism they support: **(1) direct peer-to-peer exchange** (most efficient) > **(2) shared blackboard** > **(3) Leader-relay** (fallback). See [bind.md](bind.md) § Behavioral Constraints for phase-scoped visibility rules.+- **Inter-member communication preference** (Debate pattern): this Swarm Skill declares **who sees whose output at which phase** (visibility semantics). Frameworks SHOULD implement the highest-priority delivery mechanism they support: **(1) direct peer-to-peer exchange** (most efficient) > **(2) shared blackboard** > **(3) Leader-relay** (fallback). See [bind.md](bind.md) § Behavioral Constraints for phase-scoped visibility rules.## Detailed Steps