Complete the public facade adapter boundary
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
## Status
|
||||
|
||||
Proposed. Migration Steps 1 through 3 are complete; this roadmap defines the
|
||||
required target state for Step 4. The separate
|
||||
[implementation plan](implementation.md) defines the ordered work.
|
||||
Complete as of 2026-07-28. The public-facade adapter boundary is established;
|
||||
the [implementation plan](implementation.md) records the completed work, and
|
||||
the [main migration roadmap](migration.md) identifies repository creation as
|
||||
the next gate.
|
||||
|
||||
## Purpose
|
||||
|
||||
@@ -19,31 +20,18 @@ owns the long-term project boundary. The
|
||||
[main migration roadmap](migration.md) owns the overall sequence. This feature
|
||||
roadmap defines the desired Step 4 state, not an implementation sequence.
|
||||
|
||||
## Current Gap
|
||||
## Achieved Boundary
|
||||
|
||||
The public `Engine` facade already supports the ordinary `Prepare` and `Run`
|
||||
workflows, directory and alternate framework sources, injected model clients,
|
||||
public result values, and broad public error classification. The executable
|
||||
adapters do not yet use that boundary consistently:
|
||||
|
||||
- the CLI constructs framework repositories, readers, renderer, validator, and
|
||||
OpenAI-compatible client directly, then calls the internal runner;
|
||||
- the HTTP handler accepts internal domain request and result values;
|
||||
- HTTP error mapping inspects framework-internal sentinels;
|
||||
- the HTTP artifact-containment reader implements the internal artifact-reader
|
||||
interface;
|
||||
- prepared-run formatting accepts an internal domain value; and
|
||||
- adapter tests frequently construct internal runners or use internal domain
|
||||
values.
|
||||
|
||||
Those dependencies would prevent Scriptorium from compiling after the
|
||||
framework packages move to Promptkit. They also allow the executable to exercise
|
||||
a different composition path from downstream Go consumers.
|
||||
The CLI, HTTP handler, and prepared-run formatter now consume public engine
|
||||
values and errors. `serve` injects Scriptorium's HTTP-owned restricted artifact
|
||||
reader through the public extension point, while the root facade continues to
|
||||
compose the framework implementation inside this repository. A repository-level
|
||||
dependency test protects the direct-import boundary.
|
||||
|
||||
## Target State
|
||||
|
||||
At completion, Scriptorium's executable path is an ordinary consumer of the
|
||||
same public framework boundary used by other Go applications:
|
||||
Scriptorium's executable path is an ordinary consumer of the same public
|
||||
framework boundary used by other Go applications:
|
||||
|
||||
```text
|
||||
cmd/scriptorium
|
||||
|
||||
Reference in New Issue
Block a user