@inbeat/standards 0.13.0 → 0.14.0
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/CHANGELOG.md +8 -0
- package/agents/standard.md +11 -0
- package/package.json +2 -2
- package/src/cli.ts +9 -1
- package/src/type-scale.ts +41 -0
- package/template/AGENTS.md +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.14.0](https://github.com/Genoux/ib-toolkit/compare/standards-v0.13.0...standards-v0.14.0) (2026-11-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* enforce the type scale and show avatar stack names ([#70](https://github.com/Genoux/ib-toolkit/issues/70)) ([e6020e6](https://github.com/Genoux/ib-toolkit/commit/e6020e649762503db92358590822d603ebe8d29d))
|
|
9
|
+
* **ui:** set table cells to 13.5px ([#72](https://github.com/Genoux/ib-toolkit/issues/72)) ([3e1b5d5](https://github.com/Genoux/ib-toolkit/commit/3e1b5d5d80c36c99a6c2efd03fe26921110d39eb))
|
|
10
|
+
|
|
3
11
|
## [0.13.0](https://github.com/Genoux/ib-toolkit/compare/standards-v0.12.2...standards-v0.13.0) (2026-11-12)
|
|
4
12
|
|
|
5
13
|
|
package/agents/standard.md
CHANGED
|
@@ -95,6 +95,17 @@ Server actions are queued per client; never use them for reads.
|
|
|
95
95
|
- Buttons are `rounded-full` with no destructive variant; destructive flows use
|
|
96
96
|
`DestructiveActionDialog` from `@inbeat/ui`. Icon-only buttons get a tooltip. Lists use
|
|
97
97
|
`DataTableShell` + `DataTable`; empty lists use `EmptyState`.
|
|
98
|
+
- Type scale: every text takes one of these roles and nothing sets a size or weight of its own
|
|
99
|
+
(`ib check` fails on `text-[13px]`, `font-[510]`, `font-bold`). Body `text-sm` (14px): inputs,
|
|
100
|
+
menu items, detail values, person names. Table cells are 13.5px, set by `Table`, and column
|
|
101
|
+
headers 13px, set by `TableHead`. Body strong `text-sm font-medium`: a row's identifying cell,
|
|
102
|
+
card titles, form labels, buttons, tabs. Caption `text-xs` muted: meta lines, timestamps,
|
|
103
|
+
hints. Tag `text-xs font-medium`: pills and count badges. Section title
|
|
104
|
+
`text-base font-semibold`; card, sheet and dialog title `text-lg font-semibold`; page title
|
|
105
|
+
`text-xl font-semibold`. Secondary information is `text-muted-foreground`, never smaller.
|
|
106
|
+
Weights are regular, medium and semibold. Larger named sizes are for display text on public
|
|
107
|
+
and onboarding screens. To change the scale, change it in ib-toolkit.
|
|
108
|
+
- People in a table are avatars only (`MemberAvatarStack`); it names them in a tooltip.
|
|
98
109
|
- Radix via `radix-ui`; animation via `motion` only.
|
|
99
110
|
|
|
100
111
|
### Simplicity
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inbeat/standards",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Agent standards for inBeat apps: managed AGENTS.md block, skills under .agents/skills, ib CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "bun --bun vitest run"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@inbeat/config": "^0.
|
|
34
|
+
"@inbeat/config": "^0.14.0",
|
|
35
35
|
"vitest": "^4.1.1"
|
|
36
36
|
},
|
|
37
37
|
"repository": {
|
package/src/cli.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { parseCreateArgs } from "./create-args";
|
|
|
5
5
|
import { foundationProblems } from "./foundation";
|
|
6
6
|
import { runMcp } from "./mcp";
|
|
7
7
|
import { claudeFilesIgnoringAgents, staleFiles, write } from "./sync";
|
|
8
|
+
import { typeScaleProblems } from "./type-scale";
|
|
8
9
|
|
|
9
10
|
const USAGE = [
|
|
10
11
|
"usage: ib <create <dir> [--local] | sync [app-dir] | check [app-dir] | mcp>",
|
|
@@ -42,6 +43,7 @@ const commands: Record<string, () => number | Promise<number>> = {
|
|
|
42
43
|
const stale = staleFiles(appDir);
|
|
43
44
|
const ignoring = claudeFilesIgnoringAgents(appDir);
|
|
44
45
|
const problems = foundationProblems(appDir);
|
|
46
|
+
const offScale = typeScaleProblems(appDir);
|
|
45
47
|
if (stale.length > 0) {
|
|
46
48
|
console.error(
|
|
47
49
|
`out of date with @inbeat/standards, run \`ib sync\`:\n ${stale.join("\n ")}`,
|
|
@@ -56,7 +58,13 @@ const commands: Record<string, () => number | Promise<number>> = {
|
|
|
56
58
|
if (problems.length > 0) {
|
|
57
59
|
console.error(`not on the shared foundation:\n ${problems.join("\n ")}`);
|
|
58
60
|
}
|
|
59
|
-
|
|
61
|
+
if (offScale.length > 0) {
|
|
62
|
+
console.error(
|
|
63
|
+
'outside the type scale (see "UI" in the standard; pick a role, or change the scale in ' +
|
|
64
|
+
`ib-toolkit):\n ${offScale.join("\n ")}`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
return stale.length + ignoring.length + problems.length + offScale.length === 0 ? 0 : 1;
|
|
60
68
|
},
|
|
61
69
|
mcp: () =>
|
|
62
70
|
runMcp(args, {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join, relative } from "node:path";
|
|
3
|
+
|
|
4
|
+
// The type scale lives in @inbeat/ui and in the "UI" section of the standard. An app picks a
|
|
5
|
+
// role (text-sm, text-xs, text-base, ...) and never a size or weight of its own, so a change of
|
|
6
|
+
// scale happens once, in the toolkit.
|
|
7
|
+
// `em` sizes are relative to their parent (inline code in running text), so they follow the scale.
|
|
8
|
+
const OFF_SCALE = [
|
|
9
|
+
{ pattern: /\btext-\[[\d.]+(?:px|rem)\]/g, reason: "hand-set font size" },
|
|
10
|
+
{ pattern: /\bfont-\[\d+\]/g, reason: "hand-set font weight" },
|
|
11
|
+
{
|
|
12
|
+
pattern: /\bfont-(?:bold|extrabold|black)\b/g,
|
|
13
|
+
reason: "weight outside regular, medium, semibold",
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
function sourceFiles(dir: string): string[] {
|
|
18
|
+
return readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
|
|
19
|
+
const path = join(dir, entry.name);
|
|
20
|
+
if (entry.isDirectory()) return sourceFiles(path);
|
|
21
|
+
return entry.name.endsWith(".tsx") ? [path] : [];
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** `src/file.tsx:12 text-[13px] (hand-set font size)` for every class outside the type scale. */
|
|
26
|
+
export function typeScaleProblems(appDir: string): string[] {
|
|
27
|
+
const srcDir = join(appDir, "src");
|
|
28
|
+
if (!existsSync(srcDir)) return [];
|
|
29
|
+
|
|
30
|
+
return sourceFiles(srcDir).flatMap((path) =>
|
|
31
|
+
readFileSync(path, "utf8")
|
|
32
|
+
.split("\n")
|
|
33
|
+
.flatMap((line, index) =>
|
|
34
|
+
OFF_SCALE.flatMap(({ pattern, reason }) =>
|
|
35
|
+
[...line.matchAll(pattern)].map(
|
|
36
|
+
([className]) => `${relative(appDir, path)}:${index + 1} ${className} (${reason})`,
|
|
37
|
+
),
|
|
38
|
+
),
|
|
39
|
+
),
|
|
40
|
+
);
|
|
41
|
+
}
|
package/template/AGENTS.md
CHANGED
|
@@ -98,6 +98,17 @@ Server actions are queued per client; never use them for reads.
|
|
|
98
98
|
- Buttons are `rounded-full` with no destructive variant; destructive flows use
|
|
99
99
|
`DestructiveActionDialog` from `@inbeat/ui`. Icon-only buttons get a tooltip. Lists use
|
|
100
100
|
`DataTableShell` + `DataTable`; empty lists use `EmptyState`.
|
|
101
|
+
- Type scale: every text takes one of these roles and nothing sets a size or weight of its own
|
|
102
|
+
(`ib check` fails on `text-[13px]`, `font-[510]`, `font-bold`). Body `text-sm` (14px): inputs,
|
|
103
|
+
menu items, detail values, person names. Table cells are 13.5px, set by `Table`, and column
|
|
104
|
+
headers 13px, set by `TableHead`. Body strong `text-sm font-medium`: a row's identifying cell,
|
|
105
|
+
card titles, form labels, buttons, tabs. Caption `text-xs` muted: meta lines, timestamps,
|
|
106
|
+
hints. Tag `text-xs font-medium`: pills and count badges. Section title
|
|
107
|
+
`text-base font-semibold`; card, sheet and dialog title `text-lg font-semibold`; page title
|
|
108
|
+
`text-xl font-semibold`. Secondary information is `text-muted-foreground`, never smaller.
|
|
109
|
+
Weights are regular, medium and semibold. Larger named sizes are for display text on public
|
|
110
|
+
and onboarding screens. To change the scale, change it in ib-toolkit.
|
|
111
|
+
- People in a table are avatars only (`MemberAvatarStack`); it names them in a tooltip.
|
|
101
112
|
- Radix via `radix-ui`; animation via `motion` only.
|
|
102
113
|
|
|
103
114
|
### Simplicity
|