Skip to content

Commit eb05666

Browse files
authored
Merge pull request #17 from CoolSpring8/agents-md-revision
Update AGENTS.md with development practices and coding guidelines
2 parents 26aa4a5 + 9c330b9 commit eb05666

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

AGENTS.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,35 @@
33
## Project Structure & Module Organization
44

55
- Source lives in `src/` (`index.tsx`, `App.tsx`, `index.css`). Build output goes to `dist/`.
6-
- Providers only in `index.tsx` (e.g., `MantineProvider`). `App.tsx` owns application state, while presentational pieces live in `src/components/`.
6+
- Providers only in `index.tsx` (e.g., `MantineProvider`). `App.tsx` coordinates views and settings; conversation state and snapshots live in the Zustand store (`src/tree/useConversationTree.ts`, `src/tree/types.ts`), and AI provider helpers live in `src/ai/openaiCompatible.ts`.
7+
- Components under `src/components/` include their own UI behavior (hover/edit states, popovers, menus) rather than being purely presentational.
78
- Key config: `rsbuild.config.mjs`, `tsconfig.json`, `tailwind.config.js`, `postcss.config.js`, `biome.json`.
89

910
## Build, Test, and Development Commands
1011

1112
- Install: `bun install` (use Bun for everything; a `bun.lock` is present).
1213
- Dev server: `bun dev` (Rsbuild) — starts hot‑reload and opens the browser.
1314
- Production build: `bun build-dist` — emits static assets to `dist/` (scripts/styles are inlined by Rsbuild config).
14-
- Preview production build: `bun preview` — serves the built output locally.
1515

1616
## Coding Style & Naming Conventions
1717

18-
- Language: TypeScript + React 18; Tailwind for styling.
19-
- Indentation: one tab (Biome default). Keep code concise and self‑documenting.
18+
- Language: TypeScript + React 18; Mantine for UI; Tailwind for styling.
19+
- Indentation: one tab (Biome default) except for Markdown files where space indentation is used. Keep code concise and self‑documenting.
2020
- Formatting: use Biome. Run `bunx biome check --write .` to format and organize imports.
21-
- Components: prefer small presentational components in `src/components/`; keep core state and data flow inside `App.tsx`.
21+
- Type-checking: use tsc. Run `bunx tsc --noEmit` to check for type errors.
22+
- Components: keep UI logic close to the component (e.g., hover/edit toggles in `MessageItem`, menu interactions in `DiagramView`); shared conversation/tree logic belongs in the store.
2223
- CSS: prefer Tailwind utilities; add global styles in `src/index.css` only when necessary.
2324

24-
## Testing Guidelines
25+
## Providers & Capabilities
2526

26-
- No test runner is configured. Include clear manual verification steps in PRs; optional minimal tests (`*.test.ts(x)`) can land in a follow‑up.
27-
- Verify `bun build-dist` and core flows in README “Usage Tips”.
27+
- OpenAI-compatible: supports chat and text completion views.
28+
- Built-in AI (Chrome/Edge): chat-only; text view is disabled.
29+
30+
## Validation & DevTools MCP
31+
32+
- Assume `bun dev` is already running locally; don’t start it from the agent unless explicitly asked.
33+
- Use Chrome DevTools MCP to navigate to `http://localhost:8080/` to check the UI after changes.
34+
- Avoid shell curls to localhost unless the user explicitly requests; rely on MCP interactions for UI checks.
2835

2936
## Commit & Pull Request Guidelines
3037

0 commit comments

Comments
 (0)