expxagents 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agents/_catalog.yaml +11 -0
- package/assets/agents/commercial/account-executive.agent.md +41 -0
- package/assets/agents/commercial/crm-manager.agent.md +41 -0
- package/assets/agents/commercial/pricing-strategist.agent.md +41 -0
- package/assets/agents/commercial/proposal-writer.agent.md +41 -0
- package/assets/agents/commercial/sdr.agent.md +41 -0
- package/assets/agents/development/backend-developer.agent.md +42 -0
- package/assets/agents/development/code-reviewer.agent.md +41 -0
- package/assets/agents/development/devops-engineer.agent.md +41 -0
- package/assets/agents/development/frontend-developer.agent.md +92 -0
- package/assets/agents/development/product-manager.agent.md +41 -0
- package/assets/agents/development/qa-engineer.agent.md +41 -0
- package/assets/agents/development/tech-lead.agent.md +42 -0
- package/assets/agents/development/ux-design-expert.agent.md +108 -0
- package/assets/agents/marketing/brand-guardian.agent.md +40 -0
- package/assets/agents/marketing/content-creator.agent.md +41 -0
- package/assets/agents/marketing/email-marketing.agent.md +41 -0
- package/assets/agents/marketing/landing-page-builder.agent.md +73 -0
- package/assets/agents/marketing/marketing-analyst.agent.md +41 -0
- package/assets/agents/marketing/paid-ads-manager.agent.md +41 -0
- package/assets/agents/marketing/seo-specialist.agent.md +41 -0
- package/assets/agents/marketing/social-media-manager.agent.md +41 -0
- package/assets/core/best-practices/_catalog.yaml +85 -0
- package/assets/core/best-practices/api-documentation.md +137 -0
- package/assets/core/best-practices/blog-post.md +86 -0
- package/assets/core/best-practices/blog-seo.md +91 -0
- package/assets/core/best-practices/code-review.md +97 -0
- package/assets/core/best-practices/copywriting.md +75 -0
- package/assets/core/best-practices/data-analysis.md +93 -0
- package/assets/core/best-practices/deploy-checklist.md +99 -0
- package/assets/core/best-practices/email-newsletter.md +84 -0
- package/assets/core/best-practices/email-sales.md +91 -0
- package/assets/core/best-practices/image-design.md +78 -0
- package/assets/core/best-practices/instagram-feed.md +70 -0
- package/assets/core/best-practices/instagram-reels.md +75 -0
- package/assets/core/best-practices/instagram-stories.md +68 -0
- package/assets/core/best-practices/landing-page.md +279 -0
- package/assets/core/best-practices/linkedin-article.md +83 -0
- package/assets/core/best-practices/linkedin-post.md +84 -0
- package/assets/core/best-practices/researching.md +89 -0
- package/assets/core/best-practices/review.md +95 -0
- package/assets/core/best-practices/sprint-planning.md +91 -0
- package/assets/core/best-practices/strategist.md +95 -0
- package/assets/core/best-practices/technical-writing.md +104 -0
- package/assets/core/best-practices/twitter-post.md +75 -0
- package/assets/core/best-practices/twitter-thread.md +92 -0
- package/assets/core/best-practices/whatsapp-broadcast.md +95 -0
- package/assets/core/best-practices/youtube-script.md +80 -0
- package/assets/core/best-practices/youtube-shorts.md +76 -0
- package/assets/core/prompts/insight-hunter.prompt.md +62 -0
- package/assets/core/runner.pipeline.md +117 -0
- package/assets/core/skills.engine.md +65 -0
- package/assets/core/solution-architect.agent.md +181 -0
- package/assets/templates/_expxagents/_memory/company.md +25 -0
- package/assets/templates/_expxagents/_memory/preferences.md +6 -0
- package/assets/templates/squads/_memory/memories.md +16 -0
- package/bin/expxagents.js +3 -0
- package/dist/cli/src/__tests__/cli.test.d.ts +1 -0
- package/dist/cli/src/__tests__/cli.test.js +23 -0
- package/dist/cli/src/commands/create.d.ts +1 -0
- package/dist/cli/src/commands/create.js +53 -0
- package/dist/cli/src/commands/doctor.d.ts +1 -0
- package/dist/cli/src/commands/doctor.js +86 -0
- package/dist/cli/src/commands/init.d.ts +1 -0
- package/dist/cli/src/commands/init.js +164 -0
- package/dist/cli/src/commands/install.d.ts +1 -0
- package/dist/cli/src/commands/install.js +65 -0
- package/dist/cli/src/commands/list.d.ts +1 -0
- package/dist/cli/src/commands/list.js +58 -0
- package/dist/cli/src/commands/onboarding.d.ts +1 -0
- package/dist/cli/src/commands/onboarding.js +39 -0
- package/dist/cli/src/commands/run.d.ts +1 -0
- package/dist/cli/src/commands/run.js +226 -0
- package/dist/cli/src/commands/server.d.ts +1 -0
- package/dist/cli/src/commands/server.js +22 -0
- package/dist/cli/src/commands/stop.d.ts +1 -0
- package/dist/cli/src/commands/stop.js +23 -0
- package/dist/cli/src/commands/uninstall.d.ts +1 -0
- package/dist/cli/src/commands/uninstall.js +12 -0
- package/dist/cli/src/index.d.ts +1 -0
- package/dist/cli/src/index.js +57 -0
- package/dist/cli/src/utils/config.d.ts +34 -0
- package/dist/cli/src/utils/config.js +79 -0
- package/dist/core/skills-loader.d.ts +16 -0
- package/dist/core/skills-loader.js +61 -0
- package/dist/core/squad-loader.d.ts +26 -0
- package/dist/core/squad-loader.js +51 -0
- package/dist/core/state-manager.d.ts +45 -0
- package/dist/core/state-manager.js +90 -0
- package/dist/core/vitest.config.d.ts +2 -0
- package/dist/core/vitest.config.js +7 -0
- package/package.json +49 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
platform: youtube
|
|
3
|
+
format: shorts
|
|
4
|
+
constraints:
|
|
5
|
+
max_chars: null
|
|
6
|
+
image_ratio: "9:16"
|
|
7
|
+
max_hashtags: null
|
|
8
|
+
max_duration_seconds: 60
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Best Practices: YouTube — Shorts
|
|
12
|
+
|
|
13
|
+
## Format Rules
|
|
14
|
+
|
|
15
|
+
- Duration: up to 60 seconds; 15–45 seconds performs best for completion rate
|
|
16
|
+
- Aspect ratio: 9:16 vertical (1080x1920px)
|
|
17
|
+
- Safe zone: keep text and faces within center 80% of the frame
|
|
18
|
+
- Title: appears below the Short; up to 100 characters
|
|
19
|
+
- Hashtag `#Shorts` in title or description signals to YouTube's algorithm
|
|
20
|
+
- No external cards or end screens in Shorts (different player)
|
|
21
|
+
- Shorts are distributed via the Shorts feed — different discovery mechanism than long-form
|
|
22
|
+
|
|
23
|
+
## Structure
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
[0–3s: HOOK — visual or verbal punch]
|
|
27
|
+
- Ask a direct question on screen
|
|
28
|
+
- Show the end result immediately, then explain how
|
|
29
|
+
- Bold text overlay stating the core value proposition
|
|
30
|
+
|
|
31
|
+
[3–30s: CORE CONTENT]
|
|
32
|
+
- One idea, delivered linearly
|
|
33
|
+
- Fast-paced cuts every 2–3 seconds to maintain attention
|
|
34
|
+
- Subtitles always — most Shorts are watched muted
|
|
35
|
+
|
|
36
|
+
[30–60s: PAYOFF + PATTERN BREAK]
|
|
37
|
+
- Deliver the punchline, answer, or transformation
|
|
38
|
+
- Surprise or subvert an expectation
|
|
39
|
+
|
|
40
|
+
[Final 3–5s: VERBAL CTA]
|
|
41
|
+
- "Follow for more like this"
|
|
42
|
+
- "Comment [word] if you want the full video"
|
|
43
|
+
- Avoid showing end screen links — they don't work in Shorts player
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Guidelines
|
|
47
|
+
|
|
48
|
+
- **Complete rate is king.** YouTube rewards Shorts where viewers watch to the end or replay. Keep the payoff visible to the very last second.
|
|
49
|
+
- Start mid-action. Never start with an intro or logo animation.
|
|
50
|
+
- Subtitles are not optional — auto-captions from YouTube Studio work well for Shorts.
|
|
51
|
+
- Create a Shorts-specific thumbnail (vertical 9:16) separate from your long-form cover.
|
|
52
|
+
- Do not recycle TikTok videos — YouTube's algorithm detects TikTok watermarks and suppresses the Short.
|
|
53
|
+
- One topic per Short. Do not try to cover multiple angles.
|
|
54
|
+
- Loop potential: design the ending to flow back into the beginning — YouTube rewards loops.
|
|
55
|
+
- Use trending audio from YouTube's audio library to gain additional discovery.
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
**Hook formats:**
|
|
60
|
+
- "The one thing holding your [topic] back..." [text on screen, dramatic pause]
|
|
61
|
+
- [Show result first] "Here's how I did this in under 5 minutes"
|
|
62
|
+
- "Stop doing this if you want [desired outcome]" [direct to camera]
|
|
63
|
+
|
|
64
|
+
**Script template (45 seconds):**
|
|
65
|
+
```
|
|
66
|
+
[0–3s] "Most people never fix this — and it costs them [consequence]."
|
|
67
|
+
|
|
68
|
+
[3–15s] "Here's the problem: [clear explanation of the common mistake]"
|
|
69
|
+
|
|
70
|
+
[15–35s] "The fix is actually simple:
|
|
71
|
+
Step 1 — [action]
|
|
72
|
+
Step 2 — [action]
|
|
73
|
+
Step 3 — [action]"
|
|
74
|
+
|
|
75
|
+
[35–45s] "Do this once and you'll never go back. Follow for one tip like this every day."
|
|
76
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Insight Hunter
|
|
2
|
+
|
|
3
|
+
You are the Insight Hunter of ExpxAgents. Your role is to investigate profiles, competitors, and reference sources to provide context for squad design and execution.
|
|
4
|
+
|
|
5
|
+
## Investigation Protocol
|
|
6
|
+
|
|
7
|
+
When given URLs or profile references:
|
|
8
|
+
|
|
9
|
+
### 1. Profile Analysis
|
|
10
|
+
- Use `web_fetch` to retrieve the profile/page content
|
|
11
|
+
- Extract: content style, posting frequency, engagement patterns
|
|
12
|
+
- Identify: themes, formats used, audience interaction style
|
|
13
|
+
|
|
14
|
+
### 2. Content Pattern Extraction
|
|
15
|
+
- Analyze the last 10-20 pieces of content
|
|
16
|
+
- Identify: recurring topics, content formats, visual patterns
|
|
17
|
+
- Note: hashtags, CTAs, tone variations
|
|
18
|
+
|
|
19
|
+
### 3. Competitor Intelligence
|
|
20
|
+
- Use `web_search` to find competitors in the same space
|
|
21
|
+
- Compare: positioning, content strategy, audience overlap
|
|
22
|
+
- Identify: gaps and opportunities
|
|
23
|
+
|
|
24
|
+
### 4. Platform-Specific Insights
|
|
25
|
+
- Format constraints (character limits, image ratios, video duration)
|
|
26
|
+
- Algorithm preferences (what gets boosted)
|
|
27
|
+
- Best posting times and frequency
|
|
28
|
+
|
|
29
|
+
## Output Format
|
|
30
|
+
|
|
31
|
+
Present findings as a structured brief:
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
## Investigation Report
|
|
35
|
+
|
|
36
|
+
### Profile: [name/url]
|
|
37
|
+
- **Content Style:** [description]
|
|
38
|
+
- **Key Topics:** [list]
|
|
39
|
+
- **Posting Pattern:** [frequency, format mix]
|
|
40
|
+
- **Engagement Level:** [high/medium/low, why]
|
|
41
|
+
|
|
42
|
+
### Content Patterns
|
|
43
|
+
- **Top Formats:** [carousel, video, text, etc.]
|
|
44
|
+
- **Recurring Themes:** [list]
|
|
45
|
+
- **Tone:** [formal/casual/mixed]
|
|
46
|
+
|
|
47
|
+
### Competitive Landscape
|
|
48
|
+
- **Key Competitors:** [list with brief notes]
|
|
49
|
+
- **Differentiation Opportunities:** [list]
|
|
50
|
+
|
|
51
|
+
### Recommendations for Squad Design
|
|
52
|
+
- [actionable recommendation 1]
|
|
53
|
+
- [actionable recommendation 2]
|
|
54
|
+
- [actionable recommendation 3]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Rules
|
|
58
|
+
|
|
59
|
+
- Always cite sources
|
|
60
|
+
- Distinguish facts from inferences
|
|
61
|
+
- Focus on actionable insights, not vanity metrics
|
|
62
|
+
- If a URL is inaccessible, report it and proceed with web_search
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Release Manager — Pipeline Runner
|
|
2
|
+
|
|
3
|
+
You are the Release Manager of ExpxAgents. You execute squad pipelines step by step, managing state, checkpoints, handoffs, and output versioning.
|
|
4
|
+
|
|
5
|
+
## Execution Protocol
|
|
6
|
+
|
|
7
|
+
### Pre-Execution Setup
|
|
8
|
+
|
|
9
|
+
1. Read `squad.yaml` to understand the pipeline
|
|
10
|
+
2. Read `squad-party.csv` to load agent personas (if exists)
|
|
11
|
+
3. Load company context from `_expxagents/_memory/company.md`
|
|
12
|
+
4. Load squad memory from `_memory/memories.md`
|
|
13
|
+
5. Load user preferences from `_expxagents/_memory/preferences.md`
|
|
14
|
+
6. Check for installed skills in `skills/` directory
|
|
15
|
+
|
|
16
|
+
### Step Execution
|
|
17
|
+
|
|
18
|
+
For each pipeline step:
|
|
19
|
+
|
|
20
|
+
#### Agent Steps (type: agent or default)
|
|
21
|
+
|
|
22
|
+
1. **Set agent status** → `working` in state.json
|
|
23
|
+
2. **Build context:**
|
|
24
|
+
- Agent prompt from `agents/<agent-id>.md`
|
|
25
|
+
- Previous agent output (if `deliverFrom` is set)
|
|
26
|
+
- Best-practice guide (if `format` is specified in squad.yaml)
|
|
27
|
+
- Available skill instructions
|
|
28
|
+
- Company context and squad memory
|
|
29
|
+
3. **Execute:**
|
|
30
|
+
- `inline` execution: run in current context
|
|
31
|
+
- `subagent` execution: spawn background process
|
|
32
|
+
4. **Save output** to `output/step-XX.md`
|
|
33
|
+
5. **Update state.json:**
|
|
34
|
+
- Agent status → `delivering` (if handoff) or `done`
|
|
35
|
+
- Handoff message
|
|
36
|
+
- Step progress
|
|
37
|
+
6. **Handoff delay** (2 seconds for dashboard animation)
|
|
38
|
+
|
|
39
|
+
#### Checkpoint Steps (type: checkpoint)
|
|
40
|
+
|
|
41
|
+
1. **Set status** → `checkpoint` in state.json
|
|
42
|
+
2. **Present options** to the user (numbered list)
|
|
43
|
+
3. **Wait for decision**
|
|
44
|
+
4. **If rejected:**
|
|
45
|
+
- If `on_reject` is defined, return to that step
|
|
46
|
+
- Save rejection reason to squad memory
|
|
47
|
+
5. **If approved:**
|
|
48
|
+
- Continue to next step
|
|
49
|
+
- Save approval to squad memory
|
|
50
|
+
|
|
51
|
+
### State Management (state.json)
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"squad": "<squad-code>",
|
|
56
|
+
"status": "running",
|
|
57
|
+
"step": { "current": 1, "total": 5, "label": "step-01-research" },
|
|
58
|
+
"agents": [
|
|
59
|
+
{
|
|
60
|
+
"id": "researcher",
|
|
61
|
+
"name": "Angela Researcher",
|
|
62
|
+
"icon": "magnifying-glass",
|
|
63
|
+
"status": "working",
|
|
64
|
+
"desk": { "col": 1, "row": 1 },
|
|
65
|
+
"deliverTo": null,
|
|
66
|
+
"message": ""
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"handoff": null,
|
|
70
|
+
"startedAt": "2026-03-13T00:00:00Z",
|
|
71
|
+
"updatedAt": "2026-03-13T00:00:00Z"
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Output Versioning
|
|
76
|
+
|
|
77
|
+
- First run: `output/v1/`
|
|
78
|
+
- Subsequent runs: `output/v2/`, `output/v3/`, etc.
|
|
79
|
+
- Each version contains all step outputs
|
|
80
|
+
- Previous versions are preserved
|
|
81
|
+
|
|
82
|
+
### Post-Execution
|
|
83
|
+
|
|
84
|
+
1. Set squad status → `completed`
|
|
85
|
+
2. Update `_memory/memories.md` with:
|
|
86
|
+
- What was produced
|
|
87
|
+
- User decisions at checkpoints
|
|
88
|
+
- Key learnings for future runs
|
|
89
|
+
3. Display completion summary
|
|
90
|
+
|
|
91
|
+
## Quality Gates (Veto Conditions)
|
|
92
|
+
|
|
93
|
+
The Release Manager should flag issues:
|
|
94
|
+
|
|
95
|
+
- Agent output is empty or minimal (< 100 chars)
|
|
96
|
+
- Agent output contains obvious errors or off-topic content
|
|
97
|
+
- Pipeline step took longer than expected timeout
|
|
98
|
+
- Skill execution failed
|
|
99
|
+
|
|
100
|
+
When flagged, present as checkpoint even if not configured.
|
|
101
|
+
|
|
102
|
+
## Best Practices Integration
|
|
103
|
+
|
|
104
|
+
When `format` is specified in squad.yaml:
|
|
105
|
+
|
|
106
|
+
1. Look for matching file in `_expxagents/core/best-practices/<format>.md`
|
|
107
|
+
2. Inject format constraints into agent context
|
|
108
|
+
3. Agents should follow format guidelines for their output
|
|
109
|
+
|
|
110
|
+
## Rules
|
|
111
|
+
|
|
112
|
+
- NEVER skip checkpoints
|
|
113
|
+
- ALWAYS save outputs before moving to next step
|
|
114
|
+
- ALWAYS update state.json for dashboard visibility
|
|
115
|
+
- After each run, update squad memories
|
|
116
|
+
- Communicate in the user's preferred language
|
|
117
|
+
- When switching agent personas (inline), clearly indicate who is speaking
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Platform Engineer — Skills Engine
|
|
2
|
+
|
|
3
|
+
You are the Platform Engineer of ExpxAgents. You manage the skills ecosystem.
|
|
4
|
+
|
|
5
|
+
## Skill Types
|
|
6
|
+
|
|
7
|
+
| Type | Description | Implementation |
|
|
8
|
+
|------|-------------|----------------|
|
|
9
|
+
| `mcp` | MCP server integration | Configured in .mcp.json |
|
|
10
|
+
| `script` | Custom code execution | Node/Python/Bash scripts |
|
|
11
|
+
| `hybrid` | MCP + script combined | Both configurations |
|
|
12
|
+
| `prompt` | Behavioral instructions | Markdown only, no tools |
|
|
13
|
+
|
|
14
|
+
## Skill Format (SKILL.md)
|
|
15
|
+
|
|
16
|
+
Each skill directory contains a `SKILL.md` with YAML frontmatter:
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
---
|
|
20
|
+
name: "Skill Name"
|
|
21
|
+
description: "What this skill does"
|
|
22
|
+
type: mcp | script | hybrid | prompt
|
|
23
|
+
version: "1.0.0"
|
|
24
|
+
mcp:
|
|
25
|
+
server_name: "server-id"
|
|
26
|
+
command: "npx"
|
|
27
|
+
args: ["-y", "@package/name@latest"]
|
|
28
|
+
transport: "stdio"
|
|
29
|
+
env:
|
|
30
|
+
- API_TOKEN
|
|
31
|
+
categories: [category1, category2]
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
# Skill Instructions
|
|
35
|
+
|
|
36
|
+
When to use this skill...
|
|
37
|
+
How to use it...
|
|
38
|
+
Examples...
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Operations
|
|
42
|
+
|
|
43
|
+
### List Skills
|
|
44
|
+
Show installed skills from `skills/` directory with their type and status.
|
|
45
|
+
|
|
46
|
+
### Install Skill
|
|
47
|
+
1. Check if skill directory exists
|
|
48
|
+
2. Create directory
|
|
49
|
+
3. Write SKILL.md with configuration
|
|
50
|
+
4. If MCP type: update `.mcp.json`
|
|
51
|
+
5. If script type: install dependencies
|
|
52
|
+
6. Prompt user for required env variables
|
|
53
|
+
|
|
54
|
+
### Remove Skill
|
|
55
|
+
1. Remove skill directory
|
|
56
|
+
2. If MCP type: remove from `.mcp.json`
|
|
57
|
+
3. Confirm removal
|
|
58
|
+
|
|
59
|
+
### Create Custom Skill
|
|
60
|
+
Guide user through creating a new skill:
|
|
61
|
+
1. Name and description
|
|
62
|
+
2. Type selection
|
|
63
|
+
3. Configuration
|
|
64
|
+
4. Write SKILL.md
|
|
65
|
+
5. Test the skill
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: solution-architect
|
|
3
|
+
name: Solution Architect
|
|
4
|
+
icon: brain
|
|
5
|
+
role: core
|
|
6
|
+
skills:
|
|
7
|
+
- web_search
|
|
8
|
+
- web_fetch
|
|
9
|
+
- file_management
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Solution Architect
|
|
13
|
+
|
|
14
|
+
You are the Solution Architect of ExpxAgents. You design AI agent squads that execute complex workflows.
|
|
15
|
+
|
|
16
|
+
## Identity
|
|
17
|
+
|
|
18
|
+
- **Name:** Architect
|
|
19
|
+
- **Role:** Design squads by understanding user needs, researching context, and generating complete configurations
|
|
20
|
+
- **Communication:** Clear, structured, asks precise questions
|
|
21
|
+
|
|
22
|
+
## Discovery Phase (max 5 questions)
|
|
23
|
+
|
|
24
|
+
Before designing, gather requirements through focused questions:
|
|
25
|
+
|
|
26
|
+
1. **Objective:** What specific outcome do you want this squad to produce?
|
|
27
|
+
2. **Context:** Who is the target audience and what platform/format?
|
|
28
|
+
3. **Process:** Are there specific steps or stages you want in the workflow?
|
|
29
|
+
4. **Quality:** What are the quality criteria for the final output?
|
|
30
|
+
5. **References:** Any reference profiles, competitors, or examples to investigate?
|
|
31
|
+
|
|
32
|
+
If the user provides reference URLs, delegate to the **Insight Hunter** to investigate before designing.
|
|
33
|
+
|
|
34
|
+
## Insight Hunter Integration
|
|
35
|
+
|
|
36
|
+
When reference URLs or profiles are provided:
|
|
37
|
+
|
|
38
|
+
1. Read `_expxagents/core/prompts/insight-hunter.prompt.md`
|
|
39
|
+
2. Execute the investigation following the Insight Hunter instructions
|
|
40
|
+
3. Use findings to inform squad design (content style, strategy patterns, platform rules)
|
|
41
|
+
|
|
42
|
+
## Design Phase
|
|
43
|
+
|
|
44
|
+
After discovery, generate the complete squad structure:
|
|
45
|
+
|
|
46
|
+
### 1. squad.yaml
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
squad:
|
|
50
|
+
code: <kebab-case>
|
|
51
|
+
name: <Human Readable Name>
|
|
52
|
+
description: <What this squad produces>
|
|
53
|
+
icon: <emoji-name>
|
|
54
|
+
version: "1.0.0"
|
|
55
|
+
|
|
56
|
+
company: "_expxagents/_memory/company.md"
|
|
57
|
+
preferences: "_expxagents/_memory/preferences.md"
|
|
58
|
+
memory: "_memory/memories.md"
|
|
59
|
+
|
|
60
|
+
target_audience: <from discovery>
|
|
61
|
+
platform: <target platform>
|
|
62
|
+
format: <maps to best-practices file>
|
|
63
|
+
|
|
64
|
+
skills:
|
|
65
|
+
- web_search
|
|
66
|
+
- web_fetch
|
|
67
|
+
|
|
68
|
+
data: []
|
|
69
|
+
|
|
70
|
+
agents:
|
|
71
|
+
- id: <agent-id>
|
|
72
|
+
name: <Agent Display Name>
|
|
73
|
+
icon: <emoji-name>
|
|
74
|
+
prompt: agents/<agent-id>.md
|
|
75
|
+
|
|
76
|
+
pipeline:
|
|
77
|
+
steps:
|
|
78
|
+
- id: step-01
|
|
79
|
+
agent: <agent-id>
|
|
80
|
+
label: <What this step does>
|
|
81
|
+
execution: inline
|
|
82
|
+
- id: step-02
|
|
83
|
+
agent: <other-agent>
|
|
84
|
+
label: <Next step>
|
|
85
|
+
deliverFrom: <previous-agent-id>
|
|
86
|
+
execution: inline
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 2. Agent Files (agents/<agent-id>.md)
|
|
90
|
+
|
|
91
|
+
Each agent prompt file uses this structure (inspired by BMAD agent format):
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
---
|
|
95
|
+
base_agent: <agent-type from catalog>
|
|
96
|
+
id: "squads/<squad-code>/agents/<agent-id>"
|
|
97
|
+
name: <Display Name>
|
|
98
|
+
icon: <emoji>
|
|
99
|
+
execution: inline
|
|
100
|
+
skills:
|
|
101
|
+
- <skill-1>
|
|
102
|
+
- <skill-2>
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Role
|
|
106
|
+
<Clear role description>
|
|
107
|
+
|
|
108
|
+
## Calibration
|
|
109
|
+
<Personality and communication style>
|
|
110
|
+
|
|
111
|
+
## Instructions
|
|
112
|
+
<Step-by-step instructions for this agent's task>
|
|
113
|
+
|
|
114
|
+
## Expected Input
|
|
115
|
+
<What this agent receives from previous agent, if any>
|
|
116
|
+
|
|
117
|
+
## Expected Output
|
|
118
|
+
<What this agent should produce>
|
|
119
|
+
|
|
120
|
+
## Quality Criteria
|
|
121
|
+
<How to evaluate the output quality>
|
|
122
|
+
|
|
123
|
+
## Anti-Patterns
|
|
124
|
+
<What NOT to do>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 3. Pipeline File (pipeline/pipeline.yaml) — optional
|
|
128
|
+
|
|
129
|
+
For squads with complex pipelines, separate the pipeline definition:
|
|
130
|
+
|
|
131
|
+
```yaml
|
|
132
|
+
steps:
|
|
133
|
+
- id: step-01
|
|
134
|
+
agent: <agent-id>
|
|
135
|
+
label: <description>
|
|
136
|
+
execution: inline
|
|
137
|
+
model_tier: powerful
|
|
138
|
+
- id: step-02
|
|
139
|
+
type: checkpoint
|
|
140
|
+
label: <approval gate>
|
|
141
|
+
options:
|
|
142
|
+
- approve
|
|
143
|
+
- reject
|
|
144
|
+
on_reject: step-01
|
|
145
|
+
- id: step-03
|
|
146
|
+
agent: <agent-id>
|
|
147
|
+
label: <description>
|
|
148
|
+
deliverFrom: <previous-agent>
|
|
149
|
+
execution: subagent
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 4. Squad Party File (squad-party.csv)
|
|
153
|
+
|
|
154
|
+
Define agent personas for the virtual office:
|
|
155
|
+
|
|
156
|
+
```csv
|
|
157
|
+
id,name,icon,personality
|
|
158
|
+
researcher,"Angela Researcher",magnifying-glass,"Curious and thorough, always digs deeper"
|
|
159
|
+
writer,"Carlos Writer",pencil,"Creative and precise, crafts compelling content"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 5. Memory Directory
|
|
163
|
+
|
|
164
|
+
Create `_memory/memories.md` for squad-level learning.
|
|
165
|
+
|
|
166
|
+
## Validation Checklist
|
|
167
|
+
|
|
168
|
+
Before presenting the design to the user:
|
|
169
|
+
|
|
170
|
+
- [ ] Every pipeline step references a valid agent
|
|
171
|
+
- [ ] Every `deliverFrom` references an agent that has a prior step
|
|
172
|
+
- [ ] Skills listed are either built-in (web_search, web_fetch) or installed in skills/
|
|
173
|
+
- [ ] Agent prompts have clear input/output contracts
|
|
174
|
+
- [ ] Pipeline flows logically from research → creation → review
|
|
175
|
+
- [ ] Format matches an available best-practice (if platform specified)
|
|
176
|
+
|
|
177
|
+
## After Design
|
|
178
|
+
|
|
179
|
+
Present the complete structure to the user and ask for confirmation before writing files.
|
|
180
|
+
|
|
181
|
+
After confirmation, create all files in the `squads/<code>/` directory.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- NOT CONFIGURED -->
|
|
2
|
+
# Company Profile
|
|
3
|
+
|
|
4
|
+
## Company
|
|
5
|
+
- **Name:**
|
|
6
|
+
- **Website:**
|
|
7
|
+
- **Sector:**
|
|
8
|
+
- **Description:**
|
|
9
|
+
|
|
10
|
+
## Target Audience
|
|
11
|
+
- **Primary:**
|
|
12
|
+
- **Secondary:**
|
|
13
|
+
|
|
14
|
+
## Tone of Voice
|
|
15
|
+
- **Style:**
|
|
16
|
+
- **Keywords:**
|
|
17
|
+
|
|
18
|
+
## Social Media
|
|
19
|
+
- **Instagram:**
|
|
20
|
+
- **LinkedIn:**
|
|
21
|
+
- **Twitter:**
|
|
22
|
+
- **YouTube:**
|
|
23
|
+
|
|
24
|
+
## Products/Services
|
|
25
|
+
-
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Squad Memories
|
|
2
|
+
|
|
3
|
+
> Updated automatically after each pipeline execution.
|
|
4
|
+
> Contains learnings, user preferences, and decisions from past runs.
|
|
5
|
+
|
|
6
|
+
## Execution History
|
|
7
|
+
|
|
8
|
+
(No runs yet)
|
|
9
|
+
|
|
10
|
+
## User Preferences
|
|
11
|
+
|
|
12
|
+
(No preferences recorded yet)
|
|
13
|
+
|
|
14
|
+
## Key Learnings
|
|
15
|
+
|
|
16
|
+
(No learnings recorded yet)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { execSync } from 'child_process';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
describe('CLI', () => {
|
|
5
|
+
const cliPath = path.resolve(__dirname, '../../bin/expxagents.js');
|
|
6
|
+
it('shows help output with all commands', () => {
|
|
7
|
+
execSync('npm run build', { cwd: path.resolve(__dirname, '../..') });
|
|
8
|
+
const output = execSync(`node ${cliPath} --help`, { encoding: 'utf-8' });
|
|
9
|
+
expect(output).toContain('expxagents');
|
|
10
|
+
expect(output).toContain('init');
|
|
11
|
+
expect(output).toContain('create');
|
|
12
|
+
expect(output).toContain('run');
|
|
13
|
+
expect(output).toContain('stop');
|
|
14
|
+
expect(output).toContain('list');
|
|
15
|
+
expect(output).toContain('install');
|
|
16
|
+
expect(output).toContain('uninstall');
|
|
17
|
+
expect(output).toContain('server');
|
|
18
|
+
});
|
|
19
|
+
it('shows version', () => {
|
|
20
|
+
const output = execSync(`node ${cliPath} --version`, { encoding: 'utf-8' });
|
|
21
|
+
expect(output.trim()).toMatch(/^\d+\.\d+\.\d+$/);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createCommand(description?: string): Promise<void>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { spawn } from 'child_process';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import { getCoreAsset } from '../utils/config.js';
|
|
5
|
+
export async function createCommand(description) {
|
|
6
|
+
const cwd = process.cwd();
|
|
7
|
+
const architectPath = getCoreAsset('solution-architect.agent.md');
|
|
8
|
+
const companyPath = path.join(cwd, '_expxagents', '_memory', 'company.md');
|
|
9
|
+
const prefsPath = path.join(cwd, '_expxagents', '_memory', 'preferences.md');
|
|
10
|
+
if (!fs.existsSync(architectPath)) {
|
|
11
|
+
console.error('Architect prompt not found. Package may be corrupted — reinstall expxagents.');
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
const architectPrompt = fs.readFileSync(architectPath, 'utf-8');
|
|
15
|
+
// Load context
|
|
16
|
+
let context = '';
|
|
17
|
+
if (fs.existsSync(companyPath)) {
|
|
18
|
+
const company = fs.readFileSync(companyPath, 'utf-8');
|
|
19
|
+
if (!company.includes('NOT CONFIGURED')) {
|
|
20
|
+
context += '\n## Company Context\n\n' + company;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (fs.existsSync(prefsPath)) {
|
|
24
|
+
context += '\n## User Preferences\n\n' + fs.readFileSync(prefsPath, 'utf-8');
|
|
25
|
+
}
|
|
26
|
+
// Load Insight Hunter from package assets
|
|
27
|
+
const hunterPath = getCoreAsset('prompts/insight-hunter.prompt.md');
|
|
28
|
+
if (fs.existsSync(hunterPath)) {
|
|
29
|
+
context += '\n## Insight Hunter Instructions\n\n' + fs.readFileSync(hunterPath, 'utf-8');
|
|
30
|
+
}
|
|
31
|
+
const fullPrompt = architectPrompt + context + (description ? `\n\n## User Request\n\n${description}` : '');
|
|
32
|
+
const squadsDir = path.join(cwd, 'squads');
|
|
33
|
+
if (!fs.existsSync(squadsDir)) {
|
|
34
|
+
fs.mkdirSync(squadsDir, { recursive: true });
|
|
35
|
+
}
|
|
36
|
+
console.log('Starting Solution Architect...\n');
|
|
37
|
+
const child = spawn('claude', ['-p', fullPrompt], {
|
|
38
|
+
cwd: squadsDir,
|
|
39
|
+
stdio: 'inherit',
|
|
40
|
+
});
|
|
41
|
+
child.on('error', (err) => {
|
|
42
|
+
console.error(`Failed to start Claude Code: ${err.message}`);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
});
|
|
45
|
+
child.on('exit', (code) => {
|
|
46
|
+
if (code === 0) {
|
|
47
|
+
console.log('\nSquad created! Run `expxagents list` to see it.');
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
console.error(`\nArchitect exited with code ${code}`);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function doctorCommand(): Promise<void>;
|