docs(m3): add the prompt revision interface, seed, and auth gap
UAT requires prompt tuning, so the iteration system is M3; only the editing UI is deferred. - METADATA-105 now covers storage, append-only revisions, and recording the revision used. - METADATA-106 adds the REST revision interface (append, activate, read); no prompt UI. - METADATA-107 records the missing authentication as a later row; there is no M4 yet, so the PoR carries it. - PROMPTS.md owns the seed text as revision 0, the seed mechanism, and the interface; sections renumbered after inserting them. - DATA-MODEL.md §7 cites PROMPTS.md, adds content_hash, and states the append-only rule. - task_breakdown.md notes the S7 interface and the deferred auth. 155 requirements; both gates pass.
This commit is contained in:
+47
-13
@@ -11,22 +11,33 @@ Owns prompt storage, prompt inputs, and the two inference calls.
|
||||
| METADATA-35, METADATA-40, METADATA-45, METADATA-50 | Call 1 inputs, constraints, pre-fill, precedence |
|
||||
| METADATA-55, METADATA-60, METADATA-65, METADATA-70 | Call 2 output, inputs, dimension safety, inference-off path |
|
||||
| METADATA-75, METADATA-80, METADATA-85, METADATA-90, METADATA-95 | non-blocking, deterministic copy, pattern selection, fact block, overlay exclusion |
|
||||
| METADATA-100, METADATA-105, METADATA-110, METADATA-115 | feat mapping, prompt storage, button, failure |
|
||||
| METADATA-105, METADATA-106, METADATA-107 | prompt storage, revision interface, auth |
|
||||
| METADATA-66 | generation logging |
|
||||
| SETTINGS-30 | brand voice and geo context |
|
||||
| REVIEW-40, REVIEW-50 | editability and field limits |
|
||||
|
||||
## 1. Storage and revisions
|
||||
|
||||
- Prompts live in the database, not in text files, with all revisions retained. Tables are in
|
||||
`docs/contracts/DATA-MODEL.md` §7. No prompt files ship with the application; the database is
|
||||
the only prompt source.
|
||||
- Each call reads the active revision fresh.
|
||||
- Editing a prompt creates a new revision; history is never overwritten.
|
||||
- Every generation is logged with its inputs, the request/response when a model was used, and the
|
||||
final stored content.
|
||||
- Prompts live in the database, not in text files, with all revisions retained. Storage shape is
|
||||
`docs/contracts/DATA-MODEL.md` §7 (`METADATA-105`).
|
||||
- Revisions are append-only. Editing saves a new revision and moves the active pointer; a revision
|
||||
is never updated or deleted. Reset to default and reset to revision are pointer moves.
|
||||
- Each call reads the active revision fresh, and the revision used is recorded on the call
|
||||
(`METADATA-66`).
|
||||
- The seed text in §6 is read once on first run and written as revision 0 for each call. It is the
|
||||
only prompt content that ships with the application.
|
||||
|
||||
## 2. Call 1 — vision classification
|
||||
## 2. Revision interface
|
||||
|
||||
REST, no UI (`METADATA-106`):
|
||||
|
||||
1. `POST /api/v1/prompts/{call}/revisions` appends a revision and returns it.
|
||||
2. `POST /api/v1/prompts/{call}/activate` moves the active pointer to a revision.
|
||||
3. `GET /api/v1/prompts/{call}` returns the active prompt and the revision list.
|
||||
|
||||
The interface is reachable on the trusted network only until it is authenticated (`METADATA-107`).
|
||||
|
||||
## 3. Call 1 — vision classification
|
||||
|
||||
**When.** Runs automatically after a calibrated draft uploads only when `inference_enabled` is
|
||||
true; also on demand or retry. With inference off it is skipped and the fields are filled by hand.
|
||||
@@ -53,7 +64,7 @@ editable; below it the field stays empty and is not shown as a low-confidence gu
|
||||
always win. Call 1 is assist-only and never gates publish. A runtime failure is classified
|
||||
recoverable or unrecoverable for the owner.
|
||||
|
||||
## 3. Call 2 — content prose
|
||||
## 4. Call 2 — content prose
|
||||
|
||||
**When.** User-triggered only, via the Generate text control; never automatic. The control appears
|
||||
only when content generation is enabled and the endpoint is reachable.
|
||||
@@ -78,7 +89,7 @@ No provider thread id is used, and Call 1's raw prompt and result are not sent (
|
||||
(`METADATA-55`, `METADATA-80`). The primary wood category selects the specialized prompt
|
||||
(`METADATA-85`). The owner can edit the result (`REVIEW-40`).
|
||||
|
||||
## 4. Fallback and templates
|
||||
## 5. Fallback and templates
|
||||
|
||||
- With inference off, the server produces the long description so create never lacks prose
|
||||
(`METADATA-70`).
|
||||
@@ -88,8 +99,31 @@ No provider thread id is used, and Call 1's raw prompt and result are not sent (
|
||||
- All generated text stays within the field limits in `docs/contracts/WOO-API.md` §9
|
||||
(`REVIEW-50`).
|
||||
|
||||
## 5. Prompt management
|
||||
## 6. Seed prompt text
|
||||
|
||||
- The active Call 1 and Call 2 revisions are editable; saving creates a new revision.
|
||||
Read once on first run and written as revision 0 for each call (`METADATA-105`). Authored here with
|
||||
the rest of the prompt discussion; the seed is the only prompt content that ships with the
|
||||
application.
|
||||
|
||||
The seed is the starting point for tuning, not a final text. Both calls are revised ad hoc through
|
||||
the §2 interface when UAT surfaces a miss.
|
||||
|
||||
**`call1` seed.** Classify the slab's species, wood categories, edge type, figure, and grade from
|
||||
the supplied photos, choosing only from the supplied synced taxonomy lists, and return the result
|
||||
fields in §3 as JSON. Report a confidence for each classified field. Map free-text observations
|
||||
(character, inclusions, voids, checks) to the supplied feature-tag list only. Invent no category or
|
||||
term.
|
||||
|
||||
**`call2` seed.** Write the long product description for the slab from the supplied photos and
|
||||
listing facts. The name and short description are already built, so do not repeat them. Use the
|
||||
brand voice and geo context given. The dimensions in the fact block are exact: use those strings
|
||||
and invent no numbers. Write prose a premium lumber buyer would read.
|
||||
|
||||
## 7. Prompt management
|
||||
|
||||
- The active Call 1 and Call 2 revisions are editable through the §2 interface; saving creates a
|
||||
new revision.
|
||||
- A revision identifies its content, author, and timestamp; `inference_log` records the revision
|
||||
used for each call.
|
||||
- The revision interface requires authentication before it is exposed beyond the trusted network
|
||||
(`METADATA-107`).
|
||||
|
||||
Reference in New Issue
Block a user