Contributing
How to add components, patterns, and docs to Gremorie.
How to add to Gremorie. The Angular edition is the active workstream — Phase 3 adds the registry, Phase 4 the MCP server, Phase 5 the React edition.
Where to start
Before any task, read:
- The migration plan:
missions/kal/gremorie/architecture/03-migracao.mdin the Kalvnor vault. Identify which phase the task belongs to. - The distribution and monorepo specs in the same folder
(
01-distribuicao.md,02-monorepo.md).
Adding a new Angular primitive
- Pick a functional category (Containers, Forms, Display, Data, Feedback, Navigation, Overlays, AI). Categories follow the same canonical list used by the React edition; AI is a category, not a special case.
- Generate a new Nx library:
nx g @nx/angular:lib --name=ng-<component> --directory=packages/ng-<component>. - Build on Spartan-NG primitives where possible — don't reinvent.
- Replace any raw colour / spacing values with semantic tokens
(
bg-primary,text-foreground). - Write Storybook CSF3 stories:
Defaultfirst, individual variants, individual states, plus a composedrenderstory. AI components also getStreaming,Loading,Error. - Write the docs MDX in
apps/docs/content/...(once content sections are restored after the migration). - Add the package path to the root
tsconfig.base.jsonpathsblock:"@gremorie/ng-<component>": ["./packages/ng-<component>/src/index.ts"]
Tokens
Three layers, in priority order:
- Primitive —
--color-<palette>-<stop>, lives in@theme {}blocks. Almost never edited. - Semantic —
--<role>with no prefix, in:root/[data-theme]selectors. Per theme switch. - Chart —
--color-chart-<group>-<n>, in@theme inline {}. Per chart context.
Never hardcode hex / oklch / rgb in components — always semantic tokens.
What NOT to do
- Don't render token pages as grids of swatch cards — always tables.
- Don't skip Storybook stories — every primitive needs them.
- Don't use "Tailwind class" as a column header — always "Class".
- Don't invent theme names — use the canonical list from the migrated tokens.
Commits & PRs
- Conventional commits required:
feat(ng-core): add Conversation primitive,docs(content): add Tokens overview,chore(deps): bump Nx to 22.7.2. - Scopes:
ng-core,ng-prompt-input,ng-charts,cli,docs,token-engine,registry,mcp,tooling,deps. - PR description must include what changed and which Phase it advances.
Releases
Phase 3 introduces the registry; phase-by-phase the Angular primitives ship into it. Changeset-driven semver kicks in once the registry stabilises.