Initiation playbook progress. Updated 2026-10-16 10:05 UTC.
integrations/email_finder.py, integrations/quota.py) to apps/api/src/sales/pipeline/email/:/Users/system/www/camomail/.maestro/playbooks/Initiation/Working/phase-01-inventory.md:@orbit/* to @camomail/*:CLAUDE.md for camomail:.maestro/playbooks/Initiation/Working/phase-02-notes.md covering:Working/phase-02-notes.md. Watch out: routes use :slug (not :workspaceId), the web app is apps/web-tanstack, there is no migrations folder / integration-test config / testcontainers / nodemailer / imapflow yet, Harvey has no OpenRou…apps/api/src/kernel/secret-box.ts (SecretBox port, AesGcmSecretBox, UnconfiguredSecretBox, SecretKeyring, readSecretKeyring, redact), exposed as secretBox on AppContainer and FeatureCore; keys are on AppConfig.encryptionKeys. Not…workspaceIntegrations table in schema.ts, integration: "intg" prefix, and the two permissions (Integrations group in PERMISSION_GROUPS; ADMIN gets view+manage, MEMBER gets view, OWNER gets both via ALL_WORKSPACE_PERMISSIONS). Notes for later…apps/api/src/integrations/, following the conventions of the workspaces context:apps/api/src/integrations/ (feature.ts, domain/{integration,events,repositories}.ts, infrastructure/drizzle-integration.repository.ts, application/{list,connect,test,disconnect}-integration(s).service.ts, connection-test.ts, `integration-c…apps/api/src/integrations/providers/, with one file per provider.providers/ plus http.ts (shared readJson, httpFailure, pick, and form-tolerant Zod helpers requiredSecret/optionalSecret/optionalText/port/formBoolean); PROVIDERS lists all 12 in display order. Added `nod…integrations/application/gmail-oauth-state.ts (GmailOAuthStateCodec), application/gmail-oauth.service.ts (GmailOAuthService.authorize/verify/complete), infrastructure/gmail-client.ts (GmailClient, GmailClientFactory), and `interfaces/htt…apps/api/src/interfaces/http/controllers/integrations.controller.ts, mounted under the workspace routes:integrations Hono in integrations.controller.ts (already mounted at /v1/workspaces). Notes for later tasks:apps/web-tanstack/src/pages/workspace-settings/integrations-page.tsx, reusing SettingsSection and @camomail/ui components (Card, Badge, Dialog/Sheet, Input, Switch, Select, …pages/workspace-settings/integrations-page.tsx (one SettingsSection per category, cards in a 2-column grid; ConfigureIntegrationDialog renders IntegrationDTO.fields 1:1: text/email/number/password inputs, Switch for boolean, Select for sel…apps/api/src/__tests__/ (follow the existing unit and integration test conventions):apps/api/vitest.integration.config.ts (the missing config: src/**/*.integration.test.ts, one file at a time, 120 s hook timeout), src/__tests__/support/postgres.ts (startTestDatabase(): a postgres:17-alpine Testcontainer, or `TEST_DATABASE_U…npm run typecheck, npm run lint, npm run test --workspace @camomail/api and npm run test:integration --workspace @camomail/api, and fix all failures.packages/shared/src/sales-config.ts (export from the package index):apps/api/src/sales/ bounded context (the home for the whole sales domain from now on) with a config/ sub-area:interfaces/http/controllers/agent-settings.controller.ts:apps/web-tanstack, following the existing pages/workspace-settings/ patterns and the $section route:npm run typecheck, npm run lint and both API test suites, and fix failures..maestro/playbooks/Initiation/Working/phase-04-schema-map.md.Working/phase-04-schema-map.md ([[phase-04-schema-map]]). Where it differs from the wording of the tasks below, follow the map. Its "Findings" section explains why.apps/api/src/db/drizzle/schema.ts according to the schema map, each with workspace_id FK (cascade), a created_at/updated_at pair, and composite indexes that start with workspace_id:// ── Sales data model section of schema.ts and follow the schema map exactly: camelCase columns, timestamptz(3), composite (workspaceId, xId) FKs, append-only ledgers without updatedAt. Migration: `apps/api/drizzle/migrat…apps/api/src/sales/domain/:apps/api/src/sales/domain/ (unit tests: sales-domain.test.ts, 22 cases).apps/api/src/sales/infrastructure/ (one drizzle-*.repository.ts per aggregate), including the query methods the pipeline and dashboard need:apps/api/src/sales/infrastructure/:interfaces/http/controllers/sales.controller.ts with new permissions workspace.sales.view / workspace.sales.manage (member gets view, admin/owner get manage):sales.controller.ts, mounted under /v1/workspaces.npm run seed:sales --workspace @camomail/api (apps/api/scripts/seed-sales.ts) that fills a chosen workspace with realistic fake companies, prospects, signals, drafts in each status, and a sh…npm run seed:sales --workspace @camomail/api -- --slug <slug> [--reset]. Without --slug it lists the workspaces, and it refuses NODE_ENV=production.npm run typecheck, npm run lint, both test suites and the seed command, and fix failures.apps/api/src/jobs/application/*.ts, jobs/infrastructure/graphile-*.ts, jobs/feature.ts) and Harvey's pipeline.py and main.py.Working/phase-05-pipeline-plan.md ([[phase-05-pipeline-plan]]). Where it differs from the wording of the tasks below, follow the plan. Its "Findings" and "Deviations" sections explain why.apps/api/src/sales/brain/:apps/api/src/sales/brain/, wired as services.brain in sales/feature.ts (documented in CLAUDE.md).collectors/discover.py, collectors/profile.py, integrations/tech_detect.py) to apps/api/src/sales/pipeline/discover/ and .../profile/:apps/api/src/sales/pipeline/ (discover/, profile/, http/, stage.ts) and apps/api/src/sales/signals/, wired in sales/feature.ts as services.discoverStage, services.profileStage and services.signalCatalog (documented in CLAUDE.md).agents/scout.py, signals.py) to apps/api/src/sales/pipeline/scout/:apps/api/src/sales/pipeline/scout/, wired as services.scoutStage in sales/feature.ts (documented in CLAUDE.md). The profiler and the scout now share one WebPageFetcher, and feature.ts builds the Brain once.integrations/email_finder.py, integrations/quota.py) to apps/api/src/sales/pipeline/email/: workingagents/writer.py, agents/analyst.py if it feeds the writer) to apps/api/src/sales/pipeline/writer/:agents/sender.py, integrations/mail_provider.py, gmail.py, smtp_mail.py, instantly.py) to apps/api/src/sales/pipeline/sender/:apps/api/src/sales/pipeline/:npm run typecheck, npm run lint and both API test suites, and fix every failure.harvey/harvey/agents/handler.py, integrations/calendar.py, prompts/handler.md, skills/objection_handling.md and the reply-related StateManager methods.apps/api/src/sales/inbox/:npm run typecheck, npm run lint and both API test suites, and fix failures.harvey/harvey/trainer.py and the trainer-related parts of harvey/harvey/setup.py, and write .maestro/playbooks/Initiation/Working/phase-07-trainer-plan.md covering the crawl strategy, FALLBACK_PATHS, page…apps/api/src/sales/trainer/:apps/web-tanstack:npm run typecheck, npm run lint and both API test suites, and fix failures.harvey/harvey/integrations/linkedin.py and the LinkedIn branches in agents/sender.py, agents/writer.py and pipeline.py, and write .maestro/playbooks/Initiation/Working/phase-08-linkedin-plan.md covering…apps/api/src/sales/linkedin/:LinkedInClient:npm run typecheck, npm run lint and both API test suites, and fix failures.dashboard.py routes and web/app.js views) and the camomail frontend conventions (apps/web-tanstack/src/routes/d/$workspaceSlug/, components/sidebar, components/workspace-page.tsx, `l…lib/db/realtime.ts and lib/stores/workspace-stores.ts that invalidate or patch queries on sales.* eve…/d/$workspaceSlug/today):/d/$workspaceSlug/outbox:components/sidebar, following existing item patterns; update …docs/architecture/harvey-parity.md with YAML front matter (`type:export.py as GET /sales/companies/export and /prospects/export endpoints with a UI button, or usage reporting from …apps/api/src/__tests__/sales-e2e.integration.test.ts that, with fake providers, creates a workspace, connects fake integrations, applies trainer suggestions, runs the heartbeat, …d231f3dPhase 05 task 4 - scout company scoring2529a24Phase 05 task 3 - discovery and profiling stages98fbf4dPhase 05 task 2 - OpenRouter brainea2a859Phase 05 task 1 - pipeline jobs plan3b17737Phase 04 task 8 - verify typecheck, lint, tests, seed and sales curl67e6f30Phase 04 task 7 - sales state machine, dedup, repository, tenant isolation and permission testsbc55499Phase 04 task 6 - dev seed command for sales data (seed:sales)533b29dPhase 04 task 5 - sales read API, outbox review endpoints and realtime hints08c2852Update Phase-04-Sales-Data-Model.md task 3 completion status349a029Phase 04 task 4 - implement Drizzle repositories for sales aggregates and ledgers787201aPhase 04 task 3 - sales domain entities, events and repository interfaces333276cPhase 04 task 2 - sales tables, shared vocabularies, ID prefixes and migrationa211c77Phase 04 task 1 - Harvey schema map for the sales data modela6d2044Phase 03 task 8 - verify typecheck, tests and seeded agent settings smoke test3eb8dd3Phase 03 task 7 - HTTP integration tests for agent settings against Postgres2611923Phase 03 task 6 - agent settings pages in the web appe3bbb74Phase 03 task 5 - agent settings and prompt template HTTP endpointsf41f0cePhase 03 task 4 - sales bounded context with agent settings and prompt template servicesf1b8c9cMark Phase 03 task 3 as complete90a49d5Phase 03 task 3 - add persistence for agent settings and prompt templates7388948Phase 03 task 2 - shared Zod schemas and defaults for workspace agent settings5b91873Phase 03 task 1 - map Harvey config, prompts and skills to per-workspace agent settings6545fd3Phase 02 task 10 - green typecheck/tests and API smoke test for integrations5c2f334Phase 02 task 9 - add integrations Postgres integration test and vitest integration configd426908Phase 02 task 8 - add workspace Integrations settings UI