From e0b4c144b9d54b52545505b861c05df78f7ec824 Mon Sep 17 00:00:00 2001 From: Stream Date: Sat, 18 Apr 2026 13:50:02 +0300 Subject: [PATCH] auto-sync: 2026-04-18 13:50:01 --- memory/ontology/RULES.md | 74 +++++++++++-- tasks/ontology-management/PROJECT.md | 39 +++++++ .../docs/ONTLOGY-MANAGEMENT.md | 101 ++++++++++++++++++ 3 files changed, 206 insertions(+), 8 deletions(-) create mode 100644 tasks/ontology-management/PROJECT.md create mode 100644 tasks/ontology-management/docs/ONTLOGY-MANAGEMENT.md diff --git a/memory/ontology/RULES.md b/memory/ontology/RULES.md index 4eb8000..77288a1 100644 --- a/memory/ontology/RULES.md +++ b/memory/ontology/RULES.md @@ -13,7 +13,18 @@ - Проверке зависимостей между задачами - Планировании новых активностей -**Онтология — единственный источник истины** о проектах и задачах. Не держать информацию в голове, в daily notes или вMEMORY.md — только в онтологии. +**Онтология — единственный источник истины** о проектах и задачах. Не держать информацию в голове, в daily notes или в MEMORY.md — только в онтологии. + +--- + +## 1.1 Строгая иерархия проекта и задачи + +- **Task без Project не существует.** +- Каждый `Project` — это отдельный контейнер с собственной документацией. +- Каждая `Task` обязана принадлежать одному `Project`. +- Если работа не укладывается в существующий проект, сначала создаётся новый `Project`, затем задачи внутри него. +- У `Task` есть уникальный идентификатор и отдельная папка внутри папки проекта. +- У `Project` есть общая документация на уровне всей папки проекта. --- @@ -42,19 +53,23 @@ | Поле | Тип | Обязательно | Описание | |------|-----|-------------|----------| | `name` | string | ✅ | Название проекта | -| `status` | enum | ✅ | active, paused, done, planned | -| `folder` | string | — | Путь к документации: `tasks/{project}/` | +| `status` | enum | ✅ | planning, active, paused, completed, archived | +| `folder` | string | ✅ | Папка проекта: `tasks/{project}/` | +| `doc_path` | string | ✅ | Главный файл проекта, обычно `PROJECT.md` | | `description` | string | — | Краткое описание | | `start_date` | date | — | Дата старта | +| `end_date` | date | — | Дата окончания | ### Task | Поле | Тип | Обязательно | Описание | |------|-----|-------------|----------| | `title` | string | ✅ | Название задачи | | `project` | string | ✅ | ID проекта (proj_xxx) | -| `assignee` | string | ✅ | Кто выполняет: dev, p_slava, legal, feda | -| `status` | enum | ✅ | open, in_progress, done, blocked | -| `priority` | enum | — | high, medium, low | +| `folder` | string | ✅ | Папка задачи внутри проекта | +| `doc_path` | string | ✅ | Главный файл задачи, обычно `TASK.md` | +| `assignee` | string | — | Исполнитель | +| `status` | enum | ✅ | open, in_progress, done, blocked, cancelled | +| `priority` | enum | — | high, medium, low, urgent | | `description` | string | — | Детали задачи | --- @@ -64,12 +79,14 @@ ### Создание проекта 1. Слава/агент предлагает → обсуждаем 2. Слава соглашается → Стрим создаёт в онтологии -3. Привязываем folder, создаём структуру `tasks/{project}/` +3. Привязываем `folder` и `doc_path` +4. Создаём структуру `tasks/{project}/` ### Создание задачи 1. Предложение → описание → assignee → приоритет 2. Слава ОК → Стрим создаёт 3. Task привязывается к Project +4. Назначаем `folder` и `doc_path` ### Обновление статуса 1. Кто-то сообщает (Слава, агент, результат работы) @@ -117,7 +134,12 @@ memory/ontology/ └── RULES.md — этот файл ``` -ontology.py: +Ontology skill reference: +``` +skills/ontology/references/schema.md +``` + +Ontology script: ``` skills/ontology/scripts/ontology.py ``` @@ -134,4 +156,40 @@ skills/ontology/scripts/ontology.py --- +## 9. Стандарт структуры папок + +### Project +```text +tasks// +├── PROJECT.md +├── docs/ +├── journal/ +├── assets/ +├── meta/ +└── TASKS/ + ├── backlog/ + ├── active/ + ├── blocked/ + ├── done/ + └── archive/ +``` + +### Task +```text +tasks//TASKS/// +├── TASK.md +├── context.md +├── report.md +└── attachments/ +``` + +### Правило путей +- `Project.folder` — папка проекта. +- `Project.doc_path` — главный документ проекта. +- `Task.folder` — папка задачи внутри папки проекта. +- `Task.doc_path` — главный документ задачи. +- `Task` всегда связан с `Project` и живёт внутри его структуры. + +--- + _Обновлено: 2026-04-09_ diff --git a/tasks/ontology-management/PROJECT.md b/tasks/ontology-management/PROJECT.md new file mode 100644 index 0000000..8f1432b --- /dev/null +++ b/tasks/ontology-management/PROJECT.md @@ -0,0 +1,39 @@ +# Ontology & Projects Management + +**Status:** active +**Updated:** 2026-04-18 + +## Purpose + +Single source of truth for managing projects and tasks in OpenClaw. + +This project defines: +- ontology rules +- project/task folder standards +- migration rules for existing data +- testing checklist after changes + +## Scope + +Covers: +- `memory/ontology/schema.yaml` +- `memory/ontology/graph.jsonl` +- `memory/ontology/RULES.md` +- `skills/ontology/references/schema.md` +- project and task folder conventions under `tasks//` + +## Current standard + +- A `Task` cannot exist without a `Project`. +- Every `Project` has a documentation folder and a main documentation file. +- Every `Task` has its own folder inside the project and its own main documentation file. + +## Main documents + +- `memory/ontology/RULES.md` — behavioral and governance rules +- `memory/ontology/schema.yaml` — active schema used by validation +- `skills/ontology/references/schema.md` — reference schema for the ontology skill + +## Migration target + +Existing projects and tasks should be normalized to the current standard, preserving history and append-only graph behavior where possible. diff --git a/tasks/ontology-management/docs/ONTLOGY-MANAGEMENT.md b/tasks/ontology-management/docs/ONTLOGY-MANAGEMENT.md new file mode 100644 index 0000000..ca4cb9f --- /dev/null +++ b/tasks/ontology-management/docs/ONTLOGY-MANAGEMENT.md @@ -0,0 +1,101 @@ +# Ontology & Projects Management Documentation + +## 1. Core principles + +- Ontology is the source of truth for projects and tasks. +- Stream is the only writer. +- Changes require approval from Слава. +- Tasks do not exist without projects. +- Keep graph history append-only whenever possible. + +## 2. Entity rules + +### Project +Required: +- `name` +- `folder` +- `doc_path` + +Recommended: +- `description` +- `status` +- `start_date` +- `end_date` +- `owner` +- `team` +- `goals` +- `tags` + +### Task +Required: +- `title` +- `status` +- `project` +- `folder` +- `doc_path` + +Recommended: +- `description` +- `priority` +- `assignee` +- `due` +- `estimate_hours` +- `blockers` +- `tags` + +## 3. Folder standard + +### Project folder +```text +tasks// +├── PROJECT.md +├── docs/ +├── journal/ +├── assets/ +├── meta/ +└── TASKS/ + ├── backlog/ + ├── active/ + ├── blocked/ + ├── done/ + └── archive/ +``` + +### Task folder +```text +tasks//TASKS/// +├── TASK.md +├── context.md +├── report.md +└── attachments/ +``` + +## 4. Document paths + +- `Project.doc_path` points to the main project document, usually `PROJECT.md`. +- `Task.doc_path` points to the main task document, usually `TASK.md`. +- `folder` is the directory containing the object. + +## 5. Validation workflow + +1. Update schema. +2. Migrate graph data if needed. +3. Run validation. +4. Run get/query tests. +5. Fix only the minimum required issues. + +## 6. Migration workflow + +1. Backup current files. +2. Compare current schema with reference schema. +3. Normalize entity fields. +4. Add missing required path fields. +5. Revalidate. + +## 7. Testing checklist + +- `ontology.py validate` +- `ontology.py get --id ` +- `ontology.py query --type Project ...` +- `ontology.py query --type Task ...` +- Check that project and task folders exist on disk.