Isaac DanielIsaac Daniel
Back to Blog
Isaac May 2026 8 min read

D4C: Building a Personalized Coding Agent

How I forked the pi coding agent and added plan/build modes, permanent MCP servers, and an /update skill that preserves customizations across upstream syncs.

AI
Dev Tools
Open Source
Agent
MCP

What is D4C?

D4C — short for Dirty Deeds Done Dirt Cheap — is a personalized fork of the pi coding agent. It takes everything pi does well and layers on custom features that fit my workflow.

Pi already had a solid foundation: it's a capable coding agent with an extensive extension marketplace. But the features I needed most — plan mode, build mode, permanent MCP servers — weren't available as extensions. They had to be ingrained in the agent itself. D4C is the result of that conviction.

The name is a nod to the JoJo's Bizarre Adventure reference: the ability to swap between different "modes" on the fly. It stuck.

Why I Built It

I started with pi because it was the best open-source coding agent I could find. It understood context, it could execute tools, and the extension ecosystem meant I wasn't starting from zero. But as I used it more, I kept hitting the same wall:

The problem: The features I wanted most — structured plan/build workflows, built-in TODO tracking, integrated web search, permanent MCP servers — needed to be part of the agent's core, not add-on extensions that could lose support or break across updates.

Pi's extension marketplace is extensive, but every extension has a lifespan. I didn't want to rely on third-party maintainers for workflow-critical capabilities. If a feature is part of my daily coding loop, it needs to be baked in.

"If a feature is part of my daily coding loop, it needs to be baked in — not bolted on."

D4C plan mode showing structured task breakdown and execution plan
Fig 1 — D4C plan mode: structured task breakdown before any code is written.

Key Features

D4C ships with four major additions over stock pi. Each one solves a specific pain point in my development workflow.

Plan & Build Modes

The flagship feature. Plan mode forces the agent to think before acting: it produces a structured breakdown of what needs to be done, identifies risks, and lays out an approach. Build mode executes the plan methodically, section by section. This separation of thinking and doing dramatically reduces hallucination and keeps the agent on track.

Built-in TODO Tracking

Imported from the pi marketplace but integrated at the agent level. The agent can create, update, and check off tasks as it works. This gives me visibility into what's been done and what's pending — essential for multi-step refactors.

Integrated Web Search

Also from the pi marketplace, but baked in as a first-class capability. The agent can search the web for current documentation, package versions, and known issues — no context-switching needed. This alone cut my research time by roughly half.

Permanent MCP Servers

Two MCP servers run permanently: Context7 (for querying library documentation and code examples in real time) and Playwright (for browser automation and visual testing). These are always available — no manual setup per session, no config files to remember. The agent just uses them when needed.

Why MCP servers instead of extensions? Context7 and Playwright are deeply embedded tools. Context7 provides documentation lookup that keeps the agent accurate with library APIs. Playwright lets the agent test UI changes interactively. Extensions could provide similar functionality, but permanent MCP servers guarantee they're always available without configuration overhead.

Feature Summary

2
New Modes (Plan + Build)
2
Integrated Marketplace Extensions
2
Permanent MCP Servers
1
Custom /update Skill
D4C build mode executing a planned implementation step by step
Fig 2 — Build mode in action: executing each step from the plan with progress tracking.

Setup & Architecture

D4C starts from the pi codebase and applies a layered customization strategy. Instead of modifying pi's core files directly (which would break on updates), every custom feature lives in its own directory or config file.

Core Stack

  • Pi coding agent — Base agent framework
  • Custom skills — Plan mode, build mode, /update
  • MCP servers — Context7 + Playwright
  • Marketplace extensions — TODO + WebSearch

Architecture Principle

  • All custom features in isolated directories
  • No modifications to pi's core source files
  • Config-driven feature registration
  • /update skill layers changes on top of upstream sync
D4C configuration showing permanent MCP server setup
Fig 3 — Permanent MCP server configuration: Context7 and Playwright always available.

Challenges & Fixes

Building D4C was straightforward for the most part — pi is well architected. But one problem nearly killed the project:

01

The Update Problem

The first time I tried to pull upstream changes from pi's repo, it wiped every customization I had made. Plan mode? Gone. MCP servers? Gone. The entire branch was a fork that would drift further from upstream with every commit. I needed a way to stay current without rebuilding my customizations from scratch every time.

02

The /update Skill

I built a custom /update command that solves this. Instead of a naive git pull, the /update skill pulls the latest from pi's upstream, then reapplies all D4C-specific customizations on top — skills, configs, MCP servers, extensions. The layering is deterministic: pull, merge, overlay. No manual conflict resolution, no lost features.

03

Extension Integration Depth

TODO and WebSearch exist in pi's marketplace, but running them as extensions meant they weren't deeply integrated. The agent could use them, but they didn't feel native. I had to modify how the agent registers and prefers these tools — making them first-class citizens rather than optional add-ons.

04

MCP Server Reliability

Permanent MCP servers need to be resilient. If Context7 or Playwright fail, the agent should degrade gracefully rather than crash. I added health-check retries and fallback messaging so the agent acknowledges the tool is down and suggests alternatives instead of failing silently.

"The /update skill was the make-or-break feature. Without it, D4C would have been a static fork — dead in the water after the first upstream sync."

D4C /update skill output showing the pull-and-layer process
Fig 4 — The /update skill in action: pulling upstream changes and layering D4C features on top.

What's Next

D4C is actively used as my daily coding agent. Here's what I'm planning next:

In Progress

Custom Skill SDK

A lightweight SDK for writing custom skills without touching the agent's internals. The goal is to make adding a new mode or command as simple as dropping a file into a directory.

In Progress
Planned

Session Memory Persistence

Remember decisions and context across sessions. If the agent figured out your project structure in a previous session, it shouldn't need to rediscover it.

Planned
Exploring

Multi-Agent Orchestration

Spin up specialized sub-agents for parallel task execution. One agent builds while another researches — coordinated by the main agent.

Exploring
Exploring

Open Source Release

Package D4C's customization layer so anyone can apply the same features to their own pi fork. Plan/build modes, MCP servers, and the /update skill as a reusable overlay.

Exploring

Try D4C

Fork it, tweak it, or just browse the source. D4C is open and built in the open — contributions and ideas welcome.