Prohibition of Direct DBMS Access
Global rule for all agents and subagents.
Context
The 1C:Enterprise platform is the only legitimate data access layer.
Direct access to the DBMS (PostgreSQL, MS SQL, etc.) bypasses business logic,
violates data integrity, and creates security risks.
Rules
PROHIBITED (without exceptions)
- Direct modification of data in the DBMS:
INSERT,UPDATE,DELETE,TRUNCATE, DDL operations - Generating or suggesting SQL scripts for data changes
- Bypassing platform mechanisms (RLS, locks, subscriptions) through direct access
PROHIBITED (without user approval)
- Reading data from the DBMS directly (
SELECT) — only through 1C platform queries - Connecting to the DBMS by any means (psql, sqlcmd, ODBC, etc.)
PERMITTED (performance tasks only)
With explicit user approval or if the task is classified
as a performance task:
SELECTqueries to the DBMS for analyzing execution plans (EXPLAIN ANALYZE)- Reading DBMS system views (
pg_stat_*,sys.dm_exec_*) - Analyzing locks, statistics, and indexes through system views
Even in these cases — read only, no changes.
Behavior on Violation
- DO NOT execute a query against the DBMS
- Record the attempt in
{role}-context.md - Suggest a platform alternative (1C query, BСП mechanism, etc.)
- If a platform alternative is impossible —
clarification_needed→ user
depends_on: []