MARKETING_AGENT.md · 8.5 KB

marketinga.agent — marketing capabilities on the CEO + Seven Soldiers boardroom

The marketing Counsellor is not a parallel cabinet. It is the existing CEO + Seven Soldiers boardroom (daio/governance/boardroom.py:Boardroom) with each soldier carrying a marketing-specific skill. A campaign brief becomes a boardroom directive; each soldier votes; soldiers whose vote was approve AND who own a marketing skill execute that skill; per-soldier outputs assemble into the campaign envelope; the CEO signs the MarketingAttributionReceipt post-consensus, with the BoardroomSession id now an indexed on-chain field.

This is HBR's "layered system of specialized agents" thesis instantiated on the boardroom we already operate.

The cabinet IS the boardroom

                              CEO (brief composer + post-consensus signer)
                                            │
              ┌─────────┬─────────┬─────────┼─────────┬─────────┬─────────┐
            CPO       CTO       COO       CFO       CISO       CLO       CRO
          (1.0)     (1.0)     (1.0)     (1.0)    (1.2 veto) (0.8)   (1.2 veto)
            │         │         │         │         │         │         │
         content   experiment dist'n   reporting  voice      regs     spend
          (HBR1)   (HBR2)    (HBR3)    (HBR4)     gate     gate      gate
SoldierWeightMarketing skillSkill module
CEOn/aBrief composition + consensus signeragents/marketing/skills/ceo.py
CPO Product1.0HBR L1 — content draftingagents/marketing/skills/cpo.py
CTO Technology1.0HBR L2 — experimentationagents/marketing/skills/cto.py
COO Operations1.0HBR L3 — distributionagents/marketing/skills/coo.py
CFO Finance1.0HBR L4 — reporting + treasuryagents/marketing/skills/cfo.py
CISO Security1.2× vetoIdentity gate + voice violation scanagents/marketing/skills/ciso.py
CLO Legal0.8Regulatory + competitor neutralityagents/marketing/skills/clo.py
CRO Risk1.2× vetoSpend risk + hard-stopagents/marketing/skills/cro.py

agents/marketing/skills/registry.py is the single source of truth for soldier_id → skill instance. It is tested directly in tests/test_marketing_skill_registry.py.

Brand code

Every cycle reads from data/brand_code/:

Boardroom session lifecycle

1. CEO composes CampaignBrief + formats boardroom directive
  1. Boardroom.convene(directive, members="ceo,cpo,cto,coo,cfo,ciso,clo,cro")
↓ each soldier votes (pure inference; no tools)
  1. CISO veto check: if ciso_security.vote == "reject" → REFUSE
  2. CRO veto check: if cro_risk.vote == "reject" → REFUSE
  3. Overall outcome check: if session.outcome != "approved" → REFUSE
  4. For each soldier with vote == "approve" AND a registered skill, in DISPATCH_ORDER:
a. ciso_security — identity + voice scan (defense in depth) b. clo_legal — regulatory + competitor c. cpo_product — content draft (HBR L1) d. cto_technology — variants + holdouts (HBR L2) e. coo_operations — distribution (HBR L3) f. cfo_finance — GEO probe + KPI snapshot (HBR L4) + treasury read g. cro_risk — holdout integrity + spend hard-stop Each skill emits one marketing.soldier_skill_executed catalogue event. Each executing soldier gets ONE Tessera credential (per-soldier provenance).
  1. CEO assembles CampaignEnvelope (with boardroom_session_id) and signs the
MarketingAttributionReceipt — emits the marketing.campaign_executed event.

CISO and CRO carry hard veto: a vote == "reject" from either short-circuits regardless of weighted score. CLO has no hard veto — its reject only blocks the campaign if the weighted score also falls below supermajority.

Three-receipt model

A campaign produces three on-chain receipt types — see MARKETING_RECEIPTS.md for the full explainer. Briefly:

ReceiptLayerPer
Tessera.solidentityper soldier action
X402Receipt.solpaymentper paid call
MarketingAttributionReceipt.solattributionper campaign envelope (now keyed by boardroomSessionId)

Plus MarketingTreasury.sol for the 99% revenue → BANKON SATOSHI buyback/burn rule.

Backend surface

GET /marketing/status                       # 8-row soldier ↔ skill table
GET /marketing/campaigns                    # recent decisions from catalogue
GET /marketing/brand_code                   # current loaded brand-code (read-only)
GET /marketing/geo                          # last GEO probe rollup
GET /marketing/identity                     # on-chain identity binding status
GET /marketing/session/{boardroom_id}       # join BoardroomSession with the receipt + skill outputs

Every endpoint accepts ?h=true for plain-text rendering via mindx_backend_service.text_render.

Configuration

data/config/marketinga.toml — inotify-watched. Notable thresholds:

On-chain identity binding

Phase 1 ships in dry-run mode: 8 ENS subnames (ceo.bankon.eth, cpo.bankon.eth, …, cro.bankon.eth) are unregistered until the operator runs:

python -m agents.marketing.onchain.bind_identity --execute

This binds:

  1. Tessera credentials for each agent (CEO + 7 soldiers).
  2. ENS subnames under bankon.eth.
  3. AgentRegistry (ERC-8004) registrations with capability bitmaps.
  4. iNFT_7857 mints — one per soldier seat.

The MarketingAttributionReceipt and MarketingTreasury contracts deploy via daio/contracts/marketing/script/DeployMarketing.s.sol — see daio/contracts/marketing/README.md for the operator command.

Phase 1 vs Phase 2

In Phase 1 (this drop):

Operator-gated Phase 2:

Out of scope (separate plans):

Verification

# Python tests (59 passing as of this drop)
.mindx_env/bin/pytest -q --override-ini="addopts=" \
  tests/test_marketing_catalogue_events.py \
  tests/test_brand_code_loader.py \
  tests/test_geo_probe.py \
  tests/test_marketing_onchain_clients.py \
  tests/test_marketinga_agent.py \
  tests/test_marketing_soldier_skills.py \
  tests/test_marketing_skill_registry.py

Foundry CI gate (23 tests at 50k fuzz runs)

cd daio/contracts && FOUNDRY_PROFILE=marketing forge test --fuzz-runs 50000 -vvv

Live backend smoke

curl http://localhost:8000/marketing/status?h=true # 8-row soldier mapping curl http://localhost:8000/marketing/session/<id>?h=true

Referenced in this document
MANIFESTOMARKETINGMARKETING_PLAYBOOKMARKETING_RECEIPTSREADMETHESIS

All DocumentsDocument IndexThe Book of mindXImprovement JournalAPI Reference