docs: add ADR 005 — Organization entity and assistant derivation#66
Open
martinydeAI wants to merge 1 commit into
Open
docs: add ADR 005 — Organization entity and assistant derivation#66martinydeAI wants to merge 1 commit into
martinydeAI wants to merge 1 commit into
Conversation
Records Organization as a first-class entity with name, e-mail domain(s), default framework, and default language model. User belongs to one organisation (M:1, matched on the user's email domain at signup); Assistant is used by many (M:N). framework and languageModel on new assistants are populated from the creator's organisation as a snapshot at creation time, not joined live, so an org switching its default LM later does not silently rewrite older catalogue rows. Supersedes ADR 004's env-var REGISTRATION_ALLOWED_EMAIL_DOMAINS as soon as Organization lands — that env var becomes the bootstrap mechanism only and is removed in the registration switchover. Closes #65. Status: Draft. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
In my opinion this makes sense. We will however need a crud setup for administering the entity. The entities can also be maintained through an API, if the project owner has a centralized data source of orgnaizations and their AI setup, or this site could act as data source and expose an API of Organizations and their AI setup. The right approach depends on how the project owner wants their flow of data |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds ADR 005 recording the Organization entity, its metadata,
its relations to
UserandAssistant, and the derivation flowthat pre-fills framework + language model on new assistants from
the creator's organisation.
Closes #65.
Highlights
Organizationis a first-class entity withname, e-maildomain(s),
defaultFramework,defaultLanguageModel.User→Organizationis M:1, set at signup time bymatching the user's e-mail domain against
Organization.emailDomains.Assistant→Organizationis M:N — multiple kommuner canuse the same assistant.
Assistant.frameworkandAssistant.languageModelare storedon the assistant as a snapshot at creation, not joined
through the org at read time. An org switching its default LM
next year must not silently rewrite last year's catalogue.
Interaction with ADR 004
ADR 004's
REGISTRATION_ALLOWED_EMAIL_DOMAINSenv var issuperseded by
Organization.emailDomainsonce Organizationlands. Until that happens, the env var stays as the bootstrap
mechanism. ADR 004 itself doesn't need re-deciding — this is
exactly the "graduate to a Domain entity" follow-up it
anticipated.
Implementation outline
The ADR sketches three downstream pieces (issues to file alongside
or shortly after):
Organizationentity + migration +User.organization_idFK./registervalidatesagainst registered orgs instead of the env var).
framework,languageModel, andthe
organizationsM:N; the creation flow derives defaultsfrom the creator's org.
Test plan
task coding-standards-markdown-check→ clean.durability story (i.e. existing assistants keep their
original framework / LM if an org changes its default
later).
starting model (consultants / cross-org users would need a
future M:N).
Closes #65
🤖 Generated with Claude Code