System

Architecture #

Manual is designed as a local-first Rust workspace that can grow into a workflow control plane.

The current implementation is deliberately compact. It establishes a shared Rust foundation before adding persistence, runners, adapters, cost ledgers, or a web UI.

Current Workspace #

The repository contains these workspace members:

CrateRole TodayIntended Direction
coreShared workspace descriptor and domain foundation.Own domain language, validation rules, workflow types, job types, and cost records.
nodeWorkflow node identifiers, kinds, and contract metadata.Define the typed graph node surface shared by import, validation, execution, and visualization.
workflowWorkflow graph types that combine nodes with directed edges and validation.Become the graph import/export and orchestration planning surface.
workflow-registryWorkflow template registration, lookup, and file-backed storage.Let jobs and orchestration layers resolve workflow references without coupling registry concerns into the workflow graph crate.
cliThin command entrypoint with about and skill validation behavior.Become the user and agent entrypoint for workflow, job, run, cost, artifact, sandbox, and serve commands.
skillBundled skill template and delegation into the CLI validator.Package Manual instructions so agents can create, validate, and run workflows through the CLI.
agentJSONL-oriented adapters for Codex and Claude Code.Route workflow nodes into agent runtimes while keeping process handling uniform.
agent-guiReusable native agent profile components.Let app shells manage agent runtime metadata independently from process adapters.
scriptRust source plus JSON input execution wrapper.Run deterministic Rust snippets as workflow nodes while capturing stdout, stderr, and exit status.
sandboxCross-platform sandbox policy model, backend detection, and execution plan compiler.Enforce node boundaries with macOS Seatbelt, Linux bubblewrap/seccomp, and Windows restricted-token backends.
sandbox-registryNamed sandbox definitions and lookup logic.Let workflows and runners resolve sandbox references without coupling registry concerns into the sandbox runtime crate.
runtimeComposes input, sandbox policy, and a script or agent target into an executed run.Become the node execution layer used by jobs, cost capture, artifacts, and higher-level workflow orchestration.
graph-viewerReusable native graph visualization primitives and a JSON graph viewer.Provide the shared graph canvas for local workflow and run inspection surfaces.
workflow-guiReusable workflow registry management components.Let the app list, view, create, edit, delete, and graph workflow templates without coupling UI code into the workflow model.
node-guiReusable egui node detail component.Keep node inspection portable across native app shells and future localhost visualization surfaces.
appNative application shell that embeds reusable GUI components.Become the local visualization or application surface, likely served by manual serve.

Product Architecture #

The broader Manual architecture has these parts:

LayerResponsibility
Manual CLILocal command surface for users and agents.
Workflow GraphRepeatable work represented as nodes, edges, policies, and artifact contracts.
Job RunnerTurns a workflow into a tracked run with node execution state.
Runtime OrchestratorReceives node input, selects a sandbox policy, and invokes the right executable target.
Runtime AdaptersConnect Codex, Claude Code, scripts, Python, and future agent runtimes.
Sandbox RuntimeApplies OS-native execution boundaries around nodes.
Cost LedgerRecords token usage, model prices, baseline cost, actual cost, and savings.
Artifact StoreKeeps reports, patches, logs, test output, and other run products.
Local VisualizationShows workflow graphs, timelines, node details, costs, and artifacts at localhost.

Boundaries #

Manual should keep these concerns separate:

  • Shared workspace metadata belongs in core.
  • Workflow node contracts belong in node.
  • Workflow graph validation belongs in workflow.
  • Workflow template lookup belongs in workflow-registry.
  • CLI parsing belongs in cli.
  • Skill packaging belongs in skill.
  • Reusable visualization components belong in focused GUI crates such as graph-viewer, workflow-gui, and node-gui.
  • Application composition belongs in app or a future server crate.
  • Runtime adapter code belongs in agent.
  • Rust source execution belongs in script.
  • Sandbox policy modeling and backend plan compilation belong in sandbox.
  • Named sandbox lookup belongs in sandbox-registry.
  • Input-to-execution orchestration belongs in runtime.
  • Runtime adapter code should not leak into workflow validation.
  • Sandbox policy modeling should be shared, while platform-specific execution remains behind backend modules.

That separation keeps the codebase easy to extend without turning the first CLI into a large mixed-purpose file.

Data Flow #

TEXT
natural language request
  -> Manual Skill
  -> workflow graph spec
  -> manual workflow import
  -> manual job run
  -> node execution through adapter
  -> sandboxed process
  -> artifact and cost records
  -> manual serve visualization

The current repository implements only the earliest part of this path. The docs describe the intended path so the next implementation steps stay coherent.

Design Principle #

Manual should prefer the smallest complete path over broad scaffolding. A thin workflow command that calls core validation is better than a large control plane that cannot execute one real workflow.

Generated from Markdown by docs/build.mjs. Manual Docs