SynapsesOS
Reference — Tools

Rules & ADRs

rules

Unified rule and Architecture Decision Record (ADR) management.

Absorbs: upsert_rule, delete_rule, get_rule_candidates, upsert_adr, get_adrs.

Parameters

ParameterTypeRequiredDescription
actionstringYesupsert, delete, candidates, upsert_adr, list_adrs.
rule_idstringaction=upsert/deleteRule ID.
descriptionstringaction=upsertRule description.
severitystringaction=upserterror or warning.
edge_typestringNoEdge type to forbid. action=upsert.
from_file_patternstringNoSource file glob. action=upsert.
to_file_patternstringNoTarget file glob. action=upsert.
to_name_patternstringNoTarget entity name substring. action=upsert.
path_patternstringNoComma-separated edge sequence for multi-hop checks. action=upsert.
context_sourcestringNoProvenance. Rejects external/generated. action=upsert.
idstringaction=upsert_adrADR ID (kebab-case).
titlestringaction=upsert_adrADR title.
decisionstringaction=upsert_adrThe decision made.
statusstringNoproposed, accepted, deprecated, superseded. action=upsert_adr.
contextstringNoProblem context. action=upsert_adr.
consequencesstringNoTrade-offs. action=upsert_adr.
linked_filesarrayNoFile patterns for ADR. action=upsert_adr.
filestringNoFile path to filter ADRs. action=list_adrs.

Action: upsert

Create or update an architectural rule.

{
"tool": "rules",
"arguments": {
"action": "upsert",
"rule_id": "no-direct-db",
"description": "Handlers must not import database packages directly",
"severity": "error",
"from_file_pattern": "internal/mcp/*",
"to_file_pattern": "internal/store/*",
"edge_type": "IMPORTS"
}
}

Action: delete

Remove a rule by ID.

{
"tool": "rules",
"arguments": {
"action": "delete",
"rule_id": "no-direct-db"
}
}

Action: candidates

List failure episodes not yet promoted to rules.

{
"tool": "rules",
"arguments": { "action": "candidates" }
}

Action: upsert_adr

Create or update an Architecture Decision Record.

{
"tool": "rules",
"arguments": {
"action": "upsert_adr",
"id": "use-sqlite",
"title": "Use SQLite for local storage",
"decision": "SQLite for all persistent state",
"status": "accepted",
"context": "Need embedded DB with zero config",
"consequences": "Single-writer limitation accepted"
}
}

Action: list_adrs

Query ADRs, optionally filtered by file.

{
"tool": "rules",
"arguments": {
"action": "list_adrs",
"file": "internal/store/store.go"
}
}