refactor: moved org-agent to its own repository as a submodule
This commit is contained in:
64
projects/org-agent-memex/ARCHITECTURE.org
Normal file
64
projects/org-agent-memex/ARCHITECTURE.org
Normal file
@@ -0,0 +1,64 @@
|
||||
#+TITLE: Org-Agent Memex Architecture Notes
|
||||
#+AUTHOR: Amr
|
||||
#+CREATED: [2026-03-17 Tue]
|
||||
#+BEGIN_COMMENT
|
||||
Core architectural principles and design decisions for the org-agent memex system.
|
||||
#+END_COMMENT
|
||||
|
||||
* Core Philosophy: Single User, Single Agent
|
||||
|
||||
** Why This Scope?
|
||||
|
||||
The system is deliberately designed for *one human, one AI assistant*:
|
||||
|
||||
- **No coordination complexity**: One agent owns one workflow (Scribe = Atomic Notes (Zettelkasten) distillation, GTD Manager = task promotion)
|
||||
- **No conflict resolution**: Agent reads from immutable sources (daily logs) and writes to separate targets (atomic notes, GTD promotions)
|
||||
- **No multi-agent negotiation**: The assistant doesn't delegate to sub-agents; it executes skills directly
|
||||
|
||||
This is *not* a multi-agent orchestration system. It's personal automation.
|
||||
|
||||
* Generalization via Environment Variables
|
||||
|
||||
** Principle: Build with generalization, keep variable values out**
|
||||
|
||||
All identity-specific and configuration values live in `.env`:
|
||||
|
||||
| Variable | Purpose |
|
||||
|----------|---------|
|
||||
| MEMEX_USER | The human user's name (e.g., "Amr") |
|
||||
| MEMEX_ASSISTANT | The AI assistant's identifier (e.g., "Agent") |
|
||||
| CURRENT_TEXT_MANIPULATION_MODEL | The LLM tier for text processing |
|
||||
| MEMEX_* paths | Folder structure (PARA hierarchy) |
|
||||
|
||||
Skills reference these as `$VARIABLE` in scripts or get instructed to use them. No hardcoded names in skill logic.
|
||||
|
||||
* Source of Simplicity
|
||||
|
||||
** What makes this project tractable:**
|
||||
|
||||
1. *Standing on established frameworks*: Org-mode, Atomic Notes (Zettelkasten) method, GTD, PARA organization—the hard thinking is already done
|
||||
2. *Git as state machine*: Rather than building custom sync or consensus, we use Git commits as the source of truth for "what's new"
|
||||
3. *Immutable sources*: Daily logs are append-only; the Scribe never writes to them
|
||||
4. *Deterministic outputs*: Atomic notes have clear rules (concept-filenames, id: backlinks, no dates in names)
|
||||
|
||||
** What we're NOT building** (which would add complexity):
|
||||
- Multi-user collaborative editing
|
||||
- Real-time synchronization across devices
|
||||
- Agent-to-agent task delegation protocols
|
||||
- Distributed state management
|
||||
- Conflict resolution for simultaneous edits
|
||||
|
||||
The complexity is in the *workflow logic*, not the technical infrastructure.
|
||||
|
||||
* Future: Linking with Native Org-Agent
|
||||
|
||||
** Phase 1** (current): OpenClaw orchestrates cloud LLMs using SKILL.md definitions
|
||||
** Phase 2** (future): Native `org-agent` (Common Lisp) executes the same skills locally
|
||||
|
||||
The interface remains constant:
|
||||
- Skill definitions in Org-mode format (SKILL.md)
|
||||
- .env configuration
|
||||
- PARA folder structure
|
||||
- Git-based state tracking
|
||||
|
||||
When `org-agent` matures, it can read and execute the same skill files we're writing today. The transition from cloud-based to local inference becomes seamless because the *specification* (Org files) is implementation-agnostic.
|
||||
54
projects/org-agent-memex/README.org
Normal file
54
projects/org-agent-memex/README.org
Normal file
@@ -0,0 +1,54 @@
|
||||
#+TITLE: Atomic Notes (Zettelkasten) & GTD in Org-mode Project
|
||||
#+AUTHOR: Amero Garcia
|
||||
#+CREATED: [2026-03-16 Mon 14:00]
|
||||
#+BEGIN_COMMENT
|
||||
This file outlines the project to design, implement, and document a comprehensive, integrated workflow for Atomic Notes (Zettelkasten) and GTD using Org-mode, with the ultimate output being an agent skill.
|
||||
#+END_COMMENT
|
||||
|
||||
* Atomic Notes (Zettelkasten) & GTD in Org-mode Project
|
||||
|
||||
*Goal:** To design, implement, and document a comprehensive, integrated workflow for Atomic Notes (Zettelkasten) (knowledge management) and Getting Things Done (GTD - task management) using Org-mode. *The ultimate output of this project will be an agent skill.**
|
||||
|
||||
*Key Integrations:**
|
||||
- *Emacs:** Primary access and powerful Org-mode features.
|
||||
- *Android Tools:** Ensure seamless access and functionality via Markor and Orgzly (revived).
|
||||
|
||||
*Strategic Importance:** This system will become the primary coordination method for our work, outside of direct chat communication. It will centralize task tracking, knowledge capture, and project management.
|
||||
|
||||
*Workflow Details & Current Setup (as provided by Amr):**
|
||||
- *Org-mode File Front Matter:** For each Org-mode file, there must be a basic front matter. At minimum, this must include a `#+TITLE:`, an `#+AUTHOR:`, and a `#+CREATED:` date. Short descriptive comments within a `#+BEGIN_COMMENT` / `#+END_COMMENT` block are also highly recommended.
|
||||
- *Inbox File:** `memex/inbox.org`. All new captured items will go here. No other files in the inbox collection are to be used for general inbox capture.
|
||||
- *GTD.org Structure:** Contains four top-level `*` headings:
|
||||
- `* Actions`: For standalone actionable items.
|
||||
- `* Projects`: Contains `*` headers for each project, with `***` headers for actionable items within those projects.
|
||||
- `* Incubate`: For placeholders for future projects.
|
||||
- `* Habits`: Tracks recurring personal habits, potentially to be used as a heartbeat for the new AI agent.
|
||||
- *:CREATED: Property:** All items in `memex/inbox.org` and `GTD.org` must include a `:CREATED:` property in their `:PROPERTIES:` drawer. The date format is `[YYYY-MM-DD Day HH:MM]`.
|
||||
- *:LOGBOOK: Drawer:** All task items must include a `:LOGBOOK:` drawer AFTER the `:PROPERTIES:` drawer (not nested inside). State changes are logged as `- State "NEW" from "OLD" [timestamp]`. This tracks the full history of state transitions for each task.
|
||||
- *Org-Todo States:** Items will use the following `org-todo` keywords to indicate status: `NEXT`, `TODO`, `WAIT`, `DONE`, `CNCL`. It is understood that these states are used to make tasks appear in Amr's Emacs and Orgzly agendas, serving as a direct mechanism for communicating required actions.
|
||||
- *Authorship & Assignment:** Confirmed use of `:AUTHOR:` (for original creator) and `:ASSIGNED:` (for current responsible individual). It is noted that filtering by `:ASSIGNED:` is possible in Emacs, with potential uncertainties for Orgzly.
|
||||
- *User Interaction Requirements (Emacs, Orgzly, Markor):**
|
||||
- Ability to follow status of actionable items in Org-zly and Emacs agendas.
|
||||
- Ability to read and write Org-mode files in Emacs and Markor.
|
||||
- Ability to find out and manipulate `TODO` items in Org-zly and Emacs agendas.
|
||||
- *Agent-User Coordination Mechanism:** The agent will place items requiring Amr's attention as `TODO` (general planned items) and `NEXT` (immediate, high-priority actions) in his agenda.
|
||||
- *Automatic `NEXT` Promotion:** A critical feature to integrate is the automatic promotion of a `TODO` item to `NEXT` in `org-gtd` once the preceding `NEXT` item (within a sequential *Project*) is marked `DONE`. This behavior specifically applies to interdependent or sequential items that constitute a `Project`. Standalone `NEXT` items (e.g., under `* Actions`) are `NEXT` by default and do not trigger subsequent promotions. This behavior must be accounted for in the agent skill.
|
||||
|
||||
*Initial Scope:**
|
||||
- Ensure all items I create or modify adhere strictly to the `:CREATED:` property format and `org-todo` states.
|
||||
- Implement the proposed `:AUTHOR:` and `:ASSIGNED:` properties for collaborative items.
|
||||
- Defining specific Org-mode structures for Atomic Notes (Zettelkasten) notes (unique IDs, linking, tags), building upon existing GTD structure.
|
||||
- Establishing workflows for daily capture, processing, and review aligned with Amr's system.
|
||||
- Exploring and configuring Markor and Orgzly for optimal mobile interaction with Org files.
|
||||
- Documenting the entire workflow for clarity and ease of use.
|
||||
|
||||
*Information Needed from Amr:**
|
||||
- Confirmation or modification of the proposed `:AUTHOR:` and `:ASSIGNEE:` properties (e.g., preferred format for names, single vs. multiple assignees).
|
||||
- Specific requirements or desired features for mobile access/editing with tools like Markor and Orgzly.
|
||||
- Your vision for how this system will function as our *"main coordination method"** in practice.
|
||||
- Any existing Org-mode Atomic Notes (Zettelkasten) practices you currently use or prefer.
|
||||
|
||||
*Next Steps:**
|
||||
1. Gather Amr's current practices and specific requirements.
|
||||
2. Begin outlining core Org-mode structures for both Atomic Notes (Zettelkasten) and GTD.
|
||||
3. Research best practices for mobile Org-mode synchronization and editing with Markor/Orgzly.
|
||||
19
projects/org-agent-memex/org-agent-memex-gtd/README.md
Normal file
19
projects/org-agent-memex/org-agent-memex-gtd/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Org-Agent Memex GTD (org-agent-memex-gtd)
|
||||
|
||||
This is the task management counterpart to the Atomic Notes (Atomic Notes (Zettelkasten)) skill. It automates the GTD (Getting Things Done) workflows within your Org-mode environment.
|
||||
|
||||
## Features
|
||||
|
||||
1. **Sequential Project Auto-Promotion:** When you complete a `NEXT` action inside a sequential project in `gtd.org` (marking it `DONE`), this skill automatically finds the subsequent `TODO` item and promotes it to `NEXT`. This ensures your Org Agenda is always populated with the very next actionable steps without manual intervention.
|
||||
2. **Inbox Processing Assistance:** Provides an automated routine to read through `inbox.org`, categorize items, and propose where they should be filed in `gtd.org` (e.g., under `* Actions` or specific `* Projects`).
|
||||
3. **Collaboration Setup:** Standardizes the use of `:AUTHOR:` and `:ASSIGNED:` properties so you and the AI agent can delegate tasks to each other seamlessly.
|
||||
|
||||
## Configuration
|
||||
|
||||
Relies on the same `.env` file used by the Atomic Notes (Atomic Notes (Zettelkasten)) module, specifically:
|
||||
- `MEMEX_DIR` - Base memex directory
|
||||
- `MEMEX_INBOX` - Inbox file (e.g., `memex/inbox.org`)
|
||||
- `MEMEX_SYSTEM` - System directory for skills
|
||||
|
||||
## Setup
|
||||
Like the Scribe agent, this skill can be run ad-hoc by asking your AI assistant to "Run the GTD manager" or scheduled as a background cron job to periodically audit and update task statuses.
|
||||
61
projects/org-agent-memex/org-agent-memex-gtd/SKILL.md
Normal file
61
projects/org-agent-memex/org-agent-memex-gtd/SKILL.md
Normal file
@@ -0,0 +1,61 @@
|
||||
---
|
||||
name: org-agent-memex-gtd
|
||||
description: "Automate Getting Things Done (GTD) workflows in Emacs Org-mode. Auto-promotes TODO to NEXT in sequential projects and processes the inbox. Use when: user asks to manage tasks, update GTD, promote NEXT actions, or process the inbox. NOT for: extracting Atomic Notes (Atomic Notes (Zettelkasten)) knowledge or editing daily logs."
|
||||
homepage: ""
|
||||
metadata: { "openclaw": { "emoji": "✅", "requires": { "bins": ["grep", "sed"] }, "user-invocable": true } }
|
||||
---
|
||||
|
||||
# Org-Agent Memex GTD
|
||||
|
||||
Automated GTD manager designed to keep your task lists fluid and your Org Agenda accurate. It handles the structural logic of sequential projects and helps clarify your inbox.
|
||||
|
||||
## When to Use
|
||||
|
||||
✅ **USE this skill when:**
|
||||
- The user asks to "update GTD", "promote next actions", or "manage tasks".
|
||||
- The user completes a task in a project and wants the next one queued up.
|
||||
- The user asks to "process the inbox" or "clarify inbox tasks".
|
||||
|
||||
❌ **DON'T use this skill when:**
|
||||
- Working with Atomic Notes (Atomic Notes (Zettelkasten)), evergreen notes, or daily logs (use `org-agent-memex-zettlekasten`).
|
||||
- Just capturing a quick thought (user should do this via Emacs).
|
||||
|
||||
## Instructions
|
||||
|
||||
### Action 1: Auto-Promote Sequential Tasks (`gtd.org`)
|
||||
When asked to update projects or promote NEXT actions:
|
||||
1. Read the `gtd.org` file (located in `$MEMEX_DIR/gtd.org`).
|
||||
2. Identify sequential projects (under `* Projects`).
|
||||
3. Look for the most recently completed tasks (marked `DONE`).
|
||||
4. If a task was marked `DONE`, find the immediate next sibling heading that is marked `TODO` within the same parent project.
|
||||
5. Change that `TODO` to `NEXT`.
|
||||
6. Ensure that standalone actions (under `* Actions`) are left alone (they are typically parallel, not sequential).
|
||||
7. Save the file and report which tasks were promoted to `NEXT`.
|
||||
|
||||
### Action 2: Inbox Processing (`inbox.org`)
|
||||
When asked to process the inbox:
|
||||
1. Read `$MEMEX_INBOX`.
|
||||
2. For each raw entry, determine if it is actionable.
|
||||
3. If actionable, propose a structured Org-mode task format with:
|
||||
- `TODO` or `NEXT` state
|
||||
- `:PROPERTIES:` drawer with `:CREATED:` and optional `:ASSIGNED:`
|
||||
- `:LOGBOOK:` drawer (AFTER :PROPERTIES:, not inside) tracking state changes
|
||||
|
||||
Format:
|
||||
```org
|
||||
*** TODO Task Name
|
||||
:PROPERTIES:
|
||||
:CREATED: [YYYY-MM-DD Day HH:MM]
|
||||
:ASSIGNED: $MEMEX_USER
|
||||
:END:
|
||||
:LOGBOOK:
|
||||
- State "TODO" from "" [YYYY-MM-DD Day HH:MM]
|
||||
:END:
|
||||
```
|
||||
4. Propose which section of `gtd.org` it belongs to (e.g., a specific project or standalone `* Actions`).
|
||||
5. Ask the user for confirmation before moving the items out of `inbox.org` into `gtd.org`.
|
||||
|
||||
## Notes
|
||||
- **Timestamps:** Ensure every new task generated or moved retains or receives a `:CREATED:` property formatted as `[YYYY-MM-DD Day HH:MM]`.
|
||||
- **Assignment:** The agent can assign tasks to itself by setting `:ASSIGNED: $MEMEX_ASSISTANT` or to the user via `:ASSIGNED: $MEMEX_USER`. Configure these values in your `.env` file.
|
||||
- **State Tracking:** The `:LOGBOOK:` drawer must appear AFTER the `:PROPERTIES:` drawer (not nested inside). State changes are logged as `- State "NEW" from "OLD" [timestamp]`. When a task changes state (e.g., TODO → NEXT, or TODO → DONE), append a new line to the LOGBOOK drawer.
|
||||
@@ -0,0 +1,19 @@
|
||||
# Org-Agent Memex GTD (org-agent-memex-gtd)
|
||||
|
||||
This is the task management counterpart to the Atomic Notes (Atomic Notes (Zettelkasten)) skill. It automates the GTD (Getting Things Done) workflows within your Org-mode environment.
|
||||
|
||||
## Features
|
||||
|
||||
1. **Sequential Project Auto-Promotion:** When you complete a `NEXT` action inside a sequential project in `gtd.org` (marking it `DONE`), this skill automatically finds the subsequent `TODO` item and promotes it to `NEXT`. This ensures your Org Agenda is always populated with the very next actionable steps without manual intervention.
|
||||
2. **Inbox Processing Assistance:** Provides an automated routine to read through `inbox.org`, categorize items, and propose where they should be filed in `gtd.org` (e.g., under `* Actions` or specific `* Projects`).
|
||||
3. **Collaboration Setup:** Standardizes the use of `:AUTHOR:` and `:ASSIGNED:` properties so you and the AI agent can delegate tasks to each other seamlessly.
|
||||
|
||||
## Configuration
|
||||
|
||||
Relies on the same `.env` file used by the Atomic Notes (Atomic Notes (Zettelkasten)) module, specifically:
|
||||
- `MEMEX_DIR` - Base memex directory
|
||||
- `MEMEX_INBOX` - Inbox file (e.g., `memex/inbox.org`)
|
||||
- `MEMEX_SYSTEM` - System directory for skills
|
||||
|
||||
## Setup
|
||||
Like the Scribe agent, this skill can be run ad-hoc by asking your AI assistant to "Run the GTD manager" or scheduled as a background cron job to periodically audit and update task statuses.
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
name: org-agent-memex-gtd
|
||||
description: "Automate Getting Things Done (GTD) workflows in Emacs Org-mode. Auto-promotes TODO to NEXT in sequential projects and processes the inbox. Use when: user asks to manage tasks, update GTD, promote NEXT actions, or process the inbox. NOT for: extracting Atomic Notes (Atomic Notes (Zettelkasten)) knowledge or editing daily logs."
|
||||
homepage: ""
|
||||
metadata: { "openclaw": { "emoji": "✅", "requires": { "bins": ["grep", "sed"] }, "user-invocable": true } }
|
||||
---
|
||||
|
||||
# Org-Agent Memex GTD
|
||||
|
||||
Automated GTD manager designed to keep your task lists fluid and your Org Agenda accurate. It handles the structural logic of sequential projects and helps clarify your inbox.
|
||||
|
||||
## When to Use
|
||||
|
||||
✅ **USE this skill when:**
|
||||
- The user asks to "update GTD", "promote next actions", or "manage tasks".
|
||||
- The user completes a task in a project and wants the next one queued up.
|
||||
- The user asks to "process the inbox" or "clarify inbox tasks".
|
||||
|
||||
❌ **DON'T use this skill when:**
|
||||
- Working with Atomic Notes (Atomic Notes (Zettelkasten)), evergreen notes, or daily logs (use `org-agent-memex-zettlekasten`).
|
||||
- Just capturing a quick thought (user should do this via Emacs).
|
||||
|
||||
## Instructions
|
||||
|
||||
### Action 1: Auto-Promote Sequential Tasks (`gtd.org`)
|
||||
When asked to update projects or promote NEXT actions:
|
||||
1. Read the `gtd.org` file (located in `$MEMEX_DIR/gtd.org`).
|
||||
2. Identify sequential projects (under `* Projects`).
|
||||
3. Look for the most recently completed tasks (marked `DONE`).
|
||||
4. If a task was marked `DONE`, find the immediate next sibling heading that is marked `TODO` within the same parent project.
|
||||
5. Change that `TODO` to `NEXT`.
|
||||
6. Ensure that standalone actions (under `* Actions`) are left alone (they are typically parallel, not sequential).
|
||||
7. Save the file and report which tasks were promoted to `NEXT`.
|
||||
|
||||
### Action 2: Inbox Processing (`inbox.org`)
|
||||
When asked to process the inbox:
|
||||
1. Read `$MEMEX_INBOX`.
|
||||
2. For each raw entry, determine if it is actionable.
|
||||
3. If actionable, propose a structured Org-mode task format with:
|
||||
- `TODO` or `NEXT` state
|
||||
- `:PROPERTIES:` drawer with `:CREATED:` and optional `:ASSIGNED:`
|
||||
- `:LOGBOOK:` drawer (AFTER :PROPERTIES:, not inside) tracking state changes
|
||||
|
||||
Format:
|
||||
```org
|
||||
*** TODO Task Name
|
||||
:PROPERTIES:
|
||||
:CREATED: [YYYY-MM-DD Day HH:MM]
|
||||
:ASSIGNED: $MEMEX_USER
|
||||
:END:
|
||||
:LOGBOOK:
|
||||
- State "TODO" from "" [YYYY-MM-DD Day HH:MM]
|
||||
:END:
|
||||
```
|
||||
4. Propose which section of `gtd.org` it belongs to (e.g., a specific project or standalone `* Actions`).
|
||||
5. Ask the user for confirmation before moving the items out of `inbox.org` into `gtd.org`.
|
||||
|
||||
## Notes
|
||||
- **Timestamps:** Ensure every new task generated or moved retains or receives a `:CREATED:` property formatted as `[YYYY-MM-DD Day HH:MM]`.
|
||||
- **Assignment:** The agent can assign tasks to itself by setting `:ASSIGNED: $MEMEX_ASSISTANT` or to the user via `:ASSIGNED: $MEMEX_USER`. Configure these values in your `.env` file.
|
||||
- **State Tracking:** The `:LOGBOOK:` drawer must appear AFTER the `:PROPERTIES:` drawer (not nested inside). State changes are logged as `- State "NEW" from "OLD" [timestamp]`. When a task changes state (e.g., TODO → NEXT, or TODO → DONE), append a new line to the LOGBOOK drawer.
|
||||
@@ -0,0 +1,43 @@
|
||||
# GTD Work Breakdown (org-agent-memex-workbreakdown)
|
||||
|
||||
Meta-cognitive skill to prevent AI assistants and users from stalling on complex tasks. Forces atomic decomposition before execution.
|
||||
|
||||
## The Problem
|
||||
|
||||
Complex tasks cause:
|
||||
- Context saturation (procrastination)
|
||||
- Scope creep (adding "just one more thing")
|
||||
- The "heartbeat loop" (repeating tasks without progress)
|
||||
- Overwhelm and hesitation
|
||||
|
||||
## The Solution
|
||||
|
||||
**Decompose first, execute second.**
|
||||
|
||||
1. Analyze task complexity (>3 steps? >2 files?)
|
||||
2. Break into atomic TODOs in GTD.org
|
||||
3. Execute only the FIRST item
|
||||
4. Yield back to user
|
||||
|
||||
## Configuration
|
||||
|
||||
Uses same `.env` structure as other org-agent-memex skills:
|
||||
- `MEMEX_DIR`
|
||||
- `MEMEX_USER`
|
||||
- `MEMEX_ASSISTANT`
|
||||
- `CURRENT_TEXT_MANIPULATION_MODEL`
|
||||
|
||||
## Usage
|
||||
|
||||
When a task feels complex:
|
||||
1. Ask AI: "Break this down with Work Breakdown skill"
|
||||
2. AI creates TODOs in GTD.org
|
||||
3. Execute only first item
|
||||
4. Report: "[X] Completed step 1. 4 tasks remaining. Continue?"
|
||||
|
||||
## Anti-Patterns This Prevents
|
||||
|
||||
- "I'll just do it all at once"
|
||||
- Editing 5+ files before committing
|
||||
- Writing conditional logic on the fly
|
||||
- "Let me think about it..." (stalling)
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
name: org-agent-memex-workbreakdown
|
||||
description: "Break down complex tasks into atomic TODOs before execution. Use when: a task feels complex, involves multiple files, or may cause context saturation. Prevents procrastination by forcing decomposition. NOT for: simple single-step tasks."
|
||||
homepage: ""
|
||||
metadata: { "openclaw": { "emoji": "🔨", "requires": { "bins": [] }, "user-invocable": true } }
|
||||
---
|
||||
|
||||
# GTD Work Breakdown Skill
|
||||
|
||||
Meta-cognitive protocol to prevent stalling and context saturation.
|
||||
|
||||
## When to Use
|
||||
|
||||
✅ **USE this skill when:**
|
||||
- A task feels "complex" or overwhelming
|
||||
- It involves editing more than 3 files
|
||||
- It requires holding multiple concepts in working memory
|
||||
- You feel the urge to apologize or hesitate (procrastination signal)
|
||||
- The task description is longer than 2 sentences
|
||||
|
||||
❌ **DON'T use this skill when:**
|
||||
- Simple single-file edit
|
||||
- Direct question/answer
|
||||
- Already-broken-down TODO from GTD
|
||||
|
||||
## Instructions
|
||||
|
||||
### The Decomposition Protocol
|
||||
|
||||
When invoked, BEFORE executing any other action:
|
||||
|
||||
1. **Analyze Complexity**: Ask "How many discrete steps does this actually require?"
|
||||
2. **Breakdown Threshold**: If >3 steps or >2 files affected, MUST decompose
|
||||
3. **Create TODOs**: Write each atomic step as a separate `TODO` in `GTD.org` under appropriate project
|
||||
4. **Assign Ownership**: Each TODO gets `:ASSIGNED: $MEMEX_USER` or `:ASSIGNED: $MEMEX_ASSISTANT`
|
||||
5. **Set FIRST**: Mark only the first TODO as `NEXT`, rest remain `TODO`
|
||||
6. **Execute First**: Complete ONLY the `NEXT` item
|
||||
7. **Yield**: After completion, report to user: "[X] Completed [first task]. [N] tasks remaining in GTD. Continue?"
|
||||
|
||||
### Anti-Pattern Detection
|
||||
|
||||
If you find yourself:
|
||||
- Thinking "I'll just do it all at once"
|
||||
- Planning to edit >5 files before committing
|
||||
- Writing conditional logic on the fly
|
||||
|
||||
STOP. Invoke this skill immediately.
|
||||
|
||||
## Complexity Checklist
|
||||
|
||||
Before executing any task, ask:
|
||||
- [ ] Can I complete this in under 5 minutes?
|
||||
- [ ] Does it touch only 1 file?
|
||||
- [ ] Is the outcome predictable?
|
||||
|
||||
If ANY answer is "No", decompose first.
|
||||
@@ -0,0 +1,19 @@
|
||||
MEMEX_DIR="memex"
|
||||
MEMEX_INBOX="memex/inbox.org"
|
||||
MEMEX_DAILY="memex/1_daily"
|
||||
MEMEX_NOTES="memex/2_notes"
|
||||
MEMEX_DRAFTS="memex/3_drafts"
|
||||
MEMEX_PUBLISHED="memex/4_published"
|
||||
MEMEX_PROJECTS="memex/5_projects"
|
||||
MEMEX_AREAS="memex/6_areas"
|
||||
MEMEX_RESOURCES="memex/7_resources"
|
||||
MEMEX_ARCHIVES="memex/8_archives"
|
||||
MEMEX_SYSTEM="memex/9_system"
|
||||
MEMEX_ATTACHMENTS="memex/attachments"
|
||||
|
||||
# Model Configuration
|
||||
CURRENT_TEXT_MANIPULATION_MODEL="google-gemini-cli/gemini-3.1-flash"
|
||||
|
||||
# Identity Configuration
|
||||
MEMEX_USER="Amr"
|
||||
MEMEX_ASSISTANT="Agent"
|
||||
@@ -0,0 +1,33 @@
|
||||
# Atomic Notes (Atomic Notes (Zettelkasten)) & GTD Automation (org-agent-memex-zettlekasten)
|
||||
|
||||
This system uses a hybrid approach to Personal Knowledge Management (PKM). It leverages Emacs Org-mode for low-friction, structured capture into daily logs, and an OpenClaw AI Sub-Agent ("The Scribe") to nightly distill these raw thoughts into an evergreen, atomic Atomic Notes (Atomic Notes (Zettelkasten)).
|
||||
|
||||
## 1. Environment Configuration (`.env`)
|
||||
To ensure Emacs, OpenClaw, and the Scribe Agent all agree on where files live, we use a single `.env` file at the root of the workspace.
|
||||
|
||||
**Action:**
|
||||
Copy `.env.example` to `.env` and adjust the paths to match your preferred directory structure.
|
||||
|
||||
## 2. Emacs Org-Capture Setup
|
||||
All captures route to the current day's log (e.g. `$MEMEX_DAILY/YYYY-MM-DD.org`), preserving the raw chronological context.
|
||||
|
||||
**Action:**
|
||||
Add the Emacs Lisp snippet from `init-atomic-notes.el` to your `init.el` or `config.el` to set up your capture templates dynamically using the `.env` variables.
|
||||
|
||||
## 3. The Distillation State Tracker
|
||||
The Scribe Agent uses a JSON file to remember the last Git commit it processed, preventing it from distilling the same notes twice or modifying the daily logs directly.
|
||||
|
||||
**Action:**
|
||||
Run `./install.sh` to initialize the directory structure and create the state file (`$MEMEX_SYSTEM/distillation-state.json`) automatically.
|
||||
|
||||
## 4. OpenClaw Cron Job (The Scribe Agent)
|
||||
The final piece is the scheduled automation. We create a cron job in OpenClaw that runs every night, reads the diffs, and creates atomic notes.
|
||||
|
||||
**Action:**
|
||||
1. Move `openclaw-scribe-skill.org` into your `$MEMEX_SYSTEM/skills/` folder.
|
||||
2. Ask your OpenClaw orchestrator/assistant to schedule the Scribe Agent using the `cron` tool, referencing the prompt defined in `$MEMEX_SYSTEM/skills/Scribe-Agent.org` or your renamed skill file.
|
||||
3. Configure the cron job to use the model specified in `CURRENT_TEXT_MANIPULATION_MODEL` within your `.env` file (e.g., `google-gemini-cli/gemini-3.1-flash`). You can update this `.env` variable periodically to stay on the most cost-effective text manipulation model.
|
||||
|
||||
### Architecture Rules:
|
||||
- **Dailies are Immutable:** The Scribe reads `$MEMEX_DAILY/` but NEVER writes to it.
|
||||
- **Evergreen Notes:** The Scribe extracts concepts, generates descriptive snake_case filenames (no dates), and writes them to `$MEMEX_NOTES/` with a `Source:` backlink using an Org-ID reference (`id:`) to the original daily file.
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
name: org-agent-memex-zettlekasten
|
||||
description: "Automate the nightly distillation of Emacs Org-mode daily logs into atomic Atomic Notes (Atomic Notes (Zettelkasten)) notes. Use when: user wants to run the Scribe distillation pipeline, process daily captures, or extract Atomic Notes (Atomic Notes (Zettelkasten)) notes. NOT for: generic org-mode editing or GTD task management."
|
||||
homepage: ""
|
||||
metadata: { "openclaw": { "emoji": "🧠", "requires": { "bins": ["git"] }, "user-invocable": true } }
|
||||
---
|
||||
|
||||
# Org-Agent Memex Atomic Notes (Atomic Notes (Zettelkasten)) (The Scribe)
|
||||
|
||||
Automated distillation skill designed to process raw daily captures into permanent atomic notes for your Atomic Notes (Atomic Notes (Zettelkasten)). It reads the raw chronological logs, identifies newly captured concepts, and extracts them into self-contained evergreen notes with proper Org-Roam `id:` backlinks.
|
||||
|
||||
## When to Use
|
||||
|
||||
✅ **USE this skill when:**
|
||||
- Running the nightly Atomic Notes (Atomic Notes (Zettelkasten)) distillation pipeline.
|
||||
- User asks to "distill my daily notes", "run the scribe", or "process captures".
|
||||
- Automating atomic note extraction via cron jobs.
|
||||
|
||||
❌ **DON'T use this skill when:**
|
||||
- Editing standard GTD task lists.
|
||||
- Capturing new notes (that's the user's job via Emacs `org-capture`).
|
||||
- Modifying the daily logs (dailies are immutable).
|
||||
|
||||
## Instructions
|
||||
|
||||
When triggered to distill the notes, execute the following strict pipeline:
|
||||
|
||||
1. **Read State:** Read the distillation state file (defined by `$MEMEX_SYSTEM/distillation-state.json`) to get the `lastProcessedCommit` hash.
|
||||
2. **Find New Captures:** Run a Git diff on the daily directory since that commit:
|
||||
```bash
|
||||
git diff <last_commit_hash> HEAD -- $MEMEX_DAILY
|
||||
```
|
||||
3. **Process Each Capture:**
|
||||
For every new Atomic Notes (Atomic Notes (Zettelkasten)) capture found in the diff:
|
||||
- Read the raw capture text.
|
||||
- Determine the core concept being discussed.
|
||||
- Generate a concise, `snake_case` filename (e.g., `core_concept_name.org`). Do NOT use dates in this filename.
|
||||
- Write the content to the notes directory (`$MEMEX_NOTES/<filename>`).
|
||||
- Ensure the new note is formatted as an atomic Org-mode note with an `#+ID` and a `Source:` backlink using an `id:` reference pointing back to the original daily file.
|
||||
4. **Update State:** Update the distillation state JSON file with the current HEAD commit hash.
|
||||
5. **Report:** Output a summary of the concepts extracted and the files created.
|
||||
|
||||
## Configuration
|
||||
|
||||
This skill expects the environment to be configured via a `.env` file containing at least:
|
||||
- `MEMEX_DAILY` - Directory containing daily logs (e.g., `memex/1_daily`)
|
||||
- `MEMEX_NOTES` - Directory for evergreen atomic notes (e.g., `memex/2_notes`)
|
||||
- `MEMEX_SYSTEM` - Directory for system files and state (e.g., `memex/9_system`)
|
||||
- `CURRENT_TEXT_MANIPULATION_MODEL` - The LLM to use for cron execution (e.g., `google-gemini-cli/gemini-3.1-flash`)
|
||||
|
||||
## Notes
|
||||
|
||||
- **Immutability:** The daily logs are raw, immutable records. Never modify them destructively during processing.
|
||||
- **Evergreen:** Atomic notes should focus on concepts, not chronology.
|
||||
@@ -0,0 +1,10 @@
|
||||
(setq org-capture-templates
|
||||
'(("z" "Atomic Notes (Zettelkasten) (Captures to Daily)")
|
||||
("zf" "Fleeting Note" entry (file+olp+datetree (expand-file-name (format "%s/%%<%%Y-%%m-%%d>.org" (getenv "MEMEX_DAILY"))))
|
||||
"* Fleeting Note: %?\n :PROPERTIES:\n :ID: %u\n :CREATED: %U\n :END:\n\n %i")
|
||||
("zl" "Draft Literature Note" entry (file+olp+datetree (expand-file-name (format "%s/%%<%%Y-%%m-%%d>.org" (getenv "MEMEX_DAILY"))))
|
||||
"* Literature Note: %?\n :PROPERTIES:\n :ID: %u\n :CREATED: %U\n :AUTHOR: \n :SOURCE: \n :END:\n\n *Summary:*\n %?\n\n *Key Insights:*\n - ")
|
||||
("zp" "Draft Permanent Note" entry (file+olp+datetree (expand-file-name (format "%s/%%<%%Y-%%m-%%d>.org" (getenv "MEMEX_DAILY"))))
|
||||
"* Permanent Note: %?\n :PROPERTIES:\n :ID: %u\n :CREATED: %U\n :LINKS: \n :END:\n\n *Concept:*\n %?\n\n *References:*\n - ")
|
||||
("t" "GTD - Task / Inbox" entry (file (getenv "MEMEX_INBOX"))
|
||||
"* TODO %?\n :PROPERTIES:\n: :CREATED: %U\n :END:\n :LOGBOOK:\n - State \"TODO\" from \"\" [%U]\n :END:\n\n %i\n %a")))
|
||||
110
projects/org-agent-memex/org-agent-memex-zettlekasten/install.sh
Executable file
110
projects/org-agent-memex/org-agent-memex-zettlekasten/install.sh
Executable file
@@ -0,0 +1,110 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Load .env if it exists, otherwise use defaults
|
||||
if [ -f ".env" ]; then
|
||||
source .env
|
||||
else
|
||||
echo "Creating .env from .env.example..."
|
||||
cp .env.example .env
|
||||
source .env
|
||||
fi
|
||||
|
||||
echo "Creating directory structure..."
|
||||
# Ensure MEMEX_DIR is available, fallback if not set
|
||||
MEMEX_DIR="${MEMEX_DIR:-memex}"
|
||||
|
||||
mkdir -p "$MEMEX_DIR/0_inbox" "$MEMEX_DAILY" "$MEMEX_NOTES" "$MEMEX_DRAFTS" "$MEMEX_PUBLISHED" "$MEMEX_PROJECTS" "$MEMEX_AREAS" "$MEMEX_RESOURCES" "$MEMEX_ARCHIVES" "$MEMEX_SYSTEM/skills" "$MEMEX_ATTACHMENTS"
|
||||
|
||||
echo "Generating directory README.org files..."
|
||||
DATE=$(date +"[%Y-%m-%d %a]")
|
||||
|
||||
create_readme() {
|
||||
local dir=$1
|
||||
local title=$2
|
||||
local desc=$3
|
||||
cat <<EOF > "$dir/README.org"
|
||||
#+TITLE: $title
|
||||
#+AUTHOR: User
|
||||
#+CREATED: $DATE
|
||||
#+BEGIN_COMMENT
|
||||
$desc
|
||||
#+END_COMMENT
|
||||
|
||||
* $title
|
||||
$desc
|
||||
EOF
|
||||
}
|
||||
|
||||
create_readme "$MEMEX_DIR/0_inbox" "0_inbox: The Capture Point" "Temporary holding area for raw captures, links, and quick thoughts before they are processed into actionable items (GTD) or knowledge (Atomic Notes (Zettelkasten))."
|
||||
create_readme "$MEMEX_DAILY" "1_daily: The Immutable Log" "Chronological daily logs (YYYY-MM-DD.org) serving as the primary capture location for fleeting notes and daily events. These are immutable records."
|
||||
create_readme "$MEMEX_NOTES" "2_notes: The Atomic Notes (Zettelkasten)" "Evergreen, atomic notes. Each file represents a single concept, is heavily interlinked, and uses snake_case filenames without dates."
|
||||
create_readme "$MEMEX_DRAFTS" "3_drafts: Works in Progress" "Long-form writing, essays, or articles actively being synthesized from the atomic notes."
|
||||
create_readme "$MEMEX_PUBLISHED" "4_published: Final Outputs" "Completed, finalized works and static snapshots of published material."
|
||||
create_readme "$MEMEX_PROJECTS" "5_projects: Active Projects" "Active, time-bound efforts with a clear definition of done. Each project has its own dedicated folder for specifications and artifacts."
|
||||
create_readme "$MEMEX_AREAS" "6_areas: Spheres of Responsibility" "Ongoing areas of life and work with a standard to be maintained over time (e.g., Health, Finances, Operations)."
|
||||
create_readme "$MEMEX_RESOURCES" "7_resources: Reference Material" "Topics of ongoing interest, external reference material, raw literature notes, and useful information."
|
||||
create_readme "$MEMEX_ARCHIVES" "8_archives: Cold Storage" "Inactive items from other categories, including completed projects, abandoned areas, or deprecated resources."
|
||||
create_readme "$MEMEX_SYSTEM" "9_system: Memex Administration" "System configuration, AI agent skills, org-mode templates, cron states, and tracking scripts."
|
||||
|
||||
echo "Generating root Master Memex README.org..."
|
||||
cat <<EOF > "$MEMEX_DIR/README.org"
|
||||
#+TITLE: The Master Memex
|
||||
#+AUTHOR: User
|
||||
#+CREATED: $DATE
|
||||
#+BEGIN_COMMENT
|
||||
The central hub and map of content for this personal intelligence organization.
|
||||
#+END_COMMENT
|
||||
|
||||
* 🧠 The Master Memex
|
||||
|
||||
This is the central hub for our knowledge management system, synthesizing three core methodologies:
|
||||
- *Atomic Notes (Zettelkasten):* For evergreen, interlinked, atomic knowledge.
|
||||
- *GTD (Getting Things Done):* For actionable task tracking and project execution.
|
||||
- *PARA:* For high-level directory organization (Projects, Areas, Resources, Archives).
|
||||
|
||||
* The Architecture
|
||||
|
||||
Our workspace is strictly divided into these functional zones:
|
||||
|
||||
- [[file:0_inbox/README.org][0_inbox]]: The zero-friction capture point for raw thoughts and tasks.
|
||||
- [[file:1_daily/README.org][1_daily]]: Immutable chronological logs and fleeting notes (YYYY-MM-DD.org).
|
||||
- [[file:2_notes/README.org][2_notes]]: The Atomic Notes (Zettelkasten). Atomic, concept-based, interlinked notes.
|
||||
- [[file:3_drafts/README.org][3_drafts]]: Works in progress, essays, and active synthesis.
|
||||
- [[file:4_published/README.org][4_published]]: Final outputs and static snapshots of completed work.
|
||||
- [[file:5_projects/README.org][5_projects]]: Active, time-bound efforts with a clear definition of done.
|
||||
- [[file:6_areas/README.org][6_areas]]: Ongoing spheres of responsibility (e.g., Health, Finances).
|
||||
- [[file:7_resources/README.org][7_resources]]: External reference material and raw literature notes.
|
||||
- [[file:8_archives/README.org][8_archives]]: Cold storage for completed projects and inactive items.
|
||||
- [[file:9_system/README.org][9_system]]: System configuration, AI skills, and automation scripts.
|
||||
|
||||
* Core Workflows
|
||||
|
||||
** 1. Capture (Anytime)
|
||||
Everything enters the system via \`0_inbox\` or as a Fleeting Note in \`1_daily\`. Zero friction, no filtering.
|
||||
|
||||
** 2. Nightly Distillation (The Scribe)
|
||||
An automated AI sub-agent reads the daily captures and extracts conceptual thoughts into evergreen, atomic notes in \`2_notes\`, leaving the original daily logs untouched.
|
||||
|
||||
** 3. Weekly Maintenance
|
||||
Review active projects, clarify inbox items into actionable GTD tasks, and explore the Atomic Notes (Zettelkasten) graph to merge concepts and forge new connections.
|
||||
EOF
|
||||
|
||||
# Touch inbox
|
||||
touch "$MEMEX_INBOX"
|
||||
|
||||
# Initialize distillation state if not present
|
||||
STATE_FILE="$MEMEX_SYSTEM/distillation-state.json"
|
||||
if [ ! -f "$STATE_FILE" ]; then
|
||||
echo "Initializing $STATE_FILE..."
|
||||
# Get current git commit or use a placeholder
|
||||
HASH=$(git rev-parse HEAD 2>/dev/null || echo "INITIAL_HASH")
|
||||
echo "{
|
||||
\"lastProcessedCommit\": \"$HASH\"
|
||||
}" > "$STATE_FILE"
|
||||
fi
|
||||
|
||||
echo "Installation complete."
|
||||
echo "1. Add the contents of init-atomic-notes.el to your Emacs config."
|
||||
echo "2. Add openclaw-scribe-skill.org to your \$MEMEX_SYSTEM/skills/ directory."
|
||||
echo "3. Ask your OpenClaw agent to schedule the Scribe job."
|
||||
@@ -0,0 +1,29 @@
|
||||
#+TITLE: SKILL: Scribe Agent (Distillation Sub-Agent)
|
||||
#+ID: skill-scribe-agent
|
||||
#+STARTUP: content
|
||||
|
||||
* Overview
|
||||
The Scribe Agent is an automated distillation sub-agent designed to process raw daily captures into permanent atomic notes for the Atomic Notes (Zettelkasten). It runs as an isolated OpenClaw cron job.
|
||||
|
||||
* Configuration
|
||||
- **Type:** OpenClaw Cron Job
|
||||
- **Target:** `isolated`
|
||||
- **Model:** `CURRENT_TEXT_MANIPULATION_MODEL` (Updates periodically based on review; currently an efficient LLM suitable for text parsing).
|
||||
- **Environment:** Loads variables from `.env` to locate folders (e.g., `$MEMEX_DAILY`, `$MEMEX_NOTES`, `$MEMEX_SYSTEM`).
|
||||
|
||||
* System Prompt / Agent Turn Directive
|
||||
```markdown
|
||||
You are the Scribe, an automated distillation sub-agent.
|
||||
Your sole job is to process raw notes into a Atomic Notes (Zettelkasten).
|
||||
Do not engage in conversation. Only execute the following pipeline:
|
||||
|
||||
1. Read `$MEMEX_SYSTEM/distillation-state.json` to get the last processed Git commit hash.
|
||||
2. Run `git diff <last_commit_hash> HEAD -- $MEMEX_DAILY/` to find new captures.
|
||||
3. For every new Atomic Notes (Zettelkasten) capture found in the diff:
|
||||
a. Read the raw capture.
|
||||
b. Determine the core concept.
|
||||
c. Generate a concise, snake_case filename (e.g., `core_concept_name.org`).
|
||||
d. Write the content to `$MEMEX_NOTES/<filename>`, ensuring it is formatted as an atomic Org-mode note with `#+ID` and a `Source:` backlink using an `id:` reference to the original daily file.
|
||||
4. Update `$MEMEX_SYSTEM/distillation-state.json` with the current HEAD commit hash.
|
||||
5. Exit.
|
||||
```
|
||||
Reference in New Issue
Block a user