Rewrote main.cpp from Step 12 scaffold to full editor shell. Added tree-sitter
linking to whetstone_editor target. Fixed WMOD_ prefix to avoid Windows SDK
MOD_SHIFT/MOD_ALT macro conflicts. Editor now has editable text area, live AST
view, syntax-highlighted preview, generated code tab, find/replace, keybinding
profile selector, and status bar.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement TextASTSync and TextEditor — the core text editing layer
that bridges raw text and the structured AST. TextASTSync provides
bidirectional text-AST sync with debounce via TreeSitterParser and
generators. TextEditor wraps a text buffer with edit operations,
undo/redo that tracks AST state, find/replace, and selection.
New files: TextASTSync.h, TextEditor.h, step50_test.cpp
Updated: step51/53 tests (replaced stubs with real includes),
CMakeLists.txt (tree-sitter linking), PROGRESS.md
Fixed: step53 find-position off-by-one, canRedo assert logic
19/19 tests pass (step50: 8, step51: 5, step53: 6)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace TreeSitterParser stubs with real tree-sitter C bindings for
Python, C++, and Elisp parsing. Add tree-sitter core via vcpkg and
language grammars via FetchContent. Implement CST-to-AST converters
with auto-annotation, memory pattern detection, error recovery, and
ParseResult/ParseDiagnostic types. All 34 tests pass (6+7+6+8+7).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Implement ASTQueryAPI class with tree walking, JSON output,
findNodesByType, findNodesByProperty, findNodesWithAnnotation
- Add nlohmann_json link for step60_test in CMakeLists.txt
- Add PROGRESS.md for cross-session continuity tracking
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The JsonRpcClient was reading from stdin on startup, blocking forever
when no orchestrator process was piped in. Now defaults to disconnected
state and skips RPC calls, falling back to sample content.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests IncrementalOptimizer: transforms recorded in history, undoLast
restores original AST, undo specific transform by ID while keeping
others, and provenance tracking (node knows which transform created it).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests TransformEngine: constant folding (3+4->7), dead code elimination
after return, OptimizationLock produces warning but doesn't block, and
no-op when nothing to transform. Defines TransformEngine interface.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests MemoryStrategyInference: Python->@Reclaim(Tracing), C++ gets
suggestions, inference does NOT auto-apply to AST, suggestions have
confidence scores and reasons, Elisp->@Reclaim(Tracing).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests applySequence: successful batch of 3, failed batch rolls back
all preceding mutations, journal recording, empty batch, and 5-mutation
batch with error at step 3 rolling back all 5.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests getInScopeSymbols with nested scoping (inner sees outer, not
vice versa), getCallHierarchy for caller/callee tracking, and
getDependencyGraph for data flow. Defines ContextAPI interface.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests ASTQueryAPI: getAST returns JSON, findNodesByType for Functions/
Parameters/VariableReferences, findNodesByProperty by name,
findNodesWithAnnotation, and getSubtree with depth limit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests ElispCommandBuilder for escaping, findFile/saveBuffer Elisp
generation, paths with spaces, and EmacsConnection daemon management
with ensureDaemon and error handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests text undo/redo with bidirectional AST sync, find/replaceAll,
selection, and verifies AST stays consistent through edit operations.
Defines TextEditor interface.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests bidirectional sync: text->parse->AST, AST mutation->text regen,
round-trip preservation, debounce coalescing of rapid edits, and
C++ text sync. Defines TextASTSync interface.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests parseElisp() with defun parsing, parameter extraction, BinaryOperation
from (+ x 1), auto-annotation with @Reclaim(Tracing), and cross-language
equivalence with Python AST output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests parseCpp() produces real AST: Function with name and return type,
typed Parameters, and memory pattern detection: unique_ptr->@Lifetime(RAII),
shared_ptr->@Owner(Shared_ARC), raw new/delete->@Deallocate(Explicit).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests parsePython() produces real AST: Function with name, Parameters,
Return with BinaryOperation, and auto-annotation with @Reclaim(Tracing).
Tests multiple functions parsed. Will fail until real tree-sitter-python
replaces the placeholder stub.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests BinaryOperation, UnaryOperation, VariableReference, all literals
(int, float, string, bool, null->nullptr), FunctionCall, and nested
expression parenthesization for CppGenerator.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests Assignment, Return, IfStatement, WhileLoop, ForLoop produce
correct C++ syntax with semicolons, braces, and parentheses.
Verifies no Python syntax leaks through.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests CppGenerator inherits ProjectionGenerator, generates namespace
from Module, produces C++ function signatures with types and braces,
and does NOT emit Python syntax. Will fail to compile until
CppGenerator is implemented.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Sprint 3 plan (37 steps, global 39-75) with canonical memory annotations,
test quality requirements, global step numbering, and Sprint 2 overlap notes
- Refactor all docs to use canonical annotation families (@Deallocate, @Lifetime,
@Reclaim, @Owner, @Allocate) replacing simplified @deref 4-strategy system
- Replace @perf with canonical @Hot/@Cold, @Inline, @Pure from annotations/6 optimization
- Replace @memory-footprint, @execution-mode, @deref-explicit with canonical equivalents
- Update REQUIREMENTS_OVERVIEW, SPRINT_1_REQUIREMENTS, SPRINT_2_PLAN, SPRINT_2_VISION,
C++ Implementation Roadmap, example files, and progress report
- Remove duplicate bonus steps 41-42, consolidate Phase 3h from 7 to 4 steps
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>