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.
Files changed (74) hide show
  1. package/README.md +489 -0
  2. package/bin/cli.mjs +35 -0
  3. package/lib/installer.mjs +495 -0
  4. package/lib/questions.mjs +332 -0
  5. package/lib/ui.mjs +76 -0
  6. package/lib/utils.mjs +231 -0
  7. package/package.json +26 -0
  8. package/templates/base/CLAUDE.md +34 -0
  9. package/templates/base/_ai/_guidelines_header.md +70 -0
  10. package/templates/base/_ai/context/README.md +20 -0
  11. package/templates/base/_ai/prompts/codereview.prompt.md +324 -0
  12. package/templates/base/_ai/prompts/duplicate-code-analysis.prompt.md +128 -0
  13. package/templates/base/_ai/prompts/figma-analysis.prompt.md +155 -0
  14. package/templates/base/_ai/prompts/security-review.prompt.md +46 -0
  15. package/templates/base/_ai/skills/README.md +80 -0
  16. package/templates/base/_ai/skills/TEMPLATE.md +106 -0
  17. package/templates/base/_ai/skills/babysit-prs/SKILL.md +105 -0
  18. package/templates/base/_ai/skills/debug/SKILL.md +93 -0
  19. package/templates/base/_ai/skills/fill-worklogs/SKILL.md +158 -0
  20. package/templates/base/_ai/skills/hotfix/SKILL.md +52 -0
  21. package/templates/base/_ai/skills/jira-task/SKILL.md +170 -0
  22. package/templates/base/_ai/skills/my-prs/SKILL.md +78 -0
  23. package/templates/base/_ai/skills/pr-dashboard/SKILL.md +43 -0
  24. package/templates/base/_ai/skills/pr-prepare/SKILL.md +106 -0
  25. package/templates/base/_ai/skills/refactor/SKILL.md +87 -0
  26. package/templates/base/_ai/skills/write-tests/SKILL.md +109 -0
  27. package/templates/base/_claude/settings.local.json +37 -0
  28. package/templates/base/_cursor/rules/global.mdc +7 -0
  29. package/templates/base/_editorconfig +18 -0
  30. package/templates/base/_gemini/settings.json +3 -0
  31. package/templates/base/_github/copilot-instructions.md +1 -0
  32. package/templates/base/_github/pull_request_template.md +23 -0
  33. package/templates/base/_gitignore +22 -0
  34. package/templates/base/_junie/guidelines.md +1 -0
  35. package/templates/base/commit-instructions.md +92 -0
  36. package/templates/packs/docker/_ai/instructions/docker.instructions.md +193 -0
  37. package/templates/packs/docker/_guidelines.md +10 -0
  38. package/templates/packs/docker/pack.json +8 -0
  39. package/templates/packs/laravel/_ai/instructions/api-resource.instructions.md +251 -0
  40. package/templates/packs/laravel/_ai/instructions/module.instructions.md +133 -0
  41. package/templates/packs/laravel/_ai/instructions/service-repository.instructions.md +215 -0
  42. package/templates/packs/laravel/_ai/instructions/testing.instructions.md +278 -0
  43. package/templates/packs/laravel/_ai/skills/migration/SKILL.md +172 -0
  44. package/templates/packs/laravel/_ai/skills/new-endpoint/SKILL.md +165 -0
  45. package/templates/packs/laravel/_ai/skills/new-module/SKILL.md +208 -0
  46. package/templates/packs/laravel/_ai/skills/queued-job/SKILL.md +248 -0
  47. package/templates/packs/laravel/_ai/skills/testing-feature/SKILL.md +196 -0
  48. package/templates/packs/laravel/_ai/skills/testing-manual/SKILL.md +186 -0
  49. package/templates/packs/laravel/_ai/skills/testing-unit/SKILL.md +200 -0
  50. package/templates/packs/laravel/_guidelines.md +25 -0
  51. package/templates/packs/laravel/pack.json +6 -0
  52. package/templates/packs/playwright/_ai/instructions/playwright.instructions.md +219 -0
  53. package/templates/packs/playwright/_ai/skills/playwright/README.md +194 -0
  54. package/templates/packs/playwright/_ai/skills/playwright/SKILL.md +1245 -0
  55. package/templates/packs/playwright/_ai/skills/playwright-codereview/SKILL.md +642 -0
  56. package/templates/packs/playwright/_ai/skills/playwright-record/README.md +87 -0
  57. package/templates/packs/playwright/_ai/skills/playwright-record/SKILL.md +564 -0
  58. package/templates/packs/playwright/_guidelines.md +12 -0
  59. package/templates/packs/playwright/pack.json +9 -0
  60. package/templates/packs/storybook/_ai/instructions/storybook.instructions.md +181 -0
  61. package/templates/packs/storybook/pack.json +6 -0
  62. package/templates/packs/vitest/_ai/instructions/vitest.instructions.md +688 -0
  63. package/templates/packs/vitest/pack.json +6 -0
  64. package/templates/packs/vue3/_ai/instructions/api.instructions.md +163 -0
  65. package/templates/packs/vue3/_ai/instructions/coding-conventions.instructions.md +160 -0
  66. package/templates/packs/vue3/_ai/instructions/composables.instructions.md +218 -0
  67. package/templates/packs/vue3/_ai/instructions/forms.instructions.md +227 -0
  68. package/templates/packs/vue3/_ai/instructions/store.instructions.md +504 -0
  69. package/templates/packs/vue3/_ai/instructions/vue.instructions.md +339 -0
  70. package/templates/packs/vue3/_ai/skills/api-integration/SKILL.md +195 -0
  71. package/templates/packs/vue3/_ai/skills/new-component/SKILL.md +133 -0
  72. package/templates/packs/vue3/_ai/skills/new-module/SKILL.md +177 -0
  73. package/templates/packs/vue3/_guidelines.md +45 -0
  74. package/templates/packs/vue3/pack.json +11 -0
@@ -0,0 +1,177 @@
1
+ # Skill: New Module (Vue 3 + TypeScript)
2
+
3
+ ## Trigger
4
+ Use when creating a new feature module from scratch.
5
+
6
+ ## Input
7
+ - Module name (e.g. "users", "notifications")
8
+ - API endpoints (if any)
9
+ - Key entities/types
10
+
11
+ ## Steps
12
+
13
+ ### 1. Create directory structure
14
+
15
+ ```
16
+ {{MODULE_PATH}}[module-name]/
17
+ ├── components/ # Module-specific components
18
+ ├── composables/ # Module composables
19
+ │ ├── use[Module]Form.ts
20
+ │ └── use[Module]Filters.ts
21
+ ├── services/ # API services
22
+ │ └── [Module].service.ts
23
+ ├── types/ # TypeScript types
24
+ │ └── [module].types.ts
25
+ ├── views/ # Route views
26
+ │ ├── [Module]ListView.vue
27
+ │ └── [Module]DetailView.vue
28
+ ├── [module].store.ts # Pinia store
29
+ └── [module].routes.ts # Route definitions
30
+ ```
31
+
32
+ ### 2. Define types
33
+
34
+ ```typescript
35
+ // types/[module].types.ts
36
+ export interface I[Entity] {
37
+ id: number;
38
+ // ... entity fields
39
+ createdAt: string;
40
+ updatedAt: string;
41
+ }
42
+
43
+ export interface I[Entity]Create {
44
+ // ... create payload (without id, timestamps)
45
+ }
46
+
47
+ export interface I[Entity]Update {
48
+ // ... update payload
49
+ }
50
+
51
+ export type T[Entity]Status = 'active' | 'inactive' | 'draft';
52
+
53
+ export interface I[Entity]Filters {
54
+ search?: string;
55
+ status?: T[Entity]Status;
56
+ page: number;
57
+ limit: number;
58
+ }
59
+ ```
60
+
61
+ ### 3. Create API service
62
+
63
+ ```typescript
64
+ // services/[Module].service.ts
65
+ import { useApi } from '@/composables/useApi';
66
+ import type { I[Entity], I[Entity]Create, I[Entity]Update } from '../types/[module].types';
67
+
68
+ const api = useApi();
69
+ const BASE = '{{API_BASE_URL}}/[module]';
70
+
71
+ const [Module]Service = {
72
+ getAll: (params?: Record<string, unknown>) => api.get<I[Entity][]>(BASE, { params }),
73
+ getById: (id: number) => api.get<I[Entity]>(`${BASE}/${id}`),
74
+ create: (data: I[Entity]Create) => api.post<I[Entity]>(BASE, data),
75
+ update: (id: number, data: I[Entity]Update) => api.put<I[Entity]>(`${BASE}/${id}`, data),
76
+ delete: (id: number) => api.delete<void>(`${BASE}/${id}`),
77
+ };
78
+
79
+ export default [Module]Service;
80
+ ```
81
+
82
+ ### 4. Create Pinia store
83
+
84
+ ```typescript
85
+ // [module].store.ts
86
+ import { defineStore } from 'pinia';
87
+ import { ref, computed } from 'vue';
88
+ import [Module]Service from './services/[Module].service';
89
+ import type { I[Entity], I[Entity]Filters } from './types/[module].types';
90
+
91
+ export const use[Module]Store = defineStore('[module]', () => {
92
+ const items = ref<I[Entity][]>([]);
93
+ const loading = ref(false);
94
+ const currentItem = ref<I[Entity] | null>(null);
95
+ const filters = ref<I[Entity]Filters>({ page: 1, limit: 20 });
96
+
97
+ const total = computed(() => items.value.length);
98
+
99
+ async function fetchAll() {
100
+ loading.value = true;
101
+ try {
102
+ const { data } = await [Module]Service.getAll(filters.value);
103
+ items.value = data;
104
+ } finally {
105
+ loading.value = false;
106
+ }
107
+ }
108
+
109
+ async function fetchById(id: number) {
110
+ loading.value = true;
111
+ try {
112
+ const { data } = await [Module]Service.getById(id);
113
+ currentItem.value = data;
114
+ } finally {
115
+ loading.value = false;
116
+ }
117
+ }
118
+
119
+ return { items, loading, currentItem, filters, total, fetchAll, fetchById };
120
+ });
121
+ ```
122
+
123
+ ### 5. Create composables
124
+
125
+ Create `use[Module]Form.ts` (form logic) and `use[Module]Filters.ts` (filter/search logic).
126
+ Follow patterns from `composables.instructions.md`.
127
+
128
+ ### 6. Create views
129
+
130
+ - `[Module]ListView.vue` - list with filters, pagination
131
+ - `[Module]DetailView.vue` - detail/edit view
132
+
133
+ Each view should use composables, not direct API calls.
134
+
135
+ ### 7. Define routes
136
+
137
+ ```typescript
138
+ // [module].routes.ts
139
+ import type { RouteRecordRaw } from 'vue-router';
140
+
141
+ const routes: RouteRecordRaw[] = [
142
+ {
143
+ path: '/[module]',
144
+ name: '[module].list',
145
+ component: () => import('./views/[Module]ListView.vue'),
146
+ meta: { title: '[Module]' },
147
+ },
148
+ {
149
+ path: '/[module]/:id',
150
+ name: '[module].detail',
151
+ component: () => import('./views/[Module]DetailView.vue'),
152
+ meta: { title: '[Module] Detail' },
153
+ },
154
+ ];
155
+
156
+ export default routes;
157
+ ```
158
+
159
+ ### 8. Create tests
160
+
161
+ - Unit test for store
162
+ - Unit test for composables
163
+ - Component test for views (mount + basic assertions)
164
+ - Follow `vitest.instructions.md` patterns
165
+
166
+ ### 9. Verification checklist
167
+
168
+ - [ ] Types defined with `I` prefix
169
+ - [ ] Service uses functional pattern
170
+ - [ ] Store uses composition API syntax
171
+ - [ ] Composables follow `use[Name]` naming
172
+ - [ ] Views use composables, not direct service calls
173
+ - [ ] Routes use lazy loading (`() => import(...)`)
174
+ - [ ] All files have TypeScript strict types
175
+ - [ ] Tests created for store, composables, views
176
+ - [ ] No `console.log` in code
177
+ - [ ] `data-testid` on interactive elements
@@ -0,0 +1,45 @@
1
+
2
+
3
+ ---
4
+
5
+ ## Vue 3 + TypeScript
6
+
7
+ **Architecture**: Modular structure with `{{MODULE_PATH}}` — `components/`, `store/`, `service/`, `types/`, `views/` per feature.
8
+
9
+ ### Core Principles
10
+ - **Components (.vue)**: Visual layer only — NO business logic
11
+ - **Composables (`useXxx`)**: All business logic
12
+ - **Stores (Pinia)**: State management only — no API calls
13
+ - **Services**: API calls — ALWAYS functional pattern, NEVER classes
14
+
15
+ ### Service Pattern
16
+ ```typescript
17
+ export const MyService = () => {
18
+ const apiInstance = api();
19
+ const getData = async (): Promise<IData> => {
20
+ const response = await apiInstance.get('endpoint');
21
+ return response.data;
22
+ };
23
+ return { getData };
24
+ };
25
+ ```
26
+
27
+ ### Code Standards
28
+ - **Strict TypeScript** — never use `any`
29
+ - Interfaces: `I` prefix (`IUserForm`), Enums: `E` prefix (`EUserRole`)
30
+ - CSS classes: single-dash (`.notification-item-content`), NOT BEM
31
+ - `data-testid`: camelCase values
32
+ - No `console.log` in production code
33
+ - No empty `<style>` blocks, no HTML comments in templates
34
+ - Use `<script setup lang="ts">` with `withDefaults(defineProps<>())`
35
+
36
+ ### Component Library
37
+ - Use existing components from `{{COMPONENT_LIB_PATH}}`
38
+ - Import: `import { Button } from '{{COMPONENT_LIB_IMPORT}}'`
39
+
40
+ ### API
41
+ - Use project `api()` composable for ALL HTTP requests
42
+ - Prefix `{{API_BASE_URL}}` is auto-applied — never hardcode URLs
43
+
44
+ ### i18n
45
+ - ALL user-facing text MUST use translation keys (`$t('key')`)
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "Vue 3 + TypeScript",
3
+ "description": "Composition API, Pinia, composables, forms, API",
4
+ "default": true,
5
+ "placeholders": {
6
+ "MODULE_PATH": { "question": "Sciezka do modulow", "default": "/src/modules/[feature]/" },
7
+ "COMPONENT_LIB_PATH": { "question": "Sciezka do komponentow UI", "default": "/src/components/" },
8
+ "COMPONENT_LIB_IMPORT": { "question": "Import komponentow", "default": "@/components" },
9
+ "API_BASE_URL": { "question": "Bazowy URL API", "default": "/api/v4" }
10
+ }
11
+ }