Skip to content

docs: add architecture decision records and graduate their rules - #602

Closed
gbrlcustodio wants to merge 2 commits into
docs/authoringfrom
docs/decisions
Closed

docs: add architecture decision records and graduate their rules#602
gbrlcustodio wants to merge 2 commits into
docs/authoringfrom
docs/decisions

Conversation

@gbrlcustodio

@gbrlcustodio gbrlcustodio commented Aug 11, 2026

Copy link
Copy Markdown
Member
Stack PR Base Content
1 of 2 #597 dev The living docs: architecture and conventions.
2 of 2 #602 (this one) docs/architecture-principles The decision records under docs/contributing/adr/.

Review #597 first. This diff shows only the second step.

What

Record the architecture decisions from the refactor spike as four consolidated decision records, add the guideline that says where a doc belongs, and connect both to the living docs.

  • docs/contributing/authoring.md (new): where a doc goes. Audience first (contributor, consumer by surface, durable cross-cutting at root), then Diataxis kind, one kind per file where practical. Generate fast-changing reference from code. Keep recognizable names and do not invent buckets for a few files. It also holds the rule for where a decision record lives.
  • docs/contributing/adr/ (new): four records. Layered responsibility (0001), typed single-form contract (0002), MCP tools express outcomes (0003), vertical-slice structure and naming (0004). An index README.md maps each record to the living doc that carries its current rule, and lists the rollout work tracked in refactor: apply the four architecture decisions (ADR rollout) #601.
  • docs/mcp/README.md: gains the tool-design section that architecture.md points to.
  • docs/contributing/architecture.md: four lines change, each one a back-link to a record this PR creates. That is the whole diff on this file.

All four records land as proposed

None is adopted. A fact-check against the code found that the rules are not yet true of the code, so the set stays one editable proposal rather than a set of immutable records.

This matters for how you read them. An adopted record is immutable, and changing the decision means adding a record that supersedes it. A proposed record is still editable in place, so a correction here is cheap. Say so now if a decision reads wrong.

The rollout that would earn adoption is tracked in #601.

Why the records are separate from the rules

The rule a contributor follows day to day lives in a living doc (architecture.md, conventions.md, mcp/README.md). The record keeps the reasoning that produced it. A living doc can be edited freely as the code moves. A record, once adopted, cannot. Splitting them means the durable why does not rot alongside the current how.

Scope notes

  • The ten exploratory records from the spike are consolidated into these four. The full exploration stays in the branch history of refactor/mcp-named-concerns.
  • No domain-surface-map.md ships. It derived from an internal model, so its durable slice list moved into ADR-0004 and its migration work-list into refactor: apply the four architecture decisions (ADR rollout) #601.
  • Existing record prose is kept intact beyond the targeted status and scope changes, so the recorded reasoning is not altered after the fact.

Testing

Docs-only. No test asserts a docs/ path, and no workflow checks links, so verification is manual:

… conventions

Fold the boundary cluster (validate at the edge, parse don't validate,
self-guaranteeing types), type ownership, and the response-typing rule
into docs/contributing/conventions.md. Re-scope architecture into
docs/contributing/architecture.md around the layer model, composition
root, ports, and the three surfaces.

Thin the root AGENTS.md coding sections to a router that points to the
two design docs. Remove docs/architecture.md and docs/response-typing.md,
whose content moved. Repoint docs/README.md, packages/mcp/pyproject.toml,
and packages/mcp/AGENTS.md at the new paths.

Signed-off-by: Gabriel <gabriel.custodio@pipefy.com>
Add docs/contributing/authoring.md, which records where a doc belongs in
the docs/ tree: audience first, then Diataxis kind. Add the four
consolidated records under docs/contributing/adr/: layered
responsibility, typed single-form contract, MCP tools express outcomes,
and vertical-slice structure. An index README maps each record to the
living doc that holds its current rule.

All four records land as proposed. A fact-check against the code found
that no record is adopted yet, so the set stays one editable proposal
until each rule is true of the code.

Link each record from the living doc that carries its rule, and add to
docs/mcp/README.md the tool-design section that architecture.md points
to.

Signed-off-by: Gabriel <gabriel.custodio@pipefy.com>
@gbrlcustodio

Copy link
Copy Markdown
Member Author

Closing in favor of #627, which carries the same branch (docs/decisions) with the correct base.

The content is unchanged and the head commit is the same. The only reason for a new number is that GitHub refuses a base change on a member of a native stack, and this PR still pointed at docs/authoring. After #598 closed, that base was no longer an ancestor of this branch, so the merge base fell back to dev and the diff inflated to 15 files, showing #597's changes as well as this PR's. #627 has the correct base and shows the intended 10 files.

This PR also now includes the authoring guideline from #598 and the record statuses from #625, so the four-PR stack is two PRs: #597 then #627.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant