Skip to content

Add a local agent-native CRM slice, with research and a draft spec - #3271

Open
jparker2006 wants to merge 1 commit into
mainfrom
cursor/agent-native-crm-5256
Open

jparker2006 wants to merge 1 commit into
mainfrom
cursor/agent-native-crm-5256

Conversation

@jparker2006

Copy link
Copy Markdown
Member

Summary

This adds three pieces for an agent-native CRM:

  • Research notes in docs/research/crm-guide-notes.md, taken from Ampersand's public preview of The Engineer's Guide to CRMs and from the Salesforce, HubSpot, Twenty, Attio, Folk, Pipedrive and Close docs linked there. The printed book was not in hand. The preview is the seven-part field guide at https://www.ampersand.ai/resources/engineers-guide-to-crms.
  • A draft spec in docs/specs/agent-native-crm.md, using the sections from kernel/records.v1.md. ADR 0004 says a live spec is a parent issue. This file is a review copy and says so.
  • A first slice in products/crm: a SQLite store, a JSON command line, and a newline-delimited MCP server. Standard library only, so the Rust workspace gains no crate. No network calls and no secrets.

OpenWiz can use the same model to track users, contributors, partners and leads (a university application, an outside repository). Another agent can point the same tools at its own database.

Key insights

MVP cut

In this pull request:

  • Objects person, company, deal and activity, plus custom objects and fields (text, number, boolean, date, select).
  • Labeled associations, activity log, one-hop context, change history, and an optional revision check so a stale write is refused.
  • External id binding, with no live sync.
  • Command line and MCP tools for create, search, update, associate, log, context and schema.
  • Tests in products/crm/test_crm.py.

Not in this cut: Salesforce or HubSpot clients, OAuth, webhooks, Slack, email, GitHub or X capture, permissions, a UI, and pipelines as their own object. The spec's roadmap orders those.

How to run

python3 -I products/crm/test_crm.py
python3 -I products/crm/crm.py --db /tmp/openwiz-crm.sqlite record-create \
  --object person --set name=Ada --set email=ada@example.com
OPENWIZ_CRM_DB=/tmp/openwiz-crm.sqlite python3 -I products/crm/mcp.py

products/crm/README.md lists every command. Keep a database that holds real people outside the checkout.

What's next

  1. Confirm or rewrite the draft, then move it to a parent issue so it matches ADR 0004.
  2. Offline import fixtures for Salesforce-shaped and HubSpot-shaped exports, still with no network.
  3. Decide whether a deal stage is enough, or whether lists (one person, several processes) are required.
  4. A skill that tells agents to read context and pass if_revision.
  5. Read-only connectors only after an explicit live-read approval.

products/crm is outside the paths the changelog check treats as non-product, and there is no ticket number for a changes/<ticket>.md line. The changelog job will refuse until there is a ticket or an explicit exemption. This pull request does not invent a ticket number.

Open decisions

Collected in the spec's Further Notes: the public name, one database or one per workspace, Python versus a Rust crate after a dependency approval, which lead sources come first, and who approves the first live read.

Open in Web Open in Cursor 

The notes cite the Ampersand CRM guide and the Salesforce, HubSpot, Twenty, Attio, Folk, Pipedrive and Close docs. The draft follows the records template and records the ADR 0004 conflict. The slice is a standard-library SQLite store with a JSON command line and MCP server, covered by local tests and no external calls.

Co-authored-by: Jake Parker <jparker2006@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants