Initial SFERA platform baseline
This commit is contained in:
@@ -0,0 +1,167 @@
|
||||
# SFERA Completion Plan
|
||||
|
||||
Дата аудита: 2026-05-10.
|
||||
|
||||
Этот план фиксирует путь к завершению SFERA как продукта. Он не подменяет
|
||||
`IMPLEMENTATION_ORDER.md`, а добавляет проверяемые критерии готовности и текущий статус.
|
||||
|
||||
## Текущее состояние
|
||||
|
||||
SFERA уже содержит рабочий backend/API, Rust BSL parser, SIR, semantic kernel,
|
||||
projection/incremental контур, runtime/governance/knowledge/collaboration пакеты и Next.js IDE.
|
||||
|
||||
Текущая проверенная база:
|
||||
|
||||
- Python/API tests: `161 passed`.
|
||||
- Rust tests: `14 passed`.
|
||||
- Frontend `typecheck`: passed.
|
||||
- Frontend production `next build`: passed.
|
||||
- Editor smoke: passed.
|
||||
- Editor runtime smoke: passed.
|
||||
|
||||
## Definition Of Done
|
||||
|
||||
Проект считается завершённым для production-ready milestone, когда выполнены все пункты:
|
||||
|
||||
1. Все фазы из `IMPLEMENTATION_ORDER.md` имеют deterministic implementation без placeholder/stub.
|
||||
2. Все parser bugs покрыты golden fixtures.
|
||||
3. SIR snapshot validates для BSL/XML metadata projects.
|
||||
4. Projection and incremental update pass against in-memory and Neo4j-compatible contracts.
|
||||
5. API exposes project, semantic, governance, knowledge, collaboration and IDE workflows.
|
||||
6. Frontend builds production bundle and passes editor smoke/runtime checks.
|
||||
7. Stand runbook is executable on local/NAS and shared Docker host.
|
||||
8. A single verification command can reproduce core/backend/Rust/frontend checks.
|
||||
|
||||
## Phase Plan
|
||||
|
||||
### Phase 1 — Semantic Core
|
||||
|
||||
Status: mostly complete.
|
||||
|
||||
Completed:
|
||||
|
||||
- `packages/sir`.
|
||||
- `rust/crates/bsl-parser`.
|
||||
- Rust `query-parser` foundation.
|
||||
- Rust `semantic-engine` foundation.
|
||||
- `packages/semantic-kernel`.
|
||||
- `packages/projection-engine`.
|
||||
- `packages/incremental-indexer`.
|
||||
- Golden fixtures for mixed RU/EN syntax, calls, queries, writes, object writes and recordset writes.
|
||||
- Same-module routine resolution priority for duplicate routine names.
|
||||
- SIR diagnostics for malformed BSL routine/query boundaries.
|
||||
- Incremental diagnostic refresh for changed BSL fragments.
|
||||
- Routine `Экспорт` / `Export` flags preserved in SIR node attributes.
|
||||
- BSL control-flow fixture for calls/writes inside loops and try/except blocks.
|
||||
- Form event handler links from XML metadata to BSL routines.
|
||||
|
||||
Remaining:
|
||||
|
||||
- Keep parser and XML fixtures expanding as new 1C export patterns are encountered.
|
||||
|
||||
### Phase 2 — Object Runtime
|
||||
|
||||
Status: implemented with tests, needs broader fixtures.
|
||||
|
||||
Completed:
|
||||
|
||||
- XML metadata fixtures preserve register dimensions/resources as SIR attributes.
|
||||
- Semantic versioning classifies object rename/move/update changes.
|
||||
- Object impact includes form event handlers and their register writes.
|
||||
- XML fixtures cover child-element forms, commands and role rights.
|
||||
- Query intelligence reports register read/write dependencies.
|
||||
- Transaction topology groups routines by written register target.
|
||||
- Object impact can include scheduled-job integration endpoints from the owning module.
|
||||
|
||||
Remaining:
|
||||
|
||||
- Add more impact/review fixtures for object-level dependency edge cases as new patterns are found.
|
||||
|
||||
### Phase 3 — Runtime Intelligence
|
||||
|
||||
Status: implemented with tests, needs integration depth.
|
||||
|
||||
Remaining:
|
||||
|
||||
- Expand transaction/query intelligence with register movement patterns.
|
||||
- Connect UI semantics to editor panels and review findings.
|
||||
- Add scheduled job and integration cross-links to impact reports.
|
||||
|
||||
### Phase 4 — Knowledge System
|
||||
|
||||
Status: implemented with tests.
|
||||
|
||||
Remaining:
|
||||
|
||||
- Add import fixtures for larger BSP/vendor packs.
|
||||
- Add coverage reports by metadata subtree.
|
||||
|
||||
### Phase 5 — Collaboration
|
||||
|
||||
Status: implemented with tests.
|
||||
|
||||
Remaining:
|
||||
|
||||
- Enforce task/session binding for mutations outside Phase 1 placeholders.
|
||||
- Add UI flow coverage for comments/ownership/activity.
|
||||
|
||||
### Phase 6 — Governance/Operations
|
||||
|
||||
Status: implemented with tests.
|
||||
|
||||
Remaining:
|
||||
|
||||
- Verify full stand runbook on `test-docker`.
|
||||
- Add backup/restore and migration smoke checks.
|
||||
|
||||
### Phase 7 — 1C IDE / Authoring
|
||||
|
||||
Status: working Next.js IDE exists and passes smoke; advanced authoring remains product work.
|
||||
|
||||
Completed:
|
||||
|
||||
- Backend and typed frontend API client for symbol search, go to definition and find references.
|
||||
|
||||
Remaining:
|
||||
|
||||
- Wire editor actions for go to definition, find references and symbol search into IDE panels.
|
||||
- Complete semantic autocomplete from SIR + metadata context.
|
||||
- Complete guarded apply with preview, semantic diff, impact, review, RBAC/privacy and version record.
|
||||
- Complete object/form/report designer flows.
|
||||
- Add browser smoke for key authoring flows.
|
||||
|
||||
### AI Layer
|
||||
|
||||
Status: intentionally gated until semantic truth is stronger.
|
||||
|
||||
Remaining:
|
||||
|
||||
- Add answer/generation policy enforcement to every AI-facing endpoint.
|
||||
- Add prompt/context builders over SIR, metadata, knowledge, privacy and task/session.
|
||||
- Add preview-only AI code generation and guarded apply workflow.
|
||||
|
||||
## Execution Order From Here
|
||||
|
||||
1. Keep all current green checks green with `scripts/check_all.ps1`.
|
||||
2. Finish Phase 1 hardening fixtures and diagnostics.
|
||||
3. Expand Phase 2/3 fixtures around metadata, impact, query and runtime topology.
|
||||
4. Finish guarded apply and object-level authoring API.
|
||||
5. Finish IDE authoring UI and smoke coverage.
|
||||
6. Add AI pair-programmer only after guarded apply is deterministic.
|
||||
7. Verify full stand on local/NAS and shared Docker host.
|
||||
|
||||
## Verification
|
||||
|
||||
Use:
|
||||
|
||||
```powershell
|
||||
.\scripts\check_all.ps1
|
||||
```
|
||||
|
||||
Expected checks:
|
||||
|
||||
- `cargo test && cargo build -p bsl-parser`
|
||||
- `uv run pytest`
|
||||
- `npm run typecheck`
|
||||
- `next build`
|
||||
- optional frontend smoke checks when API/frontend stand is running.
|
||||
@@ -0,0 +1,123 @@
|
||||
# Реальный порядок реализации
|
||||
|
||||
## Phase 1 — Semantic Core
|
||||
|
||||
1. `packages/sir`
|
||||
2. `rust/crates/bsl-parser`
|
||||
- deterministic BSL parser;
|
||||
- JSON CLI contract for Python semantic-kernel integration.
|
||||
3. `packages/semantic-kernel`
|
||||
- current Python parser remains compatible;
|
||||
- consumes Rust parser JSON as canonical BSL parse source when the CLI is configured or auto-discovered;
|
||||
- metadata object to BSL module links via `CONTAINS`.
|
||||
4. `packages/projection-engine`
|
||||
5. `packages/incremental-indexer`
|
||||
|
||||
## Phase 2 — Object Runtime
|
||||
|
||||
1. `packages/one-c-normalizer`
|
||||
- BSL source normalization;
|
||||
- XML metadata extraction for core 1C objects.
|
||||
2. `packages/semantic-versioning`
|
||||
3. `packages/semantic-search`
|
||||
4. `packages/impact-engine`
|
||||
5. `packages/review-engine`
|
||||
|
||||
## Phase 3 — Runtime Intelligence
|
||||
|
||||
1. `runtime-overlays`
|
||||
2. `transaction-topology`
|
||||
3. `query-intelligence`
|
||||
4. `ui-semantics`
|
||||
5. `integration-topology`
|
||||
6. `job-topology`
|
||||
|
||||
## Phase 4 — Knowledge System
|
||||
|
||||
1. global/workspace/project knowledge; ✅
|
||||
2. BSP/vendor docs; ✅
|
||||
3. pattern mining; ✅
|
||||
4. knowledge coverage; ✅
|
||||
5. AI answer policy. ✅
|
||||
|
||||
## Phase 5 — Collaboration
|
||||
|
||||
1. users/workspaces/projects; ✅
|
||||
2. tasks/sessions; ✅
|
||||
3. comments/discussions; ✅
|
||||
4. activity feed; ✅
|
||||
5. ownership. ✅
|
||||
|
||||
## Phase 6 — Governance/Operations
|
||||
|
||||
RBAC ✅, privacy ✅, AI usage ✅, jobs ✅, observability ✅, reports ✅, marketplace ✅, licensing ✅, admin ✅.
|
||||
|
||||
## Phase 7 — 1C IDE / Authoring
|
||||
|
||||
Reference workflow: берём лучшие рабочие паттерны 1С Конфигуратора, но реализуем их как современную AI IDE. Обязательны дерево конфигурации, вкладки открытых объектов, режимы модуль/форма/свойства/события, инспектор, нижние панели проблем/output/diff и быстрый поиск. Дополнительно SFERA должна объединять версии, документацию, знания, обучение, audit и guarded apply.
|
||||
|
||||
1. BSL editor foundation:
|
||||
- syntax highlighting;
|
||||
- diagnostics;
|
||||
- outline;
|
||||
- go to definition;
|
||||
- find references;
|
||||
- symbol search.
|
||||
2. Semantic autocomplete:
|
||||
- current procedure/function context;
|
||||
- local variables and parameters;
|
||||
- object attributes;
|
||||
- tabular sections and columns;
|
||||
- form elements and commands;
|
||||
- known 1C platform APIs;
|
||||
- mixed Russian/English 1C syntax.
|
||||
3. AI pair programmer:
|
||||
- code continuation;
|
||||
- procedure/function generation;
|
||||
- query generation;
|
||||
- register movement generation;
|
||||
- command/form handler generation;
|
||||
- explanation of proposed code.
|
||||
4. 1C object designer:
|
||||
- create/update document/catalog/register/common module metadata;
|
||||
- create/update attributes and tabular sections;
|
||||
- create/update commands, forms, form elements and reports.
|
||||
5. Semantic diff and guarded apply:
|
||||
- preview every manual or AI change;
|
||||
- impact analysis before apply;
|
||||
- review findings before apply;
|
||||
- privacy/RBAC checks;
|
||||
- object-level version record;
|
||||
- rollback point.
|
||||
6. IDE-grade UX:
|
||||
- editor workspace;
|
||||
- object tree;
|
||||
- mode bar: module/form/properties/events/versions/docs/knowledge/training;
|
||||
- properties inspector;
|
||||
- form/report designer;
|
||||
- terminal/command palette;
|
||||
- AI assistant panel;
|
||||
- problems/references/output panels.
|
||||
|
||||
7. Documentation/knowledge/training inside IDE:
|
||||
- docs linked to objects, forms, reports, events and routines;
|
||||
- project/vendor/BSP knowledge available next to the code;
|
||||
- team patterns, decisions and examples surfaced by current context;
|
||||
- learning hints for the selected object and available variables;
|
||||
- search across code, metadata, docs, versions and discussions.
|
||||
|
||||
## Frontend/UI Gate
|
||||
|
||||
Перед началом UI-этапа перечитать и применить актуальные требования:
|
||||
|
||||
- `docs/design-system.md`
|
||||
- `docs/codex-ui-guidelines.md`
|
||||
- `docs/ui-ux-roadmap.md`
|
||||
- `docs/component-architecture.md`
|
||||
- `docs/frontend-stack.md`
|
||||
- `prompts/system-frontend-architect.md`
|
||||
- `prompts/ui-generation-prompt.md`
|
||||
|
||||
Ключевой принцип: SFERA UI должен ощущаться как современная Enterprise AI IDE / Operating System для 1С, а не legacy CRM. Каждый экран обязан иметь AppShell-compatible layout, loading/error/empty/permission states, адаптивность, права доступа, audit trail для важных действий, таблицы с фильтрами/saved views/bulk actions и AI token/cost impact для AI-действий. Для authoring-экранов обязательны editor/object tree/properties inspector/problems/diff/preview/apply states.
|
||||
|
||||
Язык UI/команд: русский по умолчанию, но каждый пользовательский экран должен иметь выбор английского интерфейса. Команды в интерфейсе также проектируются с русским вариантом по умолчанию и английским вариантом как доступным режимом. 1С-код может смешивать русские и английские ключевые слова в одном тексте; parser/review/UI не должны считать это ошибкой.
|
||||
Reference in New Issue
Block a user