cd /news/developer-tools/docs-first-then-code-how-watcher-fea… · home › topics › developer-tools › article
[ARTICLE · art-180143] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Docs first, then code: how Watcher features avoid silent drift

The team behind Apogee Watcher, a multi-tenant PageSpeed monitoring SaaS, adopted a docs-driven delivery process in which the wiki is treated as the source of truth and a gate before any Laravel code changes on the develop branch. Each ticket must name its governing wiki doc, extract existing constraints such as paths, data fields, quota rules and branding, and write changes back as part of done. The team frames stale documentation as a product defect, arguing that silent drift between written and running behaviour erodes trust in a continuous-monitoring product.

recommendation

Before letting a coding agent touch the develop branch, require it to name the governing wiki doc and pull its constraints into the PR acceptance criteria, then update that doc before closing the ticket.

more in playbook: Working with AI coding agents
by read5 min views18 publishedDec 2, 2026

When we opened Apogee Watcher to AI coding agents as well as humans, we worried less about broken merges than about features that shipped cleanly while the plan, the schema note, and the support answer quietly disagreed. The product looked finished in the pull request. Marketing still described last month’s behaviour. Support answered from a wiki page nobody had touched.

So we made the wiki the gate before code moves. Before anyone edits Laravel on the develop branch, the task has to name its governing doc, pull the constraints that already live there, and treat write-back as part of done. That habit is docs-driven delivery: a short ritual that keeps a multi-tenant PageSpeed SaaS from drifting into two truths (the one in git, and the one everyone else still believes). Most tickets need a named wiki home and a constraint list, not a novel-length design document.

Docs-first, here, means the wiki is the source of truth for product behaviour before the first line of application code moves. A Watcher change almost always already has a home: product and architecture notes, database and server paths, marketing voice, or the public docs agencies actually read. The job is to map the ticket to that file, not to invent a parallel brainstorm in chat.

What we extract before coding is concrete: paths, components, data fields, tone, quota rules, multi-tenant boundaries. Those constraints become the acceptance bar for the pull request. If the wiki says PageSpeed jobs honour organisation quotas and scheduled discovery, the implementation does not invent a one-off path that skips them. If the branding guide names Victor Mono and the orange/charcoal palette, a new Blade screen does not quietly ship a different typeface “just for this screen.”

That is documentation-first development as an engineering gate, not README theatre. The README still matters for install. The wiki matters for what stays true after the merge.

Silent drift starts when a change “works” and the plan is left for later. Agents are especially good at that pattern: they can implement a green path, leave a plausible commit message, and never open the governing doc. Humans do the same under deadline pressure. The ticket closes. The schema note still describes the old column. Support still pastes the old steps.

The cost shows up outside engineering. An agency lead asks whether multi-site schedules include sitemap discovery, and the answer depends on who they ask. A changelog claims a reporting change that marketing has not mirrored. A buyer who already knows what automated web performance monitoring means looks for that behaviour in the app and finds a half-updated screen.

A stale wiki is enough to produce those failures; you do not need a production outage. We treat the mismatch as a product defect: a SaaS that sells continuous monitoring rather than one-off audits sells trust with every schedule, so the next support thread becomes the regression report when written truth and running truth diverge.

The loop is short enough to copy into another team’s checklist this week.

Post-change hygiene on the development host (cleared views, rebuilt assets when classes change, careful tests that do not wipe the shared database) sits beside that loop, so the next person inherits an updated plan instead of reverse-engineering the last merge. Branch discipline is a sibling habit: fixes land on develop before production. The docs loop keeps that branch from becoming a museum of undocumented behaviour. When the next feature has nowhere to hang in the wiki, create the home first. That is cheaper than teaching support a surprise.

The opposite habit looks efficient for a day. Someone patches production, pastes a screenshot into Slack, and promises to “update the docs tomorrow.” Tomorrow never arrives with the same detail. The next agent reads the old wiki, reintroduces the bug, or ships a UI that contradicts the patch. Support keeps answering from the stale page, because that is what search finds.

Docs-first flips the order: constraints first, code second, write-back before done. It feels slower on a one-line fix. Across a month of agent-assisted pull requests it is faster, because each change leaves a trail the next change can trust. We would rather ship one fewer surprise feature than explain why the app and the help article disagree.

For the buyer-facing side of that honesty, the Watcher guide on how to set up automated PageSpeed monitoring for multiple sites is the operational companion, because definition and setup stay aligned only when the wiki and the public posts move together. Is this the same as writing a long design document for every ticket?

No. Most Watcher tasks map to an existing wiki file and a short constraint list. The novel-length design doc is the exception. The rule is “name the governing doc and write behaviour back,” not “produce a ten-page RFC.”

Does docs-first replace code review or tests?

No. Review and tests still catch logic bugs. Docs-first catches a different class of failure: behaviour that is correct in git and wrong in every human-facing artefact. Both gates matter.

What if the wiki is wrong?

Fix the wiki as part of the same change, or open a short task that corrects it before you encode the wrong constraint. Shipping code against a known-bad plan just hardens the drift.

How does this relate to refusing production hotfixes?

Hotfix policy is about where code lands (develop and the development host before production). Docs-driven delivery is about what must stay true when that code lands. They reinforce each other; they are not the same ritual.

If you run a Laravel SaaS with humans and agents in the same repository, pick one upcoming feature and force the loop once: governing doc, extracted constraints, develop-branch implementation, write-back before merge. Skipping the loop rarely fails the build; it leaves a support answer that contradicts the app, and a buyer who trusted the public definition of [automated web performance monitoring](https://apogeewatcher.com/blog/what-is-automated-web-performance-monitoring?utm_source=hashnode&utm_medium=referral&utm_campaign=docs-first-then-code-watcher-features-avoid-silent-drift) until the product quietly moved.

For the agency-facing setup path that should stay in sync, start from [how to set up automated PageSpeed monitoring for multiple sites](https://apogeewatcher.com/blog/how-to-set-up-automated-pagespeed-monitoring-for-multiple-sites?utm_source=hashnode&utm_medium=referral&utm_campaign=docs-first-then-code-watcher-features-avoid-silent-drift) and keep the definition post beside it, so “automated monitoring” still means the same thing in marketing and in the app even after the next agent-assisted merge.
── more in #developer-tools 4 stories · sorted by recency
── more on @apogee watcher 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/docs-first-then-code…] indexed:0 read:5min 2026-12-02 · —