| name | team-bernie |
| description | This skill should be used when Antigravity needs to coordinate a team of intelligent agents working in parallel on the same project. |
| category | orchestration |
| risk | medium |
| tags | [collaboration, agents, multi-agent] |
| date_added | 2026-04-03 |
team-bernie
Purpose
This skill allows Antigravity to coordinate a team of intelligent agents working in parallel on the same project, replicating the functionality of "Agent Teams".
Environment Configuration
The team uses a hidden folder in the project root to communicate:
.antigravity/team/tasks.json -> Master list of tasks, statuses, and dependencies.
.antigravity/team/mailbox/ -> Individual messages (.msg).
.antigravity/team/broadcast.msg -> Global messages for the entire team.
.antigravity/team/locks/ -> Semaphores to prevent simultaneous file editing.
Team Roles
- Director (Bernie): The leader. Divides the problem, assigns roles, and approves plans.
- Architect: Defines structure and patterns before coding.
- Specialist (Frontend/Backend/DB): Executes specific technical tasks.
- Marketer: Brand creation, logos, copywriting, and landing page design.
- Researcher: Information search, documentation, and market analysis.
- Reviewer (Devil's Advocate): Looks for flaws, bugs, and security issues.
Advanced Orchestration Protocol
1. Planning Mode (Gatekeeping)
Before making significant changes, each agent must send an Action Plan to Bernie's mailbox.
The agent remains in READ_ONLY or PLANNING mode until Bernie responds with an APPROVED message.
2. Messaging and Diffusion (Broadcast)
- Direct Message: 1-to-1 coordination between specialists.
- Broadcast: Bernie can write to
broadcast.msg to give new directives to the entire team simultaneously.
3. Task and Dependency Synchronization
Tasks in tasks.json can have a list of dependencies. An AI should not claim a task if its dependencies are not in the COMPLETED state.
Critical Rules
- NEVER edit a file if an active
.lock exists in .antigravity/team/locks/.
- Upon completing a task, the agent must release its "locks" and notify Bernie.
Orchestration Script (team_manager.py)
This script automates task management and communication. Save it as team_manager.py.
import json
import os
import sys
TEAM_DIR = ".antigravity/team"
def init_team():
"""Initializes the team infrastructure."""
os.makedirs(f"{TEAM_DIR}/mailbox", exist_ok=True)
os.makedirs(f"{TEAM_DIR}/locks", exist_ok=True)
tasks_path = f"{TEAM_DIR}/tasks.json"
if not os.path.exists(tasks_path):
with open(tasks_path, 'w') as f:
json.dump({"tasks": [], "members": []}, f, indent=2)
if not os.path.exists(f"{TEAM_DIR}/broadcast.msg"):
with open(f"{TEAM_DIR}/broadcast.msg", 'w') as f: f.write("")
print("✓ 'Bernie Team' infrastructure ready.")
def assign_task(title, assigned_to, deps=[]):
"""Assigns a new task with dependency support."""
path = f"{TEAM_DIR}/tasks.json"
with open(path, 'r+') as f:
data = json.load(f)
task = {
"id": len(data["tasks"]) + 1,
"title": title,
"status": "PENDING",
"plan_approved": False,
"assigned_to": assigned_to,
"dependencies": deps
}
data["tasks"].append(task)
f.seek(0)
json.dump(data, f, indent=2)
print(f"✓ Task {task['id']} ({title}) assigned to {assigned_to}.")
def broadcast(sender, text):
"""Sends a message to all team members."""
msg = {"de": sender, "tipo": "BROADCAST", "mensaje": text}
with open(f"{TEAM_DIR}/broadcast.msg", 'a') as f:
f.write(json.dumps(msg) + "\n")
print(f"✓ Global message sent by {sender}.")
def send_message(sender, receiver, text):
"""Sends a message to a specific agent's mailbox."""
msg = {"de": sender, "mensaje": text}
with open(f"{TEAM_DIR}/mailbox/{receiver}.msg", 'a') as f:
f.write(json.dumps(msg) + "\n")
print(f"✓ Message sent to {receiver}.")
if __name__ == "__main__":
if len(sys.argv) > 1:
cmd = sys.argv[1]
if cmd == "init": init_team()
How to use it
- Activate the Leader: Ask Antigravity to use the Bernie Team skill to initialize this project.
- Distribute the work: Bernie will divide the work. Open new terminals for each agent (Frontend, Marketer, etc.).
- Planning Flow: Agents send their plans to Bernie before starting. A well-coordinated team is unstoppable.