Add an initial staged implementation prompt fro the core contracts and skeleton

This commit is contained in:
2026-07-03 00:58:40 -05:00
parent 9fd63d0422
commit 60682e977e
2 changed files with 550 additions and 69 deletions

View File

@@ -32,79 +32,26 @@ Out of scope:
- diagnostics run directory;
- production config loading.
## Proposed Stages
## Target End State
### Stage 1: Bootstrap Go Project
The repository should contain a compileable Go application shell and stable core
contract packages:
Create:
- `cmd/notarius` provides the executable entrypoint.
- `internal/cli` provides a minimal CLI shell.
- `internal/core/source` defines generic source documents, source units, source
references, and source validation helpers.
- `internal/core/artifacts` defines extractor-neutral artifact candidate,
approved artifact, rejected artifact, and run manifest types.
- `internal/framework/contracts` defines the adapter, extractor, validator, and
structured LLM interfaces used by later checkpoints.
- `go.mod`;
- `cmd/notarius/main.go`;
- `internal/cli`;
- a minimal CLI command surface that compiles.
The contracts should be proven with fake implementations in tests. Those tests
should demonstrate composition without real source adapters, real extractors,
LLM provider calls, prompt assets, or diagnostics infrastructure.
Expected validation:
```sh
go test ./...
go build ./cmd/notarius
```
### Stage 2: Source Core Types
Create `internal/core/source`.
Initial types:
- `SourceDocument`;
- `SourceUnit`;
- `SourceRef`;
- source validation helpers for document ID, ordered units, unique unit IDs, and
non-empty text.
Keep the model generic. Do not introduce transcript-specific field names into
core source types.
### Stage 3: Artifact Core Types
Create `internal/core/artifacts`.
Initial types:
- artifact candidate;
- approved artifact envelope;
- rejected artifact record;
- run manifest;
- source-reference-bearing helper interfaces or conventions if useful.
Keep the artifact model extractor-neutral. D&D-specific fields should wait until
the D&D spells extractor checkpoint.
### Stage 4: Framework Contract Types
Create `internal/framework/contracts`.
Initial contracts:
- `InputAdapter`;
- `Extractor`;
- `Validator`;
- structured LLM client interface placeholder;
- parse, extraction, and validation request/response types.
Interfaces should be small and should depend on core source/artifact types, not
on concrete adapter or extractor packages.
### Stage 5: Contract Tests With Fakes
Add tests using fake adapter, extractor, and validator implementations.
These tests should prove:
- fake components can satisfy the interfaces;
- source documents can flow into extraction requests;
- artifact candidates can flow into validation requests;
- the contracts are not forcing transcript or D&D assumptions.
Implementation staging belongs in
[`implementation.md`](implementation.md).
## Done Criteria