docs(dench): update workspace paths for ironclaw profile and add browser capability

This commit is contained in:
kumarabhirup 2026-03-02 18:36:48 -08:00
parent 1deeb5878e
commit 64aa38942c
No known key found for this signature in database
GPG Key ID: DB7CA2289CAB0167

View File

@ -1,20 +1,20 @@
---
name: database-crm-system
description: Manage Database and everything else in the workspace - objects, fields, entries via DuckDB and documents as markdown files in a nested knowledge tree. Acts as your second brain.
description: Manage Database, Surfing web using Browser and everything else in the workspace - objects, fields, entries via DuckDB and documents as markdown files in a nested knowledge tree. Acts as your second brain.
metadata: { "openclaw": { "inject": true, "always": true, "emoji": "📊" } }
---
# CRM / Database in Workspace / Guide on handling any data
You manage a Dench workspace stored at `~/.openclaw/workspace`.
All structured data lives in **DuckDB**. The primary database is `~/.openclaw/workspace/workspace.duckdb`, but subdirectories may contain their own `workspace.duckdb` that is authoritative for objects in that subtree (hierarchical DB discovery). Shallower databases take priority when objects share the same name. Documents are **markdown files** in `~/.openclaw/workspace/**`. Organization context will be in `~/.openclaw/workspace/workspace_context.yaml` if an organisation exists (READ-ONLY).
You manage a Dench workspace stored at `~/.openclaw-ironclaw/workspace`.
All structured data lives in **DuckDB**. The primary database is `~/.openclaw-ironclaw/workspace/workspace.duckdb`, but subdirectories may contain their own `workspace.duckdb` that is authoritative for objects in that subtree (hierarchical DB discovery). Shallower databases take priority when objects share the same name. Documents are **markdown files** in `~/.openclaw-ironclaw/workspace/**`. Organization context will be in `~/.openclaw-ironclaw/workspace/workspace_context.yaml` if an organisation exists (READ-ONLY).
All actions should look into / edit and work on `~/.openclaw/workspace/**` by default unless told otherwise. Exceptions to this are the `SOUL.md`, `skills/`, `memory/`, `USER.md`, `IDENTITY.md`, `TOOLS.md`, `AGENTS.md` and `MEMORY.md` and other such files.
All actions should look into / edit and work on `~/.openclaw-ironclaw/workspace/**` by default unless told otherwise. Exceptions to this are the `SOUL.md`, `skills/`, `memory/`, `USER.md`, `IDENTITY.md`, `TOOLS.md`, `AGENTS.md` and `MEMORY.md` and other such files.
## Workspace Structure
```
~/.openclaw/workspace/
~/.openclaw-ironclaw/workspace/
workspace_context.yaml # READ-ONLY org context (members, integrations, protected objects)
workspace.duckdb # DuckDB database — sole source of truth for structured data
people/ # Object directory
@ -163,20 +163,20 @@ Generate by querying DuckDB then writing the file:
```bash
# 1. Query object + fields from DuckDB
duckdb ~/.openclaw/workspace/workspace.duckdb -json "
duckdb ~/.openclaw-ironclaw/workspace/workspace.duckdb -json "
SELECT o.id, o.name, o.description, o.icon, o.default_view,
(SELECT COUNT(*) FROM entries WHERE object_id = o.id) as entry_count
FROM objects o WHERE o.name = 'lead'
"
duckdb ~/.openclaw/workspace/workspace.duckdb -json "
duckdb ~/.openclaw-ironclaw/workspace/workspace.duckdb -json "
SELECT name, type, required, enum_values FROM fields
WHERE object_id = (SELECT id FROM objects WHERE name = 'lead')
ORDER BY sort_order
"
# 2. Write .object.yaml from the query results
mkdir -p ~/.openclaw/workspace/lead
cat > ~/.openclaw/workspace/lead/.object.yaml << 'YAML'
mkdir -p ~/.openclaw-ironclaw/workspace/lead
cat > ~/.openclaw-ironclaw/workspace/lead/.object.yaml << 'YAML'
id: "AbCdEfGh..."
name: "lead"
description: "Sales leads tracking"
@ -204,9 +204,9 @@ YAML
On every conversation:
1. Read `~/.openclaw/workspace/workspace_context.yaml` for org context, members, integrations, protected objects. **NEVER modify this file.**
1. Read `~/.openclaw-ironclaw/workspace/workspace_context.yaml` for org context, members, integrations, protected objects. **NEVER modify this file.**
2. Install duckdb if it doesn't exist: `curl https://install.duckdb.org | sh`
3. If `~/.openclaw/workspace/workspace.duckdb` does not exist, initialize it with the schema below.
3. If `~/.openclaw-ironclaw/workspace/workspace.duckdb` does not exist, initialize it with the schema below.
## workspace_context.yaml (READ-ONLY)
@ -222,7 +222,7 @@ This file is generated by Dench and synced via S3. It contains:
## DuckDB Schema
Initialize via `exec` with `duckdb ~/.openclaw/workspace/workspace.duckdb`:
Initialize via `exec` with `duckdb ~/.openclaw-ironclaw/workspace/workspace.duckdb`:
```sql
-- Nanoid 32 macro: generates IDs matching Dench's Supabase nanoid format
@ -345,7 +345,7 @@ SELECT * FROM v_leads WHERE "Email Address" LIKE '%@gmail.com';
## SQL Operations Reference
All operations use `exec` with `duckdb ~/.openclaw/workspace/workspace.duckdb`. Batch related SQL in a single exec call with transactions.
All operations use `exec` with `duckdb ~/.openclaw-ironclaw/workspace/workspace.duckdb`. Batch related SQL in a single exec call with transactions.
### Create Object
@ -430,13 +430,13 @@ DELETE FROM objects WHERE id = '<obj_id>' AND immutable = false;
### Bulk Import from CSV
```sql
COPY entries FROM '~/.openclaw/workspace/exports/import.csv' (AUTO_DETECT true);
COPY entries FROM '~/.openclaw-ironclaw/workspace/exports/import.csv' (AUTO_DETECT true);
```
### Export to CSV
```sql
COPY (SELECT * FROM v_leads) TO '~/.openclaw/workspace/exports/leads.csv' (HEADER true);
COPY (SELECT * FROM v_leads) TO '~/.openclaw-ironclaw/workspace/exports/leads.csv' (HEADER true);
```
## Full Workflow: Create CRM Structure in One Shot
@ -487,13 +487,13 @@ COMMIT;
**Step 2 — Filesystem: Create object directory + .object.yaml** (exec call):
```bash
mkdir -p ~/.openclaw/workspace/lead
mkdir -p ~/.openclaw-ironclaw/workspace/lead
# Query the object metadata from DuckDB to build .object.yaml
OBJ_ID=$(duckdb ~/.openclaw/workspace/workspace.duckdb -noheader -list "SELECT id FROM objects WHERE name = 'lead'")
ENTRY_COUNT=$(duckdb ~/.openclaw/workspace/workspace.duckdb -noheader -list "SELECT COUNT(*) FROM entries WHERE object_id = '$OBJ_ID'")
OBJ_ID=$(duckdb ~/.openclaw-ironclaw/workspace/workspace.duckdb -noheader -list "SELECT id FROM objects WHERE name = 'lead'")
ENTRY_COUNT=$(duckdb ~/.openclaw-ironclaw/workspace/workspace.duckdb -noheader -list "SELECT COUNT(*) FROM entries WHERE object_id = '$OBJ_ID'")
cat > ~/.openclaw/workspace/lead/.object.yaml << 'YAML'
cat > ~/.openclaw-ironclaw/workspace/lead/.object.yaml << 'YAML'
id: "<use actual $OBJ_ID>"
name: "lead"
description: "Sales leads tracking"
@ -526,9 +526,9 @@ YAML
```bash
# Verify view works
duckdb ~/.openclaw/workspace/workspace.duckdb "SELECT COUNT(*) FROM v_lead"
duckdb ~/.openclaw-ironclaw/workspace/workspace.duckdb "SELECT COUNT(*) FROM v_lead"
# Verify .object.yaml exists
cat ~/.openclaw/workspace/lead/.object.yaml
cat ~/.openclaw-ironclaw/workspace/lead/.object.yaml
```
## Kanban Boards
@ -578,8 +578,8 @@ COMMIT;
**Step 2 — Filesystem (MANDATORY):**
```bash
mkdir -p ~/.openclaw/workspace/task
cat > ~/.openclaw/workspace/task/.object.yaml << 'YAML'
mkdir -p ~/.openclaw-ironclaw/workspace/task
cat > ~/.openclaw-ironclaw/workspace/task/.object.yaml << 'YAML'
id: "<query from DuckDB>"
name: "task"
description: "Task tracking board"
@ -595,7 +595,7 @@ fields:
YAML
```
**Step 3 — Verify:** `duckdb ~/.openclaw/workspace/workspace.duckdb "SELECT COUNT(*) FROM v_task"` and `cat ~/.openclaw/workspace/task/.object.yaml`.
**Step 3 — Verify:** `duckdb ~/.openclaw-ironclaw/workspace/workspace.duckdb "SELECT COUNT(*) FROM v_task"` and `cat ~/.openclaw-ironclaw/workspace/task/.object.yaml`.
## Field Types Reference
@ -657,11 +657,11 @@ YAML
## Document Management
Documents are markdown files in `~/.openclaw/workspace/**`. The DuckDB `documents` table tracks metadata only; the `.md` file IS the content.
Documents are markdown files in `~/.openclaw-ironclaw/workspace/**`. The DuckDB `documents` table tracks metadata only; the `.md` file IS the content.
### Create Document
1. Write the `.md` file: `write ~/.openclaw/workspace/projects/roadmap.md`
1. Write the `.md` file: `write ~/.openclaw-ironclaw/workspace/projects/roadmap.md`
2. Insert metadata into DuckDB:
```sql
@ -708,8 +708,8 @@ You MUST complete ALL steps below after ANY schema mutation (create/update/delet
### After creating or modifying an OBJECT or its FIELDS:
- [ ] `CREATE OR REPLACE VIEW v_{object_name}` — regenerate the PIVOT view
- [ ] `mkdir -p ~/.openclaw/workspace/{object_name}/` — create the object directory
- [ ] Write `~/.openclaw/workspace/{object_name}/.object.yaml` — metadata projection with id, name, description, icon, default_view, entry_count, and full field list
- [ ] `mkdir -p ~/.openclaw-ironclaw/workspace/{object_name}/` — create the object directory
- [ ] Write `~/.openclaw-ironclaw/workspace/{object_name}/.object.yaml` — metadata projection with id, name, description, icon, default_view, entry_count, and full field list
- [ ] If object has a `parent_document_id`, place directory inside the parent document's directory
- [ ] Update `WORKSPACE.md` if it exists
@ -721,12 +721,12 @@ You MUST complete ALL steps below after ANY schema mutation (create/update/delet
### After deleting an OBJECT:
- [ ] `DROP VIEW IF EXISTS v_{object_name}` — remove the view
- [ ] `rm -rf ~/.openclaw/workspace/{object_name}/` — remove the directory (unless it contains nested documents that need relocating)
- [ ] `rm -rf ~/.openclaw-ironclaw/workspace/{object_name}/` — remove the directory (unless it contains nested documents that need relocating)
- [ ] Update `WORKSPACE.md`
### After creating or modifying a DOCUMENT:
- [ ] Write the `.md` file to the correct path in `~/.openclaw/workspace/**`
- [ ] Write the `.md` file to the correct path in `~/.openclaw-ironclaw/workspace/**`
- [ ] `INSERT INTO documents` — ensure metadata row exists with correct `file_path`, `parent_id`, or `parent_object_id`
These steps ensure the filesystem always mirrors DuckDB. The sidebar depends on `.object.yaml` files — if they are missing, objects will not appear.
@ -737,7 +737,7 @@ Reports are JSON config files (`.report.json`) that the web app renders as live
### Report file format
Store reports as `.report.json` files in `~/.openclaw/workspace/**` (wherever appropriate / create directories if you need for better structure). The JSON schema:
Store reports as `.report.json` files in `~/.openclaw-ironclaw/workspace/**` (wherever appropriate / create directories if you need for better structure). The JSON schema:
```json
{
@ -881,8 +881,8 @@ The user can then "Pin" the inline report to save it as a `.report.json` file.
After creating a `.report.json` file:
- [ ] Verify the report JSON is valid and all SQL queries work: test each panel's SQL individually
- [ ] Choose which directory the report should be created in `~/.openclaw/workspace` based on the context of the conversation, if nothing vert relevant, create/use the `~/.openclaw/workspace/reports/` directory.
- [ ] Write the file: `~/.openclaw/workspace/**/{slug}.report.json`
- [ ] Choose which directory the report should be created in `~/.openclaw-ironclaw/workspace` based on the context of the conversation, if nothing vert relevant, create/use the `~/.openclaw-ironclaw/workspace/reports/` directory.
- [ ] Write the file: `~/.openclaw-ironclaw/workspace/**/{slug}.report.json`
- [ ] Tell the user they can view it in the workspace sidebar under whichever directory it was rightfully placed in based on the context.
### Choosing the right chart type