这是一篇由原始材料转换而来的阅读页,保留了源文件的主要结构,并补充了可追溯的来源说明与链接。

摘要

These are rules the repository should enforce mechanically where possible.

openaimarkdowntemplate / pattern

Architecture invariants

These are rules the repository should enforce mechanically where possible.

Layering

  • Code may only depend on approved adjacent layers.
  • Cross-domain access must go through explicit interfaces.

Boundary validation

  • Parse and validate external inputs at boundaries.
  • Do not rely on guessed payload shapes.

Observability

  • New runtime-critical flows should emit structured logs.
  • Important async or long-running operations should expose metrics or traces.

File hygiene

  • Keep files below the agreed size limit.
  • Prefer shared utilities over duplicated local helpers.

Agent readability

  • Important workflows must be discoverable from docs/index.md.
  • Repeated shell sequences should become scripts.
  • Critical decisions should live in versioned docs or plans, not chat history.

来源与参考

源文件: openai/templates/architecture-invariants.md

来源目录: /srv/project/harness-engineering

继续阅读