Repository navigation
Description
Summary
Update documentation to reflect the edge-based sibling ordering architecture implemented in Issue #614. Currently, 115 references to the deprecated before_sibling_id field exist across 24 documentation files.
Context
PR #616 successfully removed the before_sibling_id field from the data model and migrated to edge-based fractional ordering using the has_child edge order field. All code and tests have been updated, but documentation files still reference the old architecture.
Code Status: ✅ Complete (all tests passing)
Documentation Status:
Affected Files (24 files, 115 references)
Architecture Documentation
docs/architecture/core/system-overview.mddocs/architecture/core/technology-stack.mddocs/architecture/components/data-storage.mddocs/architecture/persistence-layer.mddocs/architecture/dependency-based-persistence.mddocs/architecture/elegant-persistence-solution.md
Business Logic Documentation
docs/architecture/business-logic/database-schema.mddocs/architecture/business-logic/mcp-integration.mddocs/architecture/business-logic/node-behavior-system.mddocs/architecture/business-logic/overview.md
Data Layer Documentation
docs/architecture/data/surrealdb-schema-design.mddocs/architecture/data/sync-protocol.mddocs/architecture/data/optimistic-concurrency-control.mddocs/architecture/data/archived/storage-architecture-turso.mddocs/architecture/data/archived/README.md
Development Documentation
docs/architecture/development/hierarchy-reactivity-architecture-review.mddocs/architecture/development/persistence-coordinator-patterns.mddocs/architecture/development/standards/identifier-naming-conventions.md
Testing Documentation
docs/architecture/testing/http-dev-server.mddocs/architecture/testing/persistence-testing-strategy.mddocs/architecture/persistence/archived/persistence-system-review.mddocs/architecture/persistence/archived/persistence-testing-strategy.mddocs/architecture/persistence/archived/refactoring-plan.md
Decision Records
docs/architecture/decisions/adr-core-logic-migration-strategy.md
Tasks
1. Update Schema Examples
OLD (deprecated):
interface Node {
id: string;
before_sibling_id: string | null; // ❌ Field removed
}NEW (current architecture):
-- Sibling ordering stored in has_child edge order field (fractional ordering)
CREATE node:example CONTENT {
id: 'example',
content: 'Hello',
// NO before_sibling_id - structure lives in edges!
};
-- Ordering is on the relationship, not the node
RELATE parent:A->has_child->node:B SET order = 0.5;2. Update Code Examples
OLD:
pub struct Node {
pub before_sibling_id: Option<String>, // ❌ Removed
}NEW:
// API parameter for specifying insertion point
pub struct CreateNodeParams {
pub insert_after: Option<String>, // ✅ "Insert after this node" (None = beginning)
}
// Data model - NO ordering field (derived from edges)
pub struct Node {
pub id: String,
pub content: String,
// Ordering not stored on node - lives in has_child edges
}3. Add Migration Notes
Add deprecation notices to relevant sections:
**DEPRECATED (Issue #614)**: The `before_sibling_id` field was removed in favor of edge-based ordering.
**Migration Path**:
- **Old**: `node.before_sibling_id` field stored sibling order
- **New**: `has_child` edge `order` field uses fractional ordering
- **API**: Use `insert_after` parameter to specify insertion point
See PR #616 for implementation details.4. Update Architecture Diagrams
If any diagrams show before_sibling_id in the data model, update them to show:
- Edge-based ordering
- Fractional order values on edges
- Clear separation between API parameters and data model
5. Update Specific Documentation Sections
docs/architecture/data/surrealdb-schema-design.md
- Remove
before_sibling_idfrom schema examples - Explain fractional ordering on edges
- Document the
has_child.orderfield
docs/architecture/development/hierarchy-reactivity-architecture-review.md
- This file contains the architectural analysis that led to Issue Complete before_sibling_id removal - use has_child edge ordering #614
- Add completion notes showing the migration was successful
- Reference PR Complete before_sibling_id removal - use has_child edge ordering #616 for final implementation
docs/architecture/decisions/adr-core-logic-migration-strategy.md
- Update ADR to reflect the completed migration
- Document the decision to use edge-based ordering
- Reference Issue Complete before_sibling_id removal - use has_child edge ordering #614 and PR Complete before_sibling_id removal - use has_child edge ordering #616
Acceptance Criteria
- All 115 references to
before_sibling_id/beforeSiblingIdupdated or removed - Schema examples show edge-based ordering
- Code examples use
insert_afterAPI parameter - Migration notes added to relevant sections
- Architecture diagrams updated (if applicable)
- Documentation accurately reflects current implementation (as of PR Complete before_sibling_id removal - use has_child edge ordering #616)
- Run verification:
grep -r "before_sibling_id\|beforeSiblingId" docs/ --include="*.md"returns 0 results (except in migration notes/deprecation warnings)
Priority
Low - This is a documentation cleanup task. The code is correct and all tests pass. Outdated documentation doesn't block development or cause runtime issues.
Related Issues
- Complete before_sibling_id removal - use has_child edge ordering #614 - Remove before_sibling_id field from data model (completed)
- PR Complete before_sibling_id removal - use has_child edge ordering #616 - Implementation that removed the field
Notes
- This is purely a documentation task - no code changes required
- Focus on accuracy and clarity for future developers
- Consider adding examples showing the new edge-based ordering in action
- Archived documentation files can optionally be updated or left as historical reference
Activity
Update documentation to reflect edge-based sibling ordering
Update documentation to reflect edge-based sibling ordering (#620)
Update documentation to reflect edge-based sibling ordering (#620)
Refactor tree loading to use efficient adjacency list strategy (#632)
Update documentation to reflect edge-based sibling ordering (#620)
Refactor tree loading to use efficient adjacency list strategy (#632)
Update documentation to reflect edge-based sibling ordering (#620)
Refactor tree loading to use efficient adjacency list strategy (#632)
Refactor tree loading to use efficient adjacency list strategy (#632)