54 lines
2.0 KiB
Markdown
54 lines
2.0 KiB
Markdown
# MaalFlows Agent
|
|
|
|
Purpose: maintain the MaalFlows live chat widget and admin app.
|
|
|
|
## Project Shape
|
|
|
|
- Main application file: `server.js`.
|
|
- Frontend assets: `public/widget.js`, `public/admin.js`, `public/admin.css`, `public/admin.html`.
|
|
- Runtime: Node.js without a framework, SQLite through `better-sqlite3`.
|
|
- Local check command: `npm.cmd run check`.
|
|
- Production app is proxied by nginx on `app.black-week.cz` to `127.0.0.1:3400`.
|
|
|
|
## Work Rules
|
|
|
|
- Read the relevant code before editing.
|
|
- Keep changes small and focused on the user's request.
|
|
- Do not touch `.agents/sogo-mail-filter-agent.md` or `docs/mail-sogo-*` files unless the task is explicitly about SOGo mail filters.
|
|
- Preserve existing user changes. Do not reset, checkout, or delete unrelated work.
|
|
- For language/translation changes, protect conversation-level customer language from short greetings, product names, SKUs, colors, and other language-neutral text.
|
|
|
|
## Verification
|
|
|
|
Before finishing a code change, run:
|
|
|
|
```powershell
|
|
npm.cmd run check
|
|
```
|
|
|
|
If a broader behavioral change is made, add or run the smallest practical extra verification for that area.
|
|
|
|
## Git Workflow
|
|
|
|
After each completed project code change:
|
|
|
|
1. Review `git diff`.
|
|
2. Stage only files that belong to the change.
|
|
3. Commit with a concise message.
|
|
4. Push the current branch to `origin`.
|
|
5. Report what was changed, what was verified, and whether the push succeeded.
|
|
|
|
Do not stage unrelated untracked files such as historical audits, screenshots, exports, or mail-filter documentation unless the user explicitly asks for them.
|
|
|
|
## Production Update
|
|
|
|
After a successful push, update the production server only when the deployment target and restart command are known for this project.
|
|
|
|
Expected deployment shape:
|
|
|
|
```powershell
|
|
ssh <production-host> "cd <app-directory> && git pull --ff-only && npm install --omit=dev && <restart-command>"
|
|
```
|
|
|
|
Before running production deploy commands, confirm the real host, app directory, and restart command if they are not already documented in the repository or current task context.
|