mirror of
https://github.com/bitbaum/morulia.git
synced 2026-12-04 05:30:39 +01:00
Removes the fleet auto-merge sweep caller (and wake chain where present); checks run on pull requests only, not again after merging; a deploy that waited for CI on main now deploys on push. The forge merge check (forge/verify) verifies each PR on its merge result and merges it. Signed-off-by: Cato <41178744+catomean@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
4.8 KiB
4.8 KiB
Agents
Org rules
Read bitbaum/fleet AGENTS.md, SHARED.md and the registers it names before
inventing a host, a name, a page or a shared behaviour. Do not copy their facts
into this file.
- Packages first. If a
@bitbaum/*package (orbip-kit,limitkit,threadkit,ai-forms) already does it, use it and fix a defect in the package, not in this app. Every chat is@bitbaum/chatkit, every search box@bitbaum/searchkit, every chart@bitbaum/chartkit, accounts@bitbaum/accountkit, model calls@bitbaum/ai-kit. Review this product'spackage-plan.jsonbefore building anything. When a second product needs what one product built (a map, a globe, a calculator), extract it into a package before writing the second copy. - The experience belongs to the package. Anywhere a person types words
there is a microphone (
@bitbaum/chatkit:Composer,DictationField); articles are@bitbaum/writingkit/react, comments are chatkit'sCommentThread, header, menu, tab bar and footer are@bitbaum/sitekit. Apps own brand, words and backend, not the behaviour or the layout. If a component cannot do what the product needs, extend the package in the same session (fleetAGENTS.md, "The experience belongs to the package"). - A gap is a task, not an answer. Never end the work, or a reply, at "not supported" or "not available". When a source cannot be read or a case does not fit the model, find another way (another format or publisher, the official tool measured, the model extended) and do it. What truly cannot be done yet is tracked with its plan, never presented as a limit of the product.
- Every page leads to an action. What a reader learns, they can act on from the same screen: file, pay, apply, compare, ask, contact.
- One shape per kind. Things of the same kind look the same and sit in the
same place (fleet
AGENTS.md, "One shape per kind"). - Finished work ships by itself. Open a non-draft pull request; the fleet
forge merge check (
forge/verify) is the only merge path. Never merge by hand, through the merge API, with--autoor with an admin bypass, and never force-push a shared branch. - Nothing made up. A fact on a page or in a doc needs a source that was opened; where there is none, the line is removed or softened. A gap is filled with sourced data, never with a guess.
- Bitcoin orange is for Bitcoin and top-of-funnel actions only.
- No model identifier in anything pushed to a repository.
- Before you finish, run
node <fleet>/scripts/ci/docs-truth-audit.mjs --dir .: the same check the sweep runs on every pull request.
Morulia
The shared bitbaum sign-in, served at morulia.orangecat.ch (fleet STACK.md, "Identity"): one OIDC provider
that holds every sign-in provider's credentials once (docs/providers.md). Every
accountkit app is a client of it through SIGNIN_ISSUER, SIGNIN_CLIENT_ID
and SIGNIN_CLIENT_SECRET.
Rules that are this repo's alone
- A provider's email is never an identity. No provider is asked for one;
the stored user is
(provider, subject)with a.invalidplaceholder. Do not add anemailscope upstream, and never turn on account linking. - The subject is pairwise. Never hand an app the internal user id, a JWT access token carrying it, or any value that is the same across apps.
SIGNIN_PAIRWISE_SECRETis never rotated. Rotating it gives every person a new identity in every app.- No passwords, no mail. This is a broker, not an account system.
Working here
pnpm install
pnpm run verify # typecheck, tests, build
pnpm test # vitest; Postgres is pglite, providers are faked
lib/auth.ts— better-auth +@better-auth/oauth-provider+jwt(RS256).lib/upstreams.ts— the providers, each on only when all of its env is set, andpublishedProviders(/api/providers), which every app's button reads. Adding one: a row inUPSTREAMS, its options insocialProviders(no email scope), its names in.github/workflows/provider-keys.yml(a test holds the two equal), and its steps indocs/providers.md. Mark itfree: falsewhen the provider charges, and say why in the doc, with the source.lib/subject.ts— the one pairwise-subject derivation; its pinned test must never be edited to pass.lib/clients.ts— the registry of client apps. Adding an app is one row.lib/sync-clients.ts— registry + env → stored clients, at every start.lib/http.ts— every route, framework-free;app/only delegates.drizzle/— migrations, applied on deploy by lokiapply-schema.sh.test/accountkit-client.test.ts— accountkit's real runtime signs in here.