{"timestamp":"2025-12-08T15:07:17.258Z","type":"session_meta","payload":{"id":"019afe80-ad73-7611-8a4a-c36333e546e2","timestamp":"2025-12-08T15:07:17.235Z","cwd":"/Users/rvanvuren/Projects/buyerkiosk-web","originator":"codex_cli_rs","cli_version":"0.65.0","instructions":"# Repository Guidelines\n\n## Project Structure & Module Organization\n- Entry flows through `public_html/index.php` into `userfrosting/initialize.php`; point your web server at `public_html/`.\n- PHP domain code lives in `userfrosting/src/BuyerKiosk/` (PSR-4); notable areas include `Core/` (stores, auth, queues), `Workbook/`, `Backstock/`, `Cash/`, and `SMS/`.\n- Routes are defined under `userfrosting/routes/`; Twig templates sit in `userfrosting/templates/themes/default/`.\n- Tests live in `tests/`; specs and guides are in `docs/` (see `docs/specs/`, `docs/features/`, `docs/systems/`, `docs/patterns/`).\n- Utility scripts: `./test.sh`, `./deploy.sh`, and `dev/` helpers; SSL certs and data samples stay outside versioned code.\n\n## Build, Test, and Development Commands\n- `cd userfrosting && composer install` — install PHP dependencies before first run.\n- `./test.sh` — runs the PHPUnit suite; use before every PR.\n- `./deploy.sh` — runs tests then deploys (mirror release pipeline).\n- Local dev is proxied via ngrok to `dev2.buyerkiosk.com`; align your tunnel/config with that hostname rather than the PHP built-in server.\n\n## Coding Style & Naming Conventions\n- PHP 8.x, Slim 2.x (legacy routing), Twig 1.44. Use 4-space indentation and PSR-4 namespaces under `BuyerKiosk\\`.\n- Place new features under `userfrosting/src/BuyerKiosk/<Area>/`, with matching controllers and routes; keep class and file names StudlyCase.\n- Database naming: camelCase columns and foreign keys (e.g., `templateId`, `integrationType`); timestamps stay snake_case (`created_at`, `updated_at`); prefer camelCase for new tables.\n- Store identifiers (`typeNum`) follow `[a-z][a-z]\\d+` (e.g., `ou00`); validate early.\n- In Twig that embeds Handlebars, wrap `{{` in `{% raw %}...{% endraw %}` to avoid collisions.\n\n## Routing Notes\n- Slim 2.x routing is opinionated and old; mirror existing route patterns when adding endpoints.\n- Avoid `->conditions()` (unsupported in our stack); rely on pattern matching used in current routes.\n- Always pair store routes with access checks and `checkStoreGroup($typeNum)` before work.\n\n## Testing Guidelines\n- Use spec-driven and test-driven flow: start with specs in `docs/specs/*` and add PHPUnit coverage in `tests/`, mirroring the source module layout.\n- When touching queues, SMS, or workbook flows, stub external services and assert `dbConnectByName` targets the expected store.\n- Run `./test.sh` locally; include failing-repro steps in PRs if you cannot fix a test.\n\n## Commit & Pull Request Guidelines\n- Follow the repository’s short, imperative history (`feat: ...`, `fix: ...`, or concise summary like “Catch up on small changes”); keep commits scoped and reviewable.\n- PRs should summarize the change, list affected routes/stores, mention migrations or config flags, and link issues/tickets.\n- Include screenshots for UI changes and note any Ably/Twilio/Redis impacts; confirm `./test.sh` output and any manual QA steps.\n\n## Security & Configuration Tips\n- Never commit secrets; rely on your local `.env`/server config for DB, Twilio/Vonage, Ably, and other keys.\n- Always enforce access: `checkAccess('uri_*')` and `checkStoreGroup($typeNum)` before store actions; obtain DB connections via `dbConnectByName($store->getDbName())`.\n","source":"cli","model_provider":"openai","git":{"commit_hash":"952777c7c808e4948688d1df5996fb7dea9028e8","branch":"docs-006-plan","repository_url":"git@bitbucket.org:buyerkiosk/buyerkiosk-web-codebase.git"}}}
{"timestamp":"2025-12-08T15:07:17.258Z","type":"response_item","payload":{"type":"message","role":"user","content":[{"type":"input_text","text":"# AGENTS.md instructions for /Users/rvanvuren/Projects/buyerkiosk-web\n\n<INSTRUCTIONS>\n# Repository Guidelines\n\n## Project Structure & Module Organization\n- Entry flows through `public_html/index.php` into `userfrosting/initialize.php`; point your web server at `public_html/`.\n- PHP domain code lives in `userfrosting/src/BuyerKiosk/` (PSR-4); notable areas include `Core/` (stores, auth, queues), `Workbook/`, `Backstock/`, `Cash/`, and `SMS/`.\n- Routes are defined under `userfrosting/routes/`; Twig templates sit in `userfrosting/templates/themes/default/`.\n- Tests live in `tests/`; specs and guides are in `docs/` (see `docs/specs/`, `docs/features/`, `docs/systems/`, `docs/patterns/`).\n- Utility scripts: `./test.sh`, `./deploy.sh`, and `dev/` helpers; SSL certs and data samples stay outside versioned code.\n\n## Build, Test, and Development Commands\n- `cd userfrosting && composer install` — install PHP dependencies before first run.\n- `./test.sh` — runs the PHPUnit suite; use before every PR.\n- `./deploy.sh` — runs tests then deploys (mirror release pipeline).\n- Local dev is proxied via ngrok to `dev2.buyerkiosk.com`; align your tunnel/config with that hostname rather than the PHP built-in server.\n\n## Coding Style & Naming Conventions\n- PHP 8.x, Slim 2.x (legacy routing), Twig 1.44. Use 4-space indentation and PSR-4 namespaces under `BuyerKiosk\\`.\n- Place new features under `userfrosting/src/BuyerKiosk/<Area>/`, with matching controllers and routes; keep class and file names StudlyCase.\n- Database naming: camelCase columns and foreign keys (e.g., `templateId`, `integrationType`); timestamps stay snake_case (`created_at`, `updated_at`); prefer camelCase for new tables.\n- Store identifiers (`typeNum`) follow `[a-z][a-z]\\d+` (e.g., `ou00`); validate early.\n- In Twig that embeds Handlebars, wrap `{{` in `{% raw %}...{% endraw %}` to avoid collisions.\n\n## Routing Notes\n- Slim 2.x routing is opinionated and old; mirror existing route patterns when adding endpoints.\n- Avoid `->conditions()` (unsupported in our stack); rely on pattern matching used in current routes.\n- Always pair store routes with access checks and `checkStoreGroup($typeNum)` before work.\n\n## Testing Guidelines\n- Use spec-driven and test-driven flow: start with specs in `docs/specs/*` and add PHPUnit coverage in `tests/`, mirroring the source module layout.\n- When touching queues, SMS, or workbook flows, stub external services and assert `dbConnectByName` targets the expected store.\n- Run `./test.sh` locally; include failing-repro steps in PRs if you cannot fix a test.\n\n## Commit & Pull Request Guidelines\n- Follow the repository’s short, imperative history (`feat: ...`, `fix: ...`, or concise summary like “Catch up on small changes”); keep commits scoped and reviewable.\n- PRs should summarize the change, list affected routes/stores, mention migrations or config flags, and link issues/tickets.\n- Include screenshots for UI changes and note any Ably/Twilio/Redis impacts; confirm `./test.sh` output and any manual QA steps.\n\n## Security & Configuration Tips\n- Never commit secrets; rely on your local `.env`/server config for DB, Twilio/Vonage, Ably, and other keys.\n- Always enforce access: `checkAccess('uri_*')` and `checkStoreGroup($typeNum)` before store actions; obtain DB connections via `dbConnectByName($store->getDbName())`.\n\n</INSTRUCTIONS>"}]}}
{"timestamp":"2025-12-08T15:07:17.258Z","type":"response_item","payload":{"type":"message","role":"user","content":[{"type":"input_text","text":"<environment_context>\n  <cwd>/Users/rvanvuren/Projects/buyerkiosk-web</cwd>\n  <approval_policy>on-request</approval_policy>\n  <sandbox_mode>workspace-write</sandbox_mode>\n  <network_access>restricted</network_access>\n  <shell>zsh</shell>\n</environment_context>"}]}}
