81b9f0f9ac2aea9c08e11f05b28153af7d850e0a
- Author
- TheEdgeOfRage <git@theedgeofrage.com>
- Committer
- TheEdgeOfRage <git@theedgeofrage.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/dot_config/opencode/AGENTS.md b/dot_config/opencode/AGENTS.md
2index aa29863842d45f6d23a72c6a3a1a335d4f0096c2..72e8d32e07b1371912461accb206e1e30bb8219c 100644
3--- a/dot_config/opencode/AGENTS.md
4+++ b/dot_config/opencode/AGENTS.md
5@@ -4,13 +4,6 @@ I'm a software engineer and hacker with preference for Linux, Go, UNIX philosoph
6
7 Plan for context limits and session boundaries. If task has >2 substantial steps, the later will not be done in this session
8
9-## Self-Improvement Loop
10-
11-- After ANY correction from the user: append to `~/.config/opencode/lessons.md` under the Raw section with `[YYYY-MM-DD]` timestamp, the pattern, and a preventive rule
12-- Write rules for yourself that prevent the same mistake
13-- Compaction and generalization happen autonomously via the `reflect` skill at session start
14-- The user can also trigger `/reflect` for a collaborative session review
15-
16 ## Verification Before Done
17
18 - Never mark a task complete without proving it works
19diff --git a/dot_config/opencode/opencode.json b/dot_config/opencode/opencode.json
20index 91b8db709173054bda5836b097b1f1caa4dec9ff..241ee6f47b1de24d98c69a29b8fb3775ad201f0c 100644
21--- a/dot_config/opencode/opencode.json
22+++ b/dot_config/opencode/opencode.json
23@@ -1,100 +1,100 @@
24 {
25- "$schema": "https://opencode.ai/config.json",
26- "autoupdate": false,
27- "permission": {
28- "edit": "allow",
29- "bash": {
30- "*": "ask",
31- "*sudo*": "deny",
32- "*terraform apply*": "deny"
33- },
34- "external_directory": {
35- "~/dev/dune/**": "allow",
36- "~/dev/go/**": "allow",
37- "*": "ask"
38- },
39- "webfetch": "ask",
40- "websearch": "allow",
41- "codesearch": "allow",
42- "doom_loop": "ask"
43- },
44- "plugin": [
45- "@tarquinen/opencode-dcp@latest",
46- "@theedgeofrage/opencode-telegram@0.2.2"
47- ],
48- "provider": {
49- "llama.cpp": {
50- "npm": "@ai-sdk/openai-compatible",
51- "name": "llama-server (local)",
52- "options": {
53- "baseURL": "http://127.0.0.1:8080/v1"
54- },
55- "models": {
56- "qwen3.5-27b": {
57- "name": "Qwen3.5 27B (local)",
58- "limit": {
59- "context": 262144,
60- "output": 32768
61- }
62- }
63- }
64- }
65- },
66- "mcp": {
67- "Linear": {
68- "enabled": false,
69- "type": "remote",
70- "url": "https://mcp.linear.app/mcp",
71- "oauth": {}
72- },
73- "Sentry": {
74- "enabled": false,
75- "type": "remote",
76- "url": "https://mcp.sentry.dev/mcp",
77- "oauth": {}
78- },
79- "Grafana prod": {
80- "enabled": false,
81- "type": "local",
82- "command": ["uvx", "mcp-grafana"],
83- "environment": {
84- "GRAFANA_URL": "https://grafana.prod.internal.dunetech.io/",
85- "GRAFANA_SERVICE_ACCOUNT_TOKEN": "{file:~/hfs/mcp/grafana-prod-token}"
86- }
87- },
88- "Grafana dev": {
89- "enabled": false,
90- "type": "local",
91- "command": ["uvx", "mcp-grafana"],
92- "environment": {
93- "GRAFANA_URL": "https://grafana.dev.internal.dunetech.io/",
94- "GRAFANA_SERVICE_ACCOUNT_TOKEN": "{file:~/hfs/mcp/grafana-dev-token}"
95- }
96- },
97- "GitHub": {
98- "enabled": false,
99- "type": "remote",
100- "url": "https://api.githubcopilot.com/mcp/",
101- "headers": {
102- "Authorization": "{file:~/hfs/mcp/github}"
103- }
104- },
105- "Notion": {
106- "enabled": false,
107- "type": "remote",
108- "url": "https://mcp.notion.com/mcp",
109- "oauth": {}
110- },
111- "Dune": {
112- "enabled": false,
113- "type": "remote",
114- "url": "https://api.dune.com/mcp/v1",
115- "oauth": {}
116- }
117- },
118- "formatter": {
119- "clang-format": {
120- "disabled": true
121- }
122- }
123diff --git a/dot_config/opencode/skills/weekly-review/SKILL.md b/dot_config/opencode/skills/weekly-review/SKILL.md
124deleted file mode 100644
125index 392dc89193dcdb582c3508c2767786e77632013b..0000000000000000000000000000000000000000
126--- a/dot_config/opencode/skills/weekly-review/SKILL.md
127+++ /dev/null
128@@ -1,115 +0,0 @@
129----
130-name: weekly-review
131-description: Analyze recent sessions to find patterns, recurring mistakes, and propose improvements to AGENTS.md and lessons.md.
132-compatibility: opencode
133----
134-
135-## What this is
136-
137-A periodic deep review of how the user and assistant work together. Reads session
138-history from the database, dispatches parallel agents to analyze conversations,
139-then runs multiple reflection loops to surface patterns and propose changes.
140-
141-## When to trigger
142-
143-User runs `/review-week`. Not autonomous — this is a deliberate review.
144-
145-## Inputs
146-
147-- `$ARGUMENTS`: optional time range in days (default: 7). Example: `/review-week 14`
148-
149-## Data source
150-
151-Sessions are stored in SQLite at `~/.local/share/opencode/opencode.db`.
152-
153-Key tables:
154-- `session`: metadata (id, title, directory, time_created, time_updated)
155-- `message`: per-session messages (id, session_id, data JSON)
156-- `part`: message content (id, message_id, session_id, data JSON with `type` and `text` fields)
157-
158-## Workflow
159-
160-### 1. Gather sessions
161-
162-```sql
163-SELECT id, title, directory,
164- datetime(time_created/1000, 'unixepoch', 'localtime') as created,
165- datetime(time_updated/1000, 'unixepoch', 'localtime') as updated
166-FROM session
167-WHERE time_created > (strftime('%s', 'now', '-N days') * 1000)
168- AND title NOT LIKE '%@explore%'
169- AND title NOT LIKE '%@general%'
170-ORDER BY time_created ASC;
171-```
172-
173-Replace `N` with the requested day range. Filter out subagent sessions — they're
174-noise for pattern analysis.
175-
176-Count messages per session to find the substantive ones (>3 messages).
177-
178-### 2. Dispatch parallel agents
179-
180-Group substantive sessions into 3-5 batches. For each batch, launch a `general`
181-subagent with instructions to:
182-
183-1. Extract conversation text from the `part` table:
184- ```sql
185- SELECT p.data FROM part p
186- JOIN message m ON m.id = p.message_id
187- WHERE m.session_id = 'SESSION_ID'
188- AND json_extract(p.data, '$.type') = 'text'
189- ORDER BY p.time_created ASC;
190- ```
191-2. For each session, identify:
192- - What the user was trying to accomplish
193- - Corrections the user made to the assistant
194- - Frustration signals
195- - Where the assistant over- or under-delivered
196- - Design decisions and their quality
197-3. Return a comprehensive analysis focused on patterns and lessons, not summaries.
198-
199-### 3. Read context files
200-
201-While agents run, read:
202-- `~/.config/opencode/AGENTS.md`
203-- `~/.config/opencode/lessons.md`
204-
205-### 4. Reflection loops
206-
207-Run 2-3 passes over the combined agent output:
208-
209-**Loop 1 — Patterns:** What themes repeat across sessions? Which are the most
210-frequent and most damaging? Cross-reference against existing AGENTS.md and
211-lessons.md rules — are these known problems (compliance failure) or new gaps?
212-
213-**Loop 2 — Design problems:** Why does the system produce these failures?
214-What's the root cause behind the patterns? Are existing rules too vague,
215-misplaced, or structurally unenforceable?
216-
217-**Loop 3 — Proposals:** Concrete, minimal changes. Prefer strengthening existing
218-rules over adding new ones. Every proposed change must map to a specific pattern
219-found in the data.
220-
221-### 5. Present findings
222-
223-Show the user:
224-- Session count and coverage
225-- Top patterns with frequency and severity
226-- The compliance question: which patterns already have rules?
227-- Proposed changes as exact edits (old → new)