

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# AGENTS.md23## Project Overview45QloApps is an open-source hotel reservation and property management platform. It enables hotels to manage rooms, bookings, guests, and payments through a web-based system.67## Purpose of this File89This document provides guidance for AI coding agents contributing to the QloApps project. It defines conventions, safety rules, and workflows to ensure consistent and secure code generation.1011## Technology Stack1213- **Language:** PHP 8.1–8.4 (backend), Smarty 3.x (templates), JavaScript/jQuery (frontend)14- **Database:** MySQL 5.7, 8.0+; MariaDB 10.5, 10.6, 10.11, 11.0, 11.2, 11.415- **Architecture:** MVC with hook-based module system16- **License:** OSL-3.0 (core), AFL-3.0 (modules)17- **Required PHP Extensions:** PDO_MySQL, cURL, OpenSSL, SOAP, GD, SimpleXML, DOM, Zip, Phar1819## Environment Setup2021Install dependencies:22```bash23composer install24```2526Clear caches:27```bash28rm -rf cache/smarty/compile/* cache/smarty/cache/*29rm -f cache/class_index.php30```3132Clear class cache after adding or modifying overrides.3334## Project Structure3536```37.38├── classes/ # Core models extending ObjectModel39├── controllers/ # Front and admin controllers40│ ├── admin/41│ └── front/42├── modules/ # Feature modules with isolated functionality43├── override/ # Core class and controller overrides44├── themes/ # Smarty templates (.tpl files)45├── config/ # Configuration files (settings.inc.php contains secrets)46├── cache/ # Generated cache files47├── tests/ # PHPUnit test suite48```4950**QloApps Agent Skills:** Install reusable development skills using:51```bash52npx skills add Qloapps/agent-skills53```54Available skills: module-development, payment-module-development, stats-module-development. Check installed skills before implementing new functionality.5556## Architecture Overview5758**MVC Pattern**59- Models: classes/ extending ObjectModel60- Controllers: FrontController or AdminController61- Views: Smarty templates (.tpl)6263**Modules**64- Located in modules/<modulename>/65- Provide isolated functionality66- Integrate using hooks6768**Overrides**69- Located in override/70- Extend core classes using the Core suffix71- Clear class cache after creating overrides7273**Context**74- Access runtime objects using Context::getContext()7576## Core vs Module Development Rules7778**When working on a module:**791. Never modify core files directly802. Use **hooks** to integrate module functionality into core features813. If no suitable hook exists, create a **custom hook** — but only if the hook placement is generic and useful for other modules too824. Use **overrides** only as a last resort — overrides can conflict with other module override files and require manual resolution8384**When working on a core feature:**85- Make changes directly in core files86- Do not use hooks or overrides for core-to-core changes8788## Coding Conventions8990**Classes:** PascalCase — `HotelBookingData`91**Methods:** camelCase — `getBookingDetails()`92**Variables:** camelCase — `$hotelId`93**Constants:** UPPER_SNAKE_CASE — `BOOKING_STATUS_CONFIRMED`94**Database Tables:** _DB_PREFIX_ + lowercase_snake — `qlo_hotel_booking`95**Config Keys:** MODULENAME_SETTING — `HOTELRESERVATION_ENABLED`96**Files:** One class per file, filename matches class name97**Templates:** lowercase-hyphens.tpl — `booking-form.tpl`9899Add PHPDoc blocks to all classes and methods.100101## Translation102103Never hardcode user-facing English strings — always wrap them in the appropriate translation method.104105| Context | Method |106|---------|--------|107| Module main file | `$this->l('string')` |108| Module admin controller | `$this->l('string')` |109| Module front controller | `$this->module->l('string', 'controllerName')` |110| Module classes | `$objModule->l('string', 'ClassName')` |111| Core admin controller | `$this->l('string')` |112| Core front controller | `Tools::displayError('string')` |113| Smarty template (core) | `{l s='string'}` |114| Smarty template (module) | `{l s='string' mod='modulename'}` |115116## Multi-language117118- Always include `id_lang` in queries that return translatable content119- Use `Context::getContext()->language->id` for the current language120121## Module Development Guidelines122123**Module Location:** modules/<modulename>/124125**Required Files:**126- <modulename>.php — Main class extending Module127- config.xml — Module metadata128129**Optional Directories:**130- classes/ — Module-specific models131- controllers/ — Module controllers132- views/templates/ — Smarty templates133- upgrade/ — Version migration scripts134135**Hook Integration:**136- Register hooks in install() method137- Unregister hooks in uninstall() method138- Keep hook handlers lightweight139140**Configuration:**141- Store settings using Configuration::updateValue()142- Retrieve settings using Configuration::get()143- Prefix config keys with module name144145## Database Rules146147**Table Prefix:** Always use _DB_PREFIX_ constant instead of hardcoding the table prefix148149**Escaping:**150- Strings: pSQL($value)151- Integers: (int)$value152- Table/column names: bqSQL($name)153154**Preferred Access:** Use ObjectModel for CRUD operations instead of raw SQL queries155156**Prohibited:** Never concatenate raw user input into SQL queries.157158## Security Guidelines159160**Input Handling**161- Use Tools::getValue() for request parameters162- Cast numeric values to (int)163- Escape strings using pSQL()164- Validate input using Validate class methods165166**Output Escaping**167- Use Tools::safeOutput() in PHP168- Use Smarty escape modifiers in templates169170**Sensitive Data**171- Never expose config/settings.inc.php172- Never commit API keys, passwords, or tokens173174**Authorization**175- Verify permissions before performing admin operations176177## Testing178179Testing infrastructure is being configured. Check tests/ directory for available tests before running.180181## AI Agent Workflow1821831. Check installed agent skills before implementing new functionality1842. Search codebase for similar implementations before creating new code1853. Extend existing classes rather than duplicating functionality1864. Follow patterns established in surrounding code1875. Reuse existing utilities: Tools, Validate, Db, Configuration classes1886. Prioritize consistency with existing codebase over new approaches189190After making changes:191- Clear caches if modifying templates or overrides192- Add PHPDoc to new methods193194## Safety Rules195196**Agents must not:**197- Delete files unless explicitly instructed198- Run git commands automatically199- Modify composer.json without approval200- Modify config/settings.inc.php201- Execute DROP, TRUNCATE, or destructive SQL202- Modify core files directly when working on a module (use hooks or override system)203204**Agents must:**205- Use pSQL() for strings and (int) for IDs in SQL206- Use Tools::getValue() for request parameters207- Escape all output208- Check installed agent skills before implementing new functionality209- Follow project naming conventions210- Validate inputs before processing211212**Agents should ask before:**213- Deleting any files214- Running git commands215- Changing dependencies216- Modifying database schema217- Altering payment or booking logic218219---220221**Resources:**222- Documentation: https://docs.qloapps.com223- Forum: https://forums.qloapps.com224- GitHub: https://github.com/Qloapps/QloApps225- Security Issues: support@qloapps.com226
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bagisto/bagistoAGENTS.md · 28k | AGENTS.md | setupbuildteststyle+7 | 100/100 | 7 days ago | |
| Intervention/imageAGENTS.md · 14k | AGENTS.md | setupbuildtestlint-format+6 | 97/100 | 14 days ago | |
| cocart-headless/cocart-jwt-authenticationAGENTS.md · 6 | AGENTS.md | setupbuildteststyle+7 | 96/100 | 14 days ago | |
| co-cart/co-cartAGENTS.md · 409 | AGENTS.md | setupbuildstylearch+6 | 85/100 | 14 days ago | |
| coollabsio/coolifyAGENTS.md · 61k | AGENTS.md | setupbuildtestlint-format+10 | 84/100 | today | |
| krayin/laravel-crmAGENTS.md · 24k | AGENTS.md | styledo-notagent-behaviour | 80/100 | 9 days ago | |
| koel/koelAGENTS.md · 17k | AGENTS.md | setupbuildtestlint-format+10 | 78/100 | today | |
| nextcloud/serverAGENTS.md · 36k | AGENTS.md | lint-formatstylegitsecurity+2 | 77/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/qloapps-qloapps-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.