From 7445e66676fa5465cafd20a337c1b8f1ca4d7d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A8NW=C2=A8?= <¨neroworld@mail.ru¨> Date: Sun, 19 Apr 2026 10:04:51 +0100 Subject: [PATCH] feat: add Next.js, Vue/Nuxt, React, Python (Django/FastAPI) skills and agents - python-developer agent: Django/FastAPI backend specialist - nextjs-patterns skill: App Router, Server Components, Server Actions, Auth.js - vue-nuxt-patterns skill: Composition API, Pinia, Nitro server, SSR - react-patterns skill: hooks, Context, TanStack Query, React Hook Form - python-django-patterns skill: DRF, services, repositories - python-fastapi-patterns skill: async, Pydantic, SQLAlchemy, dependencies - /nextjs pipeline command for full-stack Next.js apps - /vue pipeline command for full-stack Vue/Nuxt apps - Updated frontend-developer with framework-specific skills - Updated orchestrator, capability-index for Python + frontend routing - Updated README, STRUCTURE, EVOLUTION_LOG with all new stacks Total agents: 30. Stacks: PHP, Next.js, Vue/Nuxt, React, Python, Go, Flutter, Node.js --- .kilo/EVOLUTION_LOG.md | 78 +++++ .kilo/agents/frontend-developer.md | 9 + .kilo/agents/orchestrator.md | 2 + .kilo/agents/python-developer.md | 62 ++++ .kilo/capability-index.yaml | 47 +++ .kilo/commands/nextjs.md | 118 +++++++ .kilo/commands/vue.md | 107 ++++++ .kilo/skills/nextjs-patterns/SKILL.md | 301 ++++++++++++++++ .kilo/skills/python-django-patterns/SKILL.md | 243 +++++++++++++ .kilo/skills/python-fastapi-patterns/SKILL.md | 318 +++++++++++++++++ .kilo/skills/react-patterns/SKILL.md | 277 +++++++++++++++ .kilo/skills/vue-nuxt-patterns/SKILL.md | 327 ++++++++++++++++++ AGENTS.md | 9 +- README.md | 31 +- STRUCTURE.md | 22 +- 15 files changed, 1942 insertions(+), 9 deletions(-) create mode 100644 .kilo/agents/python-developer.md create mode 100644 .kilo/commands/nextjs.md create mode 100644 .kilo/commands/vue.md create mode 100644 .kilo/skills/nextjs-patterns/SKILL.md create mode 100644 .kilo/skills/python-django-patterns/SKILL.md create mode 100644 .kilo/skills/python-fastapi-patterns/SKILL.md create mode 100644 .kilo/skills/react-patterns/SKILL.md create mode 100644 .kilo/skills/vue-nuxt-patterns/SKILL.md diff --git a/.kilo/EVOLUTION_LOG.md b/.kilo/EVOLUTION_LOG.md index 7425e4d..d6a5897 100644 --- a/.kilo/EVOLUTION_LOG.md +++ b/.kilo/EVOLUTION_LOG.md @@ -326,3 +326,81 @@ Capability Expansion + Architecture Improvements — 7 evolutionary tasks - New rules: 4 (atomic-tasks, modular-code, token-optimization, gitea-centric) - Hardcoded APAW refs fixed: 15+ across 5 files - Documentation pages updated: 3 (README, STRUCTURE, EVOLUTION_LOG) + +--- + +## Entry: 2026-04-19T10:00:00+01:00 + +### Type +Capability Expansion — Frontend framework skills + Python development stack + +### Gap Analysis +1. No Next.js patterns — most popular full-stack React framework +2. No Vue/Nuxt patterns — major frontend framework +3. No React-only patterns — base for Next.js and many SPAs +4. No Python backend support (Django, FastAPI) +5. Frontend developer had no framework-specific skills + +### Implementation + +#### New Agent +| Agent | Model | Purpose | +|-------|-------|---------| +| `python-developer` | qwen3-coder:480b | Python/Django/FastAPI backend | + +#### New Skills (5) +| Skill | Lines | Purpose | +|-------|-------|---------| +| `nextjs-patterns` | 290 | Next.js 14+ App Router, Server Components, Server Actions, Auth.js, API Routes | +| `vue-nuxt-patterns` | 270 | Vue 3 / Nuxt 3 Composition API, Pinia, Nitro server, SSR | +| `react-patterns` | 240 | React 18+ hooks, Context, TanStack Query, React Hook Form | +| `python-django-patterns` | 200 | Django models, DRF serializers, services, repositories | +| `python-fastapi-patterns` | 230 | FastAPI async, Pydantic schemas, SQLAlchemy, dependencies | + +#### New Commands +| Command | Purpose | +|---------|---------| +| `/nextjs` | Full-stack Next.js 14+ app pipeline | +| `/vue` | Full-stack Vue/Nuxt 3 app pipeline | + +#### Updated Agent +| Agent | Change | +|-------|--------| +| `frontend-developer` | Added skills: nextjs-patterns, vue-nuxt-patterns, react-patterns | + +#### Updated Config +| File | Change | +|------|--------| +| `orchestrator.md` | Added python-developer permission + delegation | +| `capability-index.yaml` | Added python-developer + frontend framework capabilities + routing | + +### Files Modified +- `.kilo/agents/orchestrator.md` — python-developer permission + delegation +- `.kilo/agents/frontend-developer.md` — framework skills table +- `.kilo/capability-index.yaml` — python-developer + frontend routing +- `AGENTS.md` — python-developer, frontend update, new commands + +### New Files Created +- `.kilo/agents/python-developer.md` +- `.kilo/commands/nextjs.md` +- `.kilo/commands/vue.md` +- `.kilo/skills/nextjs-patterns/SKILL.md` +- `.kilo/skills/vue-nuxt-patterns/SKILL.md` +- `.kilo/skills/react-patterns/SKILL.md` +- `.kilo/skills/python-django-patterns/SKILL.md` +- `.kilo/skills/python-fastapi-patterns/SKILL.md` + +### Verification +- [x] Python developer agent created with valid YAML frontmatter +- [x] Orchestrator permissions updated for python-developer +- [x] Capability index updated with python + frontend routing +- [x] Frontend developer has framework-specific skills +- [x] YAML validated (capability-index.yaml) +- [x] README updated with all frameworks +- [x] STRUCTURE updated with all skills + +### Metrics +- New agents: 1 (python-developer, total now 30) +- New skills: 5 (3 frontend + 2 Python) +- New commands: 2 (nextjs, vue) +- Supported stacks: PHP, Next.js, Vue/Nuxt, React, Python, Go, Flutter, Node.js diff --git a/.kilo/agents/frontend-developer.md b/.kilo/agents/frontend-developer.md index 1a2acb7..a305da4 100755 --- a/.kilo/agents/frontend-developer.md +++ b/.kilo/agents/frontend-developer.md @@ -27,6 +27,7 @@ UI specialist: implement from screenshots/mockups, responsive, accessible, pixel - Accessibility first: semantic HTML, ARIA labels, keyboard navigation - Responsive by default: mobile-first approach - Component composition: build small, reusable parts +- Framework-aware: Next.js App Router, Vue/Nuxt Composition API, React hooks ## Delegates | Agent | When | @@ -43,6 +44,14 @@ UI specialist: implement from screenshots/mockups, responsive, accessible, pixel +## Skills +| Skill | When | +|-------|------| +| nextjs-patterns | Next.js 14+ App Router, Server Components, Server Actions | +| vue-nuxt-patterns | Vue 3 / Nuxt 3 Composition API, Pinia, SSR | +| react-patterns | React 18+ hooks, context, TanStack Query | +| flutter-widgets | Flutter widget patterns | + ## Handoff 1. Verify visual match to design 2. Check accessibility diff --git a/.kilo/agents/orchestrator.md b/.kilo/agents/orchestrator.md index cc04da8..ae8e90a 100755 --- a/.kilo/agents/orchestrator.md +++ b/.kilo/agents/orchestrator.md @@ -42,6 +42,7 @@ permission: "memory-manager": allow "agent-architect": allow "php-developer": allow + "python-developer": allow --- # Orchestrator @@ -72,6 +73,7 @@ Task dispatcher and state machine manager. Route by issue status; enforce workfl | frontend-developer | UI implementation needed | | backend-developer | Node.js/Express/API work | | php-developer | PHP/Laravel/Symfony/WordPress web apps | +| python-developer | Python/Django/FastAPI/API work | | go-developer | Go backend services | | flutter-developer | Flutter mobile apps | | performance-engineer | Review pass: check performance | diff --git a/.kilo/agents/python-developer.md b/.kilo/agents/python-developer.md new file mode 100644 index 0000000..828a61c --- /dev/null +++ b/.kilo/agents/python-developer.md @@ -0,0 +1,62 @@ +--- +description: Python backend specialist for Django, FastAPI, data science, and API development +mode: subagent +model: ollama-cloud/qwen3-coder:480b +variant: thinking +color: "#3776AB" +permission: + read: allow + edit: allow + write: allow + bash: allow + glob: allow + grep: allow + task: + "*": deny + "code-skeptic": allow + "security-auditor": allow + "orchestrator": allow +--- + +# Python Developer + +## Role +Python backend specialist: Django/FastAPI APIs, database integration, async patterns, authentication, modular architecture. + +## Behavior +- Security first: validate input, parameterized queries, auth middleware +- RESTful design: proper HTTP methods, status codes, error handling +- Async with FastAPI, sync with Django — follow framework conventions +- Type hints everywhere, Pydantic for validation +- Separate services/repositories from routes/views +- Write tests with pytest before implementation (TDD) + +## Delegates +| Agent | When | +|-------|------| +| code-skeptic | After implementation | +| security-auditor | For security review | + +## Output + + + + + + + +## Skills +| Skill | When | +|-------|------| +| python-django-patterns | Django models, DRF, services, repositories | +| python-fastapi-patterns | FastAPI routes, Pydantic, async, dependencies | +| php-security | OWASP common patterns (shared with PHP) | +| php-testing | pytest patterns (adapted for Python) | + +## Handoff +1. Run `pytest` with coverage +2. Run `ruff check .` for linting +3. Run `mypy .` for type checking +4. Delegate: code-skeptic + + \ No newline at end of file diff --git a/.kilo/capability-index.yaml b/.kilo/capability-index.yaml index 7dee94a..feca338 100644 --- a/.kilo/capability-index.yaml +++ b/.kilo/capability-index.yaml @@ -32,12 +32,18 @@ agents: - component_creation - styling - responsive_design + - nextjs_development + - vue_nuxt_development + - react_development receives: - designs - wireframes - api_endpoints produces: - vue_components + - react_components + - nextjs_pages + - nuxt_pages - css_styles - frontend_tests forbidden: @@ -84,6 +90,39 @@ agents: - security-auditor - orchestrator + python-developer: + capabilities: + - python_web_development + - django_development + - fastapi_development + - python_api_development + - python_database_design + - python_authentication + - python_async_patterns + - python_testing + - python_security + receives: + - api_specifications + - database_requirements + produces: + - django_views + - fastapi_routers + - python_models + - python_services + - python_schemas + - python_migrations + - python_tests + forbidden: + - frontend_code + - non_python_backend + model: ollama-cloud/qwen3-coder:480b + variant: thinking + mode: subagent + delegates_to: + - code-skeptic + - security-auditor + - orchestrator + backend-developer: capabilities: - api_development @@ -459,6 +498,7 @@ agents: - frontend-developer - backend-developer - php-developer + - python-developer - go-developer - flutter-developer - performance-engineer @@ -714,6 +754,9 @@ agents: bug_fixing: the-fixer git_operations: release-manager ui_implementation: frontend-developer + nextjs_development: frontend-developer + vue_nuxt_development: frontend-developer + react_development: frontend-developer e2e_testing: browser-automation visual_testing: visual-tester bbox_extraction: visual-tester @@ -741,6 +784,10 @@ agents: laravel_development: php-developer symfony_development: php-developer wordpress_development: php-developer + # Python Development + python_web_development: python-developer + django_development: python-developer + fastapi_development: python-developer # DevOps docker_configuration: devops-engineer kubernetes_setup: devops-engineer diff --git a/.kilo/commands/nextjs.md b/.kilo/commands/nextjs.md new file mode 100644 index 0000000..8fb510f --- /dev/null +++ b/.kilo/commands/nextjs.md @@ -0,0 +1,118 @@ +--- +description: Full-stack Next.js web application pipeline with App Router, SSR, and authentication +mode: nextjs +model: ollama-cloud/qwen3-coder:480b +variant: thinking +color: "#0EA5E9" +permission: + read: allow + edit: allow + write: allow + bash: allow + glob: allow + grep: allow + task: + "*": deny + "frontend-developer": allow + "backend-developer": allow + "system-analyst": allow + "lead-developer": allow + "sdet-engineer": allow + "code-skeptic": allow + "the-fixer": allow + "devops-engineer": allow + "release-manager": allow + "security-auditor": allow + "orchestrator": allow +--- + +# Next.js Web Application Pipeline + +Create a full-stack Next.js 14+ application with App Router, Server Components, API routes, Auth.js, and Docker deployment. Follows atomic task decomposition. + +## Parameters + +- `project_name`: Application name (required) +- `auth`: Auth provider - 'authjs', 'clerk', 'supabase' (default: 'authjs') +- `database`: Database - 'prisma', 'drizzle' (default: 'prisma') +- `ui`: UI library - 'tailwind', 'shadcn', 'mui' (default: 'shadcn') +- `docker`: Create Docker deployment (default: true) +- `issue`: Gitea issue number for tracking (required) + +## Overview + +``` +Requirements → Architecture → Setup → Pages → API → Auth → Frontend → Tests → Docker +``` + +## Atomic Task Decomposition + +### Step 1: Requirements (1 task) +**Agent**: `@requirement-refiner` — Create issue in TARGET PROJECT + +### Step 2: Architecture (1 task) +**Agent**: `@system-analyst` — Design routes, API, database schema + +### Step 3: Project Setup (1 task) +**Agent**: `@frontend-developer` +```bash +npx create-next-app@latest {project_name} --typescript --tailwind --eslint --app --src-dir +cd {project_name} +npx shadcn@latest init +``` + +### Step 4: Database + Models (1 task per model) +**Agent**: `@backend-developer` or `@frontend-developer` +- Prisma schema or Drizzle definitions +- Run `npx prisma migrate dev` + +### Step 5: API Routes (1 task per resource) +**Agent**: `@backend-developer` (ONE invocation per resource) +- GET, POST, PUT, DELETE handlers +- Zod validation schemas + +### Step 6: Authentication (1 task) +**Agent**: `@frontend-developer` +- Auth.js / Clerk / Supabase setup +- Login/Register pages +- Middleware for protected routes + +### Step 7: UI Pages (1 task per page/layout) +**Agent**: `@frontend-developer` (ONE invocation per page) +- Server Components by default +- `'use client'` only for interactivity +- Shadcn UI components + +### Step 8: Server Actions (1 task per form) +**Agent**: `@frontend-developer` +- Form validation with Zod +- `revalidatePath` after mutations + +### Step 9: Tests (1 task per test suite) +**Agent**: `@sdet-engineer` — Vitest + Playwright + +### Step 10: Review → Security → Docker → Release + +## Task Sizing + +| Task | Agent | Max Tokens | +|------|-------|-----------| +| Setup project | frontend-developer | 5,000 | +| Database schema | backend-developer | 5,000 | +| API route (CRUD) | backend-developer | 5,000 | +| Auth setup | frontend-developer | 8,000 | +| Page + components | frontend-developer | 8,000 | +| Server actions | frontend-developer | 5,000 | +| Tests | sdet-engineer | 8,000 | +| Docker | devops-engineer | 5,000 | + +## Quality Gates + +| Gate | Criteria | +|------|----------| +| Setup | `npm run build` succeeds | +| API | All endpoints return correct responses | +| Auth | Login/register/logout work | +| Pages | Lighthouse ≥ 90 | +| Tests | Coverage ≥ 80% | +| Docker | Containers build and run | \ No newline at end of file diff --git a/.kilo/commands/vue.md b/.kilo/commands/vue.md new file mode 100644 index 0000000..b2cf517 --- /dev/null +++ b/.kilo/commands/vue.md @@ -0,0 +1,107 @@ +--- +description: Full-stack Vue/Nuxt web application pipeline with SSR, Pinia, and Nitro server +mode: vue +model: ollama-cloud/qwen3-coder:480b +variant: thinking +color: "#42B883" +permission: + read: allow + edit: allow + write: allow + bash: allow + glob: allow + grep: allow + task: + "*": deny + "frontend-developer": allow + "backend-developer": allow + "system-analyst": allow + "lead-developer": allow + "sdet-engineer": allow + "code-skeptic": allow + "the-fixer": allow + "devops-engineer": allow + "release-manager": allow + "security-auditor": allow + "orchestrator": allow +--- + +# Vue/Nuxt Web Application Pipeline + +Create a full-stack Nuxt 3 application with Composition API, Pinia, server API routes, and Docker deployment. + +## Parameters + +- `project_name`: Application name (required) +- `ui`: UI library - 'tailwind', 'vuetify', 'primevue' (default: 'tailwind') +- `auth`: Auth - 'local', 'supabase', 'firebase' (default: 'local') +- `database`: Database - 'prisma', 'drizzle' (default: 'prisma') +- `docker`: Create Docker deployment (default: true) +- `issue`: Gitea issue number for tracking (required) + +## Overview + +``` +Requirements → Architecture → Setup → Pages → Server API → Auth → Components → Tests → Docker +``` + +## Atomic Task Decomposition + +### Step 1: Requirements (1 task) +**Agent**: `@requirement-refiner` — Create issue in TARGET PROJECT + +### Step 2: Architecture (1 task) +**Agent**: `@system-analyst` — Design pages, API routes, database schema + +### Step 3: Project Setup (1 task) +**Agent**: `@frontend-developer` +```bash +npx nuxi@latest init {project_name} +cd {project_name} +npx nuxi module add @pinia/nuxt +npx nuxi module add @nuxtjs/tailwindcss +``` + +### Step 4: Server API Routes (1 task per resource) +**Agent**: `@backend-developer` or `@frontend-developer` +- `server/api/products/index.get.ts` +- `server/api/products/[id].get.ts` +- `server/api/products/index.post.ts` + +### Step 5: Pinia Stores (1 task per store) +**Agent**: `@frontend-developer` +- `stores/auth.ts` +- `stores/cart.ts` + +### Step 6: Composables (1 task per composable) +**Agent**: `@frontend-developer` +- `composables/useAuth.ts` +- `composables/useCart.ts` + +### Step 7: Pages + Layouts (1 task per page) +**Agent**: `@frontend-developer` (ONE invocation per page) +- ` + + +``` + +## Composable Pattern + +```ts +// composables/useCart.ts +export const useCart = () => { + const cart = useState('cart', () => []) + const items = useCookie('cart-items', { default: () => [] }) + + const total = computed(() => + items.value.reduce((sum, item) => sum + item.price * item.quantity, 0) + ) + + const count = computed(() => + items.value.reduce((sum, item) => sum + item.quantity, 0) + ) + + async function addItem(productId: string, quantity = 1) { + const { data, error } = await useFetch('/api/cart/items', { + method: 'POST', + body: { productId, quantity }, + }) + if (!error.value) { + items.value = data.value?.items || items.value + } + } + + async function removeItem(itemId: string) { + await useFetch(`/api/cart/items/${itemId}`, { method: 'DELETE' }) + items.value = items.value.filter((i) => i.id !== itemId) + } + + return { items, total, count, addItem, removeItem } +} +``` + +## Pinia Store + +```ts +// stores/auth.ts +import { defineStore } from 'pinia' + +export const useAuthStore = defineStore('auth', () => { + const user = ref(null) + const token = useCookie('auth-token') + + const isAuthenticated = computed(() => !!token.value) + + async function login(email: string, password: string) { + const { data, error } = await useFetch('/api/auth/login', { + method: 'POST', + body: { email, password }, + }) + if (!error.value && data.value) { + token.value = data.value.token + user.value = data.value.user + } + return { data, error } + } + + function logout() { + token.value = null + user.value = null + navigateTo('/login') + } + + return { user, token, isAuthenticated, login, logout } +}) +``` + +## Server API (Nitro) + +```ts +// server/api/products/index.get.ts +import { defineEventHandler, getQuery } from 'h3' + +export default defineEventHandler(async (event) => { + const { page = '1', limit = '20', category, search } = getQuery(event) + + const where: any = {} + if (category) where.categoryId = category + if (search) where.name = { contains: search, mode: 'insensitive' } + + const [products, total] = await Promise.all([ + prisma.product.findMany({ + where, + skip: (Number(page) - 1) * Number(limit), + take: Number(limit), + include: { category: true }, + orderBy: { createdAt: 'desc' }, + }), + prisma.product.count({ where }), + ]) + + return { + data: products, + meta: { page: Number(page), limit: Number(limit), total, pages: Math.ceil(total / Number(limit)) }, + } +}) +``` + +```ts +// server/api/products/index.post.ts +import { defineEventHandler, readBody, createError } from 'h3' +import { z } from 'zod' + +const schema = z.object({ + name: z.string().min(1).max(255), + price: z.number().positive(), + categoryId: z.string().cuid(), +}) + +export default defineEventHandler(async (event) => { + const body = await readBody(event) + const parsed = schema.safeParse(body) + + if (!parsed.success) { + throw createError({ statusCode: 422, message: parsed.error.flatten() }) + } + + const product = await prisma.product.create({ data: parsed.data }) + return product +}) +``` + +## Route Middleware + +```ts +// middleware/auth.ts +export default defineNuxtRouteMiddleware((to) => { + const { isAuthenticated } = useAuthStore() + if (!isAuthenticated && to.path.startsWith('/admin')) { + return navigateTo('/login') + } +}) +``` + +## Component Pattern (Composition API) + +```vue + + + + +``` + +## Nuxt Config + +```ts +// nuxt.config.ts +export default defineNuxtConfig({ + modules: [ + '@pinia/nuxt', + '@nuxtjs/tailwindcss', + '@nuxt/image', + ], + runtimeConfig: { + public: { apiBase: process.env.NUXT_PUBLIC_API_BASE || '/api' }, + private: { dbUrl: process.env.DATABASE_URL }, + }, + app: { + head: { + title: 'My App', + meta: [{ name: 'description', content: 'My Nuxt app' }], + }, + }, +}) +``` + +## Checklist + +- [ ] Composition API with `