Skip to content

[extensions] CRM improvements: crm_ prefix, FTS search, meeting prep, stale detection#189

Merged
justfinethanku merged 2 commits into
NateBJones-Projects:mainfrom
pintomatic:feat/crm-improvements
May 22, 2026
Merged

[extensions] CRM improvements: crm_ prefix, FTS search, meeting prep, stale detection#189
justfinethanku merged 2 commits into
NateBJones-Projects:mainfrom
pintomatic:feat/crm-improvements

Conversation

@pintomatic
Copy link
Copy Markdown
Contributor

Summary

Implements improvements to the Professional CRM extension based on the original proposal in #93:

  • crm_ prefix: Renames all 8 tools to use the crm_ prefix, as agreed by @matthallett1 in the issue thread. Cleaner namespace, consistent with how other extensions could prefix their tools
  • Full-text search: Adds PostgreSQL FTS with GIN indexes on contacts and interactions. crm_search_contacts now returns ranked results via ts_rank. Graceful ILIKE fallback if the RPC function hasn't been deployed yet
  • crm_prep_context (new tool): Meeting prep briefing — aggregates contact profile, recent interactions, open opportunities, pending follow-ups, and relationship health into one call. The "power tool" from the original proposal
  • crm_stale_contacts (new tool): Finds relationships going cold — contacts with no interaction in N days, ordered by staleness. Proactive network maintenance
  • Version bump: 1.0.0 → 1.1.0
  • Contributor credit: Added to metadata.json

These additions come from running a similar system in production (Kernal) with ~400 contacts — the meeting prep and stale detection patterns are the most-used features.

Changes

File What changed
index.ts 8 tools renamed to crm_*, 2 new tools added, FTS search with fallback
schema.sql Generated fts tsvector columns, GIN indexes, crm_search_contacts_fts RPC function
metadata.json Version bump, contributor field, updated date
README.md Updated tool list with new names and descriptions

Test plan

  • Deploy edge function and verify all 10 tools respond
  • Test FTS: crm_search_contacts with multi-word queries returns ranked results
  • Test FTS fallback: works even without the RPC function (ILIKE path)
  • Test crm_prep_context: returns aggregated briefing for a contact with interactions + opportunities
  • Test crm_stale_contacts: returns contacts ordered by days since last contact
  • Verify existing tools (crm_add_contact, crm_log_interaction, etc.) work identically to before

…ng prep, stale detection

Implements improvements from the original proposal (NateBJones-Projects#93):
- Rename all tools to crm_ prefix for namespace clarity (per maintainer agreement)
- Add PostgreSQL full-text search with GIN indexes and ranked results (replaces ILIKE)
- Add crm_prep_context tool for meeting prep briefings
- Add crm_stale_contacts tool for relationship health monitoring
- Add FTS RPC function with graceful ILIKE fallback
- Bump version to 1.1.0
- Add contributor credit

Co-Authored-By: claude-flow <ruv@ruv.net>
@github-actions github-actions Bot added the extension Contribution: curated learning path build label Apr 17, 2026
@github-actions
Copy link
Copy Markdown

Hey @pintomatic — welcome to Open Brain Source! 👋

Thanks for submitting your first PR. The automated review will run shortly and check things like metadata, folder structure, and README completeness. If anything needs fixing, the review comment will tell you exactly what.

Once the automated checks pass, a human admin will review for quality and clarity. Expect a response within a few days.

If you have questions, check out CONTRIBUTING.md or open an issue.

@alanshurafa alanshurafa added area: integrations Review area: integrations/MCP/capture sources review: ready-for-maintainer Community reviewer recommends maintainer review alan-reviewed Reviewed by Alan Shurafa in Community Reviewer role labels May 20, 2026
@alanshurafa
Copy link
Copy Markdown
Collaborator

Thanks for the contribution, and welcome. This is a solid set of improvements to the professional-crm extension — full-text search, meeting prep, and stale-contact detection are genuinely useful additions.

Checked schema.sql: the changes are additive and idempotent — generated fts tsvector columns via ADD COLUMN IF NOT EXISTS, GIN indexes via CREATE INDEX IF NOT EXISTS, and a CREATE OR REPLACE search function. No destructive migration, and the core thoughts table is untouched. The crm_ prefix is applied to the tool names for namespacing — that changes the tool names an existing install exposes, which MCP clients re-discover, so it is a soft break with no data migration.

This is a meaningful rework of a curated extension, so it is the maintainer's call. Recommend maintainer review.

— Alan (community reviewer; non-binding)

@justfinethanku justfinethanku merged commit dd0e700 into NateBJones-Projects:main May 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alan-reviewed Reviewed by Alan Shurafa in Community Reviewer role area: integrations Review area: integrations/MCP/capture sources extension Contribution: curated learning path build review: ready-for-maintainer Community reviewer recommends maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants