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
{{ message }}
Repository navigation
[Core] Plan for adding RelationshipCollection with opportunity, award, and organization relationships #1223
Mary Moilanen (Fluxx) raised record relationships, and Billy proposed a reusable collection pattern following IdentifierCollection:
/** A collection of relationships with a record. */modelRelationshipCollection<TRef> {
/** A record that replaces the current record */supersededBy?:TRef;
/** Additional relationships defined by the implementation */otherRelationships?:Record<TRef>;
}
This ticket owns the generic collection plus the opportunity, award, and organization surfaces that use it. Settle the pattern first: one person leads the design decision on the collection's shape, records it in this ticket, then implements it, rather than running a full ADR cycle.
For opportunities and awards, add OppRelationships, AwdRelationships, and relationships? on OpportunityBase and AwardBase. supersededBy means the referenced record replaces the current duplicate; a temporal successor is different. This ticket does not define HTTP redirects, status codes, fetch behavior, or list exclusion. Award.parent continues to mean amendment or tranche, and pass-through funding remains separate.
For organizations, extend the collection with the typed members Fluxx needs and add OrganizationBase.relationships?: OrgRelationships:
/** A collection of relationships for an organization. */modelOrgRelationshipsextendsRelationshipCollection<OrgRef> {
parent?:OrgRef;
fiscalSponsor?:OrgRef;
dba?:OrgRef; // or a root-level string / string[]?subsidiary?:OrgRef; // or subsidiaries: OrgRef[]?
}
Fluxx plans six concepts: parent, subsidiary, chapter, fiscal sponsor, doing-business-as, and successor. Each needs a recorded cardinality and representation, and a temporal successor must not be conflated with supersededBy.
Acceptance criteria
The collection pattern is recorded in this ticket before implementation, including how organization relationships extend it
Follow on ACs are created for an implementation ticket
Recording where the relationship design landed, so it's on the ticket before I start the implementation.
The pattern. Every model gets a parents list instead of a relationships collection. Each entry is a reference to another record of the same model plus a required kind, an extensible enum specific to that model:
AwardBase.parents?: AwdParentRef[]: entries are { kind, id, title, identifiers? }, kinds amendment, tranche, and supersededBy
OrganizationBase.parents?: OrgParentRef[]: entries are { kind, id, name, identifiers? }, kinds subsidiary, chapter, department, dba, fiscalSponsor, and supersededBy
Every kind enum also takes custom. parents is the right name because every link in scope points up, to the record this one exists under or derives from. Links to other models, such as competitions, funders, or an award's opportunity and recipientOrganizations, stay where they are.
There's no RelationshipCollection<TRef> and no otherRelationships. A generic base in TypeSpec emits an auto-named schema per reference type. And the per-model kind already is the extension point: a new kind is an additive change.
Organization concepts. Each concept is a parents entry owned by the dependent record, pointing at the other organization. The list holds zero or more entries, and an organization can carry several at once (a department that's also fiscally sponsored, for example):
Concept
Kind
Meaning
Subsidiary
subsidiary
The referenced organization owns or controls this one
Chapter
chapter
This organization is a chapter of the referenced organization or network
Department
department
This organization is a department of the referenced organization
Fiscal sponsor
fiscalSponsor
The referenced organization fiscally sponsors this one
DBA
dba
This record is a name the referenced legal entity does business under
Successor
supersededBy
The referenced organization replaces this one, as a merged duplicate or as a new legal entity
Parent in general
any kind above, or custom
There's no unqualified parent; every entry says what kind it is
A DBA link runs one way: the DBA's own record points at its legal entity, and the legal entity doesn't list its DBAs. Core has no reverse lookup, so a parent's record doesn't list the organizations under it.
What this changes in the criteria above. If this lands with everyone, I'll update the description to match. Until then, this comment supersedes it where they differ:
The pattern criterion is this comment.
The RelationshipCollection<TRef> criterion becomes a parents list of kinded references on all three models, with no exported collection, no relationships property, and no otherRelationships. supersededBy stays, as a kind. Everything is still versioned for v0.5.
The six-concept criterion now covers seven, with department added, as in the table. The body's OrgRelationships sketch is replaced by it. On organizations, supersededBy also covers a new legal entity replacing a dissolved one, so the successor concept lives there rather than in a separate field.
The OrgPatchData criterion applies to parents. A patch sets or clears the whole list.
v0.5 has no hold branch, so the Zod and Pydantic check runs before this PR merges.
The examples/docs/changelog criterion stands as written, for parents on all three models.
A few knock-on changes in the same PR:
The award's root parent stays in v0.5 but is marked deprecated, alongside the new amendment and tranche kinds that carry the same meaning. The next version removes it, so the migration note from [Core] Promote the award routes from experimental status #1222 should call out the deprecation.
ADR 0023 gets a dated amendment in place: its parent example moves into the parents list and gains kind, and the stale sentence about awards having no parent concept is fixed. No new ADR.
OrgRef.name is reworded to "the name this organization is known by; for a legal entity, its legal name," since a DBA record's name is its trading name.
changed the title [-][Core] Add `RelationshipCollection` with opportunity, award, and organization relationships[/-][+][Core] Plan for adding `RelationshipCollection` with opportunity, award, and organization relationships[/+]on Sep 29, 2026
@SnowboardTechie since the plan is "done" according to these ACs and we have the ADR ticket + the implementation ticket, I think we can close this one out! up to you!
Activity
laurabelinfante commentedon Sep 28, 2026
Related slack thread @SnowboardTechie https://agilesix.slack.com/archives/C0AP9UAJA7P/p1788537555015469
SnowboardTechie commentedon Sep 29, 2026
Recording where the relationship design landed, so it's on the ticket before I start the implementation.
The pattern. Every model gets a
parentslist instead of arelationshipscollection. Each entry is a reference to another record of the same model plus a requiredkind, an extensible enum specific to that model:OpportunityBase.parents?: OppParentRef[]: entries are{ kind, id, title, identifiers? }, kindsupersededByAwardBase.parents?: AwdParentRef[]: entries are{ kind, id, title, identifiers? }, kindsamendment,tranche, andsupersededByOrganizationBase.parents?: OrgParentRef[]: entries are{ kind, id, name, identifiers? }, kindssubsidiary,chapter,department,dba,fiscalSponsor, andsupersededByEvery kind enum also takes
custom.parentsis the right name because every link in scope points up, to the record this one exists under or derives from. Links to other models, such ascompetitions,funders, or an award'sopportunityandrecipientOrganizations, stay where they are.There's no
RelationshipCollection<TRef>and nootherRelationships. A generic base in TypeSpec emits an auto-named schema per reference type. And the per-model kind already is the extension point: a new kind is an additive change.Organization concepts. Each concept is a
parentsentry owned by the dependent record, pointing at the other organization. The list holds zero or more entries, and an organization can carry several at once (a department that's also fiscally sponsored, for example):subsidiarychapterdepartmentfiscalSponsordbasupersededBycustomA DBA link runs one way: the DBA's own record points at its legal entity, and the legal entity doesn't list its DBAs. Core has no reverse lookup, so a parent's record doesn't list the organizations under it.
What this changes in the criteria above. If this lands with everyone, I'll update the description to match. Until then, this comment supersedes it where they differ:
RelationshipCollection<TRef>criterion becomes aparentslist of kinded references on all three models, with no exported collection, norelationshipsproperty, and nootherRelationships.supersededBystays, as a kind. Everything is still versioned for v0.5.OrgRelationshipssketch is replaced by it. On organizations,supersededByalso covers a new legal entity replacing a dissolved one, so the successor concept lives there rather than in a separate field.OrgPatchDatacriterion applies toparents. A patch sets or clears the whole list.The examples/docs/changelog criterion stands as written, for
parentson all three models.A few knock-on changes in the same PR:
parentstays in v0.5 but is marked deprecated, alongside the newamendmentandtranchekinds that carry the same meaning. The next version removes it, so the migration note from [Core] Promote the award routes from experimental status #1222 should call out the deprecation.parentslist and gainskind, and the stale sentence about awards having no parent concept is fixed. No new ADR.OrgRef.nameis reworded to "the name this organization is known by; for a legal entity, its legal name," since a DBA record's name is its trading name.[-][Core] Add `RelationshipCollection` with opportunity, award, and organization relationships[/-][+][Core] Plan for adding `RelationshipCollection` with opportunity, award, and organization relationships[/+]SnowboardTechie commentedon Oct 5, 2026
After a first review pass and refinement I have shared the ADR draft plan with Mary at Fluxx.
laurabelinfante commentedon Oct 6, 2026
@SnowboardTechie since the plan is "done" according to these ACs and we have the ADR ticket + the implementation ticket, I think we can close this one out! up to you!
SnowboardTechie commentedon Oct 6, 2026
@laurabelinfante that sounds good to me 👍🏻
docs(website): finalize the v0.5.0 migration notes and release copy (#…