Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 3.85 KB

File metadata and controls

47 lines (29 loc) · 3.85 KB

TaskStream kernel architecture after #236

#236 resets Ilchul around a Rust-first kernel. The current Rust workspace is the architecture source of truth for new kernel work, while the TypeScript/Pi workflow code remains an active facade and compatibility surface during migration.

Rust-first kernel decision

The active kernel direction is Rust-first:

Layer Current package Responsibility
Domain kernel ilchul-core in crates/core TaskStream, Run, RunContract snapshots, evidence, verification, completion decisions, events, ports, and domain services.
Canonical store adapter ilchul-store in crates/store SQLite-backed canonical DB state for streams, runs, evidence, verification, completion, runtime sessions, artifact refs, and events.
Filesystem artifact adapter ilchul-artifacts in crates/artifacts Digest-sealed filesystem artifacts for raw logs, diffs, transcripts, test output, and projections.
MCP control plane ilchul-mcp in crates/mcp MCP tools/resources that translate JSON control-plane calls into core services.
Facades/placeholders ilchul-runtime-pi, ilchul-cli, ilchul-testkit Migration surfaces and future runtime/test support without moving domain authority out of core.

New kernel semantics should land in Rust crates first unless a scoped issue explicitly says the TypeScript facade is the product target.

DDD over dogmatic Clean Architecture

The reset uses DDD over dogmatic Clean Architecture. ilchul-core is transport-neutral and protects aggregate/service invariants, but the project should not add abstract layers just to match a diagram. Boundaries are justified by domain ownership:

  • value objects protect stable IDs and authority labels;
  • aggregates such as TaskStream and Run own state transitions;
  • services such as start, dispatch, record evidence, verify, and decide completion coordinate domain ports;
  • ports describe needed capabilities without naming SQLite, MCP, Pi, GitHub, tmux, or filesystem implementation details.

Clean dependency direction still matters: domain code must not import runtime transports, storage libraries, process execution, Pi SDKs, or GitHub semantics. The difference is that layers exist to preserve TaskStream language and invariants, not to satisfy a dogmatic package taxonomy.

Generic folders with ilchul-* package names

#236 intentionally keeps folder names generic and package names branded:

  • folder names: crates/core, crates/store, crates/artifacts, crates/mcp, crates/runtime-pi, crates/cli, crates/testkit;
  • package names: ilchul-core, ilchul-store, ilchul-artifacts, ilchul-mcp, ilchul-runtime-pi, ilchul-cli, ilchul-testkit.

This keeps imports and workspace navigation reusable while preserving clear crate identity in Cargo output, diagnostics, and published/package metadata.

Canonical state and evidence

SQLite canonical DB state is authoritative for stream/run/evidence/verification/completion/event records. Filesystem artifacts are supporting evidence material. The artifact inbox can store raw runtime output, but core records should carry bounded summaries and digest-sealed ArtifactRefs instead of embedding large raw logs in canonical events.

Runtime output is evidence, not completion authority. A runtime session may produce logs, diffs, tests, and summaries; the run is not complete until the kernel records a completion decision with kernel authority, accepted verification, and run-local evidence references.

Legacy terms

Legacy Kapi, legacy RunContract, and legacy DAG roadmap language may still appear in docs and TypeScript facade code. Treat that language as design reference for migration and compatibility, not as active ownership of canonical kernel semantics. Current issues should name the Rust crate or facade they are changing rather than reviving old roadmap ownership by implication.