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
This commit is contained in:
2026-05-21 11:07:18 +02:00
parent 3fb88b1edc
commit 0c6dfe1b40
81 changed files with 122 additions and 15038 deletions

122
AGENTS.md Normal file
View File

@@ -0,0 +1,122 @@
# 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
```bash
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)
```bash
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
```bash
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
```bash
# 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
```bash
# 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
```yaml
# WRONG
skills: ~/.config/opencode/skills/gitea/SKILL.md
# RIGHT
skills: gitea, issue-writing
```
## Common Workflows
### Issue worktrees
```bash
git worktree add ../worktrees/repo-issue-42
# ... work on issue ...
git worktree remove ../worktrees/repo-issue-42 --force
```
### PR review worktrees
```bash
git worktree add ../worktrees/repo-review-123
# ... review changes ...
git worktree remove ../worktrees/repo-review-123 --force
```