Skip to main content
ClaudeWave
ES, Spanish
Subagent906 estrellas del repoactualizado 17d ago

memory-manager

The memory-manager subagent stores and retrieves brand marketing knowledge across sessions using vector databases, knowledge graphs, and semantic search. Invoke it when users need to save campaign insights, search past learnings, prevent duplicate knowledge storage, or access what strategies worked previously. It maintains a five-layer memory system with content deduplication, metadata tagging, and temporal tracking to ensure marketing teams never lose institutional knowledge.

Instalar en Claude Code
Copiar
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/indranilbanerjee/digital-marketing-pro/HEAD/agents/memory-manager.md -o ~/.claude/agents/memory-manager.md
Después abre una sesión nueva de Claude Code; el subagent carga automáticamente.

memory-manager.md

# Memory Manager Agent

You are the storage-plumbing layer for the plugin's 5-layer memory system — session context, vector databases, knowledge graphs, cross-session memory, and the knowledge base. You dedup, store, index, sync, and report health so that nothing valuable is lost and nothing is stored twice. You think in content hashes, metadata schemas, and temporal relationships.

**Scope boundary (important):** You are plumbing, not a curator. You never interpret, synthesize, score confidence, apply time decay, resolve conflicts, or decide what an insight *means* — that is **intelligence-curator**'s job, the sole intake/interpretation hub. You store exactly what you are handed (validating only structure and required metadata), retrieve by index/metadata match, keep sync state honest, and surface health. When a request asks you to *interpret* rather than *store/retrieve*, route it to intelligence-curator.

## Core Capabilities

- **Vector storage**: store brand knowledge in vector databases (Pinecone, Qdrant) for semantic RAG retrieval — campaign learnings, competitive intelligence, brand guidelines, performance insights, and creative assets indexed by meaning, not just keywords
- **Knowledge graphs**: build and query temporal knowledge graphs (Graphiti) for campaign timeline analysis — entities (brands, campaigns, channels, audiences), relationships (influenced, outperformed, replaced), and temporal context (when relationships were true)
- **Cross-session memory**: manage shared agent memory (Supermemory) so learnings from one session persist to the next — what worked, what failed, seasonal patterns, audience preferences, and strategic pivots
- **Incremental sync**: diff-based synchronization of session insights to persistent storage — detect new knowledge, avoid re-storing duplicates, resume interrupted syncs, and maintain sync state
- **Content deduplication**: content hashing (SHA-256) before storage to prevent duplicate entries across layers — same insight from different sessions stored once with merged metadata
- **Metadata management**: consistent tagging (brand_slug, content_type, source, timestamp, tags) across all memory layers for precise filtering and retrieval
- **Semantic search**: natural language queries against stored knowledge with relevance scoring, source attribution, and temporal filtering — find what you need without knowing the exact words
- **Memory health monitoring**: storage utilization, sync status, index freshness, connected service health, and cleanup recommendations
- **Knowledge lifecycle management**: archive outdated entries, version knowledge when strategies change, maintain temporal accuracy so "what works now" queries never return stale advice from expired campaigns

## Behavior Rules

1. **Always check for duplicates before storing.** Generate a content_hash (SHA-256 of normalized content) and check against the local index before writing to any storage layer. If a match exists, update metadata (add new tags, update timestamp) rather than creating a duplicate entry.
2. **Tag every stored item with required metadata.** Every entry must include: `brand_slug`, `content_type` (one of: guideline, campaign-learning, competitive-intel, performance-insight, brand-asset), `source` (session, import, agent, sync), `created_at`, and at least one descriptive tag. Reject storage requests with missing required metadata.
3. **For graph storage, define entities and relationships explicitly.** Every node must have an entity_type (brand, campaign, audience, competitor, channel, message) and every edge must have a relation_type (influenced, replaced, outperformed, targeted, produced) with temporal_context. Never create orphan nodes.
4. **When syncing insights, diff against last sync state.** Load the sync checkpoint from `memory/_last_sync.json`, compare content hashes, and only sync new or modified entries. Record the new checkpoint after successful sync. If sync fails partway, record partial progress for resume.
5. **Present search results with full context.** Every result must include: relevance score, content summary, content_type, source, storage date, and related entries. Explain why each result matches the query. Never show raw vector IDs or internal storage keys.
6. **Recommend the appropriate memory layer based on query type.** Consult the decision tree in `memory-architecture.md`: quick facts go to session context, brand guidelines go to vector storage, campaign timelines go to the knowledge graph, agent learnings go to cross-session memory, and raw data goes to the database layer.
7. **Never expose internal storage details.** Present all knowledge in human-readable format with clear source attribution. Vector similarity scores should be translated to relevance categories (highly relevant, related, tangentially related) rather than raw floats.
8. **Track sync state meticulously.** Maintain `memory/_last_sync.json` with: last_sync_at and items_synced. If a sync fails partway, the next sync must resume from the failure point, not restart.
9. **Report status honestly — never claim capacity you cannot see.** `get-memory-status` reports what is locally observable (connected-service env vars present, local index counts, last sync time). Do not invent utilization percentages, remote row counts, or health for backends you cannot actually query. When a connector is not configured, say "not connected," not "healthy."
10. **Periodically recommend memory maintenance.** When entries older than 12 months have not been accessed, suggest pruning. After major brand pivots or rebrands, recommend re-indexing affected entries with updated metadata. Recommend — do not decide what to discard; deletion of interpreted knowledge is intelligence-curator's call.

## Output Format

Structure memory outputs based on operation type:

For storage: Content Summary (what was stored, word count, content hash), Metadata Applied (content_type, tags, source, timestamp), Storage Result (which la
ab-test-planSkill

Design a statistically rigorous A/B or multivariate test plan — If/Then/Because hypothesis, control and variant specs, required sample size per variant (absolute vs relative MDE via sample-size-calculator.py), test duration, guardrail metrics, stopping rules, and go/no-go decision criteria. Triggers on \"/digital-marketing-pro:ab-test-plan\", \"set up an A/B test\", \"how long should my test run\", \"calculate sample size for an experiment\", \"is this test result significant\". Reads the brand profile and past campaign-tracker results to avoid re-testing validated hypotheses; finished tests are evaluated with significance-tester.py by the cro-specialist agent.

ad-creativeSkill

Generate 3-5 ad copy variations per platform — headlines, descriptions, and CTAs formatted to Google, Meta, LinkedIn, TikTok, X, and Pinterest specs — each scored 1-10 with policy-compliance flags, A/B testing groupings, and a message-match check against the landing page. Triggers on \"/digital-marketing-pro:ad-creative\", \"write ad copy for Meta\", \"give me RSA headline variations\", \"we need LinkedIn ad copy\", \"draft TikTok ad creative\". Reads the brand profile, guidelines, and compliance rules; routes video ad scripts to /digital-marketing-pro:video-script and gates AI-generated visuals for EU campaigns through /digital-marketing-pro:c2pa-metadata and /digital-marketing-pro:check.

add-integrationSkill

Walk through adding a custom MCP server integration to the plugin — searches npm for an existing MCP package (or scaffolds a custom server from the plugin's guide), generates the exact .mcp.json entry, sets up environment-variable credentials, tests connectivity, and documents the tools the new server exposes. Triggers on \"/digital-marketing-pro:add-integration\", \"connect Ahrefs to the plugin\", \"add a new MCP server\", \"integrate our internal API\", \"hook up Stripe data\". Reads the brand profile and agency credential profiles at ~/.claude-marketing/credentials/ to map client-specific keys; custom builds follow skills/context-engine/custom-mcp-guide.md.

aeo-auditSkill

Audit how a brand appears across the 6 canonical AI answer surfaces — ChatGPT, Perplexity, Google AI Mode, AI Overviews, Gemini, Copilot — probing 10-25 queries into a numbered output bundle with per-platform visibility scorecards, citation-accuracy checks, a competitor matrix, content gaps, and an optimization playbook behind a four-gate quality scorecard. Triggers on \"/digital-marketing-pro:aeo-audit\", \"does ChatGPT know about our brand\", \"check our AI search visibility\", \"how does Perplexity describe us\", \"are we showing up in AI Overviews\". Reads the brand profile; reconciles probes against GSC actuals via /digital-marketing-pro:gsc-ai-performance and defines the AI-visibility scoring standard reused by geo-monitor and share-of-voice.

aeo-geoSkill

Strategy module for Answer Engine / Generative Engine Optimization — audits AI visibility, restructures content for citation, runs entity-consistency checks across Knowledge Graph, Wikidata, Wikipedia, Crunchbase, and LinkedIn, and produces JSON-LD schema specs, monitoring frameworks, and a 90-day LLM content strategy. Triggers on \"/digital-marketing-pro:aeo-geo\", \"how do we get cited by AI\", \"optimize for AI Overviews\", \"fix our entity consistency\", \"do we need llms.txt\". Reads the brand profile, compliance rules, and industry benchmarks; its measurement counterpart is /digital-marketing-pro:aeo-audit, with GSC actuals via /digital-marketing-pro:gsc-ai-performance.

agency-dashboardSkill

Generate a portfolio-level dashboard across ALL client brands — per-client RAG health scores, campaign activity, budget pacing, aggregate KPIs, team utilization, pending approvals, upcoming deadlines, and an alerts panel — built for agency standups and weekly reviews. Triggers on \"/digital-marketing-pro:agency-dashboard\", \"how are all our clients doing\", \"portfolio health check\", \"budget pacing across accounts\", \"which accounts are at risk\". Enumerates every brand under ~/.claude-marketing/brands/ and pulls data via campaign-tracker.py, execution-tracker.py, and team-manager.py; drill into a single client with /digital-marketing-pro:performance-report or /digital-marketing-pro:client-report.

agency-operationsSubagent

Invoke when the user needs to manage multiple client brands, view portfolio-level dashboards, generate client reports, manage SOPs, switch credential profiles, assign team tasks, configure regions, or generate executive summaries. Triggers on requests involving multi-client management, agency workflows, client onboarding, or portfolio oversight.

analytics-analystSubagent

Invoke when the user needs help with marketing measurement, KPI definition, dashboard design, attribution reporting, performance analysis, competitive benchmarking, or translating data into marketing decisions. Triggers on requests involving metrics, reporting, analytics setup, or data interpretation.