forked from fa/breadcrumb-the-shire
Make the core-primitive-end-to-end rule for Grid.js list exports binding instead of advisory — so future consumers (and reviewers) cannot quietly drift back into inline fputcsv / hand-rolled headers / bespoke click listeners / lurl() for query-carrying URLs. - CLAUDE.md: new UI Patterns bullet + two "Never Do This" entries spelling out the server/view/client contract in one place. - .agents/checks/guard-catalog.json: new GR-UI-EXPORT entry describing the end-to-end requirement (exportRequireGetRequest + exportCapLimit + exportSendCsv + ExportColumn + shared filter-schema + dropdown partial + endpointUrl() + initListExport). - .agents/checks/guard-enforcement-map.json: wire the new guard to tests/Architecture/ListExportContractTest.php as the automated evidence source. - .agents/checks/guard-checklist.md & .agents/prompts/reviewer-code.md: add GR-UI-EXPORT so the Code Reviewer prompt and the checklist flag violations alongside GR-UI-LIST. - tests/Architecture/ListExportContractFiles: registry of every list export (currently helpdesk-domains, admin/users, audit/system-audit). Adding a new list = one entry, contract test covers the rest. - tests/Architecture/ListExportContractTest: six checks per registered entry — endpoint uses the primitive, no hand-rolled output, data and export share the same filter-schema, template includes the dropdown partial and uses endpointUrl(), page module imports and invokes initListExport, and the shared dropdown partial stays zero-config. - pages/admin/users/export().php: align with the new contract by switching from ad-hoc requestInput()->queryAll() reads to gridParseFiltersFromSchemaFile(__DIR__ . '/filter-schema.php'), same as the data endpoint — eliminates the last place Grid and export could disagree on what "the current filter" means. Gates: PHPUnit 1900 OK (+6 contract checks), PHPStan 0 errors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
.agents/
Centralized home for the 7-role agent workflow system.
Structure
workflow.md ← Roles, state machine, handover rules (start here)
contracts/ ← JSON schemas for role outputs (7 roles)
templates/ ← Starter JSON payloads per role (7 templates)
prompts/ ← Role-specific prompt baselines (7 prompts)
checks/ ← Guard catalog (27 guards), quality gates (9), checklists
← Enforcement policy + guard enforcement map
skills/ ← Reusable skill packages (guardrails, planner, grid, PHP CI)
runs/ ← Runtime artifacts per workflow run (gitignored)
Roles
| # | Role | Artifact | Guards |
|---|---|---|---|
| 1 | Analyst | analysis.json |
— |
| 2 | Planner | plan.json |
selects guards |
| 3 | Executor | execution-report.json |
provides evidence |
| 4 | Code Reviewer | review-code.json |
17 guards (GR-CORE/TEST/UI) |
| 5 | Security Reviewer | review-security.json |
10 guards (GR-SEC) |
| 6 | Acceptance Tester | review-acceptance.json |
SC-* criteria |
| 7 | Finalizer | finalize.json |
all reviews + CI |
Quick Links
| What | Where |
|---|---|
| Workflow & roles | workflow.md |
| Guard catalog (27 guards) | checks/guard-catalog.json |
| Quality gates (9 gates) | checks/quality-gates.json |
| Enforcement policy | checks/enforcement-policy.json |
| Guard enforcement map | checks/guard-enforcement-map.json |
| Code review checklist | checks/guard-checklist.md |
| Acceptance checklist | checks/acceptance-checklist.md |
| Module manifest schema | contracts/module-manifest.schema.json |
Project Context
See CLAUDE.md (repo root) for tech stack, architecture rules, and conventions.