Skip to content

CRY-56: docs(linear): add Ash domain ERD and AGENTS.md maintenance contract - #142

Merged
bougyman merged 3 commits into
mainfrom
CRY-56-ash-domain-erd
Aug 18, 2026
Merged

CRY-56: docs(linear): add Ash domain ERD and AGENTS.md maintenance contract#142
bougyman merged 3 commits into
mainfrom
CRY-56-ash-domain-erd

Conversation

@bougyman

Copy link
Copy Markdown
Member

Summary

  • Creates documents/ash-domain-erd.adoc as the canonical, current inventory of the LinearCli.Linear Ash domain
  • Covers all 8 resources, 20 actions, 17 domain code interfaces, GraphQL/nested-data associations, and shared helpers
  • Adds a ## Domain documentation section to AGENTS.md with an explicit same-change maintenance contract

What the ERD document contains

  • Architecture overview: explains no local data layer — the Linear GraphQL API is the sole backing store; all actions are manual implementations calling LinearCli.Api directly
  • Resource inventory table: all 8 resources with primary key and public attributes
  • Association table: every source→target association with cardinality, attribute name, and implementation type (all labeled "GraphQL/nested-data" — zero Ash DSL relationships exist)
  • ERD diagram (Mermaid erDiagram block) with all associations labeled [nested]
  • Action/interface matrix: maps every domain code interface to its action, action type, manual module, and GraphQL operation (20 rows covering all 17 defined code interfaces plus any action-only entries)
  • Shared helpers section: Issue.Update (shared issueUpdate mutation runner for 4 update actions) and Paginate (cursor-based pagination used by 3 read actions)
  • Maintenance contract section (also mirrored into AGENTS.md)

Test plan

  • mix compile --warnings-as-errors passes (no Elixir changes)
  • mix test — 12 tests, all pass (no code changes)
  • Document is AsciiDoc under documents/, accurately reflects the code
  • Every current resource, action, and code interface is represented
  • All associations labeled by implementation type (GraphQL/nested-data vs Ash DSL)
  • Diagram has a complete plain-text table equivalent
  • AGENTS.md maintenance contract is specific and actionable
  • documents/project-structure.adoc cross-link deferred (CRY-55 not yet merged)

Closes https://linear.app/cryptokairos/issue/CRY-56/document-and-maintain-the-ash-domain-erd

🤖 Generated with Claude Code

Creates documents/ash-domain-erd.adoc as the canonical inventory of the
LinearCli.Linear domain, covering all 8 resources, 20 actions, 17 domain
code interfaces, GraphQL/nested-data associations, and shared helpers
(Issue.Update, Paginate). Adds a Domain documentation section to AGENTS.md
requiring same-change updates to the ERD whenever domain structure changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 14:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…butes

Move the erDiagram block to appear immediately after the architecture
overview, before the text tables. Expand the diagram to include full
entity attribute boxes for all 8 resources, using the target resource
name as the type for nested-struct fields (e.g. User assignee, Team[]
teams). Relabel the text tables as explicit accessible-text equivalents
rather than primary content.

No changes to action/interface matrix, shared helpers, or maintenance
contract sections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bougyman

Copy link
Copy Markdown
Member Author

Rework — run 2

Addressed review feedback: "This is built as a table. Can we use mermaid to make a better looking ERD?"

The document already contained a Mermaid erDiagram block, but it appeared after the association table and showed only bare entity names connected by edges. Changes made:

  • Moved the ERD diagram to immediately follow the architecture overview — it is now the first thing you see after the intro
  • Expanded the Mermaid erDiagram to include full entity attribute boxes for all 8 resources, using the target resource name as the attribute type for nested-struct fields (e.g. User assignee, Team[] teams, WorkflowState state) — this makes it look like a proper ERD rather than just a relationship graph
  • Relabeled the resource and association tables as "text reference" (accessible equivalents), clarifying their role as the plain-text alternative to the diagram rather than the primary representation

No changes to the action/interface matrix, shared helpers, or maintenance contract sections.

@bougyman
bougyman merged commit 39dfd80 into main Aug 18, 2026
2 checks passed
@bougyman
bougyman deleted the CRY-56-ash-domain-erd branch August 18, 2026 14:40
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.

2 participants