Engineering Law & Agent Rules
Relevant source files
The following files were used as context for generating this wiki page:
The Engineering Law & Agent Rules constitute the foundational behavioral and technical framework for the flext-dbt-ldap repository. These rules represent an "inviolable, agent-agnostic core" that binds all AI agents (such as Claude, Cursor, or GitHub Copilot) and human contributors to a strict standard of engineering conduct. The primary purpose of these laws is to ensure consistency, prevent the accumulation of technical debt, and maintain the integrity of the Single Source of Truth (SSOT) across the project's LDAP data transformation pipelines.
Sources: AGENTS.md:5-12, README.md:21-23
Universal Agent Law
The Universal Agent Law is the portable core of engineering conduct. It dictates that instructions from a live user override these blocks, but no other convenience or speed requirement can relax them. The protocol emphasizes a "Zero-Tolerance" approach to workarounds and a "Fix-Forward" strategy for collaborative environments.
Sources: AGENTS.md:7-14
Core Directives
| Directive | Description |
|---|---|
| Zero-Tolerance | Always fix root causes; never use stubs, fakes, or TODO markers. |
| Fix-Forward-Only | Never unilaterally revert shared work; accept the current state and move forward. |
| No Workarounds | Bypassing a gate with a temporary fix is considered a defect. |
| Stay In Scope | Execute only what was requested; do not perform unrequested refactors. |
| Honest Reporting | "Done" requires objective evidence (exit codes, output lines). |
Sources: AGENTS.md:16-51
Technical Implementation Standards
The project enforces strict technical patterns derived from the Universal Engineering Principles. These principles ensure that the dbt (data build tool) and LDAP integration remains modular and type-safe.
Engineering Principles
- SSOT (Single Source of Truth): One authoritative source per fact. For instance, the project uses a single sync state file (
.flext_dbt_ldap_sync_state.json) to track incremental bookmarks. - SOLID & DI: Dependencies must be injected. The
FlextDbtLdapClientMixindemonstrates this by abstracting the LDAP API throughp.Ldap.LdapClient. - Restrictive Typing: Use the most restrictive types possible. The codebase explicitly forbids
Anyor bareobjectwithout documentation.
Sources: AGENTS.md:66-77, src/flext_dbt_ldap/services/sync.py:166-168, src/flext_dbt_ldap/services/client.py:19
Protocol & Lifecycle Flow
The following diagram illustrates the interaction between an Agent/Developer and the system following the defined protocols for LDAP data extraction and transformation.
The workflow ensures that every step is validated with objective evidence before the task is marked as complete.
Sources: AGENTS.md:46-51, src/flext_dbt_ldap/services/client.py:68-84, src/flext_dbt_ldap/protocols.py:33-54
Operational Protocols
Blocked-Operation Protocol
If a tool or command is blocked by security hooks or sandboxes, agents must not seek a bypass.
- Stop: Do not retry variations.
- Diagnose: Explain the block in one sentence.
- Handoff: Provide the exact command for the user to run manually.
- Wait: Wait for user output before continuing.
Sources: AGENTS.md:58-64
Sync and State Management
The project employs strict state management for LDAP synchronization to prevent data loss or duplicate processing.
Multi-Agent Coordination
Because multiple agents may share a single working tree, the project mandates coordination through a committed task board.
- Ownership: Claim tasks with a lease entry in
.agents/coordination/tasks.md. - Commits: Commit small and often so state can be rebuilt from
git log. - No Attribute: Write commits as the user without bot/agent attribution trailers.
Sources: AGENTS.md:81-86, AGENTS.md:79-80
The Engineering Law & Agent Rules serve as the mandatory governance framework for the flext-dbt-ldap project. By adhering to these strict protocols—ranging from root-cause-only fixes to honest reporting and multi-agent coordination—the project ensures a high-quality, maintainable integration between LDAP directories and data warehouses.