docs: add Sync-From-Code rule + Activity Log

- AGENTS.md: mandate Activity Log entry + section updates after every code push
- 09 - Audits/Activity Log.md: new append-only log, seeded with this session's
  frontend fixes (Docker build unblock, request template debug improvements,
  429 storm fix) and the cross-repo rule rollout

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
moojttaba
2026-05-28 10:39:57 +03:30
parent f03519bbfb
commit 04afa95547
2 changed files with 106 additions and 2 deletions

View File

@@ -0,0 +1,76 @@
---
title: Activity Log
tags: [audit, log, append-only]
created: 2026-05-28
---
# Activity Log
Append-only log of every `git push` from `backend` and `frontend`. Newest
entries on top. Maintained by agents per the rule in `../AGENTS.md`.
---
### 2026-05-28 — backend@e46be98, frontend@af77b3c — add nick-doc sync rule + version bumps
**Commits:** backend `e46be98` (2.6.24 → 2.6.25), frontend `af77b3c` (2.6.25 → 2.6.26)
**Touched:** `backend/AGENTS.md`, `frontend/AGENTS.md` (new), both `package.json` +
`package-lock.json`
**Why:** Establish a mandatory rule that every code push must be followed by a
nick-doc Activity Log entry (and relevant section updates) so the vault never
falls behind the code. Frontend AGENTS.md created from scratch (was missing).
**Verification:** Pushed to `integrate-main-into-development` on both repos —
Woodpecker builds pending.
**Linked docs updated:** This vault's `AGENTS.md` updated with the same rule.
**Note:** Backend (2.6.25) and frontend (2.6.26) are intentionally one patch
apart — backend was a version behind before this session. Should be re-aligned
on the next paired bump.
---
### 2026-05-28 — frontend@9d4aa37 — fix 429 request storm on template SWR hooks
**Commits:** `9d4aa37`
**Touched:** `src/actions/request-template.ts`
**Why:** Production browser showed repeated 429 (Too Many Requests) on
`/api/marketplace/request-templates/sellers`. Default SWR config was
revalidating on focus/reconnect and retrying on errors, making backend
rate-limit recover impossible without a restart.
**Verification:** Pushed, awaiting Woodpecker build. Visual confirmation on
dev.amn.gg after deploy.
**Linked docs updated:** none yet — SWR pattern should be promoted to
`07 - Development/Coding Standards.md` in a follow-up.
---
### 2026-05-28 — frontend@6c89444 — improve request template form debug feedback
**Commits:** `6c89444`
**Touched:** `src/sections/request-template/request-template-new-edit-form.tsx`
**Why:** Users could not tell why "ایجاد قالب" failed — validation errors
silently blocked submission, API errors collapsed to generic "خطایی رخ داده
است!", and the "انتشار" Switch in renderActions was visual-only.
**Verification:** Type-check passes via Docker build in prior session; manual
browser test pending.
**Linked docs updated:** none.
---
### 2026-05-27 — frontend@8c0f14d, ad498f4, f3a3c9d, bb72a66 — unblock 2.6.19 Docker build
**Commits:** `bb72a66` `f3a3c9d` `ad498f4` `8c0f14d`
**Touched:** `src/sections/request-template/request-template-checkout-payment.tsx`,
`src/web3/components/wallet-selector.tsx`, `tsconfig.json`, `src/types/payment.ts`
**Why:** Docker build was failing on TypeScript compilation after the
wallet-support + test-payment feature merge. Four distinct errors fixed:
User type uses `_id` not `id`; wallet-selector imported non-existent
`@/components/ui/dialog`; `@/*` path alias missing from tsconfig; IPayment
metadata type didn't allow test-payment fields.
**Verification:** Local `docker build` succeeded — image
`escrow-frontend:2.6.19` created.
**Linked docs updated:** none — should add SWR + UI library notes to
`07 - Development/Coding Standards.md`.
---
<!-- Add new entries above this line. Newest at top. -->

View File

@@ -4,11 +4,39 @@ This documentation workspace uses Taskmaster as the source of truth for agent wo
## Repository Rules ## Repository Rules
- Repository-wide operating rules live in `../RTK.md`; follow them in addition to this file. - Repository-wide operating rules live in `RTK.md` at this vault root; follow them in addition to this file.
- For product or code changes that affect frontend or backend, keep `frontend` and `backend` package versions/build numbers bumped together and synchronized unless the user explicitly asks otherwise. - For product or code changes that affect frontend or backend, keep `frontend` and `backend` package versions/build numbers bumped together and synchronized unless the user explicitly asks otherwise.
- Preserve Telegram Mini App auth retry behavior: `/api/auth/telegram` must accept repeated valid `initData` for the same launch session; replay rejection belongs only on one-time routes such as webhook/session creation. - Preserve Telegram Mini App auth retry behavior: `/api/auth/telegram` must accept repeated valid `initData` for the same launch session; replay rejection belongs only on one-time routes such as webhook/session creation.
- In the final response, mention version/build bumps and verification commands when they were part of the work. - In the final response, mention version/build bumps and verification commands when they were part of the work.
## Sync-From-Code Rule (MANDATORY)
Whenever an agent finishes a commit-push in `../backend` or `../frontend`, this
vault MUST be updated **in the same working session**:
1. Add a new entry to `09 - Audits/Activity Log.md` — newest at the top.
Use this template:
```markdown
### YYYY-MM-DD — <repo>@<short-sha> — <one-line summary>
**Commits:** `<sha1>` `<sha2>` …
**Touched:** path/one.ts, path/two.tsx
**Why:** <motivation — bug, feature, PRD link, incident #>
**Verification:** <build status, smoke result, manual check>
**Linked docs updated:** [[03 - API Reference/Foo]], [[04 - Flows/Bar]]
```
2. If the change affects API surface, data models, flows, architecture, ops,
env vars, or design, update the matching numbered section in this vault
in addition to the Activity Log entry (do not just log it).
3. Commit with message: `docs: sync from <repo> <short-sha> — <summary>` and
push to `origin/main`.
The companion `AGENTS.md` files at `../backend/AGENTS.md` and
`../frontend/AGENTS.md` carry the same rule from the code-side.
## Taskmaster Workflow ## Taskmaster Workflow
- Before choosing implementation or documentation work, run `task-master next` from the repository root. - Before choosing implementation or documentation work, run `task-master next` from the repository root.
@@ -35,5 +63,5 @@ Do not hand-edit `.taskmaster/tasks/tasks.json` or generated task markdown files
- Treat pending Taskmaster tasks as the prioritized backlog. - Treat pending Taskmaster tasks as the prioritized backlog.
- Respect task dependencies shown by `task-master next` and `task-master show`. - Respect task dependencies shown by `task-master next` and `task-master show`.
- Update the relevant task whenever edits, findings, verification results, or blockers materially change the state of the work. - Update the relevant task whenever edits, findings, verification results, or blockers materially change the state of the work.
- Before the final response, confirm that Taskmaster reflects the current task status. - Before the final response, confirm that Taskmaster reflects the current task status AND that the Activity Log has the latest push entry (if a push happened in this session).
- If `task-master` is unavailable, mention that in the final response and summarize the Taskmaster update that should be applied manually. - If `task-master` is unavailable, mention that in the final response and summarize the Taskmaster update that should be applied manually.