Skip to content

Commit f692c1b

Browse files
committed
feat(dev-hub) Add agents.md file
1 parent 3efdf87 commit f692c1b

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed

apps/developer-hub/AGENTS.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
5+
The Developer Hub is a Next.js app rooted in `src/`: routes live under `src/app`, shared UI in `src/components`, config helpers in `src/config`, and utilities in `src/lib`. Documentation sits in `content/docs`, grouped per product with `index.mdx`, supporting guides, and a `meta.json` navigation manifest; assets belong in `public/images`.
6+
7+
## Build, Test, and Development Commands
8+
9+
- `pnpm turbo run start:dev` — Next.js dev server on port 3627 with hot reload.
10+
- `pnpm turbo run build` / `pnpm turbo run start:prod` — Build and preview the production bundle.
11+
- `pnpm turbo run fix:format|fix:lint:eslint|fix:lint:stylelint` — Auto-apply Prettier, ESLint, and Stylelint fixes.
12+
- `pnpm turbo run test:format|test:lint:*|test:types` — CI-aligned format/lint/type checks.
13+
- `pnpm run generate:docs` — Execute `scripts/generate-docs.ts` via Bun for bulk doc updates.
14+
15+
## Coding Style & Naming Conventions
16+
17+
Follow the repo-wide Prettier profile from `@cprussin/prettier-config` and let it win. ESLint extends Next.js rules, so fix warnings rather than disabling them. React components and hooks live in PascalCase files (`src/components/DataWidget.tsx`, `src/lib/usePriceFeed.ts`), while route folders and MDX filenames stay kebab-case (`content/docs/price-feeds/core/index.mdx`). Keep SCSS modules scoped per component and draft styles with the shared design tokens.
18+
19+
## Testing Guidelines
20+
21+
Treat linting and type-checking as the gate: run `pnpm turbo run test:lint:eslint`, `...test:lint:stylelint`, and `...test:types` before review. Jest inherits `@pythnetwork/jest-config`; colocate specs as `*.test.ts(x)` files or `__tests__` folders and run them with `pnpm jest <pattern>`. Trigger at least one production build (`pnpm turbo run build`) whenever you change routing, MDX schema, or generated docs.
22+
23+
## Commit & Pull Request Guidelines
24+
25+
History mixes terse imperatives (`fix`, `tempo`) with occasional scopes (`fix(contract-manager)`), so write short, present-tense summaries, optionally scoped (for example, `add(price-feeds): describe fogo-testnet`). Reference issues and list the scripts you ran. Pull requests should bundle a concise description, screenshots or terminal output for UI/docs edits, documentation impact notes, and confirmation that lint/format/type checks passed. When touching docs navigation, call out the affected `content/docs/.../meta.json` entry.
26+
27+
## Security & Configuration Tips
28+
29+
Never commit secrets: keep `.env*`, API keys, and tokens in local-only files such as `.env.local`, and document placeholders via `.env.example`. Append any ad hoc config to `.gitignore` and confirm with `git status -uall` that nothing sensitive is staged. Review third-party embeds plus config changes (`vercel.json`, route handlers, API clients) for auth, header, and input-validation regressions, and rotate keys if they ever leave trusted secret stores.

apps/developer-hub/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,18 @@ Update the `meta.json` file in each section to control navigation. Example:
102102
```
103103

104104
3. Create a new branch for your changes
105-
4. Make your edits to the relevant `.mdx` files
106-
5. Preview your changes locally using the dev server
107-
6. Run linting/formatting checks:
105+
4. Review the contributor guide in [AGENTS.md](./AGENTS.md) for project structure, coding standards, and security notes
106+
5. Make your edits to the relevant `.mdx` files
107+
6. Preview your changes locally using the dev server
108+
7. Run linting/formatting checks:
108109

109110
```bash
110111
pnpm turbo run fix:format
111112
pnpm turbo run fix:lint:eslint
112113
```
113114

114-
7. Commit and push your changes to your fork
115-
8. Submit a pull request from your fork with a clear description of your changes
115+
8. Commit and push your changes to your fork
116+
9. Submit a pull request from your fork with a clear description of your changes
116117

117118
### Content Best Practices
118119

0 commit comments

Comments
 (0)