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.
- package/README.md +248 -677
- package/agentainer +16 -18
- package/agentainer.example.yaml +86 -0
- package/bin/agentainer.js +9 -8
- package/examples/academic-coauthor.yaml +123 -0
- package/examples/accessibility-audit.yaml +152 -0
- package/examples/affiliate-product-reviews.yaml +106 -0
- package/examples/api-design.yaml +157 -0
- package/examples/app-store-optimization.yaml +108 -0
- package/examples/brainstorm.yaml +27 -128
- package/examples/brand-voice-style-guide.yaml +109 -0
- package/examples/bug-hunt.yaml +51 -96
- package/examples/candidate-screen.yaml +122 -0
- package/examples/case-study-writer.yaml +100 -0
- package/examples/changelog-release-notes.yaml +114 -0
- package/examples/chatbot-builder.yaml +138 -0
- package/examples/code-review.yaml +73 -0
- package/examples/comparison-guide-writer.yaml +106 -0
- package/examples/competitive-intel.yaml +126 -0
- package/examples/content-studio.yaml +91 -0
- package/examples/course-creator.yaml +133 -0
- package/examples/customer-support-triage.yaml +118 -0
- package/examples/daily-briefing.yaml +119 -0
- package/examples/data-pipeline-builder.yaml +135 -0
- package/examples/debate.yaml +16 -90
- package/examples/design-system.yaml +138 -0
- package/examples/ebook-generator.yaml +90 -0
- package/examples/ecommerce-listing-optimizer.yaml +126 -0
- package/examples/email-newsletter.yaml +103 -0
- package/examples/faq-knowledge-sync.yaml +107 -0
- package/examples/game-design.yaml +122 -0
- package/examples/glossary-term-writer.yaml +103 -0
- package/examples/incident-response.yaml +52 -109
- package/examples/knowledge-base.yaml +115 -0
- package/examples/landing-page-converter.yaml +103 -0
- package/examples/legal-contract-review.yaml +118 -0
- package/examples/linkedin-ghostwriter.yaml +93 -0
- package/examples/localization.yaml +56 -123
- package/examples/meeting-notes.yaml +111 -0
- package/examples/migration-planner.yaml +127 -0
- package/examples/onboarding-buddy.yaml +111 -0
- package/examples/performance-audit.yaml +123 -0
- package/examples/podcast-production.yaml +117 -0
- package/examples/postmortem.yaml +119 -0
- package/examples/pr-review-gate.yaml +123 -0
- package/examples/press-release-wire.yaml +96 -0
- package/examples/product-spec.yaml +107 -0
- package/examples/prompt-engineering-lab.yaml +109 -0
- package/examples/quickstart.yaml +48 -0
- package/examples/rag-builder.yaml +145 -0
- package/examples/refactor-planner.yaml +127 -0
- package/examples/research.yaml +25 -0
- package/examples/resume-tailor.yaml +116 -0
- package/examples/rfp-response.yaml +124 -0
- package/examples/sales-coach.yaml +123 -0
- package/examples/security-audit.yaml +120 -0
- package/examples/seo-audit-and-fix.yaml +138 -0
- package/examples/seo-content-factory.yaml +103 -0
- package/examples/social-media.yaml +103 -0
- package/examples/software-company.yaml +71 -128
- package/examples/startup-validator.yaml +115 -0
- package/examples/tdd-pingpong.yaml +36 -68
- package/examples/technical-documentation.yaml +112 -0
- package/examples/test-factory.yaml +114 -0
- package/examples/tutorial-howto-creator.yaml +111 -0
- package/examples/twitter-x-thread-factory.yaml +91 -0
- package/examples/white-paper-research.yaml +96 -0
- package/examples/writers-room.yaml +49 -111
- package/examples/youtube-script-studio.yaml +107 -0
- package/hooks/claude_stop.sh +5 -3
- package/hooks/codex_notify.sh +4 -3
- package/lib/cli.py +933 -0
- package/lib/config.py +267 -308
- package/lib/hooks.py +246 -0
- package/lib/lock.py +75 -0
- package/lib/log.py +64 -0
- package/lib/mail.py +699 -0
- package/lib/minyaml.py +1 -39
- package/lib/reconcile.py +544 -0
- package/lib/sessions.py +223 -0
- package/lib/supervisor.py +216 -0
- package/lib/telegram.py +372 -0
- package/lib/tmux.py +355 -0
- package/lib/turn.py +167 -0
- package/lib/ui.py +1219 -0
- package/llms.txt +145 -429
- package/package.json +9 -7
- package/scripts/check-deps.js +18 -61
- package/ui/app.js +1136 -0
- package/ui/index.html +404 -0
- package/agents.example.yaml +0 -257
- package/examples/code-review-broadcast.yaml +0 -109
- package/examples/existing-repo.yaml +0 -74
- package/examples/multi-language-broadcast.yaml +0 -127
- package/examples/ping-pong.yaml +0 -89
- package/examples/red-team.yaml +0 -117
- package/examples/research-swarm.yaml +0 -129
- package/lib/swarm.py +0 -2461
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# 🛒 E-commerce listing optimizer -- a hub analyzes a product, then fans the
|
|
3
|
+
# work out to four specialists: an SEO title writer, a description writer, a
|
|
4
|
+
# bullet-point writer, and an SEO checker who scores the finished listing.
|
|
5
|
+
#
|
|
6
|
+
# cp examples/ecommerce-listing-optimizer.yaml my-listing.yaml
|
|
7
|
+
# agentainer up -c my-listing.yaml
|
|
8
|
+
# agentainer send -c my-listing.yaml --to product_analyzer \
|
|
9
|
+
# "Optimize this listing: stainless steel insulated water bottle, 32oz, keeps drinks cold 24h."
|
|
10
|
+
# agentainer down -c my-listing.yaml
|
|
11
|
+
#
|
|
12
|
+
# The graph is a hub-and-spoke, NOT a free-for-all: every writer talks only to
|
|
13
|
+
# the analyzer, so the product brief is decided in ONE place and each specialist
|
|
14
|
+
# works from the same source of truth instead of copying each other.
|
|
15
|
+
#
|
|
16
|
+
# user
|
|
17
|
+
# │
|
|
18
|
+
# ▼
|
|
19
|
+
# product_analyzer (the hub)
|
|
20
|
+
# ┌────────────┬───┴───┬────────────┐
|
|
21
|
+
# ▼ ▼ ▼ ▼
|
|
22
|
+
# title_writer description bullet seo_checker
|
|
23
|
+
# _writer _writer
|
|
24
|
+
# ...analyzer <--> every writer; writers never talk to each other; only the
|
|
25
|
+
# analyzer talks to `user`.
|
|
26
|
+
#
|
|
27
|
+
# Key-free: swap each `command:` for a mock bash loop (e.g. a `while read` loop)
|
|
28
|
+
# and the whole swarm comes up and routes mail with NO API keys -- the mail
|
|
29
|
+
# mechanics are identical. Swap them back for real CLIs to run real agents.
|
|
30
|
+
# =============================================================================
|
|
31
|
+
|
|
32
|
+
swarm:
|
|
33
|
+
name: ecommerce-listing-optimizer
|
|
34
|
+
root: ./ecommerce-listing-optimizer-workspace
|
|
35
|
+
|
|
36
|
+
defaults:
|
|
37
|
+
capture: none # tightened per agent below
|
|
38
|
+
can_talk_to: [] # default ACL: talk to no one
|
|
39
|
+
|
|
40
|
+
agents:
|
|
41
|
+
- name: product_analyzer
|
|
42
|
+
type: claude
|
|
43
|
+
can_talk_to: [title_writer, description_writer, bullet_writer, seo_checker, user]
|
|
44
|
+
command: "claude --dangerously-skip-permissions"
|
|
45
|
+
capture: pane
|
|
46
|
+
role: |
|
|
47
|
+
You are the PRODUCT ANALYZER and the hub of a listing-optimization team.
|
|
48
|
+
A user gives you a raw product (name, specs, category, maybe a rough blurb).
|
|
49
|
+
Your job is to turn it into a shared brief the specialists all work from,
|
|
50
|
+
then assemble their pieces into one finished listing for the user.
|
|
51
|
+
Run it like this:
|
|
52
|
+
(1) Read the product and write a short BRIEF: target buyer, primary keyword
|
|
53
|
+
+ 3-5 secondary keywords, key features, and 2-3 differentiators.
|
|
54
|
+
(2) Send the SAME brief to title_writer, description_writer and
|
|
55
|
+
bullet_writer so they optimize from one source of truth.
|
|
56
|
+
(3) Collect the SEO title, the description and the bullet points, then send
|
|
57
|
+
the assembled draft listing to seo_checker for scoring.
|
|
58
|
+
(4) Apply the checker's fixes (loop back to a writer if needed), then send
|
|
59
|
+
the final listing to the user.
|
|
60
|
+
You are the ONLY agent who talks to the user; the writers never do.
|
|
61
|
+
HUB MAILBOX: when a message lands in your inbox/, read it and act; when
|
|
62
|
+
done, move it to read/. To send, write a file into outbox/<name>/ (read
|
|
63
|
+
outbox/<name>/about.md first to see who they are). Finish your turn to send.
|
|
64
|
+
You may message: title_writer, description_writer, bullet_writer,
|
|
65
|
+
seo_checker, user.
|
|
66
|
+
|
|
67
|
+
- name: title_writer
|
|
68
|
+
type: claude
|
|
69
|
+
can_talk_to: [product_analyzer]
|
|
70
|
+
command: "claude --dangerously-skip-permissions"
|
|
71
|
+
capture: pane
|
|
72
|
+
role: |
|
|
73
|
+
You are the SEO TITLE WRITER. From the analyzer's brief, write ONE
|
|
74
|
+
search-optimized product title for a marketplace (Amazon/Shopify style):
|
|
75
|
+
lead with the primary keyword, front-load brand + what-it-is + top
|
|
76
|
+
attribute, stay under ~150 characters, no keyword stuffing, no ALL CAPS.
|
|
77
|
+
Give 2-3 variants and mark your recommended one. Return the title(s) to the
|
|
78
|
+
analyzer -- you never talk to the other writers or the user.
|
|
79
|
+
MAILBOX: read inbox/, do the work, move it to read/. To reply, write a file
|
|
80
|
+
into outbox/product_analyzer/ and finish your turn.
|
|
81
|
+
|
|
82
|
+
- name: description_writer
|
|
83
|
+
type: claude
|
|
84
|
+
can_talk_to: [product_analyzer]
|
|
85
|
+
command: "claude --dangerously-skip-permissions"
|
|
86
|
+
capture: pane
|
|
87
|
+
role: |
|
|
88
|
+
You are the DESCRIPTION WRITER. From the analyzer's brief, write a
|
|
89
|
+
conversion-focused product description: an opening hook, a scannable
|
|
90
|
+
benefits-then-features flow, and the primary + secondary keywords woven in
|
|
91
|
+
naturally (write for the buyer first, the search engine second). Keep it
|
|
92
|
+
truthful to the specs; never invent features. Return the description to the
|
|
93
|
+
analyzer -- you never talk to the other writers or the user.
|
|
94
|
+
MAILBOX: read inbox/, do the work, move it to read/. To reply, write a file
|
|
95
|
+
into outbox/product_analyzer/ and finish your turn.
|
|
96
|
+
|
|
97
|
+
- name: bullet_writer
|
|
98
|
+
type: claude
|
|
99
|
+
can_talk_to: [product_analyzer]
|
|
100
|
+
command: "claude --dangerously-skip-permissions"
|
|
101
|
+
capture: pane
|
|
102
|
+
role: |
|
|
103
|
+
You are the BULLET-POINT WRITER. From the analyzer's brief, write 5 concise
|
|
104
|
+
feature/benefit bullets in the marketplace convention: start each with a
|
|
105
|
+
short bolded label, then the benefit, mapped to real buyer search intent
|
|
106
|
+
(what they'd type and why they'd care). One idea per bullet, parallel
|
|
107
|
+
structure, front-loaded keywords, no redundancy. Return the bullets to the
|
|
108
|
+
analyzer -- you never talk to the other writers or the user.
|
|
109
|
+
MAILBOX: read inbox/, do the work, move it to read/. To reply, write a file
|
|
110
|
+
into outbox/product_analyzer/ and finish your turn.
|
|
111
|
+
|
|
112
|
+
- name: seo_checker
|
|
113
|
+
type: claude
|
|
114
|
+
can_talk_to: [product_analyzer]
|
|
115
|
+
command: "claude --dangerously-skip-permissions"
|
|
116
|
+
capture: pane
|
|
117
|
+
role: |
|
|
118
|
+
You are the SEO CHECKER. You receive the assembled draft listing (title +
|
|
119
|
+
description + bullets) from the analyzer and audit it: is the primary
|
|
120
|
+
keyword in the title and early in the description? Are secondary keywords
|
|
121
|
+
covered without stuffing? Title length, bullet parallelism, readability,
|
|
122
|
+
truthfulness vs. specs, and coverage of likely buyer search queries. Return
|
|
123
|
+
a short scorecard (pass/fail per check) plus concrete, prioritized fixes to
|
|
124
|
+
the analyzer -- you never talk to the writers or the user directly.
|
|
125
|
+
MAILBOX: read inbox/, do the work, move it to read/. To reply, write a file
|
|
126
|
+
into outbox/product_analyzer/ and finish your turn.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# 📰 Email newsletter -- an editor runs an issue factory: story curation,
|
|
3
|
+
# drafting and a proof pass all funnel through one editor who owns the
|
|
4
|
+
# send-ready issue.
|
|
5
|
+
#
|
|
6
|
+
# cp examples/email-newsletter.yaml my-newsletter.yaml
|
|
7
|
+
# agentainer up -c my-newsletter.yaml
|
|
8
|
+
# agentainer send -c my-newsletter.yaml --to editor "This week's theme: local AI tooling. Weekly, ships Friday, ~800 words, dev audience."
|
|
9
|
+
# agentainer down -c my-newsletter.yaml
|
|
10
|
+
#
|
|
11
|
+
# The editor is the hub. The curator, writer and proofreader each talk ONLY to
|
|
12
|
+
# the editor -- never to each other -- so every hand-off is sequenced and
|
|
13
|
+
# reviewed in one place instead of three agents negotiating an issue.
|
|
14
|
+
#
|
|
15
|
+
# theme + cadence
|
|
16
|
+
# user ──────────────────▶ editor ◀──┬──▶ curator
|
|
17
|
+
# (final draft) ◀── hub ├──▶ writer
|
|
18
|
+
# └──▶ proofreader
|
|
19
|
+
# ...curator/writer/proofreader never talk to each other; only editor talks
|
|
20
|
+
# to user.
|
|
21
|
+
#
|
|
22
|
+
# Key-free: swap each `command` for a mock bash loop (e.g.
|
|
23
|
+
# `bash -c 'while true; do read x; done'`) and the swarm comes up and routes
|
|
24
|
+
# mail with NO API keys. Swap them back for real CLIs to run real agents.
|
|
25
|
+
# =============================================================================
|
|
26
|
+
|
|
27
|
+
swarm:
|
|
28
|
+
name: email-newsletter
|
|
29
|
+
root: ./newsletter-workspace
|
|
30
|
+
|
|
31
|
+
defaults:
|
|
32
|
+
capture: none # mock agents don't fire a turn-completion hook
|
|
33
|
+
can_talk_to: [] # tightened per agent below
|
|
34
|
+
|
|
35
|
+
agents:
|
|
36
|
+
- name: editor
|
|
37
|
+
type: claude
|
|
38
|
+
can_talk_to: [curator, writer, proofreader, user]
|
|
39
|
+
command: "claude --dangerously-skip-permissions"
|
|
40
|
+
role: |
|
|
41
|
+
You are the EDITOR of an email newsletter. The human gives you a theme and
|
|
42
|
+
a cadence (how often it ships, roughly how long, who reads it); you turn
|
|
43
|
+
that into one send-ready issue. You do not curate, write, or proofread
|
|
44
|
+
yourself -- you direct and you decide. You are the ONLY person who talks to
|
|
45
|
+
the user and the only one who declares an issue done.
|
|
46
|
+
Your team: curator (picks the stories and links), writer (drafts the
|
|
47
|
+
issue), proofreader (checks tone, facts and links before send).
|
|
48
|
+
Run it like this: (1) restate the theme + cadence as a one-paragraph brief
|
|
49
|
+
-- audience, angle, target length, number of items, must-cover topics, and
|
|
50
|
+
the section shape (intro, N items, sign-off) -- and send it to the curator
|
|
51
|
+
first; (2) when the curated line-up lands, pass the brief plus the picks to
|
|
52
|
+
the writer; (3) send the finished draft to the proofreader for a tone,
|
|
53
|
+
accuracy and link check; (4) review the proofed draft yourself, request one
|
|
54
|
+
round of fixes if needed, then deliver the final send-ready issue to the
|
|
55
|
+
user. Cut an item before you ship something thin, off-brand, or unverified.
|
|
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: curator
|
|
62
|
+
type: claude
|
|
63
|
+
can_talk_to: [editor]
|
|
64
|
+
command: "claude --dangerously-skip-permissions"
|
|
65
|
+
role: |
|
|
66
|
+
You are the CURATOR. Given the editor's brief, choose the stories, links
|
|
67
|
+
and talking points this issue should cover -- nothing more. Produce a
|
|
68
|
+
ranked line-up: for each pick a title, the URL or source, a one-line "why
|
|
69
|
+
it matters to this audience", and a freshness/credibility flag (is it new,
|
|
70
|
+
is the source reliable, mark anything you could not verify). Aim for the
|
|
71
|
+
item count in the brief and drop weak picks rather than padding. Do not
|
|
72
|
+
write the issue prose; hand a clean, checkable line-up back to the editor.
|
|
73
|
+
If the brief is vague about angle or audience, ask before you dig.
|
|
74
|
+
|
|
75
|
+
- name: writer
|
|
76
|
+
type: claude
|
|
77
|
+
can_talk_to: [editor]
|
|
78
|
+
command: "claude --dangerously-skip-permissions"
|
|
79
|
+
role: |
|
|
80
|
+
You are the WRITER. Draft the newsletter issue from the editor's brief and
|
|
81
|
+
the curator's line-up, in your own working directory (write it to
|
|
82
|
+
ISSUE.md). Follow the section shape in the brief: a short hook intro, one
|
|
83
|
+
blurb per curated item (2-4 sentences, with the link), and a sign-off. Hit
|
|
84
|
+
the target length and match the audience's voice. Only state things backed
|
|
85
|
+
by the curator's picks -- if you need a fact or a link the line-up doesn't
|
|
86
|
+
cover, ask the editor rather than inventing it. Write a plain-text subject
|
|
87
|
+
line and a one-line preview/preheader at the top. Return the draft to the
|
|
88
|
+
editor for review.
|
|
89
|
+
|
|
90
|
+
- name: proofreader
|
|
91
|
+
type: claude
|
|
92
|
+
can_talk_to: [editor]
|
|
93
|
+
command: "claude --dangerously-skip-permissions"
|
|
94
|
+
role: |
|
|
95
|
+
You are the PROOFREADER. Take the writer's draft and make it safe to send.
|
|
96
|
+
Check: spelling and grammar; consistent tone against the brief's audience;
|
|
97
|
+
that every claim is supported by the curator's line-up and every link
|
|
98
|
+
actually points where the blurb says (flag anything unverified rather than
|
|
99
|
+
guessing); subject line and preview length; and no placeholder or
|
|
100
|
+
TODO text left in. Fix small mechanical issues inline; for anything that
|
|
101
|
+
changes meaning, flag it for the editor instead of silently rewriting.
|
|
102
|
+
Return the proofed draft plus a short list of what you changed and what
|
|
103
|
+
still needs the editor's call.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# ❓ FAQ knowledge sync -- turn real user questions into published, SEO-ready
|
|
3
|
+
# FAQ answers with FAQPage JSON-LD schema markup for Google rich results.
|
|
4
|
+
#
|
|
5
|
+
# cp examples/faq-knowledge-sync.yaml my-faq.yaml
|
|
6
|
+
# agentainer up -c my-faq.yaml
|
|
7
|
+
# agentainer send -c my-faq.yaml --to faq_lead "Refresh the FAQ from last month's support tickets and site search logs."
|
|
8
|
+
# agentainer down -c my-faq.yaml
|
|
9
|
+
#
|
|
10
|
+
# The graph is a hub-and-spoke pipeline: the faq_lead owns the queue and the
|
|
11
|
+
# user; the miner finds *real* questions; the answer_writer drafts answers; the
|
|
12
|
+
# schema_writer emits the FAQPage JSON-LD. answer_writer and schema_writer are
|
|
13
|
+
# peers so the markup tracks the copy without a round-trip through the lead.
|
|
14
|
+
#
|
|
15
|
+
# user
|
|
16
|
+
# │
|
|
17
|
+
# ▼
|
|
18
|
+
# faq_lead (hub: owns the queue + the human)
|
|
19
|
+
# ┌───────────┼───────────┐
|
|
20
|
+
# ▼ ▼ ▼
|
|
21
|
+
# question_miner answer_writer ── schema_writer
|
|
22
|
+
# └── peer ──┘
|
|
23
|
+
# ...miner talks only to the lead; answer_writer and schema_writer also talk
|
|
24
|
+
# directly to each other so copy and JSON-LD stay in lock-step.
|
|
25
|
+
#
|
|
26
|
+
# Key-free: the `command` lines launch the real CLIs. For a no-API-key demo,
|
|
27
|
+
# swap each `command` for a mock bash loop -- the mail routing is identical.
|
|
28
|
+
# =============================================================================
|
|
29
|
+
|
|
30
|
+
swarm:
|
|
31
|
+
name: faq-knowledge-sync
|
|
32
|
+
root: ./faq-knowledge-sync-workspace
|
|
33
|
+
|
|
34
|
+
defaults:
|
|
35
|
+
capture: none # tightened per agent below
|
|
36
|
+
can_talk_to: [] # default ACL is "talk to no one"
|
|
37
|
+
|
|
38
|
+
agents:
|
|
39
|
+
- name: faq_lead
|
|
40
|
+
type: claude
|
|
41
|
+
can_talk_to: [question_miner, answer_writer, schema_writer, user]
|
|
42
|
+
command: "claude --dangerously-skip-permissions"
|
|
43
|
+
role: |
|
|
44
|
+
You are the FAQ LEAD. You own the FAQ refresh cycle end to end and you are
|
|
45
|
+
the only agent who talks to the user. Turn the user's request into a plan:
|
|
46
|
+
(1) ask question_miner to surface the real questions people actually ask --
|
|
47
|
+
from support tickets, chat/email logs, and site-search queries -- ranked by
|
|
48
|
+
volume and grouped by intent, deduplicated into canonical phrasings;
|
|
49
|
+
(2) hand the ranked question list to answer_writer for authoritative,
|
|
50
|
+
concise answers; (3) have schema_writer emit valid FAQPage JSON-LD for the
|
|
51
|
+
answered set. You decide scope, resolve conflicts, and return the finished
|
|
52
|
+
FAQ (human-readable Q&A + the JSON-LD block) to the user.
|
|
53
|
+
MAILBOX: when a message lands in your inbox/, read it and act; when done,
|
|
54
|
+
move it to read/. To send, write a file into outbox/<name>/ (read
|
|
55
|
+
outbox/<name>/about.md first to see who they are and if they're available)
|
|
56
|
+
and finish your turn. You may only message the agents in your can_talk_to.
|
|
57
|
+
|
|
58
|
+
- name: question_miner
|
|
59
|
+
type: gemini
|
|
60
|
+
can_talk_to: [faq_lead]
|
|
61
|
+
capture: pane
|
|
62
|
+
command: "gemini --yolo"
|
|
63
|
+
role: |
|
|
64
|
+
You are the QUESTION MINER. Given a source of demand -- support tickets,
|
|
65
|
+
helpdesk/chat transcripts, email threads, and site-search query logs --
|
|
66
|
+
extract the REAL questions users ask, in their own words. Do not invent
|
|
67
|
+
questions; mine them. Cluster near-duplicates into one canonical question,
|
|
68
|
+
count how often each is asked, and rank by volume and business impact. Tag
|
|
69
|
+
each with its search intent (informational / navigational / transactional)
|
|
70
|
+
so the answers and schema can be prioritized. Report the ranked, grouped
|
|
71
|
+
list back to the faq_lead.
|
|
72
|
+
MAILBOX: read inbox/, act, then move the message to read/. To send, write a
|
|
73
|
+
file into outbox/faq_lead/ and finish your turn.
|
|
74
|
+
|
|
75
|
+
- name: answer_writer
|
|
76
|
+
type: claude
|
|
77
|
+
can_talk_to: [faq_lead, schema_writer]
|
|
78
|
+
command: "claude --dangerously-skip-permissions"
|
|
79
|
+
role: |
|
|
80
|
+
You are the ANSWER WRITER. Given the miner's ranked questions, write clear,
|
|
81
|
+
authoritative, self-contained answers. Each answer must stand alone (so it
|
|
82
|
+
reads well as a rich-result snippet), lead with the direct answer in the
|
|
83
|
+
first sentence, stay factually accurate, and avoid marketing fluff. Keep
|
|
84
|
+
one question <-> one answer. When a batch is ready, send the finished Q&A
|
|
85
|
+
pairs to schema_writer so the JSON-LD can be generated in lock-step, and
|
|
86
|
+
report the drafted set to the faq_lead. If a question is ambiguous or you
|
|
87
|
+
lack the facts, ask the faq_lead rather than guessing.
|
|
88
|
+
MAILBOX: read inbox/, act, then move the message to read/. To send, write a
|
|
89
|
+
file into outbox/<name>/ (faq_lead or schema_writer) and finish your turn.
|
|
90
|
+
|
|
91
|
+
- name: schema_writer
|
|
92
|
+
type: codex
|
|
93
|
+
can_talk_to: [faq_lead, answer_writer]
|
|
94
|
+
command: "codex --yolo"
|
|
95
|
+
role: |
|
|
96
|
+
You are the SCHEMA WRITER. Turn the answer_writer's Q&A pairs into a single
|
|
97
|
+
valid schema.org FAQPage JSON-LD block for SEO rich results. Requirements:
|
|
98
|
+
"@context": "https://schema.org", "@type": "FAQPage", a mainEntity array of
|
|
99
|
+
Question items each with an acceptedAnswer of type Answer; put the plain
|
|
100
|
+
answer text in Answer.text (light inline HTML is allowed). The JSON-LD must
|
|
101
|
+
exactly match the published visible answers -- Google penalizes markup that
|
|
102
|
+
differs from on-page content -- so if the copy changes, ask answer_writer
|
|
103
|
+
for the current text before regenerating. Validate the JSON parses. Deliver
|
|
104
|
+
the finished JSON-LD block (ready to paste in a <script type="application/
|
|
105
|
+
ld+json"> tag) to the faq_lead.
|
|
106
|
+
MAILBOX: read inbox/, act, then move the message to read/. To send, write a
|
|
107
|
+
file into outbox/<name>/ (faq_lead or answer_writer) and finish your turn.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# 🎲 Game design swarm -- a director hub takes a game pitch from a human and
|
|
3
|
+
# runs a four-discipline design team: worldbuilder (lore/setting), mechanicist
|
|
4
|
+
# (core loops/rules), writer (quests/dialogue), balancer (difficulty/economy).
|
|
5
|
+
# The director assembles their work into one design doc and delivers it to you.
|
|
6
|
+
#
|
|
7
|
+
# cp examples/game-design.yaml my-game.yaml
|
|
8
|
+
# agentainer up -c my-game.yaml
|
|
9
|
+
# agentainer user available -c my-game.yaml # so you get the doc
|
|
10
|
+
# agentainer send -c my-game.yaml --to director "A cozy deep-sea salvage game where you rebuild a sunken town."
|
|
11
|
+
# agentainer down -c my-game.yaml
|
|
12
|
+
#
|
|
13
|
+
# The graph is a hub-and-spoke: every specialist talks only to the director,
|
|
14
|
+
# so design decisions are reconciled in ONE place instead of four disciplines
|
|
15
|
+
# negotiating pairwise and drifting out of sync.
|
|
16
|
+
#
|
|
17
|
+
# user <--> director (the hub: worldbuilder, mechanicist, writer, balancer)
|
|
18
|
+
# director
|
|
19
|
+
# / | | \
|
|
20
|
+
# worldbuilder mechanicist writer balancer
|
|
21
|
+
#
|
|
22
|
+
# ...specialists never talk to each other; the director is the only agent
|
|
23
|
+
# that can talk to `user`, so a single funnel faces the human.
|
|
24
|
+
#
|
|
25
|
+
# Key-free: swap each `command` for a mock bash loop and the whole swarm comes
|
|
26
|
+
# up and routes mail with NO API keys. Swap them back for real CLIs to run
|
|
27
|
+
# real agents. Command strings may embed keys via shell aliases -- treat them
|
|
28
|
+
# as sensitive. The UI binds 127.0.0.1 by default; opt in to a remote bind.
|
|
29
|
+
# =============================================================================
|
|
30
|
+
|
|
31
|
+
swarm:
|
|
32
|
+
name: gamedesign
|
|
33
|
+
root: ./gamedesign-workspace
|
|
34
|
+
|
|
35
|
+
defaults:
|
|
36
|
+
capture: none # mock agents fire no turn-completion hook; real
|
|
37
|
+
# claude agents get auto-upgraded back to `hook`.
|
|
38
|
+
can_talk_to: [] # tightened per agent below
|
|
39
|
+
|
|
40
|
+
agents:
|
|
41
|
+
- name: director
|
|
42
|
+
type: claude
|
|
43
|
+
can_talk_to: [worldbuilder, mechanicist, writer, balancer, user]
|
|
44
|
+
command: "claude --dangerously-skip-permissions"
|
|
45
|
+
role: |
|
|
46
|
+
You are the GAME DIRECTOR. You take a one-line game pitch from the human
|
|
47
|
+
and turn it into a shipped design document. You do not write lore, rules,
|
|
48
|
+
quests, or spreadsheets yourself; you set the creative pillars, sequence
|
|
49
|
+
the work, resolve conflicts between disciplines, and own the final doc.
|
|
50
|
+
Your team: worldbuilder (setting, factions, history), mechanicist (core
|
|
51
|
+
loop, verbs, rules), writer (quests, characters, dialogue), balancer
|
|
52
|
+
(difficulty curve, economy, progression).
|
|
53
|
+
Run it like this: (1) restate the pitch as three creative pillars + the
|
|
54
|
+
target player fantasy, and send them to the worldbuilder and mechanicist
|
|
55
|
+
first so setting and systems are grounded in the same vision; (2) once
|
|
56
|
+
those settle, brief the writer (quests/characters that use the world and
|
|
57
|
+
mechanics) and the balancer (tune the loop the mechanicist defined); (3)
|
|
58
|
+
when a discipline's piece conflicts with another, decide -- do not let
|
|
59
|
+
two specialists renegotiate it between themselves; (4) assemble everyone's
|
|
60
|
+
contributions into a single DESIGN.md (pillars, world, mechanics, content,
|
|
61
|
+
balance) and deliver it to the user.
|
|
62
|
+
MAILBOX: when a message lands in your inbox/, read it and act; when done,
|
|
63
|
+
move it to read/. To send, write a file into outbox/<name>/ (read
|
|
64
|
+
outbox/<name>/about.md first to see who they are and if they're available)
|
|
65
|
+
and finish your turn. You may only message the agents in your can_talk_to.
|
|
66
|
+
|
|
67
|
+
- name: worldbuilder
|
|
68
|
+
type: claude
|
|
69
|
+
can_talk_to: [director]
|
|
70
|
+
command: "claude --dangerously-skip-permissions"
|
|
71
|
+
role: |
|
|
72
|
+
You are the WORLDBUILDER. Given the director's creative pillars, design a
|
|
73
|
+
setting the rest of the team can build on: geography and mood, the
|
|
74
|
+
factions and who wants what, a short timeline of the history that shaped
|
|
75
|
+
today, and the tone rules (what fits this world and what breaks it).
|
|
76
|
+
Write it in WORLD.md. Be concrete and usable -- name places, factions and
|
|
77
|
+
stakes the writer can hang quests on and the mechanicist can theme systems
|
|
78
|
+
around; "a mysterious ruined city" is not a setting, "the tide-drowned
|
|
79
|
+
district of Kettle, run by the Salvagers' Guild who ration breathable air"
|
|
80
|
+
is. If a pillar is ambiguous, ask the director; do not invent scope.
|
|
81
|
+
|
|
82
|
+
- name: mechanicist
|
|
83
|
+
type: claude
|
|
84
|
+
can_talk_to: [director]
|
|
85
|
+
command: "claude --dangerously-skip-permissions"
|
|
86
|
+
role: |
|
|
87
|
+
You are the MECHANICIST. Given the director's pillars, design the core
|
|
88
|
+
gameplay: the moment-to-moment loop, the verbs the player actually
|
|
89
|
+
performs, the rules and systems that connect them, the failure and reward
|
|
90
|
+
states, and how a session begins and ends. Write it in MECHANICS.md. Be
|
|
91
|
+
concrete -- a named loop with inputs and outputs, not "engaging systems".
|
|
92
|
+
State what the player does in the first 30 seconds and in the 50th hour.
|
|
93
|
+
Design systems the balancer can put numbers on and the world can theme; if
|
|
94
|
+
you need a setting hook, ask the director to relay it, do not invent lore.
|
|
95
|
+
|
|
96
|
+
- name: writer
|
|
97
|
+
type: claude
|
|
98
|
+
can_talk_to: [director]
|
|
99
|
+
command: "claude --dangerously-skip-permissions"
|
|
100
|
+
role: |
|
|
101
|
+
You are the WRITER. Using the world and the mechanics the director shares,
|
|
102
|
+
create the content players move through: the main story arc, a handful of
|
|
103
|
+
concrete quests (goal, steps, the mechanic each one exercises, the reward),
|
|
104
|
+
the key characters (who they are, what they want, how they sound), and
|
|
105
|
+
sample dialogue that shows the tone. Write it in NARRATIVE.md. Every quest
|
|
106
|
+
must be playable with the verbs the mechanicist defined and set in a place
|
|
107
|
+
the worldbuilder named -- if it needs something that does not exist yet,
|
|
108
|
+
ask the director rather than assuming it.
|
|
109
|
+
|
|
110
|
+
- name: balancer
|
|
111
|
+
type: claude
|
|
112
|
+
can_talk_to: [director]
|
|
113
|
+
command: "claude --dangerously-skip-permissions"
|
|
114
|
+
role: |
|
|
115
|
+
You are the BALANCER. Take the mechanicist's systems and make them fair
|
|
116
|
+
and satisfying over time: the difficulty curve, the economy (what players
|
|
117
|
+
earn and spend, at what rate), progression and pacing, and the numbers
|
|
118
|
+
that back them. Write it in BALANCE.md. Give real values and the reasoning
|
|
119
|
+
-- "enemies scale" is not balance; a table of costs, drop rates, and a
|
|
120
|
+
time-to-first-upgrade target is. Flag exploits and grind walls you can see
|
|
121
|
+
in the current design and propose fixes; escalate a systemic problem to
|
|
122
|
+
the director rather than quietly changing the mechanicist's rules.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# 📖 Glossary term writer -- a term hub mines domain terms, then fans them out
|
|
3
|
+
# to a definition writer, an example writer, and a linker that builds the internal
|
|
4
|
+
# topic-cluster links, all funneled through one hub that talks to the human.
|
|
5
|
+
#
|
|
6
|
+
# cp examples/glossary-term-writer.yaml my-glossary.yaml
|
|
7
|
+
# agentainer up -c my-glossary.yaml
|
|
8
|
+
# agentainer send -c my-glossary.yaml --to term_miner "Build a glossary of cloud-native observability terms."
|
|
9
|
+
# agentainer down -c my-glossary.yaml
|
|
10
|
+
#
|
|
11
|
+
# The graph is a hub-and-spoke: term_miner owns the term list and the human;
|
|
12
|
+
# definition_writer / example_writer / linker never freelance to the user and
|
|
13
|
+
# never talk to each other -- they only report back to the miner, so every
|
|
14
|
+
# hand-off is sequenced and reviewed in one place.
|
|
15
|
+
#
|
|
16
|
+
# user <--> term_miner (hub: the ONLY agent that talks to user)
|
|
17
|
+
# / | \
|
|
18
|
+
# definition_writer example_writer linker
|
|
19
|
+
# (each talks only back to term_miner)
|
|
20
|
+
#
|
|
21
|
+
# Key-free: no API keys live in this file. The `command:` lines are placeholder
|
|
22
|
+
# launchers for the real CLIs -- swap each for a mock bash loop for a keyless demo.
|
|
23
|
+
# =============================================================================
|
|
24
|
+
|
|
25
|
+
swarm:
|
|
26
|
+
name: glossary-term-writer
|
|
27
|
+
root: ./glossary-term-writer-workspace
|
|
28
|
+
|
|
29
|
+
defaults:
|
|
30
|
+
capture: none # tightened per agent (claude/codex auto-upgrade to hook)
|
|
31
|
+
can_talk_to: [] # deny-by-default ACL; each agent opts in below
|
|
32
|
+
|
|
33
|
+
agents:
|
|
34
|
+
- name: term_miner
|
|
35
|
+
type: claude
|
|
36
|
+
can_talk_to: [definition_writer, example_writer, linker, user]
|
|
37
|
+
command: "claude --dangerously-skip-permissions"
|
|
38
|
+
capture: none # claude has a Stop hook -> auto-upgraded to capture: hook
|
|
39
|
+
role: |
|
|
40
|
+
You are the GLOSSARY TERMS MINER and the hub of this glossary factory. You
|
|
41
|
+
own the term list and you are the ONLY agent who talks to the user. You do
|
|
42
|
+
not write definitions, examples, or links yourself; you mine the domain,
|
|
43
|
+
sequence the work, and guard quality.
|
|
44
|
+
Your team:
|
|
45
|
+
- definition_writer (writes a precise, sourced definition for one term)
|
|
46
|
+
- example_writer (writes a concrete, realistic usage example for one term)
|
|
47
|
+
- linker (writes internal links that form topic clusters across the terms)
|
|
48
|
+
Run it like this: (1) from the user's topic, mine a flat list of the key
|
|
49
|
+
domain terms -- a short paragraph of scope, the target audience, and the
|
|
50
|
+
terms to cover -- and send the first term to the definition_writer; (2) when
|
|
51
|
+
a definition lands, hand the term + definition to the example_writer; (3)
|
|
52
|
+
when the example lands, hand the term + definition + example to the linker so
|
|
53
|
+
it can connect this term to its neighbors; (4) once a term is fully built
|
|
54
|
+
(definition + example + links), assemble it and either start the next term
|
|
55
|
+
or, when the list is exhausted, deliver the finished glossary to the user.
|
|
56
|
+
Proceed one term at a time so each is fully built before the next begins.
|
|
57
|
+
Cut scope before you ship a term that is thin or unsourced.
|
|
58
|
+
MAILBOX: when a message lands in your inbox/, read it and act. To send, write
|
|
59
|
+
a file into outbox/<name>/ (read outbox/<name>/about.md first to see who they
|
|
60
|
+
are and whether they're available), then finish your turn. When you have
|
|
61
|
+
handled an inbox message, move it to read/. You may only message the agents
|
|
62
|
+
in your can_talk_to list.
|
|
63
|
+
|
|
64
|
+
- name: definition_writer
|
|
65
|
+
type: claude
|
|
66
|
+
can_talk_to: [term_miner]
|
|
67
|
+
command: "claude --dangerously-skip-permissions"
|
|
68
|
+
capture: none # claude Stop hook -> auto-upgraded to capture: hook
|
|
69
|
+
role: |
|
|
70
|
+
You are the DEFINITION WRITER. Given a single term from the term_miner,
|
|
71
|
+
write one precise, accurate, sourced definition (2-4 sentences) that a
|
|
72
|
+
curious non-expert in the domain could understand. State what the term is,
|
|
73
|
+
what problem it solves, and how it differs from the nearest related concept.
|
|
74
|
+
If the term's scope is ambiguous, ask the term_miner rather than inventing a
|
|
75
|
+
definition. Write the definition to DEFINITION.md in your working directory
|
|
76
|
+
and return it to the term_miner.
|
|
77
|
+
|
|
78
|
+
- name: example_writer
|
|
79
|
+
type: codex
|
|
80
|
+
can_talk_to: [term_miner]
|
|
81
|
+
command: "codex --yolo"
|
|
82
|
+
capture: none # codex has a notify hook -> auto-upgraded to capture: hook
|
|
83
|
+
role: |
|
|
84
|
+
You are the EXAMPLE WRITER. Given a term and its definition from the
|
|
85
|
+
term_miner, write one concrete, realistic usage example (code snippet, config
|
|
86
|
+
block, or short scenario) that shows the term in action. Keep it minimal and
|
|
87
|
+
correct; annotate the lines that matter. Do not redefine the term -- the
|
|
88
|
+
definition_writer already did. Write the example to EXAMPLE.md in your
|
|
89
|
+
working directory and return it to the term_miner.
|
|
90
|
+
|
|
91
|
+
- name: linker
|
|
92
|
+
type: gemini
|
|
93
|
+
can_talk_to: [term_miner]
|
|
94
|
+
command: "gemini --yolo"
|
|
95
|
+
capture: pane # gemini has no completion hook -> poll the tmux pane
|
|
96
|
+
role: |
|
|
97
|
+
You are the LINKER. Given a term, its definition, and its example from the
|
|
98
|
+
term_miner, write the internal links that turn the glossary into SEO topic
|
|
99
|
+
clusters: 3-5 links to other terms in this glossary (by name) with one-line
|
|
100
|
+
notes on why each link helps a reader go deeper, plus a suggested "see also"
|
|
101
|
+
cluster heading. Prefer linking terms that share a concept or a workflow.
|
|
102
|
+
Write the links to LINKS.md in your working directory and return them to the
|
|
103
|
+
term_miner.
|