AGENTS.md Rules That Survive Past the Chat Pane: Jin's Deterministic Injection Chain
AGENTS.md rules rarely pin down where they apply, so model behavior is anyone's guess. Jin's three-step injection makes conventions a structural constraint, and a fact-checking pass keeps nonexistent symbols out of the architecture.
Jin is an open-source coding agent that attacks a common blind spot: coding agents that support rules files like AGENTS.md rarely define when or at what granularity those rules take effect. Jin builds a deterministic chain instead. Two rule layers exist: a project-level AGENTS.md at the repo root for shared conventions such as layering, naming, tests, and domain knowledge, and a global rule file in the application data directory for personal preferences like language and reply style. Both are read on every call, so edits apply immediately to the next scan, planning, or implementation step, with a 16,000-character cap per layer to keep requests from bloating.
Rules enter the pipeline at three points. The semantic scan has the model refine architecture down to file responsibilities, kind, domain labels, and the responsibility of each method, field, or property (facet). Planning generates task breakdowns, acceptance criteria, and architecture change proposals under rule constraints. Implementation workers carry the rules in their system prompt and receive a mandatory "Facet-level intent (must satisfy)" block listing the intent of each method they own, plus a per-item self-check before finishing. Structural facts from LSP discard invented member names, so the architecture only contains symbols that actually exist. Rules can't expand file whitelists or bypass the approval gateway; they constrain process, not chat.
A rule file that might affect a model is effectively a suggestion; knowing exactly which step enforces it changes whether developers can treat it as a contract.
Jin frames rules as constraints on the process rather than hints to the model, which matches how deterministic control is actually achieved in LLM-based tooling.
Validating facet intent against structural facts turns rule compliance from a probability into a checkable property, catching hallucinated APIs before they enter the design.