Commit Graph

49 Commits

Author SHA1 Message Date
Bill
e958c778f3 Step 340: C++ Generator — Preprocessor, Enum, Namespace (12/12 tests)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 08:17:50 -07:00
Bill
93d84fd29b Step 339: C++ Parser — Preprocessor, Enum, Namespace (12/12 tests)
Extended CppParser to parse #include, #pragma, #define, enum class/enum,
namespace, using alias, and typedef from tree-sitter CST. Handles all
preprocessor directive types and recursive namespace body parsing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 00:42:26 -07:00
Bill
ca01fc6744 Step 338: EnumDeclaration + NamespaceDeclaration (12/12 tests)
Added EnumDeclaration, EnumMember, NamespaceDeclaration, TypeAlias AST nodes with
full serialization roundtrip and CompactAST support. Enums support scoped/unscoped,
underlying type, member values. Namespaces support nesting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 00:38:34 -07:00
Bill
96799dd51f Step 337: Preprocessor AST Nodes (12/12 tests)
Added IncludeDirective, PragmaDirective, MacroDefinition as first-class AST nodes.
Full serialization roundtrip and CompactAST support. Preprocessor directives are
statement-level nodes with macro bodies kept as unparsed text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 00:36:25 -07:00
Bill
6464c88483 Step 335: C++ Generator — Inheritance + Templates (12/12 tests)
Updated CppGenerator, PythonGenerator, JavaGenerator for multiple inheritance
output using getBases(). C++ emits template prefix + access specifiers + virtual.
Python uses direct multi-base. Java uses extends + implements adaptation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 00:29:54 -07:00
Bill
b75fba72d8 Step 334: C++ Parser — Inheritance + Templates (12/12 tests)
Multiple inheritance with access specifiers and virtual flags from tree-sitter
CST. Template class type parameters, CRTP detection, struct support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 00:24:56 -07:00
Bill
6b2b5bf13b Step 333: Template Class Declarations (12/12 tests)
isClassTemplate/isVariadic serialization, isCRTPClass detection helper,
CompactAST getNodeName for GenericType/TypeParameter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 00:18:56 -07:00
Bill
b1654f0b85 Step 332: Multiple Inheritance in ClassDeclaration (12/12 tests)
BaseClass struct with access specifiers and virtual flags. Backward-compatible
getBases() migration from legacy superClass. Diamond inheritance detection via
BFS. Updated Serialization for baseClasses array roundtrip.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:31:55 -07:00
Bill
0d51a6fe4c Steps 309-319: Sprint 11 Phases 11d-e — Kotlin/C# languages + workflow annotation foundation
Phase 11d (Steps 309-313): Kotlin + C# parsers and generators
- KotlinParser (regex-based): fun, suspend fun, class, data class, val/var
- KotlinGenerator: idiomatic Kotlin output with type mappings
- CSharpParser (regex-based): methods, async, class, interface
- CSharpGenerator: Allman braces, foreach, Task async, LINQ types
- Pipeline integration for both languages, 10 parsers + 10 generators

Phase 11e (Steps 314-319): Workflow annotation foundation
- AnnotationInference: generalized multi-subject inference engine
- Subject 9 routing annotations: ContextWidth, Review, Ambiguity,
  Automatability, Priority, ImplementationStatus
- SkeletonAST: project specification before code exists
- Architect tooling: createSkeleton, addSkeletonNode, getProjectModel,
  inferAnnotations RPCs + 4 MCP tools (42+ total)
- Inference-to-routing bridge: complexity→ambiguity, getter→deterministic
- TrainingDataExporter + TrainingDataGenerator scaffolding

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:50:06 -07:00
Bill
a2a9fe6f97 Step 308: All 8 generators produce language-appropriate output for 9 new AST node types (8/8 tests)
Phase 11c complete (80/80 tests). Added visitor implementations for
ClassDeclaration, InterfaceDeclaration, MethodDeclaration, GenericType,
TypeParameter, AsyncFunction, AwaitExpression, LambdaExpression, and
DecoratorAnnotation to Rust, Go, Java, JavaScript/TypeScript, and Elisp
generators. Each generator emits idiomatic syntax: Rust struct+impl/trait/async fn/.await/|closure|,
Go type struct/interface/func receiver/<-channel/func(), Java class extends/interface/CompletableFuture/(x)->/@annotation,
JS class extends/async function/await/(x)=>/class, Elisp cl-defstruct/cl-defgeneric/cl-defmethod/(lambda).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:08:55 +00:00
Bill
dc462e8941 Step 307: Go + C++ + Elisp parser deepening — struct/interface, class, template, lambda (12/12 tests)
Go: struct → ClassDeclaration, interface → InterfaceDeclaration, method receiver → MethodDeclaration, func literal → LambdaExpression, expression_list unwrapping
C++: class/struct → ClassDeclaration, template → TypeParameter, methods → MethodDeclaration, lambda_expression → LambdaExpression
Elisp: (lambda ...) special_form → LambdaExpression

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 05:22:56 +00:00
Bill
30e718a996 Step 306: JS/TS + Rust parser deepening — class, async, await, arrow/closure, struct, trait, impl (12/12 tests)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 03:34:22 +00:00
Bill
91152e4cf1 Step 305: Python + Java parser deepening — class, async, lambda, decorator, generics (12/12 tests)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:49:09 +00:00
Bill
d3e26d9216 Step 304: Serialization + dispatch for 9 new AST node types — Python + C++ generators (12/12 tests)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 17:11:00 +00:00
Bill
15230df621 Step 303: New AST nodes — AsyncFunction, AwaitExpression, LambdaExpression, DecoratorAnnotation (12/12 tests)
4 modern language construct nodes with full JSON roundtrip serialization.
AsyncFunction extends Function with isAsync flag, AwaitExpression wraps
awaited expressions, LambdaExpression captures variables with captureList,
DecoratorAnnotation models @decorator(args) patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 16:57:10 +00:00
Bill
87615a7187 Steps 297-302: Phase 11b complete + Phase 11c step 302 (68/68 tests)
Phase 11b — Validation & Conflict Completion:
- Step 297: Subject 2-4 validation rules E0600-E0805 (12/12)
- Step 298: Subject 5-8 validation rules E0900-E1202 (12/12)
- Step 299: Cross-type conflict detection, 6 conflict pairs (12/12)
- Step 300: TransformEngineExtended — float folding, dead var, annotation-aware (12/12)
- Step 301: Phase 11b integration tests (8/8)

Phase 11c — Parser Deepening (start):
- Step 302: New AST nodes — ClassDeclaration, InterfaceDeclaration,
  MethodDeclaration, GenericType, TypeParameter with JSON roundtrip (12/12)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 16:53:23 +00:00
Bill
d4a3609050 Steps 290-294: Phase 11a — Semanno format, annotation codegen, visitor dispatch (60/60 tests)
Semanno comment format standard (@semanno:type(key=value)) with emitter/parser
covering all 67+ annotation types. SemannoAnnotationImpl CRTP mixin provides
default visitor implementations for all 56 extended annotation methods across
7 language generators. Virtual inheritance resolves diamond ambiguity between
ProjectionGenerator and SemannoAnnotationImpl.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 18:41:31 +00:00
Bill
ed8618e49f Phase 10e WIP: environment layer core + host boundary nodes
EnvironmentSpec, CapabilityRequirement, HostCall, ScheduleTask, ModuleLoad
classes created. All wired through Serialization.h, CompactAST.h,
SidecarPersistence.h, HeadlessAgentRPCHandler.h (setEnvironment,
getEnvironment, validateEnvironment, getLoweringHints RPCs).
Tests for steps 284-285 written. Steps 286-289 tests remaining.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:41:16 +00:00
Bill
090320f165 Steps 278-283: Phase 10d — shims, optimization, meta-programming & policy annotations (117/117 tests)
- Step 278: Shim/escape hatch — Intrinsic, Raw, CallingConv, Link, Shim, PointerArithmetic, Opaque (25 tests)
- Step 279: Platform/provenance — Target, Feature, Original, Mapping (19 tests)
- Step 280: Optimization completion — TailCall, Loop, Data, Align, Pack, BoundsCheck, Overflow (22 tests)
- Step 281: Meta-programming — Meta, Symbol, Evaluate, Template, Synthetic (20 tests)
- Step 282: Strategy/policy — Policy, Ambiguity, Candidate, Tradeoff, Choice, Decision (22 tests)
- Step 283: Integration tests — FFI workflow, sidecar roundtrip, RPC, taxonomy completeness (9 tests)
- 29 new annotation classes with JSON roundtrip, compact AST, sidecar persistence
- All 58 semantic annotation types recognized across 8 subjects

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:29:43 +00:00
Bill
e2d1872f35 Steps 272-277: Phase 10c — type system, concurrency & scope annotations (68/68 tests)
- Step 272: Type layout/constraints — BitWidth, Endian, Layout, Nullability, Variance (37 tests)
- Step 273: Type identity/mutability — Identity, Mut, TypeState (25 tests)
- Step 274: Concurrency primitives — Atomic, Sync, ThreadModel, MemoryBarrier (25 tests)
- Step 275: Async/error handling — Exec, Blocking, Parallel, Trap, Exception, Panic (36 tests)
- Step 276: Scope/namespace — Binding, Lookup, Capture, Visibility, Namespace, Scope (32 tests)
- Step 277: Integration tests — cross-subject workflows, sidecar roundtrip, RPC (16 tests)
- 24 new annotation classes with JSON roundtrip, compact AST, sidecar persistence
- Generic fallback in getSemanticAnnotations RPC for extensible annotation queries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:15:21 +00:00
Bill
976161dc4a Steps 266-268: Phase 10a — semantic annotation core + sidecar persistence (32/32 tests)
Step 266: 5 semantic annotation AST types (Intent, Complexity, Risk,
Contract, SemanticTag) with JSON roundtrip and compact AST integration.
Step 267: Sidecar AST persistence (.whetstone/<file>.ast.json) with
save/load/list RPC methods, MCP tools, and permission enforcement.
Step 268: Phase 10a integration tests — multi-file sidecar workflow,
all 5 types in compact view, idempotent roundtrip, source isolation.

Also includes Sprint 10 plan, GUI/installer polish, and Emacs integration fixes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 16:01:56 +00:00
Bill
331999ce14 Sprint 6 Step 193: semantic library tags 2026-02-10 02:12:48 -07:00
Bill
08b7d71a38 Step 168: split oversized headers 2026-02-09 21:09:24 -07:00
Bill
b4cf14f3ae Step 151: add Go parser and generator 2026-02-09 19:08:42 -07:00
Bill
7ef0c4a8ad Step 150: add Rust parser and generator 2026-02-09 19:02:07 -07:00
Bill
52b54575ec Step 149: add Java parser and generator 2026-02-09 18:54:52 -07:00
Bill
fa030c0186 Step 148: add JavaScript/TypeScript generator 2026-02-09 18:44:36 -07:00
Bill
94b93e474b Step 147: add JS/TS CST-to-AST parsing 2026-02-09 18:34:39 -07:00
Bill
dcd44d26ed Step 138: type-aware code generation 2026-02-09 17:35:17 -07:00
Bill
1fd567fb20 Step 121: add import/external module AST concepts 2026-02-09 15:00:26 -07:00
Bill
eca19503ae Refactor editor state/utils and split generators 2026-02-09 14:47:51 -07:00
Bill
5fdb21d74d Step 94a: AST source spans 2026-02-09 10:22:13 -07:00
Bill
650e8557ae Phase 3f complete: Advanced Memory Management (Steps 64-67)
Step 64: AnnotationValidator — @Deallocate missing-intent, @Owner(Single) alias detection, parent/child conflict (5/5 tests)
Step 65: MemoryStrategyInference — language defaults, per-function pattern analysis, confidence scores (5/5 tests)
Step 66: CrossLanguageProjector — deep-copy AST projection, annotation-aware CppGenerator (shared_ptr/unique_ptr) (5/5 tests)
Step 67: Optimization annotations — HotCold, Inline, Pure, ConstExpr with C++ attribute generation (9/9 tests)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:57:58 -07:00
Bill
7fb9e89e25 Phase 3e complete: Agent API Extend (Steps 59, 61-63)
Step 59: WebSocketAgentServer with session management, JSON-RPC routing, MockWebSocketTransport (10/10 tests)
Step 61: ASTMutationAPI with setProperty, updateNode, deleteNode, insertNode, journal, OptimizationLock warning (6/6 tests)
Step 62: ContextAPI with getInScopeSymbols, getCallHierarchy, getDependencyGraph (6/6 tests)
Step 63: BatchMutationAPI with atomic applySequence and reverse-order rollback (5/5 tests)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:57:39 -07:00
Bill
41166812b0 Phase 3b: Real tree-sitter integration (Steps 45-49)
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>
2026-02-08 09:06:50 -07:00
Bill
e08fc9e0e0 Add build infrastructure, installer scripts, and fix build errors
- Create vcpkg.json manifest with all editor dependencies
- Create CMakePresets.json for Windows (MSVC) and Linux (GCC)
- Create Inno Setup installer script (setup.iss) with file associations
- Create Windows build helper (build.ps1) with vcpkg auto-install
- Create Linux build/install scripts (build.sh, install.sh)
- Vendor imgui SDL2 backend locally (removed from vcpkg imgui 1.91+)
- Switch CMakeLists.txt from FetchContent to vcpkg find_package
- Fix ElispGenerator missing pure virtual overrides for memory annotations
- Fix Orchestrator::findNodeById const-correctness
- Fix orchestrator_main.cpp loadFile/saveFile type mismatches
- Fix main.cpp SDL_GL_SwapBuffers -> SDL_GL_SwapWindow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:15:50 -07:00
Bill
4515443860 Sprint 2 Step 33: Elisp round-trip 2026-02-07 10:32:35 -07:00
Bill
4ff40064c7 Sprint 2 Step 32: Tree-sitter import integration 2026-02-07 09:44:31 -07:00
Bill
7a943da12d Sprint 2 Step 31: Tree-sitter integration 2026-02-06 23:35:12 -07:00
Bill
767c4557f5 Sprint 2 Step 25: AST ↔ Elisp projection 2026-02-06 22:27:19 -07:00
Bill
f094c14ea7 Sprint 2 Step 11: Python generator - Annotation output 2026-02-06 19:56:57 -07:00
Bill
95c56f35cb Sprint 2 Step 8: Python generator base with Module/Function support 2026-02-06 19:35:48 -07:00
Bill
8ca6eccd56 Sprint 2 Step 7: Schema validation 2026-02-06 19:31:38 -07:00
Bill
665c96b648 Sprint 2 Step 6: JSON deserialization and round-trip verification
fromJson(json) reconstructs heap-allocated AST from JSON. createNode factory
handles all 33 concepts. deleteTree for cleanup. Test verifies save→load→save
produces byte-identical JSON for the full Calculator model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:14:45 -07:00
Bill
5579a4747f Sprint 2 Step 5: JSON serialization with nlohmann/json
toJson(ASTNode*) recursively serializes the AST to JSON with id, concept,
properties, and children structure. Added childRoles() to ASTNode for
enumeration. FetchContent pulls nlohmann/json v3.11.3. Test serializes the
full Calculator model and verifies every node in the JSON output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:11:48 -07:00
Bill
71cd903fa8 Sprint 2 Step 4: annotation concepts (DerefStrategy, OptimizationLock, LangSpecific)
Adds the three annotation types from SemAnno. Test builds SimpleFunctionExample
with @deref(batched), exercises OptimizationLock on Module, LangSpecific on
Variable, and DerefStrategy's derefTime child link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:04:37 -07:00
Bill
25b9d5c480 Sprint 2 Step 3: all Statement, Expression, Type, and Parameter concepts
Ports all 33 SemAnno concepts from MPS into C++ headers grouped by category.
Test builds the exact Calculator model from Phase1Test.mps as a 27-node C++
object graph and verifies every property, child link, and parent chain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:01:35 -07:00
Bill
0f90bec21f Sprint 2 Step 2: child links, Function and Variable concepts
Adds generic child link support to ASTNode (addChild/setChild for multi/single-
valued roles, getChildren/getChild/allChildren for traversal). Function and
Variable as first child concepts of Module. Test builds Module->Function tree,
walks parent/child pointers in both directions, verifies single-valued replace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 18:54:18 -07:00
Bill
586914df4e Sprint 2 Step 1: base ASTNode class and Module concept
Adds the C++ editor stack foundation with ASTNode (id, conceptType, parent pointer, virtual dtor) and Module as the first concrete concept (name, targetLanguage). Header-only, compiles with C++20, test passes all assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 18:44:42 -07:00