Agent W is an OpenCode plugin that provides tools and skills required to facilitate working on Model W projects with coding agents.
Agent W strictly follows the Model W philosophy used by WITH to ensure a uniform developer experience across projects.
By enforcing a uniform tech stack across the company, we minimize the mental overhead and learning curve that typically comes from diverging technological choices. This standardization allows developers to stay focused on what really matters: high-level technical and architectural decisions on the non-trivial aspects of the project.
In this paradigm, everything that can be automated or handled by AI is considered trivial. Agent W exists to bridge that gap, providing the specialized skills and tools required for coding agents to handle the trivial lifting autonomously, ensuring they stay aligned with the broader Model W ecosystem.
- Focus on Impact: Leave the boilerplate and convention-enforcement to the agent.
- Local First: Emphasizes development without Docker where possible for speed and simplicity.
- Quarterly Releases: Adheres to strict versioning across Python, Node, Django, and Svelte.
- Quality by Default: Enforces robust automated testing and consistent linting rules.
We aim to reach version 1.0 once the following milestones are achieved:
- Strong Internal Adoption: Widespread use of the agent across projects within the company.
- Front-End & Figma Integration: Definitive AI-assisted workflows for translating Figma designs into high-quality front-end code.
- Boosted Maintenance: Significant automation of common project management and maintenance tasks.
- Agentic Upgrades: Model W version upgrades distributed and executed reliably through agentic skills.
-
Model W Meta Bootstrap: Provides a bootstrapping skill
(
model-w-bootstrap) that guides the AI agent to create specialized local skills for the project's structure, dependencies, testing, and update processes. - De Facto Skills: When used as an OpenCode plugin, Agent W skills are automatically available to the agent without any project-level installation.
- MCP Server Setup: Configures and authenticates all required MCP servers (Figma, Linear, Chrome DevTools) in a single command.
-
CLI Tool: Includes a command-line interface (
agent-w) for managing the Agent W environment.
Install the package globally via npm:
npm install -g @model-w/agent-wAgent W works as a native OpenCode plugin. When installed, it automatically registers its skill library, making the Model W bootstrapping skills available to the LLM without any project-level setup.
To add Agent W to your OpenCode environment:
opencode plugin add @model-w/agent-wOnce installed, you can simply ask the agent to bootstrap your project: "Initialize this project using the model-w-bootstrap skill."
Agent W ships with a CLI command that configures all required MCP servers for OpenCode and handles OAuth authentication automatically:
agent-w setup-mcpThis single command will:
-
Register and configure the following MCP servers in your OpenCode config (
~/.config/opencode/opencode.json):Server Type Auth Description figmaRemote OAuth Figma design integration linearRemote OAuth Linear issue tracking chrome-devtoolsLocal None Chrome DevTools browser automation -
Authenticate each server that requires OAuth by running
opencode mcp auth <name>, which opens a browser window for you to authorize.
You can optionally pass a custom config path:
agent-w setup-mcp ~/.config/opencode/opencode.json- "Update all dependencies to the latest Model W release."
- "Check if the project's linting and formatting rules are followed."
- "Run the smoke tests for both the Django API and the SvelteKit frontend."
- "Create a changelog for the latest updates I just made."
- "Figure out how to run the BDD tests for this project."
If you want to modify or improve Agent W, you can test it locally.
To test the CLI command locally without publishing, link the npm package globally:
npm link
agent-w installMCP servers are defined as classes in bin/cli.js. Each server extends the
MCPServer base class and implements:
-
get name()— The key used in the OpenCode config (mcp.<name>). -
get requiresAuth()— Whether OAuth authentication is needed. -
async generateConfig()— Returns the config object to write. -
async authenticate()— Runs the authentication flow (callsopencode mcp auth <name>for OAuth servers, no-op for local servers).
class MyNewMCP extends MCPServer {
get name() {
return "my-server";
}
get requiresAuth() {
return true;
}
async generateConfig() {
return {
enabled: true,
type: "remote",
url: "https://mcp.example.com/mcp",
};
}
async authenticate() {
return runOpenCodeAuth("my-server");
}
}Then add an instance to the MCP_SERVERS array:
const MCP_SERVERS = [
new FigmaMCP(),
new LinearMCP(),
new ChromeDevtoolsMCP(),
new MyNewMCP(),
];This project follows the WITH Code Guidelines. It uses Prettier with a 4-space indent to maintain consistency with the Python ecosystem.
To format the project:
npx prettier --write .WTFPL
