尧图网络 高端网站定制 · 原创设计
免费咨询热线
400-888-6620
免费获取方案
agents-generator - decision-matrix
决策矩阵——项目检测与规则选择检测顺序按此顺序运行检测。每个步骤读取文件并设置后续步骤使用的标志。1. 包管理器检查锁文件bun.lock→ bunpnpm-lock.yaml→ pnpmpackage-lock.json→ npmyarn.lock→ yarn。2. 项目类型根package.json中的workspaces→ 单一代码库。否则 → 单一应用。3. 框架Dep foundFrameworkRouter detectionnextNext.jsapp/haspage.tsxorlayout.tsx→ App Router;pages/has.tsx→ Pages Router; both → hybrid (treat as App Router primary)nestjs/coreNestJSN/AviteViteCheckreactfor React,vuefor Vue,sveltefor Svelteangular/coreAngularN/AexpressExpressN/AfastifyFastifyN/Aremix/remix-run/*RemixN/AastroAstroN/A4. 单仓库工具如果是单仓库File foundToolturbo.jsonTurboreponx.jsonNxlerna.jsonLernapnpm-workspace.yamlonlypnpm workspaces (no orchestrator)5. 语言tsconfig.json存在 → TypeScript。检查compilerOptions.strict: true→ 严格模式。6. CSS 方法SignalApproachtailwindcssin depsTailwind CSScomponents.jsonexistsshadcn/ui (implies Tailwind)styled-componentsin depsstyled-componentsemotion/*in depsEmotion.module.cssor.module.scssfiles foundCSS Modulessassornode-sassin depsSass/SCSSNone of the abovePlain CSS / CSS imports7. 测试Dep foundRunnerExtravitestVitestCheckvitest.config.*for env (node/jsdom/happy-dom)jestJestCheckjest.config.*for envplaywrightorplaywright/testPlaywrightE2E tests presentcypressCypressE2E tests presentNone—Skip testing rules8. 验证Dep foundLibraryzodZodyupYupclass-validatorclass-validatorvalibotValibotNonePlain TypeScript (type guards, manual validation)9. ORM / 数据库Dep foundORMDetect providerprismaPrismaReadprisma/schema.prisma→datasource db { provider ... }drizzle-ormDrizzleCheckdrizzle.config.*fordialectknexKnexCheckknexfile.*for clienttypeormTypeORMCheck config fortypemongooseMongoDB/MongooseN/A提供程序影响ID类型约定PostgreSQL使用UUIDSQLite/MySQL使用自增MongoDB使用ObjectId。10. 状态管理Dep foundLibraryzustandZustandreduxjs/toolkitRedux ToolkitjotaiJotaivaltioValtiorecoilRecoilmobxMobXxstateXStatetanstack/react-queryReact Query (server state)swrSWR (server state)NoneuseState / useReducer only服务器状态库React Query、SWR需要与客户端状态Zustand、Redux不同的规则。11. API 客户端模式SignalPatterntrpc/*in depstRPCgraphqlapollo/clientGraphQL (Apollo)graphqlrelay-runtimeGraphQL (Relay)tanstack/react-queryfetchREST with React QueryswrfetchREST with SWRaxiosin depsREST with AxiosServer action files (use server) foundServer Actionsapp/api/withroute.tsfilesNext.js API Routessrc/with NestJS controllersNestJS RESTNone of the abovefetch() directly12. 表单库Dep foundLibraryreact-hook-formreact-hook-formformikFormiktanstack/react-formTanStack Formhookform/resolversreact-hook-form Zod/Yup resolverNoneControlled/uncontrolled inputs manually13. 认证库Dep foundLibraryExtra detectionnext-authNextAuth v5 (Auth.js)Check forauth.ts,middleware.tsroute protectionnext-authv4NextAuth v4Check for[...nextauth].tsclerk/nextjsClerkCheck formiddleware.tslucia/lucia-authLuciaCheck forauth.tssupabase/supabase-jssupabase/ssrSupabase AuthCheck for middlewarefirebasefirebase/authFirebase AuthCheck forfirebase.tsconfigauth0/*Auth0Check forauth0.tsNoneNo auth or custom—14. 国际化库Dep foundLibraryExtra detectionnext-intlnext-intlChecki18n.ts,messages/, middleware configreact-i18nexti18nextreact-i18nextChecki18n.ts, locale JSON filesnext-i18nextnext-i18nextChecknext-i18next.config.jslingui/*LinguiChecklingui.config.*NoneNo i18nChecklanginhtmlfor language hint15. 后端模式SignalPatternFiles containinguse serverServer Actionsapp/api/withroute.tsNext.js API RoutesNestJS controllersNestJS RESTExpress/Fastify route filesREST APItRPC routerstRPC APIGraphQL resolversGraphQL API16. 代码检查与质量File/Dep foundTooleslintin depsESLinteslint.config.*ESLint flat config.eslintrc.*ESLint legacy configprettierin depsPrettier.prettierrc*Prettier configuredreact-doctorin depsreact-doctordoctor.config.*react-doctor configuredbiome.jsonBiome.oxlintrc.*oxlint规则文件选择将检测到的标志映射到规则文件以生成Rule FileRequired Whenarchitecture.mdAlwaysfrontend-patterns.mdHas React/Next.js/Vite/Angular/Vue/Svelte frontendbackend-patterns.mdHas NestJS backendserver-actions.mdUses server actions OR has API routes OR has NestJS/Express/Fastify backendstyling.mdHas Tailwind, CSS Modules, or styled-components (not plain CSS)forms.mdHas react-hook-form, formik, or TanStack Formdatabase.mdHas Prisma, Drizzle, Knex, TypeORM, or Mongoosei18n.mdHas next-intl, react-i18next, or similartesting.mdHas test runner (vitest/jest/playwright/cypress) in devDepsgit-workflow.mdAlwayssdd-workflow.mdAlwaysAGENTS.md 部分选择根据检测生成的 AGENTS.md 中包含的部分SectionInclude WhenMonorepo Structureworkspacesin package.jsonMonorepo Tool CommandsTurborepo/Nx/Lerna detectedNext.js Router ConventionNext.js detected → App Router vs Pages Router rulesZod Validation Conventionzodoryuporvalibotin depsPlain TS Validation ConventionNo validation library, but TypeScript strictPrisma Conventionprismain depsDrizzle Conventiondrizzle-ormin depsServer Actions Conventionuse serverfiles detectedtRPC ConventiontRPC detectedGraphQL ConventionGraphQL detectedTailwind Conventiontailwindcssin depsshadcn/ui Conventioncomponents.jsonexistsCSS Modules Convention.module.cssfiles foundStyled Components Conventionstyled-componentsin depsState Management SectionZustand/Redux/Jotai/MobX/XState in depsServer State SectionReact Query/SWR in depsForm Library Sectionreact-hook-form/formik/TanStack Form in depsi18n Sectioni18n library detectedAuth SectionAuth library detectedreact-doctor Conventiondoctor.config.*orreact-doctorin depsUI Language ConventionChecklangattribute or i18n config命令生成从package.json的scripts生成命令表。直接映射scripts键{scripts:{dev:...,build:...,lint:...,test:...}}变为ComandoQué hace{pm} devServidor de desarrollo{pm} run buildBuild de producción{pm} run lintLinting{pm} run testTests (watch)为以下内容添加额外行test:run单次运行、test:coverage、doctor、format、typecheck。其中{pm} 对于 bun不带run的脚本为bunpnpm 为pnpmnpm 为npm runyarn 为yarn。Monorepo 命令生成如果使用 Turborepo 的 monorepo生成turbo run {cmd}变体。如果使用 pnpm 的 monorepo生成pnpm --filter {pkg} {cmd}示例。如果使用 Nx 的单仓库生成nx {cmd} {pkg}变体。验证周期从检测到的工具组装{typecheck} → {lint} → {test} → {doctor}{typecheck}如果是 TypeScript则使用tsc --noEmit如果是 bun则使用bunx tsc --noEmit如果没有 TS 则跳过。{lint}:{pm} run lint或检测到的 lint 命令。{test}:{pm} run test:run或{pm} run test取单次运行的那个。{doctor}:{pm} doctor或{pm}x react-doctorlatest如果检测到 react-doctor。如果没有检测到则跳过。单仓库重建说明如果是带共享包的单一代码库添加关于在循环之前重建包的说明Si se modificaron packages compartidos ({shared_pkg_list}), ejecutar su rebuild primero: {rebuild_commands}特定框架的约定Next.js 应用路由器默认使用服务器组件。只有在使用钩子时才使用use client。服务器操作在lib/actions.ts或src/actions/。error.tsx、loading.tsx、not-found.tsx按段落。generateMetadata()用于 SEO。next/image用于图片next/font用于字体。路径别名/*→./*或./src/*。Next.js 页面路由器getServerSideProps、getStaticProps、getStaticPaths。pages/api/用于 API 路由。pages/_app.tsxpages/_document.tsx。没有服务器组件。所有都是客户端或 API。NestJS模块像目录src/{feature}/{feature}.module.ts。带装饰器的 DTO。使用class-validator或ZodValidationPipe进行验证。守卫用于身份验证UseGuards(AuthGuard)。PrismaService作为全局提供者。边缘情况SituationActionNo test runnerSkip testing.md, skip test from verification cycleNo lint toolSkip lint from verification cycleNo TypeScriptSkiptsc --noEmit, skip no-any rule, use JSDoc conventions insteadNo config files at allMinimal defaults, note that project needs setupMultiple frameworksPick primary based on root package.json, note secondaryBoth App Router and Pages RouterTreat as App Router primary, note Pages Router legacy routesNo package.json scriptsGenerate commands from direct tool invocations (npx next dev)Bun withoutbun runscriptsUsebunxprefix for npx equivalentsMonorepo without workspacesTreat eachapps/*orpackages/*as independentCSS: multiple approachesPick primary (Tailwind wins over CSS Modules over plain CSS)Auth: multiple librariesPick primary, note secondary (e.g., NextAuth for web, Clerk for admin)i18n with Pages RouterDifferent routing rules than App Router i18nDatabase with multiple providersDocument each, note which is primary
RELATED

相关推荐

agenttrace-session-audit - SKILL

agenttrace-session-audit - SKILL

name: agenttrace-session-audit description: “Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates.” category: development risk: safe source: community source_repo: luoyuctl/agenttra…

📅 2026/10/23 6:21:50
ai-agent-development - SKILL

ai-agent-development - SKILL

name: ai-agent-development description: “AI agent development workflow for building autonomous agents, multi-agent systems, and agent orchestration with CrewAI, LangGraph, and custom agents.” category: granular-workflow-bundle risk: safe source: personal…

📅 2026/10/23 6:21:50
Python股票行情取数、分时图与K线图绘制

Python股票行情取数、分时图与K线图绘制

简介:一份面向Python量化与金融可视化入门者的可运行示例工程,聚焦股票分时图、K线图的绘制与免费Level 2行情的抓取,适合已掌握Python基础、想动手实践行情获取与图表呈现的开发者。压缩包共20个文件、约42KB,以8个py源码为主体&…

📅 2026/10/23 6:21:50
MORE NEWS

更多资讯

📰

freehire 德语 IT 职位标题分类别名设计:融合复合词、词边界匹配与检索可见性

【免费下载链接】freehire freehire — the open-source search engine for job seekers 项目地址: https://gitcode.com/GitHub_Trending/fr/freehire 点击查看 免费下载 本文以 add-german-it-classify-aliases 设计文档 为主线,拆解 freehire 如何在…

📰

如何高效使用PCL2启动器:Minecraft模组管理的完整专业指南

如何高效使用PCL2启动器:Minecraft模组管理的完整专业指南 Plain Craft Launcher 2(PCL2)是一款功能强大的Minecraft启动器,专门为玩家提供便捷的模组管理和整合包制作功能。作为开源项目,PCL2不仅支持游戏启动&#…

📰

BrushNet 快速上手:5 分钟跑通 ECCV 2024 即插即用图像修复模型

BrushNet 快速上手:5 分钟跑通 ECCV 2024 即插即用图像修复模型 【免费下载链接】BrushNet [ECCV 2024] The official implementation of paper "BrushNet: A Plug-and-Play Image Inpainting Model with Decomposed Dual-Branch Diffusion" 项目地址: …

📰

Codex-X 指令提示词注入完整指南:一句固定短语验证生效,离线自动降级

Codex-X 指令提示词注入完整指南:一句固定短语验证生效,离线自动降级 【免费下载链接】Codex-X OpenAI Codex 桌面端/CLI 的可视化管理工具,具有Provider/API 切换、会话同步、提示词注入、Skills/MCP 管理、TOML 配置可视化的跨平台工具。 …

📰

动态规划与滚动数组:LeetCode 712 最小ASCII删除和详解

1. 题目拆解:什么是最小ASCII删除和1.1 先理解题目的本质LeetCode 712这道题,给定两个字符串s1和s2,要求我们通过删除字符的方式,使得两个字符串变得完全相同。但删除字符是有代价的,每个字符的代价就是它的ASCII码值。…

📰

【DL】模型微调方法总结

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

TODAY

今日更新

THIS WEEK

本周精选

THIS MONTH

本月热门

读完文章,想聊聊您的网站?

告诉我们您的行业与需求,资深顾问一对一梳理方案与报价,全程免费。

📞 💬