docs: add /cms-feature workflow for CMS development
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions
Procedural companion to the steering rule: implementation constraints (no node_modules, CSRF, secret handling), mandatory guide update in the same commit, the CMS test suite to run, and staging restart + verification steps.
This commit is contained in:
@@ -279,6 +279,7 @@ Az `.agent/workflows/` mappában találhatók az elérhető slash command workfl
|
||||
| --- | --- |
|
||||
| `/new-feature` | Új funkció fejlesztési folyamata |
|
||||
| `/fix-bug` | Hibajavítás folyamata |
|
||||
| `/cms-feature` | CMS (Content Editor) fejlesztési folyamata |
|
||||
| `/review` | Kód review checklist |
|
||||
| `/deploy` | Deployment folyamata |
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
description: CMS (Content Editor) fejlesztési munkafolyamata — módosítástól a staging élesítésig
|
||||
---
|
||||
|
||||
# CMS Fejlesztési Workflow (/cms-feature)
|
||||
|
||||
A `content-editor.js`, a hozzá tartozó scriptek (`scripts/markdown-render.js`, `scripts/test-content-editor-*.js`) és a CMS-en keresztül szerkeszthető tartalmi sémák (`proto/src/content/schema.js`) módosításakor kövesd ezt a folyamatot.
|
||||
|
||||
A szabály (a *miért*): `.agent/steering/development-rules.md` → „Felhasználói dokumentáció karbantartása". Ez a fájl a *hogyan*-t írja le.
|
||||
|
||||
---
|
||||
|
||||
## 1. Tervezés
|
||||
|
||||
- Fogalmazd meg, mi változik a felhasználó szemszögéből (új gomb? más viselkedés? új hibaüzenet?)
|
||||
- **Új endpoint vagy UI elem esetén**: tervezd meg az útmutató érintett szakaszának frissítését is.
|
||||
- Content séma (`schema.js`) változásnál ellenőrizd, hogy a meglévő JSON fájlok mind átmegyek az új sémán.
|
||||
|
||||
## 2. Implementáció
|
||||
|
||||
- A CMS system Nodeon fut, **nincs node_modules** — csak beépítő modulokat használj (`http`, `fs`, `path`, `crypto`, `child_process`).
|
||||
- Fájlméret: a `content-editor.js` közelít a 300 soros soft limit felé — nagyobb funkciót szervezz ki külön modulba (pl. `scripts/markdown-render.js` minta).
|
||||
- Biztonsági követelmények:
|
||||
- Minden új POST endpoint **CSRF token ellenőrzéssel**.
|
||||
- Új GET endpoint **auth után** serviced (kivétel: `/logout` minta).
|
||||
- User input escape-elés (lásd `escapeHtml` a markdown rendererben).
|
||||
- Titok soha nem kerül kimenetre — válaszkóddal (401/200) igazolj.
|
||||
|
||||
## 3. Útmutató frissítése (KÖTELEZŐ, ugyanabban a commitban)
|
||||
|
||||
- Forrás: `docs/felhasznaloi-utmutato.md` — a felhasználó nyelvén, nem műszaki részletekkel.
|
||||
- Új UI elem → felület áttekintés szakasz + adott funkció szakasz frissítése.
|
||||
- Támogatott markdown részhalmaz: címsorok, **félkövér**, `kód`, listák, linkek, `---` (táblázat nem — a `scripts/markdown-render.js` nem jeleníti meg).
|
||||
|
||||
## 4. Tesztek
|
||||
|
||||
Minden CMS-változtatás után futtasd mindet:
|
||||
|
||||
```bash
|
||||
node --check content-editor.js
|
||||
node scripts/test-content-editor-security.js # auth, CSRF, XFF
|
||||
node scripts/test-content-editor-serializer.js # collect/reindex regresszió
|
||||
node scripts/test-content-editor-save.js # atomic save + validáció
|
||||
node scripts/test-content-editor-logout.js # /logout viselkedés
|
||||
node scripts/test-content-editor-guide.js # /guide + Súgó link
|
||||
```
|
||||
|
||||
- Új funkcióhoz **új tesztfájl** a fenti minta szerint (valós szervert indító integration teszt ajánlott).
|
||||
- Content séma változásnál: `node scripts/test-content-schema.js` is.
|
||||
|
||||
## 5. Commit
|
||||
|
||||
```bash
|
||||
git add content-editor.js scripts/ docs/felhasznaloi-utmutato.md
|
||||
git commit -m "feat(cms): <rövid leírás>" # vagy fix(cms):
|
||||
```
|
||||
|
||||
- Az útmutató frissítése **ugyanabban a commitban** landol, mint a funkció.
|
||||
- Plane ticket (`Closes MITHOME-XX`) + `node plane-sync.js --yes` a TODO.md szinkronhoz.
|
||||
|
||||
## 6. Staging élesítés és ellenőrzés
|
||||
|
||||
A CMS a websitetől **független szolgáltatás** — deploy szkript nélkül, közvetlenül élesítjük:
|
||||
|
||||
```bash
|
||||
ssh sadmin@llmdev.mozdit.hu '
|
||||
cd /home/sadmin/websitedev && git pull --ff-only origin main &&
|
||||
sudo systemctl restart mozdit-content-editor.service &&
|
||||
systemctl is-active mozdit-content-editor.service'
|
||||
```
|
||||
|
||||
Ellenőrzés (a hitelesítő adatokat az `/etc/mozdit-content-editor.env`-ből olvasd, **soha ne írd ki**):
|
||||
|
||||
```bash
|
||||
# kulcs nélkül 401-et várunk
|
||||
curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:4001/
|
||||
# hitelesített kérést sudo sh -c ". /etc/mozdit-content-editor.env; curl -u ..." mintával futtass
|
||||
```
|
||||
|
||||
- Az érintett funkciókra vonatkozó válaszkódok ellenőrzése (401/200/429 stb.).
|
||||
- Ha a honlap (`proto/`) is változott: `./scripts/deploy_to_stage_on_local.sh` a teljes deployhoz.
|
||||
|
||||
## 7. Bezárás
|
||||
|
||||
- Plane ticket → Done.
|
||||
- `node plane-sync.js --yes` + `git commit -m "sync: ..."` + push.
|
||||
@@ -59,7 +59,7 @@ websitedev/
|
||||
├── .agent/ # AI szabályrendszer ← OLVASD EL
|
||||
│ ├── AGENTS.md # Elsődleges szabályok
|
||||
│ ├── steering/ # Auto-betöltődő irányelvek
|
||||
│ ├── workflows/ # /new-feature, /fix-bug, /review, /deploy
|
||||
│ ├── workflows/ # /new-feature, /fix-bug, /cms-feature, /review, /deploy
|
||||
│ └── references/ # Accessibility checklist
|
||||
├── TODO.md # Feladatlista (Plane szinkron)
|
||||
└── plane-sync.js # Plane szinkronizáló script
|
||||
@@ -97,6 +97,7 @@ Szükséges változók (`.env` és `proto/.env.local`):
|
||||
| `.agent/steering/testing.md` | Tesztelési stratégia, coverage elvárások |
|
||||
| `.agent/workflows/new-feature.md` | Új funkció fejlesztési lépései |
|
||||
| `.agent/workflows/fix-bug.md` | Hibajavítás lépései (TDD) |
|
||||
| `.agent/workflows/cms-feature.md` | CMS fejlesztés + útmutató karbantartás |
|
||||
| `.agent/workflows/review.md` | Code review checklist |
|
||||
| `.agent/workflows/deploy.md` | Deployment folyamat |
|
||||
| `.agent/references/accessibility-checklist.md` | WCAG 2.1 AA ellenőrzőlista |
|
||||
Reference in New Issue
Block a user