mango-brain 3.3.0__tar.gz → 3.3.2__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/LICENSE +21 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/PKG-INFO +6 -4
- {mango_brain-3.3.0 → mango_brain-3.3.2}/README.md +3 -3
- {mango_brain-3.3.0 → mango_brain-3.3.2}/mango_brain.egg-info/PKG-INFO +6 -4
- {mango_brain-3.3.0 → mango_brain-3.3.2}/mango_brain.egg-info/SOURCES.txt +23 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/pyproject.toml +2 -1
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/cli.py +184 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/database.py +3 -1
- mango_brain-3.3.2/server/work/agents/creator.md +190 -0
- mango_brain-3.3.2/server/work/agents/mem-manager.md +286 -0
- mango_brain-3.3.2/server/work/agents/researcher.md +169 -0
- mango_brain-3.3.2/server/work/agents/reviewer.md +156 -0
- mango_brain-3.3.2/server/work/prompts/init-work.md +153 -0
- mango_brain-3.3.2/server/work/prompts/memory-definition.md +213 -0
- mango_brain-3.3.2/server/work/rules/mangobrain-remember-work.md +67 -0
- mango_brain-3.3.2/server/work/rules/mangobrain-workflow-work.md +43 -0
- mango_brain-3.3.2/server/work/skills/brain-init-work/SKILL.md +287 -0
- mango_brain-3.3.2/server/work/skills/brief/SKILL.md +189 -0
- mango_brain-3.3.2/server/work/skills/create/SKILL.md +219 -0
- mango_brain-3.3.2/server/work/skills/elaborate-work/SKILL.md +142 -0
- mango_brain-3.3.2/server/work/skills/health-check-work/SKILL.md +141 -0
- mango_brain-3.3.2/server/work/skills/memorize-work/SKILL.md +87 -0
- mango_brain-3.3.2/server/work/skills/smoke-test-work/SKILL.md +162 -0
- mango_brain-3.3.2/server/work/templates/CLAUDE.md +118 -0
- mango_brain-3.3.2/server/work/templates/rules/audience.md +21 -0
- mango_brain-3.3.2/server/work/templates/rules/brand.md +20 -0
- mango_brain-3.3.2/server/work/templates/rules/channels.md +24 -0
- mango_brain-3.3.2/server/work/templates/rules/product.md +19 -0
- mango_brain-3.3.2/server/work/templates/rules/strategy.md +27 -0
- mango_brain-3.3.2/server/work/templates/rules/tone.md +21 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/mango_brain.egg-info/dependency_links.txt +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/mango_brain.egg-info/entry_points.txt +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/mango_brain.egg-info/requires.txt +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/mango_brain.egg-info/top_level.txt +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/__init__.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/__main__.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/agents/analyzer.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/agents/executor.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/agents/mem-manager.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/agents/verifier.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/api_routes.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/config.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/dashboard_dist/assets/index-DmI5d2FU.css +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/dashboard_dist/assets/index-DojB8F-G.js +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/dashboard_dist/favicon.svg +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/dashboard_dist/icons.svg +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/dashboard_dist/index.html +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/dashboard_dist/logo.svg +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/decay.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/embeddings.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/graph.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/jsonl_parser.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/main.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/mangobrain.default.toml +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/mcp_tools.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/models.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/prompts/init/01-doc-base.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/prompts/init/02-code-base.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/prompts/init/03-event-base.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/prompts/init/04-chat-base.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/prompts/init/05-elaborate-base.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/prompts/reference/memory-definition.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/retrieval.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/rules/mangobrain-remember.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/rules/mangobrain-workflow.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/skills/brain-init/SKILL.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/skills/discuss/SKILL.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/skills/elaborate/SKILL.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/skills/health-check/SKILL.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/skills/memorize/SKILL.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/skills/smoke-test/SKILL.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/server/skills/task/SKILL.md +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/setup.cfg +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/tests/test_core.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/tests/test_init.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/tests/test_phase2.py +0 -0
- {mango_brain-3.3.0 → mango_brain-3.3.2}/tests/test_setup.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Federico Anastasi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mango-brain
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.2
|
|
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
|
|
7
7
|
Requires-Python: >=3.11
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Requires-Dist: fastapi>=0.110
|
|
10
11
|
Requires-Dist: uvicorn>=0.27
|
|
11
12
|
Requires-Dist: mcp>=1.0
|
|
@@ -24,6 +25,7 @@ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
|
24
25
|
Requires-Dist: torch>=2.2; extra == "dev"
|
|
25
26
|
Requires-Dist: sentence-transformers>=2.5; extra == "dev"
|
|
26
27
|
Requires-Dist: scipy>=1.12; extra == "dev"
|
|
28
|
+
Dynamic: license-file
|
|
27
29
|
|
|
28
30
|
<p align="center">
|
|
29
31
|
<img src="assets/logo.svg" alt="MangoBrain" width="80" />
|
|
@@ -41,15 +43,15 @@ Requires-Dist: scipy>=1.12; extra == "dev"
|
|
|
41
43
|
</p>
|
|
42
44
|
|
|
43
45
|
<p align="center">
|
|
44
|
-
<a href="https://pypi.org/project/
|
|
45
|
-
<img src="https://img.shields.io/badge/v3.3.
|
|
46
|
+
<a href="https://pypi.org/project/mango-brain/"><img src="https://img.shields.io/pypi/v/mangobrain?style=flat-square&color=7c3aed&label=PyPI" /></a>
|
|
47
|
+
<img src="https://img.shields.io/badge/v3.3.2-7c3aed?style=flat-square" />
|
|
46
48
|
<img src="https://img.shields.io/badge/python-3.11+-blue?style=flat-square&logo=python&logoColor=white" />
|
|
47
49
|
<img src="https://img.shields.io/badge/MCP-compatible-8A2BE2?style=flat-square" />
|
|
48
50
|
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" />
|
|
49
51
|
</p>
|
|
50
52
|
|
|
51
53
|
<p align="center">
|
|
52
|
-
<a href="https://mangobrain.dev">Website</a> · <a href="#getting-started">Install</a> · <a href="https://pypi.org/project/
|
|
54
|
+
<a href="https://mangobrain.mango-dev.space">Website</a> · <a href="#getting-started">Install</a> · <a href="https://pypi.org/project/mango-brain/">PyPI</a>
|
|
53
55
|
</p>
|
|
54
56
|
|
|
55
57
|
---
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
|
-
<a href="https://pypi.org/project/
|
|
18
|
-
<img src="https://img.shields.io/badge/v3.3.
|
|
17
|
+
<a href="https://pypi.org/project/mango-brain/"><img src="https://img.shields.io/pypi/v/mangobrain?style=flat-square&color=7c3aed&label=PyPI" /></a>
|
|
18
|
+
<img src="https://img.shields.io/badge/v3.3.2-7c3aed?style=flat-square" />
|
|
19
19
|
<img src="https://img.shields.io/badge/python-3.11+-blue?style=flat-square&logo=python&logoColor=white" />
|
|
20
20
|
<img src="https://img.shields.io/badge/MCP-compatible-8A2BE2?style=flat-square" />
|
|
21
21
|
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" />
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
<p align="center">
|
|
25
|
-
<a href="https://mangobrain.dev">Website</a> · <a href="#getting-started">Install</a> · <a href="https://pypi.org/project/
|
|
25
|
+
<a href="https://mangobrain.mango-dev.space">Website</a> · <a href="#getting-started">Install</a> · <a href="https://pypi.org/project/mango-brain/">PyPI</a>
|
|
26
26
|
</p>
|
|
27
27
|
|
|
28
28
|
---
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mango-brain
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.2
|
|
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
|
|
7
7
|
Requires-Python: >=3.11
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Requires-Dist: fastapi>=0.110
|
|
10
11
|
Requires-Dist: uvicorn>=0.27
|
|
11
12
|
Requires-Dist: mcp>=1.0
|
|
@@ -24,6 +25,7 @@ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
|
24
25
|
Requires-Dist: torch>=2.2; extra == "dev"
|
|
25
26
|
Requires-Dist: sentence-transformers>=2.5; extra == "dev"
|
|
26
27
|
Requires-Dist: scipy>=1.12; extra == "dev"
|
|
28
|
+
Dynamic: license-file
|
|
27
29
|
|
|
28
30
|
<p align="center">
|
|
29
31
|
<img src="assets/logo.svg" alt="MangoBrain" width="80" />
|
|
@@ -41,15 +43,15 @@ Requires-Dist: scipy>=1.12; extra == "dev"
|
|
|
41
43
|
</p>
|
|
42
44
|
|
|
43
45
|
<p align="center">
|
|
44
|
-
<a href="https://pypi.org/project/
|
|
45
|
-
<img src="https://img.shields.io/badge/v3.3.
|
|
46
|
+
<a href="https://pypi.org/project/mango-brain/"><img src="https://img.shields.io/pypi/v/mangobrain?style=flat-square&color=7c3aed&label=PyPI" /></a>
|
|
47
|
+
<img src="https://img.shields.io/badge/v3.3.2-7c3aed?style=flat-square" />
|
|
46
48
|
<img src="https://img.shields.io/badge/python-3.11+-blue?style=flat-square&logo=python&logoColor=white" />
|
|
47
49
|
<img src="https://img.shields.io/badge/MCP-compatible-8A2BE2?style=flat-square" />
|
|
48
50
|
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" />
|
|
49
51
|
</p>
|
|
50
52
|
|
|
51
53
|
<p align="center">
|
|
52
|
-
<a href="https://mangobrain.dev">Website</a> · <a href="#getting-started">Install</a> · <a href="https://pypi.org/project/
|
|
54
|
+
<a href="https://mangobrain.mango-dev.space">Website</a> · <a href="#getting-started">Install</a> · <a href="https://pypi.org/project/mango-brain/">PyPI</a>
|
|
53
55
|
</p>
|
|
54
56
|
|
|
55
57
|
---
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
LICENSE
|
|
1
2
|
README.md
|
|
2
3
|
pyproject.toml
|
|
3
4
|
mango_brain.egg-info/PKG-INFO
|
|
@@ -46,6 +47,28 @@ server/skills/health-check/SKILL.md
|
|
|
46
47
|
server/skills/memorize/SKILL.md
|
|
47
48
|
server/skills/smoke-test/SKILL.md
|
|
48
49
|
server/skills/task/SKILL.md
|
|
50
|
+
server/work/agents/creator.md
|
|
51
|
+
server/work/agents/mem-manager.md
|
|
52
|
+
server/work/agents/researcher.md
|
|
53
|
+
server/work/agents/reviewer.md
|
|
54
|
+
server/work/prompts/init-work.md
|
|
55
|
+
server/work/prompts/memory-definition.md
|
|
56
|
+
server/work/rules/mangobrain-remember-work.md
|
|
57
|
+
server/work/rules/mangobrain-workflow-work.md
|
|
58
|
+
server/work/skills/brain-init-work/SKILL.md
|
|
59
|
+
server/work/skills/brief/SKILL.md
|
|
60
|
+
server/work/skills/create/SKILL.md
|
|
61
|
+
server/work/skills/elaborate-work/SKILL.md
|
|
62
|
+
server/work/skills/health-check-work/SKILL.md
|
|
63
|
+
server/work/skills/memorize-work/SKILL.md
|
|
64
|
+
server/work/skills/smoke-test-work/SKILL.md
|
|
65
|
+
server/work/templates/CLAUDE.md
|
|
66
|
+
server/work/templates/rules/audience.md
|
|
67
|
+
server/work/templates/rules/brand.md
|
|
68
|
+
server/work/templates/rules/channels.md
|
|
69
|
+
server/work/templates/rules/product.md
|
|
70
|
+
server/work/templates/rules/strategy.md
|
|
71
|
+
server/work/templates/rules/tone.md
|
|
49
72
|
tests/test_core.py
|
|
50
73
|
tests/test_init.py
|
|
51
74
|
tests/test_phase2.py
|
|
@@ -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.2"
|
|
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"}
|
|
@@ -50,6 +50,7 @@ server = [
|
|
|
50
50
|
"agents/*.md",
|
|
51
51
|
"rules/*.md",
|
|
52
52
|
"prompts/**/*.md",
|
|
53
|
+
"work/**/*.md",
|
|
53
54
|
"mangobrain.default.toml",
|
|
54
55
|
"dashboard_dist/**/*",
|
|
55
56
|
]
|
|
@@ -23,6 +23,14 @@ AGENTS_SRC = PACKAGE_DIR / "agents"
|
|
|
23
23
|
RULES_SRC = PACKAGE_DIR / "rules"
|
|
24
24
|
PROMPTS_SRC = PACKAGE_DIR / "prompts"
|
|
25
25
|
|
|
26
|
+
# Work paths
|
|
27
|
+
WORK_DIR = PACKAGE_DIR / "work"
|
|
28
|
+
WORK_SKILLS_SRC = WORK_DIR / "skills"
|
|
29
|
+
WORK_AGENTS_SRC = WORK_DIR / "agents"
|
|
30
|
+
WORK_RULES_SRC = WORK_DIR / "rules"
|
|
31
|
+
WORK_PROMPTS_SRC = WORK_DIR / "prompts"
|
|
32
|
+
WORK_TEMPLATES_SRC = WORK_DIR / "templates"
|
|
33
|
+
|
|
26
34
|
|
|
27
35
|
# ── Commands ──────────────────────────────────────────────────────────────────
|
|
28
36
|
|
|
@@ -259,6 +267,62 @@ def cmd_install(args: argparse.Namespace) -> None:
|
|
|
259
267
|
print()
|
|
260
268
|
|
|
261
269
|
|
|
270
|
+
def cmd_install_work(args: argparse.Namespace) -> None:
|
|
271
|
+
"""Install MangoBrain Work into a project — marketing, content, strategy workflow."""
|
|
272
|
+
project_path = Path(args.path).resolve() if args.path else Path.cwd()
|
|
273
|
+
project_name = args.project or project_path.name
|
|
274
|
+
|
|
275
|
+
if not project_path.exists():
|
|
276
|
+
print(f"Error: path does not exist: {project_path}")
|
|
277
|
+
sys.exit(1)
|
|
278
|
+
|
|
279
|
+
print("=" * 60)
|
|
280
|
+
print(" MangoBrain Work — Installation")
|
|
281
|
+
print("=" * 60)
|
|
282
|
+
|
|
283
|
+
# ── Step 1: Install Work files ──
|
|
284
|
+
print("\n[1/4] Installing Work skills, agents, rules, and prompts...")
|
|
285
|
+
installed = _install_work_files(project_path)
|
|
286
|
+
print(f" {len(installed)} files installed into {project_path / '.claude'}")
|
|
287
|
+
|
|
288
|
+
# ── Step 2: Install templates ──
|
|
289
|
+
print("\n[2/4] Installing templates...")
|
|
290
|
+
templates_installed = _install_work_templates(project_path)
|
|
291
|
+
print(f" {len(templates_installed)} template files installed")
|
|
292
|
+
|
|
293
|
+
# ── Step 3: Configure MCP ──
|
|
294
|
+
print("\n[3/4] Configuring MCP server...")
|
|
295
|
+
_setup_mcp_json(project_path)
|
|
296
|
+
|
|
297
|
+
# ── Step 4: Create project structure ──
|
|
298
|
+
print("\n[4/4] Setting up project structure...")
|
|
299
|
+
briefs_dir = project_path / "briefs"
|
|
300
|
+
briefs_dir.mkdir(exist_ok=True)
|
|
301
|
+
print(f" Created briefs/")
|
|
302
|
+
|
|
303
|
+
# Patch CLAUDE.md with Work section
|
|
304
|
+
_patch_claude_md_work(project_path, project_name)
|
|
305
|
+
|
|
306
|
+
# ── Done ──
|
|
307
|
+
print("\n" + "=" * 60)
|
|
308
|
+
print(" MangoBrain Work installed!")
|
|
309
|
+
print("=" * 60)
|
|
310
|
+
print(f"\n Installed into: {project_path}")
|
|
311
|
+
print(f"\n Document skills (optional, recommended):")
|
|
312
|
+
print(f" Install via Claude Code slash commands or copy from:")
|
|
313
|
+
print(f" https://github.com/anthropics/claude-code/tree/main/skills")
|
|
314
|
+
print(f" - pptx (presentations)")
|
|
315
|
+
print(f" - xlsx (spreadsheets)")
|
|
316
|
+
print(f" - docx (documents)")
|
|
317
|
+
print(f" - pdf (PDF manipulation)")
|
|
318
|
+
print(f" - brand-guidelines")
|
|
319
|
+
print(f"\n Next steps:")
|
|
320
|
+
print(f" 1. Start the server: mangobrain serve --api")
|
|
321
|
+
print(f" 2. Restart Claude Code/Desktop")
|
|
322
|
+
print(f" 3. Run /brain-init-work to initialize brand memory")
|
|
323
|
+
print()
|
|
324
|
+
|
|
325
|
+
|
|
262
326
|
def cmd_doctor(args: argparse.Namespace) -> None:
|
|
263
327
|
"""Check MangoBrain health."""
|
|
264
328
|
print("MangoBrain Doctor")
|
|
@@ -413,6 +477,120 @@ def _install_files(project_path: Path) -> list[str]:
|
|
|
413
477
|
return installed
|
|
414
478
|
|
|
415
479
|
|
|
480
|
+
def _install_work_files(project_path: Path) -> list[str]:
|
|
481
|
+
"""Copy Work skills/agents/rules/prompts into a project's .claude/ directory."""
|
|
482
|
+
installed = []
|
|
483
|
+
claude_dir = project_path / ".claude"
|
|
484
|
+
|
|
485
|
+
# Work Skills
|
|
486
|
+
if WORK_SKILLS_SRC.exists():
|
|
487
|
+
for skill_dir in WORK_SKILLS_SRC.iterdir():
|
|
488
|
+
if skill_dir.is_dir() and (skill_dir / "SKILL.md").exists():
|
|
489
|
+
dest = claude_dir / "skills" / skill_dir.name / "SKILL.md"
|
|
490
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
491
|
+
shutil.copy2(skill_dir / "SKILL.md", dest)
|
|
492
|
+
installed.append(f"skills/{skill_dir.name}/SKILL.md")
|
|
493
|
+
|
|
494
|
+
# Work Agents
|
|
495
|
+
if WORK_AGENTS_SRC.exists():
|
|
496
|
+
for agent_file in WORK_AGENTS_SRC.glob("*.md"):
|
|
497
|
+
dest = claude_dir / "agents" / agent_file.name
|
|
498
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
499
|
+
shutil.copy2(agent_file, dest)
|
|
500
|
+
installed.append(f"agents/{agent_file.name}")
|
|
501
|
+
|
|
502
|
+
# Work Rules
|
|
503
|
+
if WORK_RULES_SRC.exists():
|
|
504
|
+
for rule_file in WORK_RULES_SRC.glob("*.md"):
|
|
505
|
+
dest = claude_dir / "rules" / rule_file.name
|
|
506
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
507
|
+
shutil.copy2(rule_file, dest)
|
|
508
|
+
installed.append(f"rules/{rule_file.name}")
|
|
509
|
+
|
|
510
|
+
# Work Prompts
|
|
511
|
+
if WORK_PROMPTS_SRC.exists():
|
|
512
|
+
prompts_dest = claude_dir / "prompts" / "mangobrain"
|
|
513
|
+
for md_file in WORK_PROMPTS_SRC.rglob("*.md"):
|
|
514
|
+
rel = md_file.relative_to(WORK_PROMPTS_SRC)
|
|
515
|
+
dest = prompts_dest / rel
|
|
516
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
517
|
+
shutil.copy2(md_file, dest)
|
|
518
|
+
installed.append(f"prompts/mangobrain/{rel}")
|
|
519
|
+
|
|
520
|
+
return installed
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
def _install_work_templates(project_path: Path) -> list[str]:
|
|
524
|
+
"""Copy Work templates (CLAUDE.md template + rule templates) into the project."""
|
|
525
|
+
installed = []
|
|
526
|
+
templates_dest = project_path / ".claude" / "templates"
|
|
527
|
+
|
|
528
|
+
if WORK_TEMPLATES_SRC.exists():
|
|
529
|
+
for md_file in WORK_TEMPLATES_SRC.rglob("*.md"):
|
|
530
|
+
rel = md_file.relative_to(WORK_TEMPLATES_SRC)
|
|
531
|
+
dest = templates_dest / rel
|
|
532
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
533
|
+
shutil.copy2(md_file, dest)
|
|
534
|
+
installed.append(f"templates/{rel}")
|
|
535
|
+
|
|
536
|
+
return installed
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
def _patch_claude_md_work(project_path: Path, project_name: str) -> None:
|
|
540
|
+
"""Add MangoBrain Work section to project's CLAUDE.md."""
|
|
541
|
+
claude_md_inner = project_path / ".claude" / "CLAUDE.md"
|
|
542
|
+
claude_md_root = project_path / "CLAUDE.md"
|
|
543
|
+
marker = "## MangoBrain"
|
|
544
|
+
|
|
545
|
+
if claude_md_inner.exists():
|
|
546
|
+
claude_md = claude_md_inner
|
|
547
|
+
elif claude_md_root.exists():
|
|
548
|
+
claude_md = claude_md_root
|
|
549
|
+
else:
|
|
550
|
+
claude_md = claude_md_root
|
|
551
|
+
|
|
552
|
+
if claude_md.exists():
|
|
553
|
+
content = claude_md.read_text(encoding="utf-8")
|
|
554
|
+
if marker in content:
|
|
555
|
+
return
|
|
556
|
+
else:
|
|
557
|
+
content = f"# {project_name}\n\n"
|
|
558
|
+
|
|
559
|
+
section = f"""
|
|
560
|
+
{marker} Work — Memory-Powered Workflow
|
|
561
|
+
|
|
562
|
+
MangoBrain provides persistent memory and a complete workflow for marketing, content, and strategy work.
|
|
563
|
+
|
|
564
|
+
### Workflow Skills
|
|
565
|
+
- `/brief` — Intake with memory context, produces structured brief in briefs/
|
|
566
|
+
- `/create` — Full pipeline: Researcher -> Creator -> Reviewer -> Mem-manager
|
|
567
|
+
- `/brain-init-work` — Initialize brand memory (guided setup)
|
|
568
|
+
- `/memorize-work` — End-of-session memory sync
|
|
569
|
+
- `/elaborate-work` — Periodic memory consolidation
|
|
570
|
+
- `/health-check-work` — Memory health diagnosis
|
|
571
|
+
- `/smoke-test-work` — Query verification
|
|
572
|
+
|
|
573
|
+
### Agents (spawned by /create, not invoked directly)
|
|
574
|
+
- **researcher** — Gathers context from memory, docs, web
|
|
575
|
+
- **creator** — Produces deliverables (copy, presentations, documents)
|
|
576
|
+
- **reviewer** — QA against brief and brand guidelines
|
|
577
|
+
- **mem-manager** — Persists session knowledge
|
|
578
|
+
|
|
579
|
+
### Output Structure
|
|
580
|
+
- `briefs/` — Brief files ({{date}}-{{HHmm}}-{{slug}}.md)
|
|
581
|
+
- `docs/` — Strategy, research, brand documents
|
|
582
|
+
- `content/` — Social, copy, editorial
|
|
583
|
+
- `media/` — Graphics, video
|
|
584
|
+
- `deliverables/` — Presentations, reports, exports
|
|
585
|
+
|
|
586
|
+
### Rules (auto-loaded)
|
|
587
|
+
- `mangobrain-remember-work.md` — Query strategy for Work projects
|
|
588
|
+
- `mangobrain-workflow-work.md` — Brief -> Create workflow integration
|
|
589
|
+
"""
|
|
590
|
+
|
|
591
|
+
claude_md.write_text(content + section, encoding="utf-8")
|
|
592
|
+
|
|
593
|
+
|
|
416
594
|
def _setup_mcp_json(project_path: Path) -> None:
|
|
417
595
|
"""Create or update .mcp.json with MangoBrain server entry."""
|
|
418
596
|
mcp_json = project_path / ".mcp.json"
|
|
@@ -529,6 +707,12 @@ def main() -> None:
|
|
|
529
707
|
p_install.add_argument("--project", "-p", help="Project name (default: folder name)")
|
|
530
708
|
p_install.set_defaults(func=cmd_install)
|
|
531
709
|
|
|
710
|
+
# install-work
|
|
711
|
+
p_install_work = sub.add_parser("install-work", help="Install MangoBrain Work (marketing/content/strategy)")
|
|
712
|
+
p_install_work.add_argument("--path", help="Path to the project directory (default: current dir)")
|
|
713
|
+
p_install_work.add_argument("--project", "-p", help="Project name (default: folder name)")
|
|
714
|
+
p_install_work.set_defaults(func=cmd_install_work)
|
|
715
|
+
|
|
532
716
|
# doctor
|
|
533
717
|
p_doctor = sub.add_parser("doctor", help="Check MangoBrain system health")
|
|
534
718
|
p_doctor.set_defaults(func=cmd_doctor)
|
|
@@ -625,7 +625,8 @@ class Database:
|
|
|
625
625
|
clauses.append("m.project = ?")
|
|
626
626
|
params.append(project)
|
|
627
627
|
where = f"WHERE {' AND '.join(clauses)}"
|
|
628
|
-
# Priority:
|
|
628
|
+
# Priority: never-elaborated memories first (regardless of edge count),
|
|
629
|
+
# then fewest edges (sparse nodes need connections),
|
|
629
630
|
# then lowest elaboration_count, then oldest elaboration_date.
|
|
630
631
|
cur = await self.conn.execute(
|
|
631
632
|
f"""SELECT m.*
|
|
@@ -639,6 +640,7 @@ class Database:
|
|
|
639
640
|
) ec ON m.id = ec.mid
|
|
640
641
|
{where}
|
|
641
642
|
ORDER BY
|
|
643
|
+
CASE WHEN m.elaboration_count = 0 THEN 0 ELSE 1 END ASC,
|
|
642
644
|
COALESCE(ec.edge_count, 0) ASC,
|
|
643
645
|
m.elaboration_count ASC,
|
|
644
646
|
m.elaboration_date IS NOT NULL,
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: creator
|
|
3
|
+
description: Content Creator agent. Produces deliverables (copy, presentations, spreadsheets, documents, strategies) using document skills and connectors. No memory access — receives all context from Researcher.
|
|
4
|
+
tools: Read, Write, Bash, Glob
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Creator Agent
|
|
9
|
+
|
|
10
|
+
You are a Content Creator agent. You produce deliverables — copy, documents, strategies, plans — based on a brief and research context. You are creative, precise, and brand-consistent.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## TOOLS AVAILABLE
|
|
15
|
+
|
|
16
|
+
- `Read` — Read reference files
|
|
17
|
+
- `Write` — Create local deliverable files (.md, .txt)
|
|
18
|
+
|
|
19
|
+
### Connectors (use when available)
|
|
20
|
+
|
|
21
|
+
| Connector | When to use |
|
|
22
|
+
|-----------|------------|
|
|
23
|
+
| **Canva** | Social post graphics, carousels, stories, brand visuals |
|
|
24
|
+
| **Google Drive** | Shared documents, read reference docs |
|
|
25
|
+
| **Remotion** | Video content, motion graphics, animated Reels/intros |
|
|
26
|
+
|
|
27
|
+
### Tool routing — which tool for which deliverable
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Deliverable Skill/Tool Save to
|
|
31
|
+
─────────────────────────────────────────────────────────────────
|
|
32
|
+
Social post (visual) Canva / image description content/social/{channel}/
|
|
33
|
+
Social post (copy only) text output content/social/{channel}/
|
|
34
|
+
Instagram carousel Canva (multi-page) content/social/instagram/
|
|
35
|
+
Story / Reel cover Canva content/social/instagram/
|
|
36
|
+
Video / Reel / Intro Remotion media/video/
|
|
37
|
+
Presentation / pitch deck pptx skill (pptxgenjs) deliverables/presentations/
|
|
38
|
+
Budget / spreadsheet xlsx skill (xlsx-populate) deliverables/reports/
|
|
39
|
+
Editorial calendar xlsx skill or text table content/editorial/
|
|
40
|
+
Strategy document docx skill or .md docs/strategy/
|
|
41
|
+
Brand guidelines brand-guidelines skill docs/brand/
|
|
42
|
+
Competitor analysis .md docs/research/
|
|
43
|
+
Copy (landing, email, ad) text / .md content/copy/
|
|
44
|
+
PDF export pdf skill deliverables/
|
|
45
|
+
Graphics / exports Canva export media/graphics/
|
|
46
|
+
Any other document .md docs/
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Document skills (installed in .claude/skills/)
|
|
50
|
+
|
|
51
|
+
These skills teach you how to produce high-quality office documents. **Always use the skill workflow** — read the skill's SKILL.md before creating the file.
|
|
52
|
+
|
|
53
|
+
| Skill | Library | Use for |
|
|
54
|
+
|-------|---------|---------|
|
|
55
|
+
| **pptx** | pptxgenjs (JS) | Presentations, pitch decks, slide reports |
|
|
56
|
+
| **xlsx** | xlsx-populate (JS) | Budgets, calendars, tracking, KPI dashboards |
|
|
57
|
+
| **docx** | docx (JS/Python) | Formal documents, contracts, briefs |
|
|
58
|
+
| **pdf** | various | PDF export and manipulation |
|
|
59
|
+
| **brand-guidelines** | — | Structured brand book generation |
|
|
60
|
+
|
|
61
|
+
**Rules:**
|
|
62
|
+
- **Always produce the actual deliverable.** Don't describe what a slide should look like — create the .pptx. Don't describe a budget — create the .xlsx with formulas.
|
|
63
|
+
- **Use the installed skills.** Read `.claude/skills/{skill}/SKILL.md` for the correct workflow. The skills produce much better output than ad-hoc code. The code stays on disk and can be reused as a template.
|
|
64
|
+
- **Always save to the right folder.** Create the folder if it doesn't exist. Follow the project structure from CLAUDE.md.
|
|
65
|
+
- **Name files clearly.** Use descriptive names with dates when relevant: `pitch-deck-investors-v1.pptx`, `instagram-post-launch-01.md`, `budget-marketing-q2-2026.xlsx`.
|
|
66
|
+
- **Save the generation code.** Keep the .js/.py scripts alongside the output — they serve as reusable templates for future deliverables with the same style.
|
|
67
|
+
|
|
68
|
+
## TOOLS NOT AVAILABLE
|
|
69
|
+
|
|
70
|
+
- `remember` / `memorize` — You have NO access to MangoBrain. All memory context comes from the Researcher's output, pre-loaded in your prompt.
|
|
71
|
+
- This is by design: you focus 100% on creation, zero retrieval overhead.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## WORKFLOW
|
|
76
|
+
|
|
77
|
+
### Step 1 — Understand the assignment
|
|
78
|
+
|
|
79
|
+
You receive:
|
|
80
|
+
1. **Brief** — what to produce, for whom, which channel, constraints
|
|
81
|
+
2. **Research context** — brand voice, audience, past content, gotchas
|
|
82
|
+
|
|
83
|
+
Read both carefully. Identify:
|
|
84
|
+
- Exact deliverable format (number of pieces, length, channel specs)
|
|
85
|
+
- Non-negotiable constraints (brand do/don't, must-include elements)
|
|
86
|
+
- Creative space (where you have freedom to propose)
|
|
87
|
+
|
|
88
|
+
### Step 2 — Plan the approach
|
|
89
|
+
|
|
90
|
+
Before creating, outline your approach (internally):
|
|
91
|
+
- What angle/hook will you use?
|
|
92
|
+
- What structure fits the format?
|
|
93
|
+
- How will you differentiate alternatives?
|
|
94
|
+
|
|
95
|
+
### Step 3 — Create
|
|
96
|
+
|
|
97
|
+
Produce the deliverable(s) following these principles:
|
|
98
|
+
|
|
99
|
+
**Copy & content:**
|
|
100
|
+
- Match the tone from research context exactly
|
|
101
|
+
- Lead with value/hook — no filler intros
|
|
102
|
+
- CTA must be clear and actionable
|
|
103
|
+
- Adapt language to the audience persona
|
|
104
|
+
- If multiple pieces requested, ensure variety (different angles, not just rewording)
|
|
105
|
+
|
|
106
|
+
**Strategy & planning documents:**
|
|
107
|
+
- Structure with clear sections and actionable items
|
|
108
|
+
- Include timelines when relevant
|
|
109
|
+
- Connect recommendations to brief objectives
|
|
110
|
+
- Use data/references from research context to support claims
|
|
111
|
+
|
|
112
|
+
**Visual deliverables (Canva):**
|
|
113
|
+
- Follow brand visual identity from research context
|
|
114
|
+
- Use specified colors, fonts, logo placement
|
|
115
|
+
- Format to channel specs (dimensions, safe zones)
|
|
116
|
+
- For carousels: create multi-page design, consistent style across slides
|
|
117
|
+
- Export in the right format for the channel (PNG for feed, MP4 for Reels)
|
|
118
|
+
|
|
119
|
+
**Presentations (Canva):**
|
|
120
|
+
- Use Canva presentation template — not slides as separate images
|
|
121
|
+
- Professional layout, consistent with brand visual identity
|
|
122
|
+
- One key message per slide — no walls of text
|
|
123
|
+
- Use the brand colors and fonts from research context
|
|
124
|
+
|
|
125
|
+
**Tables & calendars (text output):**
|
|
126
|
+
- Structured markdown tables for editorial calendars, plans, tracking
|
|
127
|
+
- Clear columns: date, channel, content type, topic, status, notes
|
|
128
|
+
- Group by week or month for readability
|
|
129
|
+
|
|
130
|
+
### Step 4 — Alternatives
|
|
131
|
+
|
|
132
|
+
When the brief allows, produce **2-3 alternatives**:
|
|
133
|
+
- **Option A**: safest, most brand-aligned
|
|
134
|
+
- **Option B**: creative stretch, higher impact potential
|
|
135
|
+
- **Option C** (if applicable): experimental, different angle entirely
|
|
136
|
+
|
|
137
|
+
For each, include a 1-line rationale explaining the creative choice.
|
|
138
|
+
|
|
139
|
+
### Step 5 — Report
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## OUTPUT FORMAT
|
|
144
|
+
|
|
145
|
+
```yaml
|
|
146
|
+
deliverable:
|
|
147
|
+
type: "{copy | strategy | editorial_plan | presentation | social_posts | document}"
|
|
148
|
+
channel: "{from brief}"
|
|
149
|
+
tool_used: "{canva | google_drive | local_file | text_output}"
|
|
150
|
+
pieces_produced: {number}
|
|
151
|
+
|
|
152
|
+
output:
|
|
153
|
+
option_a:
|
|
154
|
+
content: |
|
|
155
|
+
{the actual content}
|
|
156
|
+
rationale: "{why this approach — linked to brief/brand}"
|
|
157
|
+
|
|
158
|
+
option_b:
|
|
159
|
+
content: |
|
|
160
|
+
{the actual content}
|
|
161
|
+
rationale: "{why this approach}"
|
|
162
|
+
|
|
163
|
+
option_c: # if applicable
|
|
164
|
+
content: |
|
|
165
|
+
{the actual content}
|
|
166
|
+
rationale: "{why this approach}"
|
|
167
|
+
|
|
168
|
+
creative_choices:
|
|
169
|
+
- "{decision}: {why — linked to research context}"
|
|
170
|
+
- "{decision}: {why}"
|
|
171
|
+
|
|
172
|
+
brief_compliance:
|
|
173
|
+
format: "yes | partial | no"
|
|
174
|
+
tone: "yes | partial | no"
|
|
175
|
+
constraints_met: ["{list of constraints and status}"]
|
|
176
|
+
missing: ["{anything from brief not addressed, with reason}"]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## RULES
|
|
182
|
+
|
|
183
|
+
- **You are not the strategist.** Follow the brief. If you disagree with the brief's direction, note it in `creative_choices` but still deliver what was asked
|
|
184
|
+
- **Brand consistency is non-negotiable.** The tone, voice, and visual identity from research context are hard constraints, not suggestions
|
|
185
|
+
- **No placeholder content.** Every piece must be production-ready. No "[insert X here]" or "customize this"
|
|
186
|
+
- **Match the user's language** for content (Italian content → write in Italian). Research context is in English but the deliverable language follows the brief/project
|
|
187
|
+
- **Don't explain the creative process at length.** The output speaks for itself. Rationale is 1 line per choice
|
|
188
|
+
- **Always use the native tool.** Canva for visuals, PowerPoint for presentations, Excel for spreadsheets. Don't describe what something should look like — create it with the tool
|
|
189
|
+
- **File creation**: if the deliverable is a document (strategy, plan), create a real file, don't just output text
|
|
190
|
+
- **If a connector is unavailable**, fall back gracefully: describe the visual/slide/sheet in detail so the user can create it manually, and note which tool would have been used
|