Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
601 changes: 601 additions & 0 deletions .cursor/rules/affirma-agent.mdc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ When asked to create or refine a messaging motion, follow this sequence:

### 4. Construct

- **Service-specific phrasing:** Replace generic "this investment" with the actual service (e.g., "this SharePoint migration," "this Power BI deployment").
- **Pain phrasing:** Replace generic "this investment" with complete thoughts prospects recognize (e.g., "Most waste comes from systems nobody officially owns anymore—orphan sites, permissions drift." or "Reports take too long to get, or the answers aren't there when you need them.").
- **Role-based messaging:** Champion (ownership, drift), Influencer (TCO, compliance), Decision Maker (strategy, references), Stakeholder (no surprises).
- **ICP definition:** Company size, tech stack, industry, trigger events.
- **Cadence by role:** Suggested sequence of touches (email, LinkedIn, call) for each buying committee role.
Expand Down Expand Up @@ -75,21 +75,20 @@ When building a new motion, ensure:
- [ ] Financial lever per service (revenue, cost, protect, capacity)
- [ ] Cadence by role (touch sequence)
- [ ] Data sources and regeneration commands documented
- [ ] Cross-reference to existing frameworks (Messaging Framework, Company Type Target Matrix)
- [ ] Cross-reference to existing frameworks (Messaging Framework, Messaging Lookup)

---

## Reference Assets (Use When Available)

| Asset | Path | Use For |
| -------------------------- | ------------------------------------------------------- | ------------------------------------- |
| Messaging Framework | `outbound/Messaging Framework.md` | Persona, channel, financial templates |
| Company Type Target Matrix | `reports/Company Type Target Matrix.md` | Company type → service → phrase |
| Inbound What They Want | `reports/Inbound What They Want.md` | Ask distribution, pain language |
| Messaging Summary | `reports/Messaging Framework Summary and Conclusion.md` | Consolidated conclusions |
| Enterprise Legacy On-Prem | `outbound/Enterprise Legacy On-Prem Sales Motion.md` | Example of role-based motion |
| Deep parse script | `scripts/deep_parse_inbound.py` | Ask, Industry, Title, Pain extraction |
| Company target script | `scripts/company_target_matrix.py` | Company type × Ask × Service |
| Asset | Path | Use For |
| ------------------------- | ---------------------------------------------------- | ------------------------------------- |
| Messaging Framework | `outbound/Messaging Framework.md` | Persona, channel, financial templates |
| Messaging Lookup | `reports/messaging/Messaging Lookup.md` | Ask→Pain, Company Type, Lead→Campaign |
| Inbound What They Want | `reports/inbound/Inbound What They Want.md` | Ask distribution, pain language |
| Enterprise Legacy On-Prem | `outbound/Enterprise Legacy On-Prem Sales Motion.md` | Example of role-based motion |
| Deep parse script | `scripts/deep_parse_inbound.py` | Ask, Industry, Title, Pain extraction |
| Company target script | `scripts/company_target_matrix.py` | Company type × Ask × Service |

---

Expand Down
115 changes: 0 additions & 115 deletions AGENTS.md

This file was deleted.

145 changes: 2 additions & 143 deletions CONTRACT.md
Original file line number Diff line number Diff line change
@@ -1,144 +1,3 @@
# Agent Contract — Messaging Motion Construction
# Agent Contract

**Purpose:** Define inputs, required intermediate artifacts, outputs, and schemas for the messaging/targeting agent.

---

## Inputs

| Input | Type | Required | Description |
|-------|------|----------|-------------|
| **Trigger** | string | Yes | "Find companies to target for cloud migration [region/industry]" or "Create messaging motion for [ICP/industry/service]" |
| **Region / Industry** | string | No | Filter scope (e.g., "Austin", "Healthcare") |
| **Repository assets** | paths | Implicit | Agent reads from repo; see Asset table in AGENTS.md |

---

## Required Intermediate Artifacts

### Artifact 1: Extracted Entities

Produced after Step 2 (Extract).

| Field | Type | Source | Example |
|-------|------|--------|---------|
| companies | string[] | Market tables, vendor lists | ["Company A", "Company B"] |
| personas | string[] | Messaging Framework, Oops | ["IT Director", "VP IT", "CIO"] |
| triggers | string[] | Targeting Strategy | ["AI initiatives", "end-of-life", "compliance"] |
| pain_language | string[] | Inbound, market tables | ["data silos", "AI-ready architecture", "TCO"] |
| service_mapping | object | Company Type Target Matrix | { "SharePoint": "Modern Workplace", "Power BI": "Data & Analytics" } |

### Artifact 2: Filtered Target Candidates

Produced after Step 3 (Cross-Reference & Filter).

| Field | Type | Description |
|-------|------|-------------|
| vendor_list_match | string[] | Companies from vendor lists that appear in CRM |
| microsoft_workload | boolean | Filter: Microsoft collaboration stack only |
| exclude | string[] | Mainframe, SAP RISE-only, Oracle-only |
| priority_signals | string[] | Dynamics, Copilot, Azure adopters |

### Artifact 3: Ask → Service Mapping

Produced when building messaging motion.

| Field | Type | Description |
|-------|------|-------------|
| ask | string | What they want (SharePoint, Power BI, Dynamics, etc.) |
| service | string | Affirma service |
| phrase | string | Copy phrase (e.g., "this SharePoint migration") |

---

## Outputs

### Output 1: Target List (Cloud Migration)

| Column | Type | Required |
|--------|------|----------|
| Company | string | Yes |
| Industry | string | Yes |
| Signal | string | Yes (trigger or fit reason) |
| Priority tier | string | Yes (Tier 1, Tier 2, etc.) |
| Source | string | Yes (cite: market table, CRM, report) |

### Output 2: Role-Based Messaging

| Field | Type | Required |
|-------|------|----------|
| role | string | Champion, Influencer, DM, Stakeholder |
| service_phrase | string | Service-specific (no generic "this investment") |
| financial_lever | string | revenue, cost, protect, or capacity |
| hook | string | Campaign-aligned opener |
| cta | string | Low-pressure call to action |

### Output 3: Citations & Regen

| Field | Type | Required |
|-------|------|----------|
| sources | string[] | Paths/files used |
| regen_commands | string[] | Scripts to reproduce (e.g., `python3 scripts/company_target_matrix.py`) |

---

## Schemas

### Oops.csv (Input Data)

```
Status, Source_Campaign, Primary_Service, Contact, Account, Industry, Job_Title,
Account_Engaged_Count, Is_Multi_Opp, Title_Industry_Engaged, Title_Industry_Won,
Title_Industry_WinRate_Pct, Pattern_Count, Source_Engaged_Count
```

### company_type_service.json (Pattern Output)

```json
{
"company_type": "string",
"service": "string",
"n": 0,
"won": 0,
"win_rate": 0.0
}
```

### Target List Table (Output)

```
| Company | Industry | Signal | Priority | Source |
|---------|----------|--------|----------|--------|
```

### Messaging Record (Output)

```
Role: string
Service phrase: string
Financial lever: string
Hook: string
CTA: string
```

---

## Fallback Rules (Missing Data)

| Missing | Fallback | Label |
|---------|----------|-------|
| No Email | Industry from description | "Add Email for domain inference" |
| No Title | Infer from description | "Inferred" |
| No Win Rates | Inbound volume + Company Type × Ask | "Directional" |
| Small N | Report counts | "Exploratory" |
| No Ask | Use description fallback | "Inferred" |

---

## Validation Checklist

- [ ] All outputs use bullet points, tables, short sentences
- [ ] Service phrase specified (no generic "this investment")
- [ ] Sources cited for each claim
- [ ] Regen commands documented
- [ ] Fallback rules applied and labeled when used
**Canonical:** [agent/CONTRACT.md](agent/CONTRACT.md) — inputs, artifacts, outputs, schemas, asset paths, skills.
54 changes: 54 additions & 0 deletions Company Type Target Matrix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Company Type × Ask × Service — Target Matrix

**Data:** data/Inbound/Inbound.xlsx (550 leads)
**Regenerate:** `python3 scripts/company_target_matrix.py`
**Note:** Add **Email** column to your next CRM export to enable domain-based company inference (e.g., .gov → Government, .edu → Education). Currently uses Industry extracted from description.

---

## Purpose

1. **Infer company type** from email domain (when available) or from description language.
2. **Connect asks to Affirma services** — what they want → which service to message.
3. **Target the right companies** with the right copy.
4. **Use complete thoughts** — full sentences or hooks prospects recognize, not fragments or jargon.

---

## Company Type × Top Asks → Service

| Company Type | Top Asks | Services to Message | Pain phrase (use as hook) |
|--------------|----------|---------------------|---------------------------|
| **Government** | SharePoint, Power BI, Google→M365 | Modern Workplace, Data & Analytics | Most waste comes from systems nobody officially owns anymore—orphan sites, permissions drift. |
| **Healthcare** | SharePoint, Compliance, Dashboard | Modern Workplace, Data & Analytics | Most waste comes from systems nobody officially owns anymore—orphan sites, permissions drift. |
| **Non-Profit** | Dynamics, SharePoint, Migration | CRM, Modern Workplace | Lean teams end up with too many duplicates and systems that create more work. |
| **MSP** | BPO/Helpdesk, Power BI, Support | Infrastructure/BPO, Data & Analytics | Can't keep up with ticket volume and need 24/7 support without hiring. |
| **Construction** | SharePoint, Power Automate | Modern Workplace | Most waste comes from systems nobody officially owns anymore. |
| **Education** | Dynamics, Power BI | CRM, Data & Analytics | Too many duplicates, messy data, and teams that work around the CRM instead of using it. |
| **Financial Services** | SharePoint, Dynamics | Modern Workplace, CRM | Most waste comes from systems nobody officially owns anymore. |
| **Manufacturing** | Dynamics, Guidance | CRM, Modern Workplace | Too many duplicates, messy data, and teams that work around the CRM instead of using it. |
| **Legal** | SharePoint, Ongoing Support | Modern Workplace, Infrastructure | Systems with no clear owner create drift, risk, and wasted time. |
| **Real Estate** | BPO, Dashboard, Dynamics | Infrastructure/BPO, Data & Analytics | Can't keep up with ticket volume and need 24/7 support without hiring. |

---

## Ask → Service → Pain Phrase (complete thoughts for copy)

| What They Ask | Affirma Service | Pain phrase |
|---------------|-----------------|-------------|
| SharePoint (any) | Modern Workplace | Most waste comes from systems nobody officially owns anymore—orphan sites, permissions drift. |
| Power BI, Dashboards | Data & Analytics | Reports take too long to get, or the answers aren't there when you need them. |
| Dynamics, CRM | CRM | Too many duplicates, messy data, and teams that work around the CRM instead of using it. |
| HubSpot, SEO | Marketing Services | Inherited a mess—too many duplicates, workflows not launching, need help setting up. |
| AI, Copilot | AI / Automation | Information overload—where do we even start with AI? |
| BPO, Helpdesk | Infrastructure / BPO | Can't keep up with ticket volume and need 24/7 support without hiring. |
| Google→M365, Tenant, Exchange | Infrastructure | Need to consolidate tenants or move off the file server, but no bandwidth to own it. |

---

## How to Use

1. **Before writing:** Look up company type (or infer from LinkedIn/website). Match to the target matrix.
2. **Choose service:** Based on their ask + company type. Government + SharePoint → Modern Workplace.
3. **Use complete thoughts:** Each pain phrase is a full sentence—use as hook or opening line in copy.
4. **Add Email to export:** When you add the Email column to Inbound.xlsx, re-run the script. Domain-based inference (e.g., cityof*.gov) will improve accuracy.
Loading