Overhaul agent quality — prompts, tools, config, compression

- Rewrite system prompt: structured sections, explicit tool descriptions
  with full SKILL.md descriptions, multi-agent awareness
- Add write_file skill for creating/modifying workspace files
- Per-template config passthrough: temperature, num_predict, context_size,
  compress settings, max_tool_rounds, max_response_lines
- Bump defaults: 1024 output tokens (was 512), 500-char deque (was 200),
  250-token summaries (was 150), compress threshold 16 (was 12), keep 8 (was 4)
- Cache compression by content hash — no redundant summarization
- Update all 5 templates with tuned settings per role
This commit is contained in:
2026-04-08 18:28:26 +00:00
parent 6c4ad47b09
commit c827d341ab
6 changed files with 160 additions and 30 deletions

View File

@@ -0,0 +1,17 @@
---
name: write_file
description: Write content to a file in /workspace. Creates parent directories if needed. Use this to save scripts, reports, data, or any output you want to persist.
parameters:
path:
type: string
description: Path to write (must be under /workspace)
required: true
content:
type: string
description: Content to write to the file
required: true
append:
type: boolean
description: If true, append to existing file instead of overwriting (default false)
required: false
---

32
skills/write_file/run.py Normal file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env python3
"""Write content to a file under /workspace."""
import json
import os
import sys
args = json.loads(sys.stdin.read())
path = args.get("path", "")
content = args.get("content", "")
append = args.get("append", False)
WORKSPACE = os.environ.get("WORKSPACE", "/workspace")
resolved = os.path.realpath(path)
if not resolved.startswith(WORKSPACE + "/") and resolved != WORKSPACE:
print(f"[error: path must be under {WORKSPACE}]")
sys.exit(0)
if os.path.isdir(resolved):
print(f"[error: {path} is a directory]")
sys.exit(0)
try:
os.makedirs(os.path.dirname(resolved), exist_ok=True)
mode = "a" if append else "w"
with open(resolved, mode) as f:
f.write(content)
size = os.path.getsize(resolved)
action = "appended to" if append else "wrote"
print(f"[{action} {path} ({size} bytes)]")
except Exception as e:
print(f"[error: {e}]")