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