tribunal-kit 4.2.0 → 4.3.1
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/.agent/ARCHITECTURE.md +21 -14
- package/.agent/agents/swarm-worker-contracts.md +5 -5
- package/.agent/agents/ui-ux-auditor.md +292 -0
- package/.agent/rules/GEMINI.md +8 -8
- package/.agent/scripts/__pycache__/_colors.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/_utils.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/case_law_manager.cpython-311.pyc +0 -0
- package/.agent/scripts/_colors.js +18 -0
- package/.agent/scripts/_utils.js +42 -0
- package/.agent/scripts/auto_preview.js +197 -0
- package/.agent/scripts/bundle_analyzer.js +290 -0
- package/.agent/scripts/case_law_manager.js +684 -0
- package/.agent/scripts/checklist.js +266 -0
- package/.agent/scripts/colors.js +17 -0
- package/.agent/scripts/compress_skills.js +141 -0
- package/.agent/scripts/consolidate_skills.js +149 -0
- package/.agent/scripts/context_broker.js +609 -0
- package/.agent/scripts/deep_compress.js +150 -0
- package/.agent/scripts/dependency_analyzer.js +272 -0
- package/.agent/scripts/graph_builder.js +199 -0
- package/.agent/scripts/graph_zoom.js +154 -0
- package/.agent/scripts/inner_loop_validator.js +465 -0
- package/.agent/scripts/lint_runner.js +187 -0
- package/.agent/scripts/minify_context.js +100 -0
- package/.agent/scripts/patch_skills_meta.js +156 -0
- package/.agent/scripts/patch_skills_output.js +244 -0
- package/.agent/scripts/schema_validator.js +297 -0
- package/.agent/scripts/security_scan.js +303 -0
- package/.agent/scripts/session_manager.js +276 -0
- package/.agent/scripts/skill_evolution.js +644 -0
- package/.agent/scripts/skill_integrator.js +313 -0
- package/.agent/scripts/strengthen_skills.js +193 -0
- package/.agent/scripts/strip_tribunal.js +47 -0
- package/.agent/scripts/swarm_dispatcher.js +360 -0
- package/.agent/scripts/test_runner.js +193 -0
- package/.agent/scripts/utils.js +32 -0
- package/.agent/scripts/verify_all.js +256 -0
- package/.agent/skills/agent-organizer/SKILL.md +12 -4
- package/.agent/skills/agentic-patterns/SKILL.md +12 -4
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +12 -4
- package/.agent/skills/api-patterns/SKILL.md +209 -201
- package/.agent/skills/api-security-auditor/SKILL.md +12 -4
- package/.agent/skills/app-builder/SKILL.md +12 -4
- package/.agent/skills/app-builder/templates/SKILL.md +76 -68
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +1 -1
- package/.agent/skills/appflow-wireframe/SKILL.md +12 -4
- package/.agent/skills/architecture/SKILL.md +12 -4
- package/.agent/skills/authentication-best-practices/SKILL.md +12 -4
- package/.agent/skills/bash-linux/SKILL.md +12 -4
- package/.agent/skills/behavioral-modes/SKILL.md +12 -4
- package/.agent/skills/brainstorming/SKILL.md +12 -4
- package/.agent/skills/building-native-ui/SKILL.md +12 -4
- package/.agent/skills/clean-code/SKILL.md +12 -4
- package/.agent/skills/code-review-checklist/SKILL.md +12 -4
- package/.agent/skills/config-validator/SKILL.md +12 -4
- package/.agent/skills/csharp-developer/SKILL.md +12 -4
- package/.agent/skills/data-validation-schemas/SKILL.md +290 -282
- package/.agent/skills/database-design/SKILL.md +202 -194
- package/.agent/skills/deployment-procedures/SKILL.md +12 -4
- package/.agent/skills/devops-engineer/SKILL.md +12 -4
- package/.agent/skills/devops-incident-responder/SKILL.md +12 -4
- package/.agent/skills/doc.md +1 -1
- package/.agent/skills/documentation-templates/SKILL.md +12 -4
- package/.agent/skills/edge-computing/SKILL.md +12 -4
- package/.agent/skills/error-resilience/SKILL.md +390 -382
- package/.agent/skills/extract-design-system/SKILL.md +12 -4
- package/.agent/skills/framer-motion-expert/SKILL.md +206 -199
- package/.agent/skills/frontend-design/SKILL.md +163 -155
- package/.agent/skills/game-design-expert/SKILL.md +12 -4
- package/.agent/skills/game-engineering-expert/SKILL.md +12 -4
- package/.agent/skills/geo-fundamentals/SKILL.md +12 -4
- package/.agent/skills/github-operations/SKILL.md +12 -4
- package/.agent/skills/gsap-core/SKILL.md +54 -48
- package/.agent/skills/gsap-frameworks/SKILL.md +54 -48
- package/.agent/skills/gsap-performance/SKILL.md +54 -48
- package/.agent/skills/gsap-plugins/SKILL.md +54 -48
- package/.agent/skills/gsap-react/SKILL.md +54 -48
- package/.agent/skills/gsap-scrolltrigger/SKILL.md +54 -48
- package/.agent/skills/gsap-timeline/SKILL.md +54 -48
- package/.agent/skills/gsap-utils/SKILL.md +54 -48
- package/.agent/skills/i18n-localization/SKILL.md +12 -4
- package/.agent/skills/intelligent-routing/SKILL.md +41 -33
- package/.agent/skills/knowledge-graph/SKILL.md +36 -0
- package/.agent/skills/lint-and-validate/SKILL.md +12 -4
- package/.agent/skills/llm-engineering/SKILL.md +12 -4
- package/.agent/skills/local-first/SKILL.md +12 -4
- package/.agent/skills/mcp-builder/SKILL.md +12 -4
- package/.agent/skills/mobile-design/SKILL.md +225 -217
- package/.agent/skills/monorepo-management/SKILL.md +296 -288
- package/.agent/skills/motion-engineering/SKILL.md +195 -187
- package/.agent/skills/nextjs-react-expert/SKILL.md +196 -188
- package/.agent/skills/nodejs-best-practices/SKILL.md +12 -4
- package/.agent/skills/observability/SKILL.md +12 -4
- package/.agent/skills/parallel-agents/SKILL.md +12 -4
- package/.agent/skills/performance-profiling/SKILL.md +12 -4
- package/.agent/skills/plan-writing/SKILL.md +12 -4
- package/.agent/skills/platform-engineer/SKILL.md +12 -4
- package/.agent/skills/playwright-best-practices/SKILL.md +12 -4
- package/.agent/skills/powershell-windows/SKILL.md +12 -4
- package/.agent/skills/project-idioms/SKILL.md +12 -4
- package/.agent/skills/python-patterns/SKILL.md +12 -4
- package/.agent/skills/python-pro/SKILL.md +285 -277
- package/.agent/skills/react-specialist/SKILL.md +239 -231
- package/.agent/skills/readme-builder/SKILL.md +12 -4
- package/.agent/skills/realtime-patterns/SKILL.md +12 -4
- package/.agent/skills/red-team-tactics/SKILL.md +12 -4
- package/.agent/skills/rust-pro/SKILL.md +12 -4
- package/.agent/skills/seo-fundamentals/SKILL.md +12 -4
- package/.agent/skills/server-management/SKILL.md +12 -4
- package/.agent/skills/shadcn-ui-expert/SKILL.md +12 -4
- package/.agent/skills/skill-creator/SKILL.md +12 -4
- package/.agent/skills/sql-pro/SKILL.md +12 -4
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +12 -4
- package/.agent/skills/swiftui-expert/SKILL.md +12 -4
- package/.agent/skills/systematic-debugging/SKILL.md +12 -4
- package/.agent/skills/tailwind-patterns/SKILL.md +12 -4
- package/.agent/skills/tdd-workflow/SKILL.md +12 -4
- package/.agent/skills/test-result-analyzer/SKILL.md +12 -4
- package/.agent/skills/testing-patterns/SKILL.md +12 -4
- package/.agent/skills/trend-researcher/SKILL.md +12 -4
- package/.agent/skills/typescript-advanced/SKILL.md +297 -289
- package/.agent/skills/ui-ux-pro-max/SKILL.md +12 -4
- package/.agent/skills/ui-ux-researcher/SKILL.md +12 -4
- package/.agent/skills/vue-expert/SKILL.md +237 -229
- package/.agent/skills/vulnerability-scanner/SKILL.md +12 -4
- package/.agent/skills/web-accessibility-auditor/SKILL.md +12 -4
- package/.agent/skills/web-design-guidelines/SKILL.md +12 -4
- package/.agent/skills/webapp-testing/SKILL.md +12 -4
- package/.agent/skills/whimsy-injector/SKILL.md +12 -4
- package/.agent/skills/workflow-optimizer/SKILL.md +12 -4
- package/.agent/workflows/audit.md +6 -6
- package/.agent/workflows/deploy.md +1 -1
- package/.agent/workflows/generate.md +23 -6
- package/.agent/workflows/session.md +5 -5
- package/.agent/workflows/swarm.md +2 -2
- package/README.md +242 -186
- package/bin/tribunal-kit.js +297 -57
- package/package.json +81 -77
- package/scripts/changelog.js +167 -0
- package/scripts/sync-version.js +81 -0
- package/scripts/validate-payload.js +73 -0
- package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
- package/.agent/scripts/auto_preview.py +0 -180
- package/.agent/scripts/bundle_analyzer.py +0 -259
- package/.agent/scripts/case_law_manager.py +0 -755
- package/.agent/scripts/checklist.py +0 -209
- package/.agent/scripts/compress_skills.py +0 -167
- package/.agent/scripts/consolidate_skills.py +0 -173
- package/.agent/scripts/deep_compress.py +0 -202
- package/.agent/scripts/dependency_analyzer.py +0 -247
- package/.agent/scripts/lint_runner.py +0 -188
- package/.agent/scripts/minify_context.py +0 -80
- package/.agent/scripts/patch_skills_meta.py +0 -177
- package/.agent/scripts/patch_skills_output.py +0 -285
- package/.agent/scripts/schema_validator.py +0 -279
- package/.agent/scripts/security_scan.py +0 -224
- package/.agent/scripts/session_manager.py +0 -261
- package/.agent/scripts/skill_evolution.py +0 -563
- package/.agent/scripts/skill_integrator.py +0 -234
- package/.agent/scripts/strengthen_skills.py +0 -220
- package/.agent/scripts/strip_tribunal.py +0 -41
- package/.agent/scripts/swarm_dispatcher.py +0 -350
- package/.agent/scripts/test_runner.py +0 -192
- package/.agent/scripts/test_swarm_dispatcher.py +0 -163
- package/.agent/scripts/verify_all.py +0 -195
|
@@ -1,192 +1,192 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: nextjs-react-expert
|
|
3
|
-
description: Next.js 15+ App Router mastery. Server Components, Server Actions, PPR, caching, metadata, middleware, parallel/intercepting routes. Use when building Next.js apps or optimizing Next.js performance.
|
|
4
|
-
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version: 3.1.0
|
|
6
|
-
last-updated: 2026-04-06
|
|
7
|
-
applies-to-model: gemini-3-1-pro, claude-3-7-sonnet
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Next.js 15+ App Router — Dense Reference
|
|
11
|
-
|
|
12
|
-
## Hallucination Traps (Read First)
|
|
13
|
-
- ❌ `pages/api/` or `_app.tsx` → ✅ App Router only: `app/api/route.ts`, `app/layout.tsx`
|
|
14
|
-
- ❌ `getServerSideProps` → ✅ `async function Page()` fetches directly
|
|
15
|
-
- ❌ `next/router` → ✅ `next/navigation` (`useRouter`, `usePathname`, `useSearchParams`)
|
|
16
|
-
- ❌ Server Action without `"use server"` → ✅ Required at top of file or top of function
|
|
17
|
-
- ❌ Fetch is cached by default → ✅ **Next.js 15 changed this**: `fetch()` is UNCACHED by default
|
|
18
|
-
- ❌ `cookies()` at top of page → ✅ Opts entire route into dynamic rendering, breaking PPR. Wrap inside `<Suspense>`
|
|
19
|
-
- ❌ Passing functions as props Server → Client → ✅ Illegal. Use Server Actions instead.
|
|
20
|
-
- ❌ Plain `Response` in route handler → ✅ Use `NextResponse.json()`
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## App Router Conventions
|
|
25
|
-
|
|
26
|
-
```text
|
|
27
|
-
app/
|
|
28
|
-
├── layout.tsx ← Root shell (HTML/BODY)
|
|
29
|
-
├── page.tsx ← Route UI
|
|
30
|
-
├── loading.tsx ← Auto-suspense fallback
|
|
31
|
-
├── error.tsx ← Error boundary (Must be "use client")
|
|
32
|
-
├── not-found.tsx ← 404 UI
|
|
33
|
-
├── global-error.tsx ← Root error boundary
|
|
34
|
-
├── api/users/route.ts ← API Handler (GET, POST)
|
|
35
|
-
├── @modal/login/page.tsx ← Parallel Route (renders in same layout)
|
|
36
|
-
└── (auth)/login/page.tsx ← Route Group (doesn't affect URL)
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## Server vs Client Components
|
|
42
|
-
|
|
43
|
-
- **Server Components (Default)**: Zero JS. Direct DB access. Secure env vars.
|
|
44
|
-
- **Client Components (`"use client"`)**: Lifecycle (`useEffect`), State (`useState`), Browser APIs (`window`), Event listeners (`onClick`).
|
|
45
|
-
|
|
46
|
-
```tsx
|
|
47
|
-
// ✅ INTERLEAVING PATTERN: Pass Server Component as children to Client Component
|
|
48
|
-
export default function Page() {
|
|
49
|
-
return (
|
|
50
|
-
<ClientSidebar> {/* "use client" */}
|
|
51
|
-
<ServerStats /> {/* Server: zero JS bundle, fetches DB */}
|
|
52
|
-
</ClientSidebar>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Server Actions (Mutations)
|
|
60
|
-
|
|
61
|
-
```tsx
|
|
62
|
-
"use server"
|
|
63
|
-
import { revalidatePath } from "next/cache";
|
|
64
|
-
import { z } from "zod";
|
|
65
|
-
|
|
66
|
-
const Schema = z.object({ name: z.string().min(2) });
|
|
67
|
-
|
|
68
|
-
export async function createUser(prevState: any, formData: FormData) {
|
|
69
|
-
// ❌ TRAP: ALWAYS validate formData. Never trust client input.
|
|
70
|
-
const parsed = Schema.safeParse({ name: formData.get("name") });
|
|
71
|
-
if (!parsed.success) return { errors: parsed.error.flatten().fieldErrors };
|
|
72
|
-
|
|
73
|
-
await db.user.create({ data: parsed.data });
|
|
74
|
-
revalidatePath("/users"); // Clears cache so next render shows new user
|
|
75
|
-
return { success: true };
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Client usage (React 19):
|
|
80
|
-
```tsx
|
|
81
|
-
"use client"
|
|
82
|
-
import { useActionState } from "react";
|
|
83
|
-
import { createUser } from "./actions";
|
|
84
|
-
|
|
85
|
-
export function UserForm() {
|
|
86
|
-
const [state, formAction, isPending] = useActionState(createUser, null);
|
|
87
|
-
return (
|
|
88
|
-
<form action={formAction}>
|
|
89
|
-
<input name="name" />
|
|
90
|
-
<button disabled={isPending}>Submit</button>
|
|
91
|
-
{state?.errors?.name && <p>{state.errors.name}</p>}
|
|
92
|
-
</form>
|
|
93
|
-
)
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Data Fetching & Caching (Next.js 15)
|
|
100
|
-
|
|
101
|
-
```tsx
|
|
102
|
-
// Next.js 15 caching defaults
|
|
103
|
-
const dynamic = await fetch(url); // 15 default: NO CACHE
|
|
104
|
-
const static = await fetch(url, { cache: "force-cache" }); // Static
|
|
105
|
-
const isr = await fetch(url, { next: { revalidate: 3600 } }); // Revalidate every hour
|
|
106
|
-
const tagged = await fetch(url, { next: { tags: ["user-1"] } }); // On-demand via revalidateTag()
|
|
107
|
-
|
|
108
|
-
// DB calls without fetch
|
|
109
|
-
import { unstable_cache } from "next/cache";
|
|
110
|
-
const getCachedUser = unstable_cache(
|
|
111
|
-
async (id) => db.user.findUnique({ where: { id } }),
|
|
112
|
-
["user-cache-key"],
|
|
113
|
-
{ revalidate: 60, tags: ["users"] }
|
|
114
|
-
);
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Waterfall Elimination
|
|
118
|
-
```tsx
|
|
119
|
-
// ✅ Parallel Fetching:
|
|
120
|
-
const [user, posts] = await Promise.all([getUser(), getPosts()]);
|
|
121
|
-
|
|
122
|
-
// ✅ Streaming (PPR-compatible):
|
|
123
|
-
export default function Page() {
|
|
124
|
-
return (
|
|
125
|
-
<main>
|
|
126
|
-
<FastNav />
|
|
127
|
-
{/* Page shell loads instantly, SlowChart streams in when ready */}
|
|
128
|
-
<Suspense fallback={<Skeleton />}>
|
|
129
|
-
<SlowChart />
|
|
130
|
-
</Suspense>
|
|
131
|
-
</main>
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## Partial Prerendering (PPR)
|
|
139
|
-
|
|
140
|
-
PPR static-generates the route shell and streams dynamic parts.
|
|
141
|
-
```tsx
|
|
142
|
-
// next.config.ts
|
|
143
|
-
export default { experimental: { ppr: true } };
|
|
144
|
-
|
|
145
|
-
// Any component reading cookies/headers inside a Suspense boundary becomes a dynamic hole
|
|
146
|
-
import { cookies } from "next/headers";
|
|
147
|
-
|
|
148
|
-
async function Cart() {
|
|
149
|
-
const c = await cookies(); // Next.js 15 cookies are async!
|
|
150
|
-
const cartId = c.get("cartId");
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export default function Page() {
|
|
154
|
-
return (
|
|
155
|
-
<div>
|
|
156
|
-
<StaticHeader /> {/* Cached at build time on CDN */}
|
|
157
|
-
<Suspense fallback={<CartSkeleton />}>
|
|
158
|
-
<Cart /> {/* Dynamic, streamed at request time */}
|
|
159
|
-
</Suspense>
|
|
160
|
-
</div>
|
|
161
|
-
)
|
|
162
|
-
}
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## Middleware
|
|
168
|
-
|
|
169
|
-
```typescript
|
|
170
|
-
// middleware.ts (Root of project)
|
|
171
|
-
import { NextResponse } from "next/server";
|
|
172
|
-
import type { NextRequest } from "next/server";
|
|
173
|
-
|
|
174
|
-
export function middleware(req: NextRequest) {
|
|
175
|
-
const token = req.cookies.get("auth-token");
|
|
176
|
-
if (!token && req.nextUrl.pathname.startsWith("/dashboard")) {
|
|
177
|
-
return NextResponse.redirect(new URL("/login", req.url));
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export const config = {
|
|
182
|
-
matcher: ["/dashboard/:path*"], // Strict matcher is critical for performance
|
|
183
|
-
};
|
|
184
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: nextjs-react-expert
|
|
3
|
+
description: Next.js 15+ App Router mastery. Server Components, Server Actions, PPR, caching, metadata, middleware, parallel/intercepting routes. Use when building Next.js apps or optimizing Next.js performance.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
version: 3.1.0
|
|
6
|
+
last-updated: 2026-04-06
|
|
7
|
+
applies-to-model: gemini-3-1-pro, claude-3-7-sonnet
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Next.js 15+ App Router — Dense Reference
|
|
11
|
+
|
|
12
|
+
## Hallucination Traps (Read First)
|
|
13
|
+
- ❌ `pages/api/` or `_app.tsx` → ✅ App Router only: `app/api/route.ts`, `app/layout.tsx`
|
|
14
|
+
- ❌ `getServerSideProps` → ✅ `async function Page()` fetches directly
|
|
15
|
+
- ❌ `next/router` → ✅ `next/navigation` (`useRouter`, `usePathname`, `useSearchParams`)
|
|
16
|
+
- ❌ Server Action without `"use server"` → ✅ Required at top of file or top of function
|
|
17
|
+
- ❌ Fetch is cached by default → ✅ **Next.js 15 changed this**: `fetch()` is UNCACHED by default
|
|
18
|
+
- ❌ `cookies()` at top of page → ✅ Opts entire route into dynamic rendering, breaking PPR. Wrap inside `<Suspense>`
|
|
19
|
+
- ❌ Passing functions as props Server → Client → ✅ Illegal. Use Server Actions instead.
|
|
20
|
+
- ❌ Plain `Response` in route handler → ✅ Use `NextResponse.json()`
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## App Router Conventions
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
app/
|
|
28
|
+
├── layout.tsx ← Root shell (HTML/BODY)
|
|
29
|
+
├── page.tsx ← Route UI
|
|
30
|
+
├── loading.tsx ← Auto-suspense fallback
|
|
31
|
+
├── error.tsx ← Error boundary (Must be "use client")
|
|
32
|
+
├── not-found.tsx ← 404 UI
|
|
33
|
+
├── global-error.tsx ← Root error boundary
|
|
34
|
+
├── api/users/route.ts ← API Handler (GET, POST)
|
|
35
|
+
├── @modal/login/page.tsx ← Parallel Route (renders in same layout)
|
|
36
|
+
└── (auth)/login/page.tsx ← Route Group (doesn't affect URL)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Server vs Client Components
|
|
42
|
+
|
|
43
|
+
- **Server Components (Default)**: Zero JS. Direct DB access. Secure env vars.
|
|
44
|
+
- **Client Components (`"use client"`)**: Lifecycle (`useEffect`), State (`useState`), Browser APIs (`window`), Event listeners (`onClick`).
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
// ✅ INTERLEAVING PATTERN: Pass Server Component as children to Client Component
|
|
48
|
+
export default function Page() {
|
|
49
|
+
return (
|
|
50
|
+
<ClientSidebar> {/* "use client" */}
|
|
51
|
+
<ServerStats /> {/* Server: zero JS bundle, fetches DB */}
|
|
52
|
+
</ClientSidebar>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Server Actions (Mutations)
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
"use server"
|
|
63
|
+
import { revalidatePath } from "next/cache";
|
|
64
|
+
import { z } from "zod";
|
|
65
|
+
|
|
66
|
+
const Schema = z.object({ name: z.string().min(2) });
|
|
67
|
+
|
|
68
|
+
export async function createUser(prevState: any, formData: FormData) {
|
|
69
|
+
// ❌ TRAP: ALWAYS validate formData. Never trust client input.
|
|
70
|
+
const parsed = Schema.safeParse({ name: formData.get("name") });
|
|
71
|
+
if (!parsed.success) return { errors: parsed.error.flatten().fieldErrors };
|
|
72
|
+
|
|
73
|
+
await db.user.create({ data: parsed.data });
|
|
74
|
+
revalidatePath("/users"); // Clears cache so next render shows new user
|
|
75
|
+
return { success: true };
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Client usage (React 19):
|
|
80
|
+
```tsx
|
|
81
|
+
"use client"
|
|
82
|
+
import { useActionState } from "react";
|
|
83
|
+
import { createUser } from "./actions";
|
|
185
84
|
|
|
85
|
+
export function UserForm() {
|
|
86
|
+
const [state, formAction, isPending] = useActionState(createUser, null);
|
|
87
|
+
return (
|
|
88
|
+
<form action={formAction}>
|
|
89
|
+
<input name="name" />
|
|
90
|
+
<button disabled={isPending}>Submit</button>
|
|
91
|
+
{state?.errors?.name && <p>{state.errors.name}</p>}
|
|
92
|
+
</form>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
```
|
|
186
96
|
|
|
187
97
|
---
|
|
188
98
|
|
|
189
|
-
##
|
|
99
|
+
## Data Fetching & Caching (Next.js 15)
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
// Next.js 15 caching defaults
|
|
103
|
+
const dynamic = await fetch(url); // 15 default: NO CACHE
|
|
104
|
+
const static = await fetch(url, { cache: "force-cache" }); // Static
|
|
105
|
+
const isr = await fetch(url, { next: { revalidate: 3600 } }); // Revalidate every hour
|
|
106
|
+
const tagged = await fetch(url, { next: { tags: ["user-1"] } }); // On-demand via revalidateTag()
|
|
107
|
+
|
|
108
|
+
// DB calls without fetch
|
|
109
|
+
import { unstable_cache } from "next/cache";
|
|
110
|
+
const getCachedUser = unstable_cache(
|
|
111
|
+
async (id) => db.user.findUnique({ where: { id } }),
|
|
112
|
+
["user-cache-key"],
|
|
113
|
+
{ revalidate: 60, tags: ["users"] }
|
|
114
|
+
);
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Waterfall Elimination
|
|
118
|
+
```tsx
|
|
119
|
+
// ✅ Parallel Fetching:
|
|
120
|
+
const [user, posts] = await Promise.all([getUser(), getPosts()]);
|
|
121
|
+
|
|
122
|
+
// ✅ Streaming (PPR-compatible):
|
|
123
|
+
export default function Page() {
|
|
124
|
+
return (
|
|
125
|
+
<main>
|
|
126
|
+
<FastNav />
|
|
127
|
+
{/* Page shell loads instantly, SlowChart streams in when ready */}
|
|
128
|
+
<Suspense fallback={<Skeleton />}>
|
|
129
|
+
<SlowChart />
|
|
130
|
+
</Suspense>
|
|
131
|
+
</main>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Partial Prerendering (PPR)
|
|
139
|
+
|
|
140
|
+
PPR static-generates the route shell and streams dynamic parts.
|
|
141
|
+
```tsx
|
|
142
|
+
// next.config.ts
|
|
143
|
+
export default { experimental: { ppr: true } };
|
|
144
|
+
|
|
145
|
+
// Any component reading cookies/headers inside a Suspense boundary becomes a dynamic hole
|
|
146
|
+
import { cookies } from "next/headers";
|
|
147
|
+
|
|
148
|
+
async function Cart() {
|
|
149
|
+
const c = await cookies(); // Next.js 15 cookies are async!
|
|
150
|
+
const cartId = c.get("cartId");
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export default function Page() {
|
|
154
|
+
return (
|
|
155
|
+
<div>
|
|
156
|
+
<StaticHeader /> {/* Cached at build time on CDN */}
|
|
157
|
+
<Suspense fallback={<CartSkeleton />}>
|
|
158
|
+
<Cart /> {/* Dynamic, streamed at request time */}
|
|
159
|
+
</Suspense>
|
|
160
|
+
</div>
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Middleware
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
// middleware.ts (Root of project)
|
|
171
|
+
import { NextResponse } from "next/server";
|
|
172
|
+
import type { NextRequest } from "next/server";
|
|
173
|
+
|
|
174
|
+
export function middleware(req: NextRequest) {
|
|
175
|
+
const token = req.cookies.get("auth-token");
|
|
176
|
+
if (!token && req.nextUrl.pathname.startsWith("/dashboard")) {
|
|
177
|
+
return NextResponse.redirect(new URL("/login", req.url));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export const config = {
|
|
182
|
+
matcher: ["/dashboard/:path*"], // Strict matcher is critical for performance
|
|
183
|
+
};
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
|
|
190
190
|
|
|
191
191
|
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
192
192
|
|
|
@@ -198,7 +198,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
198
198
|
|
|
199
199
|
---
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
|
|
202
202
|
|
|
203
203
|
**Slash command: `/review` or `/tribunal-full`**
|
|
204
204
|
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
@@ -209,7 +209,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
209
209
|
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
210
210
|
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
|
|
213
213
|
|
|
214
214
|
Review these questions before confirming output:
|
|
215
215
|
```
|
|
@@ -223,4 +223,12 @@ Review these questions before confirming output:
|
|
|
223
223
|
|
|
224
224
|
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
225
225
|
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
226
|
-
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
226
|
+
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
## Pre-Flight Checklist
|
|
230
|
+
- [ ] Have I reviewed the user's specific constraints and requests?
|
|
231
|
+
- [ ] Have I checked the environment for relevant existing implementations?
|
|
232
|
+
|
|
233
|
+
## VBC Protocol (Verification-Before-Completion)
|
|
234
|
+
You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
|
|
@@ -500,7 +500,7 @@ if (isMainThread) {
|
|
|
500
500
|
|
|
501
501
|
---
|
|
502
502
|
|
|
503
|
-
|
|
503
|
+
|
|
504
504
|
|
|
505
505
|
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
506
506
|
|
|
@@ -512,7 +512,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
512
512
|
|
|
513
513
|
---
|
|
514
514
|
|
|
515
|
-
|
|
515
|
+
|
|
516
516
|
|
|
517
517
|
**Slash command: `/review` or `/tribunal-full`**
|
|
518
518
|
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
@@ -523,7 +523,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
523
523
|
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
524
524
|
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
525
525
|
|
|
526
|
-
|
|
526
|
+
|
|
527
527
|
|
|
528
528
|
Review these questions before confirming output:
|
|
529
529
|
```
|
|
@@ -537,4 +537,12 @@ Review these questions before confirming output:
|
|
|
537
537
|
|
|
538
538
|
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
539
539
|
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
540
|
-
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
540
|
+
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
## Pre-Flight Checklist
|
|
544
|
+
- [ ] Have I reviewed the user's specific constraints and requests?
|
|
545
|
+
- [ ] Have I checked the environment for relevant existing implementations?
|
|
546
|
+
|
|
547
|
+
## VBC Protocol (Verification-Before-Completion)
|
|
548
|
+
You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
|
|
@@ -295,7 +295,7 @@ Alert design rules:
|
|
|
295
295
|
|
|
296
296
|
---
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
|
|
299
299
|
|
|
300
300
|
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
301
301
|
|
|
@@ -307,7 +307,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
307
307
|
|
|
308
308
|
---
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
|
|
311
311
|
|
|
312
312
|
**Slash command: `/review` or `/tribunal-full`**
|
|
313
313
|
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
@@ -318,7 +318,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
318
318
|
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
319
319
|
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
|
|
322
322
|
|
|
323
323
|
Review these questions before confirming output:
|
|
324
324
|
```
|
|
@@ -332,4 +332,12 @@ Review these questions before confirming output:
|
|
|
332
332
|
|
|
333
333
|
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
334
334
|
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
335
|
-
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
335
|
+
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
## Pre-Flight Checklist
|
|
339
|
+
- [ ] Have I reviewed the user's specific constraints and requests?
|
|
340
|
+
- [ ] Have I checked the environment for relevant existing implementations?
|
|
341
|
+
|
|
342
|
+
## VBC Protocol (Verification-Before-Completion)
|
|
343
|
+
You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
|
|
@@ -98,7 +98,7 @@ for (const result of results) {
|
|
|
98
98
|
|
|
99
99
|
---
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
|
|
103
103
|
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
104
104
|
|
|
@@ -110,7 +110,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
110
110
|
|
|
111
111
|
---
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
|
|
114
114
|
|
|
115
115
|
**Slash command: `/review` or `/tribunal-full`**
|
|
116
116
|
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
@@ -121,7 +121,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
121
121
|
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
122
122
|
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
|
|
125
125
|
|
|
126
126
|
Review these questions before confirming output:
|
|
127
127
|
```
|
|
@@ -135,4 +135,12 @@ Review these questions before confirming output:
|
|
|
135
135
|
|
|
136
136
|
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
137
137
|
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
138
|
-
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
138
|
+
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
## Pre-Flight Checklist
|
|
142
|
+
- [ ] Have I reviewed the user's specific constraints and requests?
|
|
143
|
+
- [ ] Have I checked the environment for relevant existing implementations?
|
|
144
|
+
|
|
145
|
+
## VBC Protocol (Verification-Before-Completion)
|
|
146
|
+
You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
|
|
@@ -219,7 +219,7 @@ Performance budget targets:
|
|
|
219
219
|
|
|
220
220
|
---
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
|
|
223
223
|
|
|
224
224
|
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
225
225
|
|
|
@@ -231,7 +231,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
231
231
|
|
|
232
232
|
---
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
|
|
235
235
|
|
|
236
236
|
**Slash command: `/review` or `/tribunal-full`**
|
|
237
237
|
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
@@ -242,7 +242,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
242
242
|
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
243
243
|
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
|
|
246
246
|
|
|
247
247
|
Review these questions before confirming output:
|
|
248
248
|
```
|
|
@@ -256,4 +256,12 @@ Review these questions before confirming output:
|
|
|
256
256
|
|
|
257
257
|
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
258
258
|
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
259
|
-
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
259
|
+
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
## Pre-Flight Checklist
|
|
263
|
+
- [ ] Have I reviewed the user's specific constraints and requests?
|
|
264
|
+
- [ ] Have I checked the environment for relevant existing implementations?
|
|
265
|
+
|
|
266
|
+
## VBC Protocol (Verification-Before-Completion)
|
|
267
|
+
You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
|
|
@@ -94,7 +94,7 @@ Unlike the high-level `implementation_plan.md`, the `task.md` serves as the live
|
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
|
|
99
99
|
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
100
100
|
|
|
@@ -106,7 +106,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
106
106
|
|
|
107
107
|
---
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
|
|
110
110
|
|
|
111
111
|
**Slash command: `/review` or `/tribunal-full`**
|
|
112
112
|
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
@@ -117,7 +117,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
117
117
|
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
118
118
|
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
|
|
121
121
|
|
|
122
122
|
Review these questions before confirming output:
|
|
123
123
|
```
|
|
@@ -131,4 +131,12 @@ Review these questions before confirming output:
|
|
|
131
131
|
|
|
132
132
|
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
133
133
|
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
134
|
-
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
134
|
+
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
## Pre-Flight Checklist
|
|
138
|
+
- [ ] Have I reviewed the user's specific constraints and requests?
|
|
139
|
+
- [ ] Have I checked the environment for relevant existing implementations?
|
|
140
|
+
|
|
141
|
+
## VBC Protocol (Verification-Before-Completion)
|
|
142
|
+
You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
|
|
@@ -99,7 +99,7 @@ Ensure your infrastructure proposals abstract away the YAML mechanics. Give the
|
|
|
99
99
|
|
|
100
100
|
---
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
|
|
103
103
|
|
|
104
104
|
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
105
105
|
|
|
@@ -111,7 +111,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
111
111
|
|
|
112
112
|
---
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
|
|
115
115
|
|
|
116
116
|
**Slash command: `/review` or `/tribunal-full`**
|
|
117
117
|
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
@@ -122,7 +122,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
|
|
|
122
122
|
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
123
123
|
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
|
|
126
126
|
|
|
127
127
|
Review these questions before confirming output:
|
|
128
128
|
```
|
|
@@ -136,4 +136,12 @@ Review these questions before confirming output:
|
|
|
136
136
|
|
|
137
137
|
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
138
138
|
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
139
|
-
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
139
|
+
- ✅ **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## Pre-Flight Checklist
|
|
143
|
+
- [ ] Have I reviewed the user's specific constraints and requests?
|
|
144
|
+
- [ ] Have I checked the environment for relevant existing implementations?
|
|
145
|
+
|
|
146
|
+
## VBC Protocol (Verification-Before-Completion)
|
|
147
|
+
You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
|