Contracts

Web-Oberfläche zur Verwaltung von Contracts - YAML-basierte Qualitätsverträge für Code und Dokumentation.

URL/contracts
ControllerContractController
Views/src/View/contracts/
Datenbankki_protokoll.contracts
MCP-Servermcp-contracts

Funktionen

Routes

RouteMethodeBeschreibung
/contractsGETContract-Liste
/contracts/newGETNeuer Contract (Formular)
/contractsPOSTContract erstellen
/contracts/{id}GETContract-Details
/contracts/{id}/editGETContract bearbeiten

Views

DateiFunktion
index.phpContract-Übersicht mit Filter und Statistiken
show.phpContract-Details mit YAML-Anzeige und Validierung
new.phpFormular für neuen Contract
edit.phpFormular zum Bearbeiten

Contract-Struktur (YAML)

name: example-contract
version: "1.0"
scope:
  paths:
    - /src/View/example/
  patterns:
    - "*.php"
rules:
  - type: structure
    check: required_elements
    elements: [h1, table]
  - type: content  
    check: no_hardcoded_paths
thresholds:
  critical: 0
  major: 2
  minor: 5

Versionierung

Jede Änderung an einem Contract erstellt automatisch eine neue Version. Die Historie wird in ki_protokoll.contract_history gespeichert.

Integration

Siehe auch