2161 lines
89 KiB
Markdown
2161 lines
89 KiB
Markdown
# Домовой — GEN2 Master Plan для Codex
|
||
|
||
**Статус:** целевой исполняемый план Architecture Generation 2
|
||
**Назначение:** перевести существующий Assistant/Домовой V1 в Gen2 без потери уже реализованных возможностей, evidence, истории и операционных инвариантов.
|
||
**Главный принцип:** сначала правильный эволюционирующий костяк, затем массовое наращивание capabilities.
|
||
|
||
---
|
||
|
||
# 0. Как пользоваться этим планом
|
||
|
||
Этот документ — не описание желаемых функций и не предложение переписать проект целиком.
|
||
Он задаёт **порядок реальных инженерных изменений**, которые Codex должен выполнять последовательно.
|
||
|
||
Перед выполнением Gen2 Codex обязан читать и учитывать:
|
||
|
||
1. `docs/DOMOVOY_CONSTITUTION.md` — смысл и неизменные принципы Домового;
|
||
2. `architecture/GEN2_TARGET_ARCHITECTURE.md` — целевые owners и зависимости;
|
||
3. `architecture/GEN2_CANONICAL_DATA_MODEL.md` — canonical data, projections и lifecycle;
|
||
4. `development/GEN2_MIGRATION_MAP.md` — V1 → Gen2 migration/cutover/rollback;
|
||
5. этот `development/GEN2_MASTER_PLAN.md` — порядок выполнения;
|
||
6. действующий `AGENTS.md` и task packet конкретного шага.
|
||
|
||
Если эти документы ещё не находятся в репозитории, `GEN2-000` обязан сначала внести их и принять через архитектурную процедуру.
|
||
|
||
**Ни один отдельный task packet не имеет права локально переопределять конечную архитектуру Gen2.**
|
||
|
||
---
|
||
|
||
# 1. Цель программы Gen2
|
||
|
||
Построить костяк Домового, который:
|
||
|
||
- не является оболочкой над одной LLM;
|
||
- понимает текущий Focus, Scope, цели и намерение владельца;
|
||
- имеет долговременную память, но передаёт модели только релевантную рабочую область;
|
||
- различает evidence, claim, belief, hypothesis, current/stale/historical knowledge;
|
||
- знает область применимости и скорость устаревания знания;
|
||
- не смешивает похожие данные разных людей, компаний, систем, баз и версий;
|
||
- помнит положительный и отрицательный опыт;
|
||
- превращает проверенные решения в Skill, а стабильные повторяемые Skills — в Reflex;
|
||
- способен вернуть Reflex обратно к reasoning при устаревании или расхождении;
|
||
- имеет evidence-backed SELF-модель: что умеет, где слаб, от чего зависит и чему научился;
|
||
- способен работать долго, checkpoint/resume и переживать restart;
|
||
- выбирает стоимость мышления: rule/reflex/skill/local model/strong model/research/team;
|
||
- может улучшать свои компоненты через proposal → sandbox → evaluation → canary → promotion/rollback;
|
||
- управляется преимущественно разговором, а не админками;
|
||
- сохраняет строгие границы Identity/Authority/Commit/Executor/Outcome;
|
||
- допускает очень широкие возможности, но оценивает последствия и предупреждает владельца;
|
||
- не выдумывает факты и не выдаёт гипотезу за истину;
|
||
- оставляет архитектурное место для будущих ambient audio/video, дома, устройств, PC/mobile hands, роботов и новых классов capabilities.
|
||
|
||
---
|
||
|
||
# 2. Что является ДНК и не должно потерять смысл
|
||
|
||
Даже если реализация позже будет полностью заменена, следующие инварианты сохраняются:
|
||
|
||
1. `LLM != Assistant`.
|
||
2. `Observation != Claim != Belief/verified knowledge`.
|
||
3. `Memory != prompt/context`.
|
||
4. `Identity != Authority`.
|
||
5. `Capability != Authority`.
|
||
6. `Proposed action != Authorized action != Commit != Execution receipt != verified world outcome`.
|
||
7. `HTTP/tool success != фактический Outcome в мире`.
|
||
8. `restart != потеря обязательства/задачи`.
|
||
9. `retry != повторное необратимое действие`.
|
||
10. Canonical owner каждого состояния ровно один.
|
||
11. Никакого прямого cross-owner DB доступа как способа обойти контракт.
|
||
12. Никакого внешнего mutation в обход Commit/Executor.
|
||
13. Никакого provider/model call в обход cognitive boundary.
|
||
14. Никакого process-local timer/queue как canonical future relevance.
|
||
15. Truth, usefulness и user preference — разные оси.
|
||
16. Creator изменения не является единственным Evaluator этого изменения.
|
||
17. Старое evidence не переписывается новой моделью; новая интерпретация создаёт новую производную версию.
|
||
18. World не становится владельцем истины.
|
||
19. SELF не становится God-orchestrator.
|
||
20. Configuration не превращается в бесконтрольный `key/value` или `map[string]any` склад.
|
||
21. Vector/embedding index не является canonical memory.
|
||
22. Rollback не должен требовать удаления уже накопленного evidence.
|
||
|
||
---
|
||
|
||
# 3. Общие правила для Codex
|
||
|
||
## 3.1 Сначала исследовать существующее
|
||
|
||
Перед изменением bounded context Codex обязан:
|
||
|
||
- найти текущего semantic owner;
|
||
- найти canonical writer/read path;
|
||
- найти migrations и repository;
|
||
- найти существующие regression/invariant tests;
|
||
- проверить callers;
|
||
- определить V1 compatibility/rollback path.
|
||
|
||
Нельзя создавать новую сущность только потому, что Codex не нашёл существующую за первые минуты поиска.
|
||
|
||
## 3.2 Никакой второй архитектуры рядом
|
||
|
||
Запрещено создавать параллельные:
|
||
|
||
- Memory owner;
|
||
- Intent owner;
|
||
- Attention Manager;
|
||
- Scheduler owner;
|
||
- Authority;
|
||
- Commit path;
|
||
- Work Graph;
|
||
- Context Compiler owner;
|
||
- generic Event Bus;
|
||
- generic Settings service без принятого Configuration owner.
|
||
|
||
## 3.3 Один canonical writer
|
||
|
||
Во время migration:
|
||
|
||
- допустимы shadow projection;
|
||
- допустим dual-read;
|
||
- допустима запись V1 + rebuildable shadow, если shadow не canonical;
|
||
- **не допускаются два canonical writer одного смысла**.
|
||
|
||
Каждый cutover task обязан явно написать:
|
||
|
||
```text
|
||
writer_before = ...
|
||
writer_after = ...
|
||
```
|
||
|
||
## 3.4 No destructive first
|
||
|
||
Сначала:
|
||
|
||
```text
|
||
new schema/path
|
||
-> backfill
|
||
-> shadow/read comparison
|
||
-> cutover
|
||
-> observation
|
||
-> retirement
|
||
```
|
||
|
||
Удаление старой схемы или rollback path — отдельная поздняя задача.
|
||
|
||
## 3.5 Не делать большой рефакторинг «заодно»
|
||
|
||
Если задача — Focus V2, Codex не переписывает одновременно model routing, CSS Creator Web и Commit runtime.
|
||
|
||
Найденные соседние проблемы записываются в `findings_not_changed`.
|
||
|
||
## 3.6 BLOCKED лучше архитектурного обхода
|
||
|
||
Допустимые terminal states:
|
||
|
||
- `BLOCKED_BY_SPEC_GAP`;
|
||
- `BLOCKED_BY_ARCHITECTURE_GAP`;
|
||
- `BLOCKED_BY_MISSING_CAPABILITY`;
|
||
- `BLOCKED_BY_CONFLICT`;
|
||
- `REQUIRES_MIGRATION_DECISION`.
|
||
|
||
Нельзя «как-нибудь заставить работать» нарушением owner boundary.
|
||
|
||
---
|
||
|
||
# 4. Git и поток разработки
|
||
|
||
## 4.1 PRE-GEN2 — обязательно сохранить всё текущее
|
||
|
||
До первой строки Gen2-кода Codex обязан:
|
||
|
||
1. Выполнить `git status` во всех известных worktree/рабочих ветках проекта.
|
||
2. Инвентаризировать все незакоммиченные изменения.
|
||
3. Ничего неизвестного не `reset`, не discard, не overwrite.
|
||
4. Отделить secrets, generated build garbage и runtime data от реального исходного кода.
|
||
5. Сделать preservation commit для всей актуальной незакоммиченной работы.
|
||
6. Привести все текущие рабочие ветки проекта в коммитированное состояние.
|
||
7. Выполнить только **FAST baseline gate**, используя уже имеющийся свежий CI evidence как часть доказательства.
|
||
8. Слить **все актуальные открытые изменения проекта в основной поток `main`** управляемыми merge.
|
||
9. Разрешить конфликты без потери функциональности и истории.
|
||
10. Push `main` в canonical remote.
|
||
11. Зафиксировать SHA как `GEN2_BASE_COMMIT`.
|
||
12. Создать immutable baseline tag, например `domovoy-pre-gen2-<date>`.
|
||
13. Сохранить короткий baseline evidence report.
|
||
14. Только после этого создать Gen2 integration branch/worktree.
|
||
|
||
Секреты, пароли, токены, build artifacts и случайный мусор в «закоммитить всё» не входят.
|
||
|
||
## 4.2 Поток Gen2
|
||
|
||
Рекомендуемый поток:
|
||
|
||
```text
|
||
main (чистая реперная версия)
|
||
↓
|
||
gen2/integration
|
||
↓
|
||
gen2/GEN2-xxx-task
|
||
↓ FAST gate
|
||
merge -> gen2/integration
|
||
↓
|
||
MILESTONE gate
|
||
↓
|
||
merge milestone -> main
|
||
```
|
||
|
||
Таким образом Gen2 не живёт месяцами в одной огромной ветке, расходящейся с `main`.
|
||
|
||
Каждая milestone-версия в `main` должна оставаться:
|
||
|
||
- backward compatible, или
|
||
- скрыта за контролируемым cutover/feature switch, или
|
||
- иметь доказанный rollback.
|
||
|
||
---
|
||
|
||
# 5. Стратегия тестирования: цель — разработка, тесты — страховка
|
||
|
||
## 5.1 Основной принцип
|
||
|
||
**Passing tests is not the goal of a task.**
|
||
Цель — реализованная архитектурная способность с достаточным доказательством, что критическое существующее поведение не сломано.
|
||
|
||
Нельзя превращать каждый task packet в многосуточный полный тестовый прогон.
|
||
|
||
## 5.2 FAST gate — обычный цикл
|
||
|
||
Запускается постоянно.
|
||
|
||
Содержит только:
|
||
|
||
- compile/test затронутых packages;
|
||
- 1–несколько regression tests именно изменяемого поведения;
|
||
- быстрый architecture/preflight check;
|
||
- `git diff --check`;
|
||
- при schema change — быстрый apply/rollback на isolated test DB, если это локально доступно и не требует тяжёлой инфраструктуры.
|
||
|
||
Не запускать автоматически весь household, multimodal, recovery и `go test ./...` после каждого небольшого изменения.
|
||
|
||
## 5.3 MILESTONE gate — после завершения органа
|
||
|
||
Запускается только после законченной архитектурной реперной точки.
|
||
|
||
Содержит:
|
||
|
||
- все tests изменённого owner;
|
||
- соседние contract/integration tests;
|
||
- ключевые V1 regression cases;
|
||
- migration/backfill/cutover evidence;
|
||
- relevant restart/recovery test;
|
||
- architecture checks.
|
||
|
||
## 5.4 FULL gate — редко
|
||
|
||
Полный тяжёлый прогон оправдан только:
|
||
|
||
- перед крупным merge архитектурной фазы;
|
||
- после критической schema migration;
|
||
- перед production canary/traffic switch;
|
||
- перед удалением V1 rollback path;
|
||
- перед объявлением Gen2 accepted/stable.
|
||
|
||
FULL включает весь доступный project suite, vet, architecture, recovery, household, multimodal и production smoke — но не повторяется между близкими задачами без нового риска.
|
||
|
||
## 5.5 STOP TEST EXPANSION
|
||
|
||
Если Codex видит, что:
|
||
|
||
- тестов пишется значительно больше, чем реализации;
|
||
- прогон тестов систематически доминирует над разработкой;
|
||
- добавляемые тесты не защищают новый существенный риск;
|
||
- один invariant уже надёжно защищён architecture test;
|
||
|
||
он обязан остановить расширение тестов и выбрать **минимально достаточный evidence set**.
|
||
|
||
Не тестировать тривиальные getters/mappings десятками вариантов.
|
||
|
||
## 5.6 Профили devctl
|
||
|
||
В раннем Gen2 желательно добавить единый интерфейс:
|
||
|
||
```text
|
||
devctl test fast [area]
|
||
devctl test milestone <milestone>
|
||
devctl test full
|
||
```
|
||
|
||
Это не означает, что `devctl` обязан сам исполнять всю CI-инфраструктуру; он может быть orchestration/profile entry point.
|
||
|
||
---
|
||
|
||
# 6. Программа Milestones
|
||
|
||
| Milestone | Смысл | Основной результат | Gate |
|
||
|---|---|---|---|
|
||
| M0 | Frozen V1 baseline + governance | всё текущее сохранено, Gen2 принят архитектурно | FAST |
|
||
| M1 | Semantic substrate | ContextScope/Focus V2 + World referents + data primitives | MILESTONE |
|
||
| M2 | Memory/Knowledge foundation | scoped fresh positive+negative memory + Context Compiler V2 | MILESTONE |
|
||
| M3 | Evolvable behavior | Configuration + Skill/Reflex + SELF + intelligence evaluation | **FULL** |
|
||
| M4 | Durable autonomy | long work + perspectives + consequences + outcome + Lifeboat/evolution | MILESTONE + recovery |
|
||
| M5 | Integrated household Gen2 | conversational control, multi-person, multimodal/degraded, production canary | **FULL** |
|
||
| M6 | V1 retirement | legacy paths removed only after proof | **FULL before irreversible retirement** |
|
||
|
||
---
|
||
|
||
# 7. Architecture owners Gen2
|
||
|
||
| Owner | Canonical responsibility | Gen2 action |
|
||
|---|---|---|
|
||
| Identity | Principal/session identity | KEEP |
|
||
| Authority | grants + AuthorityScope | KEEP/CLARIFY |
|
||
| Interaction | human ingress, utterances, interpreted intent/corrections | KEEP/EXPAND |
|
||
| Situation | FocusFrame, FocusStack, ContextScope | REWORK |
|
||
| World | referents, typed vocabulary, aliases, identity resolution | ADD narrow owner |
|
||
| Epistemics | evidence, claims, belief assessments, freshness, experience, outcome verification | EXPAND |
|
||
| Work | goals, tasks, plans, jobs, investigations, perspectives, consequence assessment | EXPAND |
|
||
| Continuity | commitments, prospective relevance, attention, continuation | KEEP |
|
||
| Capability | capability health, implementations, Skill, Reflex, selection/evaluation | EXPAND |
|
||
| Configuration | typed/scoped/versioned setting definitions and assignments | ADD |
|
||
| SELF | evidence-backed competence/weakness/dependency/learning model | ADD |
|
||
| Commit | authorized mutation attempt, idempotency, execution receipt | KEEP strict |
|
||
| Artifact | durable raw content and lineage | KEEP/EXPAND |
|
||
| Cognitive workers | replaceable cognition/context execution | no canonical owner |
|
||
| Supervisor/Lifeboat | runtime release health/switch/rollback | runtime layer only |
|
||
|
||
---
|
||
|
||
# 8. Migration modes
|
||
|
||
Каждый task использует один явно выбранный режим:
|
||
|
||
### IN_PLACE_EXTEND
|
||
Существующий owner и canonical writer остаются; схема расширяется совместимо.
|
||
|
||
### SHADOW_PROJECTION
|
||
Новая модель строится из старой canonical истории, но не пишет canonical state.
|
||
|
||
### CONTROLLED_CUTOVER
|
||
Создаётся новый canonical path, выполняются backfill/shadow/equivalence, затем writer переключается однократно и явно.
|
||
|
||
### RETIRE_AFTER_PROOF
|
||
Старый путь становится read-only/fallback, проходит observation window и только потом удаляется отдельной задачей.
|
||
|
||
---
|
||
|
||
# 9. Task packet contract
|
||
|
||
Перед реализацией каждого `GEN2-xxx` должен существовать task packet со следующими полями:
|
||
|
||
```text
|
||
task_id
|
||
revision
|
||
milestone
|
||
intent
|
||
architecture_generation = GEN2
|
||
current_owner
|
||
target_owner
|
||
allowed_paths
|
||
forbidden_paths
|
||
contracts_consumed
|
||
contracts_changed
|
||
schema_changes
|
||
writer_before
|
||
writer_after
|
||
migration_mode
|
||
backfill
|
||
compatibility
|
||
feature_switch
|
||
rollback
|
||
fast_gate
|
||
milestone_gate_if_any
|
||
full_gate_justification_if_any
|
||
dependencies
|
||
non_goals
|
||
exit_criteria
|
||
terminal_block_states
|
||
```
|
||
|
||
Никакой task не называется просто «сделай память Gen2» или «улучши архитектуру».
|
||
|
||
---
|
||
|
||
# M0. Frozen baseline and Gen2 governance
|
||
|
||
## PRE-GEN2-000 — Consolidate current development into main and freeze baseline
|
||
**Owner:** Repository/Governance
|
||
**Migration mode:** `baseline`
|
||
**Primary paths:** `entire repository only as required to preserve/merge existing work; no Gen2 semantic implementation yet`
|
||
|
||
### Цель
|
||
|
||
Сохранить всю текущую работу перед архитектурной миграцией и получить однозначный GEN2_BASE_COMMIT.
|
||
|
||
### Обязательная работа
|
||
|
||
1. инвентаризировать worktrees/branches и dirty files;
|
||
2. сделать preservation commits всех актуальных открытых изменений;
|
||
3. исключить secrets/generated/runtime garbage;
|
||
4. выполнить FAST baseline gate;
|
||
5. слить актуальные ветки в main и разрешить конфликты без потери поведения;
|
||
6. push main;
|
||
7. записать GEN2_BASE_COMMIT и baseline tag;
|
||
8. сохранить baseline report со списком merged branches и известных незакрытых findings.
|
||
|
||
### Canonical writer
|
||
|
||
нет semantic writer change
|
||
|
||
### Rollback
|
||
|
||
baseline tag + обычный git revert; ничего из старой работы не удалять
|
||
|
||
### FAST gate
|
||
|
||
targeted compile/current changed packages + preflight/check-architecture + diff check; использовать свежий существующий CI evidence, не запускать FULL без причины
|
||
|
||
### Exit criteria
|
||
|
||
main содержит всю актуальную открытую работу; working tree известен/чист; remote push выполнен; base SHA/tag записаны.
|
||
|
||
### Non-goals
|
||
|
||
не начинать Gen2 schema/code; не переписывать историю git.
|
||
|
||
## GEN2-000 — Adopt Gen2 constitution, architecture documents and governance mode
|
||
**Owner:** Architecture/Governance
|
||
**Migration mode:** `architecture acceptance`
|
||
**Primary paths:** `architecture/**, development/**, docs/**, AGENTS.md, cmd/devctl/**, dev/**`
|
||
|
||
### Цель
|
||
|
||
Сделать Gen2 официальным архитектурным поколением, а не внешним пожеланием.
|
||
|
||
### Обязательная работа
|
||
|
||
1. внести DOMOVOY_CONSTITUTION, GEN2_TARGET_ARCHITECTURE, GEN2_CANONICAL_DATA_MODEL, GEN2_MIGRATION_MAP и GEN2_MASTER_PLAN в repo;
|
||
2. принять ADR/architecture-generation decision, который разрешает новые owners World/Configuration/SELF и Gen2 migrations;
|
||
3. обновить authority order архитектурных документов;
|
||
4. закрыть/заморозить DEV-000295 как V1 baseline/audit evidence или явно supersede его Gen2 program;
|
||
5. добавить Gen2 task validation в devctl;
|
||
6. добавить FAST/MILESTONE/FULL test profiles или эквивалентную profile metadata без тяжёлого переписывания CI.
|
||
|
||
### Canonical writer
|
||
|
||
нет runtime writer change
|
||
|
||
### Rollback
|
||
|
||
revert architecture adoption до начала schema migration; baseline tag остаётся неизменным
|
||
|
||
### FAST gate
|
||
|
||
devctl task validation + architecture registry parse + governance tests only
|
||
|
||
### Exit criteria
|
||
|
||
Codex перед каждым Gen2 task обязан читать canonical Gen2 docs; ordinary V1 task больше не имеет права менять Gen2 architecture.
|
||
|
||
### Non-goals
|
||
|
||
не реализовывать World/SELF/Configuration runtime в этом task.
|
||
|
||
## GEN2-001 — Accept Gen2 owner registry and dependency rules
|
||
**Owner:** Architecture Registry
|
||
**Migration mode:** `architecture acceptance`
|
||
**Primary paths:** `architecture/**, contracts/** doc stubs if needed, cmd/devctl/**`
|
||
|
||
### Цель
|
||
|
||
Формально закрепить owners, forbidden dependencies и migration law before tables.
|
||
|
||
### Обязательная работа
|
||
|
||
1. принять owner registry Gen2;
|
||
2. развести AuthorityScope и ContextScope;
|
||
3. зафиксировать World != truth owner, SELF != orchestrator, Memory != owner;
|
||
4. зафиксировать single canonical writer, no cross-owner SQL/FK/JOIN by default;
|
||
5. зафиксировать Supervisor как runtime layer, не semantic owner;
|
||
6. добавить architecture checks для новых границ там, где это возможно дешёво.
|
||
|
||
### Canonical writer
|
||
|
||
нет data writer change
|
||
|
||
### Rollback
|
||
|
||
architecture revert возможен только до первого зависимого Gen2 task; далее через новый ADR
|
||
|
||
### FAST gate
|
||
|
||
architecture registry/lint tests only
|
||
|
||
### Exit criteria
|
||
|
||
все последующие task packets могут однозначно указать current_owner/target_owner.
|
||
|
||
### Non-goals
|
||
|
||
не создавать generic Entity service или generic event bus.
|
||
|
||
# M1. Semantic substrate: primitives, World and Focus
|
||
|
||
## GEN2-002 — Introduce shared Gen2 data primitives without shared domain semantics
|
||
**Owner:** Platform/Contracts
|
||
**Migration mode:** `IN_PLACE_EXTEND`
|
||
**Primary paths:** `platform/ids/**, contracts/** primitives, database/migrations/NNN_gen2_primitives.sql only if necessary`
|
||
|
||
### Цель
|
||
|
||
Дать Gen2 стабильные ID/revision/time/SemanticRef/PrincipalRealm/Sensitivity primitives без giant shared domain model.
|
||
|
||
### Обязательная работа
|
||
|
||
1. определить StableID/Revision primitives;
|
||
2. определить SemanticRef как cross-owner reference без прямого DB ownership;
|
||
3. определить time primitives и data realm/sensitivity primitives;
|
||
4. реализовать typed value algebra там, где он действительно общий технический контракт;
|
||
5. не переносить domain meaning в platform/common.
|
||
|
||
### Canonical writer
|
||
|
||
существующие owners остаются writers
|
||
|
||
### Rollback
|
||
|
||
additive primitives; old code не удалять
|
||
|
||
### FAST gate
|
||
|
||
unit tests только primitives + compile direct consumers
|
||
|
||
### Exit criteria
|
||
|
||
World/Focus/Epistemics/Configuration могут ссылаться на одинаковые технические refs без shared semantic owner.
|
||
|
||
### Non-goals
|
||
|
||
не создавать `map[string]any` canonical payload и не менять существующие owner tables.
|
||
|
||
## GEN2-003 — Add narrow World owner and typed vocabulary
|
||
**Owner:** World (new)
|
||
**Migration mode:** `CONTROLLED_CUTOVER for referent registry only`
|
||
**Primary paths:** `modules/world/**, contracts/world/**, adapters/postgres/world_repository.go, database/migrations/NNN_gen2_world_*.sql, architecture registry as already authorized`
|
||
|
||
### Цель
|
||
|
||
Создать устойчивые referents/aliases/types/facet definitions/relation definitions, не присваивая World владение истиной значений.
|
||
|
||
### Обязательная работа
|
||
|
||
1. создать WorldObject stable identity;
|
||
2. WorldObjectKindDefinition;
|
||
3. WorldAlias;
|
||
4. FacetDefinition и RelationDefinition с versioned typed schemas;
|
||
5. identity-resolution candidate/decision structures;
|
||
6. обеспечить split/merge lineage;
|
||
7. начать с минимального набора объектов, необходимых для Focus/Scope migration.
|
||
|
||
### Canonical writer
|
||
|
||
before: project/situation/ad-hoc identifiers; after: World canonical only for referent vocabulary, not facts
|
||
|
||
### Rollback
|
||
|
||
V1 identifiers остаются compatibility refs; World tables additive; switch readers back без удаления World evidence
|
||
|
||
### FAST gate
|
||
|
||
world domain/repository tests + typed schema validation + compile Situation consumers
|
||
|
||
### Exit criteria
|
||
|
||
одинаковые имена разных компаний/баз могут иметь разные stable referents; World не хранит claim «какое значение истинно».
|
||
|
||
### Non-goals
|
||
|
||
не строить graph DB; не переносить факты Epistemics в World.
|
||
|
||
## GEN2-004 — Replace project-centric focus with ContextScope + FocusFrame + FocusStack
|
||
**Owner:** Situation
|
||
**Migration mode:** `CONTROLLED_CUTOVER`
|
||
**Primary paths:** `modules/situation/**, contracts/situation/**, adapters/postgres/situation_repository.go, database/migrations/NNN_gen2_focus_*.sql, cmd/core-runtime relevant composition only, modules/interaction relevant focus handoff`
|
||
|
||
### Цель
|
||
|
||
Сделать Focus многомерным: person/org/system/database/repository/version/activity/goal/task/entities, а Project оставить лишь возможной гранью.
|
||
|
||
### Обязательная работа
|
||
|
||
1. добавить ContextScope RoleKey/ScopeValue/MatchPolicy;
|
||
2. добавить FocusFrame stable ID + revision;
|
||
3. добавить FocusTransition append-only ledger;
|
||
4. добавить FocusStack/parent/suspended/resume semantics;
|
||
5. реализовать explicit focus command и inferred focus как разные evidence paths;
|
||
6. построить compatibility projection ActiveProjectFocus из FocusFrame;
|
||
7. переключить core/context readers на Focus V2 постепенно.
|
||
|
||
### Canonical writer
|
||
|
||
before: V1 situation/project focus; after: Situation FocusFrame/Transition; ActiveProjectFocus becomes projection/compatibility
|
||
|
||
### Rollback
|
||
|
||
feature switch возвращает V1 read path; Gen2 transitions сохраняются
|
||
|
||
### FAST gate
|
||
|
||
situation tests + explicit switch + company A/B isolation regression + core compile
|
||
|
||
### Exit criteria
|
||
|
||
короткое отвлечение может push/pop focus; Company A/UNF и Company B/UNF не смешиваются по текущему scope.
|
||
|
||
### Non-goals
|
||
|
||
не реализовывать memory retrieval здесь.
|
||
|
||
## GEN2-005 — World identity resolution and version/environment bindings
|
||
**Owner:** World + Situation contracts, no truth ownership
|
||
**Migration mode:** `IN_PLACE_EXTEND`
|
||
**Primary paths:** `modules/world/**, contracts/world/**, modules/situation/** only bindings, tests/** targeted`
|
||
|
||
### Цель
|
||
|
||
Заложить безопасное same_as?/merge/split и привязку Focus к конкретной версии/окружению.
|
||
|
||
### Обязательная работа
|
||
|
||
1. реализовать identity resolution candidate с confidence/evidence refs;
|
||
2. не объединять автоматически неоднозначных людей/системы;
|
||
3. добавить reversible merge/split lineage;
|
||
4. добавить version/environment reference primitives, используемые позже Epistemics freshness.
|
||
|
||
### Canonical writer
|
||
|
||
World writer только identity/referent resolution
|
||
|
||
### Rollback
|
||
|
||
resolution decisions versioned/reversible; no destructive identity merge
|
||
|
||
### FAST gate
|
||
|
||
entity ambiguity/merge/split tests + Focus binding tests
|
||
|
||
### Exit criteria
|
||
|
||
«Иван Telegram» и «Иван CRM» могут быть связаны с уверенностью без необратимого склеивания; две УНФ не путаются.
|
||
|
||
### Non-goals
|
||
|
||
не вводить source trust здесь.
|
||
|
||
# M2. Memory/Knowledge foundation and Context Compiler
|
||
|
||
## GEN2-006 — Normalize Epistemics evidence, propositions, claims and belief assessments
|
||
**Owner:** Epistemics
|
||
**Migration mode:** `CONTROLLED_CUTOVER`
|
||
**Primary paths:** `modules/epistemics/**, contracts/epistemics/**, adapters/postgres/epistemics_repository.go, database/migrations/NNN_gen2_epistemics_*.sql, adapters/research/** only mapping`
|
||
|
||
### Цель
|
||
|
||
Убрать зависимость от denormalized truth_bundles как конечной модели истины и создать переоцениваемую канонику evidence/claim/belief.
|
||
|
||
### Обязательная работа
|
||
|
||
1. добавить Source/SourceSnapshot/SourceExcerpt;
|
||
2. добавить immutable Observation;
|
||
3. добавить Proposition/Claim;
|
||
4. добавить versioned BeliefAssessment;
|
||
5. backfill существующих truth/research данных с lineage;
|
||
6. оставить truth_bundles read compatibility до позднего retirement;
|
||
7. обеспечить возможность новой модели переоценить старый Claim без переписывания Observation.
|
||
|
||
### Canonical writer
|
||
|
||
before: V1 truth bundle paths; after: normalized Epistemics for new Gen2 knowledge; old bundle writer disabled at cutover or made projection
|
||
|
||
### Rollback
|
||
|
||
read switch назад на V1 bundle; normalized evidence не удалять
|
||
|
||
### FAST gate
|
||
|
||
epistemics domain/repository + backfill sample + truth/unknown/contradiction regressions
|
||
|
||
### Exit criteria
|
||
|
||
источник, наблюдение, утверждение и текущая оценка уверенности раздельны и traceable.
|
||
|
||
### Non-goals
|
||
|
||
не создавать отдельную таблицу Knowledge как дубликат current beliefs.
|
||
|
||
## GEN2-007 — General freshness, volatility, temporal applicability and revalidation
|
||
**Owner:** Epistemics
|
||
**Migration mode:** `IN_PLACE_EXTEND`
|
||
**Primary paths:** `modules/epistemics/**, contracts/epistemics/**, database/migrations/NNN_gen2_freshness_*.sql, Work contract only freshness requirement refs`
|
||
|
||
### Цель
|
||
|
||
Сделать старение знания контекстным: прошлогодняя УНФ может быть stale для live-debug и полезной аналогией без live-доступа.
|
||
|
||
### Обязательная работа
|
||
|
||
1. добавить TemporalApplicability;
|
||
2. VolatilitySpec/decay class;
|
||
3. last_verified/observed metadata;
|
||
4. VersionBinding;
|
||
5. TaskFreshnessRequirement;
|
||
6. вычисляемый FreshnessAssessment вместо permanent `stale` flag;
|
||
7. active revalidation request/response contract;
|
||
8. fallback semantics: memory-only solution должен быть явно маркирован как непроверенный текущими данными.
|
||
|
||
### Canonical writer
|
||
|
||
Epistemics writes observation/verification metadata; freshness status computed
|
||
|
||
### Rollback
|
||
|
||
metadata additive; old readers ignore it
|
||
|
||
### FAST gate
|
||
|
||
freshness matrix tests: pi/no decay, live server/fast decay, UNF old version/live vs analogy
|
||
|
||
### Exit criteria
|
||
|
||
один и тот же Claim получает разную пригодность в зависимости от task freshness/risk.
|
||
|
||
### Non-goals
|
||
|
||
не удалять старые знания автоматически.
|
||
|
||
## GEN2-008 — Promote Episode and Experience V2 including negative experience
|
||
**Owner:** Epistemics
|
||
**Migration mode:** `IN_PLACE_EXTEND + SHADOW_PROJECTION for Episode`
|
||
**Primary paths:** `modules/epistemics/**, contracts/epistemics/**, adapters/postgres/epistemics_repository.go, database/migrations/NNN_gen2_experience_*.sql, Artifact refs`
|
||
|
||
### Цель
|
||
|
||
Сохранять не только «что сработало», но problem/attempt/why/result/why failed/conditions/evidence.
|
||
|
||
### Обязательная работа
|
||
|
||
1. расширить ExperienceRecord V1 без потери старых IDs/evidence;
|
||
2. сделать success/failure first-class;
|
||
3. добавить conditions/applicability/version bindings;
|
||
4. создать Episode как derived/rebuildable episodic projection;
|
||
5. связать user correction с ReflectionCandidate/Experience;
|
||
6. добавить anti-pattern: failure under conditions != forever wrong.
|
||
|
||
### Canonical writer
|
||
|
||
Epistemics remains canonical Experience writer; Episode projection derived
|
||
|
||
### Rollback
|
||
|
||
старые Experience records остаются валидны; Episode projection rebuildable
|
||
|
||
### FAST gate
|
||
|
||
positive/negative experience tests + same problem changed conditions regression
|
||
|
||
### Exit criteria
|
||
|
||
retrieval позже может отдельно запросить «что уже пробовали и почему не сработало».
|
||
|
||
### Non-goals
|
||
|
||
не превращать каждое сообщение в Skill автоматически.
|
||
|
||
## GEN2-009 — Build Memory Retrieval Fabric as rebuildable projections
|
||
**Owner:** No canonical Memory owner; projection layer
|
||
**Migration mode:** `SHADOW_PROJECTION`
|
||
**Primary paths:** `new retrieval package under appropriate cognitive/platform read-model boundary, adapters/postgres/search projection code, contracts/cognitive/**, no canonical owner tables except projection metadata`
|
||
|
||
### Цель
|
||
|
||
Дать многоканальный retrieval по canonical owners без единой memory_items каноники.
|
||
|
||
### Обязательная работа
|
||
|
||
1. создать RetrievalDocument projection с source SemanticRef;
|
||
2. projection builders из Interaction/World/Epistemics/Work/Continuity/Capability/Configuration/SELF;
|
||
3. жёсткий ContextScope/realm/version filter before similarity;
|
||
4. lanes: semantic, entity/graph-like refs, temporal, goal/commitment, positive experience, negative experience, contradiction, skill;
|
||
5. ranking signals: relevance, freshness, confidence, salience, scope distance, cost;
|
||
6. hot/warm/cold/archive retrieval policy как operational storage concern, не truth;
|
||
7. projection versioning/rebuild command.
|
||
|
||
### Canonical writer
|
||
|
||
canonical writers unchanged; retrieval index only projection writer
|
||
|
||
### Rollback
|
||
|
||
drop/rebuild projection and use V1 memory retrieval
|
||
|
||
### FAST gate
|
||
|
||
scope isolation + negative lane + projection rebuild determinism tests
|
||
|
||
### Exit criteria
|
||
|
||
vector index можно полностью перестроить без изменения canonical memory; cross-company leak blocked before embedding rank.
|
||
|
||
### Non-goals
|
||
|
||
не выбирать финальный graph/vector DB как вечный canonical format.
|
||
|
||
## GEN2-010 — Context Compiler V2 with budgets, coverage and iterative retrieval
|
||
**Owner:** Cognitive contract/read path, no canonical owner
|
||
**Migration mode:** `REWORK`
|
||
**Primary paths:** `contracts/cognitive/**, cmd/cognitive-worker/**, cmd/core-runtime context assembly paths, retrieval read layer, tests/context_compiler/**`
|
||
|
||
### Цель
|
||
|
||
Формировать минимально достаточный model context под текущий Task/Focus/Model/Risk/Freshness и уметь дозапрашивать память во время reasoning.
|
||
|
||
### Обязательная работа
|
||
|
||
1. ContextCompileRequest: task/focus/scope/model/token budget/freshness/risk;
|
||
2. candidate lanes + deterministic scope filtering;
|
||
3. positive+negative experience balancing;
|
||
4. contradiction pass;
|
||
5. coverage check: не упущены ли critical commitments/known failures;
|
||
6. ContextBundle с explicit token allocation;
|
||
7. ContextAssemblyTrace: почему элемент включён/исключён;
|
||
8. iterative memory search tool для model reasoning;
|
||
9. маленькой локальной модели давать меньше и точнее, а не просто урезать хвост.
|
||
|
||
### Canonical writer
|
||
|
||
none; read/compile only
|
||
|
||
### Rollback
|
||
|
||
feature switch to Context Compiler V1; V2 trace/projections retained
|
||
|
||
### FAST gate
|
||
|
||
context compiler unit + Company A/B + old negative experience + small-context budget scenarios
|
||
|
||
### Exit criteria
|
||
|
||
локальная модель получает релевантный пакет без любимого цвета в 1C-debug; нужные прошлые грабли попадают в context.
|
||
|
||
### Non-goals
|
||
|
||
не включать всю память «на всякий случай».
|
||
|
||
## GEN2-011 — Cut PersonalMemory V1 to compatibility fallback
|
||
**Owner:** Interaction -> retrieval fabric reads multiple owners
|
||
**Migration mode:** `CONTROLLED_CUTOVER`
|
||
**Primary paths:** `modules/interaction/** personal memory, adapters/postgres/interaction_repository.go, core context wiring, feature switches`
|
||
|
||
### Цель
|
||
|
||
Перестать использовать ad-hoc PersonalMemory ContextText как долгосрочную основу памяти, не теряя utterance history.
|
||
|
||
### Обязательная работа
|
||
|
||
1. оставить HumanUtterance append-only canonical history;
|
||
2. построить Gen2 retrieval из этой истории;
|
||
3. сравнить V1 PersonalMemory vs Gen2 context on representative cases;
|
||
4. переключить primary read на Gen2;
|
||
5. оставить PersonalMemory read fallback до M6;
|
||
6. запретить новый semantic growth V1 PersonalMemory.
|
||
|
||
### Canonical writer
|
||
|
||
utterance writer unchanged; PersonalMemory derived writer frozen; retrieval projection primary
|
||
|
||
### Rollback
|
||
|
||
switch reads back to PersonalMemory; no canonical loss
|
||
|
||
### FAST gate
|
||
|
||
name/preference continuity + scoped memory + correction retrieval
|
||
|
||
### Exit criteria
|
||
|
||
PersonalMemory больше не определяет архитектуру новых features.
|
||
|
||
### Non-goals
|
||
|
||
не удалять V1 таблицы/код в этом task.
|
||
|
||
# M3. Evolvable behavior: Configuration, Skill, Reflex, SELF
|
||
|
||
## GEN2-012 — Add typed, scoped, versioned Configuration owner and bootstrap boundary
|
||
**Owner:** Configuration (new)
|
||
**Migration mode:** `CONTROLLED_CUTOVER by consumer`
|
||
**Primary paths:** `modules/configuration/**, contracts/configuration/**, adapters/postgres/configuration_repository.go, platform/secrets/**, database/migrations/NNN_gen2_configuration_*.sql, each consumer only when migrated`
|
||
|
||
### Цель
|
||
|
||
Убрать ordinary runtime settings из ENV и дать Skills/capabilities возможность объявлять новые typed scoped settings без глобальной schema rewrite.
|
||
|
||
### Обязательная работа
|
||
|
||
1. inventory всех ENV/config consumers;
|
||
2. создать SettingDefinition stable identity + schema/version/owner/type/default/validation;
|
||
3. SettingAssignment + ScopeSelector;
|
||
4. deterministic inheritance/resolution;
|
||
5. EffectiveConfiguration trace;
|
||
6. SecretRef only for credentials;
|
||
7. определить минимальный bootstrap, который может остаться вне Configuration;
|
||
8. импортировать non-secret текущие значения;
|
||
9. shadow compare old vs resolved configuration;
|
||
10. cutover consumers по одному, Commit runtime последним из критических.
|
||
|
||
### Canonical writer
|
||
|
||
before: ENV/files/ad-hoc DB; after: Configuration for migrated non-bootstrap settings
|
||
|
||
### Rollback
|
||
|
||
per-consumer fallback to old read path; Configuration values retained
|
||
|
||
### FAST gate
|
||
|
||
setting type/scope inheritance + secret-not-exposed tests + migrated consumer equivalence
|
||
|
||
### Exit criteria
|
||
|
||
можно сказать «для Skill X в Company A значение Y», а Company B получает другое значение без новых ENV vars/columns.
|
||
|
||
### Non-goals
|
||
|
||
не хранить token/password в обычном memory/config payload.
|
||
|
||
## GEN2-013 — Migrate Skill V1 to Skill V2 with applicability, versioning and evidence
|
||
**Owner:** Capability
|
||
**Migration mode:** `IN_PLACE_EXTEND/CONTROLLED_CUTOVER`
|
||
**Primary paths:** `modules/capability/**, contracts/capability/**, adapters/postgres/capability_repository.go, database/migrations/NNN_gen2_skill_*.sql, Work reflection handoff`
|
||
|
||
### Цель
|
||
|
||
Сделать Skill долговечным обучаемым способом решения, а не только профилем capability.
|
||
|
||
### Обязательная работа
|
||
|
||
1. сохранить stable Skill identity;
|
||
2. ввести revisions;
|
||
3. ApplicabilitySpec с Scope/version/conditions;
|
||
4. связать positive/negative Experience evidence;
|
||
5. validation/promotion evidence;
|
||
6. known failure conditions;
|
||
7. quality history;
|
||
8. dependency refs;
|
||
9. сохранить совместимость с существующими SkillProfile/ReflectionCandidate.
|
||
|
||
### Canonical writer
|
||
|
||
Capability remains Skill canonical writer
|
||
|
||
### Rollback
|
||
|
||
V1 skill view/projected compatibility; revisions additive
|
||
|
||
### FAST gate
|
||
|
||
Skill lifecycle + applicability + known failure regressions
|
||
|
||
### Exit criteria
|
||
|
||
успешное решение может стать Candidate/Validated/Active Skill и знает, где он применим.
|
||
|
||
### Non-goals
|
||
|
||
не компилировать Skill в код автоматически здесь.
|
||
|
||
## GEN2-014 — Add explicit Reflex lifecycle, shadow reasoning and revalidation
|
||
**Owner:** Capability
|
||
**Migration mode:** `ADD + controlled routing`
|
||
**Primary paths:** `modules/capability/**, contracts/capability/**, adapters/postgres/capability_repository.go, database/migrations/NNN_gen2_reflex_*.sql, cognitive routing`
|
||
|
||
### Цель
|
||
|
||
Дать быстрый локальный путь для проверенных повторяемых задач без закостенения.
|
||
|
||
### Обязательная работа
|
||
|
||
1. Reflex stable ID/revisions;
|
||
2. link Reflex -> originating Skill/evidence;
|
||
3. applicability/dependencies;
|
||
4. ShadowPolicy/RevalidationPolicy;
|
||
5. fallback/escalation Reflex -> Skill -> reasoning;
|
||
6. drift/stale detection;
|
||
7. candidate/active/suspended/retired states;
|
||
8. не считать один успешный run достаточным для promotion.
|
||
|
||
### Canonical writer
|
||
|
||
Capability writes Reflex lifecycle; routing reads only ACTIVE applicable reflex
|
||
|
||
### Rollback
|
||
|
||
disable reflex feature switch; route returns to Skill/model
|
||
|
||
### FAST gate
|
||
|
||
reflex applied/declined/escalate + stale dependency + shadow mismatch tests
|
||
|
||
### Exit criteria
|
||
|
||
частая стабильная задача может выполняться быстро локально и автоматически вернуться к reasoning при сомнении.
|
||
|
||
### Non-goals
|
||
|
||
не разрешать Reflex обойти Authority/Commit.
|
||
|
||
## GEN2-015 — Add evidence-backed SELF foundation and Learning Ledger
|
||
**Owner:** SELF (new)
|
||
**Migration mode:** `ADD evidence-only first`
|
||
**Primary paths:** `modules/self/**, contracts/self/**, adapters/postgres/self_repository.go, database/migrations/NNN_gen2_self_*.sql, read contracts from Capability/Work/Epistemics/health`
|
||
|
||
### Цель
|
||
|
||
Домовой должен знать, что умеет, при каких условиях, где ошибается и что изменилось — без права самому объявить себя хорошим.
|
||
|
||
### Обязательная работа
|
||
|
||
1. CompetenceAssessment from outcomes/tests/task evaluations;
|
||
2. WeaknessPattern;
|
||
3. DependencyAssessment;
|
||
4. ImprovementNeed;
|
||
5. LearningLedgerEntry;
|
||
6. SelfCompositionSnapshot;
|
||
7. provenance каждого self-assessment;
|
||
8. запрет arbitrary `competence=1.0` от Skill;
|
||
9. первый режим SELF только observe/evaluate/propose.
|
||
|
||
### Canonical writer
|
||
|
||
SELF writes derived evidence-backed self assessments only
|
||
|
||
### Rollback
|
||
|
||
SELF can be disabled; no mutation path depends on it initially
|
||
|
||
### FAST gate
|
||
|
||
assessment provenance + cannot self-certify + dependency degradation tests
|
||
|
||
### Exit criteria
|
||
|
||
система отличает «я разучился» от «зависимость IFCM временно недоступна» и хранит собственные повторяемые weakness patterns.
|
||
|
||
### Non-goals
|
||
|
||
SELF не планирует все user tasks и не получает direct mutation authority.
|
||
|
||
## GEN2-016 — Intelligence strategy, resource/cost policy and Personal Benchmark
|
||
**Owner:** Capability + Work evaluation; SELF observes
|
||
**Migration mode:** `EXTEND`
|
||
**Primary paths:** `modules/capability/**, modules/work/** evaluation, contracts/capability/**, contracts/work/**, SELF read models, cognitive-worker routing`
|
||
|
||
### Цель
|
||
|
||
Выбирать минимально достаточный интеллект и доказуемо сравнивать модели/skills на реальных задачах владельца.
|
||
|
||
### Обязательная работа
|
||
|
||
1. formalize path: rule/reflex/skill/small local/strong local/external/research/team;
|
||
2. input signals: required quality, latency preference, cost budget, risk, freshness, cost of error;
|
||
3. создать Personal Benchmark dataset refs из реальных approved task cases;
|
||
4. определить Goal/Preference evaluation profile: owner intent → long-term goals → current task → contextual preferences;
|
||
5. inferred preferences хранить как evidence-backed scoped hypotheses, а не вечные глобальные настройки;
|
||
6. сохранять decision-regret evidence: мог ли Домовой с доступными тогда данными выбрать лучше;
|
||
7. сохранять task-specific evaluation, user correction, latency/cost/retry evidence;
|
||
8. не сводить качество к одной метрике и не оптимизироваться под согласие владельца;
|
||
9. добавить exploration/shadow для low-risk paths;
|
||
10. новая модель не получает automatic promotion только из-за public benchmark.
|
||
|
||
### Canonical writer
|
||
|
||
Capability/Work existing evaluation writers extended; SELF reads assessments
|
||
|
||
### Rollback
|
||
|
||
routing returns to V1 selection; evidence retained
|
||
|
||
### FAST gate
|
||
|
||
selection scenarios low/high cost-of-error + local fallback + benchmark comparison unit
|
||
|
||
### Exit criteria
|
||
|
||
простая задача не запускает команду из 20 агентов; сложная high-risk задача может эскалировать глубину reasoning.
|
||
|
||
### Non-goals
|
||
|
||
не hardcode one global accuracy/speed weight.
|
||
|
||
# M4. Durable autonomy and safe self-evolution
|
||
|
||
## GEN2-017 — Extend Work into durable LongRunningWork / Investigation
|
||
**Owner:** Work
|
||
**Migration mode:** `IN_PLACE_EXTEND`
|
||
**Primary paths:** `modules/work/**, contracts/work/**, adapters/postgres/work_repository.go, database/migrations/NNN_gen2_investigation_*.sql, cmd/work-graph-runtime/**, cmd/research-runtime/**`
|
||
|
||
### Цель
|
||
|
||
«Разбирайся хоть сутки» должно быть durable process с checkpoint, а не один длинный LLM request.
|
||
|
||
### Обязательная работа
|
||
|
||
1. LongRunningWork/Investigation state;
|
||
2. objective, hypotheses, attempts, findings, blockers, next step;
|
||
3. budget: time/cost/model/resource;
|
||
4. checkpoint/resume/preempt semantics;
|
||
5. model/provider replacement between attempts;
|
||
6. stop condition «решение не найдено в бюджете» с сохранением проверенных вариантов;
|
||
7. Continuity integration для wake/attention without second scheduler.
|
||
|
||
### Canonical writer
|
||
|
||
Work canonical writer for long-running job state; Continuity only future relevance
|
||
|
||
### Rollback
|
||
|
||
old Work Graph path remains for normal tasks; new jobs can be paused/read-only
|
||
|
||
### FAST gate
|
||
|
||
checkpoint/restart/resume + budget exhaustion + model change tests
|
||
|
||
### Exit criteria
|
||
|
||
долгая задача переживает restart и продолжает с next step, не повторяя уже проверенные попытки.
|
||
|
||
### Non-goals
|
||
|
||
не держать unmanaged goroutine как durable job.
|
||
|
||
## GEN2-018 — Add Perspective and dynamic specialist/team semantics on existing Work Graph
|
||
**Owner:** Work
|
||
**Migration mode:** `IN_PLACE_EXTEND`
|
||
**Primary paths:** `modules/work/**, contracts/work/**, capability selection integration, no new agent owner`
|
||
|
||
### Цель
|
||
|
||
Домовой может смотреть на задачу как архитектор/программист/директор/дизайнер или собрать временную команду без roleplay и без постоянного staff.
|
||
|
||
### Обязательная работа
|
||
|
||
1. PerspectiveSpec = objectives/methods/knowledge profile/evaluation criteria;
|
||
2. dynamic specialist assembly from Perspective + Focus + Skills + tools;
|
||
3. work decomposition by independent subtasks;
|
||
4. structured findings/evidence/risks/artifacts;
|
||
5. critic/adversarial perspective optional;
|
||
6. criteria when team is justified vs single reasoning path;
|
||
7. не передавать каждому агенту весь глобальный context.
|
||
|
||
### Canonical writer
|
||
|
||
Work graph remains owner; no separate Agent Memory owner
|
||
|
||
### Rollback
|
||
|
||
disable perspective/team routing; tasks execute single path
|
||
|
||
### FAST gate
|
||
|
||
single-vs-team route + structured synthesis + no cross-agent hearsay dependency
|
||
|
||
### Exit criteria
|
||
|
||
«спроектируй систему» может вызвать несколько независимых перспектив; «исправь функцию» остаётся одной задачей.
|
||
|
||
### Non-goals
|
||
|
||
не создавать 20 агентов по умолчанию.
|
||
|
||
## GEN2-019 — Add Consequence/Risk assessment without artificial capability blacklist
|
||
**Owner:** Work assessment feeding Authority/Commit
|
||
**Migration mode:** `ADD`
|
||
**Primary paths:** `modules/work/**, contracts/work/**, contracts/authority/** only inputs/refs if needed, no Authority rewrite`
|
||
|
||
### Цель
|
||
|
||
Оценивать последствия, обратимость, cost-of-error и mitigation до значимого действия, но не превращать систему в «нельзя».
|
||
|
||
### Обязательная работа
|
||
|
||
1. ConsequenceAssessment;
|
||
2. risk dimensions: impact, reversibility, uncertainty, scope, recoverability;
|
||
3. mitigation: backup/snapshot/dry-run/canary/extra confirmation;
|
||
4. clarification policy based on uncertainty × cost_of_wrong_action × irreversibility;
|
||
5. owner may explicitly accept high risk after warning;
|
||
6. consequence result becomes input Authority/Commit, не replacement.
|
||
|
||
### Canonical writer
|
||
|
||
Work writes assessment; Authority remains grant decision owner
|
||
|
||
### Rollback
|
||
|
||
risk assessment advisory disable; strict existing Authority unchanged
|
||
|
||
### FAST gate
|
||
|
||
low-risk no interruption; destructive ambiguous action requires explicit commit; accepted-risk path works
|
||
|
||
### Exit criteria
|
||
|
||
Домовой предупреждает о последствиях и предлагает rollback plan, но не самовольно запрещает владельцу разрешённое действие.
|
||
|
||
### Non-goals
|
||
|
||
не менять Identity/Authority core semantics.
|
||
|
||
## GEN2-020 — Separate execution receipt from verified world outcome
|
||
**Owner:** Commit + Epistemics
|
||
**Migration mode:** `IN_PLACE_EXTEND`
|
||
**Primary paths:** `modules/commit/** additive, contracts/commit/**, modules/epistemics/**, contracts/epistemics/**, adapters/postgres relevant owners, database/migrations/NNN_gen2_outcome_*.sql`
|
||
|
||
### Цель
|
||
|
||
Не считать «API 200» доказательством того, что пользовательская цель достигнута.
|
||
|
||
### Обязательная работа
|
||
|
||
1. ExecutionReceipt остаётся Commit-owned факт попытки;
|
||
2. WorldOutcomeAssessment становится Epistemics-owned verification;
|
||
3. связать expected effect / observation / evidence;
|
||
4. поддержать UNKNOWN/PARTIAL/CONTRADICTED outcome;
|
||
5. не выполнять destructive retry только потому, что verification отсутствует;
|
||
6. Continuity может создать follow-up/attention при неизвестном Outcome.
|
||
|
||
### Canonical writer
|
||
|
||
Commit writer unchanged for execution facts; Epistemics writes world assessment
|
||
|
||
### Rollback
|
||
|
||
old Commit status still readable; new assessments additive
|
||
|
||
### FAST gate
|
||
|
||
HTTP success but world fail; unknown outcome no duplicate retry; verified success scenario
|
||
|
||
### Exit criteria
|
||
|
||
ответ «выполнено» возможен только когда семантика операции это позволяет; неизвестность честно отражается.
|
||
|
||
### Non-goals
|
||
|
||
не переносить Commit state machine в Epistemics.
|
||
|
||
## GEN2-021 — Add independent Supervisor/Lifeboat for release health and rollback
|
||
**Owner:** Runtime only
|
||
**Migration mode:** `ADD`
|
||
**Primary paths:** `runtime/supervisor/** or equivalent, deploy/**, runtime/health/**, release metadata, no domain ownership`
|
||
|
||
### Цель
|
||
|
||
Самоизменение Домового не должно уметь уничтожить единственный механизм собственного отката.
|
||
|
||
### Обязательная работа
|
||
|
||
1. candidate release start;
|
||
2. health/readiness contract;
|
||
3. controlled traffic/switch;
|
||
4. watchdog observation;
|
||
5. automatic rollback to last known good;
|
||
6. persist release/switch evidence outside candidate process dependency;
|
||
7. emergency manual control path;
|
||
8. не давать Supervisor доступ к semantic decisions пользователя.
|
||
|
||
### Canonical writer
|
||
|
||
Supervisor writes runtime release state only
|
||
|
||
### Rollback
|
||
|
||
Supervisor itself versioned conservatively; previous release remains bootable
|
||
|
||
### FAST gate
|
||
|
||
candidate fail -> rollback; process crash -> recover last good; no semantic DB ownership test
|
||
|
||
### Exit criteria
|
||
|
||
сломанный candidate Assistant не блокирует восстановление последней рабочей версии.
|
||
|
||
### Non-goals
|
||
|
||
не делать Supervisor новым оркестратором задач.
|
||
|
||
## GEN2-022 — Wire governed self-evolution loop using existing development gates
|
||
**Owner:** Work + SELF evidence + Supervisor promotion
|
||
**Migration mode:** `EXTEND existing governed development`
|
||
**Primary paths:** `contracts/work/self_development.go, modules/work/** development gates, adapters/developmentexecutor/**, modules/self/**, capability skill/reflex, Supervisor integration`
|
||
|
||
### Цель
|
||
|
||
Замкнуть цикл weakness → proposal → candidate → evaluator → canary → promote/rollback без автономного обхода governance.
|
||
|
||
### Обязательная работа
|
||
|
||
1. SELF ImprovementNeed -> Work development candidate;
|
||
2. expected improvement + must-not-worsen criteria;
|
||
3. Creator != Evaluator enforced;
|
||
4. historical replay/personal benchmark;
|
||
5. sandbox/candidate build;
|
||
6. shadow/canary where appropriate;
|
||
7. Supervisor promotion/rollback;
|
||
8. LearningLedger records accepted/rejected change and actual outcome;
|
||
9. уровни change: knowledge, behavior, capability, core — с возрастающей строгостью.
|
||
|
||
### Canonical writer
|
||
|
||
existing governed-development writer remains; SELF proposes/evaluates, Supervisor handles release state
|
||
|
||
### Rollback
|
||
|
||
existing development gates remain; autonomous promotion feature switch off
|
||
|
||
### FAST gate
|
||
|
||
self proposal cannot self-approve; failed benchmark rejected; candidate rollback path
|
||
|
||
### Exit criteria
|
||
|
||
Домовой способен доказуемо улучшить компонент и объяснить историю изменения, но не тайно переписать core.
|
||
|
||
### Non-goals
|
||
|
||
не разрешать fully autonomous core rewrite without owner-approved authority policy.
|
||
|
||
# M5. Integrated household Gen2 and production canary
|
||
|
||
## GEN2-023 — Make conversational control the primary configuration and operational UX
|
||
**Owner:** Interaction + Configuration/Work contracts
|
||
**Migration mode:** `EXTEND UX, no owner bypass`
|
||
**Primary paths:** `modules/interaction/**, cmd/core-runtime relevant routes, cmd/creator-web/**, Configuration APIs, Work/Authority handoff`
|
||
|
||
### Цель
|
||
|
||
Пользователь говорит, чего хочет; Домовой меняет scoped configuration/starts work through normal semantics instead of forcing admin panels.
|
||
|
||
### Обязательная работа
|
||
|
||
1. intent patterns for setting/querying configuration;
|
||
2. explain effective scope/value in natural language;
|
||
3. one-time override vs durable preference distinction;
|
||
4. conversation creates SettingAssignment only through Configuration contract;
|
||
5. dangerous config/core changes route through Consequence + Authority/Commit;
|
||
6. Creator Web admin screens остаются diagnostics/emergency, не primary UX.
|
||
|
||
### Canonical writer
|
||
|
||
Configuration remains setting writer; Interaction writes user instruction/intent only
|
||
|
||
### Rollback
|
||
|
||
admin/read APIs remain available; conversational mutations can be disabled
|
||
|
||
### FAST gate
|
||
|
||
«для Company A Skill X используй Y» + scope confirmation + dangerous self-setting confirmation
|
||
|
||
### Exit criteria
|
||
|
||
обычные настройки не требуют ручного редактирования ENV/admin UI.
|
||
|
||
### Non-goals
|
||
|
||
не разрешать Interaction писать Configuration tables напрямую.
|
||
|
||
## GEN2-024 — Multi-person realms, identity boundaries and contextual source trust
|
||
**Owner:** Identity + World + Epistemics, separate responsibilities
|
||
**Migration mode:** `EXTEND`
|
||
**Primary paths:** `Identity contracts/domain, World identity resolution, Epistemics source reliability, Interaction source attribution, tests`
|
||
|
||
### Цель
|
||
|
||
Не смешивать владельца, членов семьи, гостей, голосовые источники и shared/private memory.
|
||
|
||
### Обязательная работа
|
||
|
||
1. PrincipalDataRealm/owner/shared scopes;
|
||
2. utterance/source attribution with confidence;
|
||
3. World person referents do not equal authenticated Principal automatically;
|
||
4. SourceReliabilityAssessment = source × domain × freshness × history;
|
||
5. identity ambiguity remains explicit;
|
||
6. future speaker-recognition result enters as Observation, not authentication truth;
|
||
7. Context Compiler respects realm/scope isolation.
|
||
|
||
### Canonical writer
|
||
|
||
Identity authenticates principals; World resolves referents; Epistemics evaluates source reliability
|
||
|
||
### Rollback
|
||
|
||
single-owner mode remains possible; new realm metadata additive
|
||
|
||
### FAST gate
|
||
|
||
two Ivans, family/private scope, voice guess != authenticated principal, cross-realm retrieval denial
|
||
|
||
### Exit criteria
|
||
|
||
Домовой может знать семейный контекст, не превращая услышанное имя/голос в полномочия владельца.
|
||
|
||
### Non-goals
|
||
|
||
не реализовывать continuous home recording здесь.
|
||
|
||
## GEN2-025 — Multimodal and ambient-ingress readiness without implementing the whole smart home
|
||
**Owner:** Interaction ingress + Artifact + Capability + World refs
|
||
**Migration mode:** `EXTEND contracts`
|
||
**Primary paths:** `contracts/interaction/**, contracts/capability/multimodal.go, adapters/multimodal/**, Artifact refs, World device/location refs, Creator Web upload/voice paths`
|
||
|
||
### Цель
|
||
|
||
Закрепить единый путь для text/audio/image/video/device observations, чтобы будущие микрофоны/камеры не потребовали нового ядра.
|
||
|
||
### Обязательная работа
|
||
|
||
1. normalise ingress envelope: modality/source/device/location/principal attribution/evidence refs;
|
||
2. raw large media -> Artifact, derived transcript/vision result -> Observation;
|
||
3. device/location are World refs;
|
||
4. speech/OCR/vision results include provenance/model/version/confidence;
|
||
5. future ambient streams can feed bounded observations/episodes without bypassing Interaction/Epistemics;
|
||
6. output device choice остаётся будущим capability, не hardcoded in core.
|
||
|
||
### Canonical writer
|
||
|
||
Interaction/Artifact/Epistemics existing responsibilities
|
||
|
||
### Rollback
|
||
|
||
existing chat/file routes remain compatible
|
||
|
||
### FAST gate
|
||
|
||
speech/image/OCR route + provenance + degraded unavailable + no raw media stuffed into prompt
|
||
|
||
### Exit criteria
|
||
|
||
будущая команда «покажи камеру улицы на телевизоре здесь» вписывается через World/Focus/Capability/Authority без смены core model.
|
||
|
||
### Non-goals
|
||
|
||
не внедрять 24/7 audio/video ingestion в этом milestone.
|
||
|
||
## GEN2-026 — Migrate household behavior to Gen2 context/memory/skills with local degraded paths
|
||
**Owner:** Existing owners, integration task
|
||
**Migration mode:** `CONTROLLED_CUTOVER`
|
||
**Primary paths:** `cmd/core-runtime/**, cmd/cognitive-worker/**, modules/interaction/**, situation/capability/epistemics/work/continuity read paths, creator-web, multimodal adapters`
|
||
|
||
### Цель
|
||
|
||
Перевести реальные бытовые сценарии на Gen2 foundation и доказать, что технический протокол не просачивается пользователю.
|
||
|
||
### Обязательная работа
|
||
|
||
1. перенести SCN-HH-001..010 на Gen2 paths;
|
||
2. name/preference continuity through scoped retrieval;
|
||
3. current data uses freshness/revalidation;
|
||
4. travel/places follows Focus/location and source evidence;
|
||
5. multi-action uses Work;
|
||
6. reminder uses Continuity;
|
||
7. multimodal uses capability/degraded path;
|
||
8. creative request avoids unnecessary web;
|
||
9. partial/unavailable/contradictory results produce honest answer;
|
||
10. short natural response;
|
||
11. authority/unknown outcome regressions;
|
||
12. local model/Lifeboat path continues useful operation when stronger model unavailable.
|
||
|
||
### Canonical writer
|
||
|
||
no new canonical owner; integration switches reads/routes to Gen2
|
||
|
||
### Rollback
|
||
|
||
per-subsystem switches to V1 compatibility remain until M6
|
||
|
||
### FAST gate
|
||
|
||
only touched scenario subset while developing; milestone runs all household scenarios once
|
||
|
||
### Exit criteria
|
||
|
||
обычный пользователь не замечает internal Gen2 protocols; baseline household behavior preserved/improved.
|
||
|
||
### Non-goals
|
||
|
||
не делать feature work unrelated to migration findings.
|
||
|
||
## GEN2-027 — Production canary and controlled Gen2 traffic transition
|
||
**Owner:** Operations/Supervisor
|
||
**Migration mode:** `CONTROLLED_CUTOVER`
|
||
**Primary paths:** `deploy/**, runtime/supervisor/**, health/observability, feature-switch config, evidence docs`
|
||
|
||
### Цель
|
||
|
||
Перевести production на Gen2 по контролируемому canary, сохранив мгновенный rollback к последнему good release.
|
||
|
||
### Обязательная работа
|
||
|
||
1. build candidate from accepted milestone commit;
|
||
2. deploy alongside or controlled replacement according to existing platform constraints;
|
||
3. health + DB migration compatibility;
|
||
4. bounded traffic/canary;
|
||
5. compare errors/latency/unknown/recovery;
|
||
6. household smoke;
|
||
7. rollback drill;
|
||
8. promote only после evidence;
|
||
9. записать production composition snapshot в SELF/Learning Ledger where appropriate.
|
||
|
||
### Canonical writer
|
||
|
||
runtime release state switches via Supervisor; semantic writers already cut over by prior tasks
|
||
|
||
### Rollback
|
||
|
||
one-command/automatic revert to last-known-good release, schema remains backward compatible
|
||
|
||
### FAST gate
|
||
|
||
deployment preflight only during iteration
|
||
|
||
### Exit criteria
|
||
|
||
Gen2 handles production household traffic and rollback proven.
|
||
|
||
### Non-goals
|
||
|
||
не удалять V1 tables/read paths immediately after first success.
|
||
|
||
# M6. V1 retirement and Gen2 acceptance
|
||
|
||
## GEN2-028 — Inventory V1 compatibility usage and prove retirement readiness
|
||
**Owner:** Migration/Governance
|
||
**Migration mode:** `RETIRE_AFTER_PROOF preparation`
|
||
**Primary paths:** `entire repo read; code changes only instrumentation/compatibility markers/evidence, no destructive schema drop`
|
||
|
||
### Цель
|
||
|
||
Доказать, что legacy paths больше не являются активными writers/read dependencies.
|
||
|
||
### Обязательная работа
|
||
|
||
1. caller inventory;
|
||
2. writer inventory;
|
||
3. feature-switch telemetry;
|
||
4. PersonalMemory fallback usage;
|
||
5. ActiveProjectFocus compatibility usage;
|
||
6. truth_bundles read usage;
|
||
7. ordinary ENV fallback usage;
|
||
8. V1 Skill view usage;
|
||
9. rollback observation window evidence;
|
||
10. сформировать explicit retirement list, каждый пункт с rollback consequence.
|
||
|
||
### Canonical writer
|
||
|
||
no change
|
||
|
||
### Rollback
|
||
|
||
not applicable; this task is proof only
|
||
|
||
### FAST gate
|
||
|
||
static checks + targeted telemetry tests
|
||
|
||
### Exit criteria
|
||
|
||
для каждого legacy path есть доказательство ACTIVE / SAFE_TO_RETIRE / KEEP_LONGER.
|
||
|
||
### Non-goals
|
||
|
||
не удалять ничего только потому, что «похоже, уже не используется».
|
||
|
||
## GEN2-029 — Retire proven V1 paths without deleting evidence
|
||
**Owner:** respective owners
|
||
**Migration mode:** `RETIRE_AFTER_PROOF`
|
||
**Primary paths:** `only paths explicitly approved by GEN2-028 retirement list; database migrations for retirement markers/drop only where FULL gate approved`
|
||
|
||
### Цель
|
||
|
||
Удалить архитектурные костыли V1, которые мешают дальнейшему развитию, но сохранить raw/canonical historical evidence.
|
||
|
||
### Обязательная работа
|
||
|
||
1. retire PersonalMemory ContextText read path;
|
||
2. retire project-only Focus source of truth;
|
||
3. retire truth_bundles as active canonical path while retaining historical compatibility/export as needed;
|
||
4. remove non-bootstrap ordinary ENV reads already migrated;
|
||
5. retire implicit reflex substitutes superseded by explicit Reflex;
|
||
6. remove dead feature switches only after observation;
|
||
7. не удалять human utterances, observations, experiences, commits, outcomes, audit lineage.
|
||
|
||
### Canonical writer
|
||
|
||
Gen2 writers already active; V1 writers permanently disabled/removed
|
||
|
||
### Rollback
|
||
|
||
code rollback possible to pre-retirement tag only if schema remains readable; destructive DB deletion requires explicit backup/export and approval
|
||
|
||
### FAST gate
|
||
|
||
targeted no-caller/no-writer tests while editing; FULL required before irreversible retirement
|
||
|
||
### Exit criteria
|
||
|
||
нет двух архитектурных поколений в active runtime; historical evidence доступно.
|
||
|
||
### Non-goals
|
||
|
||
не проводить массовую vacuum/delete ради чистоты.
|
||
|
||
## GEN2-030 — Final Gen2 acceptance, documentation baseline and next-evolution queue
|
||
**Owner:** Architecture/Governance + all owners evidence
|
||
**Migration mode:** `acceptance`
|
||
**Primary paths:** `docs/**, architecture/** status/registry, dev/**, evidence; code only final defects found by acceptance`
|
||
|
||
### Цель
|
||
|
||
Зафиксировать Gen2 как новый рабочий baseline и отделить фундамент от будущих capabilities.
|
||
|
||
### Обязательная работа
|
||
|
||
1. FULL acceptance gate once;
|
||
2. production smoke/restart/rollback confirmation;
|
||
3. architecture registry reflects actual code;
|
||
4. canonical data model vs actual schema reconciliation;
|
||
5. Personal Benchmark baseline;
|
||
6. Learning Ledger initial history;
|
||
7. known gaps/future capabilities queue;
|
||
8. новый stable tag `domovoy-gen2-baseline-*`;
|
||
9. обновить PROJECT_STATUS/active task.
|
||
|
||
### Canonical writer
|
||
|
||
no semantic cutover
|
||
|
||
### Rollback
|
||
|
||
previous M5 production tag remains last-known-good until Gen2 acceptance signed
|
||
|
||
### FAST gate
|
||
|
||
not applicable; this is a justified FULL gate
|
||
|
||
### Exit criteria
|
||
|
||
Gen2 is documented, production-proven, rollbackable and ready for capability growth/self-learning iterations.
|
||
|
||
### Non-goals
|
||
|
||
не объявлять ambient home/robots fully implemented.
|
||
|
||
|
||
---
|
||
|
||
# 16. Реперные точки и gates
|
||
|
||
## M0 exit
|
||
|
||
- все текущие открытые изменения сохранены в git;
|
||
- актуальная работа слита в `main`;
|
||
- remote `main` обновлён;
|
||
- `GEN2_BASE_COMMIT` и baseline tag зафиксированы;
|
||
- Gen2 docs/owners/governance официально приняты;
|
||
- task/test profiles существуют.
|
||
|
||
**Gate:** FAST only, если не обнаружен новый высокий риск.
|
||
|
||
## M1 exit — Semantic substrate
|
||
|
||
Обязательные свойства:
|
||
|
||
- World referents stable и не владеют truth;
|
||
- Focus V2 поддерживает organization/system/database/version/activity/goal/task/entities;
|
||
- Company A/B isolation;
|
||
- Focus Stack push/pop/resume;
|
||
- V1 ActiveProjectFocus доступен только compatibility projection.
|
||
|
||
**Gate:** MILESTONE.
|
||
|
||
## M2 exit — Memory/Knowledge foundation
|
||
|
||
Обязательные свойства:
|
||
|
||
- normalized evidence/claim/belief;
|
||
- freshness/volatility/versioning;
|
||
- positive + negative Experience;
|
||
- hard scope before similarity;
|
||
- rebuildable retrieval projections;
|
||
- Context Compiler V2;
|
||
- PersonalMemory — fallback only;
|
||
- iterative retrieval для маленьких локальных моделей.
|
||
|
||
**Gate:** MILESTONE.
|
||
|
||
## M3 exit — Evolvable behavior
|
||
|
||
Обязательные свойства:
|
||
|
||
- typed/scoped Configuration;
|
||
- ENV только bootstrap/compatibility;
|
||
- Skill V2;
|
||
- Reflex lifecycle + shadow/revalidation;
|
||
- SELF observe/evaluate/propose;
|
||
- Personal Benchmark/evaluation;
|
||
- intelligence strategy учитывает cost/risk/quality.
|
||
|
||
**Gate:** **FULL**, потому что здесь впервые одновременно меняются configuration, cognition selection и обучаемое поведение.
|
||
|
||
## M4 exit — Durable autonomy
|
||
|
||
Обязательные свойства:
|
||
|
||
- long jobs survive restart;
|
||
- dynamic perspectives/teams используют Work Graph;
|
||
- consequence assessment перед значимым mutation;
|
||
- execution receipt отделён от verified outcome;
|
||
- Supervisor rollback независим от candidate;
|
||
- self-evolution проходит existing development gates + independent evaluation.
|
||
|
||
**Gate:** MILESTONE + focused restart/recovery/rollback. FULL не повторять автоматически, если M3 FULL свежий и нет глобального schema cutover.
|
||
|
||
## M5 exit — Integrated household Gen2
|
||
|
||
Обязательные свойства:
|
||
|
||
- natural conversational control;
|
||
- household scenarios 001–010 on Gen2;
|
||
- multi-person/data realm isolation;
|
||
- multimodal provenance/degraded paths;
|
||
- local fallback usefulness;
|
||
- production canary and rollback.
|
||
|
||
**Gate:** **FULL + production smoke**.
|
||
|
||
## M6 exit — V1 retirement
|
||
|
||
Обязательные свойства:
|
||
|
||
- no active V1 canonical writers where Gen2 replaced them;
|
||
- retirement based on usage evidence;
|
||
- historical evidence preserved;
|
||
- old rollback path removed only after explicit proof;
|
||
- architecture registry equals actual runtime.
|
||
|
||
**Gate:** **FULL only immediately before irreversible retirement**, затем targeted production smoke.
|
||
|
||
---
|
||
|
||
# 17. Coverage Matrix — чтобы не потерять обсуждённую концепцию
|
||
|
||
| Концепция | Где реализуется/закрепляется |
|
||
|---|---|
|
||
| Домовой != LLM | GEN2-000/001, existing cognitive boundary |
|
||
| Правда vs гипотеза | GEN2-006/007/020 |
|
||
| «Не умею» -> исследовать | GEN2-016/017 |
|
||
| Долгий фоновый расчёт | GEN2-017 |
|
||
| Пережить restart | GEN2-017 + Continuity + existing recovery |
|
||
| Память != prompt | GEN2-009/010 |
|
||
| Scope Company A/B | GEN2-003/004/005/009 |
|
||
| Freshness/скорость старения | GEN2-007 |
|
||
| Старое знание как аналогия | GEN2-007/010 |
|
||
| Не забывать raw evidence | GEN2-006/008/025/029 |
|
||
| Reprocess прошлое новой моделью | GEN2-006/008/009 |
|
||
| Positive experience | GEN2-008/009 |
|
||
| Negative experience/грабли | GEN2-008/009/010 |
|
||
| Correction -> learning signal | GEN2-008/015 |
|
||
| Focus / Focus Stack | GEN2-004 |
|
||
| Project только одна грань | GEN2-004 |
|
||
| World model/referents | GEN2-003/005 |
|
||
| Entity resolution | GEN2-005/024 |
|
||
| Source trust by domain | GEN2-024 + Epistemics |
|
||
| Dynamic settings | GEN2-012 |
|
||
| ENV минимум | GEN2-012 |
|
||
| Secrets отдельно | GEN2-012 |
|
||
| Conversational control | GEN2-023 |
|
||
| Skill from repeated solution | GEN2-013 |
|
||
| Reflex from stable Skill | GEN2-014 |
|
||
| Reflex не закостеневает | GEN2-014 |
|
||
| Shadow reasoning | GEN2-014/016 |
|
||
| Новая сильная модель переоценивает Skills | GEN2-016/022 |
|
||
| SELF: что умею | GEN2-015 |
|
||
| SELF: свои слабости/грабли | GEN2-015 |
|
||
| Learning Ledger | GEN2-015/022 |
|
||
| Creator != Evaluator | GEN2-001/015/022 |
|
||
| Personal Benchmark | GEN2-016 |
|
||
| Cost of intelligence | GEN2-016 |
|
||
| Roles/perspectives | GEN2-018 |
|
||
| Temporary team of specialists | GEN2-018 |
|
||
| Не 20 агентов всегда | GEN2-016/018 |
|
||
| Consequence/risk instead of blanket prohibition | GEN2-019 |
|
||
| Owner can accept risk | GEN2-019 + Authority/Commit |
|
||
| Transactional self-change | GEN2-021/022 |
|
||
| Independent Lifeboat | GEN2-021 |
|
||
| Outcome verification | GEN2-020 |
|
||
| No duplicate external action | existing Commit + GEN2-020 regressions |
|
||
| Attention/Continuity | existing owner + GEN2-017 integration |
|
||
| Multi-person/family boundaries | GEN2-024 |
|
||
| Voice/image/OCR provenance | GEN2-025 |
|
||
| Future cameras/TV/home | architectural hooks GEN2-003/004/019/025 |
|
||
| Future PC/mobile hands | Capability/World/Authority/Commit hooks |
|
||
| Future robots/vehicles | Capability/World/Consequence/Authority/Outcome hooks |
|
||
| Memory salience/retention/hot-warm-cold-archive | GEN2-009 |
|
||
| Explicit «запомни/можно забыть» | GEN2-009 + Interaction retention evidence |
|
||
| Consolidation raw -> episode -> knowledge -> experience -> skill -> reflex | GEN2-008/009/013/014 |
|
||
| Reversible evolution | GEN2-021/022 |
|
||
| Minimum unnecessary questions | GEN2-019 clarification value + Personal Benchmark |
|
||
| Do not optimize for agreement | GEN2-006/016 |
|
||
| User preference is scoped/evolving | GEN2-016/023; evidence-backed preference profile |
|
||
| Goal hierarchy / что значит «лучше» | GEN2-016 + Work Goal V2 |
|
||
| Decision regret / learning from choices | GEN2-016/015 |
|
||
| Active environment/device discovery | GEN2-025 + World/Capability qualification |
|
||
|
||
---
|
||
|
||
# 18. Future capabilities intentionally NOT fully implemented in foundation
|
||
|
||
Эти возможности **не забыты**. Gen2 обязан оставить для них совместимый путь, но не должен расходовать месяцы на реализацию до готовности костяка.
|
||
|
||
## 18.1 Ambient home awareness
|
||
|
||
Будущее:
|
||
|
||
- микрофоны в доме;
|
||
- bounded/continuous audio observations;
|
||
- speaker recognition;
|
||
- камеры;
|
||
- presence/location inference;
|
||
- семейные разговоры/события;
|
||
- automatic episode extraction.
|
||
|
||
Gen2 foundation уже должен дать:
|
||
|
||
```text
|
||
Interaction ingress
|
||
+ Artifact raw lineage
|
||
+ World Device/Room/Person refs
|
||
+ Identity != speaker guess
|
||
+ Epistemics observations/provenance
|
||
+ PrincipalDataRealm
|
||
+ Focus
|
||
+ Context Compiler
|
||
```
|
||
|
||
## 18.2 Active environment and capability discovery
|
||
|
||
Будущее окружение нельзя заранее перечислить в таблицах. Новый PC-hand, телефон, TV, камера, датчик, автомобиль или неизвестный сегодня класс устройства должен уметь зарегистрировать наблюдаемый identity/capability descriptor.
|
||
|
||
Gen2 foundation использует:
|
||
|
||
```text
|
||
discovery observation
|
||
-> World candidate referent
|
||
-> Capability candidate
|
||
-> qualification/health
|
||
-> scoped configuration
|
||
-> Authority only when an action requires it
|
||
```
|
||
|
||
Обнаружение никогда автоматически не означает доверие, identity владельца или право на mutation.
|
||
|
||
## 18.3 Output to surrounding devices
|
||
|
||
Будущее:
|
||
|
||
> «Покажи камеру улицы.»
|
||
|
||
Домовой сможет вывести изображение на подходящий TV/phone/display, учитывая текущий Focus/location.
|
||
|
||
Для этого Gen2 оставляет:
|
||
|
||
```text
|
||
World device capabilities
|
||
+ current location/presence observations
|
||
+ Capability selection
|
||
+ Consequence/Authority when required
|
||
+ Commit/Outcome
|
||
```
|
||
|
||
## 18.4 PC/mobile “hands”
|
||
|
||
Future device agents должны регистрироваться как capabilities/environment nodes и никогда не получать специальный обход core semantics.
|
||
|
||
Файл/команда/программа:
|
||
|
||
```text
|
||
Intent -> Work -> Capability -> Consequence -> Authority -> Commit -> device executor -> Outcome
|
||
```
|
||
|
||
## 18.5 Home automation / vehicles / robots
|
||
|
||
Не создаётся отдельная «robot authority» архитектура.
|
||
|
||
Используются те же:
|
||
|
||
- World referents;
|
||
- capabilities;
|
||
- risk/consequence;
|
||
- Authority/Commit;
|
||
- outcome verification;
|
||
- Supervisor для собственного software evolution.
|
||
|
||
## 18.6 Digital Twin / simulation
|
||
|
||
Gen2 ConsequenceAssessment и World referents должны позволять позже подключить simulation/dry-run adapters, но foundation не требует полного Digital Twin.
|
||
|
||
## 18.7 Automatic Skill/Reflex synthesis
|
||
|
||
Сейчас закладывается lifecycle и governance.
|
||
|
||
Полная автоматизация:
|
||
|
||
```text
|
||
repeated experience -> candidate Skill -> code synthesis -> sandbox -> evaluator -> shadow -> reflex promotion
|
||
```
|
||
|
||
может включаться позже без изменения canonical model.
|
||
|
||
## 18.8 New-model global requalification
|
||
|
||
Новая сильная модель позже сможет просматривать Skills/Reflexes/negative experience и предлагать улучшения, но всегда через `GEN2-022` evolution protocol.
|
||
|
||
---
|
||
|
||
# 19. Architecture anti-patterns запрещённые на всём пути
|
||
|
||
1. `memory_items(id, jsonb)` как новый универсальный source of truth.
|
||
2. WorldObject с произвольным JSON, где лежат факты всех owners.
|
||
3. `map[string]any` вместо typed domain contract.
|
||
4. Один Core Runtime, который сам понимает всю семантику owners.
|
||
5. SELF, от которого синхронно зависят все запросы.
|
||
6. Event Bus как обязательный центр любого взаимодействия.
|
||
7. Cross-owner SQL JOIN для корректности бизнес-смысла.
|
||
8. Два canonical writers во время migration.
|
||
9. In-memory durable schedule/job state.
|
||
10. Prompt history как единственная память.
|
||
11. Vector DB как истина.
|
||
12. LLM как источник факта об успешной внешней операции.
|
||
13. Skill, который сам выставляет себе trusted/quality score.
|
||
14. Reflex без applicability/version/dependency/revalidation.
|
||
15. Настройки через бесконечное расширение ENV.
|
||
16. Пароли/токены в embeddings/context.
|
||
17. Multi-agent team для каждой мелкой задачи.
|
||
18. Full test suite после каждого небольшого commit.
|
||
19. Добавление тестов ради coverage без нового риска.
|
||
20. Удаление V1 evidence при миграции.
|
||
21. Big-bang rewrite всего проекта.
|
||
22. «Временно» обойти Authority/Commit ради ускорения feature.
|
||
|
||
---
|
||
|
||
# 20. Definition of Done для Gen2 как поколения
|
||
|
||
Gen2 считается состоявшимся не по количеству новых файлов, а когда выполняются реальные свойства.
|
||
|
||
## 20.1 Memory/knowledge
|
||
|
||
Сценарий:
|
||
|
||
> год назад структура УНФ была X, сейчас live источник недоступен.
|
||
|
||
Домовой способен:
|
||
|
||
- найти старое знание;
|
||
- понять его scope/version/age;
|
||
- не назвать его текущей истиной;
|
||
- предложить использовать как гипотезу/старт;
|
||
- при появлении live access revalidate и обновить BeliefAssessment.
|
||
|
||
## 20.2 Scope
|
||
|
||
Данные Company A не смешиваются с Company B даже при почти идентичной семантике/embedding.
|
||
|
||
## 20.3 Negative experience
|
||
|
||
При знакомой проблеме Context Compiler вытаскивает не только «правильное решение», но и релевантные ранее провалившиеся подходы и условия провала.
|
||
|
||
## 20.4 Local context budget
|
||
|
||
Маленькая локальная модель может решить задачу через точный первичный context + iterative retrieval без загрузки всей истории.
|
||
|
||
## 20.5 Skill/Reflex
|
||
|
||
Повторяющееся подтверждённое решение может пройти:
|
||
|
||
```text
|
||
Experience -> Candidate Skill -> Active Skill -> Reflex
|
||
```
|
||
|
||
а при drift:
|
||
|
||
```text
|
||
Reflex -> revalidation/shadow mismatch -> suspend -> Skill/reasoning
|
||
```
|
||
|
||
## 20.6 SELF
|
||
|
||
Домовой способен показать evidence-backed ответ:
|
||
|
||
> что я умею / при каких условиях / где ранее ошибался / какие зависимости сейчас недоступны.
|
||
|
||
## 20.7 Long work
|
||
|
||
Задача может работать много шагов, пережить restart, сменить model provider и продолжить с checkpoint.
|
||
|
||
## 20.8 Risk/control
|
||
|
||
Высокорисковое действие не запрещается искусственно владельцу, но последствия/uncertainty/rollback объясняются до конкретного Commit.
|
||
|
||
## 20.9 Memory retention and preference learning
|
||
|
||
Домовой умеет различать:
|
||
|
||
- факт, который давно не использовался, но дорог в потере;
|
||
- быстро устаревающее operational знание;
|
||
- explicit owner directive «это обязательно запомни»;
|
||
- временную preference текущей задачи и устойчивую preference владельца;
|
||
- inferred preference как гипотезу с evidence, а не как безусловную истину.
|
||
|
||
Он способен консолидировать память, не теряя возможность вернуться к исходному evidence.
|
||
|
||
## 20.10 Self-evolution
|
||
|
||
Core/capability candidate может быть построен, независимо оценён, запущен canary и автоматически откатан Supervisor при failure.
|
||
|
||
## 20.11 Human UX
|
||
|
||
Пользователь управляет обычным поведением разговором и получает естественный результат, а не внутренние `BeliefAssessment/FocusFrame/CommitState`.
|
||
|
||
---
|
||
|
||
# 21. Codex execution discipline
|
||
|
||
Для каждого task Codex должен:
|
||
|
||
### Before
|
||
|
||
1. Прочитать Gen2 canonical docs.
|
||
2. Проверить active task packet.
|
||
3. Найти current owner/writer/callers.
|
||
4. Записать короткий implementation note: `что меняю / чего не меняю / writer_before/after`.
|
||
5. Выполнить FAST preflight.
|
||
|
||
### During
|
||
|
||
- делать минимальный bounded diff;
|
||
- не отвлекаться на unrelated cleanup;
|
||
- сначала сохранить evidence/backfill path, затем переключать;
|
||
- не запускать FULL без milestone reason;
|
||
- при обнаружении architecture gap остановиться и оформить finding.
|
||
|
||
### After
|
||
|
||
1. Выполнить FAST gate.
|
||
2. Обновить migration/evidence note.
|
||
3. Зафиксировать:
|
||
- changed paths;
|
||
- contracts/schema/events/dependencies;
|
||
- writer before/after;
|
||
- tests actually run;
|
||
- assumptions;
|
||
- findings not changed;
|
||
- rollback procedure.
|
||
4. Commit task.
|
||
5. Merge в `gen2/integration`.
|
||
6. Если task завершает milestone — выполнить milestone gate и merge milestone в `main`.
|
||
|
||
---
|
||
|
||
# 22. Что Codex не должен ждать от пользователя
|
||
|
||
Codex не должен прерывать работу вопросами о локальной детали, которую можно безопасно определить из repo/contracts/tests.
|
||
|
||
Он должен запросить решение только если:
|
||
|
||
- два canonical owner действительно конфликтуют;
|
||
- изменение затрагивает фундаментальный user intent, которого нет в Конституции/ADR;
|
||
- требуется секрет/credential, который невозможно получить существующим разрешённым способом;
|
||
- irreversible migration не имеет согласованного rollback/backup;
|
||
- внешний production action требует authority, которой task packet не содержит.
|
||
|
||
Во всех остальных случаях — best effort внутри принятых контрактов.
|
||
|
||
---
|
||
|
||
# 23. Что делать с DEV-000295
|
||
|
||
DEV-000295 revision 2 не расширяется до Gen2.
|
||
|
||
Перед Gen2:
|
||
|
||
- его текущий branch/diff входит в PRE-GEN2 consolidation;
|
||
- существующие household scenarios становятся V1 regression baseline;
|
||
- его ограничения `no new owner/no migrations/no architecture change` **не переносятся** на Gen2 architectural tasks;
|
||
- незавершённый production evidence фиксируется как known baseline gap, а не причина блокировать Gen2 foundation;
|
||
- после `GEN2-000` active task переводится на первую Gen2 task packet.
|
||
|
||
---
|
||
|
||
# 24. Приоритет, если сроки начинают раздуваться
|
||
|
||
Если программа становится слишком большой, нельзя выкидывать фундамент и оставлять features.
|
||
|
||
Приоритет сохранения:
|
||
|
||
```text
|
||
P0 — invariants / canonical owners / migration safety
|
||
P1 — Focus/Scope + Epistemics + Retrieval/Context
|
||
P2 — Configuration + Skill/Reflex + SELF
|
||
P3 — LongWork + Outcome + Supervisor/evolution
|
||
P4 — household integration
|
||
P5 — future capabilities
|
||
```
|
||
|
||
То есть при сокращении объёма позже реализуются камеры/роботы/ambient streams, но **не откладываются снова на «потом» Scope, freshness, dynamic configuration, Skill/Reflex lifecycle или SELF foundation**.
|
||
|
||
---
|
||
|
||
# 25. Итоговая последовательность
|
||
|
||
```text
|
||
PRE-GEN2-000 Preserve + merge all current work -> main -> tag
|
||
↓
|
||
GEN2-000/001 Adopt Gen2 governance + owners
|
||
↓
|
||
M1 Primitives -> World -> Focus/Scope -> identity/version bindings
|
||
↓
|
||
MILESTONE
|
||
↓
|
||
M2 Epistemics -> freshness -> Experience -> Retrieval -> Context Compiler -> PersonalMemory cutover
|
||
↓
|
||
MILESTONE
|
||
↓
|
||
M3 Configuration -> Skill V2 -> Reflex -> SELF -> Intelligence/Benchmark
|
||
↓
|
||
FULL
|
||
↓
|
||
M4 LongRunningWork -> Perspectives -> Consequence -> Outcome -> Lifeboat -> Self-evolution
|
||
↓
|
||
MILESTONE + recovery
|
||
↓
|
||
M5 Conversational UX -> multi-person -> multimodal readiness -> household migration -> production canary
|
||
↓
|
||
FULL + production
|
||
↓
|
||
M6 retirement proof -> retire V1 paths -> final acceptance
|
||
↓
|
||
FULL only before irreversible retirement
|
||
↓
|
||
DOMOVOY GEN2 BASELINE
|
||
```
|
||
|
||
После этого массовое развитие capabilities идёт **на Gen2 костяке**, а саморазвитие постепенно начинает использовать тот же governed lifecycle, который был заложен вручную.
|