Skip to content

Commit 658828d

Browse files
authored
Add AGENTS instructions for themes (#8103)
2 parents 5ed6a8f + 0966847 commit 658828d

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

packages/themes/AGENTS.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Agent Instructions
2+
3+
This folder collects all official KoliBri themes. Each theme package under this directory (`default`, `ecl`, …) uses the same tool chain and follows the same coding rules.
4+
5+
## Structure
6+
7+
- `src/` – shared entry points and utilities used by all themes.
8+
- `<theme>/src` – theme specific sources containing `global.scss`, component styles and mixins.
9+
- Every theme exposes one or more theme objects via `KoliBri.createTheme` and exports them from `src/index.ts`.
10+
11+
## Building
12+
13+
- Use **pnpm** for all commands. Run `pnpm build` in the repository root or `pnpm --filter <package> build` to build a single theme.
14+
- The build stack is based on **Rollup**, **TypeScript** and **PostCSS**. Keep `rollup.config.js`, `tsconfig.json` and dependency versions identical across all theme packages.
15+
- Do not edit the generated `assets` folders. Modify the source files instead and rebuild.
16+
17+
## Coding Guidelines
18+
19+
- Organise SCSS using `@layer kol-theme-global` and `@layer kol-theme-component`.
20+
- Follow BEM style class naming (`block__element--modifier`).
21+
- Reuse mixins from the `mixins/` folder and use the `to-rem()` helper for sizing.
22+
- Place theme tokens (colors, fonts, spacing, etc.) in the global layer and reference them in component styles.
23+
- Avoid `!important` and only override properties that the theme actually customises.
24+
25+
## Consistency
26+
27+
All theme packages must share the same stack configuration, scripts and dependency versions. When updating one theme, ensure the others are kept in sync.

0 commit comments

Comments
 (0)