Commit 7f10913a authored by Peter Empey's avatar Peter Empey
Browse files

Add AE best practices

parent 81dd3b25
Loading
Loading
Loading
Loading
+24 −1
Original line number Diff line number Diff line
@@ -23,12 +23,35 @@ Keep your global config minimal. The main thing worth putting there is MCPs you

A good rule of thumb: if you'd want the MCP active even when you open OpenCode outside of any project, it goes global. Otherwise, keep it local.

## Best Practices for Prompting
## Best Practices

Keep context lean. Start a new conversation any time you shift focus — a new feature, a different bug, an unrelated review. When in doubt, fresh window. In OpenCode, use the `/new` command to do that. This improves quality of responses as well as costs

If a skill exists for what you're doing, use it — skills give the agent domain-specific context it wouldn't otherwise have.

### Analytics Engineer

The AE team uses OpenCode across the full development lifecycle — building and modifying dbt models, responding to MR review feedback, troubleshooting pipeline failures, testing and validating data, exploring datasets, and drafting issues from context like Slack threads or review comments.

#### Recommended Workflow

- For new or unfamiliar tasks, start in **Plan** mode — review the proposed approach before making any changes
- For well-understood tasks, go directly to **Build** or the AE agent
- Begin prompts with "I want to…" and describe the change, review comment, or question you are working through
- For MR reviews, open a fresh session scoped to that review
- For more detail on the two modes, see [When to Use Plan vs Build Mode](#when-to-use-plan-vs-build-mode) below

#### Session Management, Model Selection, and Cost Efficiency

- Start a new session per MR, topic, or day — the guiding question is whether the prior context is actually needed for the next task; if not, start fresh
- A medium sized model, like **Sonnet 4.6**, is the recommended default model — they offer a good balance of quality, speed, and cost; larger models are slower and more expensive without proportional gains for most AE tasks
- Input tokens seem to be the most expensive component of a session — keep context lean, use `/compact` when it grows large, and start a new session before reaching the 200K token threshold
- Only enable the MCPs needed for the current task — use the `/mcps` command and press `space` to toggle MCPs on or off

#### MCP Setup

Snowflake MCP is required for most AE development work. If you run into issues configuring it, refer to the setup and troubleshooting video: **[placeholder — link to Snowflake MCP setup video coming soon]**

## When to Use Plan vs Build Mode

OpenCode has two primary modes: