You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+68-4Lines changed: 68 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,15 +173,72 @@ provider do
173
173
end
174
174
```
175
175
176
+
## Three usage scenarios
177
+
178
+
Diffo supports three distinct usage patterns. Every test is tagged with one or more of these
179
+
atoms — absence of all three means the test has not yet been classified.
180
+
181
+
| Tag | Scenario | Description |
182
+
|-----|----------|-------------|
183
+
|`:provider_only`| Vanilla Provider | Uses `Diffo.Provider` resources as-is. No custom domains, no extensions. Good for basic TMF inventory and for introducing Diffo incrementally. |
184
+
|`:provider_extended`| Extended within Provider | New resource types defined inside `Diffo.Provider` itself, extending base fragments (e.g. `DefinedSimpleRelationship`). Pain point: external users can't add to the Provider domain without forking Diffo. |
185
+
|`:domain_extended`| True domain extension | The **recommended pattern**. An external domain (e.g. `MyApp.SRM`) owns resources using `BaseInstance`, `BaseParty`, `BasePlace`, and `BaseCharacteristic` fragments. Exposes its own API; consumers need not know about Diffo internals. |
186
+
187
+
Tests may carry `:provider_extended` and `:domain_extended` together when they span both.
188
+
`:provider_only` is mutually exclusive with the other two.
189
+
190
+
## Domain extension pattern (scenario 3)
191
+
192
+
Any domain whose resources carry `belongs_to :instance, Diffo.Provider.Instance` (or
193
+
`belongs_to :party, Diffo.Provider.Party`) and use `manage_relationship` to relate them
0 commit comments