Project management is not tracking: building my own PM tool on Drupal 11

From
Joe Hahn
Date
Read
13 min
Animated share card for Project management is not tracking: building my own PM tool on Drupal 11

I spent a decade at an agency with multiple project managers. Then I went fully freelance and discovered I had inherited a job I had never actually done.

At an agency the coordination work is real work, and other people do it. Somebody decides which bucket a piece of work belongs in. Somebody notices that the thing you are researching this week will matter to a different client next month. Somebody keeps the thread when a small experiment quietly becomes a deliverable. I had always thought of project management as tracking — a place where the tasks live. It is not. It is deciding what a piece of work is, continuously, and that decision had been made for me by professionals for ten years.

So I did what everyone does: I tried project managers. Basecamp, Wrike, MS Planner, and a long tail after that; some of them I had used professionally for years, so this was not unfamiliarity with the category. For a while I seemed to be testing a new one every week.

They were mostly fine. That is the part worth sitting with — none of them were wrong. They were built on an assumption that did not hold for me, and it took a long time to see because nobody states it out loud: that somebody has already decided what each piece of work is, and the tool's job is to hold that decision. At an agency that is true. On your own, that decision is the work, and every tool I tried wanted it finished before I opened the app.

Then I found Leantime, and genuinely liked it. It is thoughtfully built and takes the way non-project-managers work more seriously than most things in the category. I ran my work out of it for months, longer than anything else lasted. Three things eventually pushed me off, and only the third is really about Leantime at all.

Three reasons, and only one of them is theirs

The upsell got tiring. Freemium is a legitimate way to fund software, but the boundary kept landing on whatever I wanted next. The official MCP Server is a paid plugin; giving an agent a real identity rather than a service account needs a second paid plugin, because plain API keys cannot answer "what are all my tasks". To be fair, Leantime's agent story is real and reasonably deep — an official server plugin, an official client bridge, a php-mcp-server library underneath both, and at least three community MCP servers on GitHub, one of which needs no plugin at all. It was the gate, not the absence.

The dark theme has a specific, measurable problem. I could have left that as a vibe. Instead I pulled public/theme/default/css/dark.css and computed the ratios, and the result is more interesting than "it's bad".

Body text is fine: --primary-font-color: #bbbbbb on the #292929 content background is 7.58:1, comfortably AAA. Somebody thought about that. The failure is --accent1 — the interactive colour, used for links, tabs and the primary action:

Pair Ratio WCAG 1.4.3 AA needs 4.5:1
accent1 on tab background #222 2.98:1 fail
accent1 on content background #292929 2.73:1 fail
accent1 on main background #404040 1.94:1 fail

In the light theme --accent1 is hsl(199, 100%, 20%) — 10.16:1 on white. The dark theme lightens it to hsl(198, 100%, 32%). The adjustment goes the right direction and stops less than halfway. Twelve points of lightness moves a blue off white; it does not bring one onto #292929. And it is specifically the colour that tells you what you can click. (Separately, --accent2 carries white label text at 3.02:1 in both themes — a palette issue that predates the dark theme entirely.)

That is a handful of lightness values, not a rewrite. But it is the kind of thing that stays broken when nobody is looking at that surface, which is why I said neglected rather than bad.

And my work does not decompose into separate tools. This is the real one, and it is the agency problem again wearing different clothes. A research tangent becomes a mini project; the mini project turns out to be part of a client engagement; the notes I took while working it out are what I need six months later when it resurfaces. Tasks, a knowledge base, and the decisions I want an agent to remember are one body of material at different stages — and the stage keeps changing after I have filed it. Someone used to reclassify that for me. Now nobody does, so keeping it in three places makes me the integration layer, and I am a bad one, because I am also the person doing the work.

So I built my own on Drupal 11 and inverted the usual order. The MCP server came before the kanban board. The board came before the theme. The theme came before anything looked good. It is called Petrichor, it has been my system of record since yesterday, and it is on drupal.org as a -dev release.

What it is, if you ignore the agent half

Most of this is a normal Drupal module suite and useful without an LLM anywhere near it:

  • Real content entities, not nodes. Projects, tasks, milestones, time entries, wiki pages, memories. Views works on them, Field UI works on them, you can add fields without touching code.
  • A hierarchical markdown wiki with [[Wiki Links]] and backlinks — including to pages that do not exist yet, because a page you have already linked to is a to-do.
  • Full revision history on wiki pages: who saved it, when, and the log message they left.
  • Drag-and-drop kanban on core/sortable — SortableJS already ships with Drupal. No npm, no build step, no CDN. The whole board is 278 lines of custom JS.
  • Optimistic concurrency on writes, so a person and an agent editing the same task get a conflict rather than a silent clobber.
  • A theme with published contrast ratios, measured and written into the stylesheet — including the one place it deliberately goes below 3:1, and why.

The kanban board. Columns come from the task status field's allowed values, so the board and the MCP
tool's status enum cannot drift apart

Every screenshot here went through a sanitizer before capture: the card titles are generated placeholder text, because the live instance is where my actual client work lives. Column headings, counts and admin chrome are real; the data is not.

The knowledge base, sharing the same shell as the project
side

Is a one-stop-shop actually justified?

"One tool for everything" is what every bloated product says on the way to becoming unusable, and Drupal already has contrib modules for wikis and tasks and comments. So here is the narrow version, because the broad one is not true.

The obvious alternative is an aggregator: one MCP server federating over existing contrib modules. It fails on something specific and checkable — there is no shared concept of a project to federate over. A wiki module has pages. A task module has tasks. Neither knows what a "project" is, and neither knows about the other. To make one call return a brief plus open tasks plus that project's wiki pages plus the memories scoped to it, you first invent the entity that connects them and then teach every module about it. Once you have, you have built this anyway — as a patch layer over four codebases, four permission models and four release cycles. Cross-entity backlinks need one store. One agent identity needs one answer to "can this delete things", not four.

And here is what was not justified. The suite also shipped milestones, timesheets and an idea board, all from mapping Leantime's feature list before I had thought hard about what I was short of. Timesheets earn their place — I do client work and someone has to be billed. Milestones are borderline. The idea board had no defence I could make with a straight face, so while writing this section I deleted it: one entity type, one service, three MCP tools, and a slice of every agent's tool-list context on every session that never used it. It held exactly one entry — "make blocked a flag, not a status" — which was a task, and got worked as one.

So the claim is narrower than the pitch: tasks, KB and memory belong in one system because they share a project scope and an agent identity no aggregator can synthesise. The rest is inherited scope, and inherited scope should justify itself or leave.

One service layer, or the API drifts

The gap I started from was an agent surface that could not do everything the UI could — the normal fate of any API maintained beside an application rather than underneath it. So the rule that matters most here is boring:

Every MCP tool delegates to a domain service. Controllers contain no entity queries. UI endpoints call the same services.

Tool providers are thin argument translators. The board's drop endpoint and the update_task MCP tool are the same code path. There is no second implementation to fall behind, because there is no second implementation.

Two features make it agent-first. Context bundles: one call returns the brief, open tasks, recent activity, milestones, a wiki index and relevant memories — session bootstrap in a single round trip, with a size budget, so wiki bodies are never inlined and every truncated list says showing 12 of 38; pass offset=12 for more. An agent silently handed page 9 of a worse ranking is worse off than one told why. And persistent memory: remember / recall / forget, scoped global or per-project and attributed to the agent that wrote it.

Two things I only found by building them

changed nearly ate the kanban board. The obvious way to store drag-and-drop order is a sort_weight base field. A design review caught what that would do: every drag becomes an entity save, an entity save bumps changed, and changed is what optimistic concurrency compares, what list_tasks sorts by, and what the activity feed reports. Dragging a card would have silently broken the guard that stops two agents clobbering each other, while appearing to work perfectly. Card order went into a side table, same as memory recall times. A derived value written on read is a write in disguise.

And the concurrency guard was broken anyway, in a way only an agent would hit. It compared RFC 3339 strings with >. ISO 8601 sorts lexicographically only within one UTC offset:

2026-08-07T23:00:00-04:00   is 2026-08-08T03:00Z — the later instant
2026-08-08T01:00:00+00:00   is 2026-08-08T01:00Z — the earlier one
strcmp calls the second later. It is not.

The board's JavaScript was safe purely by accident: it echoes the server's own string back untouched, and there is a comment in board.js warning that reformatting it would disable conflict detection. That warning was load-bearing, and nothing protected anyone else. Any MCP client normalising a timestamp to UTC — which new Date().toISOString() does by default — silently disabled its own guard, and it failed open: the write proceeded and overwrote whoever edited first.

Both sides now parse to instants, in one shared trait rather than restated in two services. An unreadable token fails closed — refusing a write you cannot verify costs a re-read; permitting it costs somebody their edit. The regression test asserts the trap before asserting the fix: it first checks that the stale token sorts later as a raw string, so if that ever stops being true the test fails loudly rather than quietly ceasing to cover the bug.

What I measure

I did not want "it feels done". Every gate is a number: 47 tests, 658 assertions; a 16-check parity suite running four workflow stories against a real installed site over HTTP with an agent API key; a from-scratch install in CI on every push; and continuous backup with one tested restore.

Two of those earned their keep within a day. The from-scratch install caught a bug my dev site structurally could not: my comments module shipped field.storage.comment.comment_body in config/install, but Drupal's comment module already creates that for whichever comment type needs it first — so any site with comments in use would hit PreExistingConfigException on enable. It passed locally only because I had hand-deleted that config, a state no real site is ever in.

And dogfooding found what two rounds of adversarial review could not. Fifteen minutes of real use surfaced six problems, the sharpest being get_my_work returning an empty set while eight real tasks existed — it keyed on in-progress status plus a due-date window, and a solo user rarely sets due dates. The Today view was going to be built on that query and would have shipped blank.

What I'd do differently

  • It has one user. Every ergonomic decision came from watching one person work, and I do not know which of them generalise.
  • SQLite only. Not a design position — nobody has run the other drivers.
  • The à-la-carte install is architected for and unverified. Removing a submodule does cleanly drop exactly its tools from the MCP surface, which is real evidence, but that is the easy direction; nobody has enabled the wiki without the task half and confirmed it comes up.
  • The board's UI is the weakest part, exactly as the original analysis predicted. Drupal gave me the data layer nearly free and helped with the interface not at all.
  • I should have written the justification section earlier. Doing it honestly deleted a module.
  • And I should have read the CI documentation before writing the CI config. Publishing this cost a day that a documented local test harness would have prevented entirely, so I wrote the whole path down. That one got its own post.

The thing I would keep: inverting the build order. Having the agent interface first meant the tool was useful weeks before it was pleasant to look at, and every UI decision after that came from real usage instead of guesses.


Try it: composer require drupal/petrichor:1.0.x-dev — project page. Development release, no security coverage, limits as stated above.


Sources checked (2026-08-07)

Leantime's MCP landscape, verified before publishing rather than from memory:

  • Leantime/leantime-mcp — official client bridge, stdio to HTTP proxy. README: "If you are self hosted, you need the MCPServer Plugin."
  • Leantime/php-mcp-server — the core PHP MCP library.
  • MCP Server plugin — official server side. Paid, tiered by user count, beta 1.1.0, needs Leantime 3.7.3+. Notes that API keys act as service accounts and cannot run user-specific queries, so full functionality needs personal access tokens via the Advanced Auth plugin.
  • daniel-eder/leantime-mcp — community; talks to the JSON-RPC API and explicitly needs no plugin. Thirteen tools, none for milestones. Also ITK-Leantime/mcp-leantime and kmacman/leantime-mcp.

Contrast figures computed from public/theme/default/css/dark.css and light.css at master, using the WCAG 2.1 relative-luminance formula against the declared token values. If any of this has moved by the time you read it, the projects are the authority, not this post.