Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .rules/guidelines/coding.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ Guidelines for Approaching Code Tasks
- **Optimize only after functionality is correct** and only where necessary
- **Consider maintenance implications** of the implementation



## Rationale

This structured approach prevents several common issues:
Expand Down
5 changes: 5 additions & 0 deletions .rules/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,31 @@ Provide progress updates and explain technical decisions.
## Monorepo Structure & Guidelines

### Project Structure

This is a monorepo with the following structure:

- `packages/` - Library packages (e.g., @rokkit/forms, @rokkit/ui, @rokkit/core)
- `sites/` - Demo sites and documentation (e.g., sites/learn)
- `apps/` - Applications (if present)

### Library Development (`packages/`)

- Create reusable components and utilities
- Follow semantic versioning
- Include comprehensive TypeScript definitions
- Provide clear API documentation
- Test thoroughly before publishing

### Demo Development (`sites/`)

- Use library packages as dependencies
- Use components from the packages (ex. @rokkit/ui) for the demo. Any custom components in the site should build on top of the library components.
- Create progressive examples showing feature evolution
- Follow established styling patterns
- Include educational documentation

### Styling Guidelines

- Use UnoCSS utility classes throughout
- Follow neutral color palette: `neutral-50`, `neutral-100`, etc.
- Use semantic colors: `primary-`, `secondary-`, `accent-`, `error-`, `warning-`, `success-`
Expand Down
45 changes: 30 additions & 15 deletions .rules/project/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,24 @@ rokkit/

This repository contains the following packages with their corresponding folder locations:

| Package Name | Folder Location | Description |
|--------------|-----------------|-------------|
| `@rokkit/actions` | `packages/actions/` | Action utilities and helpers |
| `@rokkit/bits-ui` | `packages/bits-ui/` | Data-driven UI components based on bits-ui |
| `@rokkit/chart` | `packages/chart/` | Chart and visualization components |
| `@rokkit/cli` | `packages/cli/` | Command line interface tools |
| `@rokkit/core` | `packages/core/` | Core utilities and shared code |
| `@rokkit/data` | `packages/data/` | Data manipulation utilities |
| `@rokkit/forms` | `packages/forms/` | Form builder system |
| `@rokkit/helpers` | `packages/helpers/` | Helper functions and utilities |
| `@rokkit/icons` | `packages/icons/` | Icon components and utilities |
| `@rokkit/states` | `packages/states/` | State management utilities |
| `@rokkit/themes` | `packages/themes/` | Theme and styling utilities |
| `@rokkit/tutorial` | `packages/tutorial/` | Tutorial and learning components |
| `@rokkit/ui` | `packages/ui/` | UI component library |
| Package Name | Folder Location | Description |
| ------------------ | -------------------- | ------------------------------------------ |
| `@rokkit/actions` | `packages/actions/` | Action utilities and helpers |
| `@rokkit/bits-ui` | `packages/bits-ui/` | Data-driven UI components based on bits-ui |
| `@rokkit/chart` | `packages/chart/` | Chart and visualization components |
| `@rokkit/cli` | `packages/cli/` | Command line interface tools |
| `@rokkit/core` | `packages/core/` | Core utilities and shared code |
| `@rokkit/data` | `packages/data/` | Data manipulation utilities |
| `@rokkit/forms` | `packages/forms/` | Form builder system |
| `@rokkit/helpers` | `packages/helpers/` | Helper functions and utilities |
| `@rokkit/icons` | `packages/icons/` | Icon components and utilities |
| `@rokkit/states` | `packages/states/` | State management utilities |
| `@rokkit/themes` | `packages/themes/` | Theme and styling utilities |
| `@rokkit/tutorial` | `packages/tutorial/` | Tutorial and learning components |
| `@rokkit/ui` | `packages/ui/` | UI component library |

### Key Package Dependencies

- `@rokkit/core` - Can be used by any package (foundational utilities)
- `@rokkit/states` - Used by UI packages for data management
- `@rokkit/bits-ui` - Provides data-driven wrappers for bits-ui components
Expand All @@ -50,18 +51,21 @@ This repository contains the following packages with their corresponding folder
## Package Development (`packages/`)

### Purpose

- Create reusable, framework-agnostic libraries
- Provide core functionality for the Rokkit ecosystem
- Maintain strict separation of concerns

### Guidelines

- Each package should have a clear, single responsibility
- Use semantic versioning for releases
- Include comprehensive TypeScript definitions
- Provide thorough documentation and examples
- Test all public APIs extensively

### Structure Pattern

```
packages/[package-name]/
├── src/
Expand All @@ -77,17 +81,20 @@ packages/[package-name]/
## Site Development (`sites/`)

### Purpose

- Demonstrate library package capabilities
- Provide educational content and examples
- Show progressive enhancement patterns

### Guidelines

- Import packages as dependencies (e.g., `@rokkit/forms`)
- Create step-by-step learning experiences
- Follow established styling patterns
- Include both basic and advanced examples

### Learning Site Structure (`sites/learn/`)

```
sites/learn/
├── src/
Expand All @@ -103,12 +110,14 @@ sites/learn/
## Development Workflow

### Package Development

1. Develop in `packages/[name]/src/`
2. Test thoroughly with unit and integration tests
3. Update documentation in `packages/[name]/docs/`
4. Version according to semantic versioning

### Demo Development

1. Import published packages or use workspace references
2. Create progressive examples in `sites/learn/src/lib/future/`
3. Build route pages in `sites/learn/src/routes/`
Expand All @@ -117,12 +126,14 @@ sites/learn/
## Styling System

### UnoCSS Conventions

- **Neutral Colors**: `neutral-50` through `neutral-900`
- **Semantic Colors**: `primary-`, `secondary-`, `accent-`, `error-`, `warning-`, `success-`
- **Dark Mode**: Always include `dark:` variants
- **Interactive States**: Use `hover:`, `focus:`, `active:` variants

### Color Patterns

```css
/* Backgrounds */
bg-surface-50 dark:bg-surface-900 /* Page backgrounds */
Expand All @@ -146,12 +157,14 @@ focus:ring-2 focus:ring-primary-500
## Documentation Standards

### Package Documentation

- Clear API reference in `docs/` folder
- Usage examples with code snippets
- Migration guides for breaking changes
- Contributing guidelines

### Demo Documentation

- Step-by-step tutorials
- Progressive complexity examples
- Real-world use cases
Expand All @@ -160,11 +173,13 @@ focus:ring-2 focus:ring-primary-500
## Cross-Package Dependencies

### Allowed Dependencies

- `@rokkit/core` can be used by any package
- UI packages can depend on core utilities
- Sites can use any published package

### Dependency Guidelines

- Minimize cross-package dependencies
- Use peer dependencies for optional features
- Document all external dependencies clearly
Expand Down
Loading
Loading