symfonia-ai-tools 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +489 -0
- package/bin/cli.mjs +35 -0
- package/lib/installer.mjs +495 -0
- package/lib/questions.mjs +332 -0
- package/lib/ui.mjs +76 -0
- package/lib/utils.mjs +231 -0
- package/package.json +26 -0
- package/templates/base/CLAUDE.md +34 -0
- package/templates/base/_ai/_guidelines_header.md +70 -0
- package/templates/base/_ai/context/README.md +20 -0
- package/templates/base/_ai/prompts/codereview.prompt.md +324 -0
- package/templates/base/_ai/prompts/duplicate-code-analysis.prompt.md +128 -0
- package/templates/base/_ai/prompts/figma-analysis.prompt.md +155 -0
- package/templates/base/_ai/prompts/security-review.prompt.md +46 -0
- package/templates/base/_ai/skills/README.md +80 -0
- package/templates/base/_ai/skills/TEMPLATE.md +106 -0
- package/templates/base/_ai/skills/babysit-prs/SKILL.md +105 -0
- package/templates/base/_ai/skills/debug/SKILL.md +93 -0
- package/templates/base/_ai/skills/fill-worklogs/SKILL.md +158 -0
- package/templates/base/_ai/skills/hotfix/SKILL.md +52 -0
- package/templates/base/_ai/skills/jira-task/SKILL.md +170 -0
- package/templates/base/_ai/skills/my-prs/SKILL.md +78 -0
- package/templates/base/_ai/skills/pr-dashboard/SKILL.md +43 -0
- package/templates/base/_ai/skills/pr-prepare/SKILL.md +106 -0
- package/templates/base/_ai/skills/refactor/SKILL.md +87 -0
- package/templates/base/_ai/skills/write-tests/SKILL.md +109 -0
- package/templates/base/_claude/settings.local.json +37 -0
- package/templates/base/_cursor/rules/global.mdc +7 -0
- package/templates/base/_editorconfig +18 -0
- package/templates/base/_gemini/settings.json +3 -0
- package/templates/base/_github/copilot-instructions.md +1 -0
- package/templates/base/_github/pull_request_template.md +23 -0
- package/templates/base/_gitignore +22 -0
- package/templates/base/_junie/guidelines.md +1 -0
- package/templates/base/commit-instructions.md +92 -0
- package/templates/packs/docker/_ai/instructions/docker.instructions.md +193 -0
- package/templates/packs/docker/_guidelines.md +10 -0
- package/templates/packs/docker/pack.json +8 -0
- package/templates/packs/laravel/_ai/instructions/api-resource.instructions.md +251 -0
- package/templates/packs/laravel/_ai/instructions/module.instructions.md +133 -0
- package/templates/packs/laravel/_ai/instructions/service-repository.instructions.md +215 -0
- package/templates/packs/laravel/_ai/instructions/testing.instructions.md +278 -0
- package/templates/packs/laravel/_ai/skills/migration/SKILL.md +172 -0
- package/templates/packs/laravel/_ai/skills/new-endpoint/SKILL.md +165 -0
- package/templates/packs/laravel/_ai/skills/new-module/SKILL.md +208 -0
- package/templates/packs/laravel/_ai/skills/queued-job/SKILL.md +248 -0
- package/templates/packs/laravel/_ai/skills/testing-feature/SKILL.md +196 -0
- package/templates/packs/laravel/_ai/skills/testing-manual/SKILL.md +186 -0
- package/templates/packs/laravel/_ai/skills/testing-unit/SKILL.md +200 -0
- package/templates/packs/laravel/_guidelines.md +25 -0
- package/templates/packs/laravel/pack.json +6 -0
- package/templates/packs/playwright/_ai/instructions/playwright.instructions.md +219 -0
- package/templates/packs/playwright/_ai/skills/playwright/README.md +194 -0
- package/templates/packs/playwright/_ai/skills/playwright/SKILL.md +1245 -0
- package/templates/packs/playwright/_ai/skills/playwright-codereview/SKILL.md +642 -0
- package/templates/packs/playwright/_ai/skills/playwright-record/README.md +87 -0
- package/templates/packs/playwright/_ai/skills/playwright-record/SKILL.md +564 -0
- package/templates/packs/playwright/_guidelines.md +12 -0
- package/templates/packs/playwright/pack.json +9 -0
- package/templates/packs/storybook/_ai/instructions/storybook.instructions.md +181 -0
- package/templates/packs/storybook/pack.json +6 -0
- package/templates/packs/vitest/_ai/instructions/vitest.instructions.md +688 -0
- package/templates/packs/vitest/pack.json +6 -0
- package/templates/packs/vue3/_ai/instructions/api.instructions.md +163 -0
- package/templates/packs/vue3/_ai/instructions/coding-conventions.instructions.md +160 -0
- package/templates/packs/vue3/_ai/instructions/composables.instructions.md +218 -0
- package/templates/packs/vue3/_ai/instructions/forms.instructions.md +227 -0
- package/templates/packs/vue3/_ai/instructions/store.instructions.md +504 -0
- package/templates/packs/vue3/_ai/instructions/vue.instructions.md +339 -0
- package/templates/packs/vue3/_ai/skills/api-integration/SKILL.md +195 -0
- package/templates/packs/vue3/_ai/skills/new-component/SKILL.md +133 -0
- package/templates/packs/vue3/_ai/skills/new-module/SKILL.md +177 -0
- package/templates/packs/vue3/_guidelines.md +45 -0
- package/templates/packs/vue3/pack.json +11 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} - Guidelines
|
|
2
|
+
|
|
3
|
+
## Project Overview
|
|
4
|
+
|
|
5
|
+
**{{PROJECT_NAME}}** — {{PROJECT_DESCRIPTION}}
|
|
6
|
+
|
|
7
|
+
**Tech Stack**: {{TECH_STACK}}
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
- Test: `{{TEST_COMMAND}}`
|
|
12
|
+
- Build: `{{BUILD_COMMAND}}`
|
|
13
|
+
- Lint: `{{LINT_COMMAND}}`
|
|
14
|
+
- CI (all checks): `{{CI_COMMAND}}`
|
|
15
|
+
|
|
16
|
+
## Commits & Branches
|
|
17
|
+
|
|
18
|
+
- Follow commit conventions from `commit-instructions.md`
|
|
19
|
+
- JIRA prefix: **{{JIRA_PREFIX}}**
|
|
20
|
+
- Extract issue number from branch name: `feature/{{JIRA_PREFIX}}-1234-name` → `{{JIRA_PREFIX}}-1234: description`
|
|
21
|
+
- Never add `Co-Authored-By` or AI attribution lines to commit messages
|
|
22
|
+
- Do not commit without developer approval
|
|
23
|
+
|
|
24
|
+
### Branch Naming
|
|
25
|
+
|
|
26
|
+
| Type | Pattern | Example |
|
|
27
|
+
|------|---------|---------|
|
|
28
|
+
| Feature | `feature/{{JIRA_PREFIX}}-XXXX-short-name` | `feature/{{JIRA_PREFIX}}-1234-user-auth` |
|
|
29
|
+
| Bugfix | `bugfix/{{JIRA_PREFIX}}-XXXX-short-name` | `bugfix/{{JIRA_PREFIX}}-567-login-fix` |
|
|
30
|
+
| Hotfix | `hotfix/{{JIRA_PREFIX}}-XXXX-short-name` | `hotfix/{{JIRA_PREFIX}}-890-crash-fix` |
|
|
31
|
+
| Release | `release/vX.Y.Z` | `release/v2.1.0` |
|
|
32
|
+
|
|
33
|
+
## CI Pipeline
|
|
34
|
+
|
|
35
|
+
Every PR must pass: `{{CI_COMMAND}}`
|
|
36
|
+
|
|
37
|
+
## Forbidden
|
|
38
|
+
|
|
39
|
+
**Never do these without explicit developer approval:**
|
|
40
|
+
|
|
41
|
+
- Delete files or directories outside the current task scope
|
|
42
|
+
- Modify `.env`, `.env.*`, or any file containing secrets
|
|
43
|
+
- Change CI/CD configuration (`.github/workflows/`, `Jenkinsfile`, etc.)
|
|
44
|
+
- Force push, reset --hard, or rewrite git history
|
|
45
|
+
- Install or remove dependencies (only suggest, let developer decide)
|
|
46
|
+
- Modify database schemas or run migrations in non-dev environments
|
|
47
|
+
- Change authentication/authorization logic without review
|
|
48
|
+
- Disable tests, linters, or security checks
|
|
49
|
+
- Commit generated files (build artifacts, lock files) without asking
|
|
50
|
+
|
|
51
|
+
## Testing Strategy
|
|
52
|
+
|
|
53
|
+
- **Unit tests**: Every new function/method, every bug fix (regression test)
|
|
54
|
+
- **Integration tests**: API endpoints, database operations, external service calls
|
|
55
|
+
- **E2E tests**: Critical user flows (if Playwright pack is installed)
|
|
56
|
+
- Write the test FIRST when fixing a bug — it should fail before the fix
|
|
57
|
+
- Test edge cases: empty input, null, boundary values, error scenarios
|
|
58
|
+
- Mock external dependencies in unit tests, use real services in integration
|
|
59
|
+
|
|
60
|
+
## Skills
|
|
61
|
+
|
|
62
|
+
Before working on any task, check `.ai/skills/` for a matching step-by-step workflow.
|
|
63
|
+
|
|
64
|
+
## Instructions
|
|
65
|
+
|
|
66
|
+
Context-specific instructions are in `.ai/instructions/` — they apply automatically based on file type (`applyTo` glob patterns).
|
|
67
|
+
|
|
68
|
+
## Context
|
|
69
|
+
|
|
70
|
+
Project-specific context (architecture, API spec, glossary) is in `.ai/context/`.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Context
|
|
2
|
+
|
|
3
|
+
This directory holds project-specific context files that AI agents should read for deeper understanding.
|
|
4
|
+
|
|
5
|
+
## What to put here
|
|
6
|
+
|
|
7
|
+
- **architecture.md** — system architecture, service boundaries, data flow
|
|
8
|
+
- **api-spec.md** — API endpoints, request/response formats, error codes
|
|
9
|
+
- **domain-glossary.md** — business terms and their meaning in code
|
|
10
|
+
- **decisions.md** — key architectural decisions and their reasoning
|
|
11
|
+
- **environment.md** — environment setup, required services, ports
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Tell the AI agent:
|
|
16
|
+
```
|
|
17
|
+
Read .ai/context/architecture.md before working on this task.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or reference in skills/instructions that need this context.
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
# Code Review - AI Agent Prompt
|
|
2
|
+
|
|
3
|
+
## Cel
|
|
4
|
+
Wykonaj **kompleksowy code review** porownujac aktualny branch `{{CURRENT_BRANCH}}` z branchem bazowym `{{BASE_BRANCH}}` (domyslnie `develop` lub `main`), weryfikujac zgodnosc wszystkich zmian z zasadami projektu, dokumentacja techniczna oraz best practices.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Krok 1: Analiza zmian (Git Diff + lokalne zmiany)
|
|
9
|
+
|
|
10
|
+
### Zadania:
|
|
11
|
+
1. **Pobierz roznice miedzy branchami**:
|
|
12
|
+
```bash
|
|
13
|
+
git diff {{BASE_BRANCH}}...{{CURRENT_BRANCH}}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
2. **Uwzglednij lokalne zmiany (niezacommitowane)**:
|
|
17
|
+
- Pobierz takze zmiany z:
|
|
18
|
+
```bash
|
|
19
|
+
git diff
|
|
20
|
+
```
|
|
21
|
+
- Zidentyfikuj pliki zmodyfikowane, dodane, usuniete, ktore nie zostaly jeszcze wkomitowane.
|
|
22
|
+
|
|
23
|
+
3. **Zidentyfikuj wszystkie pliki**:
|
|
24
|
+
- **Dodane** - nowe pliki w projekcie
|
|
25
|
+
- **Zmodyfikowane** - pliki ze zmianami
|
|
26
|
+
- **Usuniete** - pliki usuniete z projektu
|
|
27
|
+
|
|
28
|
+
4. **Kategoryzuj zmiany wedlug typu**:
|
|
29
|
+
- **Komponenty** (`*.vue`, `*.tsx`, `*.jsx`)
|
|
30
|
+
- **Composables / Hooks** (`composables/*.ts`, `hooks/*.ts`)
|
|
31
|
+
- **Stores** (`*.store.ts`, `*.slice.ts`)
|
|
32
|
+
- **Services** (`services/*.ts`)
|
|
33
|
+
- **Typy TypeScript** (`types/*.ts`)
|
|
34
|
+
- **Testy** (`*.test.ts`, `*.spec.ts`)
|
|
35
|
+
- **i18n / Tlumaczenia** (`lang/`, `locales/`, `messages/*.json`)
|
|
36
|
+
- **Dokumentacja** (`*.md`)
|
|
37
|
+
- **Konfiguracja** (`*.config.ts`, `*.json`)
|
|
38
|
+
|
|
39
|
+
5. **Przeanalizuj szczegoly kazdej zmiany**:
|
|
40
|
+
- Ile linii dodano/usunieto?
|
|
41
|
+
- Jaki jest kontekst biznesowy zmiany?
|
|
42
|
+
- Czy zmiany sa spojne logicznie?
|
|
43
|
+
- Czy zmiany wplywaja na inne moduly?
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Krok 2: Weryfikacja zgodnosci z zasadami projektu
|
|
48
|
+
|
|
49
|
+
### Architektura i Struktura Projektu
|
|
50
|
+
- [ ] **Modularnosc**: Czy kod jest umieszczony w odpowiednim module `{{MODULE_PATH}}`?
|
|
51
|
+
- [ ] **Separacja warstw**:
|
|
52
|
+
- Komponenty = tylko UI (brak logiki biznesowej)
|
|
53
|
+
- Composables / Hooks = cala logika biznesowa
|
|
54
|
+
- Stores = zarzadzanie stanem
|
|
55
|
+
- Services = wywolania API
|
|
56
|
+
- [ ] **Struktura folderow**: `components/`, `composables/`, `store/`, `service/`, `types/`, `views/`
|
|
57
|
+
- [ ] **Nazewnictwo plikow**: Zgodnosc z konwencja projektu (np. `UserManagement.store.ts`)
|
|
58
|
+
|
|
59
|
+
### Komponenty i UI
|
|
60
|
+
- [ ] **Props i events**: Czy komponenty maja poprawnie zdefiniowane interfejsy?
|
|
61
|
+
- [ ] **Kompozycja**: Czy komponenty sa male, reuzywalne i jednozadaniowe?
|
|
62
|
+
- [ ] **Warstwa wizualna**: Czy nie naruszono CSS/stylow niepowiazanych elementow?
|
|
63
|
+
|
|
64
|
+
### Naming Conventions
|
|
65
|
+
- [ ] **Variables i properties**: Czy uzywaja `camelCase` (np. `dataTestId`, `isLoading`)?
|
|
66
|
+
- [ ] **CSS classes**: Czy uzywaja konwencji ustalonej w projekcie?
|
|
67
|
+
- Przyklad poprawny: `.notification-item-content`, `.bell-notifications-dropdown`
|
|
68
|
+
- Przyklad bledny: `.notification-item__content`, `.bell-notifications__dropdown`
|
|
69
|
+
- [ ] **Data test IDs**: Czy wartosci sa w `camelCase`?
|
|
70
|
+
- Przyklad poprawny: `dataTestId: 'bellNotifications'`, `'notificationItem'`
|
|
71
|
+
- Przyklad bledny: `dataTestId: 'bell-notifications'`, `'notification-item'`
|
|
72
|
+
|
|
73
|
+
### TypeScript i Typy
|
|
74
|
+
- [ ] **Strict typing**: Brak uzycia `any` type
|
|
75
|
+
- [ ] **Konwencje nazewnictwa**:
|
|
76
|
+
- Interfaces -> `I` prefix (np. `IUserForm`)
|
|
77
|
+
- Enums -> `E` prefix (np. `EUserRole`)
|
|
78
|
+
- Stores -> `*.store.ts` suffix
|
|
79
|
+
- [ ] **Definicje typow**: Czy wszystkie props, API responses, state maja interfejsy?
|
|
80
|
+
- [ ] **Import/Export**: Poprawne importy typow i wartosci
|
|
81
|
+
|
|
82
|
+
### Internationalization (i18n)
|
|
83
|
+
- [ ] **Brak hardcoded strings**: Wszystkie teksty uzywaja `$t('key')` lub `t('key')`
|
|
84
|
+
- [ ] **Klucze tlumaczen**: Czy nowe klucze dodano do plikow jezykowych?
|
|
85
|
+
- [ ] **Spojnosc kluczy**: Czy klucze sa opisowe i zgrupowane logicznie?
|
|
86
|
+
- [ ] **Fallback**: Czy brakujace tlumaczenia maja fallback?
|
|
87
|
+
|
|
88
|
+
### API i Services
|
|
89
|
+
- [ ] **Uzywanie dedykowanego composable/service do wywolan API**
|
|
90
|
+
- [ ] **Brak hardcoded URLs**: Nie ma bezposrednich URL w kodzie
|
|
91
|
+
- [ ] **Prefix API**: Nie dodawano recznie prefixu API (jesli jest automatyczny)
|
|
92
|
+
- [ ] **Obsluga bledow**: Uzywanie dedykowanego mechanizmu obslugi bledow (np. error handler, toast notifications)
|
|
93
|
+
- [ ] **Try-catch**: Poprawna obsluga wyjatkow w async operacjach
|
|
94
|
+
- [ ] **Loading states**: Czy sa zaimplementowane stany ladowania?
|
|
95
|
+
|
|
96
|
+
### Stores (Pinia / Redux / Zustand / inne)
|
|
97
|
+
- [ ] **Struktura store**: Uzywanie zalecanego wzorca definicji
|
|
98
|
+
- [ ] **Reaktywnosc**: Poprawne uzycie mechanizmow reaktywnosci
|
|
99
|
+
- [ ] **Mutacje**: Czy stan jest mutowany tylko wewnatrz store?
|
|
100
|
+
- [ ] **Logika biznesowa**: Czy store zawiera tylko zarzadzanie stanem (logika w composables)?
|
|
101
|
+
|
|
102
|
+
### Composables / Hooks
|
|
103
|
+
- [ ] **Pattern `useXxx`**: Nazewnictwo zgodne z konwencja
|
|
104
|
+
- [ ] **Tylko logika**: Brak elementow UI w composables
|
|
105
|
+
- [ ] **Return pattern**: Zwracanie reactive values i functions
|
|
106
|
+
- [ ] **Reuzywalnosc**: Czy composable jest generyczny i reuzywalny?
|
|
107
|
+
|
|
108
|
+
### Testy
|
|
109
|
+
- [ ] **Pokrycie testami**: Czy nowe komponenty/composables maja testy?
|
|
110
|
+
- [ ] **Struktura testow**: Zgodnosc z instrukcjami testowania w projekcie
|
|
111
|
+
- [ ] **Kategorie testow**:
|
|
112
|
+
- Basic Rendering
|
|
113
|
+
- Props Testing
|
|
114
|
+
- States
|
|
115
|
+
- Event Handling
|
|
116
|
+
- Accessibility
|
|
117
|
+
- Edge Cases
|
|
118
|
+
- [ ] **Naming**: Czy testy maja opisowe nazwy (`should ...`)?
|
|
119
|
+
- [ ] **Coverage**: Minimum wymagany prog pokrycia testami
|
|
120
|
+
- [ ] **Mocking**: Poprawne mockowanie dependencies
|
|
121
|
+
- [ ] **Async**: Uzycie `async/await` i odpowiednich mechanizmow oczekiwania gdzie potrzeba
|
|
122
|
+
|
|
123
|
+
### Dokumentacja
|
|
124
|
+
- [ ] **Plan zmian**: Czy istnieje plik `.md` z planem (np. `module-plan.md`)?
|
|
125
|
+
- [ ] **Aktualizacja**: Czy dokumentacja jest zaktualizowana po zmianach?
|
|
126
|
+
- [ ] **Test cases**: Czy dodano dokumentacje testow?
|
|
127
|
+
- [ ] **README**: Czy zaktualizowano README jesli dodano nowy modul?
|
|
128
|
+
|
|
129
|
+
### Code Quality
|
|
130
|
+
- [ ] **Linter**: Brak bledow lint (ESLint / inne)
|
|
131
|
+
- [ ] **Formatter**: Kod sformatowany zgodnie z Prettier / ustawieniami projektu
|
|
132
|
+
- [ ] **Nieuzywane importy**: Brak nieuzywanych importow
|
|
133
|
+
- [ ] **Console methods**: Usuniecie WSZYSTKICH `console.log`, `console.warn`, `console.error`, `console.info`
|
|
134
|
+
- [ ] **Error handling**: Uzywanie dedykowanego mechanizmu obslugi bledow zamiast console.*
|
|
135
|
+
- [ ] **Komentarze**: Brak niepotrzebnych komentarzy (kod self-documenting)
|
|
136
|
+
- [ ] **CSS comments**: Brak komentarzy w CSS - style powinny byc oczywiste
|
|
137
|
+
- [ ] **JSDoc**: Czy dodano JSDoc tylko dla publicznych API i zlozonych funkcji?
|
|
138
|
+
- [ ] **Cyclomatic complexity**: Poziom 5-15 (nie za skomplikowane funkcje)
|
|
139
|
+
|
|
140
|
+
### Performance
|
|
141
|
+
- [ ] **Lazy loading**: Czy komponenty sa lazy-loaded gdzie to mozliwe?
|
|
142
|
+
- [ ] **Memoizacja**: Uzycie memoizacji dla ciezkich operacji
|
|
143
|
+
- [ ] **Keys w iteracjach**: Poprawne uzycie `:key` / `key` w petlach renderujacych
|
|
144
|
+
- [ ] **Computed vs methods**: Czy uzywane sa computed properties / useMemo zamiast methods?
|
|
145
|
+
|
|
146
|
+
### Accessibility
|
|
147
|
+
- [ ] **ARIA attributes**: Poprawne uzycie aria-* atrybutow
|
|
148
|
+
- [ ] **Keyboard navigation**: Obsluga klawiatury
|
|
149
|
+
- [ ] **Focus management**: Zarzadzanie focusem
|
|
150
|
+
- [ ] **Semantic HTML**: Uzycie semantycznych tagow
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Krok 3: Identyfikacja naruszen i rekomendacje
|
|
155
|
+
|
|
156
|
+
### Format dla kazdego naruszenia:
|
|
157
|
+
```markdown
|
|
158
|
+
### Naruszenie #N: [Tytul naruszenia]
|
|
159
|
+
|
|
160
|
+
**Plik**: `{{FILE_PATH}}`
|
|
161
|
+
**Linia**: {{LINE_NUMBER}}
|
|
162
|
+
**Kategoria**: [Architektura/TypeScript/i18n/API/Testy/etc.]
|
|
163
|
+
**Priorytet**: KRYTYCZNY / WAZNY / SUGESTIA
|
|
164
|
+
|
|
165
|
+
**Problem**:
|
|
166
|
+
[Opis co jest nie tak]
|
|
167
|
+
|
|
168
|
+
**Aktualny kod**:
|
|
169
|
+
```typescript
|
|
170
|
+
// Fragment problematycznego kodu
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Proponowana poprawka**:
|
|
174
|
+
```typescript
|
|
175
|
+
// Poprawiony kod
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Uzasadnienie**:
|
|
179
|
+
[Dlaczego to naruszenie i dlaczego proponowane rozwiazanie jest lepsze]
|
|
180
|
+
|
|
181
|
+
**Dokumentacja referencyjna**:
|
|
182
|
+
- Odniesienie do zasad projektu
|
|
183
|
+
- Odniesienie do dokumentacji technicznej
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Kategoryzacja naruszen:
|
|
187
|
+
1. **KRYTYCZNY** - blokuje merge (np. `any` type, brak testow, hardcoded API URLs)
|
|
188
|
+
2. **WAZNY** - powinien byc poprawiony przed merge (np. brak i18n, slaba struktura)
|
|
189
|
+
3. **SUGESTIA** - ulepszenia, refactoring, optymalizacje (mozna merge i poprawic pozniej)
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Krok 4: Analiza testow
|
|
194
|
+
|
|
195
|
+
### Weryfikacja testow:
|
|
196
|
+
1. **Czy wszystkie nowe komponenty maja testy?**
|
|
197
|
+
2. **Czy testy pokrywaja wszystkie przypadki**:
|
|
198
|
+
- Basic Rendering
|
|
199
|
+
- Props (wszystkie props + default values)
|
|
200
|
+
- States (disabled, error, loading, required)
|
|
201
|
+
- Events (emitowanie i handling)
|
|
202
|
+
- Accessibility (aria-*, keyboard)
|
|
203
|
+
- Edge cases (null, undefined, boundary values)
|
|
204
|
+
3. **Czy testy sa niezalezne i izolowane?**
|
|
205
|
+
4. **Czy mockowanie jest poprawne?**
|
|
206
|
+
5. **Czy coverage >= wymagany prog?**
|
|
207
|
+
|
|
208
|
+
### Sugestie testow:
|
|
209
|
+
Jesli brakuje testow, zaproponuj konkretne test cases do dodania.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Krok 5: Podsumowanie i decyzja
|
|
214
|
+
|
|
215
|
+
### Statystyki zmian:
|
|
216
|
+
- **Branch**: `{{CURRENT_BRANCH}}` vs `{{BASE_BRANCH}}`
|
|
217
|
+
- **Data review**: {{REVIEW_DATE}}
|
|
218
|
+
- **Pliki zmienione**: {{FILES_CHANGED}}
|
|
219
|
+
- **Linie dodane**: +{{LINES_ADDED}}
|
|
220
|
+
- **Linie usuniete**: -{{LINES_DELETED}}
|
|
221
|
+
- **Komponenty**: {{COMPONENTS_COUNT}}
|
|
222
|
+
- **Testy**: {{TESTS_COUNT}}
|
|
223
|
+
- **Pokrycie testami**: {{TEST_COVERAGE}}%
|
|
224
|
+
|
|
225
|
+
### Checklist zgodnosci:
|
|
226
|
+
| Kategoria | Status | Komentarz |
|
|
227
|
+
|-----------|--------|-----------|
|
|
228
|
+
| Architektura | OK/WARN/FAIL | ... |
|
|
229
|
+
| TypeScript | OK/WARN/FAIL | ... |
|
|
230
|
+
| i18n | OK/WARN/FAIL | ... |
|
|
231
|
+
| API/Services | OK/WARN/FAIL | ... |
|
|
232
|
+
| Testy | OK/WARN/FAIL | ... |
|
|
233
|
+
| Dokumentacja | OK/WARN/FAIL | ... |
|
|
234
|
+
| Code Quality | OK/WARN/FAIL | ... |
|
|
235
|
+
| Performance | OK/WARN/FAIL | ... |
|
|
236
|
+
| Accessibility | OK/WARN/FAIL | ... |
|
|
237
|
+
|
|
238
|
+
### Ocena koncowa:
|
|
239
|
+
- **Liczba naruszen krytycznych**: {{CRITICAL_COUNT}}
|
|
240
|
+
- **Liczba naruszen waznych**: {{IMPORTANT_COUNT}}
|
|
241
|
+
- **Liczba sugestii**: {{SUGGESTION_COUNT}}
|
|
242
|
+
|
|
243
|
+
### Decyzja:
|
|
244
|
+
- **APPROVED** - Zmiany moga zostac zmergowane do `{{BASE_BRANCH}}`
|
|
245
|
+
- **APPROVED WITH COMMENTS** - Mozna zmergowac, ale sugerowane poprawki
|
|
246
|
+
- **CHANGES REQUESTED** - Wymagane poprawki przed merge
|
|
247
|
+
|
|
248
|
+
**Uzasadnienie decyzji**:
|
|
249
|
+
[Krotkie podsumowanie dlaczego taka decyzja]
|
|
250
|
+
|
|
251
|
+
### Lista plikow wymagajacych poprawy:
|
|
252
|
+
1. `{{FILE_PATH_1}}` - [powod]
|
|
253
|
+
2. `{{FILE_PATH_2}}` - [powod]
|
|
254
|
+
...
|
|
255
|
+
|
|
256
|
+
### Najlepsze praktyki zastosowane w review:
|
|
257
|
+
- [Lista dobrych praktyk, ktore zostaly zachowane]
|
|
258
|
+
|
|
259
|
+
### Sugestie na przyszlosc:
|
|
260
|
+
- [Ogolne rekomendacje dla dalszego rozwoju]
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Dokumentacja referencyjna
|
|
265
|
+
|
|
266
|
+
### Glowne pliki instrukcji:
|
|
267
|
+
- **Zasady projektu**: plik instrukcji AI w repozytorium (np. `copilot-instructions.md`, `CLAUDE.md`)
|
|
268
|
+
- **Testy**: instrukcje testowania w projekcie
|
|
269
|
+
- **Stores**: instrukcje zarzadzania stanem
|
|
270
|
+
- **Komponenty**: instrukcje tworzenia komponentow
|
|
271
|
+
|
|
272
|
+
### Dokumentacja techniczna projektu:
|
|
273
|
+
- Overview projektu
|
|
274
|
+
- Stack technologiczny
|
|
275
|
+
- Struktura folderow
|
|
276
|
+
- Architektura aplikacji
|
|
277
|
+
- Komponenty
|
|
278
|
+
- API i services
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Zmienne do uzycia:
|
|
283
|
+
|
|
284
|
+
- `{{CURRENT_BRANCH}}` - aktualny branch (domyslnie: branch z ktorego wywolano review)
|
|
285
|
+
- `{{BASE_BRANCH}}` - branch bazowy do porownania (domyslnie: `develop` lub `main`)
|
|
286
|
+
- `{{MODULE_PATH}}` - sciezka do modulu (np. `src/modules/[feature]/`)
|
|
287
|
+
- `{{COMPONENT_LIB_IMPORT}}` - import biblioteki komponentow (np. `@/components`)
|
|
288
|
+
- `{{REVIEW_DATE}}` - data wykonania review
|
|
289
|
+
- `{{FILES_CHANGED}}` - liczba zmienionych plikow
|
|
290
|
+
- `{{LINES_ADDED}}` - liczba dodanych linii
|
|
291
|
+
- `{{LINES_DELETED}}` - liczba usunietych linii
|
|
292
|
+
- `{{COMPONENTS_COUNT}}` - liczba zmienionych komponentow
|
|
293
|
+
- `{{TESTS_COUNT}}` - liczba plikow testowych
|
|
294
|
+
- `{{TEST_COVERAGE}}` - procent pokrycia testami
|
|
295
|
+
- `{{FILE_PATH}}` - sciezka do pliku w naruszeniu
|
|
296
|
+
- `{{LINE_NUMBER}}` - numer linii w naruszeniu
|
|
297
|
+
- `{{CRITICAL_COUNT}}` - liczba krytycznych naruszen
|
|
298
|
+
- `{{IMPORTANT_COUNT}}` - liczba waznych naruszen
|
|
299
|
+
- `{{SUGGESTION_COUNT}}` - liczba sugestii
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Jezyk odpowiedzi: **Polski**
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Jak uzywac tego prompta:
|
|
308
|
+
|
|
309
|
+
1. Skopiuj cala zawartosc tego pliku
|
|
310
|
+
2. Wklej do AI agenta (GitHub Copilot Chat / Claude / GPT)
|
|
311
|
+
3. Agent automatycznie:
|
|
312
|
+
- Pobierze zmiany z git diff
|
|
313
|
+
- Przeanalizuje wszystkie pliki
|
|
314
|
+
- Zweryfikuje zgodnosc z zasadami
|
|
315
|
+
- Wygeneruje szczegolowy raport
|
|
316
|
+
- Podejmie decyzje o merge
|
|
317
|
+
|
|
318
|
+
**Przykladowe wywolanie**:
|
|
319
|
+
```
|
|
320
|
+
@workspace Wykonaj code review mojego brancha zgodnie z promptem codereview.prompt.md
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
**Uwaga:** Recenzja musi byc szczegolowa, oparta o konkretne zasady i dokumentacje projektu. Nie pomijaj zadnych naruszen.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Prompt: Analiza Duplikatow Kodu (Clone Detection)
|
|
2
|
+
|
|
3
|
+
## Cel
|
|
4
|
+
Przeprowadz kompleksowa analize kodu w repozytorium w celu identyfikacji powtarzajacych sie fragmentow (duplikatow), zarowno dokladnych jak i czesciowych (tzw. code clones poziomu 1-3). Wynik ma pomoc w redukcji dlugu technicznego, poprawie utrzymania i ograniczeniu ryzyka bledow.
|
|
5
|
+
|
|
6
|
+
## Zakres Analizy
|
|
7
|
+
Uwzglednij wszystkie pliki zrodlowe TypeScript, JavaScript, oraz komponenty UI, z wylaczeniem:
|
|
8
|
+
- Plikow generowanych lub build artefaktow (`dist/`, `build/`, `node_modules/`)
|
|
9
|
+
- Plikow konfiguracyjnych (np. `vite.config.ts`, `webpack.config.js`, `vitest.config.ts`)
|
|
10
|
+
- Tresci dokumentacji (`doc/`, `docs/`)
|
|
11
|
+
- Plikow jezykowych / tlumaczen - analizuj tylko ewentualne powtarzajace sie klucze jesli proszone, domyslnie pomin
|
|
12
|
+
- Testow snapshotowych (jesli istnieja)
|
|
13
|
+
|
|
14
|
+
Skup sie na:
|
|
15
|
+
- `{{MODULE_PATH}}/components/**` (szczegolnie powtarzalne wzorce w Button, Inputs, Modals, Table)
|
|
16
|
+
- `{{MODULE_PATH}}/composables/**` (powielone logiki async, obsluga bledow, loading)
|
|
17
|
+
- `{{MODULE_PATH}}/modules/**` (powtarzalne fragmenty miedzy modulami - np. fetch, mapowanie danych, walidacje)
|
|
18
|
+
- `{{MODULE_PATH}}/services/**` (podobne wywolania API z roznica w endpointach)
|
|
19
|
+
- `{{MODULE_PATH}}/stores/**` (powtarzajace sie schematy definicji i mutacji state)
|
|
20
|
+
|
|
21
|
+
## Typy Duplikacji Do Wykrycia
|
|
22
|
+
1. Dokladne duplikaty (identyczny kod lub roznice w bialych znakach / nazwach zmiennych).
|
|
23
|
+
2. Strukturalne podobienstwo (te same bloki kontrolne, rozne nazwy, te same operacje).
|
|
24
|
+
3. Powtarzalne wzorce funkcji (np. async function z try/catch/finally ustawiajace loading i uzywajace dedykowanego error handlera).
|
|
25
|
+
4. Powtarzalne interfejsy lub typy rozniace sie minimalnie (warto rozwazyc uogolnienie).
|
|
26
|
+
5. Zduplikowane selektory i struktury template w komponentach (np. identyczne konfiguracje przyciskow / komponentow UI).
|
|
27
|
+
6. Duplikaty walidacji (np. regex email, obsluga pustych pol, mapowanie statusow).
|
|
28
|
+
7. Powtarzajace sie konfiguracje kolumn tabel / gridow.
|
|
29
|
+
|
|
30
|
+
## Kontekst Architektoniczny (wazne dla rekomendacji)
|
|
31
|
+
- Biznesowa logika powinna byc w composables (`useXxx`). Jesli podobne fragmenty istnieja w wielu composables - rozwazyc ekstrakcje do wspolnego utila.
|
|
32
|
+
- Serwisy powinny byc cienkie i nie duplikowac logiki transformacji danych - jesli wystepuja, zaproponuj przeniesienie do dedykowanego mappera.
|
|
33
|
+
- Store'y nie powinny powielac identycznych operacji mutujacych - rozwaz wspolne helpery (np. `createAsyncStateHandler`).
|
|
34
|
+
- Kazdy user-facing text musi uzywac i18n - jesli duplikacja polega na wielu komponentach trzymajacych ten sam klucz + logike, rozwazyc wspolny wrapper komponent.
|
|
35
|
+
|
|
36
|
+
## Format Wyniku
|
|
37
|
+
Zwroc wynik w ponizszej strukturze (Markdown):
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
## Podsumowanie
|
|
41
|
+
- Liczba zidentyfikowanych grup duplikatow: X
|
|
42
|
+
- Priorytet wysokich (refaktoryzacja konieczna): Y
|
|
43
|
+
- Szacowany % redukcji linii po refaktoryzacji: Z%
|
|
44
|
+
|
|
45
|
+
## Grupy Duplikatow
|
|
46
|
+
### Grupa {id} (Poziom: {1|2|3}, Priorytet: {wysoki|sredni|niski})
|
|
47
|
+
Pliki:
|
|
48
|
+
- path/to/fileA.ts: [linia start-linia end]
|
|
49
|
+
- path/to/fileB.ts: [linia start-linia end]
|
|
50
|
+
... (minimum 2)
|
|
51
|
+
|
|
52
|
+
Wspolny wzorzec:
|
|
53
|
+
```
|
|
54
|
+
(kod/wzorzec uproszczony)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Roznice:
|
|
58
|
+
- fileA: nazwa zmiennej userId vs fileB: id
|
|
59
|
+
- fileC: dodatkowy catch branch
|
|
60
|
+
|
|
61
|
+
Rekomendacja refaktoryzacji:
|
|
62
|
+
- Zaproponuj: np. "Ekstrakcja do composable useAsyncLoader(fn)" / "Uogolnienie interfejsu IUserDetail -> IBaseUser".
|
|
63
|
+
Szacowany zysk: -N linii, +spojnosc obslugi bledow.
|
|
64
|
+
|
|
65
|
+
### Grupa ...
|
|
66
|
+
|
|
67
|
+
## Potencjalne Wspolne Abstrakcje
|
|
68
|
+
- Lista proponowanych nowych utili / composables / typow / fabryk.
|
|
69
|
+
|
|
70
|
+
## Szybkie Wygrane (Quick Wins)
|
|
71
|
+
- Wymien 3-5 prostych refaktoryzacji mozliwych w < 15 min.
|
|
72
|
+
|
|
73
|
+
## Ryzyka / Uwaga
|
|
74
|
+
- Wskaz gdzie refaktoryzacja moze naruszyc kontrakty API / testy.
|
|
75
|
+
|
|
76
|
+
## Nastepne Kroki
|
|
77
|
+
1. Zatwierdzenie listy priorytetow.
|
|
78
|
+
2. Utworzenie planu refaktoryzacji w odpowiednim module `*-plan.md`.
|
|
79
|
+
3. Dodanie testow zabezpieczajacych przed regresja.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Kryteria Priorytetyzacji
|
|
83
|
+
Wysoki priorytet jesli:
|
|
84
|
+
- Fragmenty wystepuja w >=3 plikach.
|
|
85
|
+
- Zawieraja logike biznesowa (walidacje, transformacje danych, obsluga bledow) lub wplywaja na UX.
|
|
86
|
+
- Powoduja zwiekszone ryzyko niespojnosci (np. rozne wersje walidacji e-mail).
|
|
87
|
+
|
|
88
|
+
Sredni priorytet:
|
|
89
|
+
- Duplikacja struktur template bez powaznej logiki.
|
|
90
|
+
|
|
91
|
+
Niski priorytet:
|
|
92
|
+
- Male powtorzenia (<5 linii) lub tylko podobne nazwy.
|
|
93
|
+
|
|
94
|
+
## Heurystyki Wykrywania (dla AI)
|
|
95
|
+
- Szukaj ciagow: `try {` + `loading.value = true` / `setLoading(true)` + `catch (error)` + error handler + `finally`.
|
|
96
|
+
- Szukaj powtarzajacych sie definicji interfejsow rozniacych sie pojedynczym polem.
|
|
97
|
+
- Szukaj identycznych tablic `columnDefs` / `headers`.
|
|
98
|
+
- Szukaj wielokrotnego uzycia podobnego regexu.
|
|
99
|
+
- Szukaj komponentow UI z identycznym ukladem (np. powtarzajace sie konfiguracje przyciskow, inputow, modali).
|
|
100
|
+
|
|
101
|
+
## Wykluczenia Specjalne
|
|
102
|
+
- Ignoruj bootstrap i inicjalizacje aplikacji (`main.ts`, `App.vue`, `index.tsx`) jesli nie ma powtarzalnej logiki.
|
|
103
|
+
- Ignoruj definicje typow oczywiscie rozne semantycznie (np. `IUser` vs `IRole`).
|
|
104
|
+
|
|
105
|
+
## Jezyk Odpowiedzi
|
|
106
|
+
- Odpowiedz w jezyku polskim.
|
|
107
|
+
- Uzywaj zwiezlych zdan, bez wodolejstwa.
|
|
108
|
+
|
|
109
|
+
## Styl Rekomendacji
|
|
110
|
+
- Konkret: "Polacz funkcje fetchUsers i fetchUserList w services/userService.ts".
|
|
111
|
+
- Unikaj ogolnikow typu: "Popraw jakosc kodu".
|
|
112
|
+
|
|
113
|
+
## Kontrola Jakosci
|
|
114
|
+
Na koncu dodaj sekcje:
|
|
115
|
+
```
|
|
116
|
+
## Walidacja
|
|
117
|
+
- Czy pominieto pliki konfiguracyjne: TAK/NIE
|
|
118
|
+
- Czy uwzgledniono composables: TAK/NIE
|
|
119
|
+
- Czy zaproponowano min. 3 abstrakcje: TAK/NIE
|
|
120
|
+
- Czy wskazano quick wins: TAK/NIE
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Zmienne
|
|
124
|
+
|
|
125
|
+
- `{{MODULE_PATH}}` - sciezka bazowa do zrodel (np. `src/`)
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
Uzyj tego promptu aby uruchomic analize duplikatow i wygenerowac raport do dalszego planowania refaktoryzacji.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
```prompt
|
|
2
|
+
|
|
3
|
+
# Figma View Analysis Prompt (for MCP & Copilot)
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
Perform a **full analysis of the Figma view**. Only identify components to use, describe the graphic layout and UI in detail. **Do not create or describe any implementation plan for our system.**
|
|
7
|
+
|
|
8
|
+
## Scope
|
|
9
|
+
- Focus exclusively on UI/UX analysis:
|
|
10
|
+
- Identify all UI components
|
|
11
|
+
- Describe layout, hierarchy, and visual structure
|
|
12
|
+
- List all states, interactions, and accessibility requirements
|
|
13
|
+
- Map mockup labels (e.g. Polish) to English technical names
|
|
14
|
+
- **DO NOT include implementation steps, code plans, or system architecture.**
|
|
15
|
+
|
|
16
|
+
## Language and Naming
|
|
17
|
+
- All files, folders, modules, and components must be named in English
|
|
18
|
+
- Mockup labels must be mapped to English technical names
|
|
19
|
+
- Keep translations in i18n keys
|
|
20
|
+
|
|
21
|
+
## Instructions
|
|
22
|
+
1. **Extract Figma selection links**
|
|
23
|
+
2. **Take screenshot via MCP and analyze** (do not save image)
|
|
24
|
+
3. **List used components**
|
|
25
|
+
4. **Describe the view in detail**:
|
|
26
|
+
- Layout, hierarchy, grid/flex structure
|
|
27
|
+
- States (loading, error, success, empty)
|
|
28
|
+
- Interactions (click, hover, modal, dropdown)
|
|
29
|
+
- Texts (with i18n key suggestions, keep original translations)
|
|
30
|
+
- Accessibility (ARIA, focus, keyboard navigation)
|
|
31
|
+
- Responsiveness (desktop/tablet/mobile)
|
|
32
|
+
- Validation rules (for forms)
|
|
33
|
+
5. **Save analysis to .md file** in `{{MODULE_PATH}}/analysis/[view-name]-figma-analysis.md` (English names only)
|
|
34
|
+
|
|
35
|
+
## Example Analysis File Structure
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
# Figma Analysis: User List View
|
|
39
|
+
|
|
40
|
+
**Analysis date**: 2025-10-15
|
|
41
|
+
**Module**: `users`
|
|
42
|
+
**View name**: `user-list`
|
|
43
|
+
|
|
44
|
+
## Mockup Label to English Mapping (Translation)
|
|
45
|
+
- "Lista uzytkownikow" -> User List
|
|
46
|
+
- "Uzytkownicy" -> Users
|
|
47
|
+
- "Dodaj uzytkownika" -> Add User
|
|
48
|
+
- "Filtruj" -> Filter
|
|
49
|
+
- "Szukaj" -> Search
|
|
50
|
+
- "Status" -> Status
|
|
51
|
+
- "Akcje" -> Actions
|
|
52
|
+
|
|
53
|
+
## Figma Selection Links
|
|
54
|
+
- https://www.figma.com/file/abc123?node-id=456:789
|
|
55
|
+
|
|
56
|
+
## UI Components List
|
|
57
|
+
|
|
58
|
+
### Main components (from {{COMPONENT_LIB_PATH}})
|
|
59
|
+
- **Button**
|
|
60
|
+
- Variant: `primary`, `secondary`, `success`, `danger`
|
|
61
|
+
- Props: `disabled`, `loading`, `icon`
|
|
62
|
+
|
|
63
|
+
- **InputText**
|
|
64
|
+
- Type: `text`, `email`, `password`, `search`
|
|
65
|
+
- Props: `placeholder`, `modelValue`, `error`, `required`
|
|
66
|
+
|
|
67
|
+
- **Table**
|
|
68
|
+
- Props: `data`, `columns`, `loading`, `pagination`
|
|
69
|
+
- Columns: First Name, Last Name, Email, Status, Actions
|
|
70
|
+
|
|
71
|
+
- **Loader**
|
|
72
|
+
- Props: `size`, `variant`
|
|
73
|
+
|
|
74
|
+
### Custom components
|
|
75
|
+
- **Statistics Chart** - Custom component
|
|
76
|
+
|
|
77
|
+
## Detailed View Description
|
|
78
|
+
|
|
79
|
+
### Structure and Layout
|
|
80
|
+
- **Header** (top): View title + action button (Button primary)
|
|
81
|
+
- **Filters Section** (middle-top):
|
|
82
|
+
- Search field (InputText search)
|
|
83
|
+
- Filter dropdown (Dropdown)
|
|
84
|
+
- "Filter" button (Button secondary)
|
|
85
|
+
- **Main Content** (center):
|
|
86
|
+
- Users table (Table)
|
|
87
|
+
- Pagination (Pagination)
|
|
88
|
+
- **Side Panel** (right): Statistics chart (custom)
|
|
89
|
+
|
|
90
|
+
### View States
|
|
91
|
+
- **Loading**: Full-screen Loader while loading data
|
|
92
|
+
- **Error**: Alert/Notification type="error" with error message
|
|
93
|
+
- **Empty**: EmptyState when no search results
|
|
94
|
+
- **Success**: Display table with data
|
|
95
|
+
|
|
96
|
+
### Interactions
|
|
97
|
+
- **Search**: Input with 300ms debounce, search by name/email
|
|
98
|
+
- **Filtering**: Dropdown with user status options
|
|
99
|
+
- **Sorting**: Click on table column header
|
|
100
|
+
- **Pagination**: Change page, change items per page
|
|
101
|
+
- **Row Actions**: Edit, Delete (confirmation modal)
|
|
102
|
+
|
|
103
|
+
### Texts and i18n
|
|
104
|
+
- `user.list.title` - "Lista uzytkownikow"
|
|
105
|
+
- `user.list.search.placeholder` - "Szukaj po nazwie lub email"
|
|
106
|
+
- `user.list.filter.status` - "Filtruj po statusie"
|
|
107
|
+
- `user.list.button.filter` - "Filtruj"
|
|
108
|
+
- `user.list.button.add` - "Dodaj uzytkownika"
|
|
109
|
+
- `user.list.table.firstName` - "Imie"
|
|
110
|
+
- `user.list.table.lastName` - "Nazwisko"
|
|
111
|
+
- `user.list.table.email` - "Email"
|
|
112
|
+
- `user.list.table.status` - "Status"
|
|
113
|
+
- `user.list.table.actions` - "Akcje"
|
|
114
|
+
- `user.list.empty.title` - "Brak uzytkownikow"
|
|
115
|
+
- `user.list.empty.description` - "Nie znaleziono uzytkownikow spelniajacych kryteria"
|
|
116
|
+
|
|
117
|
+
### Accessibility (A11y)
|
|
118
|
+
- Focus on search field after view loads
|
|
119
|
+
- Aria-label on all action buttons
|
|
120
|
+
- Keyboard navigation: Tab, Enter, Escape
|
|
121
|
+
- Screen reader: aria-live for search results
|
|
122
|
+
- Contrast ratio: WCAG AA (min 4.5:1)
|
|
123
|
+
|
|
124
|
+
### Responsiveness
|
|
125
|
+
- **Desktop (>1200px)**: Full layout with side panel
|
|
126
|
+
- **Tablet (768-1200px)**: Side panel below table
|
|
127
|
+
- **Mobile (<768px)**: Vertical stack, table with horizontal scroll
|
|
128
|
+
|
|
129
|
+
### Validation
|
|
130
|
+
- Describe any form validation rules present in the view
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Important Reminders
|
|
137
|
+
- **All files and folders in English** (e.g., `user-list-figma-analysis.md`, not localized names)
|
|
138
|
+
- **All module names in English** (e.g., `{{MODULE_PATH}}/users/`, not localized module names)
|
|
139
|
+
- **All component names in English** (e.g., `UserListView.vue`, not localized component names)
|
|
140
|
+
- **Translate mockup labels** to English technical names (e.g., "Uzytkownicy" -> `users`)
|
|
141
|
+
- **Keep translations in i18n keys** (e.g., `user.list.title` - "Lista uzytkownikow")
|
|
142
|
+
- **Analysis file location**: `{{MODULE_PATH}}/analysis/[view-name]-figma-analysis.md`
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Variables
|
|
147
|
+
|
|
148
|
+
- `{{MODULE_PATH}}` - path to the module directory (e.g., `src/modules/[module-name]`)
|
|
149
|
+
- `{{COMPONENT_LIB_PATH}}` - path to the shared component library (e.g., `src/components`)
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
This prompt enables automatic analysis of Figma views via MCP screenshot, without saving images to the repository. Analysis is performed directly on the image, resulting in a detailed .md file with complete technical specification of the view, all in English for code structure while preserving original language for user-facing translations.
|
|
154
|
+
|
|
155
|
+
---
|