From b6a849a087b0ba0a2d41cdbd101a81922a97f47c Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Tue, 10 Mar 2026 19:43:34 +0700 Subject: [PATCH] docs: Update AGENTS.md with latest website-creator changes - Added Thai legal templates (PDPA compliance) - Cookie consent working implementation - Build testing requirements - Dockerfile deployment (reverted from nixpacks) - Template structure documentation - Complete implementation status --- AGENTS.md | 85 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 77 insertions(+), 8 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 849f296..bc9d86d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,7 @@ # PROJECT KNOWLEDGE BASE **Generated:** 2026-03-08 -**Updated:** 2026-03-08 (SEO Multi-Channel Skills Added) +**Updated:** 2026-03-09 (Website Creator + SEO Skills Complete) **Type:** OpenCode Skills Collection - PDPA-Compliant Website Generator with Auto-Deploy + SEO Multi-Channel Marketing --- @@ -11,19 +11,27 @@ Personal collection of OpenCode skills for AI-powered terminal coding assistant. **INCLUDES:** ### **Core Features:** -- ✅ **Auto-deploy system** - Gitea + Easypanel integration +- ✅ **Auto-deploy system** - Gitea + Easypanel integration (Dockerfile) - ✅ **Unified credentials** - Single .env for all skills -- ✅ **PDPA compliance** - Thai law-compliant websites +- ✅ **PDPA compliance** - Thai law-compliant websites with legal templates - ✅ **Image skills** - Python scripts wrapping Chutes AI APIs -- ✅ **Deployment automation** - Easypanel integration +- ✅ **Deployment automation** - Easypanel with Docker containers +- ✅ **Working cookie consent** - Actually blocks/enables cookies based on user choice -### **NEW: SEO Multi-Channel Marketing (2026-03-08):** +### **SEO Multi-Channel Marketing:** - ✅ **Multi-channel content** - Facebook, Facebook Ads, Google Ads, Blog, X/Twitter - ✅ **Thai language support** - Full PyThaiNLP integration - ✅ **Analytics integration** - Umami, GA4, GSC, DataForSEO - ✅ **Image integration** - Auto-generate/edit images for content - ✅ **Auto-publish** - Direct write to Astro content collections +### **Latest Updates (2026-03-09):** +- ✅ **Website Creator** - Reverted to Dockerfile deployment +- ✅ **Thai Legal Templates** - PDPA-compliant Privacy Policy & Terms of Service +- ✅ **Cookie Consent** - Working implementation (blocks cookies until consent) +- ✅ **Template Structure** - Consistent structure for all websites +- ✅ **Build Testing** - Test build before deployment + --- ## STRUCTURE @@ -63,8 +71,9 @@ opencode-skill/ | Install all skills | `scripts/install-skills.sh` | Uses unified .env, copies to `~/.config/opencode/` | | Add new skill | `skills/skill-creator/` | Use create_skill.py to scaffold | | Generate website (AUTO-DEPLOY) | `skills/website-creator/scripts/create_astro_website.py` | ✅ Auto-syncs to Gitea, auto-deploys to Easypanel | +| **Website Templates** | `skills/website-creator/scripts/templates/` | ✅ Thai legal templates, cookie consent | | Sync to Gitea (standalone) | `skills/gitea-sync/scripts/sync.py` | Create/update repos, push code | -| Deploy to Easypanel (standalone) | `skills/easypanel-deploy/scripts/deploy.py` | Uses username/password auth | +| Deploy to Easypanel (standalone) | `skills/easypanel-deploy/scripts/deploy.py` | Uses username/password auth (Dockerfile) | | Image generation | `skills/image-generation/scripts/image_gen.py` | Chutes AI wrapper | | Image editing | `skills/image-edit/scripts/image_edit.py` | Chutes AI wrapper | | Image analysis | `skills/image-analyze/scripts/analyze_image.py` | Vision AI | @@ -151,6 +160,24 @@ description: Brief description. Use when user wants to [action]. - **Monitoring:** Checks deployment status 3 times - **Auto-fix:** Triggers redeploy if deployment fails - **Output:** Returns both Gitea repo URL and Easypanel deployment URL +- **Build method:** Dockerfile (not nixpacks) + +### Thai Legal Compliance (NEW 2026-03-09) +- **Privacy Policy:** PDPA-compliant template (Thai Personal Data Protection Act) +- **Terms of Service:** Thai Consumer Protection Act compliant +- **Cookie Consent:** Actually blocks cookies until user consent +- **Consent Logging:** Database tracks user consent choices +- **DPO Requirements:** Template includes DPO contact section +- **PDPC Complaints:** Template includes complaint procedures + +### Build Testing (NEW 2026-03-09) +Before deployment, website-creator tests: +- Docker build completes successfully +- All pages are accessible +- Cookie consent blocks tracking scripts +- Contact forms work +- Mobile responsiveness +- Backend functions (if applicable) ### Unified Credentials (NEW 2026-03-08) - Single `/.env` file for ALL skills @@ -177,11 +204,30 @@ description: Brief description. Use when user wants to [action]. ### Website Generation (with Auto-Deploy) ```bash # Generate website - automatically syncs to Gitea and deploys to Easypanel +# Uses Dockerfile for deployment (not nixpacks) +# Includes: PDPA templates, cookie consent, build testing python3 skills/website-creator/scripts/create_astro_website.py \ --name "my-website" \ --output "./my-website" ``` +### Website Templates +```bash +# Legal templates (Thai law compliant): +skills/website-creator/scripts/templates/ +├── thai-privacy-policy-template.md # PDPA-compliant privacy policy +├── thai-terms-of-service-template.md # Thai Consumer Protection Act +└── admin-consent-logs.astro # Cookie consent tracker +``` + +### Testing Requirements +Before deployment, the skill tests: +1. ✅ Docker build process +2. ✅ Cookie consent functionality (actually blocks cookies) +3. ✅ Legal page accessibility +4. ✅ Backend features (forms, databases) +5. ✅ Mobile responsiveness + ### Standalone Operations ```bash # Install all skills (uses unified .env) @@ -234,10 +280,19 @@ python3 skills/image-analyze/scripts/analyze_image.py image.jpg "Describe this" - **Gitea:** https://git.moreminimore.com/api/v1 - See `skills/*/API_ENDPOINTS.md` for detailed documentation +### Cookie Consent Implementation (NEW 2026-03-09) +- **Real functionality:** Cookies are actually blocked until user consents +- **Granular control:** User can accept/reject necessary, performance, marketing cookies +- **Consent logging:** All consent choices logged in Astro DB +- **No pre-consent tracking:** Analytics scripts don't load until accepted +- **Respects choice:** User preference saved across sessions + ### Testing -- No formal test suite - scripts are simple wrappers around API calls - Manual testing: Run script with --help to verify it loads - All scripts tested on 2026-03-08 (13/13 tests passed) +- Build testing: Docker build tested before deployment +- Cookie consent: Tested to verify cookies are blocked +- Legal compliance: Templates reviewed for PDPA compliance ### LSP Errors - Some Python scripts show LSP errors (TypeScript in f-strings) @@ -245,4 +300,18 @@ python3 skills/image-analyze/scripts/analyze_image.py image.jpg "Describe this" - Ignore LSP warnings about backticks and unbound variables in try/except blocks ### No `__init__.py` Files -- Scripts are standalone CLI tools, not importable packages \ No newline at end of file +- Scripts are standalone CLI tools, not importable packages + +## ✅ IMPLEMENTATION STATUS + +**All Skills Complete:** +- ✅ website-creator (Dockerfile, PDPA templates, cookie consent) +- ✅ seo-multi-channel (5 channels, Thai support) +- ✅ seo-analyzers (Thai keyword, readability, quality) +- ✅ seo-data (GA4, GSC, DataForSEO, Umami) +- ✅ seo-context (Per-project config) +- ✅ umami (Username/password auth) +- ✅ All image skills (generation, edit, analyze) +- ✅ gitea-sync, easypanel-deploy, skill-creator + +**100% Production Ready!** 🎉 \ No newline at end of file