Universal Agent Law
Relevant source files
The following files were used as context for generating this wiki page:
The Universal Agent Law is a portable, agent-agnostic core of engineering conduct established within the flext-tap-ldif repository. It serves as an inviolable framework that binds both human users and AI agents (such as Claude, Codex, or GitHub Copilot) to a specific set of rigorous development standards. Its primary purpose is to ensure consistency, safety, and high-quality engineering across all project types and sessions.
This law mandates a "Zero-Tolerance" approach to technical debt, strict adherence to defined scopes, and a "Fix-Forward" philosophy for shared working environments. It operates as the foundational governance pointer for the project, overriding all other configurations except for explicit instructions provided by a live user.
Sources: AGENTS.md:6-14, README.md:46-47
Core Engineering Conduct
The Universal Agent Law is structured into thirteen specific mandates that govern how code is written, modified, and validated.
1. Zero-Tolerance and Root Cause Analysis
The law enforces a strict policy against temporary fixes. Agents must always address the root cause of an issue using canonical code and validate the fix with objective evidence, such as exit codes and output logs. Superseded code must be removed immediately to prevent "dead code" accumulation.
Bypassing quality gates using stubs, fakes, TODO comments, or suppression directives (e.g., # type: ignore) is strictly forbidden. Any failure encountered during a task is considered the responsibility of the current agent, regardless of whether it was pre-existing.
Sources: AGENTS.md:16-26, AGENTS.md:37-42
2. Fix-Forward and Coordination
In environments where multiple agents share a working tree, reverting to previous states is prohibited as it can destroy in-flight work. Agents must coordinate through a committed task board and commit small, frequent changes to allow state rebuilding from Git history.
This diagram illustrates the coordination flow required for multiple agents sharing a single repository.
Sources: AGENTS.md:28-35, AGENTS.md:88-95
3. Operational Protocols
The law defines strict protocols for handling blocked operations and destructive commands. If a tool or command is blocked by security hooks or missing permissions, the agent must stop immediately and provide the exact command for the user to run manually. Bypassing these restrictions through techniques like subshell wrapping (bash -c) is a violation.
| Principle | Description | Mandate |
|---|---|---|
| SSOT | Single Source of Truth | Reference one authoritative source; fail if absent. |
| SOLID | Design Principles | Respect SRP, OCP, LSP, ISP, and DIP. |
| YAGNI | You Ain't Gonna Need It | No speculative parameters or dead branches. |
| DI/DIP | Dependency Injection | Depend on abstractions; no hidden globals. |
Sources: AGENTS.md:68-80, AGENTS.md:82-86, AGENTS.md:97-106
Implementation Constraints
The technical implementation of the LDIF tap must reflect these principles through strict typing and modular architecture.
Type Safety and Validation
Agents must use the most restrictive types possible to ensure compile-time safety. This is reflected in the project's models, which utilize Pydantic's EnforcedModel and Annotated types to validate data integrity at the source.
class LdifFile(m.EnforcedModel):
file_path: Annotated[str, u.Field(..., description="Path to LDIF file")]
file_size: Annotated[t.NonNegativeInt, u.Field(description="File size in bytes")] = 0
# ... validation logic ensures no negative values or empty paths
Sources: src/flext_tap_ldif/_models/file_metadata.py:12-40, AGENTS.md:82-86
Architectural Integrity
The project architecture utilizes MRO (Method Resolution Order) mixins to expose utilities and models, ensuring a clean separation of concerns as mandated by the Universal Agent Law's SOLID requirements.
The processor architecture relies on composition and strict result types, avoiding internal state leakage.
Sources: src/flext_tap_ldif/_utilities/processor.py:16-30, README.md:32-37
Summary of Governance
The Universal Agent Law ensures that flext-tap-ldif remains a high-integrity integration project. By mandating evidence-based completion, forbidding hacks, and requiring strict coordination, it protects the codebase from the entropy typically associated with multi-agent development.
Sources: AGENTS.md:108-112, README.md:44-50