|
1 | 1 | # CONTEXT/1.2 Workspace |
2 | 2 |
|
3 | | -This repository hosts the working implementation of the CONTEXT/1.2 format and linting tooling. It includes the normative specification, canonical examples, automated golden tests, and CI configuration to guarantee deterministic handling of capsules and relations. |
| 3 | +> **Deterministic capsule format** для Flagship-агентов: единый язык общения между Reasoning Core, Memory Brain и Tooling Mesh. |
4 | 4 |
|
5 | | -## Contents |
| 5 | +  |
6 | 6 |
|
7 | | -- `docs/context_spec_1_2.md` – normative specification (@CONTEXT/1.2 + CTX-CANON/3). |
8 | | -- `docs/testing.md` – instructions for running and extending the golden test suite. |
9 | | -- `.agents/tools/ctx_lint.py` – reference parser/linter used in all validations. |
10 | | -- `tests/context/` + `tests/outcomes/` – golden `.context` files with expected results (positive & negative scenarios). |
11 | | -- `.github/workflows/goldens.yml` – GitHub Actions workflow running the golden suite on each push/PR. |
| 7 | +**Цель.** Гарантировать, что каждая `.context` капсула описана спецификацией и проверена golden-тестами, прежде чем попадёт в продуктивные пайплайны Modular Intellegence Systems. |
12 | 8 |
|
13 | | -## Getting Started |
| 9 | +## Repository Map |
| 10 | + |
| 11 | +| Путь | Назначение | |
| 12 | +| --- | --- | |
| 13 | +| `docs/context_spec_1_2.md` | Нормативная спецификация CONTEXT/1.2 + CTX-CANON/3. | |
| 14 | +| `docs/testing.md` | Руководство по запуску и расширению golden-наборов. | |
| 15 | +| `.agents/tools/ctx_lint.py` | Эталонный парсер/линтер, используемый во всех проверках. | |
| 16 | +| `tests/context/` | Позитивные и негативные `.context` сценарии. | |
| 17 | +| `tests/outcomes/` | Эталонные выходные данные для golden-тестов. | |
| 18 | +| `.github/workflows/goldens.yml` | CI, запускающий полный golden-suite на каждый push/PR. | |
| 19 | + |
| 20 | +## Quickstart |
14 | 21 |
|
15 | 22 | ```bash |
16 | 23 | python -m venv .venv |
17 | 24 | source .venv/bin/activate |
18 | | -pip install -r requirements.txt # if such file exists; else ensure python>=3.11 |
| 25 | +pip install -r requirements.txt # при отсутствии файла — убедитесь, что python>=3.11 |
19 | 26 | python tests/run_goldens.py |
20 | 27 | ``` |
21 | 28 |
|
22 | | -The command must exit with status `0`. Any discrepancy between actual and expected outcomes indicates a regression in the format or tooling. |
23 | | - |
24 | | -## Adding New Test Cases |
| 29 | +Команда должна завершиться `0`. Любое расхождение между фактическим и ожидаемым выводом фиксирует регрессию и блокирует merge. |
25 | 30 |
|
26 | | -1. Create a `.context` file under `tests/context/`. |
27 | | -2. Run `python tests/run_goldens.py` to obtain the digest or error metadata. |
28 | | -3. Add the expected outcome in `tests/outcomes/<name>.json`. |
29 | | -4. Commit the new files alongside any required changes in `ctx_lint.py` or docs. |
| 31 | +## Golden Suite & CI |
| 32 | +- Workflow `goldens.yml` стартует на каждый push/PR и валидирует все сценарии. |
| 33 | +- Локально запускай `python tests/run_goldens.py` до публикации коммитов. |
| 34 | +- Новые конструкции спецификации сопровождаются обновлением golden-наборов и документации. |
30 | 35 |
|
31 | | -## CI Enforcement |
| 36 | +## Добавление новых сценариев |
| 37 | +1. Создай новую `.context` капсулу в `tests/context/` и дай осмысленное имя. |
| 38 | +2. Выполни `python tests/run_goldens.py` — получишь digest или описание ошибки. |
| 39 | +3. Зафиксируй ожидаемый результат в `tests/outcomes/<name>.json`. |
| 40 | +4. Обнови `docs/context_spec_1_2.md`/`docs/testing.md`, если поведение изменилось. |
| 41 | +5. Отправь PR с трассой проверки, ссылкой на ADR (если применимо) и скриншотом зелёного CI. |
32 | 42 |
|
33 | | -The GitHub Actions workflow `goldens.yml` executes the golden suite automatically. Pull requests failing this check must be fixed before merging. This ensures that every change preserves canon determinism and lint diagnostics. |
| 43 | +## Status & Next Up |
| 44 | +- ✅ Покрыты: resolver metadata, chunk payloads, TTL, confidence models, подписи (rotation/quorum), safe-hints, ошибки TAB/attachment hash mismatch/external relation, JSON round-trip placeholder. |
| 45 | +- 🔄 В работе: pack/unpack, валидация тегов, внешние дескрипторы, Registry для публичного обмена. |
| 46 | +- 🎯 Цель квартала: расширить негативные сценарии и протокол аудита конвертеров. |
34 | 47 |
|
35 | 48 | ## Contributing |
36 | | - |
37 | | -- Extend the specification via `docs/context_spec_1_2.md` (include Annex references when adding new constructs). |
38 | | -- Update the golden suite whenever specification changes introduce new behaviour. |
39 | | -- Keep the documentation (spec, testing guide, AGENTS index) consistent with code changes. |
40 | | - |
41 | | -## Status |
42 | | - |
43 | | -The current golden suite covers: resolver metadata, chunk payloads, TTL policies, confidence models, signatures (rotation and quorum), safe-hints, negative error scenarios (TAB, attachment hash mismatch, external relation without resolver), and JSON round-trip placeholder. Remaining matrix items (pack/unpack, tag validation, external descriptor verification) are slated for future iterations. |
| 49 | +- Следуй `AGENTS.md` и Flagship-стандарту: 0 mocks, покрытие ≥85%, cyclomatic ≤10. |
| 50 | +- Каждый PR сопровождается design brief + evidence (лог тестов, ссылки на ADR). |
| 51 | +- Обсуждения и вопросы — в GitHub Discussions организации. |
| 52 | + |
| 53 | +## Support |
| 54 | +- Issues: предпочитаемые вопросы/доработки. |
| 55 | +- Контакт: magraytlinov@gmail.com — core-команда отвечает в течение 24 часов будних дней. |
| 56 | +- Репозиторий `Context` закреплён на главной странице Modular Intellegence Systems как обязательный вход в модульную экосистему. |
0 commit comments