monitor
Proactive code quality feedback
Get quality scores as you write code. Monitor watches your changes, catches issues early, logs insights to memory, and suggests relevant patterns - all without slowing you down.
Problems This Solves
"Quality checks are an afterthought"
You run linters after you're done. By then you've written 100 lines with the same anti-pattern repeated throughout.
"Can't see quality trends"
Is code quality improving or degrading? You only know when tech debt becomes painful. No leading indicators.
"Missing context for issues"
Linter says "complex function." But what triggered it? What were you trying to do? No history to learn from.
"Pattern suggestions come too late"
Code review catches missing patterns after you've shipped the PR. Should have known about the better approach while writing.
What It Does
Monitor is designed to run after code changes. It's lightweight and non-blocking.
Quality Scoring
Returns a 0-10 score for each code change based on security, complexity, and adherence to patterns.
Issue Detection
Surfaces problems immediately. Security issues, missing error handling, complexity spikes - caught as you type.
Memory Logging
Automatically saves quality snapshots to memory. Build a history of how files evolve over time.
Pattern Suggestions
Recommends relevant patterns when it spots opportunities. Error handling needed? Here's the pattern.
Trigger Actions
create
Run when a new file is created. Checks initial structure and catches bad patterns before they spread.
edit
Run after edits. Most common trigger. Tracks how quality changes with each modification.
save
Run on save for checkpoint-style monitoring. Less frequent but captures "finished" states.
Usage
Basic Monitoring
Pass the code and what triggered the check.
monitor({
code: '... your code ...',
action: 'edit',
filePath: 'src/api/users.ts',
language: 'typescript'
})Example Response
{
"score": 7.5,
"issues": [
{
"severity": "medium",
"message": "Empty catch block - errors are being swallowed",
"line": 42
}
],
"suggestions": [
{
"patternId": "TS-ERR-001",
"description": "Consider using Result type for error handling"
}
],
"logged": true
}Quality feedback in real-time
Catch issues as you write, not after you've shipped.