manage_architecture_rules
Query, update, delete, or reset architectural boundary and layer rules in tzero.rules.json to maintain tier constraints on disk.
Instructions
Manages the complete lifecycle of architectural boundary definitions, tier rules (T-1 to T-4), and layer constraints configured in tzero.rules.json, distinguishing from 'enforce_architecture_rules' and 'generate_architecture_blueprint' by adding, updating, resetting, or deleting boundary definitions on disk rather than validating files or drawing diagrams.
Parameters:
action(str, optional, default='query'): Rule lifecycle action: 'query' to inspect active rules, 'update' to add or modify rules, 'delete' to remove a rule, 'reset' to restore defaults.project_root(str, optional, default='.'): Target repository root where tzero.rules.json is located (default: current directory).rule_name(str, optional, default=''): Name or identifier of the rule to update or delete when action is 'update' or 'delete'.rule_definition(str, optional, default=''): JSON string or markdown specification of the rule to set when action is 'update'.
Behavior:
State-Modifying / Destructive: Queries existing rules or updates/deletes layer boundary specifications on disk when action is 'update', 'delete', or 'reset'.
Idempotent: Repeated queries or sets with identical values produce stable configurations.
100% Offline: Local JSON file management without external communication.
Auth & Rate Limits: Zero authentication or cloud credentials required; executes in <20ms.
Error Handling: Validates JSON syntax before writing; emits descriptive error messages on malformed rule definitions.
Usage Guidelines:
When to use: Retrieve, inspect, add, update, reset, or delete architectural layer constraints (e.g. presentation -> domain -> persistence rules).
When NOT to use: Do not use for actively validating codebase files against these rules (use 'enforce_architecture_rules' instead); do not use for generating visual Mermaid architectural topology diagrams (use 'generate_architecture_blueprint' instead).
Returns: JSON or Markdown status report detailing active or updated architectural rules.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Rule lifecycle action: 'query' to inspect active rules, 'update' to add or modify rules, 'delete' to remove a rule, 'reset' to restore defaults. | query |
| rule_name | No | Name or identifier of the rule to update or delete when action is 'update' or 'delete'. | |
| project_root | No | Target repository root where tzero.rules.json is located (default: current directory). | . |
| rule_definition | No | JSON string or markdown specification of the rule to set when action is 'update'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |