Files
psp_panel/agents.md
T

195 lines
2.8 KiB
Markdown
Raw Normal View History

# AGENT.md
## Scope
Applies to the full repository unless overridden by a deeper `AGENT.md`.
Stack:
- Angular 20
- Standalone components
- pnpm
- Docker
- RTK
---
# EXECUTION RULES
- Keep responses short.
- Do not narrate thoughts.
- Do not explain obvious steps.
- Do not create plans for simple tasks.
- Prefer implementation over exploration.
Avoid:
- “I think…”
- “Let me check…”
- “I should inspect…”
- “Im going to…”
Prefer:
- “Updated environment files.”
- “Applied tenant config fix.”
---
# RTK RULES (MANDATORY)
Always prefer RTK commands.
Use:
- `rtk ls`
- `rtk grep`
- `rtk smart`
- `rtk read`
- `rtk git diff`
- `rtk git status`
Avoid raw:
- `cat`
- `grep`
- `rg`
- `tree`
- `git diff`
- recursive `find`
Use raw shell only for:
- builds
- runtime/debugging
- Docker
- pnpm
- commands RTK cannot perform
---
# FILE READING POLICY
Preferred order:
1. `rtk grep`
2. `rtk smart`
3. `rtk read`
Rules:
- Search before reading.
- Read only required files.
- Do not read TS/HTML/SCSS together unless required.
- Stop exploring once edit location is clear.
- Avoid rereading unchanged files.
Large files:
- `rtk read <file> -l aggressive`
---
# ANGULAR WORKFLOW
For components:
1. `rtk grep "<component-name>"`
2. `rtk smart component.ts`
3. Read template only if UI changes are required
4. Read styles only if styling changes are required
Avoid broad module inspection.
---
# TOKEN RULES
Do not:
- dump large files
- scan unrelated folders
- inspect generated directories
- perform repeated searches
- over-explain edits
Avoid:
- `dist/`
- `.angular/`
- `coverage/`
- `node_modules/`
- `.git/`
---
# CHANGE POLICY
- Keep changes minimal and scoped.
- Reuse existing patterns.
- Avoid unrelated refactors.
- Preserve tenant separation.
- Prefer root-cause fixes.
---
# PROJECT RULES
## Tenant Builds
2026-05-10 14:54:53 +03:30
- `default``dist/production`
- `tis``dist/tis`
Keep Docker `DIST_DIR` aligned with Angular output.
2026-05-10 14:54:53 +03:30
Do not use Angular `fileReplacements` for static assets.
---
## Input Component
File:
- `src/app/shared/components/input/input.component.ts`
For:
- `type="number"`
- `type="price"`
Requirements:
- normalize Persian/Arabic digits
- allow only digits and `.`
- support fixed precision
- keep identifier fields string-safe
---
## Shared Field Rules
When creating fields:
- use shared field wrappers
- reuse `app-input`
- register exports in shared indexes
- keep control names consistent
---
# VALIDATION
TypeScript:
- `pnpm -s exec tsc -p tsconfig.app.json --noEmit`
Docker:
- `docker compose build app_default`
- `docker compose build app_tis`
Validate only impacted areas when possible.
---
# FINAL RESPONSE RULES
Keep final responses under 10 lines unless:
- validation failed
- architecture changed
- user requested explanation
Prefer:
Updated:
- file1
- file2
Validation:
- tsc passed