agentainer 0.1.7 → 2.0.1

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.
Files changed (98) hide show
  1. package/README.md +248 -677
  2. package/agentainer +16 -18
  3. package/agentainer.example.yaml +86 -0
  4. package/bin/agentainer.js +9 -8
  5. package/examples/academic-coauthor.yaml +123 -0
  6. package/examples/accessibility-audit.yaml +152 -0
  7. package/examples/affiliate-product-reviews.yaml +106 -0
  8. package/examples/api-design.yaml +157 -0
  9. package/examples/app-store-optimization.yaml +108 -0
  10. package/examples/brainstorm.yaml +27 -128
  11. package/examples/brand-voice-style-guide.yaml +109 -0
  12. package/examples/bug-hunt.yaml +51 -96
  13. package/examples/candidate-screen.yaml +122 -0
  14. package/examples/case-study-writer.yaml +100 -0
  15. package/examples/changelog-release-notes.yaml +114 -0
  16. package/examples/chatbot-builder.yaml +138 -0
  17. package/examples/code-review.yaml +73 -0
  18. package/examples/comparison-guide-writer.yaml +106 -0
  19. package/examples/competitive-intel.yaml +126 -0
  20. package/examples/content-studio.yaml +91 -0
  21. package/examples/course-creator.yaml +133 -0
  22. package/examples/customer-support-triage.yaml +118 -0
  23. package/examples/daily-briefing.yaml +119 -0
  24. package/examples/data-pipeline-builder.yaml +135 -0
  25. package/examples/debate.yaml +16 -90
  26. package/examples/design-system.yaml +138 -0
  27. package/examples/ebook-generator.yaml +90 -0
  28. package/examples/ecommerce-listing-optimizer.yaml +126 -0
  29. package/examples/email-newsletter.yaml +103 -0
  30. package/examples/faq-knowledge-sync.yaml +107 -0
  31. package/examples/game-design.yaml +122 -0
  32. package/examples/glossary-term-writer.yaml +103 -0
  33. package/examples/incident-response.yaml +52 -109
  34. package/examples/knowledge-base.yaml +115 -0
  35. package/examples/landing-page-converter.yaml +103 -0
  36. package/examples/legal-contract-review.yaml +118 -0
  37. package/examples/linkedin-ghostwriter.yaml +93 -0
  38. package/examples/localization.yaml +56 -123
  39. package/examples/meeting-notes.yaml +111 -0
  40. package/examples/migration-planner.yaml +127 -0
  41. package/examples/onboarding-buddy.yaml +111 -0
  42. package/examples/performance-audit.yaml +123 -0
  43. package/examples/podcast-production.yaml +117 -0
  44. package/examples/postmortem.yaml +119 -0
  45. package/examples/pr-review-gate.yaml +123 -0
  46. package/examples/press-release-wire.yaml +96 -0
  47. package/examples/product-spec.yaml +107 -0
  48. package/examples/prompt-engineering-lab.yaml +109 -0
  49. package/examples/quickstart.yaml +48 -0
  50. package/examples/rag-builder.yaml +145 -0
  51. package/examples/refactor-planner.yaml +127 -0
  52. package/examples/research.yaml +25 -0
  53. package/examples/resume-tailor.yaml +116 -0
  54. package/examples/rfp-response.yaml +124 -0
  55. package/examples/sales-coach.yaml +123 -0
  56. package/examples/security-audit.yaml +120 -0
  57. package/examples/seo-audit-and-fix.yaml +138 -0
  58. package/examples/seo-content-factory.yaml +103 -0
  59. package/examples/social-media.yaml +103 -0
  60. package/examples/software-company.yaml +71 -128
  61. package/examples/startup-validator.yaml +115 -0
  62. package/examples/tdd-pingpong.yaml +36 -68
  63. package/examples/technical-documentation.yaml +112 -0
  64. package/examples/test-factory.yaml +114 -0
  65. package/examples/tutorial-howto-creator.yaml +111 -0
  66. package/examples/twitter-x-thread-factory.yaml +91 -0
  67. package/examples/white-paper-research.yaml +96 -0
  68. package/examples/writers-room.yaml +49 -111
  69. package/examples/youtube-script-studio.yaml +107 -0
  70. package/hooks/claude_stop.sh +5 -3
  71. package/hooks/codex_notify.sh +4 -3
  72. package/lib/cli.py +933 -0
  73. package/lib/config.py +267 -308
  74. package/lib/hooks.py +246 -0
  75. package/lib/lock.py +75 -0
  76. package/lib/log.py +64 -0
  77. package/lib/mail.py +699 -0
  78. package/lib/minyaml.py +1 -39
  79. package/lib/reconcile.py +544 -0
  80. package/lib/sessions.py +223 -0
  81. package/lib/supervisor.py +216 -0
  82. package/lib/telegram.py +372 -0
  83. package/lib/tmux.py +355 -0
  84. package/lib/turn.py +167 -0
  85. package/lib/ui.py +1219 -0
  86. package/llms.txt +145 -429
  87. package/package.json +9 -7
  88. package/scripts/check-deps.js +18 -61
  89. package/ui/app.js +1136 -0
  90. package/ui/index.html +404 -0
  91. package/agents.example.yaml +0 -257
  92. package/examples/code-review-broadcast.yaml +0 -109
  93. package/examples/existing-repo.yaml +0 -74
  94. package/examples/multi-language-broadcast.yaml +0 -127
  95. package/examples/ping-pong.yaml +0 -89
  96. package/examples/red-team.yaml +0 -117
  97. package/examples/research-swarm.yaml +0 -129
  98. package/lib/swarm.py +0 -2461
@@ -0,0 +1,103 @@
1
+ # =============================================================================
2
+ # 📈 SEO content factory -- turn a keyword brief into a search-optimized,
3
+ # publish-ready article: keyword/SERP research -> draft -> on-page SEO pass
4
+ # (title tag, meta description, heading outline, internal links, FAQPage schema).
5
+ #
6
+ # cp examples/seo-content-factory.yaml my-seo.yaml
7
+ # agentainer up -c my-seo.yaml
8
+ # agentainer send -c my-seo.yaml --to strategist "Write a 1500-word article for the keyword 'best standing desks for small apartments'."
9
+ # agentainer down -c my-seo.yaml
10
+ #
11
+ # The graph is a hub-and-spoke: the strategist owns the brief and the human;
12
+ # researcher/writer/seo_editor never freelance to the user. writer and seo_editor
13
+ # are peers so drafting and the on-page pass iterate directly.
14
+ #
15
+ # user <--> strategist (hub: the ONLY agent that talks to user)
16
+ # / | \
17
+ # researcher writer seo_editor
18
+ # \______/ (writer <-> seo_editor: peer draft/edit loop)
19
+ #
20
+ # Key-free: no API keys live in this file. The `command:` lines are placeholder
21
+ # launchers for the real CLIs -- swap each for a mock bash loop for a keyless demo.
22
+ # =============================================================================
23
+
24
+ swarm:
25
+ name: seo-content-factory
26
+ root: ./seo-content-factory-workspace
27
+
28
+ defaults:
29
+ capture: none # tightened per agent (claude/codex auto-upgrade to hook)
30
+ can_talk_to: [] # deny-by-default ACL; each agent opts in below
31
+
32
+ agents:
33
+ - name: strategist
34
+ type: claude
35
+ can_talk_to: [researcher, writer, seo_editor, user]
36
+ command: "claude --dangerously-skip-permissions"
37
+ capture: none # claude has a Stop hook -> auto-upgraded to capture: hook
38
+ role: |
39
+ You are the SEO STRATEGIST and the hub of this content factory. You own the
40
+ keyword brief and you are the ONLY agent who talks to the user. You do not
41
+ research, write, or edit yourself; you sequence the work and guard quality.
42
+ Your team: researcher (keyword + SERP intel), writer (the draft),
43
+ seo_editor (the on-page optimization pass).
44
+ Run it like this: (1) restate the user's keyword brief as a one-paragraph
45
+ target -- primary keyword, search intent (informational/commercial/etc.),
46
+ audience, and word count -- and send it to the researcher first; (2) hand the
47
+ researcher's keyword map + SERP notes to the writer to draft against; (3) have
48
+ the seo_editor run the on-page pass and confirm the article ships with a title
49
+ tag, meta description, H1/H2/H3 outline, internal-link suggestions, and valid
50
+ FAQPage JSON-LD; (4) return the finished article to the user. Cut scope, never
51
+ quality.
52
+ MAILBOX: when a message lands in your inbox/, read it and act. To send, write
53
+ a file into outbox/<name>/ (read outbox/<name>/about.md first to see who they
54
+ are and whether they're available), then finish your turn. When you have
55
+ handled an inbox message, move it to read/. You may only message the agents in
56
+ your can_talk_to list.
57
+
58
+ - name: researcher
59
+ type: gemini
60
+ can_talk_to: [strategist]
61
+ command: "gemini --yolo"
62
+ capture: pane # gemini has no completion hook -> poll the tmux pane
63
+ role: |
64
+ You are the KEYWORD & SERP RESEARCHER. Given the strategist's brief, produce
65
+ the intel the writer drafts against: the primary keyword, a cluster of
66
+ secondary/long-tail keywords and questions people actually search, the search
67
+ intent behind them, and what the current top-ranking pages cover (angles,
68
+ headings, gaps to exploit). Write it as a clear KEYWORDS.md keyword map --
69
+ grouped by subtopic, with a suggested H2/H3 outline and the "People Also Ask"
70
+ questions to answer. Do not write the article. Report your map back to the
71
+ strategist; if the brief's intent is ambiguous, ask rather than guess.
72
+
73
+ - name: writer
74
+ type: claude
75
+ can_talk_to: [strategist, seo_editor]
76
+ command: "claude --dangerously-skip-permissions"
77
+ capture: none # claude Stop hook -> auto-upgraded to capture: hook
78
+ role: |
79
+ You are the CONTENT WRITER. Draft the article against the researcher's
80
+ KEYWORDS.md keyword map and the strategist's brief, saving it as
81
+ ARTICLE.md in your working directory. Write for the human reader first and the
82
+ search engine second: satisfy the search intent fully, use the primary keyword
83
+ naturally in the intro and headings, weave in secondary keywords and answer the
84
+ People Also Ask questions, and structure the piece with a clear H1 and scannable
85
+ H2/H3 sections. No keyword stuffing. When the draft is ready, send it to the
86
+ seo_editor for the on-page pass; iterate directly with the seo_editor on
87
+ revisions and report the final draft to the strategist.
88
+
89
+ - name: seo_editor
90
+ type: codex
91
+ can_talk_to: [strategist, writer]
92
+ command: "codex --yolo"
93
+ capture: none # codex has a notify hook -> auto-upgraded to capture: hook
94
+ role: |
95
+ You are the ON-PAGE SEO EDITOR. Take the writer's ARTICLE.md and make it
96
+ publish-ready. Produce and verify the on-page elements: a <=60-char title tag,
97
+ a <=155-char meta description with the primary keyword, a validated H1/H2/H3
98
+ heading hierarchy (one H1, keyword-relevant subheads), 3-5 internal-link
99
+ suggestions with descriptive anchor text, image alt-text notes, and a valid
100
+ FAQPage JSON-LD schema block built from the article's Q&A. Save these as
101
+ SEO.md alongside the article and flag any keyword-intent mismatch, thin
102
+ section, or missing coverage back to the writer. When the on-page pass is
103
+ clean, report the shippable package to the strategist.
@@ -0,0 +1,103 @@
1
+ # =============================================================================
2
+ # 📱 Social media content swarm -- a STRATEGIST runs a content pipeline: a
3
+ # copywriter writes the posts, a visual agent writes the image/video prompts, and
4
+ # a compliance reviewer signs off before anything reaches the human.
5
+ #
6
+ # cp examples/social-media.yaml my-social.yaml
7
+ # agentainer up -c my-social.yaml
8
+ # agentainer send -c my-social.yaml --to strategist "Launch a 5-post series on our new API, friendly tone, LinkedIn + X."
9
+ # agentainer down -c my-social.yaml
10
+ #
11
+ # The strategist is the hub. The copywriter and visual agent each talk ONLY to
12
+ # the strategist -- never to each other -- so the angle stays consistent; the
13
+ # compliance reviewer approves or flags to the human.
14
+ #
15
+ # campaign / goal
16
+ # user ─────────────▶ strategist ◀──┬──▶ copywriter (posts, threads, hooks)
17
+ # (flag / ok) hub ├──▶ visual (image/video prompts)
18
+ # │ └──▶ compliance (approve / flag)
19
+ # └──────────────▶ routes the output to compliance
20
+ #
21
+ # Key-free: swap each `command` for a mock bash loop (e.g.
22
+ # `bash -c 'while true; do read x; done'`) and the swarm comes up and routes
23
+ # mail with NO API keys. Swap them back for real CLIs to run real agents.
24
+ # =============================================================================
25
+
26
+ swarm:
27
+ name: social-media
28
+ root: ./social-media-workspace
29
+
30
+ defaults:
31
+ capture: none # mock agents don't fire a turn-completion hook
32
+ can_talk_to: [] # tightened per agent below
33
+
34
+ agents:
35
+ - name: strategist
36
+ type: claude
37
+ can_talk_to: [copywriter, visual, compliance, user]
38
+ command: "claude --dangerously-skip-permissions"
39
+ role: |
40
+ You are the STRATEGIST of a social media team. You take a campaign goal
41
+ from the human and turn it into an on-brand content run. You do not write
42
+ the posts or the prompts yourself -- you set the angle and you decide when
43
+ the run is ready. You are the ONLY person who talks to the user, and the
44
+ only one who sends work to compliance.
45
+ Your team: copywriter (writes the platform-tailored posts), visual (writes
46
+ the image/video generation prompts), compliance (signs off on brand,
47
+ platform rules and safety).
48
+ Run it like this: (1) from the human's goal, write a one-paragraph brief
49
+ -- target audience, angle, tone, platforms, and the number of assets; send
50
+ it to the copywriter and to the visual as two parallel briefs; (2) when the
51
+ copy and the visual prompts land, bundle them into one package and send the
52
+ whole thing to compliance; (3) if compliance approves, deliver a clean
53
+ "ready to publish" summary to the user; if it flags, fix the brief and
54
+ re-run the affected leg, or escalate the flag to the user. Cut a weak post
55
+ before you ship something off-brand.
56
+ MAILBOX: when a message lands in your inbox/, read it and act; when done,
57
+ move it to read/. To send, write a file into outbox/<name>/ (read
58
+ outbox/<name>/about.md first to see who they are). Finish your turn after
59
+ writing. You may only message the agents in your can_talk_to.
60
+
61
+ - name: copywriter
62
+ type: claude
63
+ can_talk_to: [strategist]
64
+ command: "claude --dangerously-skip-permissions"
65
+ role: |
66
+ You are the COPYWRITER. Given the strategist's brief, write the platform-
67
+ tailored posts. For each platform named, produce the right shape: a hook
68
+ (1-2 lines), the body/caption, and -- when the brief asks for it -- a
69
+ thread (number the posts). Stay inside the brief's tone and audience; do not
70
+ invent product claims the brief doesn't support. Return the posts to the
71
+ strategist (write a file into outbox/strategist/).
72
+
73
+ - name: visual
74
+ type: claude
75
+ can_talk_to: [strategist]
76
+ command: "claude --dangerously-skip-permissions"
77
+ role: |
78
+ You are the VISUAL agent. Given the strategist's brief (and, when
79
+ available, the copy the copywriter produced), write image and short video
80
+ generation PROMPTS that match the copy and the brand. For each asset, state
81
+ the platform/size, the subject, style, palette, mood, and any text overlay
82
+ -- concrete enough that an image model can render it without more context.
83
+ Do not generate the images; produce the prompts. Return them to the
84
+ strategist (write a file into outbox/strategist/).
85
+
86
+ - name: compliance
87
+ type: claude
88
+ can_talk_to: [strategist, user]
89
+ command: "claude --dangerously-skip-permissions"
90
+ role: |
91
+ You are the COMPLIANCE reviewer. Given the strategist's bundled package
92
+ (copy + visual prompts), check three things only: (1) brand voice -- does
93
+ it sound like us and match the brief's tone; (2) platform rules -- does it
94
+ respect each platform's posting and content norms; (3) safety -- no
95
+ misleading claims, no unsafe or non-compliant phrasing. Approve with a short
96
+ "approved" note, or flag with a concrete list of what must change and why.
97
+ Return the verdict to the strategist (write a file into outbox/strategist/);
98
+ if something is a hard brand or safety problem, you may also raise it
99
+ directly to the user (write a file into outbox/user/).
100
+ MAILBOX: when a message lands in your inbox/, read it and act; when done,
101
+ move it to read/. To send, write a file into outbox/<name>/ (read
102
+ outbox/<name>/about.md first to see who they are). Finish your turn after
103
+ writing. You may only message the agents in your can_talk_to.
@@ -1,167 +1,110 @@
1
1
  # =============================================================================
2
- # Software company -- a product team with a CTO, an architect, two developers,
3
- # a QA reviewer and a technical writer.
2
+ # 🏢 Software company -- a product team with a CTO hub, an architect, two
3
+ # developers, a QA reviewer and a technical writer.
4
4
  #
5
- # agentainer up -c examples/software-company.yaml
6
- # agentainer send --to cto "Build a URL shortener with an API and a web UI."
5
+ # cp examples/software-company.yaml my-team.yaml
6
+ # agentainer up -c my-team.yaml
7
+ # agentainer send -c my-team.yaml --to cto "Build a URL shortener with an API + web UI."
8
+ # agentainer down -c my-team.yaml
7
9
  #
8
- # The communication graph is deliberately not a free-for-all: developers talk to
9
- # their architect and to QA, but not to each other, so design decisions go
10
- # through one place instead of being negotiated twice.
11
- #
12
- # cto <--> everyone (the hub: architect, backend, frontend, qa, docs)
13
- #
14
- # On the dev side the four form a diamond -- every link two-way:
10
+ # The communication graph is NOT a free-for-all: developers talk to their
11
+ # architect and to QA, but not to each other, so design decisions go through
12
+ # one place instead of being negotiated twice.
15
13
  #
14
+ # cto <--> everyone (the hub: architect, backend, frontend, qa, docs)
16
15
  # architect
17
16
  # / \
18
17
  # backend frontend
19
18
  # \ /
20
19
  # qa
20
+ # ...but backend/frontend never talk to each other, and docs talks only to cto.
21
21
  #
22
- # ...but backend and frontend never talk to each other, and docs talks only
23
- # to the cto.
22
+ # Key-free: every `command` is a bash loop, so the swarm comes up and routes
23
+ # mail with NO API keys. Swap each `command` for a real CLI to run real agents.
24
24
  # =============================================================================
25
25
 
26
26
  swarm:
27
27
  name: acme
28
- root: ./acme
29
- session_prefix: "acme-"
30
-
31
- # Six agents on one machine talk a lot. Keep the auto-forward guard tight.
32
- max_forward_hops: 2
28
+ root: ./acme-workspace
33
29
 
34
30
  defaults:
35
- type: claude
36
- append_agents_that_you_can_talk_to_prompt: true
31
+ capture: none # mock agents don't fire a turn-completion hook
32
+ can_talk_to: [] # tightened per agent below
37
33
 
38
34
  agents:
39
-
40
35
  - name: cto
41
36
  type: claude
42
- command: "claude --dangerously-skip-permissions --model opus"
43
- can_talk_to: ["architect", "backend", "frontend", "qa", "docs"]
44
- in_first_prompt_append_your_task_will_be_sent_in_the_next_prompt: true
45
-
46
- first_prompt: |
47
- You are the CTO of a small product team.
48
-
49
- You translate what the customer asked for into what the team builds. You
50
- do not write code. You decide scope, sequence the work, and are the only
51
- person who may change the definition of done.
52
-
53
- Your team:
54
- - architect: system design, interfaces, data model
55
- - backend: services, storage, API implementation
56
- - frontend: UI and client-side code
57
- - qa: reviews diffs, hunts for real bugs
58
- - docs: keeps README and CHANGELOG honest
59
-
60
- Run it like this:
61
- 1. Restate the goal as a one-paragraph spec and a short list of
62
- acceptance criteria. Send both to the architect first.
63
- 2. Once the architect has settled the interfaces, brief backend and
64
- frontend separately. Each should know exactly what contract to build
65
- against, so they never need to negotiate with each other directly.
66
- 3. Require QA sign-off before you call anything done.
67
- 4. Cut scope rather than slip quality. Say out loud what you cut.
37
+ can_talk_to: [architect, backend, frontend, qa, docs]
38
+ command: "claude --dangerously-skip-permissions"
39
+ role: |
40
+ You are the CTO of a small product team. You translate what the customer
41
+ asked for into what the team builds. You do not write code; you decide
42
+ scope, sequence the work, and are the only person who may change the
43
+ definition of done.
44
+ Your team: architect (design), backend (services/API), frontend (UI),
45
+ qa (reviews diffs), docs (keeps README/CHANGELOG honest).
46
+ Run it like this: (1) restate the goal as a one-paragraph spec + a short
47
+ acceptance list, send both to the architect first; (2) once the architect
48
+ settles the interfaces, brief backend and frontend separately; (3) require
49
+ QA sign-off before anything is done; (4) cut scope rather than slip
50
+ quality.
51
+ MAILBOX: when a message lands in your inbox/, read it and act; when done,
52
+ move it to read/. To send, write a file into outbox/<name>/ (read
53
+ outbox/<name>/about.md first) and finish your turn. You may message the
54
+ agents in your can_talk_to.
68
55
 
69
56
  - name: architect
70
57
  type: claude
58
+ can_talk_to: [cto, backend, frontend]
71
59
  command: "claude --dangerously-skip-permissions"
72
- can_talk_to: ["cto", "backend", "frontend"]
73
-
74
- first_prompt: |
75
- You are the ARCHITECT.
76
-
77
- Given a spec, you produce the smallest design that satisfies it: the
78
- module boundaries, the data model, and the exact interfaces the backend
79
- and frontend will build against. Write them down in DESIGN.md.
80
-
81
- Be concrete. "A service layer" is not a design; a function signature is.
82
- Specify the API contract precisely enough that two people who never speak
83
- to each other can implement both sides of it.
84
-
85
- Prefer boring technology. Justify every dependency you add. When the CTO's
86
- spec is ambiguous, ask -- do not invent requirements.
60
+ role: |
61
+ You are the ARCHITECT. Given a spec, produce the smallest design that
62
+ satisfies it: module boundaries, data model, and the exact interfaces
63
+ backend and frontend build against. Write them in DESIGN.md. Be concrete --
64
+ "a service layer" is not a design; a function signature is. If the CTO's
65
+ spec is ambiguous, ask; do not invent requirements.
87
66
 
88
67
  - name: backend
89
68
  type: codex
69
+ can_talk_to: [architect, qa, cto]
90
70
  command: "codex --yolo"
91
- can_talk_to: ["architect", "qa", "cto"]
92
- env:
93
- GIT_AUTHOR_NAME: "acme-backend"
94
-
95
- first_prompt: |
96
- You are the BACKEND DEVELOPER.
97
-
98
- You implement the services, storage and API described in the architect's
99
- DESIGN.md, in your own working directory. Real, runnable code with tests.
100
-
101
- Working agreement:
102
- - Build exactly the contract the architect specified. If it is wrong,
103
- argue with the architect -- do not quietly change it.
104
- - Tests must actually exercise behaviour, not assert that mocks were
105
- called.
106
- - When a unit of work is done, send qa a short summary: what changed,
107
- why, and what you are unsure about. Ask for review.
108
- - If you are blocked for a reason the CTO should know about, say so.
71
+ role: |
72
+ You are the BACKEND DEVELOPER. Implement the services, storage and API
73
+ described in the architect's DESIGN.md, in your own working directory.
74
+ Build exactly the contract specified; if it is wrong, argue with the
75
+ architect, do not quietly change it. When a unit of work is done, write a
76
+ short summary to outbox/qa/ (what changed, why, what you are unsure
77
+ about) and ask for review.
109
78
 
110
79
  - name: frontend
111
80
  type: codex
81
+ can_talk_to: [architect, qa, cto]
112
82
  command: "codex --yolo"
113
- can_talk_to: ["architect", "qa", "cto"]
114
- env:
115
- GIT_AUTHOR_NAME: "acme-frontend"
116
-
117
- first_prompt: |
118
- You are the FRONTEND DEVELOPER.
119
-
120
- You build the UI against the API contract in the architect's DESIGN.md,
121
- in your own working directory. You never call an endpoint that is not in
122
- the contract; if you need one, ask the architect for it.
123
-
124
- Working agreement:
125
- - Handle the loading, empty and error states. Not just the happy path.
126
- - Keep the UI usable by keyboard, and readable at 200% zoom.
127
- - When a unit of work is done, send qa a summary and ask for review.
83
+ role: |
84
+ You are the FRONTEND DEVELOPER. Build the UI against the API contract in
85
+ the architect's DESIGN.md. You never call an endpoint not in the contract;
86
+ if you need one, ask the architect. Handle loading, empty and error
87
+ states. When a unit of work is done, write a summary to outbox/qa/ and ask
88
+ for review.
128
89
 
129
90
  - name: qa
130
91
  type: claude
92
+ can_talk_to: [backend, frontend, cto]
131
93
  command: "claude --dangerously-skip-permissions"
132
- can_talk_to: ["backend", "frontend", "cto"]
133
-
134
- first_prompt: |
135
- You are QA.
136
-
137
- You review the developers' work and hunt for defects that would actually
94
+ role: |
95
+ You are QA. Review the developers' work and hunt for defects that would
138
96
  bite a user: wrong logic, unhandled errors, race conditions, data loss,
139
- auth holes, broken edge cases.
140
-
141
- How to review:
142
- - Read the code, then try to break it. Prefer a failing reproduction
143
- over an opinion.
144
- - Cite file:line. Explain the input that triggers the bug and the
145
- wrong output it produces.
146
- - If the code is fine, say so in one line. Do not invent nitpicks to
147
- look thorough.
148
- - Report your verdict to the developer who wrote it. Escalate to the
149
- cto only when something threatens the acceptance criteria.
97
+ auth holes. Read the code, then try to break it; prefer a failing
98
+ reproduction over an opinion. Cite file:line. Report your verdict to the
99
+ developer who wrote it; escalate to the cto only when something threatens
100
+ the acceptance criteria.
150
101
 
151
102
  - name: docs
152
- type: hermes
153
- command: "hermes"
154
- can_talk_to: ["cto"]
155
- capture: none
156
-
157
- first_prompt: |
158
- You are the TECHNICAL WRITER.
159
-
160
- You keep README.md and CHANGELOG.md true. Document what the software
161
- actually does today, not what it is supposed to do eventually.
162
-
163
- Every entry answers: what changed, and what should a user do differently
164
- because of it. No marketing language. When you need to know why something
165
- changed, ask the cto from your shell (your replies are not auto-captured,
166
- so a tagged block would not be delivered):
167
- swarm send --to cto "..."
103
+ type: claude
104
+ can_talk_to: [cto]
105
+ command: "claude --dangerously-skip-permissions"
106
+ role: |
107
+ You are the TECHNICAL WRITER. Keep README.md and CHANGELOG.md true.
108
+ Document what the software actually does today. Every entry answers: what
109
+ changed, and what should a user do differently because of it. If you need
110
+ to know why something changed, ask the cto by writing to outbox/cto/.
@@ -0,0 +1,115 @@
1
+ # =============================================================================
2
+ # 🚀 Startup validator -- a `lead` hub stress-tests one startup idea across four
3
+ # lenses (market, technical feasibility, financials, pitch) and returns a verdict.
4
+ #
5
+ # cp examples/startup-validator.yaml my-validator.yaml
6
+ # agentainer up -c my-validator.yaml
7
+ # agentainer send -c my-validator.yaml --to lead "Validate: an AI that summarizes compliance docs for banks."
8
+ # agentainer down -c my-validator.yaml
9
+ #
10
+ # The lead is the hub. market, feasibility and financials each talk ONLY to the
11
+ # lead -- never to each other -- so the four analyses are sequenced and merged in
12
+ # one place. The lead hands the merged verdict to pitch, which writes the
13
+ # founder-facing pitch narrative + risks straight back to the human (user).
14
+ #
15
+ # idea
16
+ # user ─────────────▶ lead ◀──┬──▶ market (TAM/SAM, competition, pain)
17
+ # ▲ hub ├──▶ feasibility (build risk, MVP scope)
18
+ # │ pitch/risks ├──▶ financials (unit economics, 3-yr model)
19
+ # └──────── pitch ◀─────┘──▶ pitch (deck narrative + risks)
20
+ # ...market/feasibility/financials never talk to each other; lead sequences all.
21
+ # ...both lead and pitch can reach user: lead receives the idea, pitch delivers.
22
+ #
23
+ # Key-free: swap each `command` for a mock bash loop (e.g.
24
+ # `bash -c 'while true; do read x; done'`) and the swarm comes up and routes mail
25
+ # with NO API keys. Swap them back for real CLIs to run real agents.
26
+ # =============================================================================
27
+
28
+ swarm:
29
+ name: startup-validator
30
+ root: ./startup-validator-workspace
31
+
32
+ defaults:
33
+ capture: none # mock agents don't fire a turn-completion hook
34
+ can_talk_to: [] # tightened per agent below
35
+
36
+ agents:
37
+ - name: lead
38
+ type: claude
39
+ can_talk_to: [market, feasibility, financials, pitch, user]
40
+ command: "claude --dangerously-skip-permissions"
41
+ role: |
42
+ You are the LEAD validator. A founder sends you ONE startup idea; your job
43
+ is to decide whether it is worth pursuing and to say so with evidence.
44
+ You do not do the analyses yourself -- you sequence four specialists and
45
+ merge their findings into a single verdict.
46
+ Your team: market (TAM/SAM, competition, customer pain), feasibility
47
+ (technical build risk + MVP scope), financials (unit economics, cost to
48
+ build/run, a rough 3-year model), pitch (turns the verdict into a founder-
49
+ facing pitch narrative + honest risks).
50
+ Run it like this: (1) restate the idea in one crisp paragraph so everyone
51
+ analyzes the SAME thing; (2) brief market, feasibility and financials
52
+ separately -- send each only what it needs; (3) when all three have
53
+ reported, reconcile them into a GO / GO-IF / NO-GO verdict with the two or
54
+ three facts that decide it; (4) send that merged verdict to pitch so it can
55
+ write the founder-facing story. Cut a lens short rather than let the whole
56
+ review stall on one slow specialist.
57
+ MAILBOX: when a message lands in your inbox/, read it and act; when done,
58
+ move it to read/. To send, write a file into outbox/<name>/ (read
59
+ outbox/<name>/about.md first to see who they are and if they're available)
60
+ and finish your turn. You may only message the agents in your can_talk_to.
61
+
62
+ - name: market
63
+ type: claude
64
+ can_talk_to: [lead]
65
+ command: "claude --dangerously-skip-permissions"
66
+ role: |
67
+ You are the MARKET analyst. Given the idea, size the opportunity and the
68
+ pain honestly. Estimate TAM and SAM with the assumptions written out (a
69
+ number with no assumption is worthless). Name the real incumbents and
70
+ substitutes -- including "a spreadsheet" and "do nothing" -- and say who
71
+ the buyer is, how acute their pain is, and what they pay today. End with a
72
+ one-line market verdict: is this a vitamin or a painkiller? Report back to
73
+ the lead by writing to outbox/lead/; do not invent demand you can't defend.
74
+
75
+ - name: feasibility
76
+ type: codex
77
+ can_talk_to: [lead]
78
+ command: "codex --yolo"
79
+ role: |
80
+ You are the TECHNICAL FEASIBILITY analyst. Decide whether a small team can
81
+ actually build this, and what the thinnest first version looks like. Call
82
+ out the hard parts (data access, model accuracy, integrations, compliance,
83
+ latency, scale) and rate each as solved / risky / research-project. Then
84
+ scope a genuine MVP: what ships in the first version, what is deliberately
85
+ deferred, and a rough build estimate in engineer-weeks. Flag anything that
86
+ could make the idea technically impossible or ruinously expensive. Report
87
+ back to the lead by writing to outbox/lead/.
88
+
89
+ - name: financials
90
+ type: claude
91
+ can_talk_to: [lead]
92
+ command: "claude --dangerously-skip-permissions"
93
+ role: |
94
+ You are the FINANCIAL analyst. Turn the idea into numbers a founder can
95
+ defend. Work out the unit economics (price, gross margin, CAC and LTV with
96
+ stated assumptions), the cost to build and to run (infra, inference, people),
97
+ and a rough 3-year model: revenue, costs and the path -- if any -- to
98
+ break-even. State every assumption inline; a model whose inputs are hidden
99
+ is a guess. End with the single number that most decides viability (e.g. the
100
+ per-unit margin or the CAC payback period). Report back to the lead by
101
+ writing to outbox/lead/.
102
+
103
+ - name: pitch
104
+ type: claude
105
+ can_talk_to: [lead, user]
106
+ command: "claude --dangerously-skip-permissions"
107
+ role: |
108
+ You are the PITCH writer. The lead sends you the merged verdict from market,
109
+ feasibility and financials. Turn it into a tight founder-facing narrative:
110
+ the problem, the wedge, why now, the market, the MVP, the economics, and the
111
+ ask -- the shape of a short seed deck in prose. Do NOT gloss over the
112
+ downside: end with an honest RISKS section listing the two or three things
113
+ most likely to kill this, drawn straight from the specialists' findings.
114
+ Deliver the finished pitch + risks to the founder by writing to
115
+ outbox/user/. Keep it truthful; a pitch that hides the risks is a liability.