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
127 changes: 127 additions & 0 deletions .agent/rules/es6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
trigger: always_on
---

You are an expert in modern JavaScript ES6+ features and best practices.

Key Principles:
- Use modern JavaScript syntax
- Leverage ES6+ features for cleaner code
- Understand asynchronous JavaScript
- Follow functional programming principles
- Write maintainable and performant code

Variables and Scope:
- Use const by default, let when reassignment needed
- Avoid var completely
- Understand block scoping
- Use destructuring for objects and arrays
- Implement proper variable naming

Arrow Functions:
- Use arrow functions for callbacks
- Understand lexical this binding
- Use implicit returns for single expressions
- Know when to use regular functions
- Use arrow functions for array methods

Template Literals:
- Use template literals for string interpolation
- Use tagged templates for advanced formatting
- Implement multi-line strings
- Use expression interpolation
- Create reusable template functions

Destructuring:
- Destructure objects and arrays
- Use default values in destructuring
- Rename variables while destructuring
- Use rest operator in destructuring
- Destructure function parameters

Spread and Rest:
- Use spread operator for arrays and objects
- Use rest parameters in functions
- Clone objects and arrays with spread
- Merge objects and arrays
- Use spread for function arguments

Async/Await:
- Use async/await for asynchronous code
- Handle errors with try/catch
- Use Promise.all for parallel operations
- Use Promise.race for timeout patterns
- Implement proper error handling
- Avoid callback hell

Modules:
- Use ES6 import/export syntax
- Implement named and default exports
- Use dynamic imports for code splitting
- Organize code into modules
- Use barrel exports for cleaner imports

Classes:
- Use class syntax for OOP
- Implement constructors properly
- Use getters and setters
- Implement static methods
- Use private fields (#field)
- Extend classes with inheritance

Array Methods:
- Use map, filter, reduce for transformations
- Use find, findIndex for searching
- Use some, every for validation
- Use forEach for iteration (prefer map/filter)
- Chain array methods for complex operations
- Use flatMap for flattening and mapping

Object Methods:
- Use Object.keys, Object.values, Object.entries
- Use Object.assign for merging
- Use Object.freeze for immutability
- Use Object.create for prototypal inheritance
- Use computed property names
- Use shorthand property syntax

Optional Chaining:
- Use ?. for safe property access
- Use ?. for optional method calls
- Use ?. for array element access
- Combine with nullish coalescing
- Avoid excessive chaining

Nullish Coalescing:
- Use ?? for default values
- Understand difference from ||
- Use with optional chaining
- Implement proper fallbacks
- Use for configuration objects

Promises:
- Create and consume Promises
- Chain Promises properly
- Use Promise.all for parallel execution
- Use Promise.allSettled for all results
- Implement proper error handling
- Use Promise.race for timeouts

Iterators and Generators:
- Understand iterable protocol
- Use generators for lazy evaluation
- Implement custom iterators
- Use yield for generator functions
- Use for...of for iteration

Best Practices:
- Use strict mode
- Avoid global variables
- Use meaningful variable names
- Implement pure functions
- Avoid mutating data
- Use const for immutability
- Handle errors properly
- Use ESLint for code quality
- Write unit tests
- Document complex logic
5 changes: 5 additions & 0 deletions .agent/rules/styling-consistency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
trigger: always_on
---

Use Tailwind utility classes only. Avoid custom CSS files or inline styles unless for dynamic values.
29 changes: 29 additions & 0 deletions .agent/rules/typescript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
trigger: always_on
---

You are an expert in TypeScript configuration and type safety.

Key Principles:
- Enable 'strict': true in tsconfig.json
- Avoid 'any' type at all costs
- Use 'unknown' for uncertain types
- Handle null and undefined explicitly

Strict Mode Features:
- noImplicitAny: Forces typing of all variables
- strictNullChecks: Prevents accessing properties of null/undefined
- strictFunctionTypes: Enforces sound function parameter bivariance
- strictPropertyInitialization: Ensures class properties are initialized

Type Safety Best Practices:
- Use type guards (typeof, instanceof, custom guards) to narrow types
- Use discriminated unions for state management
- Use 'readonly' for immutable data structures
- Use 'as const' for literal types
- Prefer Interfaces for public APIs, Types for unions/intersections

Error Handling:
- Don't throw strings; throw Error objects
- Use Result types or Option types for functional error handling
- Handle all cases in switch statements (exhaustiveness checking)
230 changes: 230 additions & 0 deletions .agent/skills/brainstorming/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
---
name: brainstorming
description: >
Use this skill before any creative or constructive work
(features, components, architecture, behavior changes, or functionality).
This skill transforms vague ideas into validated designs through
disciplined, incremental reasoning and collaboration.
---

# Brainstorming Ideas Into Designs

## Purpose

Turn raw ideas into **clear, validated designs and specifications**
through structured dialogue **before any implementation begins**.

This skill exists to prevent:
- premature implementation
- hidden assumptions
- misaligned solutions
- fragile systems

You are **not allowed** to implement, code, or modify behavior while this skill is active.

---

## Operating Mode

You are operating as a **design facilitator and senior reviewer**, not a builder.

- No creative implementation
- No speculative features
- No silent assumptions
- No skipping ahead

Your job is to **slow the process down just enough to get it right**.

---

## The Process

### 1️⃣ Understand the Current Context (Mandatory First Step)

Before asking any questions:

- Review the current project state (if available):
- files
- documentation
- plans
- prior decisions
- Identify what already exists vs. what is proposed
- Note constraints that appear implicit but unconfirmed

**Do not design yet.**

---

### 2️⃣ Understanding the Idea (One Question at a Time)

Your goal here is **shared clarity**, not speed.

**Rules:**

- Ask **one question per message**
- Prefer **multiple-choice questions** when possible
- Use open-ended questions only when necessary
- If a topic needs depth, split it into multiple questions

Focus on understanding:

- purpose
- target users
- constraints
- success criteria
- explicit non-goals

---

### 3️⃣ Non-Functional Requirements (Mandatory)

You MUST explicitly clarify or propose assumptions for:

- Performance expectations
- Scale (users, data, traffic)
- Security or privacy constraints
- Reliability / availability needs
- Maintenance and ownership expectations

If the user is unsure:

- Propose reasonable defaults
- Clearly mark them as **assumptions**

---

### 4️⃣ Understanding Lock (Hard Gate)

Before proposing **any design**, you MUST pause and do the following:

#### Understanding Summary
Provide a concise summary (5–7 bullets) covering:
- What is being built
- Why it exists
- Who it is for
- Key constraints
- Explicit non-goals

#### Assumptions
List all assumptions explicitly.

#### Open Questions
List unresolved questions, if any.

Then ask:

> “Does this accurately reflect your intent?
> Please confirm or correct anything before we move to design.”

**Do NOT proceed until explicit confirmation is given.**

---

### 5️⃣ Explore Design Approaches

Once understanding is confirmed:

- Propose **2–3 viable approaches**
- Lead with your **recommended option**
- Explain trade-offs clearly:
- complexity
- extensibility
- risk
- maintenance
- Avoid premature optimization (**YAGNI ruthlessly**)

This is still **not** final design.

---

### 6️⃣ Present the Design (Incrementally)

When presenting the design:

- Break it into sections of **200–300 words max**
- After each section, ask:

> “Does this look right so far?”

Cover, as relevant:

- Architecture
- Components
- Data flow
- Error handling
- Edge cases
- Testing strategy

---

### 7️⃣ Decision Log (Mandatory)

Maintain a running **Decision Log** throughout the design discussion.

For each decision:
- What was decided
- Alternatives considered
- Why this option was chosen

This log should be preserved for documentation.

---

## After the Design

### 📄 Documentation

Once the design is validated:

- Write the final design to a durable, shared format (e.g. Markdown)
- Include:
- Understanding summary
- Assumptions
- Decision log
- Final design

Persist the document according to the project’s standard workflow.

---

### 🛠️ Implementation Handoff (Optional)

Only after documentation is complete, ask:

> “Ready to set up for implementation?”

If yes:
- Create an explicit implementation plan
- Isolate work if the workflow supports it
- Proceed incrementally

---

## Exit Criteria (Hard Stop Conditions)

You may exit brainstorming mode **only when all of the following are true**:

- Understanding Lock has been confirmed
- At least one design approach is explicitly accepted
- Major assumptions are documented
- Key risks are acknowledged
- Decision Log is complete

If any criterion is unmet:
- Continue refinement
- **Do NOT proceed to implementation**

---

## Key Principles (Non-Negotiable)

- One question at a time
- Assumptions must be explicit
- Explore alternatives
- Validate incrementally
- Prefer clarity over cleverness
- Be willing to go back and clarify
- **YAGNI ruthlessly**

---
If the design is high-impact, high-risk, or requires elevated confidence, you MUST hand off the finalized design and Decision Log to the `multi-agent-brainstorming` skill before implementation.
Loading