feat(01-foundation-01): scaffold branding package with VOCAB constant and tests

- Create packages/branding/ workspace package (@paperclipai/branding)
- Add VOCAB constant with 8 Nexus display strings (company, companies, ceo, board, hire, fire, appName, tagline)
- Export VocabKey type for type-safe string lookups
- Add vitest config and 9 passing unit tests covering all VOCAB values
- Update pnpm-lock.yaml to link new workspace package
This commit is contained in:
Mikkel Georgsen 2026-03-30 22:32:47 +02:00 committed by Nexus Dev
parent 890cb52954
commit c7e0037545
7 changed files with 106 additions and 0 deletions

View file

@ -0,0 +1,34 @@
{
"name": "@paperclipai/branding",
"version": "0.1.0",
"license": "MIT",
"type": "module",
"exports": {
".": "./src/index.ts",
"./*": "./src/*.ts"
},
"publishConfig": {
"access": "public",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"files": ["dist"],
"scripts": {
"build": "tsc",
"clean": "rm -rf dist",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"typescript": "^5.7.3"
}
}

View file

@ -0,0 +1 @@
export { VOCAB, type VocabKey } from "./vocab.js";

View file

@ -0,0 +1,35 @@
import { describe, it, expect } from "vitest";
import { VOCAB } from "./vocab.js";
describe("VOCAB", () => {
it("maps company to Workspace", () => {
expect(VOCAB.company).toBe("Workspace");
});
it("maps companies to Workspaces", () => {
expect(VOCAB.companies).toBe("Workspaces");
});
it("maps ceo to Project Manager", () => {
expect(VOCAB.ceo).toBe("Project Manager");
});
it("maps board to Owner", () => {
expect(VOCAB.board).toBe("Owner");
});
it("maps hire to Add", () => {
expect(VOCAB.hire).toBe("Add");
});
it("maps fire to Remove", () => {
expect(VOCAB.fire).toBe("Remove");
});
it("has appName as Nexus", () => {
expect(VOCAB.appName).toBe("Nexus");
});
it("has a non-empty tagline", () => {
expect(VOCAB.tagline).toBe("Open-source orchestration for your agents");
});
it("all values are non-empty strings", () => {
for (const [key, value] of Object.entries(VOCAB)) {
expect(typeof value, `key "${key}" should be a string`).toBe("string");
expect(value.length, `key "${key}" should be non-empty`).toBeGreaterThan(0);
}
});
});

View file

@ -0,0 +1,15 @@
export const VOCAB = {
// Entity renames (display only — code identifiers unchanged)
company: "Workspace",
companies: "Workspaces",
ceo: "Project Manager",
board: "Owner",
hire: "Add",
fire: "Remove",
// Brand name
appName: "Nexus",
tagline: "Open-source orchestration for your agents",
} as const;
export type VocabKey = keyof typeof VOCAB;

View file

@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}

View file

@ -0,0 +1,7 @@
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
include: ["src/**/*.test.ts"],
},
});

6
pnpm-lock.yaml generated
View file

@ -220,6 +220,12 @@ importers:
specifier: ^5.7.3
version: 5.9.3
packages/branding:
devDependencies:
typescript:
specifier: ^5.7.3
version: 5.9.3
packages/db:
dependencies:
'@paperclipai/shared':