Canopy開発日誌-2025年12月〜2026年2月
2025年12月26日のプロトタイプ開始から、2026年2月末までのCanopy開発ログ。3ヶ月を1記事にまとめている。
Canopyは、テキストとプログラムの構造を同じ空間で直接編集できる、次世代のコードエディタです。ソースコードを文字列ではなく「構造」として扱うことで、安全なリファクタリングやAIとの協調作業、CRDTによる複数人同時編集を実現しています。
この時期のCanopyはまだ単一リポジトリで、CRDTの実験から始まり、構造編集(projectional editing)、branch・version vector・event-graph-walkerのCRDT基盤、Reactデモ、そして2月末のmonorepo化へと移り変わっていった。後に独立リポジトリとなるloom、incr、js_engine、moondspも、この時期にはCanopy内または並行して既に動き出している。
この期間の大きな流れ
- 2025年12月: CRDT実験として始まる。FugueMaxアルゴリズム、editor、merge、parser、incremental parser、parser-editor連携の原型を3日間で作った。
- 2026年1月: CRDTの本格化。branchシステム、version vector、event-graph-walkerの抽出、projectional editing(構造編集)のPhase 1〜3、vite-plugin-moonbit、React協調編集デモ、CRDTの形式仕様とRLE実装。
- 2026年2月: monorepo化とCI/CD整備。git submoduleによる分割、LCSベースのAST children reconciliation、UndoManager統合、品質検証workflow。
- 周辺リポジトリ: incrは2月にbatch rollback、subscriber links、TrackedCell、docs整備を進めた。js_engineはこの3ヶ月で約480コミットと非常に活発だった。
2025/12/26
Canopy / プロトタイプ開始
CRDT実験としてCanopyが始まった。初日はFugueMaxアルゴリズム、merge algorithm、editor、public APIを作り、baseline CRDT implementationを完成させた。後にCanopyの文書モデルとなるCRDTの核がこの日からある。
主なコミット: create crdt experiment, create FugueMax algorithm, implement merge algorithm, create editor, create public api, finish base line crdt implementation
2025/12/27
Canopy / parserとCRDTの統合
1日目のCRDTに続き、incremental parser、error recovery、parser-editor integration plan、benchmarks、crdt integrationを追加した。event-graph-walkerの前身となるwalkerやbranchの概念もこのあたりから動き出している。
Web editorの原型も追加されたが、まだ「integration with bug」のような動作確認段階。
主なコミット: add parser and start implementation, implement incremental parser, add Error Recovery, add crdt intergration, create parser editor intergration plan, create benchmarks for parser, implement integration with bug, add simple web editor
2025/12/28
Canopy / Lezer-style incremental parsing
Lezer形式のincremental reparsingを実装し、structural validationを加えた。Web appのfixも入り、年末3日間でCRDT + incremental parser + web editorの骨格ができた。
主なコミット: add lezer style incremental_reparse, improve incremental_reparse, implement Lezer-style incremental parsing with structural validation, fix web app
2026/1/4
Canopy / リファクタリングとドキュメント
年末の急造コードを整理。parser向けのドキュメント作成、重複修正、シリアライズ・キャッシュエラー修正、build設定更新を行った。
主なコミット: Start refactoring, create documentations for parser, finish priority 1, Priority 2: Fix Duplication, fix serialization and cache errors, update build configuration, update readme and index.html
2026/1/5
Canopy / branchとEvent Graph Walker
branchシステムとEvent Graph Walkerの実装。これは後にevent-graph-walkerサブモジュールへ独立するCRDT操作追跡機構の原型。
主なコミット: Implement branch system for efficient document snapshots and incremental updates, Implement Event Graph Walker and associated functionality
2026/1/7
Canopy / WebSocket signaling server
CRDT協調編集のためのWebSocket signaling serverをDurable Objectsで実装。branch機能の拡張も並行して進めた。
主なコミット: Add WebSocket signaling server with Durable Objects and deployment guides, Implement WebSocket signaling server for CRDT collaboration, Enhance branch functionality with new methods and improve merge operations
2026/1/8
Canopy / Version Vector
ネットワーク同期向けにVersion Vectorを導入。Frontier型を使った一貫性のあるversion比較、operator overloadingでの比較、JSONパースのFromJson trait化などを行った。CRDTがローカル編集だけでなく協調編集を意識し始めた。
主なコミット: Enhance CRDT with Version Vector support, Refactor JSON parsing in parse_ops_from_json using FromJson trait, Refactor VersionVector to use operator overloading for comparison and update tests, replace frontier with version_vector in NetworkSync
parser
Lambda Calculus Parserのproperty-based test追加、ASTNode kind typeのstring/array両対応。
主なコミット: Add property-based tests for Lambda Calculus Parser, Update ASTNode kind type to support both string and array formats
2026/1/9
Canopy / CRDT performance
walker algorithmの線形スケーリング強化、performance optimization roadmap、CRDT component(version vectors, walkers, merges, oplogs)のbenchmark追加。
主なコミット: Add benchmarks for CRDT components: version vectors, walkers, merges, and oplogs, Update performance analysis and outline future optimization opportunities, Update implementation status and test count in documentation
2026/1/11
Canopy / graphvizとparser error handling
moon-examplesからgraphvizパッケージを追加。parserとlexerのerror handlingをリファクタリング。
主なコミット: Add graphviz package from moon-examples, Refactor error handling in parser and lexer; update .gitignore
2026/1/12
Canopy / event-graph-walker抽出とCRDT document model
event-graph-walkerを再利用可能なCRDTライブラリとしてmodule化。CRDT document modelをeditorへ統合し、branch systemのmerge algorithmとbenchmarksも追加。Reactデモ向けのnetwork panelやeditor stylingも入った。
主なコミット: create event-graph-walker Module as Reusable CRDT Library, Add README.md for event-graph-walker, Add CRDT document model and integrate with editor, Implement merge algorithm and benchmarks for branch system, Add responsive network panel styles and collaboration controls, Refactor AST display logic in LambdaEditor
2026/1/13
Canopy / vite-plugin-moonbitとドキュメント整理
vite-plugin-moonbitを作成。MoonBitのJSビルドとViteのHMRを連携させ、開発体験を改善。Claude skill for documentation、ドキュメント再編も行った。
主なコミット: make vite plugin for moonbit to automate js intergration, Use HMR for vite-plugin-moonbit, obviating the need of sparated moon build, Add claude skill for documentation, Documentation reorganization
2026/1/15
Canopy / valtio FFI
React状態管理向けにvaltioのJS FFIを追加し、egwalkerとの統合を進めた。
主なコミット: Add valtio js ffi for moonbit, create integration with valtio and egwalker
2026/1/16
Canopy / Projectional Editing計画
構造編集(projectional editing)のアーキテクチャ計画を作成。rangeとdamageの分離も行い、後のAST編集操作へ繋げた。
主なコミット: Create Projectional Editing Architecture Plan, separate range from damage
2026/1/17
Canopy / Projectional Editing Phase 2
構造編集の実装へ。CanonicalModel、SourceMap、interactive tree editorを追加し、AST editing operations(Phase 2)を実装。tree operationsの網羅的edge case test、CRDT stack全体のstructured errorsも追加した。
主なコミット: Add projectional editing components including CanonicalModel, SourceMap, and interactive tree editor with associated tests, Implement Phase 2: AST editing operations for projectional editing, Add CST-aware projection plan details, Add structured errors across CRDT stack, Add RawVersion frontier handling for network sync
2026/1/18
Canopy / リファクタリングとlens
Fugue/treeのtrait化、Version Vectorとfrontierのtuple struct化、TreeEditorStateのimmutable hashset化、lens abstraction(双方向変換)の導入。PROJECTIONAL_EDITING.mdをPhase 3進捗に更新。
主なコミット: introduce lens abstractions for bidirectional transformations, use trait and make private some methods for fugue, Use tuple struct for version vector, use tuple struct for frontier, use immutable hashset for TreeEditorState, update PROJECTIONAL_EDITING.md with Phase 3 progress and integration layer plan
2026/1/19
Canopy / SVG DSL
type-safeなSVG DSL moduleを追加し、graphvizを含む可視化周りを整理。
主なコミット: add type-safe SVG DSL module, use new svg dsl, add README.md for svg-dsl
2026/1/21
Canopy / React協調編集デモ
Reactによる協調編集demoを実装し、Playwrightテストフレームワークを導入。
主なコミット: Implement collaborative editing demo by React, Enhance demo-react setup with Playwright testing framework
2026/1/22
Canopy / demo-reactの性能・UX改善
demo-reactにWebSocket sync supportを追加し、協調編集の性能とUXを改善。
主なコミット: add WebSocket sync support and improve collaboration, high priority performance and UX improvements
2026/1/23
Canopy / editorとevent-graph-walker API
DocumentからTextDocへの移行、editor機能強化、event-graph-walkerのuser-friendly API完成。valtioのtest/synchronization featuresも追加。
主なコミット: transition from Document to TextDoc and enhance editor functionalities, implement user-friendly API with error handling and sync features, finalize user-friendly API implementation and enhance documentation, add testing and synchronization features to valtio
2026/1/24-25
Canopy / RLE(Run-Length Encoding)
trait-basedなRLEの設計計画を作成し、Phase 2実装を進めた。TextSpanをRLEとtombstone supportで統合、RLE vector、cursor and operations、performance benchmarksを追加。
主なコミット: add RLE design plan documentation for trait-based run-length encoding implementation, complete Phase 2 of RLE implementation with cursor and operations, implement RLE vector with error handling and performance optimizations, integrate TextSpan for RLE with tombstone support and enhance traversal
2026/1/26
Canopy / RLE完成とerror handling
RLE設計をcausal/visible lengthsベースに整理。error handling強化、package imports更新、changelog management skill追加。
主なコミット: update RLE design to use causal and visible lengths, introduce changelog management skill and enhance RLE error handling, update RLE dependencies and introduce new RLE structures
2026/1/29
Canopy / CRDT形式仕様とproperty tests
eg-walker CRDTの形式仕様、system overview、responsibility mapを文書化。FugueTreeのproperty tests追加。
主なコミット: add formal specification for eg-walker CRDT system, expand formal specification with system overview and responsibility map, add property tests for FugueTree functionality, update SKILL.md with MoonBit package versioning guidelines
2026/1/31
Canopy / monorepo化
大きな転換点。単一リポジトリからgit submoduleを使ったmonorepoへ再編。event-graph-walker、graphviz、parser、svg-dsl、valtioをsubmodule化。各package README更新、.mbti再生成、build deployment script追加、monorepo workflow guide作成。
主なコミット: restructure as monorepo with git submodules, remove directories that will become submodules, update all package READMEs for monorepo structure, regenerate .mbti interface files, add build deployment script and corresponding npm script, add monorepo and git submodule workflow guide
Canopy / LCS reconciliation
monorepo化と並行して、AST children reconciliationにLCSアルゴリズムを採用。
主なコミット: use LCS algorithm for AST children reconciliation
2026/2/1
Canopy / monorepo安定化とCI導入
CRDTとeditorをcore operationsベースに整理。comprehensive CI/CD infrastructureを追加し、 redundant MoonBit buildをskipする最適化、Undelete operation loggingをdemo/REPLに追加。submodule pointer更新も複数回行われた。
主なコミット: update CRDT and editor to use core operations, add comprehensive CI/CD infrastructure, optimize CI to skip redundant MoonBit builds, add Undelete operation logging to demo and REPL commands
2026/2/2
Canopy / UndoManager統合とdemo-react整理
event-graph-walkerのUndoManagerをcrdt moduleに統合。demo-reactをfeatures patternに再編し、useEgWalker hookを導入。
主なコミット: integrate event-graph-walker UndoManager into crdt module, reorganize demo-react into features pattern with useEgWalker hook
2026/2/6
Canopy / MoonBit品質検証workflow
development guideにMoonBit quality verification workflowを追加。
主なコミット: add MoonBit quality verification workflow to development guide
incr
2月はincrも活発。batch rollback、subscriber links、TrackedCell、API docs整備が進んだ。v0.3.1/v0.3.2リリースもこの時期。
主なコミット: add graceful batch rollback and non-panicking read APIs, add subscribers to CellInfo, add Runtime::dependents introspection API, add TrackedCell struct as a named wrapper around Signal, add MemoMap keyed queries and docs, docs: update design.md and api-reference.md for cells/ rename
作業運用メモ
この3ヶ月はCanopyの原型が作られた期間。CRDT実験から構造編集、協調編集デモ、monorepo化まで、後のCanopyの方向性を決定づける大きな動きが連続した。特に1月末のmonorepo化は、後にloom/incr/js_engine/moondspが独立リポジトリへと発展する前提となった。