| name | pattern-detection |
| description | Detect codebase patterns — commit velocity anomalies, codebase drift, and dependency risks — and persist them as workspace learnings |
| version | 2.0.0 |
| author | kai-agent |
| metadata | {"kai":{"tags":["kai","security","patterns","analysis"]}} |
Pattern Detection
Detect systemic patterns that go beyond individual vulnerabilities. These are structural signals about codebase health, consistency, and risk. They are persisted as workspace learnings (category pattern) so that future cycles — and the Brief page — can reason about them.
Prerequisites
- Kai MCP tools available (connected to Kai backend)
- At least one repository connected to the workspace
kai_workspace_learnings_add available
When to Run
- During daily lifecycle check-ins (after scanning, before proposing actions)
- When a user asks about codebase health or patterns
- After completing a security audit that reveals structural issues
How to persist a pattern
Every detected pattern becomes one kai_workspace_learnings_add call with: