Files
api/.ai-workflow/manifest.json
T
Jeppe Bundgaard 7d450e285e Remove outdated edge gateway object classes, add new agent implementation
Transitioned from obsolete gateway object classes (`edge_gateway_shell_action_jobs_o`, `edge_gateway_shell_events_o`, `edge_gateway_shell_sessions_o`, `edge_gateway_update_jobs_o`) to the new agent implementation (`edge-gateway-agent/agent.php`).
2026-04-21 14:13:17 +02:00

224 lines
8.8 KiB
JSON

{
"version": 1,
"snapshot_of": "backend-php",
"projects": {
"backend-php": {
"display_name": "Copenhagen Truck Wash API",
"relative_root": ".",
"commands": {
"setup": {
"default": "./scripts/setup.sh",
"win32": "powershell -ExecutionPolicy Bypass -File .\\scripts\\setup.ps1"
},
"run": {
"default": "docker compose up -d traefik redis mysql-debug php1 caddy"
},
"test_unit": {
"default": "docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:unit\""
},
"test_e2e": {
"default": ""
},
"test_full": {
"default": ""
},
"debug": {
"default": "docker compose logs -f --tail=200 php1"
}
},
"codex_environment": {
"name": "api",
"actions": [
{
"name": "Start API",
"icon": "run",
"command_id": "run"
},
{
"name": "Stop API",
"icon": "run",
"literal_command": {
"default": "docker compose down"
}
},
{
"name": "PHP logs",
"icon": "debug",
"command_id": "debug"
},
{
"name": "PHP unit tests",
"icon": "test",
"command_id": "test_unit"
},
{
"name": "AI workflow check",
"icon": "debug",
"literal_command": {
"default": "node scripts/sync-ai-workflow.mjs --check"
}
}
]
},
"generated_content": {
"aiassistant_tests_lines": [
"# Backend PHP Testing Rules",
"",
"These rules apply to `services/nginx/app/tests` and any backend change that needs verification.",
"",
"1. Add or update tests for every new feature, bug fix, API contract change, or search or authentication workflow change.",
"2. Run backend verification in the `php1` container. Do not use host-side PHP for the supported workflow.",
"3. Use `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:unit\"` for unit coverage.",
"4. Use `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:integration\"` when code depends on Redis, MySQL, or environment-backed configuration.",
"5. Use `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:api\"` when route behavior, envelopes, or request parsing changes.",
"6. Keep tests deterministic: no live third-party calls, no shared Redis keys, no broad database cleanup, and no sleeps unless time behavior is the thing under test.",
"7. Prefer narrow fixtures, explicit cleanup, and behavior-level assertions over implementation checks.",
"8. When public routes, schemas, or permissions change, update `openapi.yaml` together with the tests.",
"9. Run the narrowest relevant suite first, then the broader suite that matches the risk before you finish the task.",
"",
"Canonical workflow reference: `.ai-workflow/workflow.md`."
],
"aiassistant_routes_lines": [
"# Backend Route Rules",
"",
"These rules apply to files under `services/nginx/app/routes` and the classes they call.",
"",
"1. Keep route handlers thin: validate input, enforce permissions, call domain code, and write the response.",
"2. Default to protected endpoints. Use the existing authentication and permission helpers instead of ad hoc access checks.",
"3. Add or update backend tests in the `php1` container whenever route behavior changes.",
"4. Update `openapi.yaml` whenever paths, parameters, request bodies, response envelopes, or permissions change.",
"5. Prefer deterministic route tests and avoid live external integrations in route coverage.",
"6. Use concise API errors and keep sensitive implementation details out of the response body.",
"7. When a change touches department, order, or subuser authorization, cover both the allow path and the deny path.",
"",
"Canonical workflow reference: `.ai-workflow/workflow.md`."
],
"junie_lines": [
"# Copenhagen Truck Wash API Development Guidelines",
"",
"This file is generated from the canonical AI workflow and is the supported Junie-facing reference for the backend repository.",
"",
"## Build And Run",
"",
"- Project root: `services/nginx/app` is the effective PHP application root.",
"- Setup: use `./scripts/setup.sh` on POSIX or `powershell -ExecutionPolicy Bypass -File .\\scripts\\setup.ps1` on Windows.",
"- Start local API stack: `docker compose up -d traefik redis mysql-debug php1 caddy`.",
"- Tail logs with `docker compose logs -f --tail=200 php1`.",
"",
"## Testing",
"",
"- Supported backend validation runs in `php1`.",
"- Unit tests: `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:unit\"`.",
"- Integration tests: `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:integration\"`.",
"- API tests: `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:api\"`.",
"- Prefer the narrowest suite that proves the change, then run the broader suite that matches the risk.",
"",
"## Workflow Notes",
"",
"- Generated assistant metadata is checked with `node scripts/sync-ai-workflow.mjs --check`.",
"- Route and schema changes require matching updates to `openapi.yaml`.",
"- Runtime OpenAI product behavior is out of scope for this workflow bundle unless a task explicitly changes product code.",
"",
"Canonical workflow reference: `.ai-workflow/workflow.md`."
]
}
}
},
"assistants": {
"codex": {
"description": "Codex environment files and actions."
},
"aiassistant": {
"description": "Project-specific AI Assistant rules."
},
"junie": {
"description": "Project-specific Junie guidance."
},
"copilot": {
"description": "Standardized Copilot task dispatch workflow."
}
},
"commands": {
"setup": {
"description": "Install dependencies and prepare the supported local environment."
},
"run": {
"description": "Start the primary local development entrypoint for the project."
},
"test_unit": {
"description": "Run the project's narrow unit-style verification command."
},
"test_e2e": {
"description": "Run the project's targeted browser or end-to-end verification command."
},
"test_full": {
"description": "Run the broader high-confidence verification command when the project defines one."
},
"debug": {
"description": "Run the supported debug entrypoint."
}
},
"generated_outputs": [
{
"id": "backend_codex_environment",
"template": "codex_project_environment",
"project": "backend-php",
"path": ".codex/environments/environment.toml"
},
{
"id": "backend_aiassistant_tests",
"template": "aiassistant_backend_tests_rule",
"project": "backend-php",
"path": ".aiassistant/rules/Creating and maintaining tests.md"
},
{
"id": "backend_aiassistant_routes",
"template": "aiassistant_backend_routes_rule",
"project": "backend-php",
"path": ".aiassistant/rules/Creating and securing routes.md"
},
{
"id": "backend_junie_guidelines",
"template": "junie_backend_guidelines",
"project": "backend-php",
"path": ".junie/guidelines.md"
},
{
"id": "backend_copilot_workflow",
"template": "copilot_dispatcher_workflow",
"project": "backend-php",
"path": ".github/workflows/copilot.yml"
}
],
"sync_targets": {
"backend-php": {
"source_root": ".",
"destination": "C:\\Users\\2jepp\\PhpstormProjects\\api",
"supported_metadata_dirs": [
".codex",
".aiassistant",
".junie",
".github",
".ai-workflow",
"scripts"
]
}
},
"copilot": {
"workflow_name": "Copilot Task Dispatcher",
"input_description": "The task description for Copilot",
"issue_label": "copilot-task",
"title_prefix": "Copilot Task:",
"body_lines": [
"Assigned to Copilot by @{{ACTOR}}.",
"",
"Task",
"{{TASK}}",
"",
"AI workflow notes",
"- Generated assistant metadata is synchronized from the canonical AI workflow bundle.",
"- Run `node scripts/sync-ai-workflow.mjs --check` if assistant metadata changed."
]
}
}