From e3345e1d66077e24c025479226054a4328b1be86 Mon Sep 17 00:00:00 2001 From: gunshiz Date: Tue, 1 Sep 2026 20:54:54 +0700 Subject: [PATCH] fix : ai slop --- .agents/skills/scrutinize/SKILL.md | 22 +++++++++---------- AGENTS.md | 4 ++-- app/[character]/[page]/page.tsx | 2 +- app/[character]/page.tsx | 2 +- .../[guideId]/artifacts/image/route.tsx | 2 +- app/opengraph-image.tsx | 2 +- components/admin/editor-inspector.tsx | 4 ++-- components/public/block-renderer.tsx | 4 ++-- components/public/structured-guide.tsx | 4 ++-- lib/content/demo.ts | 2 +- lib/editor/draft.ts | 2 +- lib/templates/built-in.ts | 4 ++-- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.agents/skills/scrutinize/SKILL.md b/.agents/skills/scrutinize/SKILL.md index af84f29..682e2b8 100644 --- a/.agents/skills/scrutinize/SKILL.md +++ b/.agents/skills/scrutinize/SKILL.md @@ -17,17 +17,17 @@ Stand outside the change and ask whether it should exist at all, then verify it Run these in order. Do not skip ahead. -### 1. Intent — what is this actually trying to do? +### 1. Intent - what is this actually trying to do? -- State the goal in one sentence, in your own words. If you cannot, the artifact is underspecified — say so and stop. +- State the goal in one sentence, in your own words. If you cannot, the artifact is underspecified - say so and stop. - Ask: **is there a simpler, smaller, or more elegant way to achieve the same goal?** Consider: - Doing nothing (is the problem real / load-bearing?). - Using something that already exists in the codebase instead of adding new surface. - A smaller change that solves 90% of the goal with 10% of the risk. - Solving it at a different layer (config vs code, framework vs app, build vs runtime). -- If a better alternative exists, name it explicitly with rationale. This is the most valuable thing you can output — surface it before the line-by-line review. +- If a better alternative exists, name it explicitly with rationale. This is the most valuable thing you can output - surface it before the line-by-line review. -### 2. Trace — walk the actual code path +### 2. Trace - walk the actual code path - For each behavior the change claims, trace the path end-to-end through the real code, not just the lines in the diff: - Entry point → call sites → branches taken → state mutated → exit / return / side effect. @@ -35,7 +35,7 @@ Run these in order. Do not skip ahead. - For a plan or design doc: trace the proposed flow against the existing system. Where does it touch reality? What does it assume that isn't true? - Note every place the trace surprises you (unexpected branch, dead code reached, state you didn't know existed). Surprises are signal. -### 3. Verify — does it actually do what it claims? +### 3. Verify - does it actually do what it claims? For each claim the change/plan makes, answer: @@ -48,18 +48,18 @@ For each claim the change/plan makes, answer: Output one tight section per finding. Order by severity (blocker → major → nit). For each: -- **Finding** — one sentence, specific. Cite `file:line` when applicable. -- **Why it matters** — the consequence, not the principle. -- **Evidence** — the trace step or input that exposes it. -- **Suggested change** — concrete, minimal. +- **Finding** - one sentence, specific. Cite `file:line` when applicable. +- **Why it matters** - the consequence, not the principle. +- **Evidence** - the trace step or input that exposes it. +- **Suggested change** - concrete, minimal. -Close with a one-line verdict: ship / fix-then-ship / rework / reject — with the single biggest reason. +Close with a one-line verdict: ship / fix-then-ship / rework / reject - with the single biggest reason. ## Operating rules - **No rubber-stamps.** "LGTM" is not an output. If you genuinely find nothing, say what you traced and what you checked, so the user can judge whether your review covered the surface they cared about. - **Cite or it didn't happen.** Every claim about the code references a specific path, file, or line. No vague "this might break under load." -- **Distinguish claim from verification.** "The PR says X" and "I traced X and confirmed / refuted it" are different — keep them separate in the output. +- **Distinguish claim from verification.** "The PR says X" and "I traced X and confirmed / refuted it" are different - keep them separate in the output. - **One simpler-alternative pass is mandatory.** Even on small changes, spend one breath asking if the whole thing is necessary. Skip only if the user explicitly says "don't question scope." - **Don't pad with style nits when there's a structural problem.** If step 1 or step 2 surfaces a real issue, lead with it; defer nits or drop them. - **No flattery, no hedging.** "This is a great PR but..." adds nothing. State the finding. diff --git a/AGENTS.md b/AGENTS.md index 643577d..44a03a0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,8 +2,8 @@ # This is NOT the Next.js you know -This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. +This version has breaking changes - APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. -This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. +This block is written and re-added by `next dev` - verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. diff --git a/app/[character]/[page]/page.tsx b/app/[character]/[page]/page.tsx index 04262e7..c4af15d 100644 --- a/app/[character]/[page]/page.tsx +++ b/app/[character]/[page]/page.tsx @@ -11,7 +11,7 @@ export async function generateMetadata({ params }: { params: Params }): Promise< await connection(); const { character, page } = await params; const guide = await getCachedPublicGuide(character); - return guide ? { title: `${page} — ${guide.name} — คู่มือ`, description: guide.overview } : { title: "ไม่พบไกด์" }; + return guide ? { title: `${page} - ${guide.name} - คู่มือ`, description: guide.overview } : { title: "ไม่พบไกด์" }; } export default async function GuideSectionPage({ params }: { params: Params }) { diff --git a/app/[character]/page.tsx b/app/[character]/page.tsx index 4020ad6..7fa5943 100644 --- a/app/[character]/page.tsx +++ b/app/[character]/page.tsx @@ -15,7 +15,7 @@ export async function generateMetadata({ await connection(); const guide = await getCachedPublicGuide((await params).character); return guide - ? { title: `${guide.name} — คู่มือ`, description: guide.overview } + ? { title: `${guide.name} - คู่มือ`, description: guide.overview } : { title: "ไม่พบไกด์" }; } diff --git a/app/api/guides/[guideId]/artifacts/image/route.tsx b/app/api/guides/[guideId]/artifacts/image/route.tsx index 4b090af..b44fe5d 100644 --- a/app/api/guides/[guideId]/artifacts/image/route.tsx +++ b/app/api/guides/[guideId]/artifacts/image/route.tsx @@ -227,7 +227,7 @@ export async function GET(
{stat.label}
- {stat.values.length ? stat.values.map((value, index) => {recommendedStatAsset(value) ? : null}{statLabel(value)}) : "—"} + {stat.values.length ? stat.values.map((value, index) => {recommendedStatAsset(value) ? : null}{statLabel(value)}) : "-"}
))} diff --git a/app/opengraph-image.tsx b/app/opengraph-image.tsx index dac1e55..28b684b 100644 --- a/app/opengraph-image.tsx +++ b/app/opengraph-image.tsx @@ -4,7 +4,7 @@ import { ogImageSize, } from "@/lib/og-image"; -export const alt = "Buzz Guide — คู่มือเกนชินสาธารณะที่เตรียมไว้ให้คุณ"; +export const alt = "Buzz Guide - คู่มือเกนชินสาธารณะที่เตรียมไว้ให้คุณ"; export const size = ogImageSize; export const contentType = ogImageContentType; diff --git a/components/admin/editor-inspector.tsx b/components/admin/editor-inspector.tsx index d0717bf..31752bf 100644 --- a/components/admin/editor-inspector.tsx +++ b/components/admin/editor-inspector.tsx @@ -272,7 +272,7 @@ function DataSourceEditor({ {source.fields.filter((candidate) => candidate.key !== field.key).map((candidate) => )} - {cell?.error ? สูตรนี้ยังคำนวณไม่ได้: ตรวจสอบชื่อฟิลด์และตัวหาร : ตัวอย่างผลลัพธ์: {cell?.display ?? "—"}} + {cell?.error ? สูตรนี้ยังคำนวณไม่ได้: ตรวจสอบชื่อฟิลด์และตัวหาร : ตัวอย่างผลลัพธ์: {cell?.display ?? "-"}} ); })} @@ -280,7 +280,7 @@ function DataSourceEditor({
{source.fields.slice(0, 3).map((field) => {field.label})} - {source.rows.slice(0, 10).map((row) => {source.fields.slice(0, 3).map((field) => {row.values[field.key] ?? previewRow?.cells[field.key]?.display ?? "—"})})} + {source.rows.slice(0, 10).map((row) => {source.fields.slice(0, 3).map((field) => {row.values[field.key] ?? previewRow?.cells[field.key]?.display ?? "-"})})}