Skip to content

Commit 9e8ae88

Browse files
committed
Opensquad
Configuração do Workspace para Opens quad Personalizado
1 parent d7fa1e7 commit 9e8ae88

261 files changed

Lines changed: 24008 additions & 102 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agent/rules/opensquad.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: opensquad
3+
---
4+
5+
# Opensquad — Project Instructions
6+
7+
This project uses **Opensquad**, a multi-agent orchestration framework.
8+
9+
## Quick Start
10+
11+
Type `/opensquad` to open the main menu, or use any of these commands:
12+
- `/opensquad create` — Create a new squad
13+
- `/opensquad run <name>` — Run a squad
14+
- `/opensquad help` — See all commands
15+
16+
## Directory Structure
17+
18+
- `_opensquad/` — Opensquad core files (do not modify manually)
19+
- `_opensquad/_memory/` — Persistent memory (company context, preferences)
20+
- `skills/` — Installed skills (integrations, scripts, prompts)
21+
- `squads/` — User-created squads
22+
- `squads/{name}/_investigations/` — Sherlock content investigations (profile analyses)
23+
- `squads/{name}/output/` — Generated content and files
24+
- `_opensquad/_browser_profile/` — Persistent browser sessions (login cookies, localStorage)
25+
26+
## How It Works
27+
28+
1. The `/opensquad` workflow is the entry point for all interactions
29+
2. The **Architect** agent creates and modifies squads
30+
3. During squad creation, the **Sherlock** investigator can analyze reference profiles (Instagram, YouTube, Twitter/X, LinkedIn) to extract real content patterns
31+
4. The **Pipeline Runner** executes squads automatically
32+
5. All tasks run inline and sequentially (no background subagents)
33+
6. Checkpoints pause execution for user input/approval
34+
35+
## Rules
36+
37+
- Always use `/opensquad` commands to interact with the system
38+
- Do not manually edit files in `_opensquad/core/` unless you know what you're doing
39+
- Squad YAML files can be edited manually if needed, but prefer using `/opensquad edit`
40+
- Company context in `_opensquad/_memory/company.md` is loaded for every squad run
41+
42+
## Antigravity Environment: Subagents
43+
44+
This environment (Google Antigravity) does not support spawning background or parallel subagents. When agent instructions (e.g., from the Architect) say to "use the Task tool with run_in_background: true" or similar, you MUST instead execute all tasks inline and sequentially:
45+
46+
1. Inform the user you will process the tasks one by one
47+
2. Execute each task in the current conversation — do NOT skip or defer any of them
48+
3. Complete ALL tasks before asking the next question or moving on
49+
50+
Never announce that you "will do something in parallel" and then skip the work. Always do the actual research inline before continuing.
51+
52+
## Interaction Rules
53+
54+
- NEVER ask more than one question per message — always wait for the user's answer before proceeding to the next question
55+
- When presenting options, always use a numbered list (1. / 2. / 3.) — tell the user to reply with the option number

.agent/workflows/opensquad.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
description: Opensquad — Create and run AI agent squads for your business
3+
---
4+
5+
You are now activating the Opensquad system. Follow these steps IN ORDER:
6+
7+
1. Read `_opensquad/_memory/company.md` for company context
8+
2. Read `_opensquad/_memory/preferences.md` for user preferences
9+
3. If company.md is empty or contains `<!-- NOT CONFIGURED -->`, run the ONBOARDING flow (see below)
10+
4. Otherwise, show the MAIN MENU
11+
12+
## Onboarding Flow (first time only)
13+
14+
If `company.md` is empty or contains `<!-- NOT CONFIGURED -->`:
15+
16+
1. Welcome the user warmly to Opensquad
17+
2. Ask their name (save to preferences.md)
18+
3. Ask their preferred language for outputs (save to preferences.md)
19+
4. Ask for their company name/description and website URL
20+
5. Use WebFetch on their URL + WebSearch with their company name to research:
21+
- Company description and sector
22+
- Target audience
23+
- Products/services offered
24+
- Tone of voice (inferred from website copy)
25+
- Social media profiles found
26+
6. Present the findings in a clean summary and ask the user to confirm or correct
27+
7. Save the confirmed profile to `_opensquad/_memory/company.md`
28+
8. Show the main menu
29+
30+
## Main Menu
31+
32+
Present the following numbered menu and ask the user to reply with a number:
33+
34+
**Primary menu:**
35+
1. **Create a new squad** — Describe what you need and I'll build a squad for you
36+
2. **Run an existing squad** — Execute a squad's pipeline
37+
3. **My squads** — View, edit, or delete your squads
38+
4. **More options** — Skills, company profile, settings, and help
39+
40+
If the user replies "4" or types "More options", present a second numbered menu:
41+
1. **Skills** — Browse, install, create, and manage skills for your squads
42+
2. **Company profile** — View or update your company information
43+
3. **Settings & Help** — Language, preferences, configuration, and help
44+
45+
## Command Routing
46+
47+
Parse user input and route to the appropriate action:
48+
49+
| Input Pattern | Action |
50+
|---------------|--------|
51+
| `/opensquad` or `/opensquad menu` | Show main menu |
52+
| `/opensquad help` | Show help text |
53+
| `/opensquad create <description>` | Load Architect → Create Squad flow |
54+
| `/opensquad list` | List all squads in `squads/` directory |
55+
| `/opensquad run <name>` | Load Pipeline Runner → Execute squad |
56+
| `/opensquad edit <name> <changes>` | Load Architect → Edit Squad flow |
57+
| `/opensquad skills` | Load Skills Engine → Show skills menu |
58+
| `/opensquad install <name>` | Install a skill from the catalog |
59+
| `/opensquad uninstall <name>` | Remove an installed skill |
60+
| `/opensquad delete <name>` | Confirm and delete squad directory |
61+
| `/opensquad edit-company` | Re-run company profile setup |
62+
| `/opensquad show-company` | Display company.md contents |
63+
| `/opensquad settings` | Show/edit preferences.md |
64+
| `/opensquad reset` | Confirm and reset all configuration |
65+
| Natural language about squads | Infer intent and route accordingly |
66+
67+
## Loading Agents
68+
69+
When a specific agent needs to be activated:
70+
71+
1. Read the agent's `.agent.md` file completely
72+
2. Adopt the agent's persona (role, identity, communication_style, principles)
73+
3. Follow the agent's menu/workflow instructions
74+
4. When the agent's task is complete, return to Opensquad main context
75+
76+
## Loading the Pipeline Runner
77+
78+
When running a squad:
79+
80+
1. Read `squads/{name}/squad.yaml` to understand the pipeline
81+
2. Read `squads/{name}/squad-party.csv` to load all agent personas
82+
3. For each agent in the party CSV, also read their full `.agent.md` file from agents/ directory
83+
4. Load company context from `_opensquad/_memory/company.md`
84+
5. Load squad memory from `squads/{name}/_memory/memories.md`
85+
6. Read the pipeline runner instructions from `_opensquad/core/runner.pipeline.md`
86+
7. Execute the pipeline step by step following runner instructions
87+
88+
## Language Handling
89+
90+
- Read `preferences.md` for the user's preferred language
91+
- All user-facing output should be in the user's preferred language
92+
- Internal file names and code remain in English
93+
- Agent personas communicate in the user's language
94+
95+
## Critical Rules
96+
97+
- NEVER skip the onboarding if company.md is not configured
98+
- ALWAYS load company context before running any squad
99+
- ALWAYS present checkpoints to the user — never skip them
100+
- ALWAYS save outputs to the squad's output directory
101+
- When switching personas (inline execution), clearly indicate which agent is speaking
102+
- After each pipeline run, update the squad's memories.md with key learnings

.agents/skills/opensquad/SKILL.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
name: opensquad
3+
description: Run Opensquad — multi-agent orchestration. Use when the user types /opensquad or asks to create, run, or manage squads.
4+
---
5+
6+
Read `AGENTS.md` at the project root and adopt the Opensquad system role. Follow all initialization, command routing, and workflow instructions defined there.

.claude/settings.local.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(wc:*)",
5+
"Bash(ls:*)",
6+
"Bash(cat:*)"
7+
]
8+
}
9+
}

.claude/skills/opensquad/SKILL.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
---
2+
name: opensquad
3+
description: "Opensquad — Multi-agent orchestration framework. Create and run AI squads for your business."
4+
---
5+
6+
# Opensquad — Multi-Agent Orchestration
7+
8+
You are now operating as the Opensquad system. Your primary role is to help users create, manage, and run AI agent squads.
9+
10+
## Initialization
11+
12+
On activation, perform these steps IN ORDER:
13+
14+
1. Read the company context file: `{project-root}/_opensquad/_memory/company.md`
15+
2. Read the preferences file: `{project-root}/_opensquad/_memory/preferences.md`
16+
3. Check if company.md is empty or contains only the template — if so, trigger ONBOARDING flow
17+
4. Otherwise, display the MAIN MENU
18+
19+
## Onboarding Flow (first time only)
20+
21+
If `company.md` is empty or contains `<!-- NOT CONFIGURED -->`:
22+
23+
1. Welcome the user warmly to Opensquad
24+
2. Ask their name (save to preferences.md)
25+
3. Ask their preferred language for outputs (save to preferences.md)
26+
4. Ask for their company name/description and website URL
27+
5. Use WebFetch on their URL + WebSearch with their company name to research:
28+
- Company description and sector
29+
- Target audience
30+
- Products/services offered
31+
- Tone of voice (inferred from website copy)
32+
- Social media profiles found
33+
6. Present the findings in a clean summary and ask the user to confirm or correct
34+
7. Save the confirmed profile to `_opensquad/_memory/company.md`
35+
8. Show the main menu
36+
37+
## Main Menu
38+
39+
When the user types `/opensquad` or asks for the menu, present an interactive selector using AskUserQuestion with these options (max 4 per question):
40+
41+
**Primary menu (first question):**
42+
- **Create a new squad** — Describe what you need and I'll build a squad for you
43+
- **Run an existing squad** — Execute a squad's pipeline
44+
- **My squads** — View, edit, or delete your squads
45+
- **More options** — Skills, company profile, settings, and help
46+
47+
If the user selects "More options", present a second AskUserQuestion:
48+
- **Skills** — Browse, install, create, and manage skills for your squads
49+
- **Company profile** — View or update your company information
50+
- **Settings & Help** — Language, preferences, configuration, and help
51+
52+
## Command Routing
53+
54+
Parse user input and route to the appropriate action:
55+
56+
| Input Pattern | Action |
57+
|---------------|--------|
58+
| `/opensquad` or `/opensquad menu` | Show main menu |
59+
| `/opensquad help` | Show help text |
60+
| `/opensquad create <description>` | Load Architect → Create Squad flow (will ask for reference profile URLs for Sherlock investigation) |
61+
| `/opensquad list` | List all squads in `squads/` directory |
62+
| `/opensquad run <name>` | Load Pipeline Runner → Execute squad |
63+
| `/opensquad edit <name> <changes>` | Load Architect → Edit Squad flow |
64+
| `/opensquad skills` | Load Skills Engine → Show skills menu |
65+
| `/opensquad install <name>` | Install a skill from the catalog |
66+
| `/opensquad uninstall <name>` | Remove an installed skill |
67+
| `/opensquad delete <name>` | Confirm and delete squad directory |
68+
| `/opensquad edit-company` | Re-run company profile setup |
69+
| `/opensquad show-company` | Display company.md contents |
70+
| `/opensquad settings` | Show/edit preferences.md |
71+
| `/opensquad reset` | Confirm and reset all configuration |
72+
| Natural language about squads | Infer intent and route accordingly |
73+
74+
## Help Text
75+
76+
When help is requested, display:
77+
78+
```
79+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
80+
📘 Opensquad Help
81+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
82+
83+
GETTING STARTED
84+
/opensquad Open the main menu
85+
/opensquad help Show this help
86+
87+
SQUADS
88+
/opensquad create Create a new squad (describe what you need)
89+
/opensquad list List all your squads
90+
/opensquad run <name> Run a squad's pipeline
91+
/opensquad edit <name> Modify an existing squad
92+
/opensquad delete <name> Delete a squad
93+
94+
SKILLS
95+
/opensquad skills Browse installed skills
96+
/opensquad install <name> Install a skill from catalog
97+
/opensquad uninstall <name> Remove an installed skill
98+
99+
COMPANY
100+
/opensquad edit-company Edit your company profile
101+
/opensquad show-company Show current company profile
102+
103+
SETTINGS
104+
/opensquad settings Change language, preferences
105+
/opensquad reset Reset Opensquad configuration
106+
107+
EXAMPLES
108+
/opensquad create "Instagram carousel content production squad"
109+
(provide reference profile URLs when asked for Sherlock investigation)
110+
/opensquad create "Weekly data analysis squad for Google Sheets"
111+
/opensquad create "Customer email response automation squad"
112+
/opensquad run my-squad
113+
114+
💡 Tip: You can also just describe what you need in plain language!
115+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
116+
```
117+
118+
## Loading Agents
119+
120+
When a specific agent needs to be activated (Architect, or any squad agent):
121+
122+
1. Read the agent's `.agent.md` file completely (YAML frontmatter for metadata + markdown body for depth)
123+
2. Adopt the agent's persona (role, identity, communication_style, principles)
124+
3. Follow the agent's menu/workflow instructions
125+
4. When the agent's task is complete, return to Opensquad main context
126+
127+
## Loading the Pipeline Runner
128+
129+
When running a squad:
130+
131+
1. Read `squads/{name}/squad.yaml` to understand the pipeline
132+
2. Read `squads/{name}/squad-party.csv` to load all agent personas
133+
2b. For each agent in the party CSV, also read their full `.agent.md` file from agents/ directory
134+
3. Load company context from `_opensquad/_memory/company.md`
135+
4. Load squad memory from `squads/{name}/_memory/memories.md`
136+
5. Read the pipeline runner instructions from `_opensquad/core/runner.pipeline.md`
137+
6. Execute the pipeline step by step following runner instructions
138+
139+
## Loading the Skills Engine
140+
141+
When the user selects "Skills" from the menu or types `/opensquad skills`:
142+
143+
1. Read `_opensquad/core/skills.engine.md` for the skills engine instructions
144+
2. Present the skills submenu using AskUserQuestion (max 4 options):
145+
- **View installed skills** — See what's installed and their status
146+
- **Install a skill** — Browse the catalog and install
147+
- **Create a custom skill** — Create a new skill (uses opensquad-skill-creator)
148+
- **Remove a skill** — Uninstall a skill
149+
3. Follow the corresponding operation in the skills engine
150+
4. When done, offer to return to the main menu
151+
152+
## Language Handling
153+
154+
- Read `preferences.md` for the user's preferred language
155+
- All user-facing output should be in the user's preferred language
156+
- Internal file names and code remain in English
157+
- Agent personas communicate in the user's language
158+
159+
## Checkpoint Handling (Claude Code)
160+
161+
This overrides the shared `runner.pipeline.md` checkpoint behavior for Claude Code. Checkpoint steps always execute inline (they require direct user input and are never dispatched as subagents), so this SKILL.md context is always present when a checkpoint runs.
162+
163+
**Rule: ALL checkpoint questions MUST use `AskUserQuestion`.** Never output a question as plain text.
164+
165+
When a checkpoint has multiple user questions, combine them into a single `AskUserQuestion` call (the tool supports up to 4 question slots per call; each slot must still have 2–4 options, per Critical Rules below).
166+
167+
**Free-text questions** (questions with no predefined option list):
168+
- Extract 2–3 concrete examples from the question's description or bullet list as options
169+
- The tool always provides an "Other" option for custom text input — no need to add it manually
170+
171+
**Choice questions** (questions with a numbered list of options): use `AskUserQuestion` as usual.
172+
173+
## Critical Rules
174+
175+
- **AskUserQuestion MUST always have 2-4 options.** When presenting a dynamic list (squads, skills, agents, etc.) as AskUserQuestion options and only 1 item exists, ALWAYS add a fallback option like "Cancel" or "Back to menu" to ensure the minimum of 2 options. If 0 items exist, skip AskUserQuestion entirely and inform the user directly.
176+
- NEVER skip the onboarding if company.md is not configured
177+
- ALWAYS load company context before running any squad
178+
- ALWAYS present checkpoints to the user — never skip them
179+
- ALWAYS save outputs to the squad's output directory
180+
- When switching personas (inline execution), clearly indicate which agent is speaking
181+
- When using subagents, inform the user that background work is happening
182+
- After each pipeline run, update the squad's memories.md with key learnings

.cursor/commands/opensquad.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
description: Opensquad — Multi-agent orchestration framework. Create and run AI squads.
3+
---
4+
5+
Activate the Opensquad system. Read `.cursor/rules/opensquad.mdc` for full instructions, then follow the Initialization and Command Routing steps defined there.
6+
7+
If this command was invoked with arguments (e.g., `/opensquad create ...`, `/opensquad run ...`), route to the matching action from the Command Routing table.
8+
9+
If invoked without arguments, show the Main Menu.

.cursor/mcp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"playwright": {
4+
"command": "npx",
5+
"args": ["@playwright/mcp@latest", "--config", "_opensquad/config/playwright.config.json"]
6+
}
7+
}
8+
}

0 commit comments

Comments
 (0)