Skip to content

Commit eda86ac

Browse files
committed
feat: enhance agent orchestration with clarification
1 parent 373ed9a commit eda86ac

38 files changed

Lines changed: 1028 additions & 231 deletions

.agent/rules/build-guide.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description: when working for building, running, or deploying the project
88
## Quick Start
99

1010
### Prerequisites
11+
1112
Ensure you have `mise` installed for runtime management.
1213

1314
```bash
@@ -23,6 +24,7 @@ mise current
2324
This project uses mise monorepo mode with `//path:task` syntax.
2425

2526
### Root (All Apps)
27+
2628
```bash
2729
# List all available tasks
2830
mise tasks --all
@@ -50,6 +52,7 @@ mise gen:api
5052
```
5153

5254
### API (apps/api)
55+
5356
```bash
5457
# Start development server
5558
mise //apps/api:dev
@@ -86,6 +89,7 @@ docker build -t api apps/api
8689
```
8790

8891
### Web (apps/web)
92+
8993
```bash
9094
# Start development server
9195
mise //apps/web:dev
@@ -113,6 +117,7 @@ docker build -t web apps/web
113117
```
114118

115119
### Worker (apps/worker)
120+
116121
```bash
117122
# Start worker
118123
mise //apps/worker:dev
@@ -131,6 +136,7 @@ docker build -t worker apps/worker
131136
```
132137

133138
### Mobile (apps/mobile)
139+
134140
```bash
135141
# Run on device/simulator
136142
mise //apps/mobile:dev
@@ -155,6 +161,7 @@ mise //apps/mobile:gen:api
155161
```
156162

157163
### Fastlane (Mobile CI/CD)
164+
158165
```bash
159166
cd apps/mobile
160167

@@ -171,6 +178,7 @@ bundle exec fastlane ios testflight_deploy # Deploy to TestFlight
171178
```
172179

173180
### Infrastructure (apps/infra)
181+
174182
```bash
175183
# Initialize Terraform
176184
mise //apps/infra:init
@@ -189,6 +197,7 @@ mise //apps/infra:apply:prod
189197
```
190198

191199
### i18n (packages/i18n)
200+
192201
```bash
193202
# Build i18n files for web and mobile
194203
mise //packages/i18n:build
@@ -203,38 +212,45 @@ mise //packages/i18n:build:mobile
203212
## Docker Compose (Local Development)
204213

205214
### Start Infrastructure
215+
206216
```bash
207217
mise //apps/api:infra:up
208218
```
209219

210220
This starts:
221+
211222
- PostgreSQL (port 5432)
212223
- Redis (port 6379)
213224
- MinIO (ports 9000, 9001)
214225

215226
### Stop Infrastructure
227+
216228
```bash
217229
mise //apps/api:infra:down
218230
```
219231

220232
### Reset Infrastructure (with data)
233+
221234
```bash
222235
docker compose -f apps/api/docker-compose.infra.yml down -v
223236
```
224237

225238
## Database Migrations
226239

227240
### Create Migration
241+
228242
```bash
229243
mise //apps/api:migrate:create "description of changes"
230244
```
231245

232246
### Apply Migrations
247+
233248
```bash
234249
mise //apps/api:migrate
235250
```
236251

237252
### Rollback Migration
253+
238254
```bash
239255
cd apps/api
240256
uv run alembic downgrade -1
@@ -243,20 +259,23 @@ uv run alembic downgrade -1
243259
## Common Build Issues
244260

245261
### Python Import Errors
262+
246263
```bash
247264
# Ensure virtual environment is activated
248265
cd apps/api
249266
uv sync --frozen
250267
```
251268

252269
### Node Module Issues
270+
253271
```bash
254272
# Clear node_modules and reinstall
255-
rm -rf node_modules pnpm-lock.yaml
256-
pnpm install
273+
rm -rf node_modules bun-lock.yaml
274+
bun install
257275
```
258276

259277
### Flutter Build Issues
278+
260279
```bash
261280
# Clean and rebuild
262281
flutter clean
@@ -265,6 +284,7 @@ dart run build_runner build --delete-conflicting-outputs
265284
```
266285

267286
### Terraform State Issues
287+
268288
```bash
269289
cd apps/infra
270290

.agent/rules/lint-format-guide.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description: when working for linting and formatting.
88
## Overview
99

1010
This project uses:
11+
1112
- **Biome** for JavaScript/TypeScript (lint + format)
1213
- **Ruff** for Python (lint + format)
1314
- **dart analyze** for Dart/Flutter
@@ -16,10 +17,11 @@ This project uses:
1617
## Quick Commands
1718

1819
### Check All
20+
1921
```bash
2022
# From root
21-
pnpm lint # Biome check
22-
pnpm format:check # Biome format check
23+
bun lint # Biome check
24+
bun format:check # Biome format check
2325

2426
# Python (in apps/api or apps/worker)
2527
poe lint # Ruff check
@@ -33,10 +35,11 @@ terraform fmt -check -recursive
3335
```
3436

3537
### Fix All
38+
3639
```bash
3740
# From root
38-
pnpm lint:fix # Biome fix
39-
pnpm format # Biome format
41+
bun lint:fix # Biome fix
42+
bun format # Biome format
4043

4144
# Python
4245
poe lint:fix # Ruff fix
@@ -49,30 +52,35 @@ terraform fmt -recursive
4952
## Biome (JavaScript/TypeScript)
5053

5154
### Configuration
55+
5256
See `biome.json` at project root.
5357

5458
### Key Rules
59+
5560
- Indent: 2 spaces
5661
- Quotes: double
5762
- Semicolons: required
5863
- Trailing commas: ES5
5964
- Line width: 100
6065

6166
### Lint Categories
67+
6268
- **Correctness**: Errors that will cause bugs
6369
- **Suspicious**: Likely bugs or confusing code
6470
- **Style**: Code style issues
6571
- **Complexity**: Overly complex code
6672
- **Security**: Potential security issues
6773

6874
### Ignored Patterns
75+
6976
- `node_modules/`
7077
- `.next/`
7178
- `dist/`
7279
- `coverage/`
7380
- Generated files (`*.gen.ts`)
7481

7582
### Editor Integration
83+
7684
```json
7785
// .vscode/settings.json
7886
{
@@ -90,15 +98,18 @@ See `biome.json` at project root.
9098
## Ruff (Python)
9199

92100
### Configuration
101+
93102
See `ruff.toml` in `apps/api/` and `apps/worker/`.
94103

95104
### Key Rules
105+
96106
- Line length: 88
97107
- Target: Python 3.12
98108
- Indent: 4 spaces
99109
- Quotes: double
100110

101111
### Rule Sets
112+
102113
- **E/W**: pycodestyle (errors/warnings)
103114
- **F**: Pyflakes
104115
- **I**: isort (import sorting)
@@ -110,6 +121,7 @@ See `ruff.toml` in `apps/api/` and `apps/worker/`.
110121
- **RUF**: Ruff-specific
111122

112123
### Editor Integration
124+
113125
```json
114126
// .vscode/settings.json
115127
{
@@ -126,19 +138,23 @@ See `ruff.toml` in `apps/api/` and `apps/worker/`.
126138
## Dart/Flutter
127139

128140
### Configuration
141+
129142
See `analysis_options.yaml` in `apps/mobile/`.
130143

131144
### Key Rules
145+
132146
- Strict mode enabled
133147
- All recommended lints
134148
- Flutter-specific lints
135149

136150
### Editor Integration
151+
137152
Dart extension automatically uses `analysis_options.yaml`.
138153

139154
## Terraform
140155

141156
### Formatting
157+
142158
```bash
143159
# Check format
144160
terraform fmt -check -recursive
@@ -148,6 +164,7 @@ terraform fmt -recursive
148164
```
149165

150166
### Validation
167+
151168
```bash
152169
terraform validate
153170
```
@@ -172,6 +189,7 @@ chmod +x .git/hooks/commit-msg
172189
```
173190

174191
The pre-commit task runs lint for changed apps:
192+
175193
- `apps/api/` changes → `mise //apps/api:lint`
176194
- `apps/web/` changes → `mise //apps/web:lint`
177195
- `apps/worker/` changes → `mise //apps/worker:lint`
@@ -185,7 +203,7 @@ GitHub Actions runs linting on every PR:
185203

186204
```yaml
187205
- name: Lint JS/TS
188-
run: pnpm lint
206+
run: bun lint
189207

190208
- name: Lint Python
191209
run: |
@@ -206,10 +224,13 @@ GitHub Actions runs linting on every PR:
206224
## Troubleshooting
207225
208226
### Biome Conflicts with Other Formatters
227+
209228
Disable other formatters in VS Code settings and set Biome as default.
210229
211230
### Ruff Import Sorting Issues
231+
212232
Ensure `I` rule set is enabled and run `ruff check --fix --select I`.
213233

214234
### Dart Analysis Takes Too Long
235+
215236
Run `flutter clean` then `flutter pub get` to regenerate analysis.

0 commit comments

Comments
 (0)