@adaptic/maestro 1.1.6 → 1.1.8

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.
@@ -436,359 +436,308 @@ If yes, run:
436
436
  sudo ./scripts/setup/configure-macos.sh
437
437
  ```
438
438
 
439
- ## Phase 4: Third-Party Service Configuration
439
+ ## Phase 4: Autonomous Service Configuration
440
440
 
441
- Guide the user through setting up external integrations. Present this as a checklist some steps can be automated, others require manual action.
441
+ This phase sets up all third-party integrations **autonomously**. Use Playwright MCP for web-based setup (Slack API portal, Twilio Console, Google Account, ElevenLabs, Deepgram) and Bash for local scripts. Only ask the user for input when genuinely required (existing credentials, 2FA codes, payment authorisation).
442
442
 
443
- ### Classification of Setup Steps
443
+ **Tooling:**
444
+ - **Playwright MCP** (`mcp__plugin_playwright_playwright__browser_navigate`, `browser_click`, `browser_fill_form`, `browser_snapshot`, etc.) for all web UI interactions
445
+ - **Bash** for local scripts, CLI tools, file writes, service starts
446
+ - If a web UI requires authentication the agent doesn't have, ask the user to log in via `! open <url>` then resume automation once they confirm they're logged in
444
447
 
445
- **Automated (the wizard does it):**
446
- - Twilio WhatsApp sandbox configuration (if TWILIO_ACCOUNT_SID is in .env)
447
- - Cloudflare tunnel creation (via `cloudflared` CLI if installed)
448
- - ElevenLabs voice clone setup (via API if ELEVENLABS_API_KEY is in .env)
449
- - Railway service deployment (via `railway` CLI if installed)
448
+ **Implementation guides**: Each service has a detailed guide in `docs/guides/`. Follow the guide's steps exactly during setup. Reference the guide's troubleshooting section if something fails.
450
449
 
451
- **Guided (requires human action, wizard walks them through):**
452
- - Slack app creation and token generation
453
- - Gmail app password generation
454
- - Twilio phone number purchase
455
- - Parsec account login (first time only)
450
+ ### Step 0: Ask what services this agent needs
456
451
 
457
- ### Step 1: Slack App Setup
458
-
459
- ```
460
- Let's set up Slack integration.
461
-
462
- IMPORTANT: You can reuse an existing Slack app across multiple agents in the
463
- same workspace. Each agent needs its own bot token and user token, but they
464
- can share the same app configuration.
465
-
466
- If you already have a Maestro Slack app configured:
467
- → Just paste the bot token (xoxb-...) and user token (xoxp-...) below.
468
-
469
- If you need to create a new Slack app:
470
- 1. Go to https://api.slack.com/apps → "Create New App" → "From scratch"
471
- 2. Name it "Maestro - {AgentFirstName}" (or reuse existing "Maestro" app)
472
- 3. Under "OAuth & Permissions", add these BOT scopes:
473
- - chat:write, chat:write.customize
474
- - channels:read, channels:history
475
- - groups:read, groups:history
476
- - im:read, im:history, im:write
477
- - users:read, users:read.email
478
- - reactions:read, reactions:write
479
- - files:read, files:write
480
- 4. Add these USER scopes:
481
- - channels:history, groups:history, im:history
482
- - search:read
483
- 5. Install the app to your workspace
484
- 6. Copy the Bot User OAuth Token (xoxb-...)
485
- 7. Copy the User OAuth Token (xoxp-...)
486
-
487
- For Slack Events API (real-time messages instead of polling):
488
- 8. Under "Event Subscriptions", enable events
489
- 9. Set Request URL to your Cloudflare tunnel URL + /slack/events
490
- 10. Subscribe to bot events: message.channels, message.groups, message.im,
491
- app_mention, reaction_added
492
- 11. Copy the Signing Secret from "Basic Information"
493
-
494
- Paste your tokens when ready (or type "skip" to configure later):
495
- Bot token (xoxb-...):
496
- User token (xoxp-...):
497
- Signing secret (optional):
498
452
  ```
453
+ Which services does this agent need? Select all that apply:
499
454
 
500
- Write the tokens to `.env` using the Edit tool.
501
-
502
- **Answer to Slack app reusability question:** A single Slack app CAN serve multiple agents in the same workspace. The app defines scopes and event subscriptions; each workspace installation generates unique bot/user tokens. However, if you want separate bot identities (different names/avatars per agent), create one app per agent. The Event Subscriptions URL can only point to one server per app, so if multiple agents need real-time events, either use separate apps or a shared event router.
503
-
504
- ### Step 2: Gmail Setup
455
+ [1] Slack (messaging, events, typing indicators)
456
+ [2] Gmail (email send/receive via IMAP/SMTP)
457
+ [3] Twilio SMS (inbound/outbound text messaging)
458
+ [4] Twilio WhatsApp (inbound/outbound WhatsApp)
459
+ [5] Voice / Huddle (Deepgram STT + ElevenLabs TTS)
460
+ [6] Cloudflare Tunnels (public webhook URLs — needed if 3/4/5 selected)
461
+ [7] Gemini / Veo (AI image + video generation)
462
+ [8] All of the above
463
+ [9] Minimal (Slack + Gmail only)
505
464
 
465
+ Which? (comma-separated numbers, or "all" / "minimal")
506
466
  ```
507
- Let's set up Gmail.
508
467
 
509
- Each agent needs its own Gmail account and app password.
510
- (The poller connects via IMAP — not OAuth — so app passwords are simpler.)
468
+ Then execute each selected service. For services with existing credentials, ask the user to paste them. For new accounts, drive the web UI via Playwright.
511
469
 
512
- 1. Log into the agent's Google account ({agent.email})
513
- 2. Enable 2-Factor Authentication if not already enabled
514
- 3. Go to https://myaccount.google.com/apppasswords
515
- 4. Generate an app password for "Mail" on "Mac"
516
- 5. Copy the 16-character password (no spaces)
470
+ ### Step 1: Slack per `docs/guides/slack-setup.md`
517
471
 
518
- Paste the Gmail app password:
519
- ```
472
+ **If user has existing tokens:** ask for xoxb- and xoxp- tokens, write to `.env`.
520
473
 
521
- Write to `.env` as `GMAIL_APP_PASSWORD`.
474
+ **If creating new app — execute via Playwright:**
522
475
 
523
- If the agent also monitors the principal's inbox:
524
- ```
525
- Does {principalName} want this agent to monitor their inbox too?
526
- If yes, generate an app password for {principalEmail} using the same steps above.
476
+ 1. `browser_navigate` to `https://api.slack.com/apps`
477
+ 2. `browser_snapshot` to check auth — if not logged in, ask user: `! open https://api.slack.com/apps` and log in, then resume
478
+ 3. Click "Create New App" "From scratch"
479
+ 4. `browser_fill_form` with app name "Maestro - {AgentFirstName}", select workspace
480
+ 5. Navigate to OAuth & Permissions
481
+ 6. Add Bot Token Scopes: `chat:write`, `chat:write.customize`, `channels:read`, `channels:history`, `groups:read`, `groups:history`, `im:read`, `im:history`, `im:write`, `users:read`, `users:read.email`, `reactions:read`, `reactions:write`, `files:read`, `files:write`
482
+ 7. Add User Token Scopes: `channels:history`, `groups:history`, `im:history`, `search:read`, `chat:write`
483
+ 8. Click "Install to Workspace" → authorize
484
+ 9. Extract Bot User OAuth Token (xoxb-...) and User OAuth Token (xoxp-...) from the page
485
+ 10. Navigate to Basic Information → extract Signing Secret
486
+ 11. Write `SLACK_BOT_TOKEN`, `SLACK_USER_TOKEN`, `SLACK_SIGNING_SECRET` to `.env`
527
487
 
528
- Paste the secondary Gmail app password (or "skip"):
488
+ **Verify:**
489
+ ```bash
490
+ source .env && curl -s -H "Authorization: Bearer $SLACK_USER_TOKEN" https://slack.com/api/auth.test | python3 -c "import json,sys; d=json.load(sys.stdin); print('Slack OK: ' + d.get('user','') if d.get('ok') else 'FAIL: ' + d.get('error',''))"
529
491
  ```
530
492
 
531
- Write to `.env` as `SECONDARY_GMAIL_APP_PASSWORD`.
532
-
533
- ### Step 3: Twilio Setup (Optional)
493
+ ### Step 2: Gmail — per `docs/guides/email-setup.md`
534
494
 
495
+ Gmail app passwords require 2FA interaction — ask user:
535
496
  ```
536
- Does this agent need phone/SMS/WhatsApp capabilities? (yes/no)
497
+ Gmail setup: Please generate an app password:
498
+ 1. Go to https://myaccount.google.com/apppasswords (or I can open it for you)
499
+ 2. Generate a password for "Mail" on "Mac"
500
+ 3. Paste the 16-character password here:
537
501
  ```
538
502
 
539
- If yes:
540
- ```
541
- Twilio setup:
542
- 1. Sign up at https://www.twilio.com/ (or use existing account)
543
- 2. From the Console dashboard, copy:
544
- - Account SID (starts with AC...)
545
- - Auth Token
546
- 3. Buy a phone number: Console → Phone Numbers → Buy a Number
547
- - Select a number with SMS + Voice capabilities
548
- - Copy the phone number (E.164 format, e.g., +15551234567)
549
- - Copy the Phone SID (starts with PN...)
550
-
551
- Paste your Twilio credentials:
552
- Account SID:
553
- Auth Token:
554
- Phone Number:
555
- Phone SID:
556
- ```
503
+ After receiving the password:
504
+ 1. Write `GMAIL_APP_PASSWORD` to `.env`
505
+ 2. If monitoring principal's inbox, ask for secondary password → `SECONDARY_GMAIL_APP_PASSWORD`
506
+ 3. Install msmtp: `brew install msmtp 2>/dev/null || true`
507
+ 4. Write `~/.msmtprc` per guide § 1.4, set `chmod 600 ~/.msmtprc`
557
508
 
558
- Write all to `.env`. Then offer to auto-configure:
559
- ```
560
- Would you like me to configure the Twilio WhatsApp sandbox automatically? (yes/no)
509
+ **Verify:**
510
+ ```bash
511
+ source .env && python3 -c "import imaplib,os; m=imaplib.IMAP4_SSL('imap.gmail.com'); m.login('${AGENT_EMAIL}', os.environ['GMAIL_APP_PASSWORD']); print('IMAP OK'); m.logout()"
561
512
  ```
562
513
 
563
- If yes, run: `bash scripts/configure-whatsapp-sandbox.sh`
514
+ ### Step 3: Twilio (SMS + WhatsApp) — per `docs/guides/voice-sms-setup.md`, `docs/guides/whatsapp-setup.md`
564
515
 
565
- ### Step 4: Cloudflare Tunnel (Optional)
516
+ **If user has credentials:** ask for Account SID, Auth Token, Phone Number → write to `.env`.
566
517
 
567
- ```
568
- Does this agent need a public URL for webhooks? (yes/no)
569
- (Required for: Slack Events API, Twilio voice callbacks, WhatsApp webhooks)
570
- ```
518
+ **If creating new account — execute via Playwright:**
571
519
 
572
- If yes:
573
- ```
574
- Cloudflare tunnel options:
520
+ 1. `browser_navigate` to `https://www.twilio.com/console`
521
+ 2. `browser_snapshot` — if not logged in, ask user to log in via `! open https://www.twilio.com/login`
522
+ 3. Once authenticated, extract Account SID and Auth Token from Console dashboard
523
+ 4. Navigate to Phone Numbers → Buy a Number → search for SMS+Voice number in preferred country
524
+ 5. **Ask user to confirm the purchase** (payment authorisation)
525
+ 6. After purchase, extract phone number (E.164) and Phone SID
526
+ 7. Write `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, `TWILIO_PHONE_NUMBER`, `TWILIO_PHONE_SID` to `.env`
575
527
 
576
- 1. Quick tunnel (free, URL changes on restart):
577
- cloudflared tunnel --url http://localhost:3100
528
+ **If SMS selected:** Configure webhook per guide:
529
+ 1. Navigate to Twilio Console → Phone Numbers → Active Numbers → select number
530
+ 2. Under Messaging → "A message comes in" → Webhook POST → `{tunnel_url}/sms`
531
+ 3. Enable geo-permissions: navigate to Messaging → Settings → Geo Permissions → enable needed countries
578
532
 
579
- 2. Named tunnel (free, persistent URL — recommended):
580
- cloudflared tunnel create {agent-name}
581
- cloudflared tunnel route dns {agent-name} {agent-name}.yourdomain.com
533
+ **If WhatsApp selected:** Configure sandbox per guide:
534
+ 1. `browser_navigate` to `https://console.twilio.com/us1/develop/sms/try-it-out/whatsapp-learn`
535
+ 2. Under Sandbox Settings → set webhook URL to `{tunnel_url}/whatsapp` POST
536
+ 3. Set Status Callback to `{tunnel_url}/whatsapp/status` POST
537
+ 4. Note and report the sandbox join keyword to the user
538
+ 5. Write `WHATSAPP_MODE=sandbox`, `WHATSAPP_PORT=3002` to `.env`
582
539
 
583
- 3. Skip (configure manually later)
540
+ ### Step 4: Cloudflare Tunnels — per `docs/guides/voice-sms-setup.md` § 7
584
541
 
585
- Which option? (1/2/3)
586
- ```
542
+ 1. `brew install cloudflared 2>/dev/null || true`
543
+ 2. Determine needed ports: SMS=3001, WhatsApp=3002, Slack Events=3100
544
+ 3. Ask: quick tunnel (temporary) or named tunnel (persistent)?
545
+ 4. For quick: start tunnels in background, capture URLs
546
+ 5. For named: `cloudflared tunnel login` (may require browser auth), `cloudflared tunnel create {agent-name}`, write config
547
+ 6. Go back and update Twilio webhook URLs with the tunnel URLs (Steps 3 SMS/WhatsApp)
587
548
 
588
- For option 1, run `cloudflared tunnel --url http://localhost:3100` and capture the URL.
589
- For option 2, guide through the DNS setup steps.
549
+ ### Step 5: Voice / Huddle per `docs/guides/voice-sms-setup.md` § 5
590
550
 
591
- ### Step 5: Voice Integration (Optional)
551
+ **API keys** if user has them, paste directly. Otherwise, drive signup via Playwright:
592
552
 
593
- ```
594
- Does this agent need voice capabilities (phone calls, huddle participation)? (yes/no)
595
- ```
553
+ 1. **ElevenLabs**: `browser_navigate` to `https://elevenlabs.io/` → sign up or log in → navigate to Profile → API Keys → extract key
554
+ 2. **Deepgram**: `browser_navigate` to `https://console.deepgram.com/` sign up or log in → navigate to API Keys → create and extract key
555
+ 3. Write `ELEVENLABS_API_KEY`, `DEEPGRAM_API_KEY` to `.env`
596
556
 
597
- If yes:
598
- ```
599
- Voice setup requires:
600
- 1. ElevenLabs API key (for text-to-speech)
601
- Sign up at https://elevenlabs.io/
602
- → Copy your API key from Profile → API Keys
603
-
604
- 2. Deepgram API key (for speech-to-text)
605
- → Sign up at https://deepgram.com/
606
- → Copy your API key from Console → API Keys
607
-
608
- 3. BlackHole virtual audio (for huddle participation)
609
- → This will be installed by the audio setup script
610
-
611
- Paste API keys:
612
- ElevenLabs API key:
613
- Deepgram API key:
557
+ **Local setup:**
558
+ ```bash
559
+ bash scripts/huddle/setup-audio.sh # Install BlackHole, sox, verify
560
+ cd scripts/huddle && npm install && cd ../.. # Install huddle Node.js deps
561
+ bash scripts/huddle/launch-slack.sh # Launch Slack with CDP
614
562
  ```
615
563
 
616
- Write to `.env`. Then run: `bash scripts/huddle/setup-audio.sh`
564
+ ### Step 6: Media Generation — per `docs/guides/media-generation-setup.md`
617
565
 
618
- ### Step 6: Additional Services (Optional)
566
+ 1. If user has Gemini key, paste directly. Otherwise: `browser_navigate` to `https://aistudio.google.com/apikey` → extract or create key
567
+ 2. Write `GEMINI_API_KEY` to `.env`
619
568
 
620
- ```
621
- Any additional services to configure?
622
- 1. OpenAI API key (supplemental model access)
623
- 2. Gemini API key (media generation)
624
- 3. Greptile API key (code search)
625
- 4. Done — skip remaining
569
+ ### Step 7: Additional Keys
626
570
 
627
- Which? (comma-separated numbers, or "done")
628
- ```
571
+ Prompt for any remaining optional keys: `OPENAI_API_KEY`, `GREPTILE_API_KEY`. Write to `.env` or skip.
629
572
 
630
- For each, prompt for the API key and write to `.env`.
573
+ ## Phase 5: Subsystem Implementation & Verification
631
574
 
632
- ### Step 7: Service Verification
575
+ After credentials are configured, this phase **autonomously implements and verifies** every subsystem by following each implementation guide's setup and test steps. This ensures the agent is actually operational — not just configured with API keys.
633
576
 
634
- After all services are configured, run verification:
577
+ **Execution:** Spawn parallel background agents for independent subsystems. Report results as a verification matrix. Do NOT proceed to Phase 6 until all selected subsystems pass (or user explicitly accepts failures).
635
578
 
636
- ```bash
637
- npm run healthcheck
579
+ Tell the user:
580
+ ```
581
+ Credentials configured. Now I'll set up and verify each subsystem end-to-end.
582
+ This runs autonomously — I'll report results when complete.
638
583
  ```
639
584
 
640
- Report the results and flag any services that aren't configured.
585
+ ### 5.1 Outbound Governance `docs/guides/outbound-governance-setup.md`
641
586
 
642
- ## Phase 5: Generate Agent README
587
+ Verify FIRST all send scripts depend on this.
643
588
 
644
- Generate a comprehensive README.md for this agent's repository. This is NOT the Maestro framework README it describes THIS specific agent.
589
+ 1. Verify hooks registered in `.claude/settings.json` (PreToolUse for block-mcp-slack-send and pre-send-audit, PostToolUse for post-action-log, Stop for session-end-log)
590
+ 2. `chmod +x scripts/hooks/*.sh`
591
+ 3. Test dedup: generate key → acquire → verify CLAIMED → cleanup
592
+ 4. Test validate-outbound.py runs without crash
593
+ 5. Test disclosure_assessment.py runs without crash
645
594
 
646
- **Template structure:**
595
+ ### 5.2 Email — `docs/guides/email-setup.md`
647
596
 
648
- ```markdown
649
- # {repoName}
597
+ 1. Test IMAP connectivity (if GMAIL_APP_PASSWORD set)
598
+ 2. Verify msmtp config exists: `test -f ~/.msmtprc`
599
+ 3. Verify email signature files: `test -f scripts/email-signature.html`
600
+ 4. `chmod +x scripts/send-email.sh`
650
601
 
651
- **{fullName} Autonomous {title} for {company}**
602
+ ### 5.3 Slack `docs/guides/slack-setup.md`
652
603
 
653
- Powered by [@adaptic/maestro](https://github.com/adapticai/maestro)
604
+ 1. Test token: `curl -s -H "Authorization: Bearer $SLACK_USER_TOKEN" https://slack.com/api/auth.test`
605
+ 2. Verify slack-send.sh uses xoxp- token (not xoxb-)
606
+ 3. Verify typing indicator exists: `test -f scripts/slack-typing.mjs`
607
+ 4. Verify MCP block hook: `test -f scripts/hooks/block-mcp-slack-send.sh`
654
608
 
655
- ---
609
+ ### 5.4 SMS & WhatsApp — `docs/guides/voice-sms-setup.md`, `docs/guides/whatsapp-setup.md`
656
610
 
657
- ## Who is {firstName}?
611
+ 1. Verify `config/caller-id-map.yaml` exists and has principal with `access_level: ceo`
612
+ 2. Start SMS handler, verify health: `curl http://localhost:3001/health`
613
+ 3. Start WhatsApp handler, verify health: `curl http://localhost:3002/health`
614
+ 4. `chmod +x scripts/send-sms.sh scripts/send-whatsapp.sh`
658
615
 
659
- {firstName} {lastName} is an autonomous AI agent operating as {title} at {company}.
660
- {companyDescription}. {firstName} runs 24/7 on a dedicated Mac mini ({machineName}),
661
- using Claude Code as the reasoning engine and orchestrating 30+ specialist sub-agents.
616
+ ### 5.5 Voice / Huddle `docs/guides/voice-sms-setup.md` § 5
662
617
 
663
- {firstName} reports to {principalFullName} ({principalTitle}) and operates with
664
- {describe autonomy level based on archetype}.
618
+ 1. `bash scripts/huddle/setup-audio.sh --check`
619
+ 2. Verify huddle deps: `test -d scripts/huddle/node_modules`
620
+ 3. Verify Deepgram + ElevenLabs keys are set
665
621
 
666
- ## Capabilities
622
+ ### 5.6 Poller & Daemon — `docs/guides/poller-daemon-setup.md`
667
623
 
668
- {Generate 8-12 bullet points based on the archetype and responsibilities.
669
- For executive-operator: comms management, briefs, hiring, strategic execution, etc.
670
- For technical-leader: code review, architecture decisions, engineering health, etc.
671
- For compliance-officer: regulatory tracking, filing management, audit readiness, etc.
672
- Tailor to the specific responsibilities gathered in Phase 1.}
624
+ 1. Run poller once: `timeout 30 node scripts/poller/index.mjs`
625
+ 2. Verify daemon entry point: `head -5 scripts/daemon/maestro-daemon.mjs`
626
+ 3. Verify plists generated: `ls scripts/local-triggers/plists/*.plist | wc -l`
627
+ 4. Test emergency stop: `touch .emergency-stop` run trigger verify blocked → `rm .emergency-stop`
628
+ 5. Verify watchdog: `bash scripts/watchdog/memory-watchdog.sh --check`
673
629
 
674
- ## Architecture
630
+ ### 5.7 RAG & Context — `docs/guides/rag-context-setup.md`
675
631
 
676
- Built on the Maestro 5-tier agent architecture:
632
+ 1. Build search index: `python3 scripts/rag-indexer.py --full`
633
+ 2. Verify docs indexed: `python3 scripts/rag-indexer.py --stats`
634
+ 3. Test search: `python3 scripts/user-context-search.py --user unknown --query "adaptic" --max-results 1`
635
+ 4. Run test suite if available: `bash scripts/test-rag-search.sh`
677
636
 
678
- - **Tier 0**: {firstName} (Executive Cortex) core identity and reasoning
679
- - **Tier 1**: {Generate 4-5 domain controllers relevant to the archetype}
680
- - **Tier 2**: 31 specialist sub-agents
681
- - **Tier 3**: Slack, Gmail, WhatsApp, Browser, Calendar
682
- - **Tier 4**: Decision Log, Risk Register, Knowledge Base
637
+ ### 5.8 PDF Generation`docs/guides/pdf-generation-setup.md`
683
638
 
684
- ## Powered by Maestro
639
+ 1. `pandoc --version`
640
+ 2. Check XeLaTeX: `xelatex --version 2>/dev/null || ~/Library/TinyTeX/bin/universal-darwin/xelatex --version 2>/dev/null`
641
+ 3. Generate test PDF:
642
+ ```bash
643
+ echo "# Test\nGenerated by init-maestro." > /tmp/init-test.md
644
+ node scripts/pdf-generation/build-document.mjs --input /tmp/init-test.md --template memo --output /tmp/init-test.pdf
645
+ test -f /tmp/init-test.pdf && echo "PDF OK"
646
+ rm -f /tmp/init-test.md /tmp/init-test.pdf
647
+ ```
685
648
 
686
- This repo is an agent instance powered by the [@adaptic/maestro](https://www.npmjs.com/package/@adaptic/maestro) framework.
649
+ ### 5.9 Media Generation `docs/guides/media-generation-setup.md`
687
650
 
688
- Update framework: npm update @adaptic/maestro && npm run upgrade
689
- Health check: npm run healthcheck
690
- Emergency stop: npm run emergency-stop
651
+ 1. Verify Gemini key set
652
+ 2. List specs: `node scripts/media-generation/generate-assets.mjs --list`
653
+ 3. Verify client loads: `node -e "import('./scripts/media-generation/gemini-image-client.mjs').then(() => console.log('OK'))"`
691
654
 
692
- ## Operating Modes
655
+ ### 5.10 Verification Summary
693
656
 
694
- - **Reactive**: Polls Slack/Gmail/Calendar every 60s, classifies and dispatches
695
- - **Scheduled**: {morningBrief time} brief, midday sweep, {eveningWrap time} wrap, weekly cycles
696
- - **Proactive**: Backlog executor every 10 min, parallel agent execution
657
+ Print results:
697
658
 
698
- ## Commands
659
+ ```
660
+ ╔══════════════════════════════════════════════════════════════╗
661
+ ║ SUBSYSTEM VERIFICATION RESULTS ║
662
+ ╠══════════════════════════════════════════════════════════════╣
663
+ ║ ║
664
+ ║ Outbound Governance ✅ PASS hooks, dedup, validation ║
665
+ ║ Email (Gmail) ✅ PASS IMAP, SMTP, signatures ║
666
+ ║ Slack ✅ PASS tokens, send, typing ║
667
+ ║ SMS (Twilio) ✅ PASS handler, send, caller-id ║
668
+ ║ WhatsApp ⏭️ SKIP not selected ║
669
+ ║ Voice / Huddle ⏭️ SKIP not selected ║
670
+ ║ Poller & Daemon ✅ PASS poller, plists, watchdog ║
671
+ ║ RAG & Context ✅ PASS index built, search works ║
672
+ ║ PDF Generation ✅ PASS pandoc + xelatex OK ║
673
+ ║ Media Generation ⏭️ SKIP not selected ║
674
+ ║ ║
675
+ ║ Overall: 7/7 selected subsystems PASS ║
676
+ ║ ║
677
+ ║ Guides: docs/guides/ (for detailed testing & troubleshoot) ║
678
+ ╚══════════════════════════════════════════════════════════════╝
679
+ ```
699
680
 
700
- | Command | Purpose |
701
- |---------|---------|
702
- | npm run daemon | Start the main orchestrator |
703
- | npm run healthcheck | Verify all subsystems |
704
- | npm run emergency-stop | Halt all operations |
705
- | npm run resume | Resume after emergency stop |
706
- | npm run upgrade | Pull latest Maestro framework |
707
- | claude "/init-maestro" | Reconfigure agent identity |
681
+ If any subsystem FAILS: diagnose via the guide's troubleshooting section, attempt one fix, re-run check. If still failing, report failure with specific error and ask user whether to continue or abort.
708
682
 
709
- ## Communication Governance
683
+ ## Phase 6: Generate Agent README
710
684
 
711
- {Generate based on archetype:
712
- - executive-operator: broad autonomy with escalation for legal/financial commitments
713
- - technical-leader: autonomous on technical decisions, escalates on budget/headcount
714
- - compliance-officer: conservative, escalates on submissions and interpretations
715
- - etc.}
685
+ Generate a comprehensive README.md for this agent's repository. This describes THIS specific agent, not the Maestro framework.
716
686
 
717
- ---
687
+ Include all of the following sections populated with gathered values:
718
688
 
719
- {fullName} | {title} | {company} — Powered by [Maestro](https://github.com/adapticai/maestro)
720
- ```
689
+ 1. **Title and tagline**: `{fullName} Autonomous {title} for {company}`
690
+ 2. **Who is {firstName}?**: 3-4 sentence description of role, reporting line, autonomy level
691
+ 3. **Capabilities**: 8-12 bullet points based on archetype and responsibilities
692
+ 4. **Architecture**: 5-tier model with role-specific domain controllers
693
+ 5. **Subsystem Status**: Include the Phase 5 verification matrix
694
+ 6. **Operating Modes**: Reactive (polling), Scheduled (triggers), Proactive (backlog)
695
+ 7. **Commands**: npm run daemon, healthcheck, emergency-stop, resume, upgrade
696
+ 8. **Implementation Guides**: Table linking to all 10 guides in `docs/guides/`
697
+ 9. **Communication Governance**: Based on archetype autonomy model
721
698
 
722
- Write this README.md to the repo root, populated with all the gathered values.
699
+ Write to repo root as `README.md`.
723
700
 
724
- ## Phase 6: Create GitHub Repository
701
+ ## Phase 7: Create GitHub Repository
725
702
 
726
- Ask the user whether they want to create a GitHub repo for this agent:
703
+ Ask the user whether they want to create a GitHub repo:
727
704
 
728
705
  ```
729
706
  Would you like me to create a GitHub repository for this agent? (yes/no)
730
707
  ```
731
708
 
732
- If yes:
709
+ If yes: ask for org/username (default: adapticai), repo name (default: {repoName}), visibility (default: private). Then:
733
710
 
734
- ```
735
- Repository setup:
736
- 1. GitHub organization or username? (default: adapticai)
737
- 2. Repository name? (default: {repoName}, e.g., "jacob-ai")
738
- 3. Visibility: private (recommended) or public? (default: private)
739
- ```
740
-
741
- Then run:
742
711
  ```bash
743
712
  gh repo create {org}/{repoName} --private --description "{fullName} — Autonomous {title} for {company} (powered by Maestro)"
744
- ```
745
-
746
- After creating the repo, set up git and push:
747
- ```bash
748
713
  git remote add origin https://github.com/{org}/{repoName}.git
749
714
  git add -A
750
715
  git commit -m "Initialize {fullName} as {title} — powered by @adaptic/maestro"
751
716
  git push -u origin main
752
717
  ```
753
718
 
754
- If the user declines, skip this step and remind them to set up a repo manually later.
719
+ ## Phase 8: Final Verification
755
720
 
756
- ## Phase 7: Final Verification
721
+ ### Step 1: Grep for stale agent references
757
722
 
758
- After ALL phases are complete, run these verification steps:
759
-
760
- ### Step 1: Grep for old agent references
761
-
762
- Search critical files for any remaining references to the old agent's first name (case-insensitive). Check:
763
- - CLAUDE.md
764
- - config/agent.ts
765
- - config/environment.yaml
766
- - config/contacts.yaml
767
- - config/priorities.yaml
768
- - package.json
769
- - All files in schedules/triggers/
770
- - All agent.md files in agents/
771
-
772
- Report any stragglers and fix them.
723
+ Search critical files for old agent name (case-insensitive): CLAUDE.md, config/agent.ts, config/*.yaml, package.json, schedules/triggers/*.md, agents/*/agent.md. Fix any stragglers.
773
724
 
774
725
  ### Step 2: Validate config/agent.ts
775
726
 
776
- Read `config/agent.ts` and verify it has valid TypeScript syntax and all fields are populated with the new values.
727
+ Read and verify valid TypeScript, all fields populated with new values.
777
728
 
778
- ### Step 3: Run health check
729
+ ### Step 3: Health check
779
730
 
780
731
  ```bash
781
732
  npm run healthcheck
782
733
  ```
783
734
 
784
- Report the results.
785
-
786
- ### Step 4: Summary
787
-
788
- Print a completion summary:
735
+ ### Step 4: Completion Summary
789
736
 
790
737
  ```
791
- Maestro initialization complete.
738
+ ═══════════════════════════════════════════════════════════════
739
+ MAESTRO INITIALIZATION COMPLETE
740
+ ═══════════════════════════════════════════════════════════════
792
741
 
793
742
  Agent: {fullName}, {title}
794
743
  Archetype: {archetype}
@@ -796,41 +745,38 @@ Maestro initialization complete.
796
745
  Principal: {principalName}
797
746
  Machine: {machineName}
798
747
 
799
- Files modified:
800
- - config/agent.ts (central identity config)
801
- - CLAUDE.md (operating charter)
802
- - README.md (agent-specific documentation)
803
- - config/environment.yaml, contacts.yaml, priorities.yaml
804
- - package.json
805
- - agents/{agent-slug}/agent.md (+ 30 other agent definitions)
806
- - schedules/triggers/ (13 trigger prompts)
748
+ Identity (Phase 2): ✅ 8 parallel agents rewrote repo
749
+ Infrastructure (Phase 3): ✅ {N} launchd triggers installed
750
+ Services (Phase 4): ✅ {list configured services}
751
+ Subsystems (Phase 5): {include verification matrix}
752
+ README (Phase 6): ✅ Agent-specific README generated
753
+ GitHub (Phase 7): {repo URL or "skipped"}
807
754
 
808
- Infrastructure:
809
- - {N} launchd triggers installed
810
- - Global Claude Code settings configured
811
- - .env file created {with/without API keys}
755
+ ─────────────────────────────────────────────────────────
812
756
 
813
- GitHub: https://github.com/{org}/{repoName} (if created)
757
+ Next steps:
758
+ 1. Start the daemon: npm run daemon
759
+ 2. Monitor logs: tail -f logs/daemon/$(date +%Y-%m-%d)-sessions.jsonl
760
+ 3. Test a message: Send a Slack DM to {firstName}
814
761
 
815
- Verify everything:
816
- 1. Review changes: git diff
817
- 2. Check daemons: launchctl list | grep adaptic
818
- 3. Health check: npm run healthcheck
819
- 4. Start daemon: npm run daemon
762
+ Implementation guides: docs/guides/
763
+ ═══════════════════════════════════════════════════════════════
820
764
  ```
821
765
 
822
- ## Guidelines for the Wizard Conversation
766
+ ## Guidelines for the Wizard
823
767
 
824
768
  - Be warm and professional. This is a setup experience, not an interrogation.
825
- - Offer sensible defaults wherever possible. If the user says "defaults" for any field, use the archetype-appropriate default.
826
- - If the user provides all information upfront (e.g., as arguments to the command), skip the conversational steps and go straight to confirmation.
827
- - Always confirm before executing. The changes are extensive and hard to undo.
828
- - When spawning sub-agents, give each one the COMPLETE set of gathered values so they can work independently.
829
- - Sub-agents MUST run in parallel (use `run_in_background: true`) -- do not run them sequentially.
830
- - After all sub-agents finish, do the verification grep yourself (do not delegate it).
769
+ - Offer sensible defaults wherever possible.
770
+ - Always confirm before executing identity changes (Phase 2). Service configuration (Phase 4) and verification (Phase 5) execute autonomously after the user selects services.
771
+ - Sub-agents MUST run in parallel (`run_in_background: true`).
772
+ - **Autonomous execution is the default.** Only ask for input when you cannot proceed without it (credentials, 2FA, payment). Everything else web UI navigation, script execution, file writes, verification — you do yourself.
773
+ - **Use Playwright MCP** for web UIs: Slack API portal, Twilio Console, Google Account, ElevenLabs, Deepgram, Gemini.
774
+ - **Use Bash** for local operations: scripts, installs, service starts, tests.
775
+ - If Playwright fails (auth wall, CAPTCHA), fall back to asking user to do that specific step via `! open <url>`, then resume.
831
776
 
832
777
  ## Error Handling
833
778
 
834
- - If a sub-agent fails, report which one failed and what went wrong. Offer to retry just that sub-agent.
835
- - If the user wants to abort mid-wizard, confirm and exit cleanly.
836
- - If config/agent.ts cannot be read, warn that the repo may not be properly set up and suggest running `npx @adaptic/maestro create` first.
779
+ - If a sub-agent fails, report which one and offer to retry.
780
+ - If a Phase 5 subsystem verification fails, diagnose using the guide's troubleshooting section, attempt one fix, re-run. If still failing, report with specific error and ask whether to continue.
781
+ - If user aborts mid-wizard, exit cleanly.
782
+ - If config/agent.ts unreadable, suggest `npx @adaptic/maestro create` first.