@totaland/create-starter-kit 2.0.1 → 2.0.2
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 +27 -3
- package/bin/index.js +88 -30
- package/package.json +1 -1
- package/templates/backend/.github/agents/ /360/237/216/255 planner.agent.md" +0 -92
- package/templates/backend/.github/agents/api-architect.agent.md +0 -41
- package/templates/backend/.github/agents/code-reviewer.agent.md +0 -26
- package/templates/backend/.github/agents/code-simplifier.agent.md +0 -41
- package/templates/backend/.github/agents/code-skeptic.agent.md +0 -74
- package/templates/backend/.github/agents/docs-specialist.agent.md +0 -25
- package/templates/backend/.github/agents/implementation-plan.agent.md +0 -160
- package/templates/backend/.github/agents/janitor.agent.md +0 -90
- package/templates/backend/.github/agents/ms-sql-dba.agent.md +0 -25
- package/templates/backend/.github/agents/plan.agent.md +0 -115
- package/templates/backend/.github/agents/planner.agent.md +0 -15
- package/templates/backend/.github/agents/playwright-tester.agent.md +0 -13
- package/templates/backend/.github/agents/postgresql-dba.agent.md +0 -18
- package/templates/backend/.github/agents/prd.agent.md +0 -202
- package/templates/backend/.github/agents/research-technical-spike.agent.md +0 -170
- package/templates/backend/.github/agents/software-engineer-agent-v1.agent.md +0 -165
- package/templates/backend/.github/agents/task-planner.agent.md +0 -375
- package/templates/backend/.github/agents/task-researcher.agent.md +0 -255
- package/templates/backend/.github/agents/tdd-green.agent.md +0 -60
- package/templates/backend/.github/agents/tdd-red.agent.md +0 -60
- package/templates/backend/.github/agents/tdd-refactor.agent.md +0 -85
- package/templates/backend/.github/agents/tech-debt-remediation-plan.agent.md +0 -50
- package/templates/backend/.github/agents/typescript-mcp-expert.agent.md +0 -91
- package/templates/backend/.github/agents/ultimate-thinking-beastmode.agent.md +0 -644
- package/templates/backend/.github/agents//360/237/216/255 generator.agent.md" +0 -264
- package/templates/backend/.github/agents//360/237/216/255 healer.agent.md" +0 -44
- package/templates/backend/.github/agents//360/237/216/255 pom.agent.md" +0 -308
- package/templates/backend/.github/instructions/a11y.instructions.md +0 -369
- package/templates/backend/.github/instructions/ms-sql-dba.instructions.md +0 -25
- package/templates/backend/.github/instructions/object-calisthenics.instructions.md +0 -302
- package/templates/backend/.github/instructions/performance-optimization.instructions.md +0 -420
- package/templates/backend/.github/instructions/playwright-python.instructions.md +0 -62
- package/templates/backend/.github/instructions/playwright-typescript.instructions.md +0 -86
- package/templates/backend/.github/instructions/security-and-owasp.instructions.md +0 -51
- package/templates/backend/.github/instructions/self-explanatory-code-commenting.instructions.md +0 -162
- package/templates/backend/.github/instructions/spec-driven-workflow-v1.instructions.md +0 -323
- package/templates/backend/.github/instructions/sql-sp-generation.instructions.md +0 -74
- package/templates/backend/.github/instructions/task-implementation.instructions.md +0 -190
- package/templates/backend/.github/instructions/typescript-mcp-server.instructions.md +0 -228
- package/templates/backend/.github/prompts/ai-prompt-engineering-safety-review.prompt.md +0 -229
- package/templates/backend/.github/prompts/architecture-blueprint-generator.prompt.md +0 -321
- package/templates/backend/.github/prompts/breakdown-epic-arch.prompt.md +0 -65
- package/templates/backend/.github/prompts/breakdown-epic-pm.prompt.md +0 -57
- package/templates/backend/.github/prompts/breakdown-feature-implementation.prompt.md +0 -127
- package/templates/backend/.github/prompts/breakdown-feature-prd.prompt.md +0 -60
- package/templates/backend/.github/prompts/breakdown-plan.prompt.md +0 -508
- package/templates/backend/.github/prompts/copilot-instructions-blueprint-generator.prompt.md +0 -293
- package/templates/backend/.github/prompts/create-agentsmd.prompt.md +0 -248
- package/templates/backend/.github/prompts/create-github-issue-feature-from-specification.prompt.md +0 -27
- package/templates/backend/.github/prompts/create-github-issues-feature-from-implementation-plan.prompt.md +0 -27
- package/templates/backend/.github/prompts/create-github-issues-for-unmet-specification-requirements.prompt.md +0 -35
- package/templates/backend/.github/prompts/create-implementation-plan.prompt.md +0 -156
- package/templates/backend/.github/prompts/create-llms.prompt.md +0 -209
- package/templates/backend/.github/prompts/create-specification.prompt.md +0 -126
- package/templates/backend/.github/prompts/create-technical-spike.prompt.md +0 -230
- package/templates/backend/.github/prompts/csharp-nunit.prompt.md +0 -71
- package/templates/backend/.github/prompts/ef-core.prompt.md +0 -76
- package/templates/backend/.github/prompts/folder-structure-blueprint-generator.prompt.md +0 -404
- package/templates/backend/.github/prompts/gen-specs-as-issues.prompt.md +0 -165
- package/templates/backend/.github/prompts/generate-custom-instructions-from-codebase.prompt.md +0 -239
- package/templates/backend/.github/prompts/java-junit.prompt.md +0 -64
- package/templates/backend/.github/prompts/memory-merger.prompt.md +0 -107
- package/templates/backend/.github/prompts/multi-stage-dockerfile.prompt.md +0 -46
- package/templates/backend/.github/prompts/playwright-automation-fill-in-form.prompt.md +0 -29
- package/templates/backend/.github/prompts/playwright-explore-website.prompt.md +0 -19
- package/templates/backend/.github/prompts/playwright-generate-test.prompt.md +0 -19
- package/templates/backend/.github/prompts/postgresql-code-review.prompt.md +0 -214
- package/templates/backend/.github/prompts/postgresql-optimization.prompt.md +0 -406
- package/templates/backend/.github/prompts/project-workflow-analysis-blueprint-generator.prompt.md +0 -294
- package/templates/backend/.github/prompts/prompt-builder.prompt.md +0 -142
- package/templates/backend/.github/prompts/remember.prompt.md +0 -125
- package/templates/backend/.github/prompts/review-and-refactor.prompt.md +0 -15
- package/templates/backend/.github/prompts/sql-code-review.prompt.md +0 -303
- package/templates/backend/.github/prompts/sql-optimization.prompt.md +0 -298
- package/templates/backend/.github/prompts/suggest-awesome-github-copilot-agents.prompt.md +0 -72
- package/templates/backend/.github/prompts/suggest-awesome-github-copilot-chatmodes.prompt.md +0 -71
- package/templates/backend/.github/prompts/suggest-awesome-github-copilot-collections.prompt.md +0 -149
- package/templates/backend/.github/prompts/suggest-awesome-github-copilot-instructions.prompt.md +0 -88
- package/templates/backend/.github/prompts/suggest-awesome-github-copilot-prompts.prompt.md +0 -71
- package/templates/backend/.github/prompts/technology-stack-blueprint-generator.prompt.md +0 -242
- package/templates/backend/.github/prompts/typescript-mcp-server-generator.prompt.md +0 -90
- package/templates/backend/.github/prompts/update-implementation-plan.prompt.md +0 -157
- package/templates/backend/.github/prompts/update-markdown-file-index.prompt.md +0 -76
- package/templates/backend/Project_Folders_Structure_Blueprint.md +0 -529
- package/templates/backend/README.md +0 -99
- package/templates/backend/biome.json +0 -45
- package/templates/backend/drizzle.config.ts +0 -10
- package/templates/backend/knip.json +0 -10
- package/templates/backend/package.json +0 -60
- package/templates/backend/playwright.config.ts +0 -16
- package/templates/backend/pnpm-lock.yaml +0 -4240
- package/templates/backend/pnpm-workspace.yaml +0 -3
- package/templates/backend/src/features/health/controller.ts +0 -5
- package/templates/backend/src/features/health/health.test.ts +0 -23
- package/templates/backend/src/features/health/index.ts +0 -7
- package/templates/backend/src/features/health/schemas.ts +0 -29
- package/templates/backend/src/features/orders/controller.ts +0 -18
- package/templates/backend/src/features/orders/index.ts +0 -10
- package/templates/backend/src/features/orders/schemas.ts +0 -62
- package/templates/backend/src/index.ts +0 -43
- package/templates/backend/src/lib/openapi.ts +0 -25
- package/templates/backend/src/lib/validateRequest.test.ts +0 -84
- package/templates/backend/src/lib/validateRequest.ts +0 -72
- package/templates/backend/tsconfig.build.json +0 -10
- package/templates/backend/tsconfig.json +0 -30
- package/templates/backend/vitest.config.ts +0 -31
- package/templates/frontend/.env.example +0 -7
- package/templates/frontend/.github/agents/ /360/237/216/255 planner.agent.md" +0 -92
- package/templates/frontend/.github/agents/api-architect.agent.md +0 -41
- package/templates/frontend/.github/agents/code-reviewer.agent.md +0 -26
- package/templates/frontend/.github/agents/code-simplifier.agent.md +0 -41
- package/templates/frontend/.github/agents/code-skeptic.agent.md +0 -74
- package/templates/frontend/.github/agents/docs-specialist.agent.md +0 -25
- package/templates/frontend/.github/agents/implementation-plan.agent.md +0 -160
- package/templates/frontend/.github/agents/janitor.agent.md +0 -90
- package/templates/frontend/.github/agents/ms-sql-dba.agent.md +0 -25
- package/templates/frontend/.github/agents/plan.agent.md +0 -115
- package/templates/frontend/.github/agents/planner.agent.md +0 -15
- package/templates/frontend/.github/agents/playwright-tester.agent.md +0 -13
- package/templates/frontend/.github/agents/postgresql-dba.agent.md +0 -18
- package/templates/frontend/.github/agents/prd.agent.md +0 -202
- package/templates/frontend/.github/agents/research-technical-spike.agent.md +0 -170
- package/templates/frontend/.github/agents/software-engineer-agent-v1.agent.md +0 -165
- package/templates/frontend/.github/agents/task-planner.agent.md +0 -375
- package/templates/frontend/.github/agents/task-researcher.agent.md +0 -255
- package/templates/frontend/.github/agents/tdd-green.agent.md +0 -60
- package/templates/frontend/.github/agents/tdd-red.agent.md +0 -60
- package/templates/frontend/.github/agents/tdd-refactor.agent.md +0 -85
- package/templates/frontend/.github/agents/tech-debt-remediation-plan.agent.md +0 -50
- package/templates/frontend/.github/agents/typescript-mcp-expert.agent.md +0 -91
- package/templates/frontend/.github/agents/ultimate-thinking-beastmode.agent.md +0 -644
- package/templates/frontend/.github/agents//360/237/216/255 generator.agent.md" +0 -264
- package/templates/frontend/.github/agents//360/237/216/255 healer.agent.md" +0 -44
- package/templates/frontend/.github/agents//360/237/216/255 pom.agent.md" +0 -308
- package/templates/frontend/.github/instructions/a11y.instructions.md +0 -369
- package/templates/frontend/.github/instructions/ms-sql-dba.instructions.md +0 -25
- package/templates/frontend/.github/instructions/object-calisthenics.instructions.md +0 -302
- package/templates/frontend/.github/instructions/performance-optimization.instructions.md +0 -420
- package/templates/frontend/.github/instructions/playwright-python.instructions.md +0 -62
- package/templates/frontend/.github/instructions/playwright-typescript.instructions.md +0 -86
- package/templates/frontend/.github/instructions/security-and-owasp.instructions.md +0 -51
- package/templates/frontend/.github/instructions/self-explanatory-code-commenting.instructions.md +0 -162
- package/templates/frontend/.github/instructions/spec-driven-workflow-v1.instructions.md +0 -323
- package/templates/frontend/.github/instructions/sql-sp-generation.instructions.md +0 -74
- package/templates/frontend/.github/instructions/task-implementation.instructions.md +0 -190
- package/templates/frontend/.github/instructions/typescript-mcp-server.instructions.md +0 -228
- package/templates/frontend/.github/prompts/ai-prompt-engineering-safety-review.prompt.md +0 -229
- package/templates/frontend/.github/prompts/architecture-blueprint-generator.prompt.md +0 -321
- package/templates/frontend/.github/prompts/breakdown-epic-arch.prompt.md +0 -65
- package/templates/frontend/.github/prompts/breakdown-epic-pm.prompt.md +0 -57
- package/templates/frontend/.github/prompts/breakdown-feature-implementation.prompt.md +0 -127
- package/templates/frontend/.github/prompts/breakdown-feature-prd.prompt.md +0 -60
- package/templates/frontend/.github/prompts/breakdown-plan.prompt.md +0 -508
- package/templates/frontend/.github/prompts/copilot-instructions-blueprint-generator.prompt.md +0 -293
- package/templates/frontend/.github/prompts/create-agentsmd.prompt.md +0 -248
- package/templates/frontend/.github/prompts/create-github-issue-feature-from-specification.prompt.md +0 -27
- package/templates/frontend/.github/prompts/create-github-issues-feature-from-implementation-plan.prompt.md +0 -27
- package/templates/frontend/.github/prompts/create-github-issues-for-unmet-specification-requirements.prompt.md +0 -35
- package/templates/frontend/.github/prompts/create-implementation-plan.prompt.md +0 -156
- package/templates/frontend/.github/prompts/create-llms.prompt.md +0 -209
- package/templates/frontend/.github/prompts/create-specification.prompt.md +0 -126
- package/templates/frontend/.github/prompts/create-technical-spike.prompt.md +0 -230
- package/templates/frontend/.github/prompts/csharp-nunit.prompt.md +0 -71
- package/templates/frontend/.github/prompts/ef-core.prompt.md +0 -76
- package/templates/frontend/.github/prompts/folder-structure-blueprint-generator.prompt.md +0 -404
- package/templates/frontend/.github/prompts/gen-specs-as-issues.prompt.md +0 -165
- package/templates/frontend/.github/prompts/generate-custom-instructions-from-codebase.prompt.md +0 -239
- package/templates/frontend/.github/prompts/java-junit.prompt.md +0 -64
- package/templates/frontend/.github/prompts/memory-merger.prompt.md +0 -107
- package/templates/frontend/.github/prompts/multi-stage-dockerfile.prompt.md +0 -46
- package/templates/frontend/.github/prompts/playwright-automation-fill-in-form.prompt.md +0 -29
- package/templates/frontend/.github/prompts/playwright-explore-website.prompt.md +0 -19
- package/templates/frontend/.github/prompts/playwright-generate-test.prompt.md +0 -19
- package/templates/frontend/.github/prompts/postgresql-code-review.prompt.md +0 -214
- package/templates/frontend/.github/prompts/postgresql-optimization.prompt.md +0 -406
- package/templates/frontend/.github/prompts/project-workflow-analysis-blueprint-generator.prompt.md +0 -294
- package/templates/frontend/.github/prompts/prompt-builder.prompt.md +0 -142
- package/templates/frontend/.github/prompts/remember.prompt.md +0 -125
- package/templates/frontend/.github/prompts/review-and-refactor.prompt.md +0 -15
- package/templates/frontend/.github/prompts/sql-code-review.prompt.md +0 -303
- package/templates/frontend/.github/prompts/sql-optimization.prompt.md +0 -298
- package/templates/frontend/.github/prompts/suggest-awesome-github-copilot-agents.prompt.md +0 -72
- package/templates/frontend/.github/prompts/suggest-awesome-github-copilot-chatmodes.prompt.md +0 -71
- package/templates/frontend/.github/prompts/suggest-awesome-github-copilot-collections.prompt.md +0 -149
- package/templates/frontend/.github/prompts/suggest-awesome-github-copilot-instructions.prompt.md +0 -88
- package/templates/frontend/.github/prompts/suggest-awesome-github-copilot-prompts.prompt.md +0 -71
- package/templates/frontend/.github/prompts/technology-stack-blueprint-generator.prompt.md +0 -242
- package/templates/frontend/.github/prompts/typescript-mcp-server-generator.prompt.md +0 -90
- package/templates/frontend/.github/prompts/update-implementation-plan.prompt.md +0 -157
- package/templates/frontend/.github/prompts/update-markdown-file-index.prompt.md +0 -76
- package/templates/frontend/README.md +0 -199
- package/templates/frontend/biome.json +0 -45
- package/templates/frontend/components.json +0 -22
- package/templates/frontend/index.html +0 -13
- package/templates/frontend/package.json +0 -44
- package/templates/frontend/pnpm-lock.yaml +0 -2011
- package/templates/frontend/postcss.config.js +0 -6
- package/templates/frontend/public/vite.svg +0 -1
- package/templates/frontend/src/App.css +0 -42
- package/templates/frontend/src/App.tsx +0 -17
- package/templates/frontend/src/assets/react.svg +0 -1
- package/templates/frontend/src/components/layout/layout.component.tsx +0 -31
- package/templates/frontend/src/components/menu-toggle-icon.tsx +0 -53
- package/templates/frontend/src/components/ui/button.tsx +0 -57
- package/templates/frontend/src/docs/RECOMMENDED_LIBRARIES.md +0 -226
- package/templates/frontend/src/docs/SETUP_SUMMARY.md +0 -162
- package/templates/frontend/src/hooks/use-scroll.ts +0 -21
- package/templates/frontend/src/index.css +0 -121
- package/templates/frontend/src/lib/api-client.ts +0 -46
- package/templates/frontend/src/lib/utils.ts +0 -6
- package/templates/frontend/src/main.tsx +0 -30
- package/templates/frontend/src/pages/about/about.page.tsx +0 -50
- package/templates/frontend/src/pages/home/home.page.tsx +0 -43
- package/templates/frontend/tailwind.config.js +0 -59
- package/templates/frontend/tsconfig.app.json +0 -41
- package/templates/frontend/tsconfig.json +0 -13
- package/templates/frontend/tsconfig.node.json +0 -26
- package/templates/frontend/vite.config.ts +0 -14
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { vi } from 'vitest';
|
|
2
|
-
import type { Request, Response } from 'ultimate-express';
|
|
3
|
-
import { getHealth } from './controller.js';
|
|
4
|
-
|
|
5
|
-
// Simple ISO-8601 with offset matcher (aligned with schema)
|
|
6
|
-
const isoWithOffset =
|
|
7
|
-
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})$/;
|
|
8
|
-
|
|
9
|
-
describe('GET /api/health', () => {
|
|
10
|
-
it('returns ok status and timestamp', () => {
|
|
11
|
-
const json = vi.fn();
|
|
12
|
-
const res = { json } as unknown as Response;
|
|
13
|
-
const req = {} as Request;
|
|
14
|
-
|
|
15
|
-
getHealth(req, res);
|
|
16
|
-
|
|
17
|
-
expect(json).toHaveBeenCalledTimes(1);
|
|
18
|
-
const payload = json.mock.calls[0][0] as { status: string; timestamp: string };
|
|
19
|
-
|
|
20
|
-
expect(payload).toMatchObject({ status: 'ok' });
|
|
21
|
-
expect(payload.timestamp).toMatch(isoWithOffset);
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { registry } from '../../lib/openapi.js';
|
|
3
|
-
|
|
4
|
-
const isoDateTimeWithOffset = z
|
|
5
|
-
.string()
|
|
6
|
-
.regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})$/, 'Invalid datetime');
|
|
7
|
-
|
|
8
|
-
export const HealthResponseSchema = z
|
|
9
|
-
.object({
|
|
10
|
-
status: z.literal('ok'),
|
|
11
|
-
timestamp: isoDateTimeWithOffset,
|
|
12
|
-
})
|
|
13
|
-
.openapi('HealthResponse');
|
|
14
|
-
|
|
15
|
-
registry.registerPath({
|
|
16
|
-
method: 'get',
|
|
17
|
-
path: '/api/health',
|
|
18
|
-
tags: ['Health'],
|
|
19
|
-
responses: {
|
|
20
|
-
200: {
|
|
21
|
-
description: 'Health check',
|
|
22
|
-
content: {
|
|
23
|
-
'application/json': {
|
|
24
|
-
schema: HealthResponseSchema,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { RequestHandler } from 'ultimate-express';
|
|
2
|
-
import type { z } from 'zod';
|
|
3
|
-
import type { ValidatedRequest } from '../../lib/validateRequest.js';
|
|
4
|
-
import { CreateOrderSchema } from './schemas.js';
|
|
5
|
-
|
|
6
|
-
type CreateOrderInput = z.infer<typeof CreateOrderSchema>;
|
|
7
|
-
|
|
8
|
-
export const getOrders: RequestHandler = (_req, res) => {
|
|
9
|
-
res.json([
|
|
10
|
-
{ id: 1, item: 'Laptop', price: 1200 },
|
|
11
|
-
{ id: 2, item: 'Mouse', price: 25 },
|
|
12
|
-
]);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const createOrder: RequestHandler<any, any, CreateOrderInput> = (req, res) => {
|
|
16
|
-
const { item, price } = (req as ValidatedRequest<{ body: CreateOrderInput }>).validated.body;
|
|
17
|
-
res.status(201).json({ id: 3, item, price });
|
|
18
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Router } from 'ultimate-express';
|
|
2
|
-
import { validateRequest } from '../../lib/validateRequest.js';
|
|
3
|
-
import { createOrder, getOrders } from './controller.js';
|
|
4
|
-
import { CreateOrderSchema } from './schemas.js';
|
|
5
|
-
|
|
6
|
-
// TODO: replace with real implementation
|
|
7
|
-
export const ordersRouter = Router();
|
|
8
|
-
|
|
9
|
-
ordersRouter.get('/', getOrders);
|
|
10
|
-
ordersRouter.post('/', validateRequest({ body: CreateOrderSchema }), createOrder);
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { registry } from '../../lib/openapi.js';
|
|
3
|
-
|
|
4
|
-
export const OrderSchema = z
|
|
5
|
-
.object({
|
|
6
|
-
id: z.number().int().positive(),
|
|
7
|
-
item: z.string().min(1),
|
|
8
|
-
price: z.number().positive(),
|
|
9
|
-
})
|
|
10
|
-
.openapi('Order');
|
|
11
|
-
|
|
12
|
-
export const CreateOrderSchema = z
|
|
13
|
-
.object({
|
|
14
|
-
item: z.string().min(1),
|
|
15
|
-
price: z.number().positive(),
|
|
16
|
-
})
|
|
17
|
-
.openapi('CreateOrder');
|
|
18
|
-
|
|
19
|
-
registry.registerPath({
|
|
20
|
-
method: 'get',
|
|
21
|
-
path: '/api/orders',
|
|
22
|
-
tags: ['Orders'],
|
|
23
|
-
responses: {
|
|
24
|
-
200: {
|
|
25
|
-
description: 'List all orders',
|
|
26
|
-
content: {
|
|
27
|
-
'application/json': {
|
|
28
|
-
schema: z.array(OrderSchema),
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
registry.registerPath({
|
|
36
|
-
method: 'post',
|
|
37
|
-
path: '/api/orders',
|
|
38
|
-
tags: ['Orders'],
|
|
39
|
-
request: {
|
|
40
|
-
body: {
|
|
41
|
-
required: true,
|
|
42
|
-
content: {
|
|
43
|
-
'application/json': {
|
|
44
|
-
schema: CreateOrderSchema,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
responses: {
|
|
50
|
-
201: {
|
|
51
|
-
description: 'Created order',
|
|
52
|
-
content: {
|
|
53
|
-
'application/json': {
|
|
54
|
-
schema: OrderSchema,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
400: {
|
|
59
|
-
description: 'Validation error',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// example backend with ultimate-express
|
|
2
|
-
import 'dotenv/config';
|
|
3
|
-
import express from 'ultimate-express';
|
|
4
|
-
import type { Request, Response } from 'ultimate-express';
|
|
5
|
-
import cors from 'cors';
|
|
6
|
-
import { ordersRouter } from './features/orders/index.js';
|
|
7
|
-
import { healthRouter } from './features/health/index.js';
|
|
8
|
-
import { apiReference } from '@scalar/express-api-reference';
|
|
9
|
-
import { generateOpenApiDocument } from './lib/openapi.js';
|
|
10
|
-
|
|
11
|
-
const app = express();
|
|
12
|
-
|
|
13
|
-
app.use(cors());
|
|
14
|
-
app.use(express.json());
|
|
15
|
-
|
|
16
|
-
app.get('/', (req: Request, res: Response) => {
|
|
17
|
-
res.send('Hello, Ultimate Express!');
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// Mount feature routes
|
|
21
|
-
app.use('/api/orders', ordersRouter);
|
|
22
|
-
app.use('/api/health', healthRouter);
|
|
23
|
-
|
|
24
|
-
// API Documentation with Scalar
|
|
25
|
-
app.use(
|
|
26
|
-
'/api/docs',
|
|
27
|
-
apiReference({
|
|
28
|
-
spec: {
|
|
29
|
-
url: '/openapi.json',
|
|
30
|
-
},
|
|
31
|
-
}),
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
// Example OpenAPI spec endpoint
|
|
35
|
-
app.get('/openapi.json', (req: Request, res: Response) => {
|
|
36
|
-
res.json(generateOpenApiDocument());
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const PORT = process.env.PORT || 3000;
|
|
40
|
-
app.listen(PORT, () => {
|
|
41
|
-
console.log(`Server is running on http://localhost:${PORT}`);
|
|
42
|
-
console.log(`API Documentation available at http://localhost:${PORT}/api/docs`);
|
|
43
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { OpenAPIRegistry, OpenApiGeneratorV3, extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
extendZodWithOpenApi(z);
|
|
5
|
-
|
|
6
|
-
export const registry = new OpenAPIRegistry();
|
|
7
|
-
|
|
8
|
-
export const generateOpenApiDocument = () => {
|
|
9
|
-
const generator = new OpenApiGeneratorV3(registry.definitions);
|
|
10
|
-
|
|
11
|
-
return generator.generateDocument({
|
|
12
|
-
openapi: '3.1.0',
|
|
13
|
-
info: {
|
|
14
|
-
title: 'Ultimate Express API',
|
|
15
|
-
version: '1.0.0',
|
|
16
|
-
description: 'API documentation generated from Zod schemas',
|
|
17
|
-
},
|
|
18
|
-
servers: [
|
|
19
|
-
{
|
|
20
|
-
url: `http://localhost:${process.env.PORT || 3000}`,
|
|
21
|
-
description: 'Development server',
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
});
|
|
25
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import type { NextFunction, Request, Response } from 'ultimate-express';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { validateRequest } from './validateRequest.js';
|
|
5
|
-
|
|
6
|
-
const createRes = () => {
|
|
7
|
-
const json = vi.fn();
|
|
8
|
-
const status = vi.fn().mockReturnValue({ json });
|
|
9
|
-
return { json, status } as unknown as Response;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
describe('validateRequest', () => {
|
|
13
|
-
it('parses and assigns validated data, then calls next', () => {
|
|
14
|
-
const middleware = validateRequest({
|
|
15
|
-
body: z.object({
|
|
16
|
-
id: z.coerce.number().int(),
|
|
17
|
-
name: z.string().transform((v) => v.trim()),
|
|
18
|
-
}),
|
|
19
|
-
query: z.object({
|
|
20
|
-
page: z.coerce.number().default(1),
|
|
21
|
-
}),
|
|
22
|
-
params: z.object({
|
|
23
|
-
slug: z.string().min(1),
|
|
24
|
-
}),
|
|
25
|
-
headers: z.object({
|
|
26
|
-
'x-trace': z.string().uuid(),
|
|
27
|
-
}),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
const req = {
|
|
31
|
-
body: { id: '42', name: ' Alice ' },
|
|
32
|
-
query: {},
|
|
33
|
-
params: { slug: 'hello' },
|
|
34
|
-
headers: { 'x-trace': '550e8400-e29b-41d4-a716-446655440000' },
|
|
35
|
-
} as unknown as Request;
|
|
36
|
-
const res = createRes();
|
|
37
|
-
const next = vi.fn() as unknown as NextFunction;
|
|
38
|
-
|
|
39
|
-
middleware(req, res, next);
|
|
40
|
-
|
|
41
|
-
expect(next).toHaveBeenCalledTimes(1);
|
|
42
|
-
const validated = (req as any).validated;
|
|
43
|
-
expect(validated.body).toEqual({ id: 42, name: 'Alice' });
|
|
44
|
-
expect(validated.query).toEqual({ page: 1 });
|
|
45
|
-
expect(validated.params).toEqual({ slug: 'hello' });
|
|
46
|
-
expect(validated.headers).toEqual({ 'x-trace': '550e8400-e29b-41d4-a716-446655440000' });
|
|
47
|
-
|
|
48
|
-
expect(req.body).toEqual({ id: 42, name: 'Alice' });
|
|
49
|
-
expect(req.query).toEqual({ page: 1 });
|
|
50
|
-
expect(req.params).toEqual({ slug: 'hello' });
|
|
51
|
-
expect(req.headers).toEqual({ 'x-trace': '550e8400-e29b-41d4-a716-446655440000' });
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('returns 400 with flattened errors on validation failure', () => {
|
|
55
|
-
const middleware = validateRequest({
|
|
56
|
-
body: z.object({ id: z.number().int() }),
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
const req = { body: { id: 'not-a-number' } } as unknown as Request;
|
|
60
|
-
const res = createRes();
|
|
61
|
-
const next = vi.fn() as unknown as NextFunction;
|
|
62
|
-
|
|
63
|
-
middleware(req, res, next);
|
|
64
|
-
|
|
65
|
-
expect(next).not.toHaveBeenCalled();
|
|
66
|
-
expect(res.status).toHaveBeenCalledWith(400);
|
|
67
|
-
const payload = (res.json as any).mock.calls[0][0] as { errors: unknown };
|
|
68
|
-
expect(payload).toHaveProperty('message', 'Validation error');
|
|
69
|
-
expect(payload.errors).toBeDefined();
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
it('no-op when no schemas provided', () => {
|
|
73
|
-
const middleware = validateRequest({});
|
|
74
|
-
const req = {} as Request;
|
|
75
|
-
const res = createRes();
|
|
76
|
-
const next = vi.fn() as unknown as NextFunction;
|
|
77
|
-
|
|
78
|
-
middleware(req, res, next);
|
|
79
|
-
|
|
80
|
-
expect(next).toHaveBeenCalledTimes(1);
|
|
81
|
-
expect((res as any).status).not.toHaveBeenCalled();
|
|
82
|
-
expect((res as any).json).not.toHaveBeenCalled();
|
|
83
|
-
});
|
|
84
|
-
});
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { NextFunction, Request, Response } from 'ultimate-express';
|
|
2
|
-
import { z, type ZodType } from 'zod';
|
|
3
|
-
|
|
4
|
-
type RequestSchemas = {
|
|
5
|
-
body?: ZodType<unknown>;
|
|
6
|
-
query?: ZodType<unknown>;
|
|
7
|
-
params?: ZodType<unknown>;
|
|
8
|
-
headers?: ZodType<unknown>;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
type ParsedRequest<S extends RequestSchemas> = {
|
|
12
|
-
[K in keyof S]: S[K] extends ZodType<unknown> ? z.infer<S[K]> : never;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type ValidatedRequest<T> = Request & { validated: T };
|
|
16
|
-
|
|
17
|
-
export const validateRequest =
|
|
18
|
-
<S extends RequestSchemas>(schemas: S) =>
|
|
19
|
-
(req: Request, res: Response, next: NextFunction) => {
|
|
20
|
-
const shape: Record<string, ZodType<unknown>> = {};
|
|
21
|
-
const input: Record<string, unknown> = {};
|
|
22
|
-
|
|
23
|
-
if (schemas.body) {
|
|
24
|
-
shape.body = schemas.body;
|
|
25
|
-
input.body = req.body;
|
|
26
|
-
}
|
|
27
|
-
if (schemas.query) {
|
|
28
|
-
shape.query = schemas.query;
|
|
29
|
-
input.query = req.query;
|
|
30
|
-
}
|
|
31
|
-
if (schemas.params) {
|
|
32
|
-
shape.params = schemas.params;
|
|
33
|
-
input.params = req.params;
|
|
34
|
-
}
|
|
35
|
-
if (schemas.headers) {
|
|
36
|
-
shape.headers = schemas.headers;
|
|
37
|
-
input.headers = req.headers;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (Object.keys(shape).length === 0) {
|
|
41
|
-
next();
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const result = z.object(shape).safeParse(input);
|
|
46
|
-
|
|
47
|
-
if (!result.success) {
|
|
48
|
-
res.status(400).json({
|
|
49
|
-
message: 'Validation error',
|
|
50
|
-
errors: result.error.flatten((issue) => issue.message),
|
|
51
|
-
});
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const parsed = result.data as ParsedRequest<S>;
|
|
56
|
-
|
|
57
|
-
if (schemas.body) {
|
|
58
|
-
req.body = parsed.body as typeof req.body;
|
|
59
|
-
}
|
|
60
|
-
if (schemas.query) {
|
|
61
|
-
req.query = parsed.query as typeof req.query;
|
|
62
|
-
}
|
|
63
|
-
if (schemas.params) {
|
|
64
|
-
req.params = parsed.params as typeof req.params;
|
|
65
|
-
}
|
|
66
|
-
if (schemas.headers) {
|
|
67
|
-
req.headers = parsed.headers as typeof req.headers;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
(req as ValidatedRequest<ParsedRequest<S>>).validated = parsed;
|
|
71
|
-
next();
|
|
72
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"outDir": "./build",
|
|
4
|
-
"rootDir": "./",
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"forceConsistentCasingInFileNames": true,
|
|
7
|
-
"lib": ["ESNext", "DOM"],
|
|
8
|
-
"target": "ESNext",
|
|
9
|
-
"module": "ESNext",
|
|
10
|
-
"moduleDetection": "force",
|
|
11
|
-
"allowJs": true,
|
|
12
|
-
"types": ["node", "vitest/globals"],
|
|
13
|
-
|
|
14
|
-
// Node module resolution
|
|
15
|
-
"moduleResolution": "node",
|
|
16
|
-
"noEmit": true,
|
|
17
|
-
|
|
18
|
-
// Best practices
|
|
19
|
-
"strict": true,
|
|
20
|
-
"skipLibCheck": true,
|
|
21
|
-
"noFallthroughCasesInSwitch": true,
|
|
22
|
-
|
|
23
|
-
// Some stricter flags (disabled by default)
|
|
24
|
-
"noUnusedLocals": false,
|
|
25
|
-
"noUnusedParameters": false,
|
|
26
|
-
"noPropertyAccessFromIndexSignature": false
|
|
27
|
-
},
|
|
28
|
-
"include": ["src/**/*", "scripts/**/*"],
|
|
29
|
-
"exclude": ["node_modules"],
|
|
30
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
globals: true,
|
|
6
|
-
environment: 'node',
|
|
7
|
-
include: ['tests/**/*.{test,spec}.{js,ts}', 'src/**/*.{test,spec}.{js,ts}'],
|
|
8
|
-
exclude: ['node_modules', 'build', 'src/generated/tests/**/*'],
|
|
9
|
-
coverage: {
|
|
10
|
-
provider: 'v8',
|
|
11
|
-
reporter: ['text', 'json', 'html'],
|
|
12
|
-
include: ['src/**/*.{ts,js}'],
|
|
13
|
-
exclude: [
|
|
14
|
-
'node_modules/',
|
|
15
|
-
'build/',
|
|
16
|
-
'tests/',
|
|
17
|
-
'*.config.*',
|
|
18
|
-
'src/**/schemas.ts',
|
|
19
|
-
'src/lib/openapi.ts',
|
|
20
|
-
'src/index.ts',
|
|
21
|
-
'src/**/index.ts',
|
|
22
|
-
'src/features/orders/**/*',
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
resolve: {
|
|
27
|
-
alias: {
|
|
28
|
-
'@': '/src',
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
});
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Use this agent when you need to create comprehensive test plan for a web application or website.
|
|
3
|
-
tools: ['edit/createFile', 'edit/createDirectory', 'search/fileSearch', 'search/textSearch', 'search/listDirectory', 'search/readFile', 'playwright-test/browser_click', 'playwright-test/browser_close', 'playwright-test/browser_console_messages', 'playwright-test/browser_drag', 'playwright-test/browser_evaluate', 'playwright-test/browser_file_upload', 'playwright-test/browser_handle_dialog', 'playwright-test/browser_hover', 'playwright-test/browser_navigate', 'playwright-test/browser_navigate_back', 'playwright-test/browser_network_requests', 'playwright-test/browser_press_key', 'playwright-test/browser_select_option', 'playwright-test/browser_snapshot', 'playwright-test/browser_take_screenshot', 'playwright-test/browser_type', 'playwright-test/browser_wait_for', 'playwright-test/planner_setup_page']
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are an expert web test planner with extensive experience in quality assurance, user experience testing, and test
|
|
7
|
-
scenario design. Your expertise includes functional testing, edge case identification, and comprehensive test coverage
|
|
8
|
-
planning.
|
|
9
|
-
|
|
10
|
-
You will:
|
|
11
|
-
|
|
12
|
-
1. **Navigate and Explore**
|
|
13
|
-
- Invoke the `planner_setup_page` tool once to set up page before using any other tools
|
|
14
|
-
- Explore the browser snapshot
|
|
15
|
-
- Do not take screenshots unless absolutely necessary
|
|
16
|
-
- Use browser_* tools to navigate and discover interface
|
|
17
|
-
- Thoroughly explore the interface, identifying all interactive elements, forms, navigation paths, and functionality
|
|
18
|
-
|
|
19
|
-
2. **Analyze User Flows**
|
|
20
|
-
- Map out the primary user journeys and identify critical paths through the application
|
|
21
|
-
- Consider different user types and their typical behaviors
|
|
22
|
-
|
|
23
|
-
3. **Design Comprehensive Scenarios**
|
|
24
|
-
|
|
25
|
-
Create detailed test scenarios that cover:
|
|
26
|
-
- Happy path scenarios (normal user behavior)
|
|
27
|
-
- Edge cases and boundary conditions
|
|
28
|
-
- Error handling and validation
|
|
29
|
-
|
|
30
|
-
4. **Structure Test Plans**
|
|
31
|
-
|
|
32
|
-
Each scenario must include:
|
|
33
|
-
- Clear, descriptive title
|
|
34
|
-
- Detailed step-by-step instructions
|
|
35
|
-
- Expected outcomes where appropriate
|
|
36
|
-
- Assumptions about starting state (always assume blank/fresh state)
|
|
37
|
-
- Success criteria and failure conditions
|
|
38
|
-
|
|
39
|
-
5. **Create Documentation**
|
|
40
|
-
|
|
41
|
-
Save your test plan as requested:
|
|
42
|
-
- Executive summary of the tested page/application
|
|
43
|
-
- Individual scenarios as separate sections
|
|
44
|
-
- Each scenario formatted with numbered steps
|
|
45
|
-
- Clear expected results for verification
|
|
46
|
-
|
|
47
|
-
<example-spec>
|
|
48
|
-
# TodoMVC Application - Comprehensive Test Plan
|
|
49
|
-
|
|
50
|
-
## Application Overview
|
|
51
|
-
|
|
52
|
-
The TodoMVC application is a React-based todo list manager that provides core task management functionality. The
|
|
53
|
-
application features:
|
|
54
|
-
|
|
55
|
-
- **Task Management**: Add, edit, complete, and delete individual todos
|
|
56
|
-
- **Bulk Operations**: Mark all todos as complete/incomplete and clear all completed todos
|
|
57
|
-
- **Filtering**: View todos by All, Active, or Completed status
|
|
58
|
-
- **URL Routing**: Support for direct navigation to filtered views via URLs
|
|
59
|
-
- **Counter Display**: Real-time count of active (incomplete) todos
|
|
60
|
-
- **Persistence**: State maintained during session (browser refresh behavior not tested)
|
|
61
|
-
|
|
62
|
-
## Test Scenarios
|
|
63
|
-
|
|
64
|
-
### 1. Adding New Todos
|
|
65
|
-
|
|
66
|
-
**Seed:** `tests/seed.spec.ts`
|
|
67
|
-
|
|
68
|
-
#### 1.1 Add Valid Todo
|
|
69
|
-
**Steps:**
|
|
70
|
-
1. Click in the "What needs to be done?" input field
|
|
71
|
-
2. Type "Buy groceries"
|
|
72
|
-
3. Press Enter key
|
|
73
|
-
|
|
74
|
-
**Expected Results:**
|
|
75
|
-
- Todo appears in the list with unchecked checkbox
|
|
76
|
-
- Counter shows "1 item left"
|
|
77
|
-
- Input field is cleared and ready for next entry
|
|
78
|
-
- Todo list controls become visible (Mark all as complete checkbox)
|
|
79
|
-
|
|
80
|
-
#### 1.2
|
|
81
|
-
...
|
|
82
|
-
</example-spec>
|
|
83
|
-
|
|
84
|
-
**Quality Standards**:
|
|
85
|
-
- Write steps that are specific enough for any tester to follow
|
|
86
|
-
- Include negative testing scenarios
|
|
87
|
-
- Ensure scenarios are independent and can be run in any order
|
|
88
|
-
|
|
89
|
-
**Output Format**: Always save the complete test plan as a markdown file with clear headings, numbered steps, and
|
|
90
|
-
professional formatting suitable for sharing with development and QA teams.
|
|
91
|
-
<example>Context: User wants to test a new e-commerce checkout flow. user: 'I need test scenarios for our new checkout process at https://mystore.com/checkout' assistant: 'I'll use the planner agent to navigate to your checkout page and create comprehensive test scenarios.' <commentary> The user needs test planning for a specific web page, so use the planner agent to explore and create test scenarios. </commentary></example>
|
|
92
|
-
<example>Context: User has deployed a new feature and wants thorough testing coverage. user: 'Can you help me test our new user dashboard at https://app.example.com/dashboard?' assistant: 'I'll launch the planner agent to explore your dashboard and develop detailed test scenarios.' <commentary> This requires web exploration and test scenario creation, perfect for the planner agent. </commentary></example>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 'Your role is that of an API architect. Help mentor the engineer by providing guidance, support, and working code.'
|
|
3
|
-
model: Claude Opus 4.5 (Preview) (copilot)
|
|
4
|
-
---
|
|
5
|
-
# API Architect mode instructions
|
|
6
|
-
|
|
7
|
-
Your primary goal is to act on the mandatory and optional API aspects outlined below and generate a design and working code for connectivity from a client service to an external service. You are not to start generation until you have the information from the
|
|
8
|
-
developer on how to proceed. The developer will say, "generate" to begin the code generation process. Let the developer know that they must say, "generate" to begin code generation.
|
|
9
|
-
|
|
10
|
-
Your initial output to the developer will be to list the following API aspects and request their input.
|
|
11
|
-
|
|
12
|
-
## The following API aspects will be the consumables for producing a working solution in code:
|
|
13
|
-
|
|
14
|
-
- Coding language (mandatory)
|
|
15
|
-
- API endpoint URL (mandatory)
|
|
16
|
-
- DTOs for the request and response (optional, if not provided a mock will be used)
|
|
17
|
-
- REST methods required, i.e. GET, GET all, PUT, POST, DELETE (at least one method is mandatory; but not all required)
|
|
18
|
-
- API name (optional)
|
|
19
|
-
- Circuit breaker (optional)
|
|
20
|
-
- Bulkhead (optional)
|
|
21
|
-
- Throttling (optional)
|
|
22
|
-
- Backoff (optional)
|
|
23
|
-
- Test cases (optional)
|
|
24
|
-
|
|
25
|
-
## When you respond with a solution follow these design guidelines:
|
|
26
|
-
|
|
27
|
-
- Promote separation of concerns.
|
|
28
|
-
- Create mock request and response DTOs based on API name if not given.
|
|
29
|
-
- Design should be broken out into three layers: service, manager, and resilience.
|
|
30
|
-
- Service layer handles the basic REST requests and responses.
|
|
31
|
-
- Manager layer adds abstraction for ease of configuration and testing and calls the service layer methods.
|
|
32
|
-
- Resilience layer adds required resiliency requested by the developer and calls the manager layer methods.
|
|
33
|
-
- Create fully implemented code for the service layer, no comments or templates in lieu of code.
|
|
34
|
-
- Create fully implemented code for the manager layer, no comments or templates in lieu of code.
|
|
35
|
-
- Create fully implemented code for the resilience layer, no comments or templates in lieu of code.
|
|
36
|
-
- Utilize the most popular resiliency framework for the language requested.
|
|
37
|
-
- Do NOT ask the user to "similarly implement other methods", stub out or add comments for code, but instead implement ALL code.
|
|
38
|
-
- Do NOT write comments about missing resiliency code but instead write code.
|
|
39
|
-
- WRITE working code for ALL layers, NO TEMPLATES.
|
|
40
|
-
- Always favor writing code over comments, templates, and explanations.
|
|
41
|
-
- Use Code Interpreter to complete the code generation process.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Senior engineer focused on deep, constructive code reviews.
|
|
3
|
-
tools: ['search/fileSearch', 'search/textSearch', 'search/listDirectory', 'search/readFile', 'playwright-test/browser_click', 'playwright-test/browser_close', 'playwright-test/browser_console_messages', 'playwright-test/browser_drag', 'playwright-test/browser_evaluate', 'playwright-test/browser_file_upload', 'playwright-test/browser_handle_dialog', 'playwright-test/browser_hover', 'playwright-test/browser_navigate', 'playwright-test/browser_navigate_back', 'playwright-test/browser_network_requests', 'playwright-test/browser_press_key', 'playwright-test/browser_select_option', 'playwright-test/browser_snapshot', 'playwright-test/browser_take_screenshot', 'playwright-test/browser_type', 'playwright-test/browser_wait_for', 'playwright-test/browser_verify_element_visible', 'playwright-test/browser_verify_list_visible', 'playwright-test/browser_verify_text_visible', 'playwright-test/browser_verify_value']
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Code Reviewer
|
|
7
|
-
|
|
8
|
-
You are a senior software engineer conducting thorough code reviews with a focus on code quality, security,
|
|
9
|
-
performance, and long-term maintainability. Provide specific, actionable feedback on every item you inspect.
|
|
10
|
-
|
|
11
|
-
## Review Workflow
|
|
12
|
-
- **Study the context**: Understand the feature goals, architectural constraints, and any linked documentation before
|
|
13
|
-
commenting.
|
|
14
|
-
- **Inspect correctness first**: Ensure logic, error handling, and state transitions behave as intended across happy and
|
|
15
|
-
failure paths.
|
|
16
|
-
- **Assess safety**: Look for security vulnerabilities, data leaks, injection risks, and permission handling flaws.
|
|
17
|
-
- **Evaluate performance**: Call out inefficient algorithms, unnecessary allocations, blocking I/O, and scalability
|
|
18
|
-
risks.
|
|
19
|
-
- **Ensure maintainability**: Examine readability, naming, modularity, test coverage, and adherence to project
|
|
20
|
-
conventions.
|
|
21
|
-
- **Verify UX parity**: When UI changes are involved, use the browser tools to confirm actual rendering and interaction
|
|
22
|
-
quality before approving.
|
|
23
|
-
- **Recommend concrete improvements**: Every piece of feedback should describe why something is risky and propose a
|
|
24
|
-
viable fix or follow-up task.
|
|
25
|
-
|
|
26
|
-
Your output is a concise review organized by severity (critical, major, minor) so the team knows what to address first.
|