You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Establish the Zig package and the full module graph with compile-enforced dependency direction. Every later stage attaches to the modules declared here, so the import tables must match the dependency graph in CLAUDE.md exactly from the start.
1.1.1 Add build.zig.zon: package name mlxd, version 0.1.0, minimum_zig_version >= 0.16
1.1.2 Add build.zig skeleton with standard target/optimize options and the mlxd executable definition
1.1.3 Create the src/ directory tree per the planned layout: core/, mlx/, chat/, model/, engine/ (with specdecode/, constrain/), registry/, http/ (with handlers/), cli/ (with cmd/), plus tests/ and tests/fixtures/
Phase 1.2: Module graph with enforced dependency direction
1.2.1 Add an empty root.zig for each module: core, mlxbridge, chat, model, engine, registry, http
1.2.2 Declare all modules in build.zig via b.createModule(.{ .imports = ... }) with exact import tables: core and mlxbridge are leaves; chat imports core; model imports core, mlxbridge; engine imports core, mlxbridge, model (NOT chat); registry imports core; http imports core, chat, model, engine, registry
1.2.3 Add cli/main.zig as the exe root importing all modules, with stub subcommand dispatch for serve | run | pull | list (each prints a placeholder and exits 0)
1.2.4 Verify the enforcement property: an undeclared cross-module @import (e.g. engine importing chat) fails to compile; record the check as a comment in build.zig
Acceptance
zig build produces an mlxd binary whose four subcommands run and exit 0
The module import tables in build.zig match the dependency graph in CLAUDE.md exactly, and an undeclared cross-module import is a compile error
Stage 1: Project scaffold
Establish the Zig package and the full module graph with compile-enforced dependency direction. Every later stage attaches to the modules declared here, so the import tables must match the dependency graph in
CLAUDE.mdexactly from the start.Epic: #1
Depends on: nothing (first stage)
Phase 1.1: Zig package init
build.zig.zon: package namemlxd, version0.1.0,minimum_zig_version>= 0.16build.zigskeleton with standard target/optimize options and themlxdexecutable definitionsrc/directory tree per the planned layout:core/,mlx/,chat/,model/,engine/(withspecdecode/,constrain/),registry/,http/(withhandlers/),cli/(withcmd/), plustests/andtests/fixtures/Phase 1.2: Module graph with enforced dependency direction
root.zigfor each module:core,mlxbridge,chat,model,engine,registry,httpbuild.zigviab.createModule(.{ .imports = ... })with exact import tables:coreandmlxbridgeare leaves;chatimportscore;modelimportscore,mlxbridge;engineimportscore,mlxbridge,model(NOTchat);registryimportscore;httpimportscore,chat,model,engine,registrycli/main.zigas the exe root importing all modules, with stub subcommand dispatch forserve | run | pull | list(each prints a placeholder and exits 0)@import(e.g.engineimportingchat) fails to compile; record the check as a comment inbuild.zigAcceptance
zig buildproduces anmlxdbinary whose four subcommands run and exit 0build.zigmatch the dependency graph inCLAUDE.mdexactly, and an undeclared cross-module import is a compile error