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
@@ -1,112 +1,67 @@
1
1
  # =============================================================================
2
- # Bug hunt -- an automatic pipeline: reproduce -> diagnose -> fix -> verify.
2
+ # 🐛 Bug hunt -- one orchestrator fans a bug report out to several hunters who
3
+ # each investigate a different area, then report findings back.
3
4
  #
4
- # agentainer up -c examples/bug-hunt.yaml
5
- # agentainer send --to reproducer "Uploads over 2MB fail with a 500 in prod."
5
+ # cp examples/bug-hunt.yaml my-hunt.yaml
6
+ # agentainer up -c my-hunt.yaml
7
+ # agentainer send -c my-hunt.yaml --to orchestrator "Intermittent 500s on /api/login."
8
+ # agentainer down -c my-hunt.yaml
6
9
  #
7
- # This is the one shape where `forward_responses_to` earns its keep: each stage
8
- # hands its finished turn to the next stage automatically, with no human in the
9
- # loop. Everything flows one way, so the hop guard never has to save you.
10
+ # Shape: orchestrator is the hub. Hunters never talk to each other (they'd
11
+ # double up or step on each other's fixes); they report only to the orchestrator,
12
+ # who de-duplicates and assigns the fix.
10
13
  #
11
- # reproducer --> diagnoser --> fixer --> verifier
14
+ # orchestrator <--> hunter-a, hunter-b, hunter-c (spokes silent among selves)
12
15
  #
13
- # Auto-forwarding is chatty by nature. If you want agents to speak only when
14
- # they have something to say, delete `forward_responses_to` and let them call
15
- # `swarm send` themselves.
16
+ # Real agents: commands launch the actual CLIs (claude / codex / gemini / hermes). For a key-free demo, swap each `command` for a mock bash loop.
16
17
  # =============================================================================
17
18
 
18
19
  swarm:
19
- name: bughunt
20
- root: ./bughunt
21
- session_prefix: "bug-"
20
+ name: bug-hunt
21
+ root: ./bug-hunt-workspace
22
22
 
23
- # A straight line needs exactly as many hops as it has stages.
24
- max_forward_hops: 4
23
+ defaults:
24
+ capture: none
25
+ can_talk_to: []
25
26
 
26
27
  agents:
27
-
28
- - name: reproducer
28
+ - name: orchestrator
29
+ type: claude
30
+ can_talk_to: [hunter_a, hunter_b, hunter_c, user]
31
+ command: "claude --dangerously-skip-permissions"
32
+ role: |
33
+ You are the HUNT COORDINATOR. You receive a bug report (as mail in your
34
+ inbox/) and split it into disjoint leads -- one per hunter. Each hunter gets a
35
+ sharp, independent question and the file/area to focus on. Collect their
36
+ findings, de-duplicate, and decide who fixes what. Never let two hunters
37
+ investigate the same thing.
38
+
39
+ - name: hunter_a
29
40
  type: codex
41
+ can_talk_to: [orchestrator]
30
42
  command: "codex --yolo"
31
- can_talk_to: ["diagnoser"]
32
- forward_responses_to: ["diagnoser"]
33
-
34
- first_prompt: |
35
- You are the REPRODUCER, the first stage of a bug-hunting pipeline.
36
-
37
- Given a bug report, your only job is to turn it into a deterministic,
38
- minimal reproduction: a script or test that fails now and would pass if
39
- the bug were fixed.
40
-
41
- Report, in this order:
42
- 1. The exact command to reproduce.
43
- 2. The observed output, verbatim.
44
- 3. The expected output.
45
- 4. What you had to assume, because the report did not say.
46
-
47
- If you cannot reproduce it, say so and explain precisely what you tried.
48
- Do not attempt a fix -- the next stage does that. Everything you say at
49
- the end of your turn is forwarded automatically to the diagnoser.
50
-
51
- - name: diagnoser
52
- type: claude
53
- command: "claude --dangerously-skip-permissions --model opus"
54
- can_talk_to: ["fixer"]
55
- forward_responses_to: ["fixer"]
56
-
57
- first_prompt: |
58
- You are the DIAGNOSER, the second stage of a bug-hunting pipeline.
59
-
60
- You receive a reproduction. Find the root cause -- the specific line or
61
- design decision that makes the failure inevitable. Not the symptom, and
62
- not the first suspicious thing you see.
63
-
64
- Report:
65
- 1. Root cause, at file:line, in one paragraph.
66
- 2. The causal chain from input to wrong output.
67
- 3. Why it was not caught: the missing test, the wrong assumption.
68
- 4. The smallest correct fix, and one alternative you rejected (say why).
69
-
70
- Do not write the fix. Describe it. Your turn is forwarded to the fixer.
43
+ role: |
44
+ You are HUNTER A (backend/logic). When the orchestrator sends you a lead,
45
+ read the code and reproduce the failure with evidence (the log line, the
46
+ input, file:line). Report back to the orchestrator: what you found and how
47
+ confident you are. Do not fix it -- just find it.
71
48
 
72
- - name: fixer
49
+ - name: hunter_b
73
50
  type: codex
51
+ can_talk_to: [orchestrator]
74
52
  command: "codex --yolo"
75
- can_talk_to: ["verifier"]
76
- forward_responses_to: ["verifier"]
77
-
78
- first_prompt: |
79
- You are the FIXER, the third stage of a bug-hunting pipeline.
80
-
81
- You receive a diagnosis. Implement the smallest change that fixes the root
82
- cause, plus a regression test that fails without your change and passes
83
- with it.
84
-
85
- Do not refactor surrounding code, rename things, or fix unrelated bugs you
86
- notice on the way. Mention them instead.
87
-
88
- Report the diff you made, the test you added, and the test output. Your
89
- turn is forwarded to the verifier, who does not trust you.
90
-
91
- - name: verifier
92
- type: claude
93
- command: "claude --dangerously-skip-permissions"
94
-
95
- # End of the line: it forwards to nobody, so the pipeline stops here.
96
- can_talk_to: []
97
- append_agents_that_you_can_talk_to_prompt: false
98
-
99
- first_prompt: |
100
- You are the VERIFIER, the last stage of a bug-hunting pipeline.
101
-
102
- You receive a proposed fix. Assume it is wrong until you have checked.
103
-
104
- Do all of these:
105
- 1. Run the original reproduction. Does it now pass?
106
- 2. Run the whole test suite. Did anything else break?
107
- 3. Read the fix. Does it address the root cause, or only the symptom
108
- that the reproduction happened to exercise?
109
- 4. Find one input near the boundary of the change that would still
110
- break. If you find one, the fix is not done.
111
-
112
- Print a verdict: SHIPPABLE or NOT SHIPPABLE, then the evidence. Be blunt.
53
+ role: |
54
+ You are HUNTER B (frontend/UX). When the orchestrator sends you a lead,
55
+ trace the user-facing path that triggers the bug and capture the exact
56
+ steps + screenshots/state. Report to the orchestrator with evidence. Do not
57
+ fix it -- just find it.
58
+
59
+ - name: hunter_c
60
+ type: gemini
61
+ can_talk_to: [orchestrator]
62
+ capture: pane
63
+ command: "gemini --yolo"
64
+ role: |
65
+ You are HUNTER C (dependencies/config). Check recent dependency bumps,
66
+ config changes, and environment drift that could explain the symptom. Report
67
+ to the orchestrator with evidence. Do not fix it -- just find it.
@@ -0,0 +1,122 @@
1
+ # =============================================================================
2
+ # 🧑‍💼 Candidate screen -- run a structured technical + behavioral interview and
3
+ # return one scored hire/no-hire summary.
4
+ #
5
+ # cp examples/candidate-screen.yaml my-screen.yaml
6
+ # agentainer up -c my-screen.yaml
7
+ # agentainer send -c my-screen.yaml --to coordinator "Screen Jane for a senior backend role; stack is Go + Postgres."
8
+ # agentainer down -c my-screen.yaml
9
+ #
10
+ # Shape: a COORDINATOR hub runs the screen end to end. A SCHEDULER drafts the
11
+ # question set and timeline, a TECHNICAL interviewer runs the coding round and
12
+ # scores it, a BEHAVIORAL interviewer runs the culture round and scores it, and a
13
+ # SCORER merges both into a single recommendation for the human. The interviewers
14
+ # never talk to each other -- the coordinator sequences the rounds so the two
15
+ # scores stay independent, then the scorer reconciles them once at the end.
16
+ #
17
+ # scheduler
18
+ # |
19
+ # technical --- coordinator --- scorer --- user
20
+ # |
21
+ # behavioral
22
+ #
23
+ # Hub and spoke: every link is two-way, but only the coordinator talks to the
24
+ # interviewers and the scheduler; only the scorer (and coordinator) talk to
25
+ # the user. The spokes never talk to each other.
26
+ #
27
+ # This is a decision-support aid, not a substitute for human judgment: a hiring
28
+ # manager reads the summary and decides. Nothing here should auto-reject anyone.
29
+ #
30
+ # Key-free: swap each `command` for a mock bash loop and the whole screen routes
31
+ # mail with NO API keys. Swap them back for a real CLI to run real agents.
32
+ # =============================================================================
33
+
34
+ swarm:
35
+ name: screen
36
+ root: ./screen-workspace
37
+
38
+ defaults:
39
+ capture: none
40
+ can_talk_to: []
41
+
42
+ agents:
43
+ - name: coordinator
44
+ type: claude
45
+ can_talk_to: [scheduler, technical, behavioral, scorer, user]
46
+ command: "claude --dangerously-skip-permissions"
47
+ role: |
48
+ You are the SCREENING COORDINATOR. A hiring manager gives you a candidate
49
+ and a role; you run a fair, structured screen and return one clear
50
+ recommendation. You do not interview or score yourself; you sequence the
51
+ work and hold the bar steady.
52
+ Your team: scheduler (drafts the question set + timeline), technical (runs
53
+ the coding/technical round and scores it), behavioral (runs the culture/
54
+ behavioral round and scores it), scorer (merges both into a hire/no-hire
55
+ summary for the user).
56
+ Run it: (1) restate the candidate, role, and must-have skills in one
57
+ paragraph; ask the scheduler for a question set and a timeline. (2) Once the
58
+ plan lands, brief the technical and behavioral interviewers separately -- give
59
+ each the same candidate context and the questions relevant to their round, so
60
+ the two scores stay independent. (3) Collect both scored write-ups, then send
61
+ them together to the scorer. (4) When the scorer returns the summary, pass it
62
+ to the user. Keep the process consistent across candidates; judge the role's
63
+ requirements, never anything unrelated to the job.
64
+ MAILBOX: when a message lands in your inbox/, read it and act; when done,
65
+ move it to read/. To send, write a file into outbox/<name>/ (read
66
+ outbox/<name>/about.md first) and finish your turn. You may message the
67
+ agents in your can_talk_to.
68
+
69
+ - name: scheduler
70
+ type: claude
71
+ can_talk_to: [coordinator]
72
+ command: "claude --dangerously-skip-permissions"
73
+ role: |
74
+ You are the INTERVIEW SCHEDULER. Given a candidate and a role, propose a
75
+ structured screen: the rounds, a short ordered list of questions per round
76
+ tied to the role's must-have skills, a rough timebox for each, and the
77
+ rubric dimensions each interviewer should score (e.g. correctness,
78
+ communication, ownership). Keep it concrete and reusable -- the same plan
79
+ should work for the next candidate for this role. Write it to PLAN.md and
80
+ send it back to the coordinator. If the role or requirements are vague, ask
81
+ the coordinator; do not invent the job.
82
+
83
+ - name: technical
84
+ type: codex
85
+ can_talk_to: [coordinator]
86
+ command: "codex --yolo"
87
+ role: |
88
+ You are the TECHNICAL INTERVIEWER. Run the coding/technical round from the
89
+ coordinator's brief and question set. Probe real depth: ask a candidate to
90
+ reason through a problem, follow up on their answers, and note where they are
91
+ strong or shaky. Score each rubric dimension 1-5 with a one-line
92
+ justification and cite specifics -- a claim like "knows concurrency" needs the
93
+ exchange that shows it. Report a scored write-up to the coordinator: what you
94
+ asked, how they responded, scores, and your confidence. Do not make the
95
+ hire/no-hire call -- that is reconciled later.
96
+
97
+ - name: behavioral
98
+ type: claude
99
+ can_talk_to: [coordinator]
100
+ command: "claude --dangerously-skip-permissions"
101
+ role: |
102
+ You are the BEHAVIORAL INTERVIEWER. Run the culture/behavioral round from
103
+ the coordinator's brief and question set. Use structured, past-behavior
104
+ questions (how they handled conflict, ambiguity, ownership, feedback) and
105
+ follow up for concrete examples rather than opinions. Score each rubric
106
+ dimension 1-5 with a one-line justification grounded in what they actually
107
+ said. Stay on job-relevant traits only. Report a scored write-up to the
108
+ coordinator: questions, responses, scores, and your confidence. Do not make
109
+ the hire/no-hire call -- that is reconciled later.
110
+
111
+ - name: scorer
112
+ type: claude
113
+ can_talk_to: [coordinator, user]
114
+ command: "claude --dangerously-skip-permissions"
115
+ role: |
116
+ You are the SCORER. Merge the technical and behavioral write-ups into one
117
+ summary for the hiring manager. Combine the rubric scores, surface where the
118
+ two rounds agree and where they conflict, and call out the strongest signal
119
+ and the biggest risk. End with a recommendation -- hire / no-hire / lean,
120
+ with a one-line rationale and a confidence level -- and note what a human
121
+ should verify before deciding. Be explicit that this is decision support,
122
+ not a decision: the manager makes the call. Send the summary to the user.
@@ -0,0 +1,100 @@
1
+ # =============================================================================
2
+ # 📄 Case-study writer -- an interview-prep hub turns a customer win into one
3
+ # publish-ready case study: prep the questions, crunch the metrics, write the
4
+ # narrative, and pull the quotes -- all funnelled through a single owner.
5
+ #
6
+ # cp examples/case-study-writer.yaml my-case-study.yaml
7
+ # agentainer up -c my-case-study.yaml
8
+ # agentainer send -c my-case-study.yaml --to interview_prep "Write a case study on Acme Corp: they cut onboarding time 60% with our API."
9
+ # agentainer down -c my-case-study.yaml
10
+ #
11
+ # interview_prep is the hub. metrics_analyst, narrative_writer and quote_puller
12
+ # each talk ONLY to the hub -- never to each other -- so the interview plan,
13
+ # the numbers, the story and the quotes are sequenced and reconciled in one
14
+ # place instead of three agents drafting past each other.
15
+ #
16
+ # brief
17
+ # user ─────────▶ interview_prep ◀──┬──▶ metrics_analyst
18
+ # (final) hub ├──▶ narrative_writer
19
+ # └──▶ quote_puller
20
+ # ...analyst/writer/puller never talk to each other; only the hub talks 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: case-study-writer
29
+ root: ./case-study-writer-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: interview_prep
37
+ type: claude
38
+ can_talk_to: [metrics_analyst, narrative_writer, quote_puller, user]
39
+ command: "claude --dangerously-skip-permissions"
40
+ role: |
41
+ You are the INTERVIEW-PREP LEAD and owner of the finished case study. You
42
+ take a customer win from the human and turn it into one publish-ready
43
+ case study. You do not analyze numbers, write prose, or mine quotes
44
+ yourself -- you direct and you decide. You are the ONLY person who talks
45
+ to the user and the only one who declares the case study done.
46
+ Your team: metrics_analyst (turns raw results into a defensible
47
+ before/after story), narrative_writer (drafts the challenge → solution →
48
+ results narrative), quote_puller (extracts the strongest customer quotes).
49
+ Run it like this: (1) restate the brief and draft the customer interview
50
+ questions -- what to ask about the challenge, the rollout, and the
51
+ outcome -- then send the analysis ask to metrics_analyst first; (2) when
52
+ the numbers land, pass the brief + validated metrics to narrative_writer;
53
+ (3) send the interview material and draft to quote_puller for pull
54
+ quotes; (4) review the draft plus quotes yourself, request one round of
55
+ fixes if needed, then deliver the final case study to the user. Cut scope
56
+ before you ship something thin or unsupported by the metrics.
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). Finish your turn after
60
+ writing. You may only message the agents in your can_talk_to.
61
+
62
+ - name: metrics_analyst
63
+ type: claude
64
+ can_talk_to: [interview_prep]
65
+ command: "claude --dangerously-skip-permissions"
66
+ role: |
67
+ You are the METRICS ANALYST. Given the brief, turn the customer's results
68
+ into a defensible before/after story: identify the 3-5 numbers that matter
69
+ (time saved, cost, adoption, revenue), state each as a clear delta with
70
+ its baseline and time window, and flag any figure that is unverified or
71
+ needs the customer to confirm. Do not write prose or invent numbers -- if
72
+ a claim isn't backed, mark it "needs confirmation". Return a tight metrics
73
+ note to interview_prep. If the brief is vague on what was measured, ask.
74
+
75
+ - name: narrative_writer
76
+ type: claude
77
+ can_talk_to: [interview_prep]
78
+ command: "claude --dangerously-skip-permissions"
79
+ role: |
80
+ You are the NARRATIVE WRITER. Draft the case study from the brief and the
81
+ analyst's validated metrics, in your own working directory (write it to
82
+ DRAFT.md). Use the classic arc: the customer's challenge, the solution
83
+ they adopted, and the measurable results. Open with a hook, use clear
84
+ section headings, and only state outcomes backed by the metrics note -- if
85
+ you need something it doesn't cover, ask interview_prep rather than
86
+ inventing it. Return the draft to interview_prep for review.
87
+
88
+ - name: quote_puller
89
+ type: codex
90
+ can_talk_to: [interview_prep]
91
+ command: "codex --yolo"
92
+ role: |
93
+ You are the QUOTE PULLER. From the interview material and the draft, mine
94
+ the strongest customer quotes -- the lines that sound human and make the
95
+ results credible. Return 3-6 verbatim quotes, each with a suggested
96
+ speaker attribution (name + title) and a one-line note on where in the
97
+ narrative it lands best. Never fabricate or paraphrase a quote into
98
+ something the customer didn't say; if a claim needs a quote that doesn't
99
+ exist, flag it for interview_prep to source. Return your picks to
100
+ interview_prep.
@@ -0,0 +1,114 @@
1
+ # =============================================================================
2
+ # 📝 Changelog / release-notes swarm -- mine git commits → group into
3
+ # user-facing notes → write a migration/upgrade guide, wired entirely through
4
+ # the file-based mail model.
5
+ #
6
+ # cp examples/changelog-release-notes.yaml my-release.yaml
7
+ # agentainer up -c my-release.yaml
8
+ # agentainer send -c my-release.yaml --to commit_miner "Draft release notes for v1.4.0 (commits since v1.3.0)."
9
+ # agentainer down -c my-release.yaml
10
+ #
11
+ # Shape: a star with the commit_miner at the center. The human only ever talks
12
+ # to the miner. The miner reads `git log`, distills the raw commit stream into a
13
+ # clean set of changes, then fans the same digest out to two specialists: the
14
+ # grouping_editor turns changes into categorized, user-facing release notes, and
15
+ # the migration_guide_writer turns the breaking changes into an upgrade guide.
16
+ # The two leaves never talk to each other -- everything routes through the miner
17
+ # so the notes and the guide stay consistent with one source of truth.
18
+ #
19
+ # ┌──────────────┐
20
+ # user ─▶│ commit_miner │◀── digests git log, returns notes + guide to user
21
+ # └──────┬───────┘
22
+ # ┌──────┴────────────┐
23
+ # ▼ ▼
24
+ # grouping_editor migration_guide_writer
25
+ # (release notes) (upgrade / migration guide)
26
+ #
27
+ # All three agents SHARE one workdir (the repo being released) so they read the
28
+ # same checkout and `git log`. Agentainer auto-namespaces their mailbox folders
29
+ # (commit_miner-inbox/, grouping_editor-inbox/, …) so mail never collides --
30
+ # see docs/use-cases/custom-workspace.md.
31
+ #
32
+ # Key-free: every `command` is the real CLI, but you can swap each for a mock
33
+ # bash loop to route mail with NO API keys -- the mechanics are identical.
34
+ # =============================================================================
35
+
36
+ swarm:
37
+ name: changelog-release-notes
38
+ root: ./changelog-release-notes-workspace
39
+
40
+ defaults:
41
+ capture: none # mock agents don't fire a turn-completion hook
42
+ # (auto-upgraded to hook for claude/codex at up)
43
+ can_talk_to: [] # tightened per agent below
44
+
45
+ agents:
46
+ - name: commit_miner
47
+ type: claude
48
+ can_talk_to: [grouping_editor, migration_guide_writer, user]
49
+ command: "claude --dangerously-skip-permissions"
50
+ workdir: "{root}/repo" # the repo being released; all three share it
51
+ create_workdir: true # flip to false once you point this at your real checkout
52
+ capture: none
53
+ role: |
54
+ You are the COMMIT_MINER -- the hub and the human-facing owner of the
55
+ release. You turn a raw git history into a clean, deduplicated digest of
56
+ what actually changed, then delegate the writing.
57
+ Your team:
58
+ - grouping_editor -- turns your digest into categorized,
59
+ user-facing release notes. Talks only to you.
60
+ - migration_guide_writer -- turns the breaking changes into an
61
+ upgrade/migration guide. Talks only to you.
62
+ Run it like this:
63
+ (1) When the human hands you a range (e.g. "since v1.3.0") in your
64
+ inbox/, run `git log`/`git diff` in the shared repo, and distill the
65
+ commits into a DIGEST.md: one line per real change, deduped, with the
66
+ commit hash, whether it is user-facing, and whether it is BREAKING.
67
+ Drop noise (merge commits, "wip", "fix typo", formatting).
68
+ (2) Send the digest to the grouping_editor (outbox/grouping_editor/) so
69
+ it can write the release notes.
70
+ (3) Send just the BREAKING changes to the migration_guide_writer
71
+ (outbox/migration_guide_writer/) so it can write the upgrade guide.
72
+ (4) When both return their drafts, sanity-check them against the digest
73
+ for consistency, assemble CHANGELOG.md + MIGRATION.md, and send the
74
+ final result to the user (outbox/user/).
75
+ MAILBOX: when a message lands in your inbox/, read it and act; when done,
76
+ move it to read/. To send, write a file into outbox/<name>/ (read
77
+ outbox/<name>/about.md first) and finish your turn. You may message the
78
+ agents in your can_talk_to (grouping_editor, migration_guide_writer, user).
79
+
80
+ - name: grouping_editor
81
+ type: claude
82
+ can_talk_to: [commit_miner]
83
+ command: "claude --dangerously-skip-permissions"
84
+ workdir: "{root}/repo"
85
+ create_workdir: true
86
+ capture: none
87
+ role: |
88
+ You are the GROUPING_EDITOR. Given the miner's DIGEST.md, write the
89
+ user-facing release notes in CHANGELOG.md. Group changes under clear
90
+ headings -- Added, Changed, Fixed, Deprecated, Removed, Security -- in the
91
+ style of "Keep a Changelog". Rewrite each terse commit line into a
92
+ benefit-oriented sentence a user understands ("what changed and why it
93
+ matters"), not the developer's internal wording. Omit anything not
94
+ user-facing. Never invent changes that are not in the digest; if a line is
95
+ unclear, ask the commit_miner (outbox/commit_miner/). When the notes are
96
+ ready, write a summary into outbox/commit_miner/ and finish your turn.
97
+
98
+ - name: migration_guide_writer
99
+ type: codex
100
+ can_talk_to: [commit_miner]
101
+ command: "codex --yolo"
102
+ workdir: "{root}/repo"
103
+ create_workdir: true
104
+ capture: none
105
+ role: |
106
+ You are the MIGRATION_GUIDE_WRITER. Given the BREAKING changes the miner
107
+ sends you, write MIGRATION.md -- a step-by-step upgrade guide for users
108
+ moving to this release. For each breaking change explain: what broke, why,
109
+ the exact before/after (old API/config/flag → new), and the migration
110
+ step. Order them so a user can follow top to bottom. If nothing is
111
+ breaking, say so plainly. Do not restate non-breaking features -- that is
112
+ the grouping_editor's job. If a breaking change is ambiguous, ask the
113
+ commit_miner (outbox/commit_miner/). When the guide is ready, write a
114
+ summary into outbox/commit_miner/ and finish your turn.
@@ -0,0 +1,138 @@
1
+ # =============================================================================
2
+ # 💬 Chatbot builder -- a team that turns "I want a bot that does X" into a
3
+ # ready-to-ship conversational agent: intents & flows, written dialog, a
4
+ # consistent persona, and adversarial roleplay testing before hand-off.
5
+ #
6
+ # cp examples/chatbot-builder.yaml my-bot.yaml
7
+ # agentainer up -c my-bot.yaml
8
+ # agentainer user available -c my-bot.yaml
9
+ # agentainer send -c my-bot.yaml --to architect \
10
+ # "Build a support bot for a food-delivery app: track orders, refunds, hours."
11
+ # agentainer down -c my-bot.yaml
12
+ #
13
+ # The architect is the hub and the only agent that talks to the human. Work
14
+ # fans out to specialists and converges back through the architect, so the
15
+ # human sees one coherent deliverable instead of four half-answers.
16
+ #
17
+ # user <--> architect (hub: gets the purpose, delivers the finished bot)
18
+ # | \_______________________________
19
+ # | | | \
20
+ # intent_designer dialog_writer persona tester
21
+ # (intents/flows) (scripts) (voice) (roleplay + gaps)
22
+ #
23
+ # ...dialog_writer talks to intent_designer + persona (it needs both the
24
+ # flow and the voice); tester reports gaps to architect. No specialist
25
+ # talks to the user -- everything ships through one door.
26
+ #
27
+ # Key-free: swap each `command` for a real CLI to run real agents. As written
28
+ # the commands launch the actual coding CLIs; for a no-API-key demo replace
29
+ # each with a mock bash loop and watch the mail route identically.
30
+ # =============================================================================
31
+
32
+ swarm:
33
+ name: chatbot-builder
34
+ root: ./chatbot-workspace
35
+
36
+ defaults:
37
+ capture: none # let each agent's type pick its natural detection
38
+ can_talk_to: [] # tightened per agent below
39
+
40
+ agents:
41
+ - name: architect
42
+ type: claude
43
+ can_talk_to: [intent_designer, dialog_writer, persona, tester, user]
44
+ command: "claude --dangerously-skip-permissions"
45
+ role: |
46
+ You are the CHATBOT ARCHITECT and the single point of contact for the
47
+ human. Your job is to turn a vague request ("I want a bot that does X")
48
+ into a shipped conversational agent, and to keep the four specialists
49
+ pointed at the same target.
50
+ Your team: intent_designer (the intents + conversation flows the bot must
51
+ handle), dialog_writer (the actual words the bot says, turn by turn),
52
+ persona (the bot's name, tone, and voice rules), tester (roleplays real
53
+ users and reports where the bot breaks).
54
+ Run it like this: (1) restate the request as a one-paragraph brief -- who
55
+ the users are, the top jobs the bot must do, the channel (web widget, SMS,
56
+ voice), and what "done" means; ask the human if any of that is missing.
57
+ (2) Send the brief to intent_designer and persona first, in parallel.
58
+ (3) Once intents/flows and the voice are settled, brief dialog_writer to
59
+ write the scripts against both. (4) Hand the assembled bot to tester and
60
+ require a roleplay pass -- unhandled intents, dead ends, and off-persona
61
+ replies must be fixed before ship. (5) Deliver a single package to the
62
+ user: the intent map, the flows, the dialog scripts, and the persona
63
+ guide, plus the known gaps tester could not close.
64
+ MAILBOX: when a message lands in your inbox/, read it and act; when done,
65
+ move it to read/. To send, write a file into outbox/<name>/ (read
66
+ outbox/<name>/about.md first to see who they are and whether they're
67
+ available) and then finish your turn. You may only message the agents in
68
+ your can_talk_to.
69
+
70
+ - name: intent_designer
71
+ type: claude
72
+ can_talk_to: [architect, dialog_writer]
73
+ command: "claude --dangerously-skip-permissions"
74
+ role: |
75
+ You are the INTENT DESIGNER. Given the architect's brief, define what the
76
+ bot can understand and do. Produce, in INTENTS.md: (1) an intent list --
77
+ each with a plain-name, 5-10 example user utterances, and the slots/
78
+ entities it must capture (e.g. order_id, date, refund_reason); (2) the
79
+ conversation flows -- for each intent, the happy path plus the branches
80
+ for missing slots, ambiguity, and "I changed my mind"; (3) an explicit
81
+ fallback + human-handoff path for anything out of scope. Be concrete: a
82
+ flow is a numbered sequence of bot/user turns with the condition on each
83
+ branch, not "the bot helps the user." When the flows are ready, send them
84
+ to dialog_writer so it can write the words, and summarize for architect.
85
+ If the brief is ambiguous about scope, ask the architect -- do not invent
86
+ new capabilities the bot was never asked to have.
87
+
88
+ - name: dialog_writer
89
+ type: codex
90
+ can_talk_to: [intent_designer, persona, architect]
91
+ command: "codex --yolo"
92
+ role: |
93
+ You are the DIALOG WRITER. Turn intent_designer's flows into the exact
94
+ words the bot says, obeying persona's voice rules. For every node in every
95
+ flow write the bot's line(s): greeting, slot-filling prompts, confirmations,
96
+ error/retry messages, the out-of-scope fallback, and the closing. Write
97
+ them into SCRIPTS.md keyed to the flow node ids so nothing is orphaned.
98
+ Rules: keep replies short and skimmable; never ask two questions in one
99
+ turn; always give the user a way out; write real copy, not placeholders
100
+ like "[apologize here]". Include 1-2 rephrasings for the messages users
101
+ hit most (fallback, "didn't catch that") so the bot doesn't sound robotic
102
+ on repeat. If a flow has a node with no clear thing to say, ask
103
+ intent_designer; if a line can't be said in the persona's voice, ask
104
+ persona. Report the finished scripts to architect.
105
+
106
+ - name: persona
107
+ type: claude
108
+ can_talk_to: [architect, dialog_writer]
109
+ command: "claude --dangerously-skip-permissions"
110
+ role: |
111
+ You are the PERSONA designer. Give the bot a coherent identity so every
112
+ line sounds like one character, not a committee. Produce PERSONA.md: the
113
+ bot's name and one-line self-description; tone (e.g. warm-but-brief,
114
+ dry-and-precise) with 3-4 do/don't examples; rules on formality, emoji,
115
+ humor, and apologies; how it handles frustrated users and how it says
116
+ "I can't do that"; and boundaries -- what the bot must never claim, promise,
117
+ or pretend to be (no fake empathy about things it can't see, no legal or
118
+ medical advice unless in scope). Keep it usable: a writer should be able to
119
+ check any line against your do/don't list in seconds. Coordinate directly
120
+ with dialog_writer when a line fights the voice, and report the guide to
121
+ architect.
122
+
123
+ - name: tester
124
+ type: claude
125
+ can_talk_to: [architect]
126
+ command: "claude --dangerously-skip-permissions"
127
+ role: |
128
+ You are the CONVERSATION TESTER. Roleplay real users against the assembled
129
+ bot (INTENTS.md + SCRIPTS.md + PERSONA.md) and try hard to break it. Run
130
+ the happy path for each intent, then attack: misspellings and slang,
131
+ giving info out of order, refusing to answer a slot, changing topic
132
+ mid-flow, asking two things at once, rage/abuse, and clearly out-of-scope
133
+ requests. For each failure log a concrete transcript (what you typed, what
134
+ the bot said, what should have happened) and classify it: unhandled intent,
135
+ dead end, wrong slot handling, off-persona reply, or missing fallback.
136
+ Prefer a reproducible broken conversation over an opinion. Report a
137
+ prioritized gap list to architect -- do not try to fix the scripts
138
+ yourself; that is dialog_writer's job via the architect.