Skip to content

Commit 72b3625

Browse files
committed
Merge branch 'feat/discord-channel-memory'
2 parents 3a79cbe + cdf5c4a commit 72b3625

File tree

5 files changed

+76
-31
lines changed

5 files changed

+76
-31
lines changed

.github/workflows/image-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/flake.lock') }}
3030
restore-prefixes-first-match: |
3131
nix-${{ runner.os }}-
32+
paths-linux: |
33+
/nix/store
3234
3335
- name: Free disk space
3436
run: |

clawdinator/workspace/HEARTBEAT.md

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,8 @@
33
Hourly SITREP checklist:
44

55
1. Read AGENTS.md comms rules (terse chat, details to files)
6-
2. Read `/memory/index.md` and `/memory/sitrep-latest.md` for context
7-
3. Persist any relevant channel updates to today's daily memory file
8-
4. Run triage skill (`skills/triage/SKILL.md`):
9-
- Read `/memory/github/prs.md` and `/memory/github/issues.md`
10-
- Compare against previous sitrep for changes
11-
5. Write SITREP to `/memory/sitrep-latest.md` (overwrite):
12-
```markdown
13-
# SITREP YYYY-MM-DDTHH:MMZ
14-
15-
## 🔥 Fires
16-
- Active issues needing immediate attention
17-
18-
## ⚡ NOW
19-
- Single most important action to take
20-
21-
## 📊 Dashboard
22-
- PRs: X open (Y approved waiting)
23-
- Issues: X open (Y bugs, Z features)
24-
25-
## 🔄 Changes since last SITREP
26-
- NEW/CLOSED/UPDATED items
27-
```
28-
6. Append summary to today's daily file (`/memory/daily/YYYY-MM-DD.md`)
29-
7. Post terse summary to chat (3-5 lines, link to sitrep-latest.md)
30-
8. If nothing needs attention, reply HEARTBEAT_OK
6+
2. Read `/memory/sitrep-latest.md` for previous context
7+
3. Run lurk skill (`skills/lurk/SKILL.md`) — read Discord channels, persist to `/memory/discord/YYYY-MM-DD.md`
8+
4. Run triage skill (`skills/triage/SKILL.md`) — analyze GitHub + Discord, write SITREP
9+
5. Post summary to chat (5-10 lines)
10+
6. If nothing needs attention, reply HEARTBEAT_OK
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: lurk
3+
description: Monitor Discord channel activity and persist notable items to memory. Run from main session during heartbeat.
4+
---
5+
6+
# Lurk Skill
7+
8+
Monitor Discord lurk channels and persist notable activity to shared memory.
9+
10+
## When to Use
11+
12+
- Hourly heartbeat (step 3)
13+
- Manual trigger to capture current channel state
14+
15+
## How to Run
16+
17+
Use `discord.readMessages` to read recent messages from the **LURK channels** listed in `AGENTS.md`.
18+
19+
- Do not read or write to any channel that is not explicitly listed there.
20+
- These channels are read-only (sendPolicy denies replies).
21+
22+
## What to Capture
23+
24+
**Persist these:**
25+
- Support issues / bug reports
26+
- Questions that indicate user confusion
27+
- Feature requests with discussion
28+
- Anything referencing GitHub issues/PRs
29+
- Repeated topics (multiple users, same issue)
30+
- Announcements or important updates
31+
32+
**Skip these:**
33+
- Casual chat / banter
34+
- Single-word reactions
35+
- Bot spam
36+
- Already-resolved questions
37+
38+
## Output
39+
40+
Append to `/memory/discord/YYYY-MM-DD.md` using `memory-edit` (exclusive lock).
41+
42+
```markdown
43+
## HH:MM #channel-name
44+
- [brief summary of notable item]
45+
- Links to #NNN if references GitHub issue
46+
- @username if relevant
47+
48+
## HH:MM #channel-name
49+
- [another item]
50+
```
51+
52+
## Constraints
53+
54+
- Be selective. Only notable items.
55+
- Include timestamp and channel name.
56+
- Keep each entry to 1-2 lines.
57+
- Cross-reference GitHub issues when mentioned.
58+
- Never write to `/memory` using raw redirects (`>`, `>>`); always use `memory-edit`.
59+
- If nothing notable: don't write anything, reply `NO_NOTABLE_ACTIVITY`.

clawdinator/workspace/skills/triage/SKILL.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ Read these files to understand current state:
2929
- `/memory/project.md` — project goals and priorities
3030
- `/memory/architecture.md` — architecture decisions
3131

32-
4. **Discord signals**:
33-
- Recent messages in conversation context from lurk channels
32+
4. **Discord signals** (persisted by lurk skill):
33+
- `/memory/discord/YYYY-MM-DD.md` — today's channel activity
34+
- `/memory/discord/<yesterday>.md` — yesterday's (for context; use the previous date)
3435
- Cross-reference with GitHub issues where relevant
36+
- Multiple Discord reports of same issue = elevated priority
3537

3638
## Your Task
3739

@@ -51,7 +53,7 @@ Read these files to understand current state:
5153

5254
## Output Format (SITREP)
5355

54-
Write to `/memory/sitrep-latest.md`:
56+
Write to `/memory/sitrep-latest.md` using `memory-write` (exclusive lock):
5557

5658
```markdown
5759
# SITREP YYYY-MM-DDTHH:MMZ
@@ -96,4 +98,5 @@ If nothing needs attention: `HEARTBEAT_OK`
9698
- No markdown tables (use bullet lists).
9799
- If data is stale (>1hr old sync), note it.
98100
- If something is unclear, say so — don't guess.
101+
- Use `memory-read` for all reads from `/memory`.
99102
- Advisory only: don't take actions, just recommend.

scripts/init-memory.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ root="${1:-/memory}"
55
owner="${2:-clawdinator}"
66
group="${3:-clawdinator}"
77

8-
mkdir -p "$root/daily"
8+
mkdir -p "$root/daily" "$root/discord"
99

1010
index="$root/index.md"
1111
if [ ! -f "$index" ]; then
@@ -14,9 +14,10 @@ if [ ! -f "$index" ]; then
1414
1515
- Daily notes live in /memory/daily/YYYY-MM-DD.md
1616
- Durable facts belong in /memory/project.md and /memory/architecture.md
17+
- Discord lurk snapshots live in /memory/discord/YYYY-MM-DD.md
1718
EOM
1819
fi
1920

2021
# Ensure shared memory is writable by the service user across instances.
21-
chown "$owner:$group" "$root" "$root/daily"
22-
chmod 2770 "$root" "$root/daily"
22+
chown "$owner:$group" "$root" "$root/daily" "$root/discord"
23+
chmod 2770 "$root" "$root/daily" "$root/discord"

0 commit comments

Comments
 (0)