Files
architecture/AGENTS.md
Hugo Nijhuis 0c6dfe1b40 Add AGENTS.md and remove legacy folder
- Add AGENTS.md with high-signal guidance for OpenCode agents
- Remove legacy/ folder (Claude Code historical references)
- Remove CLAUDE.md
- Clean up references to legacy configuration
2026-05-21 11:07:18 +02:00

3.0 KiB

OpenCode Configuration Repository

This repository contains OpenCode configuration (skills, tools, agents) that defines how AI agents work with the FlowMade team's software development workflow.

Purpose

  • Active config: .opencode/ → symlinked to ~/.config/opencode/
  • LLM config: opencode.json → three local models (swift, forge, atlas)

Commands

Makefile

make install          # Symlink .opencode/* to ~/.config/opencode/
make uninstall        # Remove symlinks
make status           # Show symlink status
make restart-llm      # Restart all three LLM services
make restart-llm-atlas|forge|swift  # Restart specific model

Tea CLI (used by tools)

tea issues list                       # List issues
tea issues create -t <title> -d <desc># Create issue
tea issues <n> --comments -o json     # Get issue with comments
tea comment <n> "<body>"              # Comment on issue/PR
tea pulls list                        # List PRs
tea pulls merge <n> --style rebase    # Merge PR

Git worktrees

git worktree add ../worktrees/<branch>    # Create worktree
git worktree remove <path> --force        # Remove worktree

Structure

.opencode/
├── tools/          # TypeScript tools (5 files: tea-issues, tea-issue-create, etc.)
├── plans/          # Empty - for future use
opencode.json       # LLM providers

LLM Providers (opencode.json)

All run on http://192.168.2.49 with tool_call: true:

Provider Port Model Use case
swift 12000 Qwen3-Coder-Next-4bit Simple tasks
forge 12001 Qwen3-Coder-Next-6bit Medium complexity
atlas 12002 Qwen3.5-35B-A3B-6bit Complex reasoning

Gotchas

tea comment doesn't support heredocs

# WRONG - silent failure
tea comment 3 "$(cat <<'EOF'...EOF)"

# RIGHT - use quoted strings
tea comment 3 "## Review
- Point 1
- Point 2"

tea CLI vs gh CLI

# WRONG (gh syntax)
tea issues create --body "..."

# RIGHT (tea syntax)
tea issues create -d "..."

Worktree cleanup

  • Worktrees live in ../worktrees/, not inside the repo
  • Always clean up after workflows
  • Use git worktree remove <path> --force for dirty worktrees

Name validation for skills/agents

  • Lowercase with hyphens only
  • Max 64 chars
  • Cannot contain anthropic or XML tags
  • Must match directory name exactly

Skills field uses names, not paths

# WRONG
skills: ~/.config/opencode/skills/gitea/SKILL.md

# RIGHT
skills: gitea, issue-writing

Common Workflows

Issue worktrees

git worktree add ../worktrees/repo-issue-42
# ... work on issue ...
git worktree remove ../worktrees/repo-issue-42 --force

PR review worktrees

git worktree add ../worktrees/repo-review-123
# ... review changes ...
git worktree remove ../worktrees/repo-review-123 --force