Skip to content
Merged
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
40 changes: 40 additions & 0 deletions .cursor/skills/dev-patterns/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: dev-patterns
description: Styling and structure conventions for stream-chat-react. Use when adding or editing components, SCSS, or icons in this repo—file layout, styling folder structure, SCSS imports, and icon placement.
---

# stream-chat-react Development Patterns

Apply when generating or modifying UI code in this repo.

## Styling

### File and folder structure

- **Format:** `.scss` only.
- **Location:** `src/components/<ComponentName>/styling/`.
- **Required:** Each component styling folder has an `index.scss`.
- **Registration:** Each `src/components/<ComponentName>/styling/index.scss` is imported in `src/styling/index.scss` with an alias.

**Import order in `src/styling/index.scss`:**

1. Three groups; within each group, alphabetical order.
2. **Group 1:** imports from `src/styling/`.
3. **Group 2:** general components (Button, Dialog, etc.).
4. **Group 3:** chat components (MessageList, etc.).

### SCSS practices

- Use **full class names** instead of only `&__suffix` so selectors are easy to search.
- Avoid duplicate blocks for the same resolved CSS selector (after nesting).

## Icons

- Icons live in `src/components/Icons`.
- **Do not** move icons out of SCSS into `src/components/Icons`; keep existing icon placement unless explicitly refactoring icons.

Source: `.ai/DEV_PATTERNS.md`.

## Imports

When importing from 'stream-chat' library, always import by library name (from 'stream-chat'), not relative path (from '..path/to/from 'stream-chat-js/src').
71 changes: 71 additions & 0 deletions .cursor/skills/make-plans/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: make-plans
description: Structures plan.md files for parallel, non-overlapping agent work. Use when creating or editing execution plans, task lists for multiple agents, or when the user asks how to structure plans or split work into tasks.
---

# Making plan.md Files

Plans enable **parallel, non-overlapping work**. Each task must be independent; agents work in a **dedicated git worktree** (see worktrees skill).

## Required plan.md Structure

1. **Worktree section** (top) — path, branch, base branch. See worktrees skill.
2. **Task overview** — one line: tasks are self-contained; same-file tasks have dependencies.
3. **Task sections** — each with the template below.
4. **Execution order** — phases showing what can run in parallel.
5. **File ownership summary** — table: Task | Creates/Modifies.

## Task Template

Every task must include:

```md
## Task N: <Descriptive Name>

**File(s) to create/modify:** `path/to/file.tsx`

**Dependencies:** Task X (or "None")

**Status:** pending | in-progress | done | blocked

**Owner:** <agent-name> | unassigned

**Scope:**

- Bullet points; include interfaces/snippets if helpful

**Acceptance Criteria:**

- [ ] Verifiable condition
- [ ] e.g. TypeScript compiles, exports from module
```

## Task Independence Rules

- **Same file → cannot run in parallel.** Add explicit dependencies so only one agent touches a file at a time.
- **Explicit dependencies:** If B needs A, write `**Dependencies:** Task 1`.
- **Self-contained scope:** Task must be doable without other in-progress tasks (include types, imports, exports).
- **Same-file options:** Either one integration task (e.g. "Update index.tsx for all components", deps: 1–4) or a chain (Task 7 adds A, Task 8 adds B with dep Task 7).

## Task Granularity

- **Too coarse:** "Implement entire Gallery" — not parallelizable.
- **Too fine:** Separate tasks for "create file", "add imports", "add type" — overhead.
- **Good:** One task = one logical unit (e.g. "GalleryContext: types + context + hook", "Gallery Provider: state + navigation", "GalleryUI: rendering + interactions").

## Cross-Cutting / Integration

Use a final integration task, e.g.:

- Update `index.tsx` exports for all new components.
- Update main stylesheet to import component styles.
- Dependencies: all preceding tasks.

## Checklist Before Finalizing plan.md

- [ ] Worktree section at top
- [ ] Same-file tasks have dependencies
- [ ] Dependencies explicit; execution order and file ownership table present
- [ ] Tasks sized appropriately; each has Status, Owner, acceptance criteria

For full examples and worktree setup, see [reference.md](reference.md) and the worktrees skill.
48 changes: 48 additions & 0 deletions .cursor/skills/make-plans/reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# make-plans — Full Reference

Source: `.ai/MAKE_PLAN.md`. Condensed in SKILL.md; details here.

## Execution Order Example

```md
## Execution Order

Phase 1 (Parallel):
├── Task 1: Context
├── Task 5: Styles A
└── Task 6: Styles B

Phase 2 (After Task 1):
├── Task 2: Provider
└── Task 3: UI Component

Phase 3 (After Tasks 2, 3):
└── Task 4: Composition Component
```

## File Ownership Example

```md
## File Ownership Summary

| Task | Creates/Modifies |
| ---- | ---------------- |
| 1 | `Context.tsx` |
| 2 | `Provider.tsx` |
| 3 | `UI.tsx` |
```

## Worktree Section (must appear in plan.md)

```md
## Worktree

**Worktree path:** `../stream-chat-react-worktrees/<plan-name>`
**Branch:** `feat/<plan-branch-name>`
**Base branch:** `<branch-this-was-created-from>`
**Preview branch:** `agent/<branch-name>` — branch from main; merge worktree branch into it so others can checkout to preview (e.g. `agent/feat/gallery-redesign`).

All work for this plan MUST be done in the worktree directory, NOT in the main repo checkout.
```

Actual creation and sync of worktrees is covered by the worktrees skill.
Loading
Loading