Sprint 1: project skeleton, type system, and all architecture specs

- src/types.hpp: complete UCWM type system in C++20 — 19 enums, 11 facet
  data types, all core structs (CanonicalObject, Constraint, Facet,
  GateSignal, WorldState, etc.) with full JSON round-trip serialization
- src/main.cpp: smoke test — constructs apple-problem WorldState by hand,
  serializes to JSON
- tests/test_types.cpp: 19 tests, 123 assertions, all passing
- CMakeLists.txt: CMake + CPM build with nlohmann/json, spdlog, Catch2
- schemas/: JSON Schema contracts for all UCWM data types
- gates/, specialists/, resolver/, synthesis/: language-agnostic interface
  contracts and domain specs for all pipeline layers
- docs/: architecture, vocabulary, decision matrices, roadmap (6 phases,
  28 sprints), sprint_001, implementation_constraints

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-01 16:09:55 -07:00
commit b758d7ea60
35 changed files with 6344 additions and 0 deletions

48
CMakeLists.txt Normal file
View File

@@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 3.20)
project(ucwm VERSION 0.1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# Auto-download CPM into the build directory
set(CPM_DOWNLOAD_VERSION 0.40.0)
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/CPM.cmake")
file(DOWNLOAD
"https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/CPM.cmake"
SHOW_PROGRESS
)
endif()
include("${CMAKE_CURRENT_BINARY_DIR}/CPM.cmake")
CPMAddPackage("gh:nlohmann/json@3.11.3")
CPMAddPackage("gh:gabime/spdlog@1.13.0")
CPMAddPackage(
NAME Catch2
VERSION 3.5.4
GITHUB_REPOSITORY catchorg/Catch2
)
list(APPEND CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/extras")
# Interface library — everything links against this
add_library(ucwm_types INTERFACE)
target_include_directories(ucwm_types INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_link_libraries(ucwm_types INTERFACE nlohmann_json::nlohmann_json spdlog::spdlog)
target_compile_features(ucwm_types INTERFACE cxx_std_20)
# Main executable
add_executable(ucwm src/main.cpp)
target_link_libraries(ucwm PRIVATE ucwm_types)
# Tests
enable_testing()
add_executable(ucwm_tests tests/test_types.cpp)
target_link_libraries(ucwm_tests PRIVATE ucwm_types Catch2::Catch2WithMain)
include(Catch)
catch_discover_tests(ucwm_tests)