172 lines
6.1 KiB
Markdown
172 lines
6.1 KiB
Markdown
# SFERA Completion Plan
|
|
|
|
Дата аудита: 2026-05-16.
|
|
|
|
Этот план фиксирует путь к завершению 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: `219 passed`.
|
|
- Rust tests: `15 passed`.
|
|
- Frontend `typecheck`: passed.
|
|
- Frontend production `next build`: passed.
|
|
- Editor smoke: passed.
|
|
- Editor runtime smoke: passed.
|
|
- Shared Docker host smoke: passed for API, web, PostgreSQL, Neo4j, Qdrant, Redis and object storage on `test-docker`.
|
|
- Local Git baseline: initialized on branch `main`, first commit `3b845c8`.
|
|
|
|
## 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. Connect the local Git baseline to the canonical Gitea repository on `git.cin.su` after the exact repository path is available.
|
|
2. Keep all current green checks green with `scripts/check_all.ps1`.
|
|
3. Reduce API test/runtime latency so the full Python suite stays comfortably below CI timeout budgets.
|
|
4. Finish Phase 1 hardening fixtures and diagnostics.
|
|
5. Expand Phase 2/3 fixtures around metadata, impact, query and runtime topology.
|
|
6. Finish guarded apply and object-level authoring API.
|
|
7. Finish IDE authoring UI and smoke coverage.
|
|
8. Add AI pair-programmer only after guarded apply is deterministic.
|
|
9. 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.
|