Agent Dev 101

Модуль 02 · Урок 2.14

Урок 2.14. Agent-OS / Ouroboros

На этой странице
  1. Зачем это нужно
  2. Основная идея
  3. Ключевые термины
  4. Как это устроено
  5. OS stack
  6. Как пользоваться
  7. Что получает студент
  8. Пример: build task management CLI
  9. Когда Agent-OS полезен
  10. Когда не стоит брать
  11. Риски
  12. Prompt patterns
  13. Практика
  14. Критерии готовности
  15. Краткое резюме
  16. Вопросы для самопроверки
  17. Источники для актуализации
  18. Что дальше

Зачем это нужно

Agent-OS / Ouroboros важен как пример OS-like thinking в AI-agent development. Многие инструменты дают prompts, commands или specs. Ouroboros пытается сделать больше:

text
Каждое действие agent должно быть связано с seed spec,
записано в ledger и проверено через evaluation gates.

Это приближает agent workflow к операционной модели, где есть:

  • intent;
  • runtime;
  • state;
  • audit trail;
  • commands;
  • evaluation;
  • resume;
  • cancellation;
  • integrations.

Для курса это хороший мост между SDD, observability, guardrails and multi-agent orchestration.

Основная идея

Ouroboros исходит из тезиса:

text
Большинство AI coding failures начинается не на output,
а на input: vague prompt, hidden assumptions, no durable spec.

Поэтому workflow начинается с interview and seed:

text
interview
-> seed
-> run
-> evaluate

Seed spec фиксирует intent. Ledger фиксирует действия. Evaluation gates проверяют result.

Ключевые термины

Термин Значение
Agent OS Операционная модель для agent execution: commands, runtime, state, safety, evaluation.
Seed Immutable или durable specification, которая фиксирует intent, constraints, acceptance criteria.
Ledger Журнал событий and actions, делающий workflow auditable and replayable.
Runtime adapter Подключение к конкретному agent harness: Codex CLI, Claude Code, Gemini CLI, Kiro CLI и т.д.
MCP Model Context Protocol layer для tools and integrations.
Evaluation gate Проверка результата перед переходом дальше.
ooo commands Agent-facing commands Ouroboros workflow.

Как это устроено

flowchart TD A[Human goal] --> B[Interview] B --> C[Seed spec] C --> D[Ledger-bound run] D --> E[Runtime adapter] E --> F[Coding agent] F --> G[Evaluation gate] G --> H{Converged?} H -->|No| I[Evolve / debug / resume] I --> D H -->|Yes| J[Verified result]

В этой модели agent не просто "получил prompt". Он работает в loop, где intent, execution and verification связаны.

OS stack

Ouroboros описывает stack слоями:

Слой Роль
Shell User-facing terminal or command surface.
Apps/plugins Domain workflows: PR ops, releases, incident workflows, integrations.
Core OS Seed, ledger, runtime, MCP, safety boundaries.

Для курса это важно: зрелый agent workflow может быть организован как platform, а не как collection of prompts.

Как пользоваться

На обзорном уровне:

  1. Установить Ouroboros по official docs.
  2. Выполнить setup для нужного runtime.
  3. Начать с interview.
  4. Превратить ответы в seed.
  5. Запустить run.
  6. Провести evaluation.
  7. Использовать status/resume/cancel для long-running sessions.

Примеры commands:

text
ooo setup
ooo interview "I want to build a task management CLI"
ooo seed
ooo run
ooo evaluate
ooo status
ooo resume-session

В terminal CLI могут быть equivalents вроде:

text
ouroboros setup
ouroboros init start
ouroboros run seed.yaml

Точный command surface зависит от installation and runtime.

Что получает студент

Ouroboros полезен как mental model:

text
prompt -> interview -> seed -> execution -> ledger -> evaluation

Это сильно отличается от:

text
prompt -> code -> done

Особенно важны три идеи:

  1. Intent must be crystallized before execution.
  2. Execution should be auditable.
  3. Completion requires evaluation, not confidence.

Пример: build task management CLI

Плохой prompt:

text
Build a task management CLI.

Ouroboros-style:

text
ooo interview "I want to build a task management CLI"

Interview должен выяснить:

  • local storage or remote API;
  • commands;
  • task fields;
  • status workflow;
  • sync requirements;
  • import/export;
  • tests;
  • packaging;
  • non-goals.

После seed:

text
ooo run
ooo evaluate

Evaluation должна проверить:

  • CLI commands work;
  • tests pass;
  • acceptance criteria covered;
  • no unauthorized scope creep;
  • docs and usage are consistent.

Когда Agent-OS полезен

Agent-OS / Ouroboros хорошо подходит, когда:

  • задачи long-running;
  • нужно audit and replayability;
  • нужно поддерживать multiple runtimes;
  • agent должен работать через durable seed specs;
  • важны evaluation gates;
  • есть multi-step или multi-agent workflows;
  • нужны integrations через MCP/plugins.

Когда не стоит брать

Он может быть избыточен, если:

  • task маленькая;
  • команда только учится писать specs;
  • repository не имеет tests;
  • нужен lightweight Markdown workflow;
  • нельзя принять runtime complexity;
  • security model проекта не готов к дополнительным integrations.

Риски

Риск Как проявляется Что делать
Platform complexity Нужно понимать setup, runtime, MCP, commands. Начинать с isolated demo project.
False sense of safety Ledger есть, но tests слабые. Evaluation must include mechanical checks.
Seed rigidity Seed зафиксировал неверный assumption. Делать interview quality gate.
Integration risk MCP/tools получают доступ к чувствительным системам. Настраивать scoped permissions and review.
Overhead OS-like flow тяжелее простого SDD. Использовать для задач, где audit and runtime matter.

Prompt patterns

Начать с interview

text
Use Ouroboros.
Start with an interview to expose hidden assumptions.
Do not run implementation until the seed spec is reviewed.

Проверить seed

text
Review the seed for:
- explicit goals
- non-goals
- constraints
- acceptance criteria
- ambiguity
- verification plan

Evaluation gate

text
Evaluate the run against the seed.
Separate:
- mechanical failures
- semantic gaps
- unclear requirements
- scope creep

Практика

Сформулируйте seed-ready задачу:

text
Goal:
Actors:
Commands / interfaces:
Constraints:
Non-goals:
Acceptance criteria:
Verification:
Ambiguities to interview:

Проверьте, можно ли дать эту задачу агенту без дополнительных устных объяснений.

Критерии готовности

После урока студент должен уметь:

  • объяснить Agent-OS как operating model;
  • описать seed, ledger, runtime adapter and evaluation gate;
  • понять отличие ooo interview от обычного prompt;
  • объяснить, когда OS-like workflow оправдан;
  • назвать риски runtime and integration complexity.

Краткое резюме

Agent-OS / Ouroboros показывает, куда может развиваться SDD tooling: от отдельных Markdown specs к auditable execution environment. Его сила - durable intent, ledger and evaluation. Его цена - complexity, которую нужно оправдывать масштабом задачи.

Вопросы для самопроверки

  1. Зачем нужен seed spec?
  2. Чем ledger полезен для agent workflow?
  3. Почему interview снижает risk of vague prompt?
  4. Когда Agent-OS будет слишком тяжелым?
  5. Какие проверки должны входить в evaluation gate?

Источники для актуализации

Что дальше

Следующий урок разберет Conductor - plugin-first SDD layer, который показывает, как specification workflow можно встроить в existing coding agents через project context, tracks, plans and review commands.

Обновлено 03.10.2026