Agent definition file generation with mandatory schema validation against schemas/agent.schema.json
Agent definition file generation with mandatory schema validation against schemas/agent.schema.json
Generates agent definition files that are schema-compliant by construction. Every generated agent MUST pass schemas/agent.schema.json validation before being written to disk.
CRITICAL: Every agent MUST comply with this schema. Memorize these constraints:
| Field | Type | Constraints |
|-||-|
| name | string | Pattern: ^[a-z0-9-]+$, min 3 chars, must match filename without .md |
| description | string | Min 20 chars |
| type | const | Must be "agent" |
| version | string | Semantic version: ^\\d+\\.\\d+\\.\\d+$ (e.g. 1.0.0) |
| domain | enum | ONLY: ai-ml, development, testing, review, documentation, debugging, deployment, analysis, orchestration, trading, sap, dotnet, java, web, devops, onboarding, factory |
| skills | array | Min 2 items, each matching ^[a-z0-9-]+(/[a-z0-9-]+)*$ |
| knowledge | array | Min 2 items, each matching ^[a-z0-9-]+\\.json$ (NO path prefixes like schemas/) |
| tools | array | Min 1 item (use ["none"] if no tools) |
| workflows | array | Min 1 item (use ["none"] if no workflows) |
| blueprints | array | Min 1 item (use ["none"] if no blueprints) |
| Field | Type | Description |
|-||-|
| mcp_servers | array of strings | MCP servers this agent uses |
| agent_team | array of strings | Other agents this agent coordinates with |
Use this mapping when the natural domain doesn't match an allowed value:
| Natural Domain | Use Instead |
||-|
| data-science | analysis |
| security | testing |
| integration | orchestration |
| general | development (for coders), documentation (for writers), deployment (for infra) |
| meta | factory |
For each requested agent:
{directories.patterns}/agents/{agent-id}.jsonCRITICAL VALIDATION CHECKLIST - verify each constraint:
[ ] name: lowercase kebab-case, >= 3 chars, matches filename
[ ] description: >= 20 characters
[ ] type: exactly "agent"
[ ] version: semantic version format (e.g. "1.0.0")
[ ] domain: is in the allowed enum list above
[ ] skills: array with >= 2 items, each lowercase kebab-case
[ ] knowledge: array with >= 2 items, each "name.json" format (no paths)
[ ] tools: array with >= 1 item (use ["none"] for no tools)
[ ] workflows: array with >= 1 item (use ["none"] for no workflows)
[ ] blueprints: array with >= 1 item (use ["none"] for no blueprints)
[ ] **New Requirement**: Run `verify_structures.py` to ensure H1, Purpose, and Important Rules sections are present.
name: {name}
description: {description}
type: agent
version: 1.0.0
domain: {domain from allowed enum}
skills: [{skill-1}, {skill-2}, ...]
knowledge: [{file-1}.json, {file-2}.json, ...]
tools: [{tool-1}, ...]
workflows: [{workflow-1} or "none"]
blueprints: [{blueprint-1} or "none"]
# {Title} Agent
## Purpose
{purpose}
## Philosophy
> "{philosophy quote}"
## When Activated
| Trigger Phrase | Context |
|||
| ... | ... |
## Skills Used
| Skill | Purpose |
|-||
| ... | ... |
## Workflow Diagram
```mermaid
graph TD
...
| Knowledge File | Content | ||| | ... | ... |
| Agent | Interaction | |-|| | ... | ... |
### Step 4: Write File
Write to target location:
- Path: `{TARGET}/{directories.agents}/{name}.md`
- Encoding: UTF-8
### Step 5: Post-Creation Sync (Factory Only)
**CRITICAL:** After creating agents in the Antigravity Agent Factory, run the repo-sync:
```powershell
{PYTHON_PATH} {directories.scripts}/validation/schema_validator.py --summary
{PYTHON_PATH} {directories.scripts}/validation/validate_readme_structure.py --update
{PYTHON_PATH} {directories.scripts}/build_knowledge_crossref.py
{PYTHON_PATH} {directories.scripts}/validation/verify_structures.py
| Error | Cause | Fix |
|-|-|--|
| domain: 'X' is not one of [...] | Invalid domain value | Use mapping guide above |
| blueprints: [] should be non-empty | Empty array | Change to ["none"] |
| knowledge.N does not match pattern | Path prefix in ref | Remove schemas/ prefix |
| skills: should have at least 2 items | Too few skills | Add related skills |
{directories.XXX} path variables - NEVER hardcode directory pathsmy-agent.md formatfile.json not schemas/file.json["none"] instead of [] for tools/workflows/blueprintsschemas/agent.schema.json - Canonical schema (source of truth){directories.knowledge}/knowledge-cross-reference.json - Knowledge mapping{directories.knowledge}/agent-taxonomy.json - Agent classification{directories.scripts}/validation/schema_validator.py - Validation script{directories.scripts}/build_knowledge_crossref.py - Cross-reference builderThis skill should be used when strict adherence to the defined process is required.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer