Pocock Domain Modeling and CONTEXT.md Integration Research
Pocock Domain Modeling and CONTEXT.md Integration Research
Question
How do Matt Pocock's domain-modeling discipline and CONTEXT.md conventions
compare with Harness's existing grilling, domain-structure, planning, and wiki
flows, and where can they integrate without creating competing sources of truth?
Three readonly lanes covered Pocock's first-party material, the current Harness contracts, and an independent integration analysis. The coordinator also read the linked X conversation and AI Hero article in the requested browser.
Trusted external facts
The model is shared language
Pocock's linked post argues that understanding the terms, names, and
relationships used consistently throughout a codebase amounts to understanding
the codebase, even without reading its implementation. In the replies he says
domain-language changes should generally produce corresponding code renames,
and that the human must actively participate while CONTEXT.md is written.
Source: linked X conversation.
His domain-modeling skill operationalizes that claim as an active design discipline. It immediately challenges glossary conflicts, sharpens overloaded terms, probes relationships with concrete edge cases, compares verbal claims with code, and records a term at the moment it becomes settled. Merely reading the glossary is passive consumption and does not invoke the skill. Sources: AI Hero overview and canonical domain-modeling skill.
CONTEXT.md is deliberately narrow
The default layout is one root CONTEXT.md plus docs/adr/. A repository with
a root CONTEXT-MAP.md instead declares multiple bounded contexts and points to
their local CONTEXT.md files and context-specific ADR directories. Files are
created lazily: the first settled term creates the glossary; the first decision
that clears the ADR bar creates the ADR directory. Sources:
domain-modeling file structure and
domain-doc consumer rules.
Each glossary entry chooses one canonical term, defines what it is in one or two
sentences, and lists rejected synonyms under _Avoid_. Only project-specific
domain concepts belong. Specifications, implementation details, general
programming concepts, decision history, and scratch notes do not. A context map
lists contexts and their directional relationships, including exchanged events
or genuinely shared types. Source:
CONTEXT format.
Decisions use a different threshold and artifact
An ADR is offered only when all three conditions hold: the choice is costly to reverse, surprising without its context, and the result of a real trade-off. The minimal ADR records context, choice, and reason in one to three sentences; extra sections are optional. Sources: domain-modeling ADR gate and ADR format.
Known limitations matter to adoption
The AI Hero article identifies recurrent failure modes: agents turn the glossary into a running specification; automatic skill invocation is unreliable; a brownfield glossary needs an explicit, lengthy human interrogation; the skill does not consult issue history; and its bundled ADR convention can conflict with an established repository format. It advises making a bloated glossary lean before splitting it and warns that an unreviewed agent-authored glossary can become false lore. It also frames the payoff as strongest at naming boundaries such as modules, tables, enums, tickets, and commands, not ordinary prose. Source: AI Hero overview and common questions.
Current Harness model
What already overlaps
requirements-grillalready turns uncertainty into canonical glossary terms, rejected aliases, relationships and cardinalities, states, axioms, ambiguities, and confirmed decisions. It immediately challenges conflicts and checks claims against code. Sources:.agents/skills/requirements-grill/SKILL.md:8-45and.agents/skills/requirements-grill/references/grilling-flow.md:15-48.- Its log is append-only decision history while its status file holds the current
glossary and frontier. Changed meanings are superseded rather than silently
rewritten. Source:
.agents/skills/requirements-grill/references/artifact-output.md:7-184. - Closed material flows into
create-spec; implementation detail belongs later increate-plan, whileimplement-specexecutes accepted work. Sources:.agents/skills/create-spec/SKILL.md:8-51,.agents/skills/create-plan/SKILL.md:8-85, and.agents/skills/implement-spec/SKILL.md:8-49. - Stable knowledge is synthesized into routed wiki concepts, flows, and
decisions. The wiki explicitly rejects a second routed domain article tree.
Sources:
.agents/skills/requirements-grill/references/wiki-output.md:28-89andapps/wiki/AGENTS.md. - Backend and frontend domain-structure skills already organize code around
feature ownership, invariants, domain models, events, public entrypoints, and
one-way dependencies.
codebase-designseparately owns technical vocabulary for modules, interfaces, seams, depth, and adapters. Sources:.agents/skills/backend-domain-structure/SKILL.md:12-62,.agents/skills/frontend-domain-structure/SKILL.md:12-29, and.agents/skills/codebase-design/SKILL.md:8-60.
Material gaps
- No semantic
CONTEXT.mdorCONTEXT-MAP.mdexists.wait-whatnevertheless instructs agents to use the ubiquitous language fromCONTEXT.md, leaving a consumer contract with no producer. Source:.agents/skills/wait-what/SKILL.md:7. - There is no first-class domain-modeling skill. Backend/frontend domain skills govern code placement; they do not own canonical business vocabulary or bounded-context discovery.
- Glossary knowledge remains scoped to per-topic grill artifacts and later wiki synthesis. Other skills have no mandatory, cheap domain-language read gate.
- Harness
ContextPlandescribes scaffold packs and contributions, not a DDD context, glossary, or context map. Source:packages/scaffold/src/context-plan.ts:5-76. - Requirements grilling stores terms together with relationships, axioms, ambiguities, and history. Copying this wholesale into Pocock's narrower glossary would violate its semantics.
- Backend and frontend structure skills use different ownership classifiers and do not share one named domain-language contract across surfaces.
- Monorepo packages are deployment and ownership surfaces, not automatically
bounded contexts. Inferring a context per
apps/*orpackages/*directory would confuse architecture with product semantics.
Integration choices
A. Native CONTEXT.md authority
Adopt Pocock's file layout as the authoritative ubiquitous language and teach all Harness phases to consume it. This gives direct compatibility with external skills and a clear universal read path. It also has the highest migration risk: existing grill and wiki glossary state must be reconciled, multi-context boundaries require human decisions, ADR location must align with Harness wiki policy, and two existing glossary representations must lose or redefine their authority.
B. Harness authority with generated compatibility projection
Keep confirmed grill/wiki knowledge authoritative and generate a narrow root
CONTEXT.md containing terms and _Avoid_ aliases only. This supports external
consumers without two editable glossaries. It requires a managed-file contract,
provenance, stale-projection detection, update ownership, and a deliberate rule
for mapping project wiki domains to bounded contexts. It is justified only if
external-tool compatibility is a concrete product requirement.
C. Integrate the discipline first, preserve current authority
Add a first-class domain-modeling behavior or skill that runs beneath
requirements-grill, architecture improvement, and other modeling workflows.
It would challenge vocabulary, invent boundary scenarios, cross-check code, and
persist resolved terms immediately into the existing grill log/status. Closed
terms continue into the routed wiki and spec. Downstream skills gain a small
read gate for the accepted glossary relevant to their work. No root context file
is created yet.
This is the lowest-risk first step. It captures Pocock's strongest behavior
without establishing a duplicate truth source. It does not solve compatibility
for third-party skills that only inspect root CONTEXT.md.
D. Ship only a pack skill
Add domain-modeling to an appropriate pack but leave artifact authority vague.
This is easy mechanically and weak semantically. The skill would either fail to
persist its output or invent a new authority at runtime. It should follow, not
precede, the artifact decision.
Synthesized recommendation
Choose C first, then evaluate B from concrete consumer evidence.
- Define domain modeling as the active vocabulary discipline and keep generic grilling as the decision scheduler.
- Make
requirements-grillexplicitly invoke that discipline while it updates its current glossary and append-only history inline. - Preserve a strict semantic split: glossary entries define terms and avoided synonyms; relationships and axioms remain explicit adjacent structures; qualifying architectural decisions follow the repository's existing decision convention after passing the three-part ADR test.
- Add passive glossary consumption to specification, planning, implementation, backlog naming, architecture improvement, and domain-structure workflows.
- Define bounded contexts by business-language boundaries and relationships, never by workspace folders alone.
- Only after this behavior is stable, decide whether a generated
CONTEXT.mdcompatibility surface earns its lifecycle and drift cost.
This recommendation is an inference from the evidence, not an accepted product decision. It deliberately does not choose the eventual authoritative artifact.
Open product decisions
- Should
domain-modelingbe a reusable model-invoked skill, behavior embedded inrequirements-grill, or both with one owning contract? - Which durable artifact is authoritative for accepted terms: current grill
status, a stable routed wiki glossary, or
CONTEXT.md? - Does Harness need a repository-wide stable glossary page separate from per-topic grill status?
- Should
CONTEXT.mdbe editable authority or generated compatibility output? - Where should rare ADRs live, and how should they relate to routed wiki decision pages?
- Which business boundaries justify multiple contexts, and who confirms them?
- How are historical terms backfilled and conflicts among code, old grills, specs, tickets, and wiki pages resolved without automated invention?
- Which downstream skills must read domain language, and how do they locate only the contexts relevant to their task?
- Is generated-artifact compatibility valuable enough to add managed-file, receipt, update, and stale-state behavior?
Next action
Run a bounded requirements grill over the nine decisions above. The first decision should establish artifact authority; skill catalog, pack membership, scaffold output, and lifecycle integration all depend on it.