Codehabits

v0.1.4
io.github.codehabits-dev/codehabits-mcp Checked 2 days ago Published 2 months ago

Team conventions, anti-patterns, and domain knowledge from .codehabits/ for AI coding agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_team_context

Get team coding conventions, anti-patterns, and domain knowledge. Use this before writing or reviewing code to understand how the team works.

ParameterTypeDescription
file_pathstringFile path to get context specific to that file type
scopestringFilter context to a specific area

check_code

Validate a code snippet against team conventions and anti-patterns. Returns violations with suggestions.

ParameterTypeDescription
code *stringThe code snippet to check
file_pathstringFile path for context-aware checking

get_knowledge

Get domain-specific knowledge about a topic (e.g., authentication, database, deployment)

ParameterTypeDescription
topic *stringThe topic to look up (e.g., "authentication", "database", "api")

suggest_reviewers

Suggest the best reviewers for a set of changed files based on team expertise

ParameterTypeDescription
files *arrayList of file paths that were changed

get_repo_map

Get the heuristic repository map (packages, entrypoints, subsystems, hot files, docs). Prefer this over exploring the whole tree. Optional section filter keeps context small.

ParameterTypeDescription
sectionstringSlice of the map to return (default: compact all)

get_change_routes

Given a path or directory prefix, return directories/files that often change together (from git co-change heuristics).

ParameterTypeDescription
path *stringFile path or directory prefix to find related change routes for

record_feedback

Record when a user overrides or corrects team intelligence, or propose a new convention. Writes to local .codehabits/proposals.json (gitignored); does not change tracked intelligence until approve_proposal.

ParameterTypeDescription
reason *stringWhy this change is being proposed
type *stringKind of change
categorystringConvention category (e.g. testing, naming)
file_pathstringFile path where this came up
rulestringConvention rule text (for new conventions)
targetIdstringID of existing convention (required for update, exception, or deprecate)

approve_proposal

Approve a pending proposal and merge it into active intelligence (conventions.json) and regenerate skill markdown. Creates tracked git changes.

ParameterTypeDescription
proposal_id *stringProposal id from record_feedback (e.g. prop-001)