Execute implementation with MCP tool integration. Usage: /workflows:work [optional plan reference]
Executes implementation plans using TDD cycles with integrated quality gates and MCP tool verification.
/plugin marketplace add get-mellow/claude-plugins/plugin install mellow-engineering@mellow-plugins[plan reference or task]workflows/You are starting the WORK phase of compound engineering. Your goal is to execute the implementation plan systematically with quality built in.
Before starting work:
/workflows:plan) or create one inlineIf a plan exists:
Read: plans/[plan-name].md
If no plan exists, create a quick inline plan before proceeding.
Use TodoWrite to track implementation progress:
TodoWrite: Create tasks from the plan's implementation steps
Mark tasks as in_progress as you work on them and completed when done.
For every feature, follow this cycle:
1. Write a failing test
2. Write just enough code to make it pass
3. Refactor if needed
4. Repeat until feature is complete
This is non-negotiable. Tests come FIRST, then implementation.
1. Set up Xcode session:
mcp__xcodebuildmcp__session-set-defaults(
projectPath: "apps/mobile/Mellow.xcodeproj",
scheme: "Mellow",
simulatorName: "iPhone 16 Pro"
)
2. For each implementation task (TDD cycle):
a) Write a failing test FIRST:
@Test, #expect)mcp__xcodebuildmcp__test_simb) Write just enough code to pass:
Features/[FeatureName]/Screen/Features/[FeatureName]/Views/Features/[FeatureName]/ViewData/Features/[FeatureName]/ViewModel/mcp__xcodebuildmcp__test_simc) Use MellowDesignSystem:
// Colors
Color.mellow(.textPrimary)
Color.mellow(.appBackground)
Color.mellow(.accent)
// Typography
.mellowTitle(.m)
.mellowBody(.m)
.mellowLabel(.s)
// Spacing
MellowSpacing.m // 16pt
MellowSpacing.l // 24pt
// Buttons
.mellowPrimaryButton()
.mellowSecondaryButton()
d) Refactor if needed, then repeat the cycle.
3. Build verification:
mcp__xcodebuildmcp__build_sim
4. Run tests:
mcp__xcodebuildmcp__test_sim
5. Visual verification (if UI changes):
mcp__xcodebuildmcp__build_run_sim
mcp__xcodebuildmcp__screenshot
6. UI automation (if testing interactions):
mcp__xcodebuildmcp__describe_ui # Get element coordinates
mcp__xcodebuildmcp__tap(x: ..., y: ...)
1. For each implementation task (TDD cycle):
a) Write a failing test FIRST:
pnpm test --filter=@mellow/[app-name]b) Write just enough code to pass:
c) Example Fastify route:
import { z } from 'zod'
const bodySchema = z.object({
name: z.string().min(1),
})
export async function routes(fastify: FastifyInstance) {
fastify.post('/resource', {
schema: {
body: zodToJsonSchema(bodySchema),
},
}, async (request, reply) => {
const body = bodySchema.parse(request.body)
// Implementation
})
}
d) Refactor if needed, then repeat the cycle.
2. Type checking:
pnpm type-check --filter=@mellow/[app-name]
3. Linting:
pnpm lint --filter=@mellow/[app-name]
4. Run tests:
pnpm test --filter=@mellow/[app-name]
5. For web features, use Playwright:
mcp__plugin_playwright_playwright__browser_navigate(url: "http://localhost:3000/...")
mcp__plugin_playwright_playwright__browser_snapshot
1. Check current schema:
mcp__plugin_supabase_supabase__list_tables(project_id: "...", schemas: ["public"])
2. Create migration:
mcp__plugin_supabase_supabase__apply_migration(
project_id: "...",
name: "add_feature_table",
query: "CREATE TABLE ..."
)
3. Always include RLS policies:
-- Enable RLS
ALTER TABLE feature_table ENABLE ROW LEVEL SECURITY;
-- User isolation policy
CREATE POLICY "Users can only access own data"
ON feature_table
FOR ALL
USING (user_id = auth.uid());
4. Validate with advisors:
mcp__plugin_supabase_supabase__get_advisors(project_id: "...", type: "security")
mcp__plugin_supabase_supabase__get_advisors(project_id: "...", type: "performance")
5. Generate types:
pnpm types:generate
CRITICAL: This step MUST be run after EVERY implementation chunk, not just at the end.
Use the quality-gate skill for all verification:
| Changed Files | Skill Section |
|---|---|
*.ts, *.tsx | skills/quality-gate.md#typescript |
*.swift | skills/quality-gate.md#ios |
*.sql, supabase/** | skills/quality-gate.md#database |
Run all applicable checks IN PARALLEL.
See skills/quality-gate.md for:
CRITICAL: You may ONLY commit after ALL checks in Step 5 pass.
Verify Quality Gate passed:
Commit changes:
git add -A
git commit -m "feat: [description]
- [change 1]
- [change 2]"
Update task list: Mark all completed tasks as done.
Suggest next step:
Recommend running /workflows:review to validate the implementation.
quality-gate - Verification commands (Step 5)ios-ui-automation - iOS simulator interactionsweb-ui-automation - Playwright interactionsgit-workflow - Commit conventions (Step 6)