1
0
Files
breadcrumb-the-shire/.agents/checks/guard-enforcement-map.json
fs 53ccd212d5 docs(agents): encode list-export convention as GR-UI-EXPORT guard
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>
2026-04-21 22:50:43 +02:00

274 lines
9.5 KiB
JSON

{
"version": "1.1.0",
"entries": [
{
"guard_id": "GR-CORE-003",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/CoreStarterkitContractTest.php"
]
},
{
"guard_id": "GR-CORE-007",
"enforcement_mode": "hybrid",
"evidence_source": [
"tests/Architecture/ApiSchemaContractTest.php",
".agents/runs/<TASK>/review-code.json"
]
},
{
"guard_id": "GR-CORE-010",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/DatabaseUpdatesContractTest.php"
]
},
{
"guard_id": "GR-CORE-011",
"enforcement_mode": "reviewer",
"evidence_source": [
".agents/runs/<TASK>/review-code.json"
]
},
{
"guard_id": "GR-CORE-012",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/PostRedirectGetContractTest.php"
]
},
{
"guard_id": "GR-TEST-001",
"enforcement_mode": "reviewer",
"evidence_source": [
".agents/runs/<TASK>/review-code.json",
".agents/runs/<TASK>/review-acceptance.json"
]
},
{
"guard_id": "GR-TEST-002",
"enforcement_mode": "hybrid",
"evidence_source": [
"tests/Architecture/CoreStarterkitContractTest.php",
"tests/Architecture/AppContainerIsolationContractTest.php",
"tests/Architecture/ContainerFactoryContractTest.php",
"tests/Architecture/RepositoryInterfaceContractTest.php",
".agents/runs/<TASK>/review-code.json"
]
},
{
"guard_id": "GR-UI-014",
"enforcement_mode": "reviewer",
"evidence_source": [
".agents/runs/<TASK>/review-code.json",
".agents/runs/<TASK>/review-acceptance.json"
]
},
{
"guard_id": "GR-UI-LIST",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/ListDataEndpointContractTest.php",
"tests/Architecture/ListTemplateContractTest.php",
"tests/Architecture/ListActionContractTest.php",
"tests/Architecture/ListTitlebarTemplateContractTest.php",
"tests/Architecture/ListUiSharedPartialsContractTest.php",
"tests/Architecture/FilterDrawerTemplateContractTest.php",
"tests/Architecture/FilterDrawerRuntimeContractTest.php"
]
},
{
"guard_id": "GR-UI-DETAIL",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/DetailPageRuntimeContractTest.php",
"tests/Architecture/DetailActionPolicyRuntimeContractTest.php",
"tests/Architecture/DetailPageFormContractTest.php",
"tests/Architecture/DetailPageTitlebarContractTest.php",
"tests/Architecture/DetailValidationTemplateContractTest.php",
"tests/Architecture/DetailValidationActionContractTest.php",
"tests/Architecture/DetailValidationAssetContractTest.php",
"tests/Architecture/DetailActionPolicyPartialContractTest.php",
"tests/Architecture/DetailActionPolicyMigrationContractTest.php"
]
},
{
"guard_id": "GR-UI-A11Y",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/AuthLoginTemplateAccessibilityContractTest.php",
"tests/Architecture/AuthLoginFieldAccessibilityContractTest.php",
"tests/Architecture/AuthLoginTenantSelectionContractTest.php",
"tests/Architecture/AuthLoginPasswordToggleContractTest.php",
"tests/Architecture/AuthHelpLinksPartialContractTest.php",
"tests/Architecture/AuthHelpLinksPageContractTest.php"
]
},
{
"guard_id": "GR-UI-I18N",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/I18nKeyCompletenessContractTest.php",
"tests/Architecture/ModuleI18nContractTest.php"
]
},
{
"guard_id": "GR-UI-REUSE",
"enforcement_mode": "hybrid",
"evidence_source": [
"tests/Architecture/CoreStarterkitContractTest.php",
"tests/Architecture/FrontendRuntimeEntrypointContractTest.php",
"tests/Architecture/FrontendRuntimeHostContractTest.php",
"tests/Architecture/FrontendRuntimeComponentContractTest.php",
"tests/Architecture/AssetVersioningContractTest.php",
"tests/Architecture/TypographyTokenContractTest.php",
"tests/Architecture/AsideNavigationRuntimeContractTest.php",
"tests/Architecture/AsideNavigationAdminContractTest.php",
".agents/runs/<TASK>/review-code.json"
]
},
{
"guard_id": "GR-UI-EXPORT",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/ListExportContractTest.php"
]
},
{
"guard_id": "GR-SEC-001",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/PostEndpointCsrfContractTest.php"
]
},
{
"guard_id": "GR-SEC-002",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/SecurityLoggingRedactionContractTest.php",
"tests/Architecture/SecurityLoggingTelemetryContractTest.php",
"tests/Architecture/SecurityLoggingRuntimeContractTest.php",
"tests/Architecture/FrontendTelemetryContractTest.php"
]
},
{
"guard_id": "GR-SEC-003",
"enforcement_mode": "reviewer",
"evidence_source": [
".agents/runs/<TASK>/review-security.json"
]
},
{
"guard_id": "GR-SEC-004",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/SecurityRemoteAssetContractTest.php"
]
},
{
"guard_id": "GR-SEC-005",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/SecurityCryptoContractTest.php"
]
},
{
"guard_id": "GR-SEC-006",
"enforcement_mode": "hybrid",
"evidence_source": [
"tests/Architecture/FileStorageContractTest.php",
".agents/runs/<TASK>/review-security.json"
]
},
{
"guard_id": "GR-SEC-007",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/ApiSessionIsolationContractTest.php"
]
},
{
"guard_id": "GR-SEC-008",
"enforcement_mode": "hybrid",
"evidence_source": [
"tests/Architecture/AuthzAdminUsersContractTest.php",
"tests/Architecture/AuthzApiBootstrapContractTest.php",
"tests/Architecture/AuthzAdminTenantsContractTest.php",
"tests/Architecture/AuthzAdminMasterDataContractTest.php",
"tests/Architecture/AuthzAdminSettingsContractTest.php",
"tests/Architecture/AuthzUiActionContractTest.php",
"tests/Architecture/AuthzUiLayoutContractTest.php",
"tests/Architecture/AuthzUiTemplateContractTest.php",
"tests/Architecture/PublicPageAdminContractTest.php",
"tests/Architecture/PublicPageRoutingContractTest.php",
".agents/runs/<TASK>/review-security.json"
]
},
{
"guard_id": "GR-SEC-009",
"enforcement_mode": "hybrid",
"evidence_source": [
"tests/Architecture/ApiResourceContractTest.php",
".agents/runs/<TASK>/review-security.json"
]
},
{
"guard_id": "GR-SEC-010",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/ViewLayerOutputEscapingContractTest.php"
]
},
{
"guard_id": "GR-CORE-LAYERS",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/ViewLayerNoDbCallsContractTest.php",
"tests/Architecture/ServiceLayerNoHtmlContractTest.php",
"tests/Architecture/RepositoryLayerIsolationContractTest.php"
]
},
{
"guard_id": "GR-CORE-MODULE",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/ModuleBoundaryContractTest.php",
"tests/Architecture/ModuleManifestContractTest.php",
"tests/Architecture/ModuleManifestSchemaValidationContractTest.php",
"tests/Architecture/ModuleProviderContractTest.php",
"tests/Architecture/ModuleRegistryBootstrapContractTest.php",
"tests/Architecture/ModuleRegistryFailFastContractTest.php",
"tests/Architecture/ModuleSessionKeyPrefixContractTest.php",
"tests/Architecture/ModuleUiContractTest.php",
"tests/Architecture/AddressBookModuleIsolationContractTest.php",
"tests/Architecture/BookmarksModuleIsolationContractTest.php",
"tests/Architecture/AuditModuleIsolationContractTest.php"
]
},
{
"guard_id": "GR-CORE-META",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/AgentSystemEnforcementContractTest.php",
"tests/Architecture/AgentSystemCatalogContractTest.php",
"tests/Architecture/AgentSystemReferenceContractTest.php",
"tests/Architecture/AgentSystemFileContractTest.php",
"tests/Architecture/CodexSkillReferenceContractTest.php",
"tests/Architecture/CodexDocsIntegrityContractTest.php",
"tests/Architecture/CodexAutomationContractTest.php"
]
},
{
"guard_id": "GR-UI-TAXONOMY",
"enforcement_mode": "automated",
"evidence_source": [
"tests/Architecture/StatusTaxonomyEnumContractTest.php",
"tests/Architecture/StatusTaxonomyFilterSchemaContractTest.php",
"tests/Architecture/StatusTaxonomyDataContractTest.php",
"tests/Architecture/StatusTaxonomyLiteralGuardContractTest.php",
"tests/Architecture/StatusTaxonomyUiContractTest.php"
]
}
]
}