Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Five Workspace Anti-Patterns That Fake Agent Skill

Описание и применение

В статье описываются пять антишаблонов работы с рабочим пространством, которые создают иллюзию успеха агента. Предлагается использовать изолированные ветки, ограничения доступа к файлам, атомарное применение патчей, сохранение состояния перед запуском и очистку после выполнения.

Задача

Coding agents often appear successful because the workspace is not isolated, leading to hidden failures and security leaks.

Результат

Implementing isolated worktrees, path gates, atomic patch application, and pre-run snapshots eliminates hidden failures, secures secrets, and ensures reproducible agent demos.

Рабочий процесс

  • Create a unique worktree or clone for the run
  • Configure path gates to allow only safe prefixes and deny secrets
  • Generate a unified diff patch from the agent
  • Check the patch with git apply --check
  • Apply the patch atomically if check passes
  • Record HEAD and git status before the run
  • Run gates.sh to validate changes
  • If gates fail, perform git reset --hard to the recorded HEAD and git clean -fd
  • Delete the temporary worktree or clone after the run

Доказательства

Give every run a throwaway worktree. Apply patches only after a gate passes.

Источник

Deny by default. Allow one path prefix. Reject reads that match a deny list.

Источник

Stage one unified diff. Apply it atomically. Reject the whole patch when any gate fails.

Источник

Snapshot before tools. Revert on red. Record HEAD and git status --porcelain as first-class outputs.

Источник

One run, one directory, one wipe. Cold clone or a fresh worktree every time.

Источник

  • Дата записи: 2026-09-16T16:45:22.916Z