

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# Frontend23This file provides guidance to coding agents when working with the frontend.45## Essential Commands67```bash8# Install dependencies9pnpm i1011# Generate API client from OpenAPI spec12pnpm generate:api1314# Start development server15pnpm dev1617# Run E2E tests18pnpm test1920# Run Storybook for component development21pnpm storybook2223# Build production24pnpm build2526# Format and lint27pnpm format2829# Type checking30pnpm types31```3233### Pre-completion Checks (MANDATORY)3435After making **any** code changes in the frontend, you MUST run the following commands **in order** before reporting work as done, creating commits, or opening PRs:36371. `pnpm format` — auto-fix formatting issues382. `pnpm lint` — check for lint errors; fix any that appear393. `pnpm types` — check for type errors; fix any that appear4041Do NOT skip these steps. If any command reports errors, fix them and re-run until clean. Only then may you consider the task complete. If typing keeps failing, stop and ask the user.42434. `pnpm test:unit` — run integration tests; fix any failures4445### Code Style4647- Fully capitalize acronyms in symbols, e.g. `graphID`, `useBackendAPI`48- Use function declarations (not arrow functions) for components/handlers49- No `dark:` Tailwind classes — the design system handles dark mode50- Use Next.js `<Link>` for internal navigation — never raw `<a>` tags51- No `any` types unless the value genuinely can be anything52- No linter suppressors (`// @ts-ignore`, `// eslint-disable`) — fix the actual issue53- **File length** — keep files under ~200 lines; extract sub-components or hooks into their own files when a file grows beyond this54- **Function/component length** — keep render functions and hooks under ~50 lines; extract named helpers or sub-components when they grow longer5556## Architecture5758- **Framework**: Next.js 15 App Router (client-first approach)59- **Data Fetching**: Type-safe generated API hooks via Orval + React Query60- **State Management**: React Query for server state, co-located UI state in components/hooks61- **Component Structure**: Separate render logic (`.tsx`) from business logic (`use*.ts` hooks)62- **Workflow Builder**: Visual graph editor using @xyflow/react63- **UI Components**: shadcn/ui (Radix UI primitives) with Tailwind CSS styling64- **Icons**: Hugeicons (stroke-rounded) only, rendered through the `Icon` atom65- **Feature Flags**: LaunchDarkly integration66- **Error Handling**: ErrorCard for render errors, toast for mutations, Sentry for exceptions67- **Testing**: Vitest + React Testing Library + MSW for integration tests (primary), Playwright for E2E, Storybook for visual6869## Environment Configuration7071`.env.default` (defaults) → `.env` (user overrides)7273## Feature Development7475See @CONTRIBUTING.md for complete patterns. Quick reference:76771. **Pages**: Create in `src/app/(platform)/feature-name/page.tsx`78 - Extract component logic into custom hooks grouped by concern, not by component. Each hook should represent a cohesive domain of functionality (e.g., useSearch, useFilters, usePagination) rather than bundling all state into one useComponentState hook.79 - Put each hook in its own `.ts` file80 - Put sub-components in local `components/` folder81 - Component props should be `type Props = { ... }` (not exported) unless it needs to be used outside the component822. **Components**: Structure as `ComponentName/ComponentName.tsx` + `useComponentName.ts` + `helpers.ts`83 - Use design system components from `src/components/` (atoms, molecules, organisms)84 - Never use `src/components/__legacy__/*`853. **Data fetching**: Use generated API hooks from `@/app/api/__generated__/endpoints/`86 - Regenerate with `pnpm generate:api`87 - Pattern: `use{Method}{Version}{OperationName}`884. **Styling**: Tailwind CSS only, use design tokens, Hugeicons only89 - Import icon data from `@hugeicons/core-free-icons` and render it with the `Icon` atom (`src/components/atoms/Icon/Icon.tsx`), e.g. `<Icon icon={Delete02Icon} size={16} />`.90 - Never render `HugeiconsIcon` directly — the atom applies the 2px design-system stroke width.91 - Type icon-carrying props with `IconSvgElement` from `@hugeicons/react`.925. **Testing**: Integration tests are the default (~90%). See `TESTING.md` for full details.93 - **New pages/features**: Write integration tests in `__tests__/` next to `page.tsx` using Vitest + RTL + MSW94 - **API mocking**: Use Orval-generated MSW handlers from `@/app/api/__generated__/endpoints/{tag}/{tag}.msw.ts`95 - **Run**: `pnpm test:unit` (integration/unit), `pnpm test` (Playwright E2E)96 - **Storybook**: For design system components in `src/components/`97 - **TDD**: Write a failing test first, implement, then verify986. **Code conventions**:99 - Use function declarations (not arrow functions) for components/handlers100 - Do not use `useCallback` or `useMemo` unless asked to optimise a given function101 - Do not type hook returns, let Typescript infer as much as possible102 - Never type with `any` unless a variable/attribute can ACTUALLY be of any type103 - avoid index and barrel files104
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Significant-Gravitas/AutoGPTautogpt_platform/frontend/src/tests/AGENTS.md · 187k | AGENTS.md | teststylearchtypes+2 | 81/100 | 14 days ago | |
| Significant-Gravitas/AutoGPT.github/copilot-instructions.md · 187k | Copilot instructions | setupbuildtestlint-format+10 | 88/100 | 9 days ago | |
| Significant-Gravitas/AutoGPTautogpt_platform/AGENTS.md · 187k | AGENTS.md | setuptestarchtesting-strategy+3 | 77/100 | 9 days ago | |
| Significant-Gravitas/AutoGPTAGENTS.md · 187k | AGENTS.md | teststylearchgit+1 | 87/100 | 14 days ago | |
| Significant-Gravitas/AutoGPTautogpt_platform/backend/AGENTS.md · 187k | AGENTS.md | setuptestlint-formatstyle+10 | 81/100 | 9 days ago | |
| Significant-Gravitas/AutoGPTautogpt_platform/backend/backend/copilot/graphiti/AGENTS.md · 187k | AGENTS.md | styleperformance | 66/100 | 14 days ago | |
| Significant-Gravitas/AutoGPTclassic/CLAUDE.md · 187k | CLAUDE.md | setuptestlint-formatstyle+7 | 89/100 | today | |
| Significant-Gravitas/AutoGPTclassic/direct_benchmark/CLAUDE.md · 187k | CLAUDE.md | setuptestlint-formatarch+4 | 78/100 | 14 days ago | |
| Significant-Gravitas/AutoGPTclassic/forge/CLAUDE.md · 187k | CLAUDE.md | teststylearchtypes+3 | 73/100 | 14 days ago | |
| Significant-Gravitas/AutoGPTclassic/original_autogpt/CLAUDE.md · 187k | CLAUDE.md | testarchuiperformance+2 | 90/100 | 14 days ago | |
| Significant-Gravitas/AutoGPT.claude/skills/vercel-react-best-practices/AGENTS.md · 187k | AGENTS.md | buildlint-formatstyledependencies+4 | 61/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| vllm-project/vllmAGENTS.md · 89k | AGENTS.md | setuptestlint-formatstyle+5 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/significant-gravitas-autogpt-autogpt-platform-frontend-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.