feat: archive zoo_backup for home sync

This commit is contained in:
Patrick Plate
2026-06-24 19:27:05 +02:00
parent 02844e4c4a
commit 038e546963
133 changed files with 19953 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
# Roo/Zoo — Identity & Core Behavior
## Who am I
- Username: `$USER` (macOS/Linux) / `$USERNAME` (Windows)
- Home dir: `$HOME` (macOS/Linux) / `$USERPROFILE` (Windows)
- Git identity: run `git config user.name` / `git config user.email` for the current repo
- Path separator: `/` on macOS/Linux, `\` on Windows — adapt all paths accordingly
## Key Repo Paths
All repos live under `$HOME/git/` or as configured.
Discover with: `ls $HOME/git/` or check `git remote -v` in the current workspace.
## Tech Stack
- **Python + FastMCP** for all MCP servers. `@mcp.tool()` decorator pattern.
- **uv** for Python packages — never `pip`. Path: `$HOME/.local/bin/uv`
- **SQLite** for local DBs. BigMind: `$HOME/.mcp/bigmind/memory.db`
- **FastMCP image rule**: return `mcp.types.ImageContent` directly — never annotate `-> Image`
## Branching Strategy (all repos)
| Type | Pattern | Example |
|------|---------|---------|
| Feature | `feature/<scope>/<topic>` | `feature/auth/oauth2-flow` |
| Bugfix | `bugfix/<scope>/<desc>` | `bugfix/api/null-pointer-fix` |
| Release | `release/<version>` | `release/2.0.0` |
| Chore | `chore/<topic>` | `chore/update-readme` |
| Experiment | `experiment/<topic>` | `experiment/new-parser` |
**Rules (non-negotiable):**
- Never commit directly to `master` / `main` — always branch first
- Merge with `--no-ff`: `git merge --no-ff feature/... -m "Merge ..."`
- Conventional commits: `feat:` / `fix:` / `test:` / `chore:` / `refactor:`
- Announce focus via `memory_announce_focus` before touching files
## Always Allowed — Execute Without Confirmation
- `git_*` — all git operations
- `memory_*` — all BigMind memory operations
- Shell commands
- All file operations (read, write, replace, list, search)
- `webscraper_*`, `read_pdf`, `generate_pdf` — read/generate
- `list_*`, `get_*`, `retrieve_*`, `search_*` — all read-only API calls
## Behavior Rules
- **Direct and action-oriented** — act immediately, don't ask unnecessary questions
- **Honesty over comfort** — tell the truth even when uncomfortable
- **Full context first** — read files, search BigMind, check docs before changing code
- **Parallel tool calls** — run independent searches/reads simultaneously, never sequentially
- **Root cause, not surface fix** — diagnose before patching
- **Token efficiency** — use targeted reads over loading full files. Log savings with `memory_log_token_save`
- **Never commit to master/main directly** — always branch, then `--no-ff` merge
- **Knowledge before web** — BigMind → project docs → webscraper. Never skip to webscraper if local knowledge can answer
- **Store what you learn** — every new useful finding → `memory_store_fact` immediately
## Language Rules
- Match the user's language (German or English)
- Technical terms stay as-is regardless of language
+115
View File
@@ -0,0 +1,115 @@
# BigMind Memory Rules (MOST IMPORTANT)
## Session Ritual — mandatory every conversation
```
START → memory_start_session()
→ 🔴 ANNOUNCE SESSION ID IN CHAT: "🧠 BigMind Session: `<session_id>`" ← mandatory, enables recovery from chat history
→ memory_list_hypotheses(status="open")
→ memory_announce_focus(session_id, description, files, ide_hint="Roo")
→ memory_close_stale_sessions(session_id) ← if multiple 'in progress' found
EVERY ~5 exchanges → memory_announce_focus(...)
END → memory_resolve_hypothesis(...)
→ memory_end_session(...)
```
### Child Tasks (delegated via `new_task`) — session reuse rules
When a mode is invoked as a **child task** (via Orchestrator's `new_task`), it must **NOT** manage session lifecycle:
| Action | Child task behavior |
|--------|-------------------|
| `memory_start_session()` | ❌ Do NOT call — parent session is already open |
| `memory_end_session()` | ❌ Do NOT call — parent will close it |
| `memory_close_stale_sessions()` | ❌ Do NOT call — this kills the parent session |
| `memory_get_context()` | ✅ Use for read-only context refresh if needed |
| `memory_store_fact()` | ✅ Use normally |
| `memory_append_chunk()` | ✅ Use normally (pass parent session_id from task message) |
| `memory_announce_focus()` | ✅ Use normally (pass parent session_id from task message) |
| `memory_search_*()` | ✅ Use normally |
**How to detect you are a child task:** If the task message contains a session ID (e.g., "BigMind Session: `abc-123`"), you are a child task — reuse that session ID for all `session_id` parameters and skip lifecycle calls.
**First action in a child task:** After detecting you are a child task, call `memory_get_context()` to load the orchestrator's working state — recent facts, session history, and identity profile.
**Orchestrator responsibility:** Always pass the active session ID in the `new_task` message so the child can call `memory_announce_focus()`, `memory_append_chunk()`, and other session-dependent tools:
```
"🧠 Parent Session: `<session_id>` — do NOT open a new session."
```
**Subtask completion (CRITICAL):** When running as a child task, you MUST call `attempt_completion` when your work is done. This is what returns control to the parent Orchestrator. Without it, the parent hangs indefinitely.
## Before EVERY Task — search first, act second
```
1. memory_search_facts("2-3 keywords")
2. memory_search_chunks("2-3 keywords")
3. memory_search_semantic("natural language query") ← if 1+2 return nothing
```
**FTS5 rule:** AND-matches every token. Max 3 short keywords. Long queries return 0 results.
## Store Everything Learnable
| Trigger | Tool | What |
|---------|------|------|
| Read a new file/module | `memory_store_fact` | Purpose, key classes, entry points |
| Fix a bug | `memory_store_fact` | Root cause + fix pattern |
| Architectural decision | `memory_append_chunk` | Full rationale |
| Learn a user preference | `memory_store_fact` + `memory_update_profile` | Immediately |
| Complete a non-trivial task | `memory_append_chunk` | What was built, how, gotchas |
| Save tokens with grep/memory | `memory_log_token_save` | Description + tokens saved |
## Hypothesis-Driven Thinking
Before every non-trivial task — predict, then verify:
```python
memory_add_hypothesis("I predict X because [evidence from stored fact Y]", confidence=0.85)
# ... do the work ...
memory_resolve_hypothesis(id, status="confirmed", resolution="X was true because Z")
```
| Confidence | Meaning |
|-----------|---------|
| 90100% | Strong direct evidence in stored facts |
| 7089% | Good evidence, some uncertainty |
| 5069% | Informed guess, partial evidence |
| < 50% | Exploratory, weak signal |
## BigMind Tool Reference
| Category | Tool | Purpose |
|----------|------|---------|
| **Lifecycle** | `memory_start_session` | First action always |
| | `memory_end_session` | Last action always |
| | `memory_announce_focus(session_id, description, files, ide_hint)` | After start + before every task |
| | `memory_get_active_sessions()` | See all open sessions + file conflicts |
| | `memory_close_stale_sessions(session_id)` | Clean orphaned IDE sessions |
| | `memory_restart_server()` | After adding new tools to server.py |
| | `memory_get_context` | Refresh context mid-conversation |
| **Search** | `memory_search_facts(query)` | Atomic facts (2-3 keywords) |
| | `memory_search_chunks(query)` | Past decisions/code (2-3 keywords) |
| | `memory_search_semantic(query)` | Semantic/meaning-based search |
| | `memory_list_sessions(limit)` | Browse session history |
| | `memory_get_session_detail(id)` | Full Tier-2 narrative |
| **Storage** | `memory_store_fact(category, fact)` | One atomic truth per call |
| | `memory_append_chunk(content)` | Large narrative or code snippet |
| | `memory_flag_important(content)` | Flag exchange as Tier-3 |
| | `memory_update_profile(...)` | New preference or pinned fact |
| | `memory_deprecate_fact(id, reason)` | Fact no longer true |
| | `memory_log_token_save(session_id, description, tokens_saved, method_used)` | Log efficiency wins |
| **Hypotheses** | `memory_add_hypothesis(hypothesis, confidence)` | Predict before acting |
| | `memory_resolve_hypothesis(id, status, resolution)` | Close as confirmed/refuted/abandoned |
| | `memory_list_hypotheses(status)` | Review open predictions |
| | `memory_scan_hypotheses()` | Cross-reference open hypotheses vs facts |
| **Maintenance** | `memory_health_check()` | Stale facts, FTS integrity |
| | `memory_get_stats()` | DB size, counts |
| | `memory_vacuum(older_than_days)` | Prune old chunks |
| | `memory_export(output_path)` | Backup to JSON |
| **People** | `memory_remember_person(username, ...)` | Store/update a colleague |
| | `memory_recall_person(query)` | Find person by name/role/team |
| | `memory_list_people()` | All contacts, most recent first |
| **Diff** | `memory_diff_sessions(since_session_id)` | What changed since a session |
+104
View File
@@ -0,0 +1,104 @@
# MCP Tool Reference
## Git (`git_*`)
`repo_path` passed per call. All git actions execute immediately without confirmation.
| Tool | Purpose |
|------|---------|
| `git_status(repo_path)` | Working tree status |
| `git_add(repo_path, files)` | Stage files |
| `git_commit(repo_path, message)` | Commit staged changes |
| `git_diff_unstaged(repo_path)` | Unstaged changes |
| `git_diff_staged(repo_path)` | Staged changes |
| `git_diff(repo_path, target)` | Diff vs branch/commit |
| `git_log(repo_path, max_count, start_timestamp, end_timestamp)` | Commit history |
| `git_branch(repo_path, branch_type)` | List branches |
| `git_create_branch(repo_path, branch_name, base_branch)` | Create branch |
| `git_checkout(repo_path, branch_name)` | Switch branch |
| `git_show(repo_path, revision)` | Show commit |
| `git_reset(repo_path)` | Unstage all |
## Jira
| Tool | Purpose |
|------|---------|
| `list_tickets(jql_search)` | Search by JQL |
| `retrieve_ticket_details(issue_key)` | Full details |
| `create_ticket(project_key, summary, description)` | Create |
| `update_ticket_fields(issue_key, fields)` | Update fields |
| `update_status(issue_key, status)` | Transition |
| `add_comment_to_ticket(issue_key, comment)` | Comment |
| `update_comment(issue_key, comment_id, body)` | Edit comment |
| `ticket_assignment(issue_key, assignee)` | Assign |
| `my_tickets_to_work()` | My backlog/in-progress |
| `get_agile_boards(project_key)` | List boards |
| `get_sprints_from_board(board_id, states)` | List sprints |
| `get_tickets_from_sprint(sprint_id)` | Sprint tickets |
| `get_tickets_from_backlog(board_id)` | Backlog |
| `add_attachment_to_ticket(issue_key, file_path)` | Attach file |
| `download_single_attachment(issue_key, attachment_id, path)` | Download |
| `get_available_fields()` | List custom fields |
## Confluence
| Tool | Purpose |
|------|---------|
| `search_confluence_by_cql(cql_search)` | Search pages |
| `get_page_content(page_id)` | Read page |
| `create_page(space_key, title, content)` | Create |
| `update_page(page_id, content)` | Update |
| `add_comment_to_page(page_id, comment)` | Comment |
| `get_page_labels / add_page_label / remove_page_label` | Label management |
| `export_as_pdf(page_id)` | Export as PDF |
| `get_all_spaces()` | List spaces |
## Bitbucket
| Tool | Purpose |
|------|---------|
| `list_projects / list_repositories_by_project` | Browse |
| `list_prs_for_repository(project_key, repo_slug)` | List PRs |
| `get_pull_request / get_pull_request_diff / get_pull_request_comments / get_pull_request_changed_files` | PR details |
| `create_pull_request(project_key, repo_slug, title, description, from_branch)` | Open PR |
| `create_branch / list_branches` | Branch management |
| `find_file(project_key, repo_slug, file_path, branch)` | Read file |
| `commit_file(project_key, repo_slug, branch, file_path, content, commit_message)` | Commit |
## PDF Generator
**Always ask the user which color scheme before calling `generate_pdf`.**
Available: `adp` (red), `royal_purple`, `ocean`, `forest`, `sunset`, `slate`, `rose`.
| Tool | Purpose |
|------|---------|
| `generate_pdf(content, title, author, classification, logo, output_path, color_scheme)` | Branded PDF |
| `read_pdf(file_path, pages)` | Extract text + metadata |
| `generate_pptx(content, title, subtitle, author, template, output_path)` | Branded PPTX |
| `read_pptx(file_path)` | Extract slide content |
## WebScraper (`webscraper_*`)
| Tool | Purpose |
|------|---------|
| `webscraper_fetch(url)` | Page → markdown |
| `webscraper_fetch_links(url)` | All hrefs |
| `webscraper_fetch_tables(url)` | HTML tables |
| `webscraper_fetch_all(url)` | Markdown + links + tables |
| `webscraper_fetch_section(url, selector)` | CSS selector |
| `webscraper_fetch_meta(url)` | Meta tags |
| `webscraper_fetch_sitemap(url)` | Sitemap URLs |
## H2 DB
| Tool | Purpose |
|------|---------|
| `query(db_path, sql)` | Execute SQL |
| `list_schemas / list_tables / describe_table / get_foreign_keys / get_indexes` | Schema inspection |
## Webex (`webex_*`)
| Tool | Purpose |
|------|---------|
| `webex_send_message(room_id, text, markdown)` | Send message |
| `webex_list_rooms / webex_get_room / webex_create_room` | Room management |
| `webex_list_messages(room_id)` | Read messages |
| `webex_list_people / webex_add_member` | People |
+28
View File
@@ -0,0 +1,28 @@
# Visual Verification Rule
## After Building Frontend Pages
When working in Code or Debug mode on a frontend project with Playwright installed:
- **After creating or significantly modifying a page/component**, run the `visual-verify` skill to verify it renders correctly
- This catches issues like: missing i18n text, broken centering, theme mode failures, responsive overflow
- Minimum check: take a screenshot + extract visible text + verify positioning
## When to Delegate to Visual QA Mode
For deeper visual testing (multi-page, responsive breakpoints, interaction flows, accessibility), delegate to 🎨 Visual QA mode via the Orchestrator.
## Playwright Quick Reference
```javascript
const { chromium } = require('playwright');
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1280, height: 720 } });
await page.goto(URL);
await page.waitForTimeout(2000);
const text = await page.locator('body').innerText();
await page.screenshot({ path: '/tmp/verify.png' });
await browser.close();
```
Prerequisites: `pnpm add -D playwright` + `npx playwright install chromium`