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:
@@ -11,7 +11,7 @@ Status: SPEC · 2026-09-18. Store: SQLite.
|
||||
| APP-40 | derived numbers stored, never recomputed |
|
||||
| CAPTURE-25, CAPTURE-30, CAPTURE-70, CAPTURE-80, CAPTURE-85, CAPTURE-90, CAPTURE-95, CAPTURE-105, CAPTURE-115, CAPTURE-130, CAPTURE-135, CAPTURE-160 | slab and photo columns, units, PNG |
|
||||
| METADATA-5, METADATA-10, METADATA-15, METADATA-30 | taxonomy cache tables and slab taxonomy columns |
|
||||
| METADATA-35, METADATA-45, METADATA-55, METADATA-66, METADATA-105 | inference columns, prompts tables, logs |
|
||||
| METADATA-35, METADATA-45, METADATA-55, METADATA-66, METADATA-105, METADATA-106 | inference columns, prompts tables, logs, revision interface |
|
||||
| PUBLISH-25, PUBLISH-30 | purge on success, append-only log |
|
||||
| REVIEW-10, REVIEW-25, REVIEW-45, REVIEW-50 | prose, price, SKU, field limits |
|
||||
| SETTINGS-5, SETTINGS-10, SETTINGS-20, SETTINGS-25, SETTINGS-30, SETTINGS-35, SETTINGS-50, SETTINGS-51, SETTINGS-55, SETTINGS-65, SETTINGS-90 | settings, crypto, rates, taxonomy stamps |
|
||||
@@ -132,11 +132,19 @@ Rebuild is one transaction; on failure the previous cache is kept.
|
||||
|
||||
## 7. `prompts` and `prompt_revisions`
|
||||
|
||||
Prompts live in the database with all revisions; each call uses the active revision and the
|
||||
history is retained.
|
||||
`docs/contracts/PROMPTS.md` owns the prompt structure, the seed text, and the revision interface; this
|
||||
section owns the storage shape (`METADATA-105`, `METADATA-106`).
|
||||
|
||||
- `prompts`: `id`, `name` (`call1` | `call2`), `active_revision_id`, `created_at`, `updated_at`.
|
||||
- `prompt_revisions`: `id`, `prompt_id` FK, `content` text, `created_at`, `created_by`.
|
||||
- `prompts`: `id`, `name` (`call1` | `call2`), `active_revision_id` FK, `created_at`, `updated_at`.
|
||||
- `prompt_revisions`: `id`, `prompt_id` FK, `content` text, `content_hash` text, `created_at`,
|
||||
`created_by`.
|
||||
|
||||
Revisions are append-only: a save inserts a new row and moves `active_revision_id`; a row is never
|
||||
updated or deleted, so reset-to-revision and reset-to-default are pointer moves. Each prompt has a
|
||||
revision 0 seeded on first run from the seed text in `docs/contracts/PROMPTS.md` §6.
|
||||
|
||||
`inference_log.call` records which call ran, and `inference_log.prompt_revision_id` records the
|
||||
revision it used (`METADATA-66`).
|
||||
|
||||
## 8. `sync_log`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user