Agent Zero AI framework
fix: move default files; harden framework api/prompt
3clyp50e9d240179ef9
diff --cc .dockerignoreindex 3f631e269,3f631e269..46405579d--- a/.dockerignore+++ b/.dockerignore@@@ -9,17 -9,17 +9,14 @@@ memory/*logs/*tmp/*usr/*++!usr/skills/++!usr/skills/**# Knowledge directory – keep only default/knowledge/**!knowledge/default/!knowledge/default/**--# Skills directory – keep only builtin/--skills/**--!skills/builtin/--!skills/builtin/**--# Keep .gitkeep markers anywhere!**/.gitkeepdiff --cc .gitignoreindex e9e468273,9ab556521..86736716f--- a/.gitignore+++ b/.gitignore@@@ -25,6 -25,6 +25,8 @@@ logs/# Handle tmp and usr directorytmp/*usr/*++!usr/skills/++!usr/skills/**# Handle knowledge directoryknowledge/**@@@ -33,13 -33,13 +35,6 @@@!knowledge/default/!knowledge/default/**--# Handle skills directory (SKILL.md standard)--skills/**--!skills/**/--# Explicitly allow the builtin folder in skills--!skills/builtin/--!skills/builtin/**--# Global rule to include .gitkeep files anywhere!**/.gitkeepdiff --cc docs/CONTRIBUTING-SKILLS.mdindex c8c68fcaa,c8c68fcaa..079bcbc71--- a/docs/CONTRIBUTING-SKILLS.md+++ b/docs/CONTRIBUTING-SKILLS.md@@@ -17,13 -17,13 +17,13 @@@ Welcome to the Agent Zero Skills ecosys## What is a Skill?--A **Skill** is a contextual expertise module that provides the AI agent with specialized knowledge and procedures for specific tasks. Unlike tools (which are always loaded), skills are **semantically recalled** when relevant, making them token-efficient and context-aware.++A **Skill** is a contextual expertise module that provides the AI agent with specialized knowledge and procedures for specific tasks. Unlike tools (which are always loaded), skills are **surfaced via description/tag matching** when relevant, making them token-efficient and context-aware.### Skills vs Tools vs Knowledge| Aspect | Skills | Tools | Knowledge ||--------|--------|-------|-----------|--| **Loading** | Semantic recall | Always in prompt | Semantic recall |++| **Loading** | Description/tag matching | Always in prompt | Semantic recall || **Purpose** | Procedures & expertise | Actions & functions | Facts & data || **Format** | SKILL.md (YAML + Markdown) | Python/code | Text/documents || **When to use** | "How to do X" | "Do X now" | "What is X" |@@@ -62,7 -62,7 +62,7 @@@ python -m python.helpers.skills_cli sea### Manual Creation--1. Create a folder in `skills/custom/` with your skill name++1. Create a folder in `usr/skills/custom/` with your skill name2. Add a `SKILL.md` file with YAML frontmatter3. Optionally add supporting scripts (`.py`, `.sh`, `.js`)@@@ -175,8 -175,8 +175,8 @@@ Ask yourselfpython -m python.helpers.skills_cli create my-awesome-skill# Or manually--mkdir -p skills/custom/my-awesome-skill--touch skills/custom/my-awesome-skill/SKILL.md++mkdir -p usr/skills/custom/my-awesome-skill++touch usr/skills/custom/my-awesome-skill/SKILL.md```### Step 3: Write the SKILL.md@@@ -338,12 -338,12 +338,12 @@@ def test_skill_has_required_fields()2. **Create Your Skill:**```bashpython -m python.helpers.skills_cli create my-skill-- # Edit skills/custom/my-skill/SKILL.md++ # Edit usr/skills/custom/my-skill/SKILL.md```3. **Move to Builtin (for contribution):**```bash-- mv skills/custom/my-skill skills/builtin/my-skill++ mv usr/skills/custom/my-skill usr/skills/builtin/my-skill```4. **Create a Pull Request:**@@@ -433,15 -433,15 +433,15 @@@ my-skills-collection### Q: Where should I put my skills?--**A:** During development, use `skills/custom/`. For contribution, move to `skills/builtin/`.++**A:** During development, use `usr/skills/custom/`. For contribution, move to `usr/skills/builtin/`.### Q: How are skills discovered?--**A:** Skills are indexed in a vector database. When you ask the agent something, it searches for relevant skills based on semantic similarity to your query.++**A:** Skills are matched against their name, description, and tags for the current query. They are not indexed into vector memory.### Q: Can I use skills from other platforms?--**A:** Yes! The SKILL.md standard is cross-platform. Skills from Claude Code, Cursor, or other compatible platforms can be copied directly to `skills/shared/`.++**A:** Yes! The SKILL.md standard is cross-platform. Skills from Claude Code, Cursor, or other compatible platforms can be copied directly to `usr/skills/shared/`.### Q: How do I update a skill?@@@ -455,7 -455,7 +455,7 @@@## Example Skills to Learn From--Check out these well-structured skills in `skills/builtin/`:++Check out these well-structured skills in `usr/skills/builtin/`:- `brainstorming/` - Requirements exploration workflow- `debugging/` - Systematic debugging methodologydiff --cc docs/architecture.mdindex 9717d498c,9717d498c..a7882dc7d--- a/docs/architecture.md+++ b/docs/architecture.md@@@ -42,7 -42,7 +42,7 @@@ This architecture ensures| --- | --- || `/docker` | Docker-related files for runtime container || `/docs` | Documentation files and guides |--| `/skills` | Skills using the open SKILL.md standard (contextual expertise) |++| `/usr/skills` | Skills using the open SKILL.md standard (contextual expertise) || `/knowledge` | Knowledge base storage || `/logs` | HTML CLI-style chat logs || `/memory` | Persistent agent memory storage |@@@ -298,19 -298,19 +298,19 @@@ Your detailed instructions here..#### Directory Structure| Directory | Description ||-----------|-------------|--| `/skills/builtin` | Built-in skills included with Agent Zero |--| `/skills/custom` | Your custom skills (create folders here) |--| `/skills/shared` | Skills shared across agents |++| `/usr/skills/builtin` | Built-in skills included with Agent Zero |++| `/usr/skills/custom` | Your custom skills (create folders here) |++| `/usr/skills/shared` | Skills shared across agents |#### Adding Skills--1. Create folder in `skills/custom` (e.g., `skills/custom/my-skill`)++1. Create folder in `usr/skills/custom` (e.g., `usr/skills/custom/my-skill`)2. Add `SKILL.md` file with YAML frontmatter (required)3. Optionally add supporting scripts (`.sh`, `.py`, etc.)4. Optionally add `docs/` subfolder for additional documentation--5. The agent will automatically discover and index the skill++5. The agent will automatically discover the skill for list/search#### Using Skills--Skills are automatically recalled from memory when relevant to a task. You can also use the `skills_tool` to:++Skills are surfaced via description/tag matching. You can also use the `skills_tool` to:- List all available skills- Load a specific skill by name- Read files from within a skill directorydiff --cc docs/installation.mdindex a96a3490d,b42730680..be65d4138--- a/docs/installation.md+++ b/docs/installation.md@@@ -87,7 -87,7 +87,7 @@@ The following user guide provides instr- `/agents` - Specialized agents with their prompts and tools- `/memory` - Agent's memory and learned information- `/knowledge` - Knowledge base-- - `/skills` - Skills using the open SKILL.md standard++ - `/usr/skills` - Skills using the open SKILL.md standard- `/prompts` - Prompt files- `.env` - Your API keys- `/tmp/settings.json` - Your Agent Zero settings@@@ -374,7 -372,7 +374,7 @@@ For developers or users who need to ru- To update to the new Docker runtime version, you might want to backup the following files and directories:- `/memory` - Agent's memory- `/knowledge` - Custom knowledge base (if you imported any custom knowledge files)-- - `/skills` - Custom skills using SKILL.md format (if you created any)++ - `/usr/skills` - Custom skills using SKILL.md format (if you created any)- `/tmp/settings.json` - Your Agent Zero settings- `/tmp/chats/` - Your chat history- Once you have saved these files and directories, you can proceed with the Docker runtime [installation instructions above](#windows-macos-and-linux-setup-guide) setup guide.diff --cc prompts/agent.system.framework.mdindex 000000000,61a0294e7..0cf7ec79bmode 000000,100644..100644--- a/prompts/agent.system.framework.md+++ b/prompts/agent.system.framework.md@@@ -1,0 -1,16 +1,16 @@@-# Active Development Framework: {{framework_name}}++# Active Framework: {{framework_name}}++ {{framework_description}}++ ## Workflow Steps+ Follow this structured workflow when working on development tasks:++ {{workflow_steps}}++ ## Framework Usage Guidelines+ - Use the `skills_tool` to load framework-specific skills when starting each workflow phase+ - Skills with the `{{framework_prefix}}-` prefix are designed for this framework+ - Guide the user through the appropriate workflow step based on where they are in the development process+ - When the user asks to start a new feature or project, begin with step 1 of the workflow+ - Provide clear transitions between workflow phases+ - Reference the relevant skill for detailed instructions on each phasediff --cc prompts/agent.system.tool.skills.mdindex 4822daa10,e9bad8f97..1a0a3cef9--- a/prompts/agent.system.tool.skills.md+++ b/prompts/agent.system.tool.skills.md@@@ -147,48 -222,6 +147,47 @@@ Scoring- Tag match: +1 point per tag- Results sorted by descending score+## Running skill scripts++When a skill includes scripts (listed under its files), use code_execution_tool directly to run them.+The skill's "load" output shows the skill directory path and lists available scripts.+Use read_file to inspect a script before running it if needed.++Example: running a Python script from a skill+1. Load the skill to get its path and script list+2. Use code_execution_tool with runtime="python" to run the script++~~~json+{+ "thoughts": [+ "Need to convert PDF to images",+ "Skill provides convert_pdf_to_images.py at scripts/convert_pdf_to_images.py",+ "Using code_execution_tool to run it directly"+ ],+ "headline": "Converting PDF to images",+ "tool_name": "code_execution_tool",+ "tool_args": {+ "runtime": "python",+ "code": "import subprocess\nsubprocess.run(['python', '/path/to/skill/scripts/convert_pdf_to_images.py', '/path/to/document.pdf', '/tmp/images'], check=True)"+ }+}+~~~++Example: running a shell script from a skill+~~~json+{+ "thoughts": [+ "Skill provides a shell script for data processing",+ "Running it via terminal runtime"+ ],+ "headline": "Running data processing script",+ "tool_name": "code_execution_tool",+ "tool_args": {+ "runtime": "terminal",+ "code": "cd /path/to/skill && bash scripts/process.sh /data/input.csv /tmp/output"+ }+}+~~~-## Best Practices### When to use skills vs other tools@@@ -249,7 -287,126 +248,6 @@@ When skill loading fails- Verify skill exists using list method- Check for typos in skill_name- Ensure skill system is enabled in settings--When script execution fails:-- Review skill documentation for required arguments-- Check script_args dictionary format-- Verify required packages installed in container-- Check script output for specific error messages--## Examples--Example 1: Simple script with positional args (default)-Script expects: python script.py /path/to/file.pdf-~~~json-{- "thoughts": [- "User has PDF to convert to images",- "Script uses sys.argv[1] for input, sys.argv[2] for output",- "Using default positional arg_style"- ],- "headline": "Converting PDF to images",- "tool_name": "skills_tool",- "tool_args": {- "method": "execute_script",- "skill_name": "pdf_editing",- "script_path": "scripts/convert_pdf_to_images.py",- "script_args": {- "input_pdf": "/workspace/document.pdf",- "output_dir": "/tmp/images"- }- }-}-~~~-Result: sys.argv = ['script.py', '/workspace/document.pdf', '/tmp/images']--Example 2: Argparse script with named args-Script expects: python script.py --url https://... --selector .price-~~~json-{- "thoughts": [- "Need to scrape product prices from website",- "Script uses argparse with --url and --selector flags",- "Using arg_style='named' for argparse compatibility"- ],- "headline": "Scraping product prices from webpage",- "tool_name": "skills_tool",- "tool_args": {- "method": "execute_script",- "skill_name": "web_scraping",- "script_path": "scripts/fetch_page.py",- "script_args": {- "url": "https://example.com/products",- "selector": ".price"- },- "arg_style": "named"- }-}-~~~-Result: sys.argv = ['script.py', '--url', 'https://...', '--selector', '.price']--Example 3: Environment-only script-Script reads from os.environ only-~~~json-{- "thoughts": [- "Script reads configuration from environment variables",- "Using arg_style='env' to only set env vars"- ],- "headline": "Running config-based processor",- "tool_name": "skills_tool",- "tool_args": {- "method": "execute_script",- "skill_name": "data_processor",- "script_path": "scripts/process.py",- "script_args": {- "input_file": "/data/input.csv",- "mode": "production"- },- "arg_style": "env"- }-}-~~~-Result: SKILL_ARG_INPUT_FILE=/data/input.csv, SKILL_ARG_MODE=production--Example 4: Data analysis workflow-~~~json-{- "thoughts": [- "User needs CSV analysis",- "data_analysis skill has analysis procedures",- "Loading skill for detailed instructions"- ],- "headline": "Loading data analysis skill",- "tool_name": "skills_tool",- "tool_args": {- "method": "load",- "skill_name": "data_analysis"- }-}-~~~--Then follow up with script (positional args):-~~~json-{- "thoughts": [- "Skill loaded, now analyzing CSV",- "Script takes csv_path as first arg, group_by as second"- ],- "headline": "Analyzing sales data grouped by category",- "tool_name": "skills_tool",- "tool_args": {- "method": "execute_script",- "skill_name": "data_analysis",- "script_path": "scripts/analyze_csv.py",- "script_args": {- "csv_path": "/workspace/sales_data.csv",- "group_by": "category"- }- }-}-~~~--## Notes- Skills metadata already loaded in your system promptdiff --cc python/api/frameworks.pyindex 000000000,bf193a03d..9ee735d89mode 000000,100644..100644--- a/python/api/frameworks.py+++ b/python/api/frameworks.py@@@ -1,0 -1,39 +1,33 @@@+ from dataclasses import asdict+ from python.helpers.api import ApiHandler, Input, Output, Request+ from python.helpers import frameworks+++ class Frameworks(ApiHandler):- """API handler for development framework operations."""++ """API handler for framework operations."""++ async def process(self, input: Input, request: Request) -> Output:+ action = input.get("action", "list")-+ try:+ if action == "list":- data = self.list_frameworks()- elif action == "get":- data = self.get_framework(input.get("id", ""))- else:- raise Exception(f"Invalid action: {action}")-- return {- "ok": True,- "data": data,- }- except Exception as e:- return {- "ok": False,- "error": str(e),- }++ return {"ok": True, "data": self.list_frameworks()}++ if action == "get":++ framework_id = input.get("id", "")++ data = self.get_framework(framework_id)++ if data is None:++ return {"ok": False, "error": "Framework not found"}++ return {"ok": True, "data": data}++ return {"ok": False, "error": "Invalid action"}++ except Exception:++ return {"ok": False, "error": "Internal error"}++ def list_frameworks(self) -> list[dict]:+ """List all available frameworks."""+ return [asdict(fw) for fw in frameworks.list_frameworks()]++ def get_framework(self, framework_id: str) -> dict | None:+ """Get a specific framework by ID."""+ fw = frameworks.get_framework(framework_id)+ if fw is None:+ return None+ return asdict(fw)diff --cc python/extensions/message_loop_prompts_after/_55_recall_skills.pyindex be9663aa3,78744ccff..370fdadf2--- a/python/extensions/message_loop_prompts_after/_55_recall_skills.py+++ b/python/extensions/message_loop_prompts_after/_55_recall_skills.py@@@ -1,20 -1,20 +1,14 @@@--import os--from pathlib import Path--from python.helpers.extension import Extensionfrom agent import LoopData--from python.helpers.memory import Memory--from python.helpers import filesfrom python.helpers import skills as skills_helper- from python.helpers import projects-from python.helpers import frameworks++from python.helpers import projects, frameworksclass RecallSkills(Extension):"""Surface relevant SKILL.md-based Skills into the prompt (token-efficient).-- The Memory subsystem already indexes `skills/**/SKILL.md` into area "skills".-- This extension does a lightweight similarity lookup and injects a small++ Uses lightweight lexical matching and injects a compact"relevant skills" list into extras for the current user message."""@@@ -30,89 -30,83 +24,30 @@@if not user_instruction or len(user_instruction) < 8:return- # Get active project for project-scoped skill discovery- project_name = projects.get_context_project_name(self.agent.context) if self.agent.context else None--- try:-- db = await Memory.get(self.agent)-- docs = await db.search_similarity_threshold(-- query=user_instruction,-- limit=12,-- threshold=0.55,-- filter=f"area == '{Memory.Area.SKILLS.value}'",-- )-- except Exception:-- docs = []---- # Fallback: simple keyword search over discovered skills if vector recall yields nothing-- recalled = []-- if docs:-- seen = set()-- for doc in docs:-- src = (doc.metadata or {}).get("source_path") or ""-- if not src:-- continue-- if src in seen:-- continue-- seen.add(src)-- recalled.append(src)-- if len(recalled) >= 6:-- break---- if not recalled:- # cheap lexical fallback (includes project skills when project is active)- matches = skills_helper.search_skills(user_instruction, limit=6, project_name=project_name)- # cheap lexical fallback - include framework skills if a framework is active- framework = frameworks.get_active_framework(self.agent.context)- framework_id = framework.id if framework else None- matches = skills_helper.search_skills(user_instruction, limit=6, framework_id=framework_id)-- for s in matches:-- recalled.append(str(s.skill_md_path))---- if not recalled:++ # Get active project + framework for scoped discovery++ project_name = (++ projects.get_context_project_name(self.agent.context)++ if self.agent.context++ else None++ )++ framework = frameworks.get_active_framework(self.agent.context)++ framework_id = framework.id if framework else None++++ matches = skills_helper.search_skills(++ user_instruction,++ limit=6,++ project_name=project_name,++ framework_id=framework_id,++ )++ if not matches:return-- # Build compact metadata list-- base_skills_dir = Path(files.get_abs_path("skills")).resolve()lines = []-- for src_path in recalled[:6]:-- try:-- p = Path(src_path)-- # Some docs may store /a0/... paths; map to dev path when needed-- abs_path = Path(files.fix_dev_path(str(p)))-- text = abs_path.read_text(encoding="utf-8", errors="replace")-- fm, body = skills_helper.split_frontmatter(text)--- # Infer source if possible (custom/builtin/shared/project), else "unknown"- # Infer source if possible (custom/builtin/shared/framework), else "unknown"-- source = "unknown"-- try:-- rel = abs_path.resolve().relative_to(base_skills_dir)- if rel.parts and rel.parts[0] in ("custom", "builtin", "shared"):- if rel.parts and rel.parts[0] in ("custom", "builtin", "shared", "frameworks"):-- source = rel.parts[0]- # Normalize "frameworks" to "framework" for display- if source == "frameworks":- source = "framework"-- except Exception:-- pass- if source == "unknown" and project_name:- try:- from python.helpers.skills_import import get_project_skills_folder- proj_skills = get_project_skills_folder(project_name)- abs_path.resolve().relative_to(proj_skills.resolve())- source = "project"- except Exception:- pass---- name = str(fm.get("name") or abs_path.parent.name).strip()-- desc = str(fm.get("description") or "").strip()-- if not desc:-- # fallback to first non-empty line of body-- for line in (body or "").splitlines():-- if line.strip():-- desc = line.strip()-- break-- if len(desc) > 220:-- desc = desc[:220].rstrip() + "…"---- lines.append(f"- {name} [{source}]: {desc}")-- except Exception:-- continue---- if not lines:-- return++ for s in matches:++ desc = (s.description or "").strip() or "(no description)"++ if len(desc) > 220:++ desc = desc[:220].rstrip() + "…"++ lines.append(f"- {s.name} [{s.source}]: {desc}")skills_block = "\n".join(lines)loop_data.extras_temporary["skills"] = self.agent.parse_prompt(diff --cc python/extensions/system_prompt/_10_system_prompt.pyindex 9a17c0ad9,87b4fd797..7dc2b2619--- a/python/extensions/system_prompt/_10_system_prompt.py+++ b/python/extensions/system_prompt/_10_system_prompt.py@@@ -80,3 -83,28 +83,28 @@@ def get_project_prompt(agent: Agent)else:result += "\n\n" + agent.read_prompt("agent.system.projects.inactive.md")return result+++ def get_framework_prompt(agent: Agent):+ """- Get the active development framework prompt if one is selected.++ Get the active framework prompt if one is selected.++ Returns empty string if no framework is active (framework_id == "none").+ """+ framework = frameworks.get_active_framework(agent.context)+ if not framework:+ return ""++ # Build workflow steps description+ workflow_steps = "\n".join([+ f"{w.sequence}. **{w.name}** (`{w.skill_name}`): {w.description}"+ for w in framework.workflows+ ])++ return agent.read_prompt(+ "agent.system.framework.md",+ framework_name=framework.name,+ framework_description=framework.description,+ framework_prefix=framework.skill_prefix,+ workflow_steps=workflow_steps,+ )diff --cc python/helpers/frameworks.pyindex 000000000,dbd57278a..a6e53cafamode 000000,100644..100644--- a/python/helpers/frameworks.py+++ b/python/helpers/frameworks.py@@@ -1,0 -1,623 +1,623 @@@+ """-Development Framework Registry for Agent Zero.++Framework Registry for Agent Zero.+-This module defines the available development frameworks that can be used++This module defines the available frameworks that can be used+ to guide agent workflows. Each framework provides structured methodologies+ for software development tasks.++ Frameworks are selected globally in settings or overridden per-project.+ When a framework is active, its skills are prioritized in skill discovery+ and framework context is injected into the system prompt.+ """++ from __future__ import annotations++ from dataclasses import dataclass, field+ from typing import TYPE_CHECKING, List, Literal, Optional++ if TYPE_CHECKING:+ from agent import AgentContext++ # Supported framework identifiers+ FrameworkId = Literal[+ "none",+ "gsd",+ "superpowers",+ "bmad",+ "bmad-builder",+ "bmad-cis",+ "bmad-gds",+ "speckit",+ "prp",+ "agentos",+ "amplihack",+ "agent-zero-dev",+ ]++ ALL_FRAMEWORK_IDS: List[str] = [+ "none",+ "gsd",+ "superpowers",+ "bmad",+ "bmad-builder",+ "bmad-cis",+ "bmad-gds",+ "speckit",+ "prp",+ "agentos",+ "amplihack",+ "agent-zero-dev",+ ]+++ @dataclass(slots=True)+ class FrameworkWorkflow:+ """A single workflow step within a framework."""++ name: str # e.g., "plan-phase"+ skill_name: str # Maps to SKILL.md name, e.g., "gsd-plan-phase"+ description: str+ sequence: int # Order in workflow (1-based)+++ @dataclass(slots=True)+ class Framework:- """A development framework definition."""++ """A framework definition."""++ id: FrameworkId+ name: str # Display name+ description: str+ skill_prefix: str # Namespace for skills, e.g., "gsd", "bmad"+ workflows: List[FrameworkWorkflow] = field(default_factory=list)+++ # ─────────────────────────────────────────────────────────────────────────────+ # Framework Registry+ # ─────────────────────────────────────────────────────────────────────────────++ FRAMEWORK_REGISTRY: dict[str, Framework] = {+ "none": Framework(+ id="none",+ name="None",- description="No development framework. Agent operates with standard skills only.",++ description="No framework. Agent operates with standard skills only.",+ skill_prefix="",+ workflows=[],+ ),+ "gsd": Framework(+ id="gsd",+ name="GSD (Get Stuff Done)",+ description="A structured methodology emphasizing planning before implementation. Features clear phases: project setup, discussion, planning, execution, verification, and milestone completion.",+ skill_prefix="gsd",+ workflows=[+ FrameworkWorkflow(+ name="New Project",+ skill_name="gsd-new-project",+ description="Initialize project structure, requirements, and roadmap",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Discuss Phase",+ skill_name="gsd-discuss-phase",+ description="Capture implementation decisions and preferences before planning",+ sequence=2,+ ),+ FrameworkWorkflow(+ name="Plan Phase",+ skill_name="gsd-plan-phase",+ description="Research, create atomic task plans, and verify against requirements",+ sequence=3,+ ),+ FrameworkWorkflow(+ name="Execute Phase",+ skill_name="gsd-execute-phase",+ description="Run plans in parallel waves with fresh context per task",+ sequence=4,+ ),+ FrameworkWorkflow(+ name="Verify Work",+ skill_name="gsd-verify-work",+ description="Manual user acceptance testing with automatic fix generation",+ sequence=5,+ ),+ FrameworkWorkflow(+ name="Complete Milestone",+ skill_name="gsd-complete-milestone",+ description="Archive milestone, tag release, prepare for next iteration",+ sequence=6,+ ),+ ],+ ),+ "superpowers": Framework(+ id="superpowers",+ name="Superpowers",+ description="A comprehensive development workflow framework for Claude Code. Emphasizes TDD, brainstorming, planning, subagent execution, code review, and proper branch management.",+ skill_prefix="sp",+ workflows=[+ FrameworkWorkflow(+ name="Brainstorming",+ skill_name="sp-brainstorming",+ description="Socratic design refinement before writing code",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Git Worktrees",+ skill_name="sp-git-worktrees",+ description="Create isolated workspace on new branch for development",+ sequence=2,+ ),+ FrameworkWorkflow(+ name="Writing Plans",+ skill_name="sp-writing-plans",+ description="Break work into bite-sized tasks (2-5 min each) with verification",+ sequence=3,+ ),+ FrameworkWorkflow(+ name="Test-Driven Development",+ skill_name="sp-test-driven-development",+ description="RED-GREEN-REFACTOR: test first, minimal code, commit",+ sequence=4,+ ),+ FrameworkWorkflow(+ name="Executing Plans",+ skill_name="sp-executing-plans",+ description="Dispatch subagents per task with two-stage review",+ sequence=5,+ ),+ FrameworkWorkflow(+ name="Code Review",+ skill_name="sp-code-review",+ description="Review against plan, report issues by severity",+ sequence=6,+ ),+ FrameworkWorkflow(+ name="Finishing Branch",+ skill_name="sp-finishing-branch",+ description="Verify tests, merge/PR options, cleanup worktree",+ sequence=7,+ ),+ ],+ ),+ "bmad": Framework(+ id="bmad",+ name="BMAD (Business-Minded Agile Development)",+ description="A business-focused agile methodology with 21 specialized agents. Features two paths: Quick (spec→dev→review) for small tasks, Full (brief→PRD→arch→epics→sprint→stories) for complex projects.",+ skill_prefix="bmad",+ workflows=[+ FrameworkWorkflow(+ name="Quick Spec",+ skill_name="bmad-quick-spec",+ description="(Quick Path) Analyze codebase and produce tech-spec with stories",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Product Brief",+ skill_name="bmad-product-brief",+ description="(Full Path) Define problem, users, and MVP scope",+ sequence=2,+ ),+ FrameworkWorkflow(+ name="Create PRD",+ skill_name="bmad-create-prd",+ description="Full requirements with personas, metrics, and risks",+ sequence=3,+ ),+ FrameworkWorkflow(+ name="Architecture",+ skill_name="bmad-create-architecture",+ description="Technical decisions and system design",+ sequence=4,+ ),+ FrameworkWorkflow(+ name="Create Epics",+ skill_name="bmad-create-epics",+ description="Break work into prioritized epics and stories",+ sequence=5,+ ),+ FrameworkWorkflow(+ name="Sprint Planning",+ skill_name="bmad-sprint-planning",+ description="Initialize sprint tracking and story selection",+ sequence=6,+ ),+ FrameworkWorkflow(+ name="Developer Story",+ skill_name="bmad-dev-story",+ description="Implement individual stories with guidance",+ sequence=7,+ ),+ FrameworkWorkflow(+ name="Code Review",+ skill_name="bmad-code-review",+ description="Validate quality and completeness",+ sequence=8,+ ),+ ],+ ),+ "bmad-builder": Framework(+ id="bmad-builder",+ name="BMad Builder",+ description="Meta-module for creating custom BMad agents, workflows, and domain-specific modules. Build specialized AI agents with custom expertise, structured workflows, and shareable module packages.",+ skill_prefix="bmb",+ workflows=[+ FrameworkWorkflow(+ name="Build Agent",+ skill_name="bmb-agent",+ description="Create specialized AI agents with custom expertise and tools",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Build Workflow",+ skill_name="bmb-workflow",+ description="Design structured workflows with steps and cross-workflow communication",+ sequence=2,+ ),+ FrameworkWorkflow(+ name="Build Module",+ skill_name="bmb-module",+ description="Package agents and workflows into shareable BMad modules",+ sequence=3,+ ),+ ],+ ),+ "bmad-cis": Framework(+ id="bmad-cis",+ name="BMad Creative Intelligence Suite",+ description="Tools for the fuzzy front-end of development—where ideas are born, problems are reframed, and solutions emerge through structured creativity. Features innovation, design thinking, and brainstorming workflows.",+ skill_prefix="cis",+ workflows=[+ FrameworkWorkflow(+ name="Brainstorm",+ skill_name="cis-brainstorm",+ description="Generate ideas with structured techniques (SCAMPER, Reverse Brainstorming)",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Design Thinking",+ skill_name="cis-design-thinking",+ description="Human-centered design through empathy, ideation, and prototyping",+ sequence=2,+ ),+ FrameworkWorkflow(+ name="Problem Solve",+ skill_name="cis-problem-solve",+ description="Systematic problem diagnosis and root cause analysis",+ sequence=3,+ ),+ FrameworkWorkflow(+ name="Innovation",+ skill_name="cis-innovation",+ description="Business model innovation and disruption opportunity analysis",+ sequence=4,+ ),+ FrameworkWorkflow(+ name="Storytelling",+ skill_name="cis-storytelling",+ description="Craft compelling narratives for products and features",+ sequence=5,+ ),+ FrameworkWorkflow(+ name="Presentation",+ skill_name="cis-presentation",+ description="Structure and deliver persuasive presentations",+ sequence=6,+ ),+ ],+ ),+ "bmad-gds": Framework(+ id="bmad-gds",+ name="BMad Game Dev Studio",+ description="Six specialized game development agents: Game Designer (Samus Shepard), Game Architect (Cloud Dragonborn), Game Developer (Link Freeman), Game Scrum Master (Max), Game QA (GLaDOS), and Game Solo Dev (Indie). Two paths: Full (brief→GDD→arch→sprint→stories) for team projects, Quick Flow for solo/indie dev.",+ skill_prefix="gds",+ workflows=[+ FrameworkWorkflow(+ name="Brainstorm Game",+ skill_name="gds-brainstorm-game",+ description="Guided game ideation with Game Designer (Samus Shepard)",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Create Game Brief",+ skill_name="gds-create-brief",+ description="Define game vision, core loop, and target experience",+ sequence=2,+ ),+ FrameworkWorkflow(+ name="Create GDD",+ skill_name="gds-create-gdd",+ description="Full Game Design Document with mechanics and systems",+ sequence=3,+ ),+ FrameworkWorkflow(+ name="Game Architecture",+ skill_name="gds-create-architecture",+ description="Technical architecture with Game Architect (Cloud Dragonborn)",+ sequence=4,+ ),+ FrameworkWorkflow(+ name="Sprint Planning",+ skill_name="gds-sprint-planning",+ description="Plan sprints with Game Scrum Master (Max)",+ sequence=5,+ ),+ FrameworkWorkflow(+ name="Dev Story",+ skill_name="gds-dev-story",+ description="Implement stories with Game Developer (Link Freeman)",+ sequence=6,+ ),+ FrameworkWorkflow(+ name="QA Framework",+ skill_name="gds-qa-framework",+ description="Set up testing with Game QA (GLaDOS)",+ sequence=7,+ ),+ FrameworkWorkflow(+ name="Quick Flow",+ skill_name="gds-quick-flow",+ description="Solo dev fast path with Game Solo Dev (Indie)",+ sequence=8,+ ),+ ],+ ),+ "speckit": Framework(+ id="speckit",+ name="Spec Kit",+ description="A specification-driven approach emphasizing upfront clarity. Starts with constitution definition, progresses through specification, planning, task generation, and implementation.",+ skill_prefix="speckit",+ workflows=[+ FrameworkWorkflow(+ name="Constitution",+ skill_name="speckit-constitution",+ description="Define project principles and constraints",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Specify",+ skill_name="speckit-specify",+ description="Create detailed specifications",+ sequence=2,+ ),+ FrameworkWorkflow(+ name="Plan",+ skill_name="speckit-plan",+ description="Generate implementation roadmap from specs",+ sequence=3,+ ),+ FrameworkWorkflow(+ name="Tasks",+ skill_name="speckit-tasks",+ description="Break plan into actionable tasks",+ sequence=4,+ ),+ FrameworkWorkflow(+ name="Implement",+ skill_name="speckit-implement",+ description="Execute tasks following specifications",+ sequence=5,+ ),+ ],+ ),+ "prp": Framework(+ id="prp",+ name="PRP (Prompt-Response Protocol)",+ description="A lightweight two-phase methodology: generate comprehensive PRPs (prompts) for tasks, then execute them. Ideal for well-defined, repeatable tasks.",+ skill_prefix="prp",+ workflows=[+ FrameworkWorkflow(+ name="Generate PRP",+ skill_name="prp-generate",+ description="Create detailed prompt specification for task",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Execute PRP",+ skill_name="prp-execute",+ description="Execute the generated prompt systematically",+ sequence=2,+ ),+ ],+ ),+ "agentos": Framework(+ id="agentos",+ name="AgentOS",+ description="A standards-based framework focusing on project initialization and adherence to coding standards. Emphasizes consistent project structure and quality gates.",+ skill_prefix="agentos",+ workflows=[+ FrameworkWorkflow(+ name="Project Install",+ skill_name="agentos-project-install",+ description="Initialize project with standard structure",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Standards",+ skill_name="agentos-standards",+ description="Apply and verify coding standards",+ sequence=2,+ ),+ ],+ ),+ "amplihack": Framework(+ id="amplihack",+ name="AMPLIHACK",+ description="A multi-agent orchestration framework with specialized agents. Features auto workflow selection, analysis, cascade patterns, debate workflows, fix workflows, and modular building.",+ skill_prefix="amplihack",+ workflows=[+ FrameworkWorkflow(+ name="Auto",+ skill_name="amplihack-auto",+ description="Automatic workflow selection based on task complexity",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Analyze",+ skill_name="amplihack-analyze",+ description="Deep code/requirements analysis with multiple perspectives",+ sequence=2,+ ),+ FrameworkWorkflow(+ name="Cascade",+ skill_name="amplihack-cascade",+ description="Sequential multi-agent processing for complex tasks",+ sequence=3,+ ),+ FrameworkWorkflow(+ name="Debate",+ skill_name="amplihack-debate",+ description="Multi-perspective debate for technical decisions",+ sequence=4,+ ),+ FrameworkWorkflow(+ name="Fix",+ skill_name="amplihack-fix",+ description="Systematic error resolution with pattern-specific context",+ sequence=5,+ ),+ FrameworkWorkflow(+ name="Modular Build",+ skill_name="amplihack-modular-build",+ description="Build code following brick philosophy with modules",+ sequence=6,+ ),+ ],+ ),+ "agent-zero-dev": Framework(+ id="agent-zero-dev",+ name="Agent Zero Dev",+ description="Development framework for extending and building features for Agent Zero. Provides patterns, templates, and code generators for creating tools, extensions, skills, API endpoints, subordinate profiles, and project configurations.",+ skill_prefix="a0dev",+ workflows=[+ FrameworkWorkflow(+ name="Quickstart",+ skill_name="a0dev-quickstart",+ description="5-minute guide to extending Agent Zero",+ sequence=1,+ ),+ FrameworkWorkflow(+ name="Create Tool",+ skill_name="a0dev-create-tool",+ description="Create new agent capabilities (tools)",+ sequence=2,+ ),+ FrameworkWorkflow(+ name="Create Extension",+ skill_name="a0dev-create-extension",+ description="Hook into agent lifecycle events",+ sequence=3,+ ),+ FrameworkWorkflow(+ name="Create Skill",+ skill_name="a0dev-create-skill",+ description="Build reusable instruction bundles (SKILL.md)",+ sequence=4,+ ),+ FrameworkWorkflow(+ name="Create API",+ skill_name="a0dev-create-api",+ description="Add Web UI / REST API endpoints",+ sequence=5,+ ),+ FrameworkWorkflow(+ name="Create Subordinate",+ skill_name="a0dev-create-subordinate",+ description="Create specialized agent profiles",+ sequence=6,+ ),+ FrameworkWorkflow(+ name="Create Project",+ skill_name="a0dev-create-project",+ description="Set up project-specific configuration",+ sequence=7,+ ),+ FrameworkWorkflow(+ name="Dev Workflow",+ skill_name="a0dev-workflow",+ description="Full Agent Zero development workflow",+ sequence=8,+ ),+ ],+ ),+ }+++ # ─────────────────────────────────────────────────────────────────────────────+ # Public API+ # ─────────────────────────────────────────────────────────────────────────────+++ def get_framework(framework_id: str) -> Optional[Framework]:+ """+ Get a framework by its ID.++ Args:+ framework_id: The framework identifier (e.g., "gsd", "bmad")++ Returns:+ Framework object if found, None otherwise+ """+ return FRAMEWORK_REGISTRY.get(framework_id)+++ def list_frameworks() -> List[Framework]:+ """+ List all available frameworks.++ Returns:+ List of all Framework objects in registry order+ """+ return [FRAMEWORK_REGISTRY[fid] for fid in ALL_FRAMEWORK_IDS if fid in FRAMEWORK_REGISTRY]+++ def get_active_framework(context: "AgentContext") -> Optional[Framework]:+ """+ Get the active framework for an agent context.++ Priority:+ 1. Project-level override (if project has dev_framework set)+ 2. Global setting (settings.dev_framework)+ 3. None (no framework active)++ Args:+ context: The agent context++ Returns:+ Active Framework object, or None if "none" is selected+ """+ from python.helpers import projects+ from python.helpers.settings import get_settings++ framework_id: str = "none"++ # Check project-level override first+ project_name = projects.get_context_project_name(context)+ if project_name:+ try:+ project_data = projects.load_basic_project_data(project_name)+ project_fw = project_data.get("dev_framework", "")+ if project_fw and project_fw != "":+ framework_id = project_fw+ except Exception:+ pass++ # Fall back to global setting+ if framework_id == "none" or not framework_id:+ settings = get_settings()+ framework_id = settings.get("dev_framework", "none")++ if framework_id == "none" or not framework_id:+ return None++ return get_framework(framework_id)+++ def get_framework_options() -> List[dict]:+ """+ Get framework options formatted for settings UI select field.++ Returns:+ List of dicts with 'value' and 'label' keys+ """+ return [+ {"value": fw.id, "label": fw.name}+ for fw in list_frameworks()+ ]diff --cc python/helpers/memory.pyindex daa5dae8c,bb5cc593b..7087d2f32--- a/python/helpers/memory.py+++ b/python/helpers/memory.py@@@ -57,7 -57,7 +57,7 @@@ class MemoryMAIN = "main"FRAGMENTS = "fragments"SOLUTIONS = "solutions"-- SKILLS = "skills" # Open SKILL.md standard (replaces legacy instruments)++ INSTRUMENTS = "instruments"index: dict[str, "MyFaiss"] = {}@@@ -323,44 -323,17 +323,54 @@@recursive=True,)-- # load skills from custom, builtin, and shared directories (SKILL.md standard)-- skills_dirs = ["custom", "builtin", "shared"]-- for skills_subdir in skills_dirs:-- skills_path = files.get_abs_path("skills", skills_subdir)-- index = knowledge_import.load_knowledge(-- log_item,-- skills_path,-- index,-- {"area": Memory.Area.SKILLS.value},-- filename_pattern="**/SKILL.md",-- )-- # load project-scoped skills from all projects- try:- from python.helpers.skills_import import get_project_skills_folder- from python.helpers import projects as projects_helper- for proj in projects_helper.get_active_projects_list():- proj_skills_path = str(get_project_skills_folder(proj["name"]))- if os.path.isdir(proj_skills_path):- index = knowledge_import.load_knowledge(- log_item,- proj_skills_path,- index,- {"area": Memory.Area.SKILLS.value},- filename_pattern="**/SKILL.md",- )- except Exception:- pass++ # NOTE: Skills indexing into Memory is intentionally disabled for now.++ # If we decide to replace instruments with skills in memory, re-enable this block:++ # skills_dirs = ["custom", "builtin", "shared"]++ # for skills_subdir in skills_dirs:++ # skills_path = files.get_abs_path("usr", "skills", skills_subdir)++ # index = knowledge_import.load_knowledge(++ # log_item,++ # skills_path,++ # index,++ # {"area": Memory.Area.SKILLS.value},++ # filename_pattern="**/SKILL.md",++ # )++ #++ # try:++ # from python.helpers.skills_import import get_project_skills_folder++ # from python.helpers import projects as projects_helper++ # for proj in projects_helper.get_active_projects_list():++ # proj_skills_path = str(get_project_skills_folder(proj["name"]))++ # if os.path.isdir(proj_skills_path):++ # index = knowledge_import.load_knowledge(++ # log_item,++ # proj_skills_path,++ # index,++ # {"area": Memory.Area.SKILLS.value},++ # filename_pattern="**/SKILL.md",++ # )++ # except Exception:++ # pass++++ # load instruments descriptions++ index = knowledge_import.load_knowledge(++ log_item,++ files.get_abs_path("instruments"),++ index,++ {"area": Memory.Area.INSTRUMENTS.value},++ filename_pattern="**/*.md",++ recursive=True,++ )++ # load custom instruments descriptions- # index = knowledge_import.load_knowledge(- # log_item,- # files.get_abs_path("usr/instruments"),- # index,- # {"area": Memory.Area.INSTRUMENTS.value},- # filename_pattern="**/*.md",- # recursive=True,- # )++ index = knowledge_import.load_knowledge(++ log_item,++ files.get_abs_path("usr/instruments"),++ index,++ {"area": Memory.Area.INSTRUMENTS.value},++ filename_pattern="**/*.md",++ recursive=True,++ )return indexdiff --cc python/helpers/memory_consolidation.pyindex b8cba1892,b8cba1892..244ebbc8d--- a/python/helpers/memory_consolidation.py+++ b/python/helpers/memory_consolidation.py@@@ -82,7 -82,7 +82,7 @@@ class MemoryConsolidatorArgs:new_memory: The new memory content to process-- area: Memory area (MAIN, FRAGMENTS, SOLUTIONS, SKILLS)++ area: Memory area (MAIN, FRAGMENTS, SOLUTIONS, INSTRUMENTS)metadata: Initial metadata for the memorylog_item: Optional log item for progress trackingdiff --cc python/helpers/migration.pyindex f60a5005e,000000000..e502aa9a1mode 100644,000000..100644--- a/python/helpers/migration.py+++ b/python/helpers/migration.py@@@ -1,112 -1,0 +1,114 @@@+import os+from python.helpers import files+from python.helpers.print_style import PrintStyle++def migrate_user_data() -> None:+ """+ Migrate user data from /tmp and other locations to /usr.+ """++ PrintStyle().print("Checking for data migration...")++ # --- Migrate Directories -------------------------------------------------------+ # Move directories from tmp/ or other source locations to usr/++ _move_dir("tmp/chats", "usr/chats")+ _move_dir("tmp/scheduler", "usr/scheduler", overwrite=True)+ _move_dir("tmp/uploads", "usr/uploads")+ _move_dir("tmp/upload", "usr/upload")+ _move_dir("tmp/downloads", "usr/downloads")+ _move_dir("tmp/email", "usr/email")+ _move_dir("knowledge/custom", "usr/knowledge", overwrite=True)- _move_dir("skills/custom", "usr/skills", overwrite=True)++ _move_dir("skills/custom", "usr/skills/custom", overwrite=True)++ # --- Migrate Files -------------------------------------------------------------+ # Move specific configuration files to usr/++ _move_file("tmp/settings.json", "usr/settings.json")+ _move_file("tmp/secrets.env", "usr/secrets.env")+ _move_file(".env", "usr/.env", overwrite=True)++ # --- Special Migration Cases ---------------------------------------------------++ # Migrate Memory+ _migrate_memory()++ # Flatten default directories (knowledge/default -> knowledge/, etc.)+ # We use _merge_dir_contents because we want to move the *contents* of default/+ # into the parent directory, not move the default directory itself.+ _merge_dir_contents("knowledge/default", "knowledge")- _merge_dir_contents("skills/default", "skills")++ _merge_dir_contents("skills/default", "usr/skills")++ # --- Cleanup -------------------------------------------------------------------++ # Remove obsolete directories after migration+ _cleanup_obsolete()++ PrintStyle().print("Migration check complete.")++# --- Helper Functions ----------------------------------------------------------++def _move_dir(src: str, dst: str, overwrite: bool = False) -> None:+ """+ Move a directory from src to dst if src exists and dst does not.+ """+ if files.exists(src) and (not files.exists(dst) or overwrite):+ PrintStyle().print(f"Migrating {src} to {dst}...")+ if overwrite and files.exists(dst):+ files.delete_dir(dst)+ files.move_dir(src, dst)++def _move_file(src: str, dst: str, overwrite: bool = False) -> None:+ """+ Move a file from src to dst if src exists and dst does not.+ """+ if files.exists(src) and (not files.exists(dst) or overwrite):+ PrintStyle().print(f"Migrating {src} to {dst}...")+ files.move_file(src, dst)++def _migrate_memory(base_path: str = "memory") -> None:+ """+ Migrate memory subdirectories.+ """+ subdirs = files.get_subdirectories(base_path)+ for subdir in subdirs:+ if subdir == "embeddings":+ # Special case: Embeddings+ _move_dir("memory/embeddings", "tmp/memory/embeddings")+ else:+ # Move other memory items to usr/memory+ dst = f"usr/memory/{subdir}"+ _move_dir(f"memory/{subdir}", dst)++def _merge_dir_contents(src_parent: str, dst_parent: str) -> None:+ """- Moves all subdirectories from src_parent to dst_parent.++ Moves all items from src_parent to dst_parent.+ Useful for flattening structures like 'knowledge/default/*' -> 'knowledge/*'.+ """+ if not files.exists(src_parent):+ return+- # Iterate over subdirectories in the source parent- subdirs = files.get_subdirectories(src_parent)- for subdir in subdirs:- src = f"{src_parent}/{subdir}"- dst = f"{dst_parent}/{subdir}"-- # Move the subdirectory if it doesn't exist in destination- _move_dir(src, dst)++ entries = files.list_files(src_parent)++ for entry in entries:++ src = f"{src_parent}/{entry}"++ dst = f"{dst_parent}/{entry}"++ abs_src = files.get_abs_path(src)++ if os.path.isdir(abs_src):++ _move_dir(src, dst)++ elif os.path.isfile(abs_src):++ _move_file(src, dst)++def _cleanup_obsolete() -> None:+ """+ Remove directories that are no longer needed.+ """+ to_remove = [+ "knowledge/default",+ "skills/default",++ "skills",+ "memory"+ ]+ for path in to_remove:+ if files.exists(path):+ PrintStyle().print(f"Removing {path}...")+ files.delete_dir(path)diff --cc python/helpers/settings.pyindex 3cb243ac1,4ca77dab5..8c7233e38--- a/python/helpers/settings.py+++ b/python/helpers/settings.py@@@ -200,9 -201,8 +203,10 @@@ class SettingsOutputAdditional(TypedDicagent_subdirs: list[FieldOption]knowledge_subdirs: list[FieldOption]stt_models: list[FieldOption]+ framework_options: list[FieldOption]is_dockerized: bool+ runtime_settings: dict[str, Any]+class SettingsOutput(TypedDict):settings: Settings@@@ -253,8 -254,8 +259,9 @@@ def convert_out(settings: Settings) ->{"value": "large", "label": "Large (1.5B, Multilingual)"},{"value": "turbo", "label": "Turbo (Multilingual)"},],+ runtime_settings={},+ framework_options=cast(list[FieldOption], frameworks.get_framework_options()),- )+ ),)# ensure dropdown options include currently selected valuesdiff --cc python/helpers/skills.pyindex 14abbbab5,4b2d58b7e..af976a66a--- a/python/helpers/skills.py+++ b/python/helpers/skills.py@@@ -14,7 -14,7 +14,7 @@@ except Exception: # pragma: no coveyaml = None # type: ignore- SkillSource = Literal["custom", "builtin", "shared", "project"]-SkillSource = Literal["custom", "builtin", "shared", "framework"]++SkillSource = Literal["custom", "builtin", "shared", "project", "framework"]@dataclass(slots=True)@@@ -31,6 -31,6 +31,7 @@@ class Skilltriggers: List[str] = field(default_factory=list)allowed_tools: List[str] = field(default_factory=list)license: str = ""++ compatibility: str = ""metadata: Dict[str, Any] = field(default_factory=dict)# Optional heavy fields (only set when requested)@@@ -39,27 -39,33 +40,34 @@@def get_skills_base_dir() -> Path:-- return Path(files.get_abs_path("skills"))++ return Path(files.get_abs_path("usr", "skills"))def get_skill_roots(order: Optional[List[SkillSource]] = None,+ project_name: Optional[str] = None,+ framework_id: Optional[str] = None,) -> List[Tuple[SkillSource, Path]]:- """- Get skill root directories in priority order.-- Args:- order: List of skill sources to search (default: custom, builtin, shared)- framework_id: If provided and not "none", framework skills are added at highest priority-- Returns:- List of (source, path) tuples in priority order- """base = get_skills_base_dir()order = order or ["custom", "builtin", "shared"]roots: List[Tuple[SkillSource, Path]] = [(src, base / src) for src in order]+ # Framework skills take priority when active+ if framework_id and framework_id != "none":+ fw_path = base / "frameworks" / framework_id+ if fw_path.exists():+ roots.insert(0, ("framework", fw_path))++ # Include project-scoped skills if a project is active+ if project_name:+ try:+ from python.helpers.skills_import import get_project_skills_folder+ project_skills = get_project_skills_folder(project_name)+ if project_skills.exists():+ roots.insert(0, ("project", project_skills))+ except Exception:+ pass+return roots@@@ -99,8 -105,8 +107,11 @@@ def _coerce_list(value: Any) -> List[stif isinstance(value, tuple):return [str(v).strip() for v in list(value) if str(v).strip()]if isinstance(value, str):-- # Support comma-separated strings-- parts = [p.strip() for p in value.split(",")]++ # Support comma-separated or space-delimited strings++ if "," in value:++ parts = [p.strip() for p in value.split(",")]++ else:++ parts = [p.strip() for p in re.split(r"\s+", value)]return [p for p in parts if p]return [str(value).strip()] if str(value).strip() else []@@@ -235,11 -241,11 +246,14 @@@ def skill_from_markdown)tags = _coerce_list(fm.get("tags") or fm.get("tag"))-- allowed_tools = _coerce_list(fm.get("allowed_tools") or fm.get("tools"))++ allowed_tools = _coerce_list(++ fm.get("allowed-tools") or fm.get("allowed_tools") or fm.get("tools")++ )version = str(fm.get("version") or "").strip()author = str(fm.get("author") or "").strip()license_ = str(fm.get("license") or "").strip()++ compatibility = str(fm.get("compatibility") or "").strip()meta = fm.get("metadata")if not isinstance(meta, dict):@@@ -258,6 -264,6 +272,7 @@@allowed_tools=allowed_tools,license=license_,metadata=dict(meta),++ compatibility=compatibility,raw_frontmatter=fm if include_content else {},content=body if include_content else "",)@@@ -269,11 -275,11 +284,16 @@@ def list_skillsinclude_content: bool = False,dedupe: bool = True,root_order: Optional[List[SkillSource]] = None,+ project_name: Optional[str] = None,+ framework_id: Optional[str] = None,) -> List[Skill]:skills: List[Skill] = []- roots = get_skill_roots(order=root_order, project_name=project_name)- roots = get_skill_roots(order=root_order, framework_id=framework_id)++ roots = get_skill_roots(++ order=root_order,++ project_name=project_name,++ framework_id=framework_id,++ )for source, root in roots:for skill_md in discover_skill_md_files(root):s = skill_from_markdown(skill_md, source, include_content=include_content)@@@ -297,13 -303,13 +317,18 @@@ def find_skill*,include_content: bool = False,root_order: Optional[List[SkillSource]] = None,+ project_name: Optional[str] = None,+ framework_id: Optional[str] = None,) -> Optional[Skill]:target = _normalize_name(skill_name)if not target:return None- roots = get_skill_roots(order=root_order, project_name=project_name)- roots = get_skill_roots(order=root_order, framework_id=framework_id)++ roots = get_skill_roots(++ order=root_order,++ project_name=project_name,++ framework_id=framework_id,++ )for source, root in roots:for skill_md in discover_skill_md_files(root):s = skill_from_markdown(skill_md, source, include_content=include_content)@@@ -314,13 -320,18 +339,24 @@@return None- def search_skills(query: str, *, limit: int = 25, project_name: Optional[str] = None) -> List[Skill]:+ def search_skills(+ query: str,+ *,+ limit: int = 25,++ project_name: Optional[str] = None,+ framework_id: Optional[str] = None,+ ) -> List[Skill]:q = (query or "").strip().lower()if not q:return []terms = [t for t in re.split(r"\s+", q) if t]- candidates = list_skills(include_content=False, dedupe=True, project_name=project_name)- candidates = list_skills(include_content=False, dedupe=True, framework_id=framework_id)++ candidates = list_skills(++ include_content=False,++ dedupe=True,++ project_name=project_name,++ framework_id=framework_id,++ )scored: List[Tuple[int, Skill]] = []for s in candidates:@@@ -344,6 -355,6 +380,46 @@@return [s for _score, s in scored[:limit]]++_NAME_RE = re.compile(r"^[a-z0-9-]+$")++++++def validate_skill(skill: Skill) -> List[str]:++ issues: List[str] = []++ name = (skill.name or "").strip()++ desc = (skill.description or "").strip()++++ if not name:++ issues.append("Missing required field: name")++ else:++ if not (1 <= len(name) <= 64):++ issues.append("name must be 1-64 characters")++ if not _NAME_RE.match(name):++ issues.append("name must use lowercase letters, numbers, and hyphens only")++ if name.startswith("-") or name.endswith("-"):++ issues.append("name must not start or end with a hyphen")++ if "--" in name:++ issues.append("name must not contain consecutive hyphens")++ if skill.path and _normalize_name(skill.path.name) != _normalize_name(name):++ issues.append("name should match the parent directory name")++++ if not desc:++ issues.append("Missing required field: description")++ elif len(desc) > 1024:++ issues.append("description must be <= 1024 characters")++++ if skill.compatibility and len(skill.compatibility) > 500:++ issues.append("compatibility must be <= 500 characters")++++ return issues++++++def validate_skill_md(skill_md_path: Path, source: SkillSource) -> List[str]:++ skill = skill_from_markdown(skill_md_path, source, include_content=False)++ if not skill:++ return ["Unable to parse SKILL.md frontmatter"]++ return validate_skill(skill)++++def safe_path_within_dir(base_dir: Path, rel_path: str) -> Path:"""Resolve rel_path inside base_dir, preventing directory traversal.diff --cc python/helpers/skills_cli.pyindex 357bac612,357bac612..ef6f6f9ea--- a/python/helpers/skills_cli.py+++ b/python/helpers/skills_cli.py@@@ -47,7 -47,7 +47,7 @@@ class Skilldef get_skills_dirs() -> List[Path]:"""Get all skill directories"""-- base = Path(files.get_abs_path("skills"))++ base = Path(files.get_abs_path("usr", "skills"))return [base / "builtin",base / "custom",@@@ -156,7 -156,7 +156,7 @@@ def validate_skill(skill: Skill) -> Lisdef create_skill(name: str, description: str = "", author: str = "") -> Path:"""Create a new skill from template"""# Use custom directory for user-created skills-- custom_dir = Path(files.get_abs_path("skills/custom"))++ custom_dir = Path(files.get_abs_path("usr", "skills", "custom"))custom_dir.mkdir(parents=True, exist_ok=True)skill_dir = custom_dir / namediff --cc python/helpers/skills_import.pyindex 89b407fe2,89b407fe2..bc405245b--- a/python/helpers/skills_import.py+++ b/python/helpers/skills_import.py@@@ -187,7 -187,7 +187,7 @@@ def import_skillsproject_name: Optional[str] = None,) -> ImportResult:"""-- Import external Skills into skills/<dest_subdir>/<namespace>/...++ Import external Skills into usr/skills/<dest_subdir>/<namespace>/...If dest_subdir is "project", imports into the project's .a0proj/skills/ folder.@@@ -208,7 -208,7 +208,7 @@@raise ValueError("project_name is required when dest_subdir is 'project'")dest_root = get_project_skills_folder(project_name)else:-- dest_root = Path(files.get_abs_path("skills", dest_subdir))++ dest_root = Path(files.get_abs_path("usr", "skills", dest_subdir))dest_root.mkdir(parents=True, exist_ok=True)extracted_root: Optional[Path] = Nonediff --cc python/tools/skills_tool.pyindex 48103f5d8,7afb62052..19b61a1fa--- a/python/tools/skills_tool.py+++ b/python/tools/skills_tool.py@@@ -5,8 -8,8 +5,9 @@@ from typing import Lisfrom python.helpers.tool import Tool, Responsefrom python.helpers import files+from python.helpers import projectsfrom python.helpers import skills as skills_helper+ from python.helpers import frameworksclass SkillsTool(Tool):@@@ -18,14 -21,18 +19,20 @@@- search (query)- load (skill_name)- read_file (skill_name, file_path)- - execute_script (skill_name, script_path, script_args, arg_style)- arg_style options for execute_script:- - "positional" (default): Pass values as positional args (sys.argv[1], sys.argv[2])- Example: {"input": "file.pdf", "output": "/tmp"} → sys.argv = ['script.py', 'file.pdf', '/tmp']- - "named": Pass as --key value pairs (for argparse/click scripts)- Example: {"input": "file.pdf", "output": "/tmp"} → sys.argv = ['script.py', '--input', 'file.pdf', '--output', '/tmp']- - "env": Only use environment variables (SKILL_ARG_INPUT, SKILL_ARG_OUTPUT)-- Environment variables (SKILL_ARG_*) are always set regardless of arg_style.+ Script execution is handled by code_execution_tool directly."""+ def _get_project_name(self) -> str | None:+ ctx = getattr(self.agent, "context", None)+ return projects.get_context_project_name(ctx) if ctx else None+++ def _get_framework_id(self) -> str | None:++ try:++ framework = frameworks.get_active_framework(self.agent.context)++ return framework.id if framework else None++ except Exception:++ return Noneasync def execute(self, **kwargs) -> Response:method = ((kwargs.get("method") or self.args.get("method") or self.method or "")@@@ -57,10 -73,19 +64,18 @@@except Exception as e: # keep tool robust; return error instead of crashing loopreturn Response(message=f"Error in skills_tool: {e}", break_loop=False)- def _get_active_framework_id(self) -> str | None:- """Get the active framework ID from the agent's context."""- try:- framework = frameworks.get_active_framework(self.agent.context)- return framework.id if framework else None- except Exception:- return None-def _list(self) -> str:- skills = skills_helper.list_skills(include_content=False, dedupe=True, project_name=self._get_project_name())- framework_id = self._get_active_framework_id()- skills = skills_helper.list_skills(include_content=False, dedupe=True, framework_id=framework_id)++ skills = skills_helper.list_skills(++ include_content=False,++ dedupe=True,++ project_name=self._get_project_name(),++ framework_id=self._get_framework_id(),++ )if not skills:-- return "No skills found. Expected SKILL.md files under: skills/{custom,builtin,shared}."++ return (++ "No skills found. Expected SKILL.md files under: "++ "usr/skills/{custom,builtin,shared} or project .a0proj/skills."++ )# Stable output: sort by nameskills_sorted = sorted(skills, key=lambda s: (s.name.lower(), s.source))@@@ -82,7 -107,8 +97,12 @@@if not query:return "Error: 'query' is required for method=search."- results = skills_helper.search_skills(query, limit=25, project_name=self._get_project_name())- framework_id = self._get_active_framework_id()- results = skills_helper.search_skills(query, limit=25, framework_id=framework_id)++ results = skills_helper.search_skills(++ query,++ limit=25,++ project_name=self._get_project_name(),++ framework_id=self._get_framework_id(),++ )if not results:return f"No skills matched query: {query!r}"@@@ -101,24 -127,25 +121,36 @@@if not skill_name:return "Error: 'skill_name' is required for method=load."- skill = skills_helper.find_skill(skill_name, include_content=True, project_name=self._get_project_name())- framework_id = self._get_active_framework_id()- skill = skills_helper.find_skill(skill_name, include_content=True, framework_id=framework_id)++ skill = skills_helper.find_skill(++ skill_name,++ include_content=True,++ project_name=self._get_project_name(),++ framework_id=self._get_framework_id(),++ )if not skill:return f"Error: skill not found: {skill_name!r}. Try skills_tool method=list or method=search."# Enumerate files under the skill directory for progressive disclosurereferenced_files = self._list_skill_files(skill.path, max_files=80)rel_skill_dir = Path(files.deabsolute_path(str(skill.path)))++ if self.agent.config.code_exec_ssh_enabled:++ runtime_path = files.normalize_a0_path(str(skill.path))++ else:++ runtime_path = str(skill.path)lines: List[str] = []lines.append(f"Skill: {skill.name}")lines.append(f"Source: {skill.source}")lines.append(f"Path: {rel_skill_dir}")++ lines.append(f"Runtime path: {runtime_path}")if skill.version:lines.append(f"Version: {skill.version}")if skill.author:lines.append(f"Author: {skill.author}")if skill.license:lines.append(f"License: {skill.license}")++ if skill.compatibility:++ lines.append(f"Compatibility: {skill.compatibility}")if skill.tags:lines.append(f"Tags: {', '.join(skill.tags)}")if skill.allowed_tools:@@@ -151,7 -178,8 +183,12 @@@if not file_path:return "Error: 'file_path' is required for method=read_file."- skill = skills_helper.find_skill(skill_name, include_content=False, project_name=self._get_project_name())- framework_id = self._get_active_framework_id()- skill = skills_helper.find_skill(skill_name, include_content=False, framework_id=framework_id)++ skill = skills_helper.find_skill(++ skill_name,++ include_content=False,++ project_name=self._get_project_name(),++ framework_id=self._get_framework_id(),++ )if not skill:return f"Error: skill not found: {skill_name!r}."diff --cc usr/skills/builtin/create_skill/SKILL.mdindex 272cea972,272cea972..4b91db991--- a/usr/skills/builtin/create_skill/SKILL.md+++ b/usr/skills/builtin/create_skill/SKILL.md@@@ -66,7 -66,7 +66,7 @@@ Your skill instructions go here..## Skill Directory Structure```--skills/++usr/skills/└── custom/└── my-skill/├── SKILL.md # Required: Main skill file@@@ -172,7 -172,7 +172,7 @@@ If your skill needs scripts or template```bash# Create directory structure--mkdir -p skills/custom/my-skill/{scripts,templates,docs}++mkdir -p usr/skills/custom/my-skill/{scripts,templates,docs}```## Example: Complete Skill@@@ -258,12 -258,12 +258,12 @@@ print(f"Took {elapsed:.4f} seconds"1. Create skill directory:```bash-- mkdir -p skills/custom/my-skill++ mkdir -p usr/skills/custom/my-skill```2. Create SKILL.md:```bash-- touch skills/custom/my-skill/SKILL.md++ touch usr/skills/custom/my-skill/SKILL.md```3. Add content and save@@@ -277,7 -277,7 +277,7 @@@ To share skills with others1. Create a GitHub repository2. Include the skill directory structure3. Add a README with installation instructions--4. Users can copy to their `skills/custom/` directory++4. Users can copy to their `usr/skills/custom/` directory## Testing Your Skilldiff --cc usr/skills/frameworks/agent-zero-dev/README.mdindex 000000000,e57d526a2..f772a735amode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/README.md+++ b/usr/skills/frameworks/agent-zero-dev/README.md@@@ -1,0 -1,166 +1,166 @@@+ # Agent Zero Development Framework++ A comprehensive development framework for extending and building features for the Agent Zero AI framework.++ ## Overview++ This framework provides everything you need to extend Agent Zero:++ - 🛠️ **Code Generators** - Scaffold tools, extensions, skills, and APIs+ - 📚 **Documentation** - Architecture guides, best practices, and quickstart+ - 🧩 **Templates** - Boilerplate code following framework patterns+ - 🎯 **Examples** - Real-world patterns and use cases++ ## Quick Start++ ```bash+ # Create a new tool+ python scripts/create_tool.py MyTool "Description of what it does"++ # Create an extension+ python scripts/create_extension.py agent_init MyExtension "What it does"++ # Create a skill+ python scripts/create_skill.py my-skill "Skill description"++ # Create an API endpoint+ python scripts/create_api.py MyEndpoint "What it does"+ ```++ ## What's Included++ ### Scripts++ | Script | Purpose | Usage |+ |--------|---------|-------|+ | `create_tool.py` | Generate tool boilerplate | `python create_tool.py ToolName "Description"` |+ | `create_extension.py` | Generate extension boilerplate | `python create_extension.py hook_point ExtName` |+ | `create_skill.py` | Generate skill boilerplate | `python create_skill.py skill-name "Description"` |+ | `create_api.py` | Generate API endpoint boilerplate | `python create_api.py EndpointName "Description"` |++ ### Documentation++ | Document | Contents |+ |----------|----------|+ | [SKILL.md](SKILL.md) | Main framework documentation |+ | [docs/quickstart.md](docs/quickstart.md) | 5-minute quickstart guide |+ | [docs/architecture.md](docs/architecture.md) | Deep dive into architecture |+ | [docs/best-practices.md](docs/best-practices.md) | Coding standards and patterns |++ ### Directory Structure++ ```+ agent-zero-dev/+ ├── SKILL.md # Main skill documentation+ ├── README.md # This file+ ├── scripts/ # Code generator scripts+ │ ├── create_tool.py+ │ ├── create_extension.py+ │ ├── create_skill.py+ │ └── create_api.py+ ├── templates/ # Placeholder for templates+ └── docs/ # Additional documentation+ ├── quickstart.md+ ├── architecture.md+ └── best-practices.md+ ```++ ## Usage++ ### Activating This Skill++ This skill activates automatically when you mention:+ - "extend agent zero"+ - "create a tool"+ - "build agent zero feature"+ - "agent zero development"++ ### Example Workflows++ #### Creating a Weather Tool++ ```bash+ # 1. Generate the tool+ python scripts/create_tool.py WeatherLookup "Get weather for a location"++ # 2. Edit /a0/python/tools/weather_lookup.py+ # - Add your weather API logic+ # - Update docstrings++ # 3. Restart Agent Zero+ # - The tool loads automatically+ ```++ #### Creating a Custom Skill++ ```bash+ # 1. Generate the skill+ python scripts/create_skill.py data-processor "Process CSV and JSON data"+-# 2. Edit /a0/skills/custom/data-processor/SKILL.md++# 2. Edit /a0/usr/skills/custom/data-processor/SKILL.md+ # - Add trigger patterns+ # - Write step-by-step instructions++ # 3. Test it+ # "Use data-processor to analyze my CSV"+ ```++ ## Architecture Overview++ Agent Zero is built on these extension points:++ 1. **Tools** - Agent capabilities (web search, code execution)+ 2. **Extensions** - Lifecycle hooks (initialization, message processing)+ 3. **Skills** - Reusable instruction bundles (SKILL.md standard)+ 4. **APIs** - Web UI endpoints (FastAPI)+ 5. **Subordinates** - Specialized agent profiles+ 6. **Projects** - Isolated workspaces with custom config++ ## Development Workflow++ ```+ 1. Brainstorm → Identify what to build+ 2. Plan → Choose the right extension point+ 3. Scaffold → Use scripts to generate boilerplate+ 4. Implement → Fill in your logic+ 5. Test → Verify with the agent+ 6. Refine → Iterate based on results+ ```++ ## Best Practices++ - ✅ Follow existing patterns in the codebase+ - ✅ Write clear docstrings and comments+ - ✅ Handle errors gracefully+ - ✅ Test thoroughly before deploying+ - ✅ Update documentation++ ## Contributing++ When adding to this framework:++ 1. Follow the SKILL.md standard+ 2. Include examples in documentation+ 3. Test scripts before committing+ 4. Update this README++ ## Resources++ - [Agent Zero Main Documentation](https://github.com/frdel/agent-zero)+ - [SKILL.md Standard](https://github.com/anthropics/skills/blob/main/SKILL.md)+ - [Python Async/Await Guide](https://docs.python.org/3/library/asyncio.html)+ - [FastAPI Documentation](https://fastapi.tiangolo.com/)++ ## License++ Part of the Agent Zero framework - follow the same license terms.++ ## Support++ - Check [docs/troubleshooting.md](docs/troubleshooting.md) (if exists)+ - Review [docs/best-practices.md](docs/best-practices.md)+ - Examine existing code in `/a0/python/`++ ---++ **Ready to extend Agent Zero?** Start with [docs/quickstart.md](docs/quickstart.md)!diff --cc usr/skills/frameworks/agent-zero-dev/SKILL.mdindex 000000000,4c1a969a5..b8560b66amode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/SKILL.md+++ b/usr/skills/frameworks/agent-zero-dev/SKILL.md@@@ -1,0 -1,705 +1,702 @@@+ ---+ name: "agent-zero-dev"+ description: "Development framework for extending and building features for the Agent Zero AI framework. Provides patterns, templates, and best practices for creating tools, extensions, skills, API endpoints, subordinate profiles, and framework components."+ version: "1.0.0"+ author: "Agent Zero Team"+ tags: ["development", "framework", "agent-zero", "extending", "tools", "extensions", "skills", "api"]+ trigger_patterns:+ - "extend agent zero"+ - "agent zero development"+ - "build agent zero feature"+ - "create agent zero tool"+ - "add extension"+ - "framework development"+ - "agent zero skill"+ ---++ # Agent Zero Development Framework++ This framework provides comprehensive guidance for extending and building features for the Agent Zero AI framework. Use this skill when you need to:++ - Create new **Tools** for agent capabilities+ - Add **Extensions** to hook into framework lifecycle+ - Build **Skills** following the SKILL.md standard+ - Develop **API Endpoints** for the Web UI+ - Create **Subordinate Profiles** for specialized agents+ - Extend **Projects** with custom configuration+ - Understand framework **Architecture** and patterns++ ## Quick Start++ Choose your extension point:++ | Component | Use Case | Location |+ |-----------|----------|----------|+ | **Tools** | Add agent capabilities (web search, code execution) | `python/tools/` |+ | **Extensions** | Hook into lifecycle events | `python/extensions/<hook_point>/` |-| **Skills** | Create reusable instruction bundles | `skills/custom/<skill-name>/` |++| **Skills** | Create reusable instruction bundles | `usr/skills/custom/<skill-name>/` |+ | **API Endpoints** | Add Web UI functionality | `python/api/` |+ | **Subordinates** | Create specialized agent profiles | `agents/<profile>/` |+ | **Projects** | Project-specific configuration | `.a0proj/` |++ ---++ ## Architecture Overview++ ### Core Components++ ```+ Agent Zero Framework Architecture+ ├── python/+ │ ├── tools/ # Agent capabilities (inherit from Tool)+ │ ├── extensions/ # Lifecycle hooks (numbered execution)+ │ ├── api/ # FastAPI endpoints (inherit from ApiHandler)+ │ └── helpers/ # Utility functions and base classes-├── skills/++├── usr/skills/+ │ ├── builtin/ # Built-in skills (system)+ │ ├── custom/ # User-created skills+ │ └── frameworks/ # Multi-phase framework skills+ ├── agents/+ │ └── <profile>/ # Subordinate agent profiles+ ├── memory/ # FAISS-based vector memory+ └── tmp/+ └── chats/ # Conversation storage+ ```++ ### Key Patterns++ 1. **Extensions execute in numeric order** (`_10_*.py`, `_20_*.py`, etc.)+ 2. **Tools inherit from `Tool` base class** with `execute()` method+ 3. **Skills use progressive disclosure** (metadata → content → scripts)+ 4. **Shared AgentContext** enables memory persistence across agents+ 5. **Async/await throughout** for non-blocking operations++ ---++ ## Creating Tools++ Tools are the primary way agents interact with the world. Each tool inherits from the `Tool` base class.++ ### Tool Structure++ ```python+ # python/tools/my_tool.py+ from python.helpers.tool import Tool, Response++ class MyTool(Tool):+ """+ Brief description of what this tool does.++ Arguments (tool_args):+ - arg1: Description of first argument+ - arg2: Description of second argument+ """++ async def execute(self, **kwargs) -> Response:+ # Get arguments from kwargs or self.args+ arg1 = kwargs.get("arg1") or self.args.get("arg1")+ arg2 = kwargs.get("arg2") or self.args.get("arg2")++ # Tool logic here+ result = await self.do_something(arg1, arg2)++ return Response(+ message=result,+ break_loop=False # Set True to end agent loop+ )++ async def do_something(self, arg1, arg2):+ # Implement tool functionality+ pass+ ```++ ### Tool Best Practices++ 1. **Always document args** in the class docstring+ 2. **Use `Response` objects** for consistent return format+ 3. **Handle errors gracefully** - return error message, don't crash+ 4. **Access agent context** via `self.agent.context`+ 5. **Use kwargs fallback** to `self.args` for flexibility++ ### Example: Complete Tool++ ```python+ # python/tools/data_processor.py+ from python.helpers.tool import Tool, Response+ import json++ class DataProcessor(Tool):+ """+ Process and transform data structures.++ Arguments (tool_args):+ - operation: The operation to perform (filter, map, reduce)+ - data: JSON data to process+ - key: Key to filter/sort by (for filter/sort operations)+ - value: Value to filter by (for filter operation)+ """++ async def execute(self, **kwargs) -> Response:+ try:+ operation = kwargs.get("operation") or self.args.get("operation", "")+ data_str = kwargs.get("data") or self.args.get("data", "[]")+ key = kwargs.get("key") or self.args.get("key")+ value = kwargs.get("value") or self.args.get("value")++ data = json.loads(data_str)++ if operation == "filter":+ result = [item for item in data if item.get(key) == value]+ elif operation == "sort":+ result = sorted(data, key=lambda x: x.get(key))+ else:+ return Response(message=f"Unknown operation: {operation}", break_loop=False)++ return Response(+ message=json.dumps(result, indent=2),+ break_loop=False+ )+ except Exception as e:+ return Response(message=f"Error processing data: {e}", break_loop=False)+ ```++ ---++ ## Creating Extensions++ Extensions hook into specific points in the agent lifecycle. They execute in numeric order.++ ### Extension Hook Points++ | Hook Point | When It Fires | Use For |+ |------------|---------------|---------|+ | `agent_init` | Agent initialization | Loading configs, setting defaults |+ | `message_loop_start` | Before message processing | Pre-processing, logging |+ | `message_loop_end` | After message processing | Cleanup, post-processing |+ | `before_main_llm_call` | Before LLM API call | Modifying prompts, adding context |+ | `response_stream_start` | When response streaming begins | Initializing stream handlers |+ | `response_stream_chunk` | Per response chunk | Transforming output |+ | `response_stream_end` | When streaming ends | Finalizing, cleanup |+ | `tool_execute_before` | Before tool execution | Validation, logging |+ | `tool_execute_after` | After tool execution | Post-processing results |++ ### Extension Structure++ ```python+ # python/extensions/<hook_point>/_10_my_extension.py+ from python.helpers.extension import Extension+ from python.helpers.print_style import PrintStyle++ class MyExtension(Extension):+ """+ Brief description of extension purpose.+ """++ async def execute(self, **kwargs):+ # Access the agent+ agent = self.agent+ context = agent.context++ # Extension logic+ PrintStyle.hint("MyExtension executing...")++ # Modify data if needed (check kwargs for hook-specific data)+ data = kwargs.get("data", {})+ data["modified"] = True++ # Return modified data if applicable+ return data+ ```++ ### Extension Execution Order++ Extensions execute in numeric order based on filename prefix:++ ```+ _10_load_config.py # Runs first+ _20_validate.py # Runs second+ _30_process.py # Runs third+ ```++ Use 10-number increments to leave room for future extensions.++ ### Example: Agent Init Extension++ ```python+ # python/extensions/agent_init/_15_load_custom_config.py+ from python.helpers.extension import Extension+ from python.helpers import files+ import json++ class LoadCustomConfig(Extension):+ """+ Load custom configuration from .a0proj/config.json+ """++ async def execute(self, **kwargs):+ agent = self.agent+ context = agent.context++ config_path = files.get_abs_path(".a0proj/config.json")+ if files.exists(config_path):+ with open(config_path, 'r') as f:+ config = json.load(f)+ context.data["custom_config"] = config++ return kwargs.get("data", {})+ ```++ ---++ ## Creating Skills++ Skills are reusable instruction bundles following the SKILL.md standard.++ ### Skill Directory Structure++ ```-skills/custom/my-skill/++usr/skills/custom/my-skill/+ ├── SKILL.md # Required: Main skill file+ ├── scripts/ # Optional: Helper scripts+ │ ├── helper.py+ │ └── process.sh+ ├── templates/ # Optional: Templates+ │ └── template.md+ └── docs/ # Optional: Additional docs+ └── examples.md+ ```++ ### SKILL.md Format++ ```yaml+ ---+ name: "skill-name"+ description: "Clear description of what this skill does and when to use it"+ version: "1.0.0"+ author: "Your Name"+ tags: ["category1", "category2"]+ trigger_patterns:+ - "keyword1"+ - "phrase that triggers this"+ ---++ # Skill Title++ ## When to Use+ Describe trigger conditions and use cases.++ ## The Process+ Step-by-step instructions for the agent to follow.++ ### Step 1: First Action+ Details...++ ### Step 2: Second Action+ Details...++ ## Examples+ Show sample interactions.++ ## Scripts+ Reference any helper scripts:+ - `scripts/helper.py` - Does X+ - `scripts/process.sh` - Does Y++ ## Tips+ Additional guidance and best practices.+ ```++ ### Using Skills++ ```python+ # Load skill metadata+ await skills_tool.execute(method="list")++ # Load full skill content+ await skills_tool.execute(method="load", skill_name="my-skill")+-# Execute skill script-await skills_tool.execute(- method="execute_script",- skill_name="my-skill",- script_path="scripts/helper.py",- script_args={"input": "value"},- arg_style="positional" # or "named" or "env"++# Execute skill script (use runtime path from the load output)++await code_execution_tool.execute(++ runtime="python",++ code="python /a0/usr/skills/custom/my-skill/scripts/helper.py input"+ )+ ```++ ---++ ## Creating API Endpoints++ API endpoints serve the Web UI and external clients using FastAPI.++ ### API Endpoint Structure++ ```python+ # python/api/my_endpoint.py+ from python.helpers.api import ApiHandler, Request, Response+ from agent import AgentContext++ class MyEndpoint(ApiHandler):+ """+ Handle requests for /api/my-endpoint+ """++ async def process(self, input: dict, request: Request) -> dict | Response:+ # Get query params or JSON body+ param = input.get("param", "default")++ # Get or create agent context+ ctxid = input.get("context", "")+ context = self.use_context(ctxid)++ # Process request+ result = await self.process_request(param, context)++ return {+ "result": result,+ "context": context.id,+ }++ async def process_request(self, param, context):+ # Implement endpoint logic+ return {"processed": param}+ ```++ ### API Best Practices++ 1. **Use `ApiHandler` base class** for consistent request/response handling+ 2. **Get context with `self.use_context(ctxid)`** - creates if not exists+ 3. **Return dict or Response** objects+ 4. **Handle both GET and POST** if applicable+ 5. **Use `Request` object** for accessing headers, files, etc.++ ### Example: File Upload Endpoint++ ```python+ # python/api/upload_processor.py+ from python.helpers.api import ApiHandler, Request+ from werkzeug.utils import secure_filename+ import os++ class UploadProcessor(ApiHandler):+ async def process(self, input: dict, request: Request) -> dict:+ if request.method == "POST":+ uploaded_file = request.files.get("file")+ if uploaded_file:+ filename = secure_filename(uploaded_file.filename)+ save_path = f"/tmp/uploads/{filename}"+ uploaded_file.save(save_path)++ return {+ "success": True,+ "filename": filename,+ "path": save_path+ }++ return {"success": False, "error": "No file provided"}+ ```++ ---++ ## Creating Subordinate Profiles++ Subordinates are specialized agents with custom prompts and configurations.++ ### Profile Directory Structure++ ```+ agents/<profile-name>/+ ├── agent.json # Profile configuration+ └── prompts/+ ├── system.md # System prompt+ └── subordinates.md # Subordinate delegation prompts+ ```++ ### agent.json Configuration++ ```json+ {+ "name": "Specialized Agent",+ "description": "What this subordinate specializes in",+ "model": "anthropic/claude-sonnet-4-20250514",+ "temperature": 0.7,+ "max_tokens": 4000,+ "allowed_tools": [+ "code_execution_tool",+ "search_engine",+ "call_subordinate"+ ],+ "prompts": {+ "system": "prompts/system.md",+ "subordinates": "prompts/subordinates.md"+ }+ }+ ```++ ### System Prompt Template++ ```markdown+ # System Prompt for Specialized Agent++ ## Your Role+ You are a specialized agent focused on [domain].++ ## Capabilities+ - Expertise in [specific area]+ - Use tools: code_execution_tool, search_engine++ ## Process+ 1. Analyze the request+ 2. Choose appropriate tools+ 3. Execute and verify results+ 4. Return structured response++ ## Output Format+ Always respond with valid JSON:+ ```json+ {+ "result": "your result here",+ "confidence": 0.95+ }+ ```+ ```++ ### Using Subordinates++ ```python+ # Call from main agent+ call_subordinate(+ profile="developer",+ message="Implement a Python function to calculate Fibonacci",+ reset="true"+ )+ ```++ ---++ ## Creating Projects++ Projects provide isolated workspaces with custom configuration.++ ### Project Structure++ ```+ /usr/projects/<project-name>/+ ├── .a0proj/+ │ ├── config.json # Project configuration+ │ ├── instructions.md # Project-specific instructions+ │ └── skills/ # Project-specific skills+ └── <project-files>/ # Your project files+ ```++ ### config.json++ ```json+ {+ "name": "My Project",+ "description": "Project description",+ "default_model": "anthropic/claude-sonnet-4-20250514",+ "allowed_tools": ["*"],+ "extensions": {+ "enabled": ["custom_extension"]+ },+ "skills": {+ "auto_load": ["project-specific-skill"]+ }+ }+ ```++ ### instructions.md++ ```markdown+ # Project: My Project++ ## Overview+ This project does X, Y, Z.++ ## Coding Standards+ - Use Python 3.12+ features+ - Follow PEP 8+ - Write tests for all functions++ ## Architecture+ - API layer in `api/`+ - Business logic in `services/`+ - Models in `models/`+ ```++ ---++ ## Framework Development Workflow++ When building features for Agent Zero itself, follow this workflow:++ ### Phase 1: Brainstorming+ - Define the problem and solution+ - Identify extension points (tool, extension, skill, API)+ - Review existing patterns for consistency++ ### Phase 2: Planning+ - Break work into small tasks (2-5 min each)+ - Identify dependencies and order+ - Write verification criteria for each task++ ### Phase 3: Implementation+ - Create feature branch (use git worktrees)+ - Follow TDD: test first, then implement+ - Match existing code patterns++ ### Phase 4: Code Review+ - Review against plan+ - Check pattern consistency+ - Verify tests pass++ ### Phase 5: Integration+ - Merge to main+ - Update documentation+ - Test in production context++ ---++ ## Common Patterns Reference++ ### Accessing Context Data++ ```python+ # Shared across all agents in conversation+ context = self.agent.context+ data = context.data # dict-like shared memory++ # Store data+ data["my_key"] = my_value++ # Retrieve data+ value = data.get("my_key", default)+ ```++ ### Using Helpers++ ```python+ from python.helpers import files, extension, print_style++ # File operations+ content = files.read_file("path/to/file")+ files.write_file("path/to/file", content)+ exists = files.exists("path/to/file")++ # Extensions+ await extension.call_extensions("hook_point", agent=agent, data=data)++ # Printing+ PrintStyle.hint("Hint message")+ PrintStyle.warning("Warning message")+ PrintStyle.error("Error message")+ ```++ ### Error Handling++ ```python+ try:+ result = await risky_operation()+ except Exception as e:+ # Log for debugging+ PrintStyle.error(f"Operation failed: {e}")+ # Return graceful error to user+ return Response(message=f"Error: {e}", break_loop=False)+ ```++ ### Async Patterns++ ```python+ # Concurrent execution+ tasks = [process_item(item) for item in items]+ results = await asyncio.gather(*tasks)++ # Timeouts+ try:+ result = await asyncio.wait_for(operation(), timeout=30)+ except asyncio.TimeoutError:+ return Response(message="Operation timed out", break_loop=False)+ ```++ ---++ ## Testing Your Extensions++ ### Manual Testing++ 1. **Restart the framework** after code changes+ 2. **Test with minimal input** first+ 3. **Check logs** for errors: `docker logs -f agent-zero`+ 4. **Verify in UI** that changes appear correctly++ ### Unit Testing (when available)++ ```python+ # tests/tools/test_my_tool.py+ import pytest+ from python.tools.my_tool import MyTool++ @pytest.mark.asyncio+ async def test_my_tool():+ tool = MyTool()+ result = await tool.execute(operation="test", data="{}")+ assert "success" in result.message+ ```++ ---++ ## Scripts and Templates++ This skill includes helper scripts and templates:++ ### Scripts++ | Script | Purpose | Usage |+ |--------|---------|-------|+ | `scripts/create_tool.py` | Generate tool boilerplate | `python scripts/create_tool.py ToolName` |+ | `scripts/create_extension.py` | Generate extension boilerplate | `python scripts/create_extension.py HookPoint ExtensionName` |+ | `scripts/create_skill.py` | Generate skill boilerplate | `python scripts/create_skill.py skill-name` |+ | `scripts/create_api.py` | Generate API endpoint boilerplate | `python scripts/create_api.py EndpointName` |++ ### Templates++ | Template | Purpose |+ |----------|---------|+ | `templates/tool.py` | Tool boilerplate |+ | `templates/extension.py` | Extension boilerplate |+ | `templates/SKILL.md` | Skill boilerplate |+ | `templates/api.py` | API endpoint boilerplate |++ ---++ ## Best Practices Summary++ ### DO+ - ✅ Follow existing patterns and conventions+ - ✅ Write clear docstrings and comments+ - ✅ Handle errors gracefully+ - ✅ Use type hints where applicable+ - ✅ Test your changes thoroughly+ - ✅ Update documentation+ - ✅ Use meaningful names++ ### DON'T+ - ❌ Break existing functionality+ - ❌ Ignore error cases+ - ❌ Hardcode paths or values+ - ❌ Skip documentation+ - ❌ Mix sync and async code carelessly+ - ❌ Access internal structures directly when helpers exist++ ---++ ## Need Help?++ Use this skill by saying:+ - "Help me create a new tool for..."+ - "I want to add an extension that..."+ - "Create a skill for..."+ - "Build an API endpoint for..."+ - "How do I extend Agent Zero to..."++ I'll guide you through the appropriate patterns and generate boilerplate code!diff --cc usr/skills/frameworks/agent-zero-dev/a0dev-create-api/SKILL.mdindex 000000000,0b1ec8d77..a4ce03eb9mode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/a0dev-create-api/SKILL.md+++ b/usr/skills/frameworks/agent-zero-dev/a0dev-create-api/SKILL.md@@@ -1,0 -1,286 +1,286 @@@+ ---+ name: "a0dev-create-api"+ description: "Add Web UI and REST API endpoints for Agent Zero."+ version: "1.0.0"+ author: "Agent Zero Team"+ tags: ["agent-zero-dev", "api", "endpoint", "fastapi", "webui"]+ trigger_patterns:+ - "create api"+ - "new endpoint"+ - "add api"+ - "api endpoint"+ - "/a0dev-create-api"+ ---++ # Agent Zero Dev: Create API++ API endpoints serve the Web UI and external clients using FastAPI. Each endpoint inherits from `ApiHandler`.++ ## API Location++ ```+ python/api/+ ├── poll.py # Long-polling for updates+ ├── chat.py # Chat message handling+ ├── frameworks.py # Framework management+ ├── settings.py # Settings management+ └── your_endpoint.py # New endpoints go here+ ```++ ## API Endpoint Structure++ ```python+ # python/api/my_endpoint.py+ from python.helpers.api import ApiHandler, Request, Input, Output++ class MyEndpoint(ApiHandler):+ """+ Handle requests for /api/my-endpoint++ Query params / JSON body:+ - param1: Description of param1+ - param2: Description of param2+ """++ async def process(self, input: Input, request: Request) -> Output:+ # Get parameters from input (works for both GET params and POST body)+ param1 = input.get("param1", "default")+ param2 = input.get("param2")++ try:+ # Process the request+ result = await self.do_work(param1, param2)++ return {+ "ok": True,+ "data": result,+ }+ except Exception as e:+ return {+ "ok": False,+ "error": str(e),+ }++ async def do_work(self, param1, param2):+ # Implementation+ return {"processed": param1}+ ```++ ## Type Definitions++ ```python+ Input = dict # Request parameters (query or body)+ Output = dict | Response # Return dict or FastAPI Response+ Request = fastapi.Request # Full request object+ ```++ ## URL Routing++ Endpoints are auto-routed based on filename:+ - `my_endpoint.py` → `/api/my_endpoint` or `/api/my-endpoint`+ - Class name doesn't affect routing++ ## Getting Agent Context++ ```python+ async def process(self, input: Input, request: Request) -> Output:+ # Get context ID from request+ ctxid = input.get("context", "")++ # Get or create context (creates if doesn't exist)+ context = self.use_context(ctxid)++ # Access context data+ data = context.data++ # Get the agent for this context+ agent = self.get_context_agent(context)++ return {+ "ok": True,+ "context": context.id,+ }+ ```++ ## Complete Example: Data Query Endpoint++ ```python+ # python/api/data_query.py+ from python.helpers.api import ApiHandler, Request, Input, Output+ from dataclasses import asdict++ class DataQuery(ApiHandler):+ """+ Query and manipulate stored data.++ Actions:+ - get: Retrieve data by key+ - set: Store data with key+ - list: List all keys+ - delete: Remove data by key++ Query params / JSON body:+ - action: The action to perform+ - context: Agent context ID+ - key: Data key (for get/set/delete)+ - value: Data value (for set)+ """++ async def process(self, input: Input, request: Request) -> Output:+ action = input.get("action", "list")+ ctxid = input.get("context", "")+ key = input.get("key")+ value = input.get("value")++ try:+ context = self.use_context(ctxid)++ if action == "list":+ keys = list(context.data.keys())+ return {"ok": True, "keys": keys}++ elif action == "get":+ if not key:+ return {"ok": False, "error": "Key required"}+ data = context.data.get(key)+ return {"ok": True, "key": key, "value": data}++ elif action == "set":+ if not key:+ return {"ok": False, "error": "Key required"}+ context.data[key] = value+ return {"ok": True, "key": key, "stored": True}++ elif action == "delete":+ if not key:+ return {"ok": False, "error": "Key required"}+ if key in context.data:+ del context.data[key]+ return {"ok": True, "key": key, "deleted": True}++ else:+ return {"ok": False, "error": f"Unknown action: {action}"}++ except Exception as e:+ return {"ok": False, "error": str(e)}+ ```++ ## Handling File Uploads++ ```python+ # python/api/file_upload.py+ from python.helpers.api import ApiHandler, Request, Input, Output+ from fastapi import UploadFile+ from python.helpers import files++ class FileUpload(ApiHandler):+ """Handle file uploads"""++ async def process(self, input: Input, request: Request) -> Output:+ # Access uploaded file from request+ form = await request.form()+ uploaded_file: UploadFile = form.get("file")++ if not uploaded_file:+ return {"ok": False, "error": "No file provided"}++ # Read file content+ content = await uploaded_file.read()+ filename = uploaded_file.filename++ # Save file+ save_path = f"/tmp/uploads/{filename}"+ files.write_file(save_path, content.decode())++ return {+ "ok": True,+ "filename": filename,+ "size": len(content),+ "path": save_path,+ }+ ```++ ## Streaming Responses++ ```python+ # python/api/stream_data.py+ from python.helpers.api import ApiHandler, Request, Input, Output+ from fastapi.responses import StreamingResponse+ import asyncio++ class StreamData(ApiHandler):+ """Stream data to client"""++ async def process(self, input: Input, request: Request) -> Output:+ async def generate():+ for i in range(10):+ yield f"data: {i}\n\n"+ await asyncio.sleep(0.5)++ return StreamingResponse(+ generate(),+ media_type="text/event-stream"+ )+ ```++ ## Using the Generator Script++ ```bash-python skills/frameworks/agent-zero-dev/scripts/create_api.py \++python usr/skills/frameworks/agent-zero-dev/scripts/create_api.py \+ DataQuery \+ "Query and manipulate stored data"+ ```++ Generates: `python/api/data_query.py`++ ## API Best Practices++ ### DO++ - ✅ Use `ApiHandler` base class+ - ✅ Return consistent response format (`{ok, data/error}`)+ - ✅ Document params in docstring+ - ✅ Handle errors gracefully+ - ✅ Use `self.use_context()` for context management+ - ✅ Support both GET and POST where appropriate++ ### DON'T++ - ❌ Expose sensitive data+ - ❌ Skip input validation+ - ❌ Block the event loop+ - ❌ Return inconsistent response formats+ - ❌ Forget error handling++ ## Testing Your API++ 1. **Restart Agent Zero** (APIs load at startup)+ 2. **Test with curl**:+ ```bash+ curl "http://localhost:8080/api/my_endpoint?param1=value"+ ```+ 3. **Test with browser** (for GET endpoints)+ 4. **Check logs** for errors++ ## Frontend Integration++ APIs are called from the Web UI using:++ ```javascript+ // webui/js/api.js+ import { callJsonApi, fetchApi } from "/js/api.js";++ // JSON POST with CSRF+ const result = await callJsonApi("/my_endpoint", { param1: "value" });++ // Raw fetch with CSRF+ const response = await fetchApi("/my_endpoint", { method: "GET" });+ ```++ ## Next Steps++ After creating an API:+ - Test all actions/parameters+ - Add frontend integration if needed+ - Document the endpoint+ - Consider rate limiting for public APIsdiff --cc usr/skills/frameworks/agent-zero-dev/a0dev-create-extension/SKILL.mdindex 000000000,afc054e18..b636bebedmode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/a0dev-create-extension/SKILL.md+++ b/usr/skills/frameworks/agent-zero-dev/a0dev-create-extension/SKILL.md@@@ -1,0 -1,263 +1,263 @@@+ ---+ name: "a0dev-create-extension"+ description: "Hook into Agent Zero lifecycle events with extensions."+ version: "1.0.0"+ author: "Agent Zero Team"+ tags: ["agent-zero-dev", "extension", "lifecycle", "hooks"]+ trigger_patterns:+ - "create extension"+ - "new extension"+ - "add extension"+ - "lifecycle hook"+ - "/a0dev-create-extension"+ ---++ # Agent Zero Dev: Create Extension++ Extensions hook into specific points in the agent lifecycle. They execute in numeric order based on filename prefix.++ ## Extension Hook Points++ | Hook Point | When It Fires | Use For |+ |------------|---------------|---------|+ | `agent_init` | Agent initialization | Loading configs, setting defaults |+ | `message_loop_start` | Before message processing | Pre-processing, logging |+ | `message_loop_end` | After message processing | Cleanup, post-processing |+ | `message_loop_prompts_after` | After prompts assembled | Adding context to prompts |+ | `before_main_llm_call` | Before LLM API call | Modifying prompts |+ | `response_stream_start` | Response streaming begins | Initializing handlers |+ | `response_stream_chunk` | Per response chunk | Transforming output |+ | `response_stream_end` | Streaming ends | Finalizing |+ | `tool_execute_before` | Before tool execution | Validation, logging |+ | `tool_execute_after` | After tool execution | Post-processing |+ | `hist_add_user_message` | User message added | Message interception |+ | `system_prompt` | System prompt assembly | Injecting context |++ ## Extension Location++ ```+ python/extensions/+ ├── agent_init/+ │ ├── _10_load_settings.py+ │ └── _20_your_extension.py+ ├── message_loop_start/+ ├── message_loop_end/+ ├── before_main_llm_call/+ └── <hook_point>/+ └── _NN_extension_name.py+ ```++ ## Extension Structure++ ```python+ # python/extensions/<hook_point>/_NN_my_extension.py+ from python.helpers.extension import Extension+ from python.helpers.print_style import PrintStyle++ class MyExtension(Extension):+ """+ Brief description of what this extension does.+ """++ async def execute(self, **kwargs):+ # Access the agent+ agent = self.agent+ context = agent.context++ # Extension logic+ PrintStyle.hint("MyExtension executing...")++ # Get/modify hook-specific data+ data = kwargs.get("data", {})++ # Return data (some hooks expect modified data back)+ return data+ ```++ ## Execution Order++ Extensions execute in numeric order based on filename prefix:++ ```+ _10_first.py # Runs first+ _20_second.py # Runs second+ _30_third.py # Runs third+ _55_yours.py # Your extension+ _90_last.py # Runs last+ ```++ **Convention:** Use 10-number increments to leave room for future extensions.++ ## Hook-Specific Examples++ ### Agent Init (Load Configuration)++ ```python+ # python/extensions/agent_init/_15_load_custom_config.py+ from python.helpers.extension import Extension+ from python.helpers import files+ import json++ class LoadCustomConfig(Extension):+ """Load custom configuration from .a0proj/config.json"""++ async def execute(self, **kwargs):+ agent = self.agent+ context = agent.context++ config_path = files.get_abs_path(".a0proj/config.json")+ if files.exists(config_path):+ with open(config_path, 'r') as f:+ config = json.load(f)+ context.data["custom_config"] = config++ return kwargs.get("data", {})+ ```++ ### Message Loop Start (Logging)++ ```python+ # python/extensions/message_loop_start/_10_log_message.py+ from python.helpers.extension import Extension+ import logging++ class LogMessage(Extension):+ """Log incoming messages for debugging"""++ async def execute(self, **kwargs):+ agent = self.agent+ message = kwargs.get("message", "")++ logging.info(f"Agent {agent.number} received: {message[:100]}...")++ return kwargs.get("data", {})+ ```++ ### System Prompt (Inject Context)++ ```python+ # python/extensions/system_prompt/_50_inject_project_context.py+ from python.helpers.extension import Extension++ class InjectProjectContext(Extension):+ """Add project-specific context to system prompt"""++ async def execute(self, **kwargs):+ agent = self.agent+ context = agent.context++ # Get the prompt being built+ prompt_parts = kwargs.get("data", [])++ # Add project context if available+ project_info = context.data.get("project_info")+ if project_info:+ prompt_parts.append(f"\n## Project Context\n{project_info}\n")++ return prompt_parts+ ```++ ### Before LLM Call (Modify Prompt)++ ```python+ # python/extensions/before_main_llm_call/_40_add_instructions.py+ from python.helpers.extension import Extension++ class AddInstructions(Extension):+ """Add dynamic instructions before LLM call"""++ async def execute(self, **kwargs):+ # Access messages being sent+ messages = kwargs.get("messages", [])++ # Modify or add messages+ custom_instruction = {+ "role": "system",+ "content": "Remember to be concise."+ }++ # Return modified data+ return {"messages": messages + [custom_instruction]}+ ```++ ### Tool Execute After (Post-Process)++ ```python+ # python/extensions/tool_execute_after/_30_log_tool_result.py+ from python.helpers.extension import Extension+ from python.helpers.print_style import PrintStyle++ class LogToolResult(Extension):+ """Log tool execution results"""++ async def execute(self, **kwargs):+ tool_name = kwargs.get("tool_name", "unknown")+ result = kwargs.get("result", {})++ PrintStyle.hint(f"Tool {tool_name} returned: {str(result)[:100]}...")++ return kwargs.get("data", {})+ ```++ ## Using the Generator Script++ ```bash-python skills/frameworks/agent-zero-dev/scripts/create_extension.py \++python usr/skills/frameworks/agent-zero-dev/scripts/create_extension.py \+ agent_init \+ LoadProjectSettings \+ "Load project-specific settings on agent init"+ ```++ Generates: `python/extensions/agent_init/_50_load_project_settings.py`++ ## Extension Best Practices++ ### DO++ - ✅ Use numeric prefixes (10, 20, 30...)+ - ✅ Return the data dict (even if unmodified)+ - ✅ Document what the extension does+ - ✅ Keep extensions focused (single responsibility)+ - ✅ Handle errors gracefully+ - ✅ Use PrintStyle for logging++ ### DON'T++ - ❌ Block the event loop+ - ❌ Modify global state carelessly+ - ❌ Ignore the return value+ - ❌ Use conflicting numeric prefixes+ - ❌ Create circular dependencies++ ## Accessing Context++ ```python+ # Agent and context+ agent = self.agent+ context = agent.context++ # Shared data (persists across agents)+ context.data["key"] = value+ value = context.data.get("key")++ # Agent-specific data+ agent.set_data("key", value)+ value = agent.get_data("key")++ # Configuration+ config = agent.config+ model = config.chat_model+ ```++ ## Testing Extensions++ 1. **Add your extension** to the appropriate hook point+ 2. **Restart Agent Zero** (extensions load at startup)+ 3. **Trigger the hook** by performing the related action+ 4. **Check logs** for your output or errors++ ## Next Steps++ - Identify which hook point fits your use case+ - Start with logging to understand data flow+ - Keep extensions small and composablediff --cc usr/skills/frameworks/agent-zero-dev/a0dev-create-project/SKILL.mdindex 000000000,492dba212..492dba212mode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/a0dev-create-project/SKILL.md+++ b/usr/skills/frameworks/agent-zero-dev/a0dev-create-project/SKILL.mddiff --cc usr/skills/frameworks/agent-zero-dev/a0dev-create-skill/SKILL.mdindex 000000000,a92364d2c..9692c6ff8mode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/a0dev-create-skill/SKILL.md+++ b/usr/skills/frameworks/agent-zero-dev/a0dev-create-skill/SKILL.md@@@ -1,0 -1,275 +1,275 @@@+ ---+ name: "a0dev-create-skill"+ description: "Build reusable instruction bundles following the SKILL.md standard."+ version: "1.0.0"+ author: "Agent Zero Team"+ tags: ["agent-zero-dev", "skill", "instructions", "SKILL.md"]+ trigger_patterns:+ - "create skill"+ - "new skill"+ - "add skill"+ - "build skill"+ - "/a0dev-create-skill"+ ---++ # Agent Zero Dev: Create Skill++ Skills are reusable instruction bundles that guide the agent through specific tasks. They follow the SKILL.md standard with YAML frontmatter and markdown content.++ ## Skill Location++ ```-skills/++usr/skills/+ ├── builtin/ # System skills (don't modify)+ ├── custom/ # Your skills go here+ │ └── my-skill/+ │ ├── SKILL.md # Required: Main skill file+ │ ├── scripts/ # Optional: Helper scripts+ │ ├── templates/ # Optional: Templates+ │ └── docs/ # Optional: Additional docs+ └── frameworks/ # Multi-phase framework skills+ ```++ ## SKILL.md Format++ ```yaml+ ---+ name: "skill-name"+ description: "Clear description of what this skill does and when to use it"+ version: "1.0.0"+ author: "Your Name"+ tags: ["category1", "category2"]+ trigger_patterns:+ - "keyword that triggers"+ - "another trigger phrase"+ - "use skill-name"+ ---++ # Skill Title++ ## When to Use+ Describe the situations where this skill applies.++ ## The Process++ ### Step 1: First Action+ Detailed instructions...++ ### Step 2: Second Action+ More instructions...++ ## Examples+ Show sample usage and expected outcomes.++ ## Tips+ Additional guidance and best practices.+ ```++ ## Frontmatter Fields++ | Field | Required | Description |+ |-------|----------|-------------|+ | `name` | Yes | Unique skill identifier (kebab-case) |+ | `description` | Yes | One-line summary |+ | `version` | No | Semantic version |+ | `author` | No | Creator name |+ | `tags` | No | Categorization tags |+ | `trigger_patterns` | Yes | Phrases that activate this skill |++ ## Trigger Patterns++ Trigger patterns are case-insensitive phrases that activate the skill:++ ```yaml+ trigger_patterns:+ - "deploy to production" # Exact phrase match+ - "ship it" # Short trigger+ - "production deploy" # Alternative phrasing+ - "/deploy" # Command-style+ ```++ **Best Practices:**+ - Include 3-5 varied trigger phrases+ - Mix formal and casual language+ - Include command-style triggers (`/skill-name`)+ - Avoid overly generic triggers++ ## Complete Example: Code Review Skill++ ```yaml+ ---+ name: "code-review"+ description: "Perform thorough code review with focus on quality and best practices"+ version: "1.0.0"+ author: "Agent Zero Team"+ tags: ["development", "review", "quality"]+ trigger_patterns:+ - "review code"+ - "code review"+ - "review this"+ - "check my code"+ - "/code-review"+ ---++ # Code Review++ Thorough code review focusing on quality, maintainability, and best practices.++ ## When to Use++ - Before merging pull requests+ - After completing a feature+ - When refactoring existing code+ - To learn from code patterns++ ## The Process++ ### Step 1: Understand Context++ Before reviewing:+ 1. Identify the purpose of the code+ 2. Understand the broader system context+ 3. Note any constraints or requirements++ ### Step 2: Check Correctness++ Review for:+ - [ ] Logic errors+ - [ ] Edge cases handled+ - [ ] Error handling present+ - [ ] Input validation++ ### Step 3: Assess Quality++ Evaluate:+ - [ ] Clear naming conventions+ - [ ] Appropriate abstractions+ - [ ] DRY (Don't Repeat Yourself)+ - [ ] Single responsibility++ ### Step 4: Review Style++ Check:+ - [ ] Consistent formatting+ - [ ] Meaningful comments+ - [ ] Documentation updated+ - [ ] Tests included++ ### Step 5: Provide Feedback++ Structure feedback as:+ - **Critical**: Must fix before merge+ - **Important**: Should fix soon+ - **Suggestion**: Nice to have improvements++ ## Output Format++ ```markdown+ ## Code Review: [File/Feature]++ ### Summary+ [Brief overall assessment]++ ### Critical Issues+ - [Issue 1]: [Location] - [Why it matters]++ ### Important Issues+ - [Issue 1]: [Suggestion]++ ### Suggestions+ - [Nice-to-have improvements]++ ### Strengths+ - [What's done well]+ ```++ ## Tips++ - Focus on the code, not the person+ - Explain the "why" behind suggestions+ - Acknowledge good patterns+ - Be specific with line numbers/locations+ ```++ ## Adding Scripts++ Skills can include helper scripts:++ ```+ my-skill/+ ├── SKILL.md+ └── scripts/+ ├── helper.py+ └── process.sh+ ```++ Reference in SKILL.md:+ ```markdown+ ## Scripts++ Run the helper script:+ - `scripts/helper.py` - Processes input data+ - `scripts/process.sh` - Sets up environment+ ```++ ## Adding Templates++ Include reusable templates:++ ```+ my-skill/+ ├── SKILL.md+ └── templates/+ └── output.md+ ```++ Reference in SKILL.md:+ ```markdown+ ## Templates++ Use `templates/output.md` as the base for your output format.+ ```++ ## Using the Generator Script++ ```bash-python skills/frameworks/agent-zero-dev/scripts/create_skill.py \++python usr/skills/frameworks/agent-zero-dev/scripts/create_skill.py \+ code-review \+ "Perform thorough code review with focus on quality"+ ```+-Generates: `skills/custom/code-review/SKILL.md`++Generates: `usr/skills/custom/code-review/SKILL.md`++ ## Skill Best Practices++ ### DO++ - ✅ Write clear, actionable instructions+ - ✅ Include examples and expected outputs+ - ✅ Use checklists for multi-step processes+ - ✅ Provide output format templates+ - ✅ Test with real scenarios++ ### DON'T++ - ❌ Write vague or ambiguous instructions+ - ❌ Assume context the agent won't have+ - ❌ Use overly generic trigger patterns+ - ❌ Skip the "When to Use" section+ - ❌ Forget to version your skills++ ## Testing Skills+-1. Create the skill in `skills/custom/`++1. Create the skill in `usr/skills/custom/`+ 2. Ask the agent using a trigger phrase+ 3. Verify the skill loads correctly+ 4. Test with varied inputs+ 5. Refine based on results++ ## Next Steps++ After creating a skill:+ - Test with multiple trigger phrases+ - Gather feedback on clarity+ - Iterate on instructions+ - Consider sharing with the communitydiff --cc usr/skills/frameworks/agent-zero-dev/a0dev-create-subordinate/SKILL.mdindex 000000000,1e03e5fa3..1e03e5fa3mode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/a0dev-create-subordinate/SKILL.md+++ b/usr/skills/frameworks/agent-zero-dev/a0dev-create-subordinate/SKILL.mddiff --cc usr/skills/frameworks/agent-zero-dev/a0dev-create-tool/SKILL.mdindex 000000000,1b9a6278e..205606abamode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/a0dev-create-tool/SKILL.md+++ b/usr/skills/frameworks/agent-zero-dev/a0dev-create-tool/SKILL.md@@@ -1,0 -1,231 +1,231 @@@+ ---+ name: "a0dev-create-tool"+ description: "Create new agent capabilities (tools) for Agent Zero."+ version: "1.0.0"+ author: "Agent Zero Team"+ tags: ["agent-zero-dev", "tool", "capability", "development"]+ trigger_patterns:+ - "create tool"+ - "new tool"+ - "add tool"+ - "build tool"+ - "/a0dev-create-tool"+ ---++ # Agent Zero Dev: Create Tool++ Tools are the primary way agents interact with the world. Each tool inherits from the `Tool` base class and provides capabilities like web search, code execution, file manipulation, etc.++ ## Tool Location++ ```+ python/tools/+ ├── code_execution_tool.py+ ├── search_engine.py+ ├── call_subordinate.py+ ├── memory_tool.py+ └── your_tool.py ← New tools go here+ ```++ ## Tool Structure++ ```python+ # python/tools/my_tool.py+ from python.helpers.tool import Tool, Response++ class MyTool(Tool):+ """+ Brief description of what this tool does.++ Arguments (tool_args):+ - arg1: Description of first argument+ - arg2: Description of second argument (optional)+ """++ async def execute(self, **kwargs) -> Response:+ # Get arguments (kwargs takes priority, fallback to self.args)+ arg1 = kwargs.get("arg1") or self.args.get("arg1")+ arg2 = kwargs.get("arg2") or self.args.get("arg2", "default")++ try:+ # Tool logic here+ result = await self.do_work(arg1, arg2)++ return Response(+ message=result,+ break_loop=False # True to end agent loop+ )+ except Exception as e:+ return Response(+ message=f"Error: {e}",+ break_loop=False+ )++ async def do_work(self, arg1, arg2):+ # Implementation+ return f"Processed {arg1} with {arg2}"+ ```++ ## Response Object++ ```python+ Response(+ message: str, # Result message shown to agent+ break_loop: bool, # True = end agent loop (task complete)+ additional: dict = {} # Extra data (hints, metadata)+ )+ ```++ ## Accessing Agent Context++ ```python+ async def execute(self, **kwargs) -> Response:+ # Access the agent+ agent = self.agent++ # Access shared context (persists across agents)+ context = agent.context++ # Store/retrieve data+ context.data["my_key"] = "my_value"+ value = context.data.get("my_key")++ # Access agent configuration+ config = agent.config+ ```++ ## Tool Best Practices++ ### DO++ - ✅ Document arguments in class docstring+ - ✅ Use `Response` for all returns+ - ✅ Handle errors gracefully (return error message, don't crash)+ - ✅ Use kwargs fallback to self.args+ - ✅ Make operations async when possible+ - ✅ Use type hints++ ### DON'T++ - ❌ Raise unhandled exceptions+ - ❌ Block the event loop (use async)+ - ❌ Hardcode paths or values+ - ❌ Ignore optional arguments+ - ❌ Print directly (use Response or logging)++ ## Complete Example: Data Processor++ ```python+ # python/tools/data_processor.py+ from python.helpers.tool import Tool, Response+ import json++ class DataProcessor(Tool):+ """+ Process and transform JSON data structures.++ Arguments (tool_args):+ - operation: The operation (filter, sort, map)+ - data: JSON string to process+ - key: Key to operate on+ - value: Value for filter operation (optional)+ """++ async def execute(self, **kwargs) -> Response:+ try:+ operation = kwargs.get("operation") or self.args.get("operation", "")+ data_str = kwargs.get("data") or self.args.get("data", "[]")+ key = kwargs.get("key") or self.args.get("key")+ value = kwargs.get("value") or self.args.get("value")++ data = json.loads(data_str)++ if operation == "filter":+ result = [item for item in data if item.get(key) == value]+ elif operation == "sort":+ result = sorted(data, key=lambda x: x.get(key, ""))+ elif operation == "map":+ result = [item.get(key) for item in data]+ else:+ return Response(+ message=f"Unknown operation: {operation}",+ break_loop=False+ )++ return Response(+ message=json.dumps(result, indent=2),+ break_loop=False+ )++ except json.JSONDecodeError as e:+ return Response(message=f"Invalid JSON: {e}", break_loop=False)+ except Exception as e:+ return Response(message=f"Error: {e}", break_loop=False)+ ```++ ## Using the Generator Script++ ```bash-python skills/frameworks/agent-zero-dev/scripts/create_tool.py \++python usr/skills/frameworks/agent-zero-dev/scripts/create_tool.py \+ DataProcessor \+ "Process and transform JSON data structures"+ ```++ This generates boilerplate at `python/tools/data_processor.py`.++ ## Tool Registration++ Tools are auto-discovered by filename convention:+ - Filename: `snake_case.py` (e.g., `data_processor.py`)+ - Class name: `PascalCase` (e.g., `DataProcessor`)+ - Tool name (for agent): derived from class name++ ## Testing Your Tool++ 1. **Restart Agent Zero** (tools load at startup)+ 2. **Ask the agent** to use your tool:+ ```+ "Use the data_processor tool to sort this JSON by name: [{"name": "z"}, {"name": "a"}]"+ ```+ 3. **Check logs** for errors: `docker logs -f agent-zero`++ ## Common Patterns++ ### Async HTTP Request++ ```python+ import aiohttp++ async def fetch_data(self, url):+ async with aiohttp.ClientSession() as session:+ async with session.get(url) as response:+ return await response.text()+ ```++ ### File Operations++ ```python+ from python.helpers import files++ content = files.read_file("path/to/file")+ files.write_file("path/to/file", content)+ exists = files.exists("path/to/file")+ ```++ ### Logging++ ```python+ from python.helpers.print_style import PrintStyle++ PrintStyle.hint("Info message")+ PrintStyle.warning("Warning message")+ PrintStyle.error("Error message")+ ```++ ## Next Steps++ After creating your tool:+ - Test thoroughly with different inputs+ - Document edge cases+ - Consider error messages for users+ - Add to project documentation if significantdiff --cc usr/skills/frameworks/agent-zero-dev/a0dev-quickstart/SKILL.mdindex 000000000,0851a0ee2..5170ef998mode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/a0dev-quickstart/SKILL.md+++ b/usr/skills/frameworks/agent-zero-dev/a0dev-quickstart/SKILL.md@@@ -1,0 -1,142 +1,142 @@@+ ---+ name: "a0dev-quickstart"+ description: "5-minute quickstart guide to extending Agent Zero."+ version: "1.0.0"+ author: "Agent Zero Team"+ tags: ["agent-zero-dev", "quickstart", "getting-started", "tutorial"]+ trigger_patterns:+ - "quickstart"+ - "getting started"+ - "start extending"+ - "how to extend"+ - "/a0dev-quickstart"+ ---++ # Agent Zero Dev: Quickstart++ Get started extending Agent Zero in 5 minutes.++ ## Choose Your Extension Point++ | Want To | Use | Location |+ |---------|-----|----------|+ | Add agent capability | **Tool** | `python/tools/` |+ | Hook lifecycle events | **Extension** | `python/extensions/<hook>/` |-| Create instruction bundle | **Skill** | `skills/custom/<name>/` |++| Create instruction bundle | **Skill** | `usr/skills/custom/<name>/` |+ | Add Web UI endpoint | **API** | `python/api/` |+ | Create specialized agent | **Subordinate** | `agents/<profile>/` |+ | Configure project | **Project** | `.a0proj/` |++ ## Quick Commands++ ```bash+ # Create a new tool-python skills/frameworks/agent-zero-dev/scripts/create_tool.py MyTool "Description"++python usr/skills/frameworks/agent-zero-dev/scripts/create_tool.py MyTool "Description"++ # Create an extension-python skills/frameworks/agent-zero-dev/scripts/create_extension.py agent_init MyExt "Description"++python usr/skills/frameworks/agent-zero-dev/scripts/create_extension.py agent_init MyExt "Description"++ # Create a skill-python skills/frameworks/agent-zero-dev/scripts/create_skill.py my-skill "Description"++python usr/skills/frameworks/agent-zero-dev/scripts/create_skill.py my-skill "Description"++ # Create an API endpoint-python skills/frameworks/agent-zero-dev/scripts/create_api.py MyEndpoint "Description"++python usr/skills/frameworks/agent-zero-dev/scripts/create_api.py MyEndpoint "Description"+ ```++ ## Framework Architecture++ ```+ Agent Zero Framework+ ├── python/+ │ ├── tools/ # Agent capabilities (inherit from Tool)+ │ ├── extensions/ # Lifecycle hooks (numbered execution)+ │ ├── api/ # FastAPI endpoints (inherit from ApiHandler)+ │ └── helpers/ # Utility functions and base classes-├── skills/++├── usr/skills/+ │ ├── builtin/ # Built-in skills+ │ ├── custom/ # Your skills go here+ │ └── frameworks/ # Multi-phase framework skills+ ├── agents/ # Subordinate profiles+ └── memory/ # FAISS vector memory+ ```++ ## Key Patterns++ 1. **Extensions execute in numeric order** (`_10_*.py`, `_20_*.py`)+ 2. **Tools inherit from `Tool`** with async `execute()` method+ 3. **Skills use YAML frontmatter** + markdown content+ 4. **APIs inherit from `ApiHandler`** with `process()` method+ 5. **Everything is async/await** for non-blocking operations++ ## Minimal Examples++ ### Minimal Tool++ ```python+ # python/tools/hello_tool.py+ from python.helpers.tool import Tool, Response++ class HelloTool(Tool):+ async def execute(self, name="World", **kwargs) -> Response:+ return Response(message=f"Hello, {name}!", break_loop=False)+ ```++ ### Minimal Extension++ ```python+ # python/extensions/agent_init/_99_my_ext.py+ from python.helpers.extension import Extension++ class MyExtension(Extension):+ async def execute(self, **kwargs):+ print("Agent initialized!")+ return kwargs.get("data", {})+ ```++ ### Minimal Skill++ ```yaml+ ---+ name: "my-skill"+ description: "What this skill does"+ trigger_patterns:+ - "trigger phrase"+ ---++ # My Skill++ Instructions for the agent to follow.+ ```++ ### Minimal API++ ```python+ # python/api/my_endpoint.py+ from python.helpers.api import ApiHandler, Request++ class MyEndpoint(ApiHandler):+ async def process(self, input: dict, request: Request) -> dict:+ return {"message": "Hello from API!"}+ ```++ ## Development Workflow++ ```+ 1. Choose extension point → Tool, Extension, Skill, API, etc.+ 2. Generate boilerplate → Use scripts/ generators+ 3. Implement logic → Fill in your code+ 4. Test → Restart Agent Zero and verify+ 5. Iterate → Refine based on results+ ```++ ## Next Steps++ - `/a0dev-create-tool` — Deep dive into tools+ - `/a0dev-create-extension` — Deep dive into extensions+ - `/a0dev-create-skill` — Deep dive into skills+ - `/a0dev-create-api` — Deep dive into APIs+ - `/a0dev-workflow` — Full development workflow++ ## Need Help?++ Say "help me create a [tool/extension/skill/api]" and I'll guide you through it!diff --cc usr/skills/frameworks/agent-zero-dev/a0dev-workflow/SKILL.mdindex 000000000,b7869c032..b0bd72c52mode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/a0dev-workflow/SKILL.md+++ b/usr/skills/frameworks/agent-zero-dev/a0dev-workflow/SKILL.md@@@ -1,0 -1,322 +1,322 @@@+ ---+ name: "a0dev-workflow"+ description: "Full development workflow for building Agent Zero features."+ version: "1.0.0"+ author: "Agent Zero Team"+ tags: ["agent-zero-dev", "workflow", "development", "process"]+ trigger_patterns:+ - "development workflow"+ - "dev workflow"+ - "build feature"+ - "extend agent zero"+ - "/a0dev-workflow"+ ---++ # Agent Zero Dev: Development Workflow++ Complete workflow for building features for Agent Zero framework.++ ## Workflow Phases++ ```+ 1. Brainstorm → 2. Plan → 3. Scaffold → 4. Implement → 5. Test → 6. Refine+ ```++ ## Phase 1: Brainstorm++ ### Define the Problem++ **Questions to answer:**+ - What problem does this solve?+ - Who benefits from this feature?+ - What's the expected outcome?++ ### Identify Extension Point++ | If you need to... | Use |+ |-------------------|-----|+ | Add agent capability | Tool |+ | Hook into lifecycle | Extension |+ | Create instruction bundle | Skill |+ | Add Web UI endpoint | API |+ | Create specialized agent | Subordinate |+ | Configure workspace | Project |++ ### Review Existing Patterns++ Before building, examine similar code:+ - `python/tools/` — Tool patterns+ - `python/extensions/` — Extension patterns-- `skills/` — Skill patterns++- `usr/skills/` — Skill patterns+ - `python/api/` — API patterns++ ## Phase 2: Plan++ ### Break Into Tasks++ Each task should be:+ - Small (2-5 minutes to complete)+ - Testable (clear verification)+ - Independent (minimal dependencies)++ ### Example Task Breakdown++ **Feature:** "Add weather lookup tool"++ ```markdown+ ## Tasks++ 1. [ ] Create tool file structure+ - File: python/tools/weather_tool.py+ - Verify: File exists with boilerplate++ 2. [ ] Implement weather API integration+ - Use aiohttp for async requests+ - Verify: Can fetch weather data++ 3. [ ] Add error handling+ - Handle API errors, invalid locations+ - Verify: Graceful error messages++ 4. [ ] Test with agent+ - Ask agent to get weather+ - Verify: Correct response format++ 5. [ ] Document the tool+ - Add docstring with args+ - Verify: Documentation complete+ ```++ ### Identify Dependencies++ ```+ What must exist first?+ ├── API keys configured?+ ├── Dependencies installed?+ ├── Related code ready?+ └── Test data available?+ ```++ ## Phase 3: Scaffold++ ### Use Generator Scripts++ ```bash+ # Generate boilerplate-python skills/frameworks/agent-zero-dev/scripts/create_tool.py WeatherTool "Look up weather for a location"++python usr/skills/frameworks/agent-zero-dev/scripts/create_tool.py WeatherTool "Look up weather for a location"+ ```++ ### Available Generators++ | Script | Creates |+ |--------|---------|+ | `create_tool.py` | Tool in `python/tools/` |+ | `create_extension.py` | Extension in `python/extensions/` |-| `create_skill.py` | Skill in `skills/custom/` |++| `create_skill.py` | Skill in `usr/skills/custom/` |+ | `create_api.py` | API in `python/api/` |++ ### Review Generated Code++ After generation:+ 1. Open the created file+ 2. Review the boilerplate+ 3. Identify what to fill in+ 4. Note the patterns used++ ## Phase 4: Implement++ ### Follow Test-Driven Development++ ```+ 1. Write test (what should happen)+ 2. Run test (should fail)+ 3. Write code (minimal to pass)+ 4. Run test (should pass)+ 5. Refactor (improve quality)+ ```++ ### Implementation Checklist++ - [ ] Follow existing code patterns+ - [ ] Add proper error handling+ - [ ] Use type hints+ - [ ] Write clear docstrings+ - [ ] Keep functions focused+ - [ ] Use async where appropriate++ ### Common Patterns++ **Accessing Context:**+ ```python+ context = self.agent.context+ data = context.data+ ```++ **Error Handling:**+ ```python+ try:+ result = await risky_operation()+ except Exception as e:+ return Response(message=f"Error: {e}", break_loop=False)+ ```++ **Async Operations:**+ ```python+ async with aiohttp.ClientSession() as session:+ async with session.get(url) as response:+ return await response.json()+ ```++ ## Phase 5: Test++ ### Manual Testing++ 1. **Restart Agent Zero** (code loads at startup)+ 2. **Trigger your feature**:+ ```+ "Use the weather tool to check weather in Seattle"+ ```+ 3. **Verify behavior**:+ - Correct response?+ - Errors handled?+ - Performance acceptable?++ ### Check Logs++ ```bash+ # Docker logs+ docker logs -f agent-zero++ # Or check log files+ tail -f logs/agent.log+ ```++ ### Test Edge Cases++ - Invalid inputs+ - Missing data+ - Network failures+ - Concurrent access++ ## Phase 6: Refine++ ### Code Review Checklist++ - [ ] Follows project conventions?+ - [ ] Error handling complete?+ - [ ] Documentation updated?+ - [ ] No hardcoded values?+ - [ ] Performance acceptable?++ ### Refactoring++ After it works:+ - Simplify complex logic+ - Extract reusable functions+ - Improve naming+ - Add missing tests++ ### Documentation++ Update as needed:+ - Code docstrings+ - Skill instructions+ - README files+ - API documentation++ ## Complete Example: Weather Tool++ ### Phase 1: Brainstorm+ - **Problem:** Agent can't check weather+ - **Extension Point:** Tool+ - **Similar Code:** `search_engine.py`++ ### Phase 2: Plan+ ```markdown+ 1. [ ] Generate tool boilerplate+ 2. [ ] Add weather API integration+ 3. [ ] Implement execute() method+ 4. [ ] Add error handling+ 5. [ ] Test with agent+ ```++ ### Phase 3: Scaffold+ ```bash+ python scripts/create_tool.py WeatherLookup "Get weather for a location"+ ```++ ### Phase 4: Implement+ ```python+ # python/tools/weather_lookup.py+ from python.helpers.tool import Tool, Response+ import aiohttp++ class WeatherLookup(Tool):+ """+ Look up current weather for a location.++ Arguments:+ - location: City name or coordinates+ """++ async def execute(self, location="", **kwargs) -> Response:+ location = location or kwargs.get("location") or self.args.get("location", "")++ if not location:+ return Response(message="Please provide a location", break_loop=False)++ try:+ weather = await self.fetch_weather(location)+ return Response(+ message=f"Weather in {location}: {weather['description']}, {weather['temp']}°F",+ break_loop=False+ )+ except Exception as e:+ return Response(message=f"Could not fetch weather: {e}", break_loop=False)++ async def fetch_weather(self, location):+ # Implementation using weather API+ async with aiohttp.ClientSession() as session:+ url = f"https://api.weather.example/v1?q={location}"+ async with session.get(url) as response:+ return await response.json()+ ```++ ### Phase 5: Test+ ```+ User: "What's the weather in Seattle?"+ Agent: Uses weather_lookup tool+ Result: "Weather in Seattle: Partly cloudy, 58°F"+ ```++ ### Phase 6: Refine+ - Add caching for repeated lookups+ - Support metric/imperial units+ - Add forecast option++ ## Quick Reference++ ### Extension Points+ - **Tools:** `python/tools/`+ - **Extensions:** `python/extensions/<hook>/`-- **Skills:** `skills/custom/`++- **Skills:** `usr/skills/custom/`+ - **APIs:** `python/api/`+ - **Subordinates:** `agents/<profile>/`+ - **Projects:** `.a0proj/`++ ### Key Files+ - `python/helpers/tool.py` — Tool base class+ - `python/helpers/extension.py` — Extension base class+ - `python/helpers/api.py` — API base class++ ### Commands+ - Restart to reload code+ - Check logs for errors+ - Test with real interactions++ ## Next Steps++ Ready to build? Start with:+ 1. `/a0dev-quickstart` — Quick overview+ 2. `/a0dev-create-tool` — Build a tool+ 3. `/a0dev-create-skill` — Create a skilldiff --cc usr/skills/frameworks/agent-zero-dev/docs/architecture.mdindex 000000000,863d45475..592973269mode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/docs/architecture.md+++ b/usr/skills/frameworks/agent-zero-dev/docs/architecture.md@@@ -1,0 -1,296 +1,296 @@@+ # Agent Zero Architecture++ This document provides an in-depth look at Agent Zero's architecture.++ ## Core Philosophy++ Agent Zero is designed around the principle of **composable intelligence**:+ - Small, focused components that work together+ - Clear interfaces between layers+ - Extensible at every level+ - Async-first for responsiveness++ ## Component Layers++ ```+ ┌─────────────────────────────────────────────┐+ │ Web UI (Alpine.js) │+ │ - Chat interface │+ │ - File management │+ │ - Memory dashboard │+ └─────────────────────────────────────────────┘+ │+ ┌─────────────────────────────────────────────┐+ │ API Layer (FastAPI) │+ │ - REST endpoints │+ │ - WebSocket for streaming │+ │ - File uploads/downloads │+ └─────────────────────────────────────────────┘+ │+ ┌─────────────────────────────────────────────┐+ │ Agent Core │+ │ - Message loop │+ │ - LLM interaction │+ │ - Context management │+ └─────────────────────────────────────────────┘+ │+ ┌─────────────────────────────────────────────┐+ │ Extension Points │+ │ - agent_init │+ │ - message_loop_* │+ │ - response_stream_* │+ │ - tool_execute_* │+ └─────────────────────────────────────────────┘+ │+ ┌─────────────────────────────────────────────┐+ │ Tool Layer │+ │ - Built-in tools │+ │ - Custom tools │+ │ - External tool calls │+ └─────────────────────────────────────────────┘+ │+ ┌─────────────────────────────────────────────┐+ │ Skill System │+ │ - SKILL.md based │+ │ - Progressive disclosure │+ │ - Script execution │+ └─────────────────────────────────────────────┘+ │+ ┌─────────────────────────────────────────────┐+ │ Memory Layer │+ │ - FAISS vector store │+ │ - Shared AgentContext │+ │ - Archive/recovery │+ └─────────────────────────────────────────────┘+ ```++ ## Data Flow++ ### Message Processing Flow++ 1. **User Input** → API endpoint receives message+ 2. **Extension: message_loop_start** → Pre-processing+ 3. **Context Retrieval** → Get or create AgentContext+ 4. **Extension: before_main_llm_call** → Modify prompts+ 5. **LLM Call** → Send to language model+ 6. **Extension: response_stream_start** → Begin streaming+ 7. **Response Chunks** → Stream to UI via WebSocket+ 8. **Extension: response_stream_chunk** → Transform output+ 9. **Extension: response_stream_end** → Finalize+ 10. **Tool Execution** (if needed)+ - Extension: tool_execute_before+ - Tool.execute()+ - Extension: tool_execute_after+ 11. **Response to User** → Complete message++ ### Context Sharing++ All agents in a conversation share the same `AgentContext`:++ ```python+ # Main agent stores data+ self.agent.context.data["user_preference"] = "dark_mode"++ # Subordinate can access the same data+ preference = self.agent.context.data.get("user_preference")+ ```++ This enables:+ - Persistent memory across agent switches+ - Shared state between parent and subordinates+ - Session-wide configuration++ ## Extension System++ Extensions are Python classes that hook into specific lifecycle points.++ ### Execution Order++ Extensions execute in numeric order based on filename prefix:++ ```+ _10_first.py # Runs first+ _20_second.py # Runs second+ _30_third.py # Runs third+ ```++ ### Hook Points++ | Hook | Timing | Use Case |+ |------|--------|----------|+ | `agent_init` | Agent creation | Configuration loading |+ | `message_loop_start` | Before processing | Input validation |+ | `message_loop_end` | After processing | Cleanup |+ | `before_main_llm_call` | Before LLM | Prompt modification |+ | `response_stream_start` | Stream begins | Initialize handlers |+ | `response_stream_chunk` | Per chunk | Transform output |+ | `response_stream_end` | Stream complete | Finalize |+ | `tool_execute_before` | Before tool | Validation |+ | `tool_execute_after` | After tool | Post-processing |++ ## Memory System++ ### Vector Memory++ FAISS-based vector storage for semantic search:++ ```python+ # Save to memory+ memory_save(text="Important information")++ # Load from memory+ results = memory_load(query="Find important info")+ ```++ ### Archive System++ Soft-delete with recovery capability:++ ```python+ # Delete (moves to archive)+ memory_delete(ids=["id1", "id2"])++ # Recover from archive+ # (via memory dashboard or direct DB access)+ ```++ ## Skill System++ Skills follow the SKILL.md standard:++ ### Progressive Disclosure++ 1. **Level 1: Metadata** - Always loaded (name, description, tags)+ 2. **Level 2: Full Content** - Loaded on demand (instructions)+ 3. **Level 3: Scripts** - Executed as needed++ ### Skill Loading++ ```-skills/++usr/skills/+ ├── builtin/ # System skills (loaded first)+ ├── custom/ # User-created skills+ └── frameworks/ # Multi-phase framework skills+ ```++ ## Subordinate System++ Specialized agents with custom profiles:++ ```+ agents/+ ├── default/ # Default profile+ ├── developer/ # Coding specialist+ ├── researcher/ # Research specialist+ └── [custom]/ # Your profiles+ ```++ Each profile contains:+ - `agent.json` - Configuration+ - `prompts/system.md` - System prompt+ - `prompts/subordinates.md` - Delegation prompts++ ## Security Considerations++ ### Sandboxing++ - Tools run in isolated Python environment+ - File system access limited to /a0 directory+ - Network access controlled by tool permissions++ ### Secrets Management++ Secrets stored in environment variables:++ ```python+ # Access secrets+ from python.helpers import secrets+ api_key = secrets.get("API_KEY")+ ```++ ## Performance Optimization++ ### Async Patterns++ All I/O is async to prevent blocking:++ ```python+ # Concurrent execution+ tasks = [fetch_data(url) for url in urls]+ results = await asyncio.gather(*tasks)+ ```++ ### Caching++ - Skill content cached after first load+ - Context data persisted in memory+ - Vector embeddings cached in FAISS++ ### Streaming++ LLM responses stream to UI for perceived performance:++ ```python+ for chunk in llm_stream(prompt):+ await send_to_ui(chunk)+ ```++ ## Extension Points Deep Dive++ ### Creating Custom Hooks++ You can create custom hook points for your extensions:++ ```python+ # Define hook in your extension+ await extension.call_extensions("my_custom_hook", agent=agent, data=data)+ ```++ ### Inter-Extension Communication++ Extensions can communicate via context data:++ ```python+ # Extension A sets data+ self.agent.context.data["ext_a_result"] = result++ # Extension B reads it+ result = self.agent.context.data.get("ext_a_result")+ ```++ ## Debugging and Development++ ### Logging++ Use PrintStyle for consistent logging:++ ```python+ PrintStyle.hint("Informational message")+ PrintStyle.warning("Warning message")+ PrintStyle.error("Error message")+ PrintStyle.bold("Important message")+ ```++ ### Debugging Extensions++ Add debug output to trace execution:++ ```python+ async def execute(self, **kwargs):+ PrintStyle.hint(f"Extension {self.__class__.__name__} executing")+ PrintStyle.hint(f"Received kwargs: {kwargs}")+ # ... logic ...+ ```++ ### Testing Tools++ Test tools in isolation:++ ```python+ import asyncio+ from python.tools.my_tool import MyTool++ tool = MyTool()+ result = asyncio.run(tool.execute(param="value"))+ print(result.message)+ ```diff --cc usr/skills/frameworks/agent-zero-dev/docs/best-practices.mdindex 000000000,ddda33509..ddda33509mode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/docs/best-practices.md+++ b/usr/skills/frameworks/agent-zero-dev/docs/best-practices.mddiff --cc usr/skills/frameworks/agent-zero-dev/docs/quickstart.mdindex 000000000,b05b785ed..dbae25fd9mode 000000,100644..100644--- a/usr/skills/frameworks/agent-zero-dev/docs/quickstart.md+++ b/usr/skills/frameworks/agent-zero-dev/docs/quickstart.md@@@ -1,0 -1,63 +1,63 @@@+ # Agent Zero Development Quickstart++ Get started extending Agent Zero in 5 minutes.++ ## Prerequisites++ - Agent Zero framework installed and running+ - Basic understanding of Python async/await+ - Familiarity with the framework structure++ ## 1. Create Your First Tool (2 minutes)++ ```bash-cd /a0/skills/frameworks/agent-zero-dev++cd /a0/usr/skills/frameworks/agent-zero-dev+ python scripts/create_tool.py WeatherLookup "Get weather information for locations"+ ```++ This creates `/a0/python/tools/weather_lookup.py` with full boilerplate.++ Edit the file to implement your logic:++ ```python+ async def _process(self, location: str, units: str) -> str:+ # Your weather API call here+ return f"Weather for {location}: 72°F, Sunny"+ ```++ Restart Agent Zero to load the new tool.++ ## 2. Create Your First Extension (2 minutes)++ ```bash+ python scripts/create_extension.py agent_init ConfigLoader "Load project configuration"+ ```++ Edit the generated file to add initialization logic.++ ## 3. Create Your First Skill (3 minutes)++ ```bash+ python scripts/create_skill.py my-skill "My custom skill description"+ ```++ Edit `SKILL.md` to add instructions, then test with:+ "Use my-skill to process data"++ ## 4. Create Your First API Endpoint (3 minutes)++ ```bash+ python scripts/create_api.py DataApi "API for data operations"+ ```++ Test with curl:+ ```bash+ curl "http://localhost:5001/api/data_api?context=test¶m=value"+ ```++ ## Next Steps++ - Read the full [SKILL.md](../SKILL.md) for comprehensive documentation+ - Explore existing tools in `/a0/python/tools/`-- Check out built-in skills in `/a0/skills/builtin/`++- Check out built-in skills in `/a0/usr/skills/builtin/`+ - Review the Superpowers framework for development workflowsdiff --cc usr/skills/frameworks/agent-zero-dev/scripts/create_api.pyindex 000000000,c5294b476..c5294b476mode 000000,100755..100755--- a/usr/skills/frameworks/agent-zero-dev/scripts/create_api.py+++ b/usr/skills/frameworks/agent-zero-dev/scripts/create_api.pydiff --cc usr/skills/frameworks/agent-zero-dev/scripts/create_extension.pyindex 000000000,6e4e4b9f9..6e4e4b9f9mode 000000,100755..100755--- a/usr/skills/frameworks/agent-zero-dev/scripts/create_extension.py+++ b/usr/skills/frameworks/agent-zero-dev/scripts/create_extension.pydiff --cc usr/skills/frameworks/agent-zero-dev/scripts/create_skill.pyindex 000000000,b1b964e32..fdb16d64fmode 000000,100755..100755--- a/usr/skills/frameworks/agent-zero-dev/scripts/create_skill.py+++ b/usr/skills/frameworks/agent-zero-dev/scripts/create_skill.py@@@ -1,0 -1,231 +1,231 @@@+ #!/usr/bin/env python3+ """+ Create Skill Boilerplate+ Generates a new Agent Zero skill with SKILL.md and directory structure.++ Usage:+ python create_skill.py skill-name "Description of the skill"+ python create_skill.py web-scraper "Scrape web pages for data extraction"++ Output:- Creates skills/custom/<skill-name>/ directory with SKILL.md++ Creates usr/skills/custom/<skill-name>/ directory with SKILL.md+ """++ import sys+ import re+ from pathlib import Path+ from datetime import datetime+++ def validate_skill_name(name: str) -> str:+ """Validate and normalize skill name."""+ # Remove leading/trailing whitespace+ name = name.strip()+ # Replace spaces with hyphens+ name = name.replace(" ", "-")+ # Ensure only lowercase letters, numbers, and hyphens+ if not re.match(r'^[a-z0-9-]+$', name):+ raise ValueError(f"Invalid skill name: {name}. Use only lowercase letters, numbers, and hyphens.")+ return name+++ def generate_skill_md(name: str, description: str, author: str) -> str:+ """Generate the SKILL.md content."""+ # Generate trigger patterns based on name and description+ words = name.replace("-", " ").split()+ trigger_patterns = [+ f'"{name}"',+ f'"{" ".join(words)}"',+ ]++ # Add description words as triggers+ desc_words = description.lower().split()[:3]+ if desc_words:+ trigger_patterns.append(f'"{" ".join(desc_words)}"')++ triggers_str = "\n - ".join(trigger_patterns)++ return f'''---+ name: "{name}"+ description: "{description}"+ version: "1.0.0"+ author: "{author}"+ tags: ["custom", "helper"]+ trigger_patterns:+ - {triggers_str}+ ---++ # {name.replace("-", " ").title()}++ ## When to Use++ This skill activates when users mention:+ - Keywords: {name}+ - Related concepts: {description}++ Use this skill to:+ 1. First use case+ 2. Second use case+ 3. Third use case++ ## The Process++ ### Step 1: Preparation+ Describe initial setup or validation steps.++ ### Step 2: Main Processing+ Detail the core functionality.++ ### Step 3: Finalization+ Explain output formatting and delivery.++ ## Examples++ ### Example 1: Basic Usage++ **User**: "Use {name} to..."++ **Agent**:+ > I'll help you with that. Here's what I'll do:+ > 1. Step one+ > 2. Step two+ > 3. Step three++ ### Example 2: Advanced Usage++ **User**: "Complex {name} task with parameters"++ **Agent**:+ > Processing with custom parameters...+ > - Parameter A: value+ > - Parameter B: value+ > Result: success++ ## Scripts and Resources++ This skill includes optional helper scripts:++ | Script | Purpose | Usage |+ |--------|---------|-------|+ | `scripts/helper.py` | Description | `python scripts/helper.py arg1 arg2` |+-To use scripts:++To use scripts, run them directly with code_execution_tool:+ ```json+ {{- "method": "execute_script",- "skill_name": "{name}",- "script_path": "scripts/helper.py",- "script_args": {{"arg1": "value"}},- "arg_style": "positional"++ "tool_name": "code_execution_tool",++ "tool_args": {{++ "runtime": "python",++ "code": "python /a0/usr/skills/custom/{name}/scripts/helper.py arg1"++ }}+ }}+ ```++ ## Best Practices++ ### DO+ - ✅ Best practice 1+ - ✅ Best practice 2+ - ✅ Best practice 3++ ### DON'T+ - ❌ Anti-pattern 1+ - ❌ Anti-pattern 2++ ## Tips and Tricks++ - Tip 1+ - Tip 2+ - Tip 3++ ## Common Issues++ | Issue | Cause | Solution |+ |-------|-------|----------|+ | Problem | Root cause | How to fix |++ ## Related Skills++ - `related-skill-1` - Related functionality+ - `related-skill-2` - Complementary feature+ '''+++ def main():+ if len(sys.argv) < 2:+ print("Usage: python create_skill.py skill-name [\"Description\"]")+ print("Example: python create_skill.py data-processor \"Process and transform data\"")+ print("\nSkill name rules:")+ print(" - Use lowercase letters, numbers, and hyphens only")+ print(" - No spaces (use hyphens)")+ print(" - Example: web-scraper, data-processor, api-client")+ sys.exit(1)++ try:+ skill_name = validate_skill_name(sys.argv[1])+ except ValueError as e:+ print(f"Error: {e}")+ sys.exit(1)++ description = sys.argv[2] if len(sys.argv) > 2 else f"Skill for {skill_name}"+ author = "Agent Zero User"++ # Determine output path- base_dir = Path("/a0/skills/custom")++ base_dir = Path("/a0/usr/skills/custom")+ if not base_dir.exists():- base_dir = Path("skills/custom")++ base_dir = Path("usr/skills/custom")++ skill_dir = base_dir / skill_name++ # Check if skill already exists+ if skill_dir.exists():+ print(f"Error: Skill already exists: {skill_dir}")+ print("Use a different name or delete the existing skill.")+ sys.exit(1)++ # Create directory structure+ skill_dir.mkdir(parents=True)+ (skill_dir / "scripts").mkdir()+ (skill_dir / "templates").mkdir()+ (skill_dir / "docs").mkdir()++ # Create SKILL.md+ skill_md = skill_dir / "SKILL.md"+ skill_md.write_text(generate_skill_md(skill_name, description, author))++ # Create placeholder files+ (skill_dir / "scripts" / "helper.py").write_text("""#!/usr/bin/env python3+ # Helper script for skill++ def main():+ print("Helper script placeholder")+ # TODO: Implement script logic++ if __name__ == "__main__":+ main()+ """)++ (skill_dir / "templates" / "template.md").write_text("# Template placeholder\n\nEdit this template as needed.")+ (skill_dir / "docs" / "examples.md").write_text("# Examples\n\nAdd usage examples here.")++ print(f"✅ Created skill: {skill_dir}")+ print(f" Name: {skill_name}")+ print(f" Description: {description}")+ print(f"\nStructure:")+ print(f" {skill_dir}/")+ print(f" ├── SKILL.md # Main skill file (EDIT THIS)")+ print(f" ├── scripts/")+ print(f" │ └── helper.py # Helper script")+ print(f" ├── templates/")+ print(f" │ └── template.md # Template file")+ print(f" └── docs/")+ print(f" └── examples.md # Documentation")+ print(f"\nNext steps:")+ print(f" 1. Edit {skill_dir}/SKILL.md to add your instructions")+ print(f" 2. Update trigger_patterns for activation")+ print(f" 3. Implement scripts in scripts/")+ print(f" 4. Test the skill by using trigger words")+ print(f" 5. Skills load automatically on agent initialization")+++ if __name__ == "__main__":+ main()diff --cc usr/skills/frameworks/agent-zero-dev/scripts/create_tool.pyindex 000000000,0bed2603f..0bed2603fmode 000000,100755..100755--- a/usr/skills/frameworks/agent-zero-dev/scripts/create_tool.py+++ b/usr/skills/frameworks/agent-zero-dev/scripts/create_tool.pydiff --cc usr/skills/frameworks/agentos/agentos-project-install/SKILL.mdindex 000000000,82f62a13f..82f62a13fmode 000000,100644..100644--- a/usr/skills/frameworks/agentos/agentos-project-install/SKILL.md+++ b/usr/skills/frameworks/agentos/agentos-project-install/SKILL.mddiff --cc usr/skills/frameworks/agentos/agentos-standards/SKILL.mdindex 000000000,cf08421e6..cf08421e6mode 000000,100644..100644--- a/usr/skills/frameworks/agentos/agentos-standards/SKILL.md+++ b/usr/skills/frameworks/agentos/agentos-standards/SKILL.mddiff --cc usr/skills/frameworks/amplihack/amplihack-analyze/SKILL.mdindex 000000000,f120ad9d0..f120ad9d0mode 000000,100644..100644--- a/usr/skills/frameworks/amplihack/amplihack-analyze/SKILL.md+++ b/usr/skills/frameworks/amplihack/amplihack-analyze/SKILL.mddiff --cc usr/skills/frameworks/amplihack/amplihack-auto/SKILL.mdindex 000000000,8027a15a6..8027a15a6mode 000000,100644..100644--- a/usr/skills/frameworks/amplihack/amplihack-auto/SKILL.md+++ b/usr/skills/frameworks/amplihack/amplihack-auto/SKILL.mddiff --cc usr/skills/frameworks/amplihack/amplihack-cascade/SKILL.mdindex 000000000,84802c702..84802c702mode 000000,100644..100644--- a/usr/skills/frameworks/amplihack/amplihack-cascade/SKILL.md+++ b/usr/skills/frameworks/amplihack/amplihack-cascade/SKILL.mddiff --cc usr/skills/frameworks/amplihack/amplihack-debate/SKILL.mdindex 000000000,7c30b60fd..7c30b60fdmode 000000,100644..100644--- a/usr/skills/frameworks/amplihack/amplihack-debate/SKILL.md+++ b/usr/skills/frameworks/amplihack/amplihack-debate/SKILL.mddiff --cc usr/skills/frameworks/amplihack/amplihack-fix/SKILL.mdindex 000000000,b01b48cf2..b01b48cf2mode 000000,100644..100644--- a/usr/skills/frameworks/amplihack/amplihack-fix/SKILL.md+++ b/usr/skills/frameworks/amplihack/amplihack-fix/SKILL.mddiff --cc usr/skills/frameworks/amplihack/amplihack-modular-build/SKILL.mdindex 000000000,2d41bdb48..2d41bdb48mode 000000,100644..100644--- a/usr/skills/frameworks/amplihack/amplihack-modular-build/SKILL.md+++ b/usr/skills/frameworks/amplihack/amplihack-modular-build/SKILL.mddiff --cc usr/skills/frameworks/bmad-builder/bmb-agent/SKILL.mdindex 000000000,8c469f707..8c469f707mode 000000,100644..100644--- a/usr/skills/frameworks/bmad-builder/bmb-agent/SKILL.md+++ b/usr/skills/frameworks/bmad-builder/bmb-agent/SKILL.mddiff --cc usr/skills/frameworks/bmad-builder/bmb-module/SKILL.mdindex 000000000,0d7240300..0d7240300mode 000000,100644..100644--- a/usr/skills/frameworks/bmad-builder/bmb-module/SKILL.md+++ b/usr/skills/frameworks/bmad-builder/bmb-module/SKILL.mddiff --cc usr/skills/frameworks/bmad-builder/bmb-workflow/SKILL.mdindex 000000000,450f26021..450f26021mode 000000,100644..100644--- a/usr/skills/frameworks/bmad-builder/bmb-workflow/SKILL.md+++ b/usr/skills/frameworks/bmad-builder/bmb-workflow/SKILL.mddiff --cc usr/skills/frameworks/bmad-cis/cis-brainstorm/SKILL.mdindex 000000000,b02e4ddee..b02e4ddeemode 000000,100644..100644--- a/usr/skills/frameworks/bmad-cis/cis-brainstorm/SKILL.md+++ b/usr/skills/frameworks/bmad-cis/cis-brainstorm/SKILL.mddiff --cc usr/skills/frameworks/bmad-cis/cis-design-thinking/SKILL.mdindex 000000000,e4e7c7d7a..e4e7c7d7amode 000000,100644..100644--- a/usr/skills/frameworks/bmad-cis/cis-design-thinking/SKILL.md+++ b/usr/skills/frameworks/bmad-cis/cis-design-thinking/SKILL.mddiff --cc usr/skills/frameworks/bmad-cis/cis-innovation/SKILL.mdindex 000000000,b4a96173f..b4a96173fmode 000000,100644..100644--- a/usr/skills/frameworks/bmad-cis/cis-innovation/SKILL.md+++ b/usr/skills/frameworks/bmad-cis/cis-innovation/SKILL.mddiff --cc usr/skills/frameworks/bmad-cis/cis-presentation/SKILL.mdindex 000000000,561d42bdd..561d42bddmode 000000,100644..100644--- a/usr/skills/frameworks/bmad-cis/cis-presentation/SKILL.md+++ b/usr/skills/frameworks/bmad-cis/cis-presentation/SKILL.mddiff --cc usr/skills/frameworks/bmad-cis/cis-problem-solve/SKILL.mdindex 000000000,c16e7a82f..c16e7a82fmode 000000,100644..100644--- a/usr/skills/frameworks/bmad-cis/cis-problem-solve/SKILL.md+++ b/usr/skills/frameworks/bmad-cis/cis-problem-solve/SKILL.mddiff --cc usr/skills/frameworks/bmad-cis/cis-storytelling/SKILL.mdindex 000000000,f8f2f8466..f8f2f8466mode 000000,100644..100644--- a/usr/skills/frameworks/bmad-cis/cis-storytelling/SKILL.md+++ b/usr/skills/frameworks/bmad-cis/cis-storytelling/SKILL.mddiff --cc usr/skills/frameworks/bmad-gds/gds-brainstorm-game/SKILL.mdindex 000000000,4dd94a76c..4dd94a76cmode 000000,100644..100644--- a/usr/skills/frameworks/bmad-gds/gds-brainstorm-game/SKILL.md+++ b/usr/skills/frameworks/bmad-gds/gds-brainstorm-game/SKILL.mddiff --cc usr/skills/frameworks/bmad-gds/gds-create-architecture/SKILL.mdindex 000000000,ed9967855..ed9967855mode 000000,100644..100644--- a/usr/skills/frameworks/bmad-gds/gds-create-architecture/SKILL.md+++ b/usr/skills/frameworks/bmad-gds/gds-create-architecture/SKILL.mddiff --cc usr/skills/frameworks/bmad-gds/gds-create-brief/SKILL.mdindex 000000000,0ac5a9d02..0ac5a9d02mode 000000,100644..100644--- a/usr/skills/frameworks/bmad-gds/gds-create-brief/SKILL.md+++ b/usr/skills/frameworks/bmad-gds/gds-create-brief/SKILL.mddiff --cc usr/skills/frameworks/bmad-gds/gds-create-gdd/SKILL.mdindex 000000000,f74243758..f74243758mode 000000,100644..100644--- a/usr/skills/frameworks/bmad-gds/gds-create-gdd/SKILL.md+++ b/usr/skills/frameworks/bmad-gds/gds-create-gdd/SKILL.mddiff --cc usr/skills/frameworks/bmad-gds/gds-dev-story/SKILL.mdindex 000000000,548a6f2b3..548a6f2b3mode 000000,100644..100644--- a/usr/skills/frameworks/bmad-gds/gds-dev-story/SKILL.md+++ b/usr/skills/frameworks/bmad-gds/gds-dev-story/SKILL.mddiff --cc usr/skills/frameworks/bmad-gds/gds-qa-framework/SKILL.mdindex 000000000,9737d4070..9737d4070mode 000000,100644..100644--- a/usr/skills/frameworks/bmad-gds/gds-qa-framework/SKILL.md+++ b/usr/skills/frameworks/bmad-gds/gds-qa-framework/SKILL.mddiff --cc usr/skills/frameworks/bmad-gds/gds-quick-flow/SKILL.mdindex 000000000,f16a96776..f16a96776mode 000000,100644..100644--- a/usr/skills/frameworks/bmad-gds/gds-quick-flow/SKILL.md+++ b/usr/skills/frameworks/bmad-gds/gds-quick-flow/SKILL.mddiff --cc usr/skills/frameworks/bmad-gds/gds-sprint-planning/SKILL.mdindex 000000000,070d83e6d..070d83e6dmode 000000,100644..100644--- a/usr/skills/frameworks/bmad-gds/gds-sprint-planning/SKILL.md+++ b/usr/skills/frameworks/bmad-gds/gds-sprint-planning/SKILL.mddiff --cc usr/skills/frameworks/bmad/bmad-code-review/SKILL.mdindex 000000000,8aa8e058a..8aa8e058amode 000000,100644..100644--- a/usr/skills/frameworks/bmad/bmad-code-review/SKILL.md+++ b/usr/skills/frameworks/bmad/bmad-code-review/SKILL.mddiff --cc usr/skills/frameworks/bmad/bmad-create-architecture/SKILL.mdindex 000000000,64584d094..64584d094mode 000000,100644..100644--- a/usr/skills/frameworks/bmad/bmad-create-architecture/SKILL.md+++ b/usr/skills/frameworks/bmad/bmad-create-architecture/SKILL.mddiff --cc usr/skills/frameworks/bmad/bmad-create-epics/SKILL.mdindex 000000000,25f2e6752..25f2e6752mode 000000,100644..100644--- a/usr/skills/frameworks/bmad/bmad-create-epics/SKILL.md+++ b/usr/skills/frameworks/bmad/bmad-create-epics/SKILL.mddiff --cc usr/skills/frameworks/bmad/bmad-create-prd/SKILL.mdindex 000000000,baa8b3fbe..baa8b3fbemode 000000,100644..100644--- a/usr/skills/frameworks/bmad/bmad-create-prd/SKILL.md+++ b/usr/skills/frameworks/bmad/bmad-create-prd/SKILL.mddiff --cc usr/skills/frameworks/bmad/bmad-dev-story/SKILL.mdindex 000000000,b862be283..b862be283mode 000000,100644..100644--- a/usr/skills/frameworks/bmad/bmad-dev-story/SKILL.md+++ b/usr/skills/frameworks/bmad/bmad-dev-story/SKILL.mddiff --cc usr/skills/frameworks/bmad/bmad-product-brief/SKILL.mdindex 000000000,b65d22a7b..b65d22a7bmode 000000,100644..100644--- a/usr/skills/frameworks/bmad/bmad-product-brief/SKILL.md+++ b/usr/skills/frameworks/bmad/bmad-product-brief/SKILL.mddiff --cc usr/skills/frameworks/bmad/bmad-quick-spec/SKILL.mdindex 000000000,ee83450f5..ee83450f5mode 000000,100644..100644--- a/usr/skills/frameworks/bmad/bmad-quick-spec/SKILL.md+++ b/usr/skills/frameworks/bmad/bmad-quick-spec/SKILL.mddiff --cc usr/skills/frameworks/bmad/bmad-sprint-planning/SKILL.mdindex 000000000,f535f1ace..f535f1acemode 000000,100644..100644--- a/usr/skills/frameworks/bmad/bmad-sprint-planning/SKILL.md+++ b/usr/skills/frameworks/bmad/bmad-sprint-planning/SKILL.mddiff --cc usr/skills/frameworks/gsd/gsd-complete-milestone/SKILL.mdindex 000000000,0d80ffccc..0d80ffcccmode 000000,100644..100644--- a/usr/skills/frameworks/gsd/gsd-complete-milestone/SKILL.md+++ b/usr/skills/frameworks/gsd/gsd-complete-milestone/SKILL.mddiff --cc usr/skills/frameworks/gsd/gsd-discuss-phase/SKILL.mdindex 000000000,b86dbc9f7..b86dbc9f7mode 000000,100644..100644--- a/usr/skills/frameworks/gsd/gsd-discuss-phase/SKILL.md+++ b/usr/skills/frameworks/gsd/gsd-discuss-phase/SKILL.mddiff --cc usr/skills/frameworks/gsd/gsd-execute-phase/SKILL.mdindex 000000000,97f4d7d74..97f4d7d74mode 000000,100644..100644--- a/usr/skills/frameworks/gsd/gsd-execute-phase/SKILL.md+++ b/usr/skills/frameworks/gsd/gsd-execute-phase/SKILL.mddiff --cc usr/skills/frameworks/gsd/gsd-new-project/SKILL.mdindex 000000000,9464c77c7..9464c77c7mode 000000,100644..100644--- a/usr/skills/frameworks/gsd/gsd-new-project/SKILL.md+++ b/usr/skills/frameworks/gsd/gsd-new-project/SKILL.mddiff --cc usr/skills/frameworks/gsd/gsd-plan-phase/SKILL.mdindex 000000000,c29435c6e..c29435c6emode 000000,100644..100644--- a/usr/skills/frameworks/gsd/gsd-plan-phase/SKILL.md+++ b/usr/skills/frameworks/gsd/gsd-plan-phase/SKILL.mddiff --cc usr/skills/frameworks/gsd/gsd-verify-work/SKILL.mdindex 000000000,543dda8ee..543dda8eemode 000000,100644..100644--- a/usr/skills/frameworks/gsd/gsd-verify-work/SKILL.md+++ b/usr/skills/frameworks/gsd/gsd-verify-work/SKILL.mddiff --cc usr/skills/frameworks/prp/prp-execute/SKILL.mdindex 000000000,215e461af..215e461afmode 000000,100644..100644--- a/usr/skills/frameworks/prp/prp-execute/SKILL.md+++ b/usr/skills/frameworks/prp/prp-execute/SKILL.mddiff --cc usr/skills/frameworks/prp/prp-generate/SKILL.mdindex 000000000,b7d4e2452..b7d4e2452mode 000000,100644..100644--- a/usr/skills/frameworks/prp/prp-generate/SKILL.md+++ b/usr/skills/frameworks/prp/prp-generate/SKILL.mddiff --cc usr/skills/frameworks/speckit/speckit-constitution/SKILL.mdindex 000000000,dd96e970f..dd96e970fmode 000000,100644..100644--- a/usr/skills/frameworks/speckit/speckit-constitution/SKILL.md+++ b/usr/skills/frameworks/speckit/speckit-constitution/SKILL.mddiff --cc usr/skills/frameworks/speckit/speckit-implement/SKILL.mdindex 000000000,1efa3a61f..1efa3a61fmode 000000,100644..100644--- a/usr/skills/frameworks/speckit/speckit-implement/SKILL.md+++ b/usr/skills/frameworks/speckit/speckit-implement/SKILL.mddiff --cc usr/skills/frameworks/speckit/speckit-plan/SKILL.mdindex 000000000,614a6615a..614a6615amode 000000,100644..100644--- a/usr/skills/frameworks/speckit/speckit-plan/SKILL.md+++ b/usr/skills/frameworks/speckit/speckit-plan/SKILL.mddiff --cc usr/skills/frameworks/speckit/speckit-specify/SKILL.mdindex 000000000,974b237b1..974b237b1mode 000000,100644..100644--- a/usr/skills/frameworks/speckit/speckit-specify/SKILL.md+++ b/usr/skills/frameworks/speckit/speckit-specify/SKILL.mddiff --cc usr/skills/frameworks/speckit/speckit-tasks/SKILL.mdindex 000000000,b5f04376e..b5f04376emode 000000,100644..100644--- a/usr/skills/frameworks/speckit/speckit-tasks/SKILL.md+++ b/usr/skills/frameworks/speckit/speckit-tasks/SKILL.mddiff --cc usr/skills/frameworks/superpowers/sp-brainstorming/SKILL.mdindex 000000000,8a45ee748..8a45ee748mode 000000,100644..100644--- a/usr/skills/frameworks/superpowers/sp-brainstorming/SKILL.md+++ b/usr/skills/frameworks/superpowers/sp-brainstorming/SKILL.mddiff --cc usr/skills/frameworks/superpowers/sp-code-review/SKILL.mdindex 000000000,8a23d6590..8a23d6590mode 000000,100644..100644--- a/usr/skills/frameworks/superpowers/sp-code-review/SKILL.md+++ b/usr/skills/frameworks/superpowers/sp-code-review/SKILL.mddiff --cc usr/skills/frameworks/superpowers/sp-executing-plans/SKILL.mdindex 000000000,a2820d7ac..a2820d7acmode 000000,100644..100644--- a/usr/skills/frameworks/superpowers/sp-executing-plans/SKILL.md+++ b/usr/skills/frameworks/superpowers/sp-executing-plans/SKILL.mddiff --cc usr/skills/frameworks/superpowers/sp-finishing-branch/SKILL.mdindex 000000000,73690cef9..73690cef9mode 000000,100644..100644--- a/usr/skills/frameworks/superpowers/sp-finishing-branch/SKILL.md+++ b/usr/skills/frameworks/superpowers/sp-finishing-branch/SKILL.mddiff --cc usr/skills/frameworks/superpowers/sp-git-worktrees/SKILL.mdindex 000000000,bdb18e830..bdb18e830mode 000000,100644..100644--- a/usr/skills/frameworks/superpowers/sp-git-worktrees/SKILL.md+++ b/usr/skills/frameworks/superpowers/sp-git-worktrees/SKILL.mddiff --cc usr/skills/frameworks/superpowers/sp-test-driven-development/SKILL.mdindex 000000000,0ff20e527..0ff20e527mode 000000,100644..100644--- a/usr/skills/frameworks/superpowers/sp-test-driven-development/SKILL.md+++ b/usr/skills/frameworks/superpowers/sp-test-driven-development/SKILL.mddiff --cc usr/skills/frameworks/superpowers/sp-writing-plans/SKILL.mdindex 000000000,d304c5592..d304c5592mode 000000,100644..100644--- a/usr/skills/frameworks/superpowers/sp-writing-plans/SKILL.md+++ b/usr/skills/frameworks/superpowers/sp-writing-plans/SKILL.mddiff --cc webui/components/projects/project-edit-basic-data.htmlindex c84b1ddfb,a9309c6a2..405b24b95--- a/webui/components/projects/project-edit-basic-data.html+++ b/webui/components/projects/project-edit-basic-data.html@@@ -58,6 -58,18 +58,18 @@@</template></div></div>++ <div class="projects-form-group">- <label class="projects-form-label">Development Framework</label>- <span class="projects-form-description">Override the global development framework for this project.++ <label class="projects-form-label">Framework</label>++ <span class="projects-form-description">Override the global framework for this project.+ Framework skills will be prioritized when working on this project.</span>+ <select class="projects-form-select" x-model="$store.projects.selectedProject.dev_framework">+ <template x-for="option in $store.projects.frameworkOptions" :key="option.value">+ <option :value="option.value" x-text="option.label"+ :selected="option.value === ($store.projects.selectedProject.dev_framework || '')"></option>+ </template>+ </select>+ </div></div>diff --cc webui/components/settings/agent/agent-settings.htmlindex d8a9325a8,b6518b17c..fe96c715f--- a/webui/components/settings/agent/agent-settings.html+++ b/webui/components/settings/agent/agent-settings.html@@@ -15,6 -15,12 +15,12 @@@<span>Agent Config</span></a></li>+ <li>+ <a href="#section-framework">+ <img src="/public/framework.svg" alt="Framework" />- <span>Development Framework</span>++ <span>Framework</span>+ </a>+ </li><li><a href="#section-chat-model"><img src="/public/chat_model.svg" alt="Chat Model" />diff --cc webui/components/settings/agent/framework.htmlindex 000000000,2f36c3faa..dd9dc72aemode 000000,100644..100644--- a/webui/components/settings/agent/framework.html+++ b/webui/components/settings/agent/framework.html@@@ -1,0 -1,49 +1,49 @@@+ <html>+ <head>- <title>Development Framework</title>++ <title>Framework</title>+ </head>++ <body>+ <div x-data>+ <template x-if="$store.settingsStore.settings">+ <div>- <div class="section-title">Development Framework</div>++ <div class="section-title">Framework</div>+ <div class="section-description">- Choose a structured development workflow methodology to guide the agent.++ Choose a structured workflow methodology to guide the agent.+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Active Framework</div>+ <div class="field-description">- Select a development methodology. When active, framework-specific skills are prioritized++ Select a methodology. When active, framework-specific skills are prioritized+ and workflow guidance is injected into the system prompt.+ </div>+ </div>+ <div class="field-control">+ <select x-model="$store.settingsStore.settings.dev_framework">+ <template x-for="option in $store.settingsStore.additional?.framework_options" :key="option.value">+ <option :value="option.value" :selected="option.value === $store.settingsStore.settings.dev_framework" x-text="option.label"></option>+ </template>+ </select>+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Framework Details</div>+ <div class="field-description">+ View detailed information about the selected framework and its workflow steps.+ </div>+ </div>+ <div class="field-control">+ <button class="btn btn-field" @click="$store.settingsStore.handleFieldButton({id: 'framework_info'})">+ View Details+ </button>+ </div>+ </div>+ </div>+ </template>+ </div>+ </body>+ </html>diff --cc webui/components/settings/frameworks/framework-details.htmlindex 000000000,d4b88d9f1..50b3f9a2cmode 000000,100644..100644--- a/webui/components/settings/frameworks/framework-details.html+++ b/webui/components/settings/frameworks/framework-details.html@@@ -1,0 -1,273 +1,273 @@@+ <html>+ <head>- <title>Development Framework Details</title>++ <title>Framework Details</title>+ <script type="module">+ import { store } from "/components/settings/frameworks/framework-store.js";+ </script>+ </head>+ <body>+ <div x-data class="framework-modal-container">+ <template x-if="$store.frameworkStore">+ <div x-init="$store.frameworkStore.init()" x-destroy="$store.frameworkStore.onClose()">++ <div x-show="$store.frameworkStore.loading" class="loading">+ Loading frameworks...+ </div>++ <div x-show="$store.frameworkStore.error" class="error">+ <span x-text="$store.frameworkStore.error"></span>+ </div>++ <div x-show="!$store.frameworkStore.loading && !$store.frameworkStore.error">++ <!-- Framework selector -->+ <div class="framework-selector">+ <label class="selector-label">+ <span>View Framework:</span>+ <select class="framework-dropdown"+ @change="$store.frameworkStore.selectFramework($event.target.value)">+ <template x-for="fw in $store.frameworkStore.frameworks" :key="fw.id">+ <option :value="fw.id"+ :selected="$store.frameworkStore.selectedFramework?.id === fw.id"+ x-text="fw.name"></option>+ </template>+ </select>+ </label>+ </div>++ <!-- Framework details -->+ <template x-if="$store.frameworkStore.selectedFramework">+ <div class="framework-details">+ <div class="framework-header">+ <h3 x-text="$store.frameworkStore.selectedFramework.name"></h3>+ <span class="framework-id" x-text="'ID: ' + $store.frameworkStore.selectedFramework.id"></span>+ </div>++ <p class="framework-description" x-text="$store.frameworkStore.selectedFramework.description"></p>++ <!-- Workflow steps -->+ <template x-if="$store.frameworkStore.selectedFramework.workflows?.length > 0">+ <div class="workflow-section">+ <h4>Workflow Steps</h4>+ <div class="workflow-steps">+ <template x-for="(step, index) in $store.frameworkStore.selectedFramework.workflows" :key="step.skill_name">+ <div class="workflow-step">+ <div class="step-number" x-text="step.sequence"></div>+ <div class="step-content">+ <div class="step-name" x-text="step.name"></div>+ <div class="step-skill">+ <code x-text="step.skill_name"></code>+ </div>+ <div class="step-description" x-text="step.description"></div>+ </div>+ </div>+ </template>+ </div>+ </div>+ </template>++ <!-- No workflows message -->+ <template x-if="!$store.frameworkStore.selectedFramework.workflows?.length">+ <div class="no-workflows">+ <p>This framework has no predefined workflow steps.</p>+ </div>+ </template>++ <!-- Usage hint -->+ <div class="usage-hint">+ <h4>How to Use</h4>+ <p>When this framework is active:</p>+ <ul>+ <li>Framework skills are prioritized in skill discovery</li>+ <li>Workflow guidance is injected into the system prompt</li>+ <li>Use <code>skills_tool</code> to load specific workflow skills</li>+ </ul>+ </div>+ </div>+ </template>++ <!-- No selection -->+ <template x-if="!$store.frameworkStore.selectedFramework">+ <div class="no-selection">+ <p>Select a framework to view its details.</p>+ </div>+ </template>+ </div>++ </div>+ </template>+ </div>++ <style>+ .framework-modal-container {+ padding: 0.5rem;+ }++ .loading {+ text-align: center;+ padding: 2rem;+ color: var(--color-secondary);+ }++ .error {+ color: var(--color-error);+ padding: 1rem;+ background: var(--color-error-bg);+ border-radius: 4px;+ margin-bottom: 1rem;+ }++ .framework-selector {+ margin-bottom: 1.5rem;+ }++ .selector-label {+ display: flex;+ align-items: center;+ gap: 0.75rem;+ font-weight: 600;+ }++ .framework-dropdown {+ flex: 1;+ max-width: 300px;+ padding: 0.5rem;+ border: 1px solid var(--color-border);+ border-radius: 4px;+ background: var(--color-bg-primary);+ color: var(--color-text-primary);+ font-size: 0.95rem;+ }++ .framework-details {+ background: var(--color-input);+ border: 1px solid var(--color-border);+ border-radius: 8px;+ padding: 1.25rem;+ }++ .framework-header {+ display: flex;+ align-items: baseline;+ gap: 1rem;+ margin-bottom: 0.75rem;+ }++ .framework-header h3 {+ margin: 0;+ font-size: 1.25rem;+ color: var(--color-primary);+ }++ .framework-id {+ font-size: 0.8rem;+ color: var(--color-secondary);+ font-family: monospace;+ }++ .framework-description {+ color: var(--color-text-secondary);+ line-height: 1.5;+ margin-bottom: 1.5rem;+ }++ .workflow-section h4,+ .usage-hint h4 {+ font-size: 1rem;+ margin: 0 0 0.75rem 0;+ color: var(--color-primary);+ border-bottom: 1px solid var(--color-border);+ padding-bottom: 0.5rem;+ }++ .workflow-steps {+ display: flex;+ flex-direction: column;+ gap: 0.75rem;+ }++ .workflow-step {+ display: flex;+ gap: 1rem;+ padding: 0.75rem;+ background: var(--color-bg-primary);+ border-radius: 6px;+ border: 1px solid var(--color-border);+ }++ .step-number {+ display: flex;+ align-items: center;+ justify-content: center;+ width: 2rem;+ height: 2rem;+ background: var(--color-accent);+ color: white;+ border-radius: 50%;+ font-weight: bold;+ font-size: 0.9rem;+ flex-shrink: 0;+ }++ .step-content {+ flex: 1;+ }++ .step-name {+ font-weight: 600;+ margin-bottom: 0.25rem;+ }++ .step-skill {+ margin-bottom: 0.25rem;+ }++ .step-skill code {+ font-size: 0.8rem;+ background: var(--color-input);+ padding: 0.15rem 0.4rem;+ border-radius: 3px;+ color: var(--color-accent);+ }++ .step-description {+ font-size: 0.9rem;+ color: var(--color-text-secondary);+ }++ .no-workflows,+ .no-selection {+ text-align: center;+ padding: 2rem;+ color: var(--color-secondary);+ }++ .usage-hint {+ margin-top: 1.5rem;+ padding-top: 1rem;+ }++ .usage-hint p {+ margin: 0 0 0.5rem 0;+ color: var(--color-text-secondary);+ }++ .usage-hint ul {+ margin: 0;+ padding-left: 1.5rem;+ color: var(--color-text-secondary);+ }++ .usage-hint li {+ margin-bottom: 0.25rem;+ }++ .usage-hint code {+ font-size: 0.85rem;+ background: var(--color-input);+ padding: 0.1rem 0.3rem;+ border-radius: 3px;+ }+ </style>+ </body>+ </html>diff --cc webui/components/settings/settings.htmlindex d8578b7e6,526e10b21..78c652462--- a/webui/components/settings/settings.html+++ b/webui/components/settings/settings.html@@@ -29,14 -29,18 +29,18 @@@<div x-show="$store.settingsStore.settings" class="settings-content"><!-- Tab Navigation --><div class="settings-tabs-container">- <div class="settings-tabs">+ <div class="settings-tabs no-scrollbar">- <div class="settings-tab"+ <div class="settings-tab":class="{'active': $store.settingsStore.activeTab === 'agent'}"- @click="$store.settingsStore.switchTab('agent')"+ @click="$store.settingsStore.switchTab('agent')"title="Agent Settings">Agent Settings</div>- <div class="settings-tab"+ <div class="settings-tab"+ :class="{'active': $store.settingsStore.activeTab === 'skills'}"+ @click="$store.settingsStore.switchTab('skills')"+ title="Skills">Skills</div>+ <div class="settings-tab":class="{'active': $store.settingsStore.activeTab === 'external'}"- @click="$store.settingsStore.switchTab('external')"+ @click="$store.settingsStore.switchTab('external')"title="External Services">External Services</div><div class="settings-tab":class="{'active': $store.settingsStore.activeTab === 'mcp'}"@@@ -46,14 -50,10 +50,10 @@@:class="{'active': $store.settingsStore.activeTab === 'developer'}"@click="$store.settingsStore.switchTab('developer')"title="Developer">Developer</div>- <div class="settings-tab"+ <div class="settings-tab":class="{'active': $store.settingsStore.activeTab === 'backup'}"- @click="$store.settingsStore.switchTab('backup')"+ @click="$store.settingsStore.switchTab('backup')"title="Backup & Restore">Backup & Restore</div>- <div class="settings-tab"- :class="{'active': $store.settingsStore.activeTab === 'skills'}"- @click="$store.settingsStore.switchTab('skills')"- title="Skills">Skills</div></div></div>