folderweb/AGENT.md

23 lines
1 KiB
Markdown
Raw Normal View History

2025-10-02 16:54:47 +02:00
## Philosophy
2026-01-14 14:40:30 +01:00
Minimal PHP for modern conveniences. Prioritize longevity (decade-scale maintainability) by avoiding volatile dependencies. Strictly add only what's essential—readable, simple, and future-proof.
2025-10-02 16:54:47 +02:00
2026-01-14 14:40:30 +01:00
## Core Constraints
**Minimalism:** Only essential tech (HTML, PHP 8.4+, CSS). No JS, frameworks, build tools, or package managers. Comments only for major sections.
2025-10-02 16:54:47 +02:00
2026-01-14 14:40:30 +01:00
**Frontend:**
- Classless, semantic HTML5
- Modern CSS: nesting, `oklch()`, grid, `clamp()`, logical props
- Responsive via fluid typography + flexible layouts
2025-10-02 16:54:47 +02:00
2026-01-14 14:40:30 +01:00
**Security:**
- Path validation blocks traversal
- Files restricted to document root
- Strict MIME types + no direct user-input execution
2025-10-02 16:54:47 +02:00
2026-01-14 14:40:30 +01:00
## Code Style
**PHP:** Modern syntax (arrow functions, null coalescing, match). Type hints where practical. Ternary for simple conditionals. Single-purpose functions.
2025-10-02 16:54:47 +02:00
2026-01-14 14:40:30 +01:00
**CSS:** Variables, native nesting, grid layouts. `clamp()` over `@media`. Relative units > pixels.
2025-10-02 16:54:47 +02:00
2026-01-14 14:40:30 +01:00
**Templates:** Escape output (`htmlspecialchars()` for UGC). Short echo tags (`<?= $var ?>`).