Extract Promptkit framework foundation

This commit is contained in:
2026-07-28 04:14:28 +00:00
parent 0d56d986af
commit ad1f2674ab
8 changed files with 910 additions and 13 deletions

View File

@@ -12,9 +12,13 @@ contributor workflow and validation.
| Component | Implemented responsibility | References |
| --- | --- | --- |
| Root `promptkit` package | Establishes the public package boundary for the Go module. It does not yet provide migrated framework behavior or exported APIs. | [Package declaration](../../doc.go) |
| `internal/domain` | Defines internal framework values for requests, artifacts, prompt definitions, profiles, execution targets, rendering, generation, and validation. | [Domain declarations](../../internal/domain/domain.go) |
| `internal/defaults` | Defines application-neutral framework constants and constructs the default execution target. It contains no CLI, server, or inbound HTTP limits. | [Framework defaults](../../internal/defaults/defaults.go) |
| `internal/filecatalog` | Provides deterministic YAML discovery and path helpers for operating-system filesystems and `fs.FS` sources. | [File catalog](../../internal/filecatalog/catalog.go) |
The root `promptkit` package is the sole implemented Go package. No internal
framework packages exist yet.
These packages form the internal extraction foundation. Prompt and profile
sources, rendering, artifact reading, validation, model clients, orchestration,
and a usable public engine are not implemented in Promptkit yet.
## Maintenance

View File

@@ -12,10 +12,23 @@ implemented packages without redefining these rules.
Promptkit is an importable Go library. It does not provide a runnable command,
an HTTP service, or another application process.
The module root contains package `promptkit`, which is the public facade and the
only implemented Go package in the current repository foundation. It declares
the module's public package boundary but does not yet provide migrated framework
behavior or exported APIs. No internal framework packages currently exist.
The module root contains package `promptkit`, which is the public facade. It
declares the module's public package boundary but does not yet provide a usable
exported framework API.
The implemented internal foundation consists of:
- `internal/domain`, which owns framework data values shared by later internal
components;
- `internal/defaults`, which owns application-neutral framework defaults and
constructs the default execution target; and
- `internal/filecatalog`, which discovers YAML files and provides source-path
helpers for filesystem and `fs.FS` consumers.
`internal/defaults` depends on `internal/domain`; the file catalog is
independent and uses only the standard library. Prompt and profile sources,
rendering, artifact reading, validation, model clients, orchestration, and the
public engine have not yet been extracted.
Future framework extraction must follow this dependency direction:
@@ -32,10 +45,12 @@ downstream consumers, including Scriptorium
narrow injected abstractions
```
The facade may coordinate internal components. Internal components must depend
on narrow abstractions for behavior supplied from outside the library; they
must not depend on consumers or on Scriptorium. This diagram constrains future
work and does not assert that the internal components already exist.
The facade may coordinate internal components once the public engine is
extracted. Internal components must depend on narrow abstractions for behavior
supplied from outside the library; they must not depend on consumers or on
Scriptorium. This diagram is the target dependency direction for later
extraction and does not assert that the public facade already assembles the
implemented foundation.
## Repository And Consumer Boundary