mango-brain 3.3.2__tar.gz → 3.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mango_brain-3.3.2 → mango_brain-3.3.3}/PKG-INFO +1 -1
- {mango_brain-3.3.2 → mango_brain-3.3.3}/mango_brain.egg-info/PKG-INFO +1 -1
- {mango_brain-3.3.2 → mango_brain-3.3.3}/pyproject.toml +1 -1
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/cli.py +7 -0
- mango_brain-3.3.3/server/rules/mangobrain-remember.md +158 -0
- mango_brain-3.3.3/server/rules/mangobrain-workflow.md +103 -0
- mango_brain-3.3.3/server/work/rules/mangobrain-remember-work.md +79 -0
- mango_brain-3.3.3/server/work/rules/mangobrain-workflow-work.md +48 -0
- mango_brain-3.3.3/server/work/templates/CLAUDE.md +118 -0
- mango_brain-3.3.3/server/work/templates/rules/audience.md +21 -0
- mango_brain-3.3.3/server/work/templates/rules/brand.md +20 -0
- mango_brain-3.3.3/server/work/templates/rules/channels.md +24 -0
- mango_brain-3.3.3/server/work/templates/rules/product.md +19 -0
- mango_brain-3.3.3/server/work/templates/rules/strategy.md +27 -0
- mango_brain-3.3.3/server/work/templates/rules/tone.md +21 -0
- mango_brain-3.3.2/server/rules/mangobrain-remember.md +0 -146
- mango_brain-3.3.2/server/rules/mangobrain-workflow.md +0 -98
- mango_brain-3.3.2/server/work/rules/mangobrain-remember-work.md +0 -67
- mango_brain-3.3.2/server/work/rules/mangobrain-workflow-work.md +0 -43
- mango_brain-3.3.2/server/work/templates/CLAUDE.md +0 -118
- mango_brain-3.3.2/server/work/templates/rules/audience.md +0 -21
- mango_brain-3.3.2/server/work/templates/rules/brand.md +0 -20
- mango_brain-3.3.2/server/work/templates/rules/channels.md +0 -24
- mango_brain-3.3.2/server/work/templates/rules/product.md +0 -19
- mango_brain-3.3.2/server/work/templates/rules/strategy.md +0 -27
- mango_brain-3.3.2/server/work/templates/rules/tone.md +0 -21
- {mango_brain-3.3.2 → mango_brain-3.3.3}/LICENSE +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/README.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/mango_brain.egg-info/SOURCES.txt +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/mango_brain.egg-info/dependency_links.txt +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/mango_brain.egg-info/entry_points.txt +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/mango_brain.egg-info/requires.txt +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/mango_brain.egg-info/top_level.txt +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/__init__.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/__main__.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/agents/analyzer.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/agents/executor.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/agents/mem-manager.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/agents/verifier.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/api_routes.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/config.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/dashboard_dist/assets/index-DmI5d2FU.css +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/dashboard_dist/assets/index-DojB8F-G.js +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/dashboard_dist/favicon.svg +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/dashboard_dist/icons.svg +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/dashboard_dist/index.html +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/dashboard_dist/logo.svg +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/database.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/decay.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/embeddings.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/graph.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/jsonl_parser.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/main.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/mangobrain.default.toml +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/mcp_tools.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/models.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/prompts/init/01-doc-base.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/prompts/init/02-code-base.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/prompts/init/03-event-base.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/prompts/init/04-chat-base.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/prompts/init/05-elaborate-base.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/prompts/reference/memory-definition.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/retrieval.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/skills/brain-init/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/skills/discuss/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/skills/elaborate/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/skills/health-check/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/skills/memorize/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/skills/smoke-test/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/skills/task/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/agents/creator.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/agents/mem-manager.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/agents/researcher.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/agents/reviewer.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/prompts/init-work.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/prompts/memory-definition.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/skills/brain-init-work/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/skills/brief/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/skills/create/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/skills/elaborate-work/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/skills/health-check-work/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/skills/memorize-work/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/server/work/skills/smoke-test-work/SKILL.md +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/setup.cfg +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/tests/test_core.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/tests/test_init.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/tests/test_phase2.py +0 -0
- {mango_brain-3.3.2 → mango_brain-3.3.3}/tests/test_setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mango-brain
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.3
|
|
4
4
|
Summary: The learning layer for Claude Code — persistent associative memory + development workflow. Claude Code gets smarter the longer you use it.
|
|
5
5
|
Author-email: Federico Anastasi <federico.anastasi@outlook.com>
|
|
6
6
|
License: MIT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mango-brain
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.3
|
|
4
4
|
Summary: The learning layer for Claude Code — persistent associative memory + development workflow. Claude Code gets smarter the longer you use it.
|
|
5
5
|
Author-email: Federico Anastasi <federico.anastasi@outlook.com>
|
|
6
6
|
License: MIT
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "mango-brain"
|
|
7
|
-
version = "3.3.
|
|
7
|
+
version = "3.3.3"
|
|
8
8
|
description = "The learning layer for Claude Code — persistent associative memory + development workflow. Claude Code gets smarter the longer you use it."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -683,10 +683,17 @@ apply_elaboration, reinforce, decay, stats, diagnose, list_memories, sync_codeba
|
|
|
683
683
|
|
|
684
684
|
def main() -> None:
|
|
685
685
|
"""CLI entry point."""
|
|
686
|
+
from importlib.metadata import version as pkg_version
|
|
687
|
+
|
|
686
688
|
parser = argparse.ArgumentParser(
|
|
687
689
|
prog="mangobrain",
|
|
688
690
|
description="MangoBrain — Persistent memory + workflow system for Claude Code",
|
|
689
691
|
)
|
|
692
|
+
try:
|
|
693
|
+
ver = pkg_version("mango-brain")
|
|
694
|
+
except Exception:
|
|
695
|
+
ver = "dev"
|
|
696
|
+
parser.add_argument("--version", "-V", action="version", version=f"%(prog)s {ver}")
|
|
690
697
|
sub = parser.add_subparsers(dest="command")
|
|
691
698
|
|
|
692
699
|
# serve
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# MangoBrain — Remember Query Strategy
|
|
2
|
+
|
|
3
|
+
You have access to the `remember` MCP tool to retrieve relevant memories from the project.
|
|
4
|
+
Use it often, not just at the start of a task. Memories contain gotchas, patterns, decisions, and references that code alone doesn't tell you.
|
|
5
|
+
|
|
6
|
+
## Query Language
|
|
7
|
+
|
|
8
|
+
**All remember() queries MUST use English keywords**, regardless of session language.
|
|
9
|
+
Memories are stored in English — queries in other languages degrade retrieval by ~15-20%.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
GOOD: remember(query="formatPrice cents euros conversion gotcha", ...)
|
|
13
|
+
BAD: remember(query="formattazione prezzi conversione centesimi", ...)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Always translate concepts before querying. The conversation stays in the user's language, but queries go to the DB in English.
|
|
17
|
+
|
|
18
|
+
## When to use remember
|
|
19
|
+
|
|
20
|
+
- **Task/session start**: broad context (see multi-query strategy below)
|
|
21
|
+
- **Before touching an unfamiliar area**: targeted quick query
|
|
22
|
+
- **When you find a bug**: quick query to check for known patterns
|
|
23
|
+
- **Before creating a component/utility**: quick query to verify if something similar already exists
|
|
24
|
+
- **When making an architectural decision**: quick query for precedents
|
|
25
|
+
- **End of task**: remember(mode="recent") to check WIP and context for mem-manager
|
|
26
|
+
|
|
27
|
+
## Multi-query strategy (task start)
|
|
28
|
+
|
|
29
|
+
Do NOT make a single generic query. Use **1 deep + N quick**:
|
|
30
|
+
|
|
31
|
+
### 1. Read the task and identify 2-4 distinct technical areas
|
|
32
|
+
|
|
33
|
+
### 2. 1x deep — big picture
|
|
34
|
+
```
|
|
35
|
+
remember(query="[max 10 keywords from the task]", mode="deep", project="{PROJECT}")
|
|
36
|
+
```
|
|
37
|
+
Captures: cross-cutting patterns, conventions, recurring gotchas. ~20 results.
|
|
38
|
+
|
|
39
|
+
### 3. 2-4x quick — one per technical area
|
|
40
|
+
```
|
|
41
|
+
remember(query="[specific names: components, hooks, services, files]", mode="quick", project="{PROJECT}")
|
|
42
|
+
```
|
|
43
|
+
Captures: specific details per cluster. ~6 results each.
|
|
44
|
+
|
|
45
|
+
### Why this works
|
|
46
|
+
Each query pulls from a different cluster in the associative graph. A single generic deep query hits 1-2 clusters and misses the rest. 3 targeted quick queries cover 3 different clusters.
|
|
47
|
+
|
|
48
|
+
## How to formulate queries
|
|
49
|
+
|
|
50
|
+
### Keywords > natural language
|
|
51
|
+
```
|
|
52
|
+
GOOD: "formatPrice cents euros conversion gotcha"
|
|
53
|
+
BAD: "how does price formatting work in the system"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Always use proper names
|
|
57
|
+
Use component names, hooks, services, files, utilities when you know them:
|
|
58
|
+
```
|
|
59
|
+
GOOD: "useStripeConnect ConnectAccountManagement onboarding embedded"
|
|
60
|
+
BAD: "the Stripe payment onboarding system"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Mix technical + domain
|
|
64
|
+
```
|
|
65
|
+
GOOD: "booking wizard localStorage state persistence gotcha"
|
|
66
|
+
BAD: "issues with the booking wizard"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Quick vs Deep vs Recent
|
|
70
|
+
|
|
71
|
+
| Mode | Results | Graph | When |
|
|
72
|
+
|------|---------|-------|------|
|
|
73
|
+
| deep | ~20 | full (alpha=0.3) | Task start, big picture |
|
|
74
|
+
| quick | ~6 | light (alpha=0.15) | Mid-task, specific areas, lookup |
|
|
75
|
+
| recent | ~15 + neighbors | by time | Session start, understand WIP |
|
|
76
|
+
|
|
77
|
+
## Work context strategy
|
|
78
|
+
|
|
79
|
+
### Session start (always)
|
|
80
|
+
```
|
|
81
|
+
remember(mode="recent", project="{PROJECT}", limit=15, k_neighbors=2)
|
|
82
|
+
```
|
|
83
|
+
Returns: last 15 memories + graph-connected context. Understand WIP, blockers, recent decisions.
|
|
84
|
+
|
|
85
|
+
### Mid-task: about to touch a new area
|
|
86
|
+
```
|
|
87
|
+
remember(query="[file names, components, concepts of the area]", mode="quick", project="{PROJECT}")
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Mid-task: found a bug
|
|
91
|
+
```
|
|
92
|
+
remember(query="[bug keywords + area + pattern]", mode="quick", project="{PROJECT}")
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### End of task / pre-mem-manager
|
|
96
|
+
```
|
|
97
|
+
remember(mode="recent", project="{PROJECT}")
|
|
98
|
+
```
|
|
99
|
+
Check WIP and context to pass to mem-manager for sync.
|
|
100
|
+
|
|
101
|
+
## Real examples
|
|
102
|
+
|
|
103
|
+
### Task: "Fix wrong price in booking wizard"
|
|
104
|
+
```
|
|
105
|
+
deep: "booking wizard UX fix price bug mobile layout"
|
|
106
|
+
quick: "formatPrice cents euros conversion serializeBooking gotcha"
|
|
107
|
+
quick: "OrderWizard steps PaymentStep SummaryStep"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Task: "Refactor profile + shared payments"
|
|
111
|
+
```
|
|
112
|
+
deep: "account profile refactor shared components owner teacher payments Stripe"
|
|
113
|
+
quick: "ProfiloPage TeacherAccountPage structure password removal"
|
|
114
|
+
quick: "Stripe Connect onboarding useStripeConnect ConnectAccountManagement"
|
|
115
|
+
quick: "User model schema getMe provider stripeAccountId Prisma"
|
|
116
|
+
quick: "Google Calendar routes sync disconnect auth calendarSyncJob"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Mid-task: about to touch the email system
|
|
120
|
+
```
|
|
121
|
+
quick: "email Resend templates transactional React Email service"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Mid-task: found a price bug
|
|
125
|
+
```
|
|
126
|
+
quick: "price double-division cents euros formatPrice formatMoneyValue"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Generic session start
|
|
130
|
+
```
|
|
131
|
+
recent: limit=15, k_neighbors=2
|
|
132
|
+
deep: "project overview architecture current state WIP"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## How to interpret results
|
|
136
|
+
|
|
137
|
+
Each memory returned by `remember` has:
|
|
138
|
+
- **type**: episodic (specific event, dated), semantic (fact/architecture, stable), procedural (how-to, instructions)
|
|
139
|
+
- **tags**: thematic cluster (bug, gotcha, convention, reference, pattern, decision, state, wip...)
|
|
140
|
+
- **relevance score**: semantic proximity to query (>0.7 high, 0.4-0.7 medium, <0.4 low)
|
|
141
|
+
- **file_path**: if present, the file it refers to — verify it still exists before trusting it
|
|
142
|
+
- **age**: old episodic memories may be stale, semantic ones stay valid longer
|
|
143
|
+
|
|
144
|
+
### How to weigh memories by tag
|
|
145
|
+
|
|
146
|
+
| Tag | Priority | How to use |
|
|
147
|
+
|-----|----------|------------|
|
|
148
|
+
| **gotcha**, **bug** | High | Warnings from past experience. Read carefully before touching that area. |
|
|
149
|
+
| **convention**, **pattern** | High | Follow them unless current code explicitly contradicts them. |
|
|
150
|
+
| **reference** | Medium | Point to utilities/hooks/services. Verify they still exist before using. |
|
|
151
|
+
| **decision** | Medium | Contain the WHY. Respect the decision or discuss with user if you want to change it. |
|
|
152
|
+
| **state**, **wip** | Context | Inform about ongoing work. Most recent ones are most relevant. |
|
|
153
|
+
|
|
154
|
+
### Stale memory signals
|
|
155
|
+
|
|
156
|
+
- Memory says "file X uses pattern Y" but code shows otherwise → flag as potentially stale
|
|
157
|
+
- Old episodic memory (months) about an area that was rewritten → probably no longer relevant
|
|
158
|
+
- Memory with file_path that no longer exists → file was renamed or removed
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# MangoBrain — Workflow Integration
|
|
2
|
+
|
|
3
|
+
MangoBrain provides persistent associative memory across Claude Code sessions. This rule describes how and when to use it in daily workflow.
|
|
4
|
+
|
|
5
|
+
## Server
|
|
6
|
+
|
|
7
|
+
MangoBrain requires the server to be running. If the user asks to start it or if MCP tools are not responding:
|
|
8
|
+
```
|
|
9
|
+
mangobrain serve --api # start server + dashboard (http://localhost:3101)
|
|
10
|
+
```
|
|
11
|
+
Run it in the background. If the server is already running, no need to restart.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
MangoBrain is not a file to read at the start. It's an active retrieval system: ask for what you need, when you need it. Memories contain past bugs, architectural decisions, patterns, gotchas, references to utilities and components — knowledge that code alone doesn't communicate.
|
|
16
|
+
|
|
17
|
+
## Query Language
|
|
18
|
+
|
|
19
|
+
**All remember() queries MUST use English keywords**, regardless of session language.
|
|
20
|
+
Memories are stored in English — queries in other languages degrade retrieval by ~15-20%. The conversation stays in the user's language, but queries go to the DB in English.
|
|
21
|
+
|
|
22
|
+
## Integration with /discuss
|
|
23
|
+
|
|
24
|
+
**INTAKE** (start of discussion):
|
|
25
|
+
1. `remember(mode="recent")` — recent context, WIP, decisions
|
|
26
|
+
2. Identify 2-3 technical areas of the topic
|
|
27
|
+
3. `remember(mode="deep", query="[topic in max 10 keywords]")` — big picture
|
|
28
|
+
4. 1-2x `remember(mode="quick", query="[specific names per area]")` — targeted details
|
|
29
|
+
5. Show relevant memories to the user as context
|
|
30
|
+
|
|
31
|
+
**EXPLORE** (code analysis):
|
|
32
|
+
- The analyzer explores the code, enriched by memory context
|
|
33
|
+
- If an unexplored area emerges, do a quick query before responding
|
|
34
|
+
|
|
35
|
+
**BRAINSTORM** (discussion):
|
|
36
|
+
- Memories inform the brainstorm:
|
|
37
|
+
- Past bugs in the same area: "careful, last time..."
|
|
38
|
+
- Architectural decisions: "this was decided because..."
|
|
39
|
+
- Consolidated patterns: "the pattern used elsewhere is..."
|
|
40
|
+
|
|
41
|
+
## Integration with /task
|
|
42
|
+
|
|
43
|
+
**ANALYZE** (task start):
|
|
44
|
+
1. `remember(mode="recent")` — WIP, context
|
|
45
|
+
2. Multi-query strategy (1 deep + N quick) — see mangobrain-remember.md
|
|
46
|
+
3. Memories guide the analysis: you already know gotchas, patterns, available utilities
|
|
47
|
+
|
|
48
|
+
**Mid-task** (during development):
|
|
49
|
+
- Before touching a new area: quick query
|
|
50
|
+
- When you find a bug: quick query for known patterns
|
|
51
|
+
- Before creating a component: quick query to check if something similar exists
|
|
52
|
+
|
|
53
|
+
**CLOSE** (end of task):
|
|
54
|
+
The main orchestrator spawns the **mem-manager** as a sub-agent with:
|
|
55
|
+
- Summary of work done
|
|
56
|
+
- List of modified files (git diff)
|
|
57
|
+
- Decisions made
|
|
58
|
+
- WIP/blockers
|
|
59
|
+
|
|
60
|
+
The mem-manager autonomously:
|
|
61
|
+
1. Creates memories for significant work (memorize)
|
|
62
|
+
2. Syncs changed files with existing memories (sync_codebase + update_memory)
|
|
63
|
+
3. Records WIP if present (memorize with tags "state", "wip")
|
|
64
|
+
|
|
65
|
+
## Free sessions (without /task)
|
|
66
|
+
|
|
67
|
+
For sessions without /task (discussions, explorations, quick fixes):
|
|
68
|
+
- Use `remember` during the session as described above
|
|
69
|
+
- At end of session, use **/memorize** to sync work to memory
|
|
70
|
+
- /memorize prepares a summary and spawns the mem-manager
|
|
71
|
+
|
|
72
|
+
## Periodic maintenance
|
|
73
|
+
|
|
74
|
+
| Activity | Frequency | Skill | What it does |
|
|
75
|
+
|----------|-----------|-------|--------------|
|
|
76
|
+
| Elaboration | Weekly | /elaborate | Consolidates, creates edges, abstractions, deprecates duplicates |
|
|
77
|
+
| Health check | Monthly | /health-check | Diagnosis of structure + content, targeted fixes |
|
|
78
|
+
| Smoke test | Post-init, post-elaboration | /smoke-test | Verifies retrieval quality with test queries |
|
|
79
|
+
|
|
80
|
+
## The mem-manager agent
|
|
81
|
+
|
|
82
|
+
The mem-manager is a specialized sub-agent for memory management. It's not interactive — it's spawned by main with precise context and operates autonomously.
|
|
83
|
+
|
|
84
|
+
**What it does:**
|
|
85
|
+
- Creates atomic memories (2-5 lines, English, self-contained)
|
|
86
|
+
- Classifies: episodic (events), semantic (facts), procedural (how-to)
|
|
87
|
+
- Tags: 3-6 lowercase tags
|
|
88
|
+
- Adds relationships between memories (relates_to, depends_on, caused_by)
|
|
89
|
+
- Syncs changed files with existing memories
|
|
90
|
+
- Records WIP for the next session
|
|
91
|
+
|
|
92
|
+
**What it does NOT do:**
|
|
93
|
+
- Does not interact with the user
|
|
94
|
+
- Does not make architectural decisions
|
|
95
|
+
|
|
96
|
+
## When NOT to use memory
|
|
97
|
+
|
|
98
|
+
- **Purely mechanical tasks**: "rename this variable", "add an import"
|
|
99
|
+
- **One-line fixes**: if the fix is obvious and there's no lesson to learn
|
|
100
|
+
- **Routine operations**: npm install, docker restart, git merge
|
|
101
|
+
- **When context is entirely in the task**: if the task is self-contained and doesn't touch complex areas
|
|
102
|
+
|
|
103
|
+
The rule: if the work doesn't produce reusable knowledge, it doesn't need to be memorized.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# MangoBrain Work — Query Strategy
|
|
2
|
+
|
|
3
|
+
You have access to the `remember` MCP tool to retrieve information from the project.
|
|
4
|
+
Use it often. Memory contains brand decisions, feedback, patterns, target insights, and references that documents alone don't communicate.
|
|
5
|
+
|
|
6
|
+
## When to use remember
|
|
7
|
+
|
|
8
|
+
- **Session start**: recent context + project overview
|
|
9
|
+
- **Before creating content**: query brand, tone, audience for that channel
|
|
10
|
+
- **When the user asks something new**: check for past decisions
|
|
11
|
+
- **When the user gives feedback**: check if it's a pattern (have they said the same thing before?)
|
|
12
|
+
- **End of session**: `remember(mode="recent")` to confirm what to save
|
|
13
|
+
|
|
14
|
+
## Multi-query strategy (session start)
|
|
15
|
+
|
|
16
|
+
### 1. Recent — where we left off
|
|
17
|
+
```
|
|
18
|
+
remember(mode="recent", project="{PROJECT}", limit=10, k_neighbors=2)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 2. Deep — broad context on the topic
|
|
22
|
+
```
|
|
23
|
+
remember(query="[5-10 keywords from the requested topic]", mode="deep", project="{PROJECT}")
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 3. Quick — specific areas
|
|
27
|
+
```
|
|
28
|
+
remember(query="[brand tone voice guidelines]", mode="quick", project="{PROJECT}")
|
|
29
|
+
remember(query="[Instagram format carousel content rules]", mode="quick", project="{PROJECT}")
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Query Language
|
|
33
|
+
|
|
34
|
+
**All remember() queries MUST use English keywords**, regardless of session language.
|
|
35
|
+
Memories are stored in English — queries in other languages degrade retrieval by ~15-20%.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
GOOD: remember(query="Instagram post engagement CTA caption", ...)
|
|
39
|
+
BAD: remember(query="post Instagram coinvolgimento didascalia", ...)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Always translate concepts before querying. The conversation stays in the user's language, but queries go to the DB in English.
|
|
43
|
+
|
|
44
|
+
## How to formulate queries
|
|
45
|
+
|
|
46
|
+
### Keywords > natural language
|
|
47
|
+
```
|
|
48
|
+
GOOD: "Instagram carousel CTA engagement caption hashtags"
|
|
49
|
+
BAD: "how should I write Instagram posts"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Domain proper names
|
|
53
|
+
```
|
|
54
|
+
GOOD: "target musician band rehearsal studio booking"
|
|
55
|
+
BAD: "our target audience"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Mix area + specific
|
|
59
|
+
```
|
|
60
|
+
GOOD: "competitor pricing studio booking platform market"
|
|
61
|
+
BAD: "competitive analysis"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Cross-project (if available)
|
|
65
|
+
|
|
66
|
+
If the project has an associated Code memory, you can pull product information:
|
|
67
|
+
```
|
|
68
|
+
remember(query="feature booking user flow value proposition", project="{CODE_PROJECT}", mode="quick")
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**RULE**: always translate to non-technical language before using or showing this information to the user.
|
|
72
|
+
|
|
73
|
+
## Quick vs Deep vs Recent
|
|
74
|
+
|
|
75
|
+
| Mode | Results | When |
|
|
76
|
+
|------|---------|------|
|
|
77
|
+
| deep | ~20 | Session start, strategy, broad analysis |
|
|
78
|
+
| quick | ~6 | Mid-session, specific area, quick lookup |
|
|
79
|
+
| recent | ~15 | Session start, understand WIP and state |
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# MangoBrain Work — Workflow
|
|
2
|
+
|
|
3
|
+
MangoBrain provides persistent memory across sessions. This rule describes how to use it in daily workflow.
|
|
4
|
+
|
|
5
|
+
## Principle
|
|
6
|
+
|
|
7
|
+
Memory is not a file to consult. It's an active system: ask for what you need, when you need it. It contains brand decisions, user feedback, target insights, content patterns, past mistakes — knowledge that documents alone don't transmit.
|
|
8
|
+
|
|
9
|
+
## Query Language
|
|
10
|
+
|
|
11
|
+
**All remember() queries MUST use English keywords**, regardless of session language.
|
|
12
|
+
Memories are stored in English — queries in other languages degrade retrieval by ~15-20%. The conversation stays in the user's language, but queries go to the DB in English.
|
|
13
|
+
|
|
14
|
+
## Integration with /brief
|
|
15
|
+
|
|
16
|
+
**INTAKE**: remember recent + deep + quick → full context before asking questions
|
|
17
|
+
**CLARIFICATION**: use context to NOT ask things you already know
|
|
18
|
+
**MATERIAL EXPLORATION**: search documents AND memory
|
|
19
|
+
**BRIEF**: the brief is informed by project history
|
|
20
|
+
|
|
21
|
+
## Integration with /create
|
|
22
|
+
|
|
23
|
+
**RESEARCH**: the Researcher pulls from memory for brand, tone, audience, past content
|
|
24
|
+
**CREATION**: the Creator receives pre-digested context (does not query)
|
|
25
|
+
**REVIEW**: the Reviewer compares against past decisions and historical feedback
|
|
26
|
+
**CLOSE**: the Mem-manager saves new decisions, feedback, patterns
|
|
27
|
+
|
|
28
|
+
## Free sessions
|
|
29
|
+
|
|
30
|
+
For sessions without /create (brainstorm, analysis, strategy):
|
|
31
|
+
- Use `remember` during the session
|
|
32
|
+
- At end of session: `/memorize-work`
|
|
33
|
+
|
|
34
|
+
## What to memorize and what not to
|
|
35
|
+
|
|
36
|
+
### YES — produces reusable knowledge
|
|
37
|
+
- Brand decision ("we use teal as primary color")
|
|
38
|
+
- User feedback ("the tone was too formal, prefers casual")
|
|
39
|
+
- Target insight ("musicians under 25 prefer Reels over static posts")
|
|
40
|
+
- Content pattern ("carousels with a question in the title perform better")
|
|
41
|
+
- Strategic choice ("for launch we focus on Instagram + TikTok, no LinkedIn")
|
|
42
|
+
- Mistake not to repeat ("the last CTA was too aggressive")
|
|
43
|
+
|
|
44
|
+
### NO — not worth memorizing
|
|
45
|
+
- Discarded drafts and intermediate iterations
|
|
46
|
+
- Information already in rule files (those are auto-loaded every session)
|
|
47
|
+
- Generic facts not specific to the project
|
|
48
|
+
- Content already produced (the file exists, no need to duplicate it in memory)
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# {PROJECT_NAME} — Work
|
|
2
|
+
|
|
3
|
+
## The project
|
|
4
|
+
{PRODUCT_DESCRIPTION}
|
|
5
|
+
|
|
6
|
+
## Who you are
|
|
7
|
+
You are the creative and strategic partner for this project. You are not a generic assistant — you know the brand, the product, the audience, and the history behind every decision. You use this knowledge to produce work of increasing quality over time.
|
|
8
|
+
|
|
9
|
+
## What you do here
|
|
10
|
+
- Marketing strategy and positioning
|
|
11
|
+
- Social content (copy, visuals, video)
|
|
12
|
+
- Editorial plans and publication calendars
|
|
13
|
+
- Strategic documents (business plan, pitch, budget, analysis)
|
|
14
|
+
- Brand identity and guidelines
|
|
15
|
+
- Competitor and market research
|
|
16
|
+
- Presentations and promotional materials
|
|
17
|
+
- Video and motion graphics (Remotion)
|
|
18
|
+
|
|
19
|
+
## How to work
|
|
20
|
+
|
|
21
|
+
### Main workflow
|
|
22
|
+
- `/brief` — Intake. Gather context from memory, explore materials, produce a structured brief
|
|
23
|
+
- `/create` — Produce. Researcher → Creator → Reviewer → Mem-manager. Ready output
|
|
24
|
+
- `/memorize-work` — End of session. Save decisions and work done to memory
|
|
25
|
+
|
|
26
|
+
### Memory maintenance
|
|
27
|
+
- `/elaborate-work` — Weekly. Consolidate memory, build connections
|
|
28
|
+
- `/health-check-work` — Monthly. Diagnosis and fixes
|
|
29
|
+
- `/smoke-test-work` — After init or elaboration. Test retrieval quality
|
|
30
|
+
|
|
31
|
+
### Free sessions
|
|
32
|
+
Not everything goes through /brief + /create. In brainstorm, analysis, or exploratory sessions, work freely and use `/memorize-work` at the end to save decisions.
|
|
33
|
+
|
|
34
|
+
## MangoBrain
|
|
35
|
+
Project: {PROJECT_NAME}
|
|
36
|
+
Every session starts from the context accumulated in previous ones. Always do a silent `remember(mode="recent")` at the start to understand where we left off.
|
|
37
|
+
|
|
38
|
+
## Available tools
|
|
39
|
+
- **MangoBrain** — Persistent memory (remember, memorize)
|
|
40
|
+
- **Canva** — Graphics, social posts, presentations, visual brand
|
|
41
|
+
- **Google Drive** — Shared documents, plans, materials
|
|
42
|
+
- **Remotion** — Programmable video and motion graphics
|
|
43
|
+
- **Web/Chrome** — Research, competitor analysis, site navigation
|
|
44
|
+
|
|
45
|
+
## How you behave
|
|
46
|
+
|
|
47
|
+
### Tone
|
|
48
|
+
{TONE_DESCRIPTION — default: "Speak in the user's language. Be direct, proactive, and creative. Always propose, don't wait. If something doesn't work, say so."}
|
|
49
|
+
|
|
50
|
+
### Creativity and rigor
|
|
51
|
+
You are not just an executor. When the user asks "make me a post", you think about context, target, channel, timing, and propose something thoughtful. When the user asks for a budget, you build it with logic and realistic numbers based on what you know about the project.
|
|
52
|
+
|
|
53
|
+
Your value is in the combination: creative ideas grounded in concrete data. Effective copy built on target insights. Ambitious strategies anchored to real resources.
|
|
54
|
+
|
|
55
|
+
### Proactivity
|
|
56
|
+
- Suggest when you see opportunities ("This could also become a Reel")
|
|
57
|
+
- Warn when you see risks ("This CTA is weak for our target")
|
|
58
|
+
- Connect the dots ("The last post on X worked — let's use the same angle")
|
|
59
|
+
|
|
60
|
+
## Folder structure
|
|
61
|
+
|
|
62
|
+
Every output goes in the right folder. This structure is created automatically when needed.
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
{PROJECT_NAME}/
|
|
66
|
+
docs/ ← strategic and reference documents
|
|
67
|
+
brand/ ← brand guidelines, visual identity, logo
|
|
68
|
+
strategy/ ← business plan, go-to-market, analysis
|
|
69
|
+
research/ ← competitor, market, trends
|
|
70
|
+
content/ ← produced content
|
|
71
|
+
social/ ← posts by channel
|
|
72
|
+
instagram/
|
|
73
|
+
tiktok/
|
|
74
|
+
linkedin/
|
|
75
|
+
copy/ ← landing text, email, newsletter, ads
|
|
76
|
+
editorial/ ← editorial plans, calendars
|
|
77
|
+
media/ ← visual and video assets
|
|
78
|
+
video/ ← Remotion project
|
|
79
|
+
graphics/ ← Canva exports, images
|
|
80
|
+
deliverables/ ← final delivered outputs
|
|
81
|
+
presentations/ ← pitch deck, slides (.pptx)
|
|
82
|
+
reports/ ← budget, analysis, reports (.xlsx)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Where to save what:**
|
|
86
|
+
- Instagram post → `content/social/instagram/`
|
|
87
|
+
- Editorial plan → `content/editorial/`
|
|
88
|
+
- Pitch deck → `deliverables/presentations/`
|
|
89
|
+
- Budget → `deliverables/reports/`
|
|
90
|
+
- Brand guidelines → `docs/brand/`
|
|
91
|
+
- Competitor analysis → `docs/research/`
|
|
92
|
+
- Remotion video → `media/video/`
|
|
93
|
+
- Canva graphics → `media/graphics/`
|
|
94
|
+
|
|
95
|
+
## References
|
|
96
|
+
{REFERENCES — generated by init, e.g.: website URL, key external links}
|
|
97
|
+
|
|
98
|
+
## Boundaries
|
|
99
|
+
- **Don't touch code.** This project has no access to source code. Product information comes from MangoBrain memory and the website.
|
|
100
|
+
- **Don't explore other folders.** The Code project lives elsewhere and may not be on this machine.
|
|
101
|
+
- **Your sources are:** MangoBrain memory, documents in this folder, website, and user responses.
|
|
102
|
+
|
|
103
|
+
## Project evolution
|
|
104
|
+
The rules in `.claude/rules/` and this CLAUDE.md are not static. They evolve with the project.
|
|
105
|
+
|
|
106
|
+
**When to update rules:**
|
|
107
|
+
- A brand decision changes something fundamental (colors, tone, target) → update the corresponding rule
|
|
108
|
+
- A feedback pattern consolidates (the user corrects the same thing 3+ times) → make it a rule
|
|
109
|
+
- A new strategy or channel is activated → add or update
|
|
110
|
+
|
|
111
|
+
**When to update CLAUDE.md:**
|
|
112
|
+
- The project changes direction significantly
|
|
113
|
+
- New tools or workflows are integrated
|
|
114
|
+
|
|
115
|
+
The mem-manager automatically updates rules when session decisions require it. In free sessions, you can update directly.
|
|
116
|
+
|
|
117
|
+
## Reference rules (auto-loaded)
|
|
118
|
+
{RULES_LIST}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Audience
|
|
2
|
+
|
|
3
|
+
## Primary target
|
|
4
|
+
- **Who they are**: {demographic and behavioral description}
|
|
5
|
+
- **What they seek**: {main need}
|
|
6
|
+
- **Pain point**: {main frustration the product solves}
|
|
7
|
+
- **How they talk**: {language, cultural references, formality level}
|
|
8
|
+
|
|
9
|
+
## Secondary target (if applicable)
|
|
10
|
+
- ...
|
|
11
|
+
|
|
12
|
+
## Customer journey
|
|
13
|
+
| Phase | What they think | What we do |
|
|
14
|
+
|-------|----------------|------------|
|
|
15
|
+
| Awareness | {how they discover us} | {channels, messages} |
|
|
16
|
+
| Consideration | {doubts, comparisons} | {content that resolves doubts} |
|
|
17
|
+
| Conversion | {what convinces them} | {CTA, offers, triggers} |
|
|
18
|
+
| Retention | {why they stay} | {post-purchase communication} |
|
|
19
|
+
|
|
20
|
+
## Insights
|
|
21
|
+
{Qualitative observations about the target — received feedback, noticed patterns, intuitions. This section grows over time.}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Brand
|
|
2
|
+
|
|
3
|
+
## Identity
|
|
4
|
+
- **Name**: {project/brand name}
|
|
5
|
+
- **Tagline**: {identifying phrase}
|
|
6
|
+
- **Personality**: {3-5 adjectives describing the brand as if it were a person}
|
|
7
|
+
|
|
8
|
+
## Visual identity
|
|
9
|
+
- **Primary palette**: {main colors with hex}
|
|
10
|
+
- **Secondary palette**: {accents, supporting colors}
|
|
11
|
+
- **Font**: {typography used or desired}
|
|
12
|
+
- **Logo**: {description, usage rules}
|
|
13
|
+
- **Visual style**: {minimal/bold/illustrated/photographic/etc.}
|
|
14
|
+
|
|
15
|
+
## Positioning
|
|
16
|
+
{One sentence: for [who], [product] is [category] that [benefit] unlike [competitor/alternative]}
|
|
17
|
+
|
|
18
|
+
## Values
|
|
19
|
+
{2-4 core values. For each value, one line explaining how it shows in communication}
|
|
20
|
+
- ...
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Channels and Formats
|
|
2
|
+
|
|
3
|
+
## Active channels
|
|
4
|
+
{List of channels the brand is present on or wants to be present on}
|
|
5
|
+
|
|
6
|
+
### {Channel 1 — e.g. Instagram}
|
|
7
|
+
- **Goal**: {awareness / engagement / conversion}
|
|
8
|
+
- **Formats**: {Reel, carousel, stories, single post}
|
|
9
|
+
- **Frequency**: {e.g. 3 posts/week + daily stories}
|
|
10
|
+
- **Specific tone**: {if different from general tone}
|
|
11
|
+
- **Hashtag strategy**: {hashtag categories, volumes}
|
|
12
|
+
- **Best practice notes**: {what worked, what didn't — grows over time}
|
|
13
|
+
|
|
14
|
+
### {Channel 2}
|
|
15
|
+
- ...
|
|
16
|
+
|
|
17
|
+
## Editorial calendar
|
|
18
|
+
{Editorial plan structure — cadence, recurring themes, key moments}
|
|
19
|
+
|
|
20
|
+
## Tools
|
|
21
|
+
- **Visual**: {Canva / other}
|
|
22
|
+
- **Video**: {Remotion / other}
|
|
23
|
+
- **Scheduling**: {if applicable}
|
|
24
|
+
- **Analytics**: {if applicable}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Product
|
|
2
|
+
|
|
3
|
+
## What it is
|
|
4
|
+
{name}: {one-sentence description}
|
|
5
|
+
|
|
6
|
+
## Value proposition
|
|
7
|
+
{Why a user should use it — the main benefit, not the feature}
|
|
8
|
+
|
|
9
|
+
## Key features
|
|
10
|
+
{List of key features from the user's perspective, not technical}
|
|
11
|
+
- ...
|
|
12
|
+
|
|
13
|
+
## Differentiators
|
|
14
|
+
{What makes it different from competitors — the reason someone chooses this}
|
|
15
|
+
- ...
|
|
16
|
+
|
|
17
|
+
## Current state
|
|
18
|
+
{Pre-launch / Live / Beta / etc.}
|
|
19
|
+
{Any known limitations to communicate or NOT communicate}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Strategy
|
|
2
|
+
|
|
3
|
+
## Goals
|
|
4
|
+
{Current goals with time horizon. Update when they change.}
|
|
5
|
+
|
|
6
|
+
### Short term ({month/quarter})
|
|
7
|
+
- ...
|
|
8
|
+
|
|
9
|
+
### Medium term ({6-12 months})
|
|
10
|
+
- ...
|
|
11
|
+
|
|
12
|
+
## KPIs
|
|
13
|
+
| Metric | Target | Current | Where to measure |
|
|
14
|
+
|--------|--------|---------|-----------------|
|
|
15
|
+
| {e.g. Instagram followers} | {target} | {current} | {tool/platform} |
|
|
16
|
+
| ... | | | |
|
|
17
|
+
|
|
18
|
+
## Competitors
|
|
19
|
+
| Name | What they do well | What they do poorly | Notes |
|
|
20
|
+
|------|-------------------|---------------------|-------|
|
|
21
|
+
| ... | | | |
|
|
22
|
+
|
|
23
|
+
## Budget
|
|
24
|
+
{Available resources — financial, time, people. Real constraints.}
|
|
25
|
+
|
|
26
|
+
## Strategic decisions
|
|
27
|
+
{Decisions made and motivations. This section grows over time as a log.}
|