From fe828a6aa0ec97feb107e5b89f521cb4e1872418 Mon Sep 17 00:00:00 2001 From: Hugo Nijhuis Date: Thu, 27 Aug 2026 21:23:09 +0200 Subject: [PATCH] small update --- .opencode/AGENTS.md | 61 ++++++++++++++++++++++++++++++++++++++++++++ Makefile | 4 +-- models.yaml | 26 ------------------- sample_opencode.json | 40 ++++++++++++++--------------- 4 files changed, 82 insertions(+), 49 deletions(-) create mode 100644 .opencode/AGENTS.md delete mode 100644 models.yaml diff --git a/.opencode/AGENTS.md b/.opencode/AGENTS.md new file mode 100644 index 0000000..493bc9b --- /dev/null +++ b/.opencode/AGENTS.md @@ -0,0 +1,61 @@ +# AGENTS.md + +Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed. + +**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment. + +## 1. Think Before Coding + +**Don't assume. Don't hide confusion. Surface tradeoffs.** + +Before implementing: +- State your assumptions explicitly. If uncertain, ask. +- If multiple interpretations exist, present them - don't pick silently. +- If a simpler approach exists, say so. Push back when warranted. +- If something is unclear, stop. Name what's confusing. Ask. + +## 2. Simplicity First + +**Minimum code that solves the problem. Nothing speculative.** + +- No features beyond what was asked. +- No abstractions for single-use code. +- No "flexibility" or "configurability" that wasn't requested. +- No error handling for impossible scenarios. +- If you write 200 lines and it could be 50, rewrite it. + +Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify. + +## 3. Surgical Changes + +**Touch only what you must. Clean up only your own mess.** + +When editing existing code: +- Don't "improve" adjacent code, comments, or formatting. +- Don't refactor things that aren't broken. +- Match existing style, even if you'd do it differently. +- If you notice unrelated dead code, mention it - don't delete it. + +When your changes create orphans: +- Remove imports/variables/functions that YOUR changes made unused. +- Don't remove pre-existing dead code unless asked. + +The test: Every changed line should trace directly to the user's request. + +## 4. Goal-Driven Execution + +**Define success criteria. Loop until verified.** + +Transform tasks into verifiable goals: +- "Add validation" → "Write tests for invalid inputs, then make them pass" +- "Fix the bug" → "Write a test that reproduces it, then make it pass" +- "Refactor X" → "Ensure tests pass before and after" + +For multi-step tasks, state a brief plan: +``` +1. [Step] → verify: [check] +2. [Step] → verify: [check] +3. [Step] → verify: [check] +``` + +Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification. diff --git a/Makefile b/Makefile index 7991157..2a618fc 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,10 @@ OPENCODE_DIR := $(HOME)/.config/opencode REPO_DIR := $(shell pwd) # Items to symlink -ITEMS := skills tools agents +ITEMS := skills tools agents AGENTS.md # LLM services to manage -LLM_SERVICES := odin +LLM_SERVICES := qwen PLIST_PATH := ~/Library/LaunchAgents diff --git a/models.yaml b/models.yaml deleted file mode 100644 index aa2f372..0000000 --- a/models.yaml +++ /dev/null @@ -1,26 +0,0 @@ -manager: - memory_budget: 450 - contention_policy: - strategy: wait_then_preempt - wait_timeout_s: 45 - preempt_after_s: 15 - -models: - - name: Qwen-Coder-Next - model: mlx-community/Qwen3-Coder-Next-4bit - estimated_memory_gb: 50 - reasoning_parser: qwen3 - - - name: Qwen3.6 - model: mlx-community/Qwen3.6-35B-A3B-6bit - estimated_memory_gb: 40 - reasoning_parser: qwen3 - - - name: gemma - model: mlx-community/gemma-4-31b-it-8bit - estimated_memory_gb: 40 - reasoning_parser: gemma4 - - - name: MiniMax-M3 - model: pipenetwork/MiniMax-M3-MLX-mixed-3_6bit - estimated_memory_gb: 200 diff --git a/sample_opencode.json b/sample_opencode.json index fe3adec..713995c 100644 --- a/sample_opencode.json +++ b/sample_opencode.json @@ -1,33 +1,31 @@ { "$schema": "https://opencode.ai/config.json", + "model": "qwen/mlx-community/Qwen3.6-35B-A3B-6bit", + "compaction": { + "auto": true, + "prune": true, + "reserved": 32768 + }, "provider": { - "odin": { + "qwen": { "npm": "@ai-sdk/anthropic", - "name": "Odin", + "name": "Qwen 3.8", "options": { - "baseURL": "http://192.168.2.49:12000/v1", - "apiKey": "changeme" + "baseURL": "http://192.168.2.49:12010/v1", + "apiKey": "changeme", + "timeout": false, + "chunkTimeout": 300000 }, "models": { - "Qwen-Coder-Next": { - "name": "Qwen-Coder-Next", + "mlx-community/Qwen3.8-27B-8bit": { + "name": "Qwen 3.8 27B 8-bit", "tool_call": true, - "options": { - "temperature": 1.0, - "top_p": 0.95 + "reasoning": true, + + "limit": { + "context": 262144, + "output": 81920 } - }, - "Qwen3.6": { - "name": "Qwen3.6", - "tool_call": true - }, - "gemma": { - "name": "gemma", - "tool_call": true - }, - "MiniMax-M3": { - "name": "MiniMax-M3", - "tool_call": true } } }