88 lines
2.4 KiB
Markdown
88 lines
2.4 KiB
Markdown
|
|
# AGENTS.md — Throne of the Bone King
|
||
|
|
|
||
|
|
AI agent and coding assistant instructions for this repo.
|
||
|
|
|
||
|
|
## Project Summary
|
||
|
|
React Native 0.85.3 mobile app. Part of the **Bone Lord Bob** universe.
|
||
|
|
See `llm.txt` for full project context and stack details.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Ground Rules
|
||
|
|
|
||
|
|
### Do
|
||
|
|
- Write TypeScript — strict, no `any` unless genuinely unavoidable
|
||
|
|
- Use functional components and React hooks exclusively
|
||
|
|
- Follow existing naming conventions (PascalCase components, camelCase hooks/utils)
|
||
|
|
- Use `StyleSheet.create()` for styles
|
||
|
|
- Write tests for new logic in `__tests__/`
|
||
|
|
- Commit as **Jacob Mathison** (`jacob@mathisonprojects.com`) — never commit as an AI identity
|
||
|
|
|
||
|
|
### Don't
|
||
|
|
- Don't use browser/DOM APIs (`window`, `document`, `localStorage`) — this is React Native
|
||
|
|
- Don't install packages without noting them; confirm major additions with the team
|
||
|
|
- Don't modify `android/` or `ios/` native files unless explicitly asked
|
||
|
|
- Don't commit `node_modules/`, `Pods/`, or build artifacts
|
||
|
|
- Don't run destructive commands (`rm -rf`, `git push --force`) without confirmation
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Structure Conventions
|
||
|
|
```
|
||
|
|
src/ # (create when adding more than a few components)
|
||
|
|
components/ # Reusable UI components
|
||
|
|
screens/ # Screen-level components
|
||
|
|
hooks/ # Custom hooks
|
||
|
|
utils/ # Helper functions
|
||
|
|
types/ # Shared TypeScript types
|
||
|
|
assets/ # Images, fonts, icons
|
||
|
|
```
|
||
|
|
Keep `App.tsx` as the navigation root. Move feature code into `src/` once the project grows.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Common Tasks
|
||
|
|
|
||
|
|
### Add a new screen
|
||
|
|
1. Create `src/screens/YourScreen.tsx`
|
||
|
|
2. Register in the navigator (once navigation is set up)
|
||
|
|
3. Add a test in `__tests__/YourScreen.test.tsx`
|
||
|
|
|
||
|
|
### Run the app
|
||
|
|
```bash
|
||
|
|
npm install
|
||
|
|
# iOS (first time or after native changes):
|
||
|
|
cd ios && bundle exec pod install && cd ..
|
||
|
|
npm run ios
|
||
|
|
|
||
|
|
# Android:
|
||
|
|
npm run android
|
||
|
|
```
|
||
|
|
|
||
|
|
### Lint + Format
|
||
|
|
```bash
|
||
|
|
npm run lint # ESLint
|
||
|
|
npx prettier --write . # Format all files
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Commit Message Format
|
||
|
|
```
|
||
|
|
type(scope): short description
|
||
|
|
|
||
|
|
Types: feat | fix | chore | docs | refactor | test | style
|
||
|
|
Examples:
|
||
|
|
feat(screens): add BoneKingHomeScreen
|
||
|
|
fix(android): resolve gradle build error
|
||
|
|
chore(deps): bump react-native to 0.85.3
|
||
|
|
docs: update AGENTS.md
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Gitea Repo
|
||
|
|
`http://100.79.253.19:3000/jacob-mathison/blb-throne-of-the-bone-king`
|
||
|
|
|
||
|
|
Default branch: `main`
|