write_best_practice
Write a best practice guide, index it in a vector store, and push to git—capturing team rules and conventions for recurring code patterns.
Instructions
Create a coding standard or best practice document, index it, and auto-push.
Side effects: creates best-practices/{slug}.md in the docs path,
indexes it into the vector store, and pushes to git if configured.
Overwrites an existing file with the same title.
Use for recurring patterns, conventions, and rules the team should follow.
Use write_architecture_doc() for system-level decisions,
write_bugfix_summary() after fixing a specific bug.
Args:
title: Short title (e.g. "Error Handling in API Routes")
context: When and where this practice applies
rule: The actual rule or pattern to follow (be specific)
rationale: Why this rule exists and what problems it prevents
examples: Code examples showing correct vs incorrect usage (optional)
project: Target project name (optional)
Returns:
Saved filename, chunk count, and whether auto-push succeeded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | Yes | ||
| title | Yes | ||
| context | Yes | ||
| project | No | ||
| examples | No | ||
| rationale | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |