2.8 KiB
2.8 KiB
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…”
- “I’m going to…”
Prefer:
- “Updated environment files.”
- “Applied tenant config fix.”
RTK RULES (MANDATORY)
Always prefer RTK commands.
Use:
rtk lsrtk greprtk smartrtk readrtk git diffrtk git status
Avoid raw:
catgreprgtreegit diff- recursive
find
Use raw shell only for:
- builds
- runtime/debugging
- Docker
- pnpm
- commands RTK cannot perform
FILE READING POLICY
Preferred order:
rtk greprtk smartrtk 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:
rtk grep "<component-name>"rtk smart component.ts- Read template only if UI changes are required
- 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
default→dist/productiontis→dist/tis
Keep Docker DIST_DIR aligned with Angular output.
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_defaultdocker 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