@inixiative/config 0.5.183 → 0.5.185

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Inixiative
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -6,44 +6,32 @@ Shared toolchain for the inixiative ecosystem: tsconfig/biome/tsup presets, a ve
6
6
 
7
7
  | Export | Use |
8
8
  | --- | --- |
9
- | `@inixiative/config/tsconfig/base.json` | bun library (bundler resolution, verbatimModuleSyntax, `types: ["bun"]`) |
10
- | `@inixiative/config/tsconfig/node.json` | base + `types: ["node"]` |
11
- | `@inixiative/config/tsconfig/react.json` | base + DOM lib + `jsx: react-jsx` |
12
- | `@inixiative/config/biome/base.json` | formatter + linter core (single quotes, lineWidth 100, recommended + strictness block) |
13
- | `@inixiative/config/biome/react.json` | overlay: hook dependency linting |
14
- | `@inixiative/config/tsup` | `node(options)` / `react(options)` build presets |
15
- | `@inixiative/config/lefthook/base.yml` | pre-commit hooks: typecheck + biome on staged files |
16
-
17
- Adoption is three stub files plus the devDependency:
18
-
19
- ```jsonc
20
- // tsconfig.json
21
- { "extends": "@inixiative/config/tsconfig/base.json", "exclude": ["dist"] }
22
-
23
- // biome.json
24
- { "extends": ["@inixiative/config/biome/base.json"] }
25
- ```
9
+ | `@inixiative/config/theme/public.css` | the brand: base, `--app-*` slots, status (`--success` / `--warning` / `--error`), UI (incl. `--shadow`) and type tokens, plus `@font-face` for Bricolage Grotesque, Instrument Sans and JetBrains Mono |
10
+ | `@inixiative/config/theme/status.css` | the thread/work status layer (`--status-problem / attention / working / queued / done / idle / archived`) and the badge layer, for apps that show agent work |
11
+ | `@inixiative/config/theme/domains.css` | four palettes on one structure, set with `data-domain="agentic \| building-blocks \| governance \| inixiative"` on any element; they nest |
12
+ | `@inixiative/config/theme/marketing.css` | the marketing grammar: fluid type scale, spacing and section rhythm, container and gutter, radius, elevation and motion tokens (zeroed under `prefers-reduced-motion`), and the shared classes inside `.marketing` (`eyebrow` + `status-dot`, `button` / `button-secondary` / `text-link`, `nav`, `brand`, `section`, `card`, `card-grid`, `footer`, `prose`, all in `@layer components` so Tailwind utilities and unlayered page CSS override them) |
13
+ | `@inixiative/config/theme/fonts/*` | the latin variable fonts `public.css` loads (SIL OFL 1.1, texts in `theme/fonts/LICENSES.md`) |
26
14
 
27
- ```ts
28
- // tsup.config.ts
29
- import { node } from '@inixiative/config/tsup';
15
+ Apps load `public.css`, then `status.css`, then their own CSS. Marketing pages load `public.css`, `domains.css`, then `marketing.css` (after template's `theme.css` where an app has it: `[data-domain]` ties `:root`/`.dark` on specificity, so load order decides), and put `class="marketing" data-domain="…"` on the page root. Light is `:root`; dark is the `.dark` class on `<html>`. Values are HSL channels: `hsl(var(--app-primary))`, `hsl(var(--border) / .5)`. The fonts load from `./fonts/` relative to `public.css`, so serve the folder as it ships. `demo/marketing.html` (not shipped) shows every domain, the type scale, buttons, sections and long-form prose; open it from a checkout.
30
16
 
31
- export default node();
32
- ```
17
+ ### Domain palettes
33
18
 
34
- Stubs hold `extends` plus minimal reviewed overrides only. This package never generates config bodies.
19
+ Each palette fills the same four slots; marketing CSS reads the slots directly (`--app-primary`), because template's `--primary` is resolved once on `:root` and does not follow a nested `data-domain`. The primary is the page's one accent (CTA, eyebrow, wordmark stop). Tertiary and quaternary appear only where they mean something (agentic: blue = shared, pink = Signet). `inixiative` is neutral ink; its secondary, tertiary and quaternary are the agentic, building-blocks and governance primaries, so each door on the hub can wear its domain. Long-form reading (`.prose`) is set for the light theme.
35
20
 
36
- ## Theme
21
+ Contrast as text on the background (light `#f6f7f2`, dark ink `#0b1014`); the test holds every accent at 4.5:1 or more on the background and the card, and each accent's foreground on the accent.
37
22
 
38
- The inixiative look, read at runtime by every app that wears it (Kingdom, Foundry), so a decision about the look lands in all of them with the next release.
39
-
40
- | Export | Use |
41
- | --- | --- |
42
- | `@inixiative/config/theme/public.css` | the brand: base, `--app-*`, status (`--success` / `--warning` / `--error`), UI and type tokens, plus `@font-face` for Bricolage Grotesque, Instrument Sans and JetBrains Mono |
43
- | `@inixiative/config/theme/agentic.css` | the status layer (`--status-problem / attention / working / queued / done / idle / archived`) and the badge layer, for apps that show agent work |
44
- | `@inixiative/config/theme/fonts/*` | the latin variable fonts `public.css` loads (SIL OFL 1.1, texts in `theme/fonts/LICENSES.md`) |
45
-
46
- Load `public.css`, then `agentic.css`, then the app's own CSS. Light is `:root`; dark is the `.dark` class on `<html>`. Values are HSL channels: `hsl(var(--app-primary))`, `hsl(var(--border) / .5)`. The fonts load from `./fonts/` relative to `public.css`, so serve the folder as it ships.
23
+ | Domain | Slot | Light | on `#f6f7f2` | Dark | on ink |
24
+ | --- | --- | --- | --- | --- | --- |
25
+ | agentic | primary | `#466713` | 6.08 | `#c8f77e` | 15.53 |
26
+ | agentic | tertiary (shared) | `#1e69b8` | 5.18 | `#94c8ff` | 10.89 |
27
+ | agentic | quaternary (Signet) | `#a33e84` | 5.45 | `#f1b7e2` | 11.48 |
28
+ | building-blocks | primary (amber) | `#955104` | 5.64 | `#faba4c` | 11.10 |
29
+ | building-blocks | tertiary (teal) | `#0c6d6e` | 5.69 | `#51d6cd` | 10.79 |
30
+ | building-blocks | quaternary (brick) | `#ae3f29` | 5.51 | `#f9a18b` | 9.56 |
31
+ | governance | primary (violet) | `#613bba` | 6.86 | `#c0a7fb` | 9.25 |
32
+ | governance | tertiary (jade) | `#12684e` | 6.26 | `#66d6ad` | 10.73 |
33
+ | governance | quaternary (rose) | `#a92d42` | 6.21 | `#fba7b8` | 10.31 |
34
+ | inixiative | primary (ink) | `#0d1317` | 17.37 | `#eff2ed` | 16.93 |
47
35
 
48
36
  Apps load the theme from this package at runtime, so it is a runtime `dependency` of theirs. To keep that cheap this package has no runtime dependencies and every peer is optional; a test holds both.
49
37
 
@@ -83,12 +71,32 @@ bunx @inixiative/config sync [dir] [--preset=...] [--force] [--no-install]
83
71
  bunx @inixiative/config scan [root] [--lane=primitives|agentic]
84
72
  bunx @inixiative/config train [root] [--lane=primitives|agentic] [--push] [--dry-run]
85
73
  bunx @inixiative/config ports [project]
74
+ bunx @inixiative/config terms [dir] [--write-baseline]
86
75
  ```
87
76
 
88
77
  `ports` prints each project's local ports from `ports.json` (also exported as `@inixiative/config/ports.json`). A project's port for a service is the service's usual default plus 100 times the project's block, so no two projects collide. Zealot alone sits at block 0, the defaults (Aron, 2026-10-20: it already runs there); every other project is off the defaults: Archive (block 7) serves HTTP on 4700 with Postgres on 6132; Kingdom (block 2) has web 3200, API 8200, Postgres 5632, Redis 6579. Reserved ports (macOS AirPlay on 5000 and 7000) are never assigned. Give a new project the next free block (never 0), and a new kind of service its usual default; the tests fail on any collision.
89
78
 
90
79
  `check` is read-only and exits non-zero on drift — run it in CI after a frozen-lockfile install. It verifies toolchain pins — declared once, at the root, pinned exactly: a workspace member declaring one is an error, and `bun.lock` must resolve each only to its pin (no second copy) — toolchain peer ranges (they must admit the pin and no older major; `sync` writes `>=<pin major>.<pin minor>.0`), `"latest"` ranges, `packageManager`/`.bun-version`, legacy `bun.lockb`, a committed (tracked, un-ignored) `bun.lock`, a gitignored `tmp/` (scratch space; `sync` adds `/tmp/*`, which keeps re-included files tracked), required scripts (`check`/`typecheck`/`lint`/`test`), lefthook (dep + `lefthook.yml` extending the shared hooks + `prepare` script; git repos only), stub `extends`, presence of this package, and for every ecosystem dependency — in the root or any workspace member, of either lane — that the declared range admits the blessed version and the lockfile actually resolves to it (the stale-lockfile class). A package with a candidate (one no hold covers) also accepts the candidate and anything between: a range admitting either passes, and so does a lock from the blessed version up to the candidate. A range that does not admit the blessed version is rewritten to `^<blessed>`, except an exact pin, which stays exact and moves to the blessed version. An npm alias (`"@inixiative/session-archive": "npm:@inixiative/archive@^0.2.1"`) is held to its target's blessed version and rewritten as an alias; `workspace:`, `file:` and `link:` ranges are a repo linking itself and are left alone.
91
80
 
81
+ `check` also runs the **retired-terms** rule (alone: `terms`), which keeps public copy from rotting back to names the project retired. It reads text people read, never code identifiers: every Markdown, MDX, HTML and Astro file a repo tracks, and each `package.json` `description`. Fixtures, changelogs (history records the rename), `node_modules`, generated Warden regions (`.foundry/regions/`; fix their source docs) and root `dist`, `build`, `coverage` and `tmp` are skipped. The rule runs in `check` and `terms` only; `scan`, `sync` and the train are about package drift and don't run it. The list lives in `src/retiredTerms.ts`, each term with the word to use instead, and comes from the workspace CLAUDE.md "Dead concepts" and the copy brief's "Retired words":
82
+
83
+ | Term | Checked in | Use instead |
84
+ | --- | --- | --- |
85
+ | Kastle, Castle (capitalised) | every doc | Kingdom, owner, integration or Signet |
86
+ | `RuntimeInstallation`, `kingdom_runtime_` | every doc | a Signet enrollment |
87
+ | `signetDemo`, `medicalQuestionStep` | every doc | nothing; demos live in template-workbench |
88
+ | `kingdom-workspace`, `foundry-lab`, `native-candidate` | every doc | the canonical repos |
89
+ | foundry-oracle | every doc | Foundry and Oracle, two products |
90
+ | "your own LLM/API keys" | every doc | your own subscriptions |
91
+ | Cartographer, Librarian, Artificer, Steward (capitalised) | READMEs, package descriptions, site pages only | say what it does; Foundry's code still has a Librarian and a Cartographer |
92
+
93
+ Left out on purpose, because a pattern would flag mostly legitimate text: "medical" (the doctor's-visit story is allowed in marketing), "Connection" and `connectionId` (WebSocket and database connections; Foundry's viewer has a live per-socket `connectionId`), "principal" (the permissions README's glossary word for any holder, job titles, the principal–agent problem), and "Cursor as a runtime" or "token savings" (a phrase can't tell a claim from a comparison).
94
+
95
+ Per repo, in `scripts/ci/retired-terms/` (the same shape as template's doc-freshness rule):
96
+
97
+ - `allow.txt` for legitimate uses: `<term>` allows it everywhere, `<path>\t<term>` in one file, or under a directory when the path ends in `/` (a retired-names table, a history doc). Stale copy never goes here.
98
+ - `baseline.txt` for uses that predate the rule, `<path>\t<term>\t<count>`: reported as one warning, not failed. A use beyond the count fails, and so does a count that dropped (lower or delete the line), so the baseline only shrinks. `terms --write-baseline` writes it when there is none, and later only to shrink it: it refuses to add a use.
99
+
92
100
  `sync` applies every fix (deleting member toolchain entries and their stale member links), re-locks via `bun install` (`--force` when a second toolchain copy survives), and runs `bun update` on stale ecosystem entries in the directory that declares them. It refuses to run on a dirty working tree without `--force`. The react preset is inferred from a `react` dependency; override with `--preset`. Missing scripts are filled with defaults; existing script bodies are never touched.
93
101
 
94
102
  `scan` runs `check` across every ecosystem checkout under a root directory, for every lane or just the one `--lane` names. Targets are derived from the BOM: lane packages match by package name — the root package or any workspace member, so a monorepo such as foundry is found by the packages it publishes — and consumers match by their `origin` GitHub repo. Directory names and local layout never need declaring: scan looks at each child of the root and one level into a child without a `package.json` (a workspace folder such as `team-workspace/`). Linked git worktrees are other sessions' branches and never targets; when several clones claim one package or repo, only those with an `origin` remote count, a clone directly under the root wins over one nested in a workspace folder, and if that still leaves more than one the target is reported ambiguous rather than guessed. Origin is the truth, not the checkout: scan fetches per repo and fails on checkouts behind origin (their findings describe a stale tree), fails when a BOM entry has no checkout at all, warns when a checkout sits on a non-default branch (its findings describe the branch, not what ships), and surfaces unmerged `claude/*` session branches.
@@ -154,7 +162,7 @@ jobs:
154
162
  uses: inixiative/config/.github/workflows/lib-ci.yml@main
155
163
  ```
156
164
 
157
- `lib-ci.yml` pins bun from `.bun-version`, installs with `--frozen-lockfile` (kills the stale-lockfile class), runs `inixiative-config check .`, then the repo's own `bun run check`.
165
+ `lib-ci.yml` pins bun from `.bun-version`, installs with `--frozen-lockfile` (kills the stale-lockfile class), runs `inixiative-config check .` (retired terms included), then the repo's own `bun run check`. A repo that doesn't use `lib-ci.yml` (template, Kingdom, Oracle, agent-session, gloss, Tribe) adopts the retired-terms rule by running `bunx inixiative-config terms .` from its own CI rules (template: a `scripts/ci/rules/retired-terms.sh` beside `doc-freshness.sh`).
158
166
 
159
167
  ## Release flow
160
168