midnight-saci

Implementation ticket drafts

[!NOTE] Historical. These are the ticket drafts for the first implementation.

The reviewed breakdown is published as 12 parent issues and 33 bounded task issues. See the created issue index for the assignable tasks and their GitHub links. The sections below retain the feature-group requirements; they are not single implementation assignments.

These are local drafts for the maintainer to turn into issues. Numbers below identify dependencies within this document; they are not GitHub issue numbers. The system plan, authoring guide, and execution contract define the intended behavior.

Delivery milestones

  1. Local execution: tickets 1–9 deliver plan creation, a self-hosted backend, isolated workers, a configurable OpenAI-compatible LLM connection, and a CLI that runs plans and retrieves evidence.
  2. Namespace deployment: ticket 10 delivers the same workflow on Kubernetes/OpenShift with little supporting infrastructure.
  3. Extensions: tickets 11–12 add configured MCP servers and additional outcome actions. Keep their extension boundaries in the initial contracts, without requiring their implementations for local execution.

1. Establish the Rust project and quality gates

Create the initial Rust project with CLI, backend, and worker entry points and shared contract types. Keep the module layout small and document the chosen boundaries. Favor the Rust ecosystem used in wisdom-maker and Wanaku. Outcomes, simplicity, and code quality take priority over a fixed dependency list.

Acceptance criteria:

Dependencies: none.

2. Define run, environment, policy, event, and report contracts

Implement versioned serializable types for run input, plan units, target configuration, worker settings, attempts, evidence, progress, and final outcomes. Keep lifecycle distinct from outcome.

Acceptance criteria:

Dependencies: 1.

3. Parse, validate, and scaffold Markdown test plans

Implement the authoring conventions and saci new test-plan <file.md>.

Acceptance criteria:

Dependencies: 2.

4. Integrate a Rust agent library and OpenAI-compatible LLM connection

Use an established Rust agent library to provide the LLM connection, conversation handling, and tool-call orchestration described in the execution contract. Evaluate Rig first; choose a suitable alternative if required and document the reason. Saci implements application-specific test semantics through the library’s extension points.

Acceptance criteria:

Dependencies: 2.

5. Implement worker shell and HTTP tools

Provide the initial tool implementations inside the worker image.

Acceptance criteria:

Dependencies: 2.

6. Implement sequential agent execution and evidence-based assessment

Connect the parsed plan and tools using the selected agent library’s orchestration, hooks, and tool interfaces. Implement Saci’s step ordering, evaluation, policies, and evidence around that integration.

Acceptance criteria:

Dependencies: 3, 4, 5.

7. Implement the backend API and durable run records

Build a single backend service with SQLite persistence for submissions, events, evidence, and reports.

Acceptance criteria:

Dependencies: 2, 3.

8. Launch and supervise local container workers

Connect the backend and agent through a local worker launcher. Support Podman and Docker through their command-line binaries resolved using the backend process’s PATH. Keep discovery limited to checking those executable names, with an explicit runtime setting and a documented deterministic preference when both are available.

Acceptance criteria:

Dependencies: 6, 7.

9. Deliver the CLI for complete local and remote runs

Add CLI commands to launch/configure a local backend, submit a plan bundle, follow progress, inspect a report, and cancel a run. Keep the offline authoring command from ticket 3.

Acceptance criteria:

Dependencies: 3, 8.

10. Add namespace-scoped Kubernetes/OpenShift execution and packaging

Implement a Kubernetes Job launcher and a simple installation package, using the same backend, worker image, and contracts as local execution. Recommend Helm for the initial package.

Acceptance criteria:

Dependencies: 8, 9.

11. Extend worker tools through configured MCP servers

Add MCP tool discovery and invocation to the worker’s existing tool interface. Keep shell and HTTP available without an MCP dependency in a run configuration.

Acceptance criteria:

Dependencies: 6, 9.

12. Add configurable outcome actions and bounded extension hooks

Extend run policies with explicit follow-up actions after execution. Use configured MCP tool invocations through rmcp as the initial external-action mechanism. Available actions depend on the connected server’s tools; for example, a ticketing MCP server may expose issue creation or commenting. The coding agent documents the YAML action schema and approval flow as part of this ticket.

Acceptance criteria:

Dependencies: 7, 9, 11.

Implementation guidance

These guidelines leave implementation details to the coding agent while preserving the agreed plan format, code-quality baseline, and provider-managed spending policy.