@fyow/copilot-everything 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 (33) hide show
  1. package/.github/agents/architect.agent.md +102 -0
  2. package/.github/agents/build-error-resolver.agent.md +119 -0
  3. package/.github/agents/code-reviewer.agent.md +92 -0
  4. package/.github/agents/doc-updater.agent.md +121 -0
  5. package/.github/agents/e2e-runner.agent.md +150 -0
  6. package/.github/agents/planner.agent.md +95 -0
  7. package/.github/agents/refactor-cleaner.agent.md +122 -0
  8. package/.github/agents/security-reviewer.agent.md +129 -0
  9. package/.github/agents/tdd-guide.agent.md +127 -0
  10. package/.github/copilot-instructions.md +68 -0
  11. package/.github/hooks/project-hooks.json +48 -0
  12. package/.github/instructions/coding-style.instructions.md +67 -0
  13. package/.github/instructions/git-workflow.instructions.md +60 -0
  14. package/.github/instructions/performance.instructions.md +52 -0
  15. package/.github/instructions/security.instructions.md +63 -0
  16. package/.github/instructions/testing.instructions.md +55 -0
  17. package/.github/skills/backend-patterns/SKILL.md +582 -0
  18. package/.github/skills/clickhouse-io/SKILL.md +429 -0
  19. package/.github/skills/coding-standards/SKILL.md +520 -0
  20. package/.github/skills/frontend-patterns/SKILL.md +631 -0
  21. package/.github/skills/project-guidelines-example/SKILL.md +350 -0
  22. package/.github/skills/security-review/SKILL.md +494 -0
  23. package/.github/skills/tdd-workflow/SKILL.md +409 -0
  24. package/.github/skills/verification-loop/SKILL.md +125 -0
  25. package/AGENTS.md +81 -0
  26. package/LICENSE +21 -0
  27. package/README.md +185 -0
  28. package/copilot/config.json +5 -0
  29. package/copilot/mcp-config.json +42 -0
  30. package/package.json +47 -0
  31. package/src/cli.js +79 -0
  32. package/src/commands/init.js +212 -0
  33. package/src/index.js +9 -0
@@ -0,0 +1,350 @@
1
+ ---
2
+ name: project-guidelines-example
3
+ description: Example project-specific skill template. Use this as a starting point for creating your own project skills with architecture, patterns, and guidelines.
4
+ ---
5
+
6
+ # Project Guidelines Skill (Example)
7
+
8
+ This is an example of a project-specific skill. Use this as a template for your own projects.
9
+
10
+ Based on a real production application: [Zenith](https://zenith.chat) - AI-powered customer discovery platform.
11
+
12
+ ---
13
+
14
+ ## When to Use
15
+
16
+ Reference this skill when working on the specific project it's designed for. Project skills contain:
17
+ - Architecture overview
18
+ - File structure
19
+ - Code patterns
20
+ - Testing requirements
21
+ - Deployment workflow
22
+
23
+ ---
24
+
25
+ ## Architecture Overview
26
+
27
+ **Tech Stack:**
28
+ - **Frontend**: Next.js 15 (App Router), TypeScript, React
29
+ - **Backend**: FastAPI (Python), Pydantic models
30
+ - **Database**: Supabase (PostgreSQL)
31
+ - **AI**: LLM API with tool calling and structured output
32
+ - **Deployment**: Google Cloud Run
33
+ - **Testing**: Playwright (E2E), pytest (backend), React Testing Library
34
+
35
+ **Services:**
36
+ ```
37
+ ┌─────────────────────────────────────────────────────────────┐
38
+ │ Frontend │
39
+ │ Next.js 15 + TypeScript + TailwindCSS │
40
+ │ Deployed: Vercel / Cloud Run │
41
+ └─────────────────────────────────────────────────────────────┘
42
+
43
+
44
+ ┌─────────────────────────────────────────────────────────────┐
45
+ │ Backend │
46
+ │ FastAPI + Python 3.11 + Pydantic │
47
+ │ Deployed: Cloud Run │
48
+ └─────────────────────────────────────────────────────────────┘
49
+
50
+ ┌───────────────┼───────────────┐
51
+ ▼ ▼ ▼
52
+ ┌──────────┐ ┌──────────┐ ┌──────────┐
53
+ │ Supabase │ │ LLM │ │ Redis │
54
+ │ Database │ │ API │ │ Cache │
55
+ └──────────┘ └──────────┘ └──────────┘
56
+ ```
57
+
58
+ ---
59
+
60
+ ## File Structure
61
+
62
+ ```
63
+ project/
64
+ ├── frontend/
65
+ │ └── src/
66
+ │ ├── app/ # Next.js app router pages
67
+ │ │ ├── api/ # API routes
68
+ │ │ ├── (auth)/ # Auth-protected routes
69
+ │ │ └── workspace/ # Main app workspace
70
+ │ ├── components/ # React components
71
+ │ │ ├── ui/ # Base UI components
72
+ │ │ ├── forms/ # Form components
73
+ │ │ └── layouts/ # Layout components
74
+ │ ├── hooks/ # Custom React hooks
75
+ │ ├── lib/ # Utilities
76
+ │ ├── types/ # TypeScript definitions
77
+ │ └── config/ # Configuration
78
+
79
+ ├── backend/
80
+ │ ├── routers/ # FastAPI route handlers
81
+ │ ├── models.py # Pydantic models
82
+ │ ├── main.py # FastAPI app entry
83
+ │ ├── auth_system.py # Authentication
84
+ │ ├── database.py # Database operations
85
+ │ ├── services/ # Business logic
86
+ │ └── tests/ # pytest tests
87
+
88
+ ├── deploy/ # Deployment configs
89
+ ├── docs/ # Documentation
90
+ └── scripts/ # Utility scripts
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Code Patterns
96
+
97
+ ### API Response Format (FastAPI)
98
+
99
+ ```python
100
+ from pydantic import BaseModel
101
+ from typing import Generic, TypeVar, Optional
102
+
103
+ T = TypeVar('T')
104
+
105
+ class ApiResponse(BaseModel, Generic[T]):
106
+ success: bool
107
+ data: Optional[T] = None
108
+ error: Optional[str] = None
109
+
110
+ @classmethod
111
+ def ok(cls, data: T) -> "ApiResponse[T]":
112
+ return cls(success=True, data=data)
113
+
114
+ @classmethod
115
+ def fail(cls, error: str) -> "ApiResponse[T]":
116
+ return cls(success=False, error=error)
117
+ ```
118
+
119
+ ### Frontend API Calls (TypeScript)
120
+
121
+ ```typescript
122
+ interface ApiResponse<T> {
123
+ success: boolean
124
+ data?: T
125
+ error?: string
126
+ }
127
+
128
+ async function fetchApi<T>(
129
+ endpoint: string,
130
+ options?: RequestInit
131
+ ): Promise<ApiResponse<T>> {
132
+ try {
133
+ const response = await fetch(`/api${endpoint}`, {
134
+ ...options,
135
+ headers: {
136
+ 'Content-Type': 'application/json',
137
+ ...options?.headers,
138
+ },
139
+ })
140
+
141
+ if (!response.ok) {
142
+ return { success: false, error: `HTTP ${response.status}` }
143
+ }
144
+
145
+ return await response.json()
146
+ } catch (error) {
147
+ return { success: false, error: String(error) }
148
+ }
149
+ }
150
+ ```
151
+
152
+ ### LLM AI Integration (Structured Output)
153
+
154
+ ```python
155
+ from anthropic import Anthropic
156
+ from pydantic import BaseModel
157
+
158
+ class AnalysisResult(BaseModel):
159
+ summary: str
160
+ key_points: list[str]
161
+ confidence: float
162
+
163
+ async def analyze_with_llm(content: str) -> AnalysisResult:
164
+ client = Anthropic()
165
+
166
+ response = client.messages.create(
167
+ model="claude-sonnet-4-5-20250514", # Or use OpenAI, etc.
168
+ max_tokens=1024,
169
+ messages=[{"role": "user", "content": content}],
170
+ tools=[{
171
+ "name": "provide_analysis",
172
+ "description": "Provide structured analysis",
173
+ "input_schema": AnalysisResult.model_json_schema()
174
+ }],
175
+ tool_choice={"type": "tool", "name": "provide_analysis"}
176
+ )
177
+
178
+ # Extract tool use result
179
+ tool_use = next(
180
+ block for block in response.content
181
+ if block.type == "tool_use"
182
+ )
183
+
184
+ return AnalysisResult(**tool_use.input)
185
+ ```
186
+
187
+ ### Custom Hooks (React)
188
+
189
+ ```typescript
190
+ import { useState, useCallback } from 'react'
191
+
192
+ interface UseApiState<T> {
193
+ data: T | null
194
+ loading: boolean
195
+ error: string | null
196
+ }
197
+
198
+ export function useApi<T>(
199
+ fetchFn: () => Promise<ApiResponse<T>>
200
+ ) {
201
+ const [state, setState] = useState<UseApiState<T>>({
202
+ data: null,
203
+ loading: false,
204
+ error: null,
205
+ })
206
+
207
+ const execute = useCallback(async () => {
208
+ setState(prev => ({ ...prev, loading: true, error: null }))
209
+
210
+ const result = await fetchFn()
211
+
212
+ if (result.success) {
213
+ setState({ data: result.data!, loading: false, error: null })
214
+ } else {
215
+ setState({ data: null, loading: false, error: result.error! })
216
+ }
217
+ }, [fetchFn])
218
+
219
+ return { ...state, execute }
220
+ }
221
+ ```
222
+
223
+ ---
224
+
225
+ ## Testing Requirements
226
+
227
+ ### Backend (pytest)
228
+
229
+ ```bash
230
+ # Run all tests
231
+ poetry run pytest tests/
232
+
233
+ # Run with coverage
234
+ poetry run pytest tests/ --cov=. --cov-report=html
235
+
236
+ # Run specific test file
237
+ poetry run pytest tests/test_auth.py -v
238
+ ```
239
+
240
+ **Test structure:**
241
+ ```python
242
+ import pytest
243
+ from httpx import AsyncClient
244
+ from main import app
245
+
246
+ @pytest.fixture
247
+ async def client():
248
+ async with AsyncClient(app=app, base_url="http://test") as ac:
249
+ yield ac
250
+
251
+ @pytest.mark.asyncio
252
+ async def test_health_check(client: AsyncClient):
253
+ response = await client.get("/health")
254
+ assert response.status_code == 200
255
+ assert response.json()["status"] == "healthy"
256
+ ```
257
+
258
+ ### Frontend (React Testing Library)
259
+
260
+ ```bash
261
+ # Run tests
262
+ npm run test
263
+
264
+ # Run with coverage
265
+ npm run test -- --coverage
266
+
267
+ # Run E2E tests
268
+ npm run test:e2e
269
+ ```
270
+
271
+ **Test structure:**
272
+ ```typescript
273
+ import { render, screen, fireEvent } from '@testing-library/react'
274
+ import { WorkspacePanel } from './WorkspacePanel'
275
+
276
+ describe('WorkspacePanel', () => {
277
+ it('renders workspace correctly', () => {
278
+ render(<WorkspacePanel />)
279
+ expect(screen.getByRole('main')).toBeInTheDocument()
280
+ })
281
+
282
+ it('handles session creation', async () => {
283
+ render(<WorkspacePanel />)
284
+ fireEvent.click(screen.getByText('New Session'))
285
+ expect(await screen.findByText('Session created')).toBeInTheDocument()
286
+ })
287
+ })
288
+ ```
289
+
290
+ ---
291
+
292
+ ## Deployment Workflow
293
+
294
+ ### Pre-Deployment Checklist
295
+
296
+ - [ ] All tests passing locally
297
+ - [ ] `npm run build` succeeds (frontend)
298
+ - [ ] `poetry run pytest` passes (backend)
299
+ - [ ] No hardcoded secrets
300
+ - [ ] Environment variables documented
301
+ - [ ] Database migrations ready
302
+
303
+ ### Deployment Commands
304
+
305
+ ```bash
306
+ # Build and deploy frontend
307
+ cd frontend && npm run build
308
+ gcloud run deploy frontend --source .
309
+
310
+ # Build and deploy backend
311
+ cd backend
312
+ gcloud run deploy backend --source .
313
+ ```
314
+
315
+ ### Environment Variables
316
+
317
+ ```bash
318
+ # Frontend (.env.local)
319
+ NEXT_PUBLIC_API_URL=https://api.example.com
320
+ NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
321
+ NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...
322
+
323
+ # Backend (.env)
324
+ DATABASE_URL=postgresql://...
325
+ ANTHROPIC_API_KEY=sk-ant-...
326
+ SUPABASE_URL=https://xxx.supabase.co
327
+ SUPABASE_KEY=eyJ...
328
+ ```
329
+
330
+ ---
331
+
332
+ ## Critical Rules
333
+
334
+ 1. **No emojis** in code, comments, or documentation
335
+ 2. **Immutability** - never mutate objects or arrays
336
+ 3. **TDD** - write tests before implementation
337
+ 4. **80% coverage** minimum
338
+ 5. **Many small files** - 200-400 lines typical, 800 max
339
+ 6. **No console.log** in production code
340
+ 7. **Proper error handling** with try/catch
341
+ 8. **Input validation** with Pydantic/Zod
342
+
343
+ ---
344
+
345
+ ## Related Skills
346
+
347
+ - `coding-standards.md` - General coding best practices
348
+ - `backend-patterns.md` - API and database patterns
349
+ - `frontend-patterns.md` - React and Next.js patterns
350
+ - `tdd-workflow/` - Test-driven development methodology