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
135 changes: 135 additions & 0 deletions .agents/skills/code-review-checklist/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
---
name: code-review-checklist
description: Applies the Code Review Checklist (logical bugs, edge cases, security, performance) when reviewing code, checking logic, or hunting bugs. Use on any request for code review, проверку логики, поиск багов, or bug hunting in code.
---

# **Code Review Checklist**

## **Logical Bugs Checklist**

### **Control Flow**

- All branches are reachable and necessary
- No dead code paths
- Loop conditions terminate correctly
- Switch/case has default or is exhaustive
- Early returns don't skip necessary cleanup
- Conditional logic matches the intent (off-by-one, inverted conditions)

### **Null & Undefined Handling**

- Null checks before dereferencing
- Optional chaining used where appropriate
- Default values for missing fields
- No assumptions about object shape without validation

### **Error Handling**

- Errors caught at appropriate level
- No swallowed errors (empty catch blocks)
- Error propagation preserves context
- Graceful degradation on failure
- Resource cleanup in finally blocks

### **Concurrency & Race Conditions**

- Shared mutable state is protected
- No race conditions in async code
- Locks/mutexes used correctly where needed
- Callbacks don't cause interleaving issues
- Atomicity of compound operations guaranteed

### **State Management**

- State transitions are valid and complete
- No stale state after updates
- State not mutated directly (where immutable pattern expected)
- Derived state recomputed when dependencies change
- No state leaks between independent operations

### **Data Flow**

- Data transformations preserve invariants
- No data loss in type conversions
- Array/object mutations don't affect unexpected references
- Input validation at boundaries
- Output consistency with input constraints

## **Edge Cases Checklist**

### **Boundary Conditions**

- Empty collections handled
- Zero / negative values handled
- Maximum values don't overflow
- String length edge cases (empty, very long, unicode)
- Date/time edge cases (timezones, leap years, midnight)

### **Resource Management**

- File handles closed after use
- Network connections properly terminated
- Database connections returned to pool
- Event listeners removed when no longer needed
- Temporary resources cleaned up

### **Integration Points**

- API contracts honored (request/response shapes)
- External service failures handled gracefully
- Backward compatibility maintained for public interfaces
- Breaking changes identified and documented
- Migration paths exist for schema changes

## **Security Checklist**

### **Input Validation**

- All user inputs are validated
- Input sanitization applied where needed
- Type checking enforced
- Boundary conditions handled

### **SQL Injection**

- Parameterized queries used
- No string concatenation for SQL
- ORM methods used correctly

### **XSS (Cross-Site Scripting)**

- Output encoding applied
- No `dangerouslySetInnerHTML` without sanitization
- URL parameters validated

### **Authentication & Authorization**

- Proper authentication checks
- Authorization verified for each endpoint
- Session management secure

### **Secrets & Credentials**

- No hardcoded secrets
- Environment variables used for sensitive data
- No credentials in logs

## **Performance Checklist**

### **Database**

- N+1 queries avoided
- Proper indexes exist
- Query optimization applied

### **Memory**

- No memory leaks
- Large objects handled efficiently
- Caching used where appropriate

### **Algorithms**

- Appropriate data structures used
- Time complexity acceptable
- No nested loops that could be optimized
24 changes: 24 additions & 0 deletions .agents/skills/github-pr-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: github-pr-review
description: Reviews GitHub Pull Requests, analyzes diffs, and validates existing review comments for relevance. Use when the user provides a GitHub PR URL, asks to review a PR, поревьювить PR, проверить PR, or check whether existing review comments are still relevant.
---

# GitHub PR Review & Validation Rule

## Работа со ссылкой на PR
Когда предоставлена ссылка на GitHub PR:
1. **Анализ изменений**: Изучи diff и файлы, затронутые в PR.
2. **Применение чек-листа**: Используй критерии из skill `code-review-checklist` (Logical Bugs, Edge Cases, Security, Performance) для анализа входящего кода. Сначала прочитай `.agents/skills/code-review-checklist/SKILL.md`.

## Проверка существующих замечаний (Comments Validation)
Если в PR уже есть комментарии/замечания от других ревьюеров:
1. **Релевантность**: Проверь, актуально ли ещё замечание. Если код уже исправлен в последних коммитах — отметь это.
2. **Объективность**: Сверь замечание с текущим чек-листом. Если замечание противоречит стандартам проекта или чек-листу, укажи на это.

## Формат ответа
Для каждого замечания (нового или существующего из PR) используй формат:
- **Локация**: [Файл : Строка]
- **Статус**: (Новое / Подтверждено / Исправлено / Неактуально)
- **Критичность**: (High / Medium / Low)
- **Суть**: Краткое описание проблемы согласно чек-листу.
- **Рекомендация**: Конкретный пример исправленного кода.
4 changes: 2 additions & 2 deletions .agents/skills/gravity-ui/references/package-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@ A library for rendering whole web pages or page sections from declarative JSON/Y
- Data-driven pages: render a `content` config of typed blocks with `PageConstructor` wrapped in `PageConstructorProvider`.
- Marketing, landing, and documentation pages assembled from prebuilt blocks (headers, media, cards, etc.).
- Server-side YFM processing of block text via the `@gravity-ui/page-constructor/server` utilities (`contentTransformer`, `fullTransform`).
- Reusing just the responsive grid (`Grid`/`Row`/`Col`) or `Navigation` component standalone.
- Reusing just the responsive grid (`Grid`/`Row`/`Col`) or `QueriesNavigation` component standalone.

#### When not to use

- General application UI (buttons, forms, modals) — use [`@gravity-ui/uikit`](https://github.com/gravity-ui/uikit).
- Editing Markdown/YFM content — use [`@gravity-ui/markdown-editor`](https://github.com/gravity-ui/markdown-editor).
- App navigation shells (aside header) — use [`@gravity-ui/navigation`](https://github.com/gravity-ui/navigation); this package's `Navigation` is a page-level top nav.
- App navigation shells (aside header) — use [`@gravity-ui/navigation`](https://github.com/gravity-ui/navigation); this package's `QueriesNavigation` is a page-level top nav.

## Page-constructor-builder — `@gravity-ui/page-constructor-builder`

Expand Down
81 changes: 0 additions & 81 deletions plans/history-header-search-with-buttons.md

This file was deleted.

Loading
Loading