{
"event": "PreToolUse",
"tool_name": "mcp__mcp-db__db_select",
"tool_input": {
"query": "SELECT name, yaml_content FROM contracts WHERE name LIKE '%view%' OR name LIKE '%frontend%' OR yaml_content LIKE '%CSS%' LIMIT 5",
"database": "ki_dev"
}
}
{
"tool_response": [
{
"type": "text",
"text": "{\n \"status\": \"success\",\n \"data\": [\n {\n \"name\": \"CSS Contract\",\n \"yaml_content\": \"contract:\\n name: css-standards\\n version: \\\"2.0\\\"\\n status: active\\n description: |\\n CSS-Standards mit Fokus auf Accessibility (WCAG 2.1 AA).\\n Migriert auf Meta-Schema v1.0 am 22.12.2025.\\n\\n created: \\\"2025-12-20\\\"\\n author: migration\\n\\n scope:\\n paths:\\n - \\\"\/src\/View\/**\/*.php\\\"\\n - \\\"\/public\/css\/**\/*.css\\\"\\n\\n rules:\\n - id: contrast-normal-text\\n check_type: custom\\n script: \\\"\/opt\/scripts\/contract-validators\/color_contrast.py\\\"\\n args: [\\\"--min-ratio\\\", \\\"4.5\\\"]\\n severity: critical\\n description: \\\"Farbkontrast min. 4.5:1 für normalen Text (WCAG 1.4.3)\\\"\\n\\n - id: no-outline-none\\n check_type: forbidden_pattern\\n patterns:\\n - \\\"outline: none\\\"\\n - \\\"outline: 0\\\"\\n - \\\"outline:none\\\"\\n - \\\"outline:0\\\"\\n in_files: \\\"**\/*.css\\\"\\n severity: major\\n description: \\\"Focus-Styles niemals entfernen (WCAG 2.4.7)\\\"\\n\\n - id: no-important\\n check_type: forbidden_pattern\\n patterns:\\n - \\\"!important\\\"\\n in_files: \\\"**\/*.css\\\"\\n exclude_files:\\n - \\\"**\/utilities.css\\\"\\n severity: major\\n description: \\\"Kein !important außer für Utility-Klassen\\\"\\n\\n - id: code-block-colors\\n check_type: required_pattern\\n patterns:\\n - \\\"pre\\\"\\n - \\\"code\\\"\\n in_files: \\\"**\/*.css\\\"\\n severity: critical\\n description: \\\"Pre\/Code-Blöcke müssen Farben definieren\\\"\\n\\n - id: min-font-size\\n check_type: forbidden_pattern\\n patterns:\\n - \\\"font-size: 12px\\\"\\n - \\\"font-size: 11px\\\"\\n - \\\"font-size: 10px\\\"\\n - \\\"font-size: 0.75rem\\\"\\n - \\\"font-size: 0.7rem\\\"\\n in_files: \\\"**\/*.css\\\"\\n severity: major\\n description: \\\"Mindestschriftgröße 16px für Fließtext\\\"\\n\\n enforcement:\\n on_violation: warn\\n\\n pass_threshold:\\n critical_max: 0\\n major_max: 2\\n minor_max: 5\\n\"\n },\n {\n \"name\": \"View Structure Contract\",\n \"yaml_content\": \"contract:\\n name: \\\"view-structure-standards\\\"\\n version: \\\"2.0\\\"\\n status: \\\"active\\\"\\n description: \\\"CRUD-Views folgen einheitlicher Struktur (index, show, new, edit)\\\"\\n created: \\\"2025-12-20\\\"\\n author: \\\"migration\\\"\\n\\n scope:\\n paths:\\n - \\\"\/src\/View\/tasks\/*.php\\\"\\n - \\\"\/src\/View\/content\/*.php\\\"\\n excludes:\\n - \\\"\/src\/View\/docs\/**\/*.php\\\"\\n - \\\"\/src\/View\/chat\/**\/*.php\\\"\\n - \\\"\/src\/View\/home\/**\/*.php\\\"\\n - \\\"\/src\/View\/layout.php\\\"\\n\\n principles:\\n - KISS\\n - DRY\\n - REST\\n - SRP\\n\\n rules:\\n # URL-Regeln\\n - id: \\\"url-no-create\\\"\\n check_type: \\\"forbidden_pattern\\\"\\n patterns:\\n - \\\"\/create\\\"\\n in_files: \\\"**\/*.php\\\"\\n severity: \\\"critical\\\"\\n description: \\\"Keine \/create URLs - verwende \/new\\\"\\n\\n - id: \\\"url-no-update-delete\\\"\\n check_type: \\\"forbidden_pattern\\\"\\n patterns:\\n - \\\"\/update\\\"\\n - \\\"\/delete\\\"\\n in_files: \\\"**\/*.php\\\"\\n severity: \\\"critical\\\"\\n description: \\\"Keine \/update oder \/delete URLs - verwende HTTP-Methoden\\\"\\n\\n # View-Struktur\\n - id: \\\"no-page-container\\\"\\n check_type: \\\"forbidden_pattern\\\"\\n patterns:\\n - \\\"page-container\\\"\\n in_files: \\\"View\/**\/*.php\\\"\\n severity: \\\"critical\\\"\\n description: \\\"Kein page-container Wrapper\\\"\\n\\n - id: \\\"no-card-wrapper\\\"\\n check_type: \\\"forbidden_pattern\\\"\\n patterns:\\n - '<div class=\\\"card\\\">'\\n in_files: \\\"View\/**\/*.php\\\"\\n severity: \\\"critical\\\"\\n description: \\\"Keine Cards als Wrapper um Formulare\\\"\\n\\n - id: \\\"no-form-section\\\"\\n check_type: \\\"forbidden_pattern\\\"\\n patterns:\\n - \\\"form-section\\\"\\n in_files: \\\"View\/**\/*.php\\\"\\n severity: \\\"critical\\\"\\n description: \\\"Keine verschachtelten form-section Strukturen\\\"\\n\\n - id: \\\"no-page-header\\\"\\n check_type: \\\"forbidden_pattern\\\"\\n patterns:\\n - \\\"page-header\\\"\\n in_files: \\\"View\/**\/*.php\\\"\\n severity: \\\"critical\\\"\\n description: \\\"Verwende breadcrumb + h1 separat\\\"\\n\\n - id: \\\"breadcrumb-first\\\"\\n check_type: \\\"required_pattern\\\"\\n patterns:\\n - '<nav class=\\\"breadcrumb\\\">'\\n in_files: \\\"View\/**\/show.php\\\"\\n severity: \\\"critical\\\"\\n description: \\\"Breadcrumb als erstes Element in show\/new\/edit\\\"\\n\\n - id: \\\"form-max-width\\\"\\n check_type: \\\"required_pattern\\\"\\n patterns:\\n - 'max-width'\\n in_files: \\\"View\/**\/new.php\\\"\\n severity: \\\"major\\\"\\n description: \\\"Formular mit max-width Style\\\"\\n\\n - id: \\\"table-sortable\\\"\\n check_type: \\\"required_pattern\\\"\\n patterns:\\n - \\\"data-sortable\\\"\\n in_files: \\\"View\/**\/index.php\\\"\\n severity: \\\"major\\\"\\n description: \\\"Tabellen haben data-sortable Attribut\\\"\\n\\n pass_threshold:\\n critical_max: 0\\n major_max: 2\\n minor_max: 5\\n\\n reference_files:\\n index: \\\"\/src\/View\/tasks\/index.php\\\"\\n show: \\\"\/src\/View\/tasks\/show.php\\\"\\n new: \\\"\/src\/View\/tasks\/new.php\\\"\\n edit: \\\"\/src\/View\/tasks\/edit.php\\\"\\n\\n restful_urls:\\n pattern:\\n index: \\\"\/{resource}\\\"\\n show: \\\"\/{resource}\/{id}\\\"\\n new: \\\"\/{resource}\/new\\\"\\n edit: \\\"\/{resource}\/{id}\/edit\\\"\\n\\n css_classes:\\n layout:\\n - breadcrumb\\n - stats-grid\\n - stat-card\\n - page-actions\\n - action-bar\\n - filters\\n - links-bar\\n - result-box\\n forms:\\n - form\\n - form-group\\n - form-input\\n - form-textarea\\n - form-select\\n - form-actions\\n - form-message\\n buttons:\\n - btn\\n - btn--primary\\n - btn--success\\n - btn--danger\\n - btn--light\\n - btn--info\\n\"\n }\n ],\n \"row_count\": 2,\n \"error\": null,\n \"execution_ms\": 0\n}"
}
]
}