feat: add teaching asset prompts
This commit is contained in:
@@ -59,11 +59,11 @@ interview-ready after each short practice loop.
|
||||
|
||||
### Teaching Assets
|
||||
|
||||
- [ ] **ASSET-01**: System can generate prompt candidates for visual teaching
|
||||
- [x] **ASSET-01**: System can generate prompt candidates for visual teaching
|
||||
assets.
|
||||
- [ ] **ASSET-02**: Generated assets store source concept, evidence, prompt,
|
||||
- [x] **ASSET-02**: Generated assets store source concept, evidence, prompt,
|
||||
model config, and review state.
|
||||
- [ ] **ASSET-03**: Image model configuration verifies the actual OpenAI model
|
||||
- [x] **ASSET-03**: Image model configuration verifies the actual OpenAI model
|
||||
identifier before production calls.
|
||||
|
||||
## v2 Requirements
|
||||
@@ -99,7 +99,7 @@ interview-ready after each short practice loop.
|
||||
| MEM-01..MEM-05 | Phase 3 | Complete |
|
||||
| PROG-01..PROG-05 | Phase 4 | Complete |
|
||||
| ONTO-01..ONTO-04 | Phase 5 | Complete |
|
||||
| ASSET-01..ASSET-03 | Phase 6 | Pending |
|
||||
| ASSET-01..ASSET-03 | Phase 6 | Complete |
|
||||
|
||||
**Coverage:**
|
||||
- v1 requirements: 28 total
|
||||
@@ -108,4 +108,4 @@ interview-ready after each short practice loop.
|
||||
|
||||
---
|
||||
*Requirements defined: 2026-04-26*
|
||||
*Last updated: 2026-04-26 after Phase 5 execution.*
|
||||
*Last updated: 2026-04-26 after Phase 6 execution.*
|
||||
|
||||
@@ -7,7 +7,7 @@ See: `.planning/PROJECT.md` (updated 2026-04-26)
|
||||
**Core value:** The user should feel and prove that they are becoming more
|
||||
interview-ready after each short practice loop.
|
||||
|
||||
**Current focus:** Phase 6 planning: Teaching Assets.
|
||||
**Current focus:** v1 baseline complete; ready for milestone audit or frontend planning.
|
||||
|
||||
## Current Decisions
|
||||
|
||||
@@ -31,13 +31,15 @@ interview-ready after each short practice loop.
|
||||
challenge APIs derived from learner memory evidence.
|
||||
- Phase 5 ontology material ingestion is implemented and verified with
|
||||
source-backed candidate concepts, prerequisite edges, and candidate gaps.
|
||||
- Phase 6 teaching asset prompts are implemented and verified with source
|
||||
evidence, model config, review state, and model-id verification guard.
|
||||
|
||||
## Next Actions
|
||||
|
||||
1. Plan Phase 6 teaching asset prompt generation with GSD.
|
||||
2. Keep `docs/planning/WORKFLOW_CONTRACTS.md` aligned with Go structs during
|
||||
future workflow implementation.
|
||||
3. Verify the production OpenAI image model identifier before real asset
|
||||
1. Run a milestone audit across Phase 1 through Phase 6.
|
||||
2. Choose the next milestone: frontend MVP, persistence, real workflow runtime,
|
||||
or document parser integration.
|
||||
3. Verify the production OpenAI image model identifier before real image
|
||||
generation calls.
|
||||
|
||||
## Validation Log
|
||||
@@ -61,6 +63,9 @@ interview-ready after each short practice loop.
|
||||
- 2026-04-26: Phase 5 implementation verified with `go test ./...`,
|
||||
`openspec validate bootstrap-job-tutor-platform --strict`, live material
|
||||
ingestion and ontology snapshot smoke, and Go source line-count check.
|
||||
- 2026-04-26: Phase 6 implementation verified with `go test ./...`,
|
||||
`openspec validate bootstrap-job-tutor-platform --strict`, live
|
||||
material-to-asset-prompt smoke, and Go source line-count check.
|
||||
|
||||
---
|
||||
*State initialized: 2026-04-26.*
|
||||
|
||||
39
.planning/phases/006-teaching-assets/006-CONTEXT.md
Normal file
39
.planning/phases/006-teaching-assets/006-CONTEXT.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Phase 6 Context: Teaching Assets
|
||||
|
||||
**Status:** Ready for execution
|
||||
**Started:** 2026-04-26
|
||||
|
||||
## Goal
|
||||
|
||||
Generate reviewable teaching asset prompt candidates from ontology concepts.
|
||||
|
||||
## Inputs
|
||||
|
||||
- OpenSpec generated study asset lineage requirement.
|
||||
- `docs/planning/WORKFLOW_CONTRACTS.md` TeachingAssetPrompt contract.
|
||||
- Phase 5 ontology candidates and source evidence.
|
||||
- PRD requirement to verify actual OpenAI model identifier before production
|
||||
image calls.
|
||||
|
||||
## Decisions
|
||||
|
||||
- Generate prompt candidates only; do not call an image provider in this phase.
|
||||
- Default product model key remains `gpt-image-v2`.
|
||||
- Keep `requires_model_id_verification=true` until a future production
|
||||
integration verifies the actual provider model identifier.
|
||||
- Persist prompt lineage with concept, evidence, model key, and review state.
|
||||
|
||||
## Boundaries
|
||||
|
||||
In scope:
|
||||
|
||||
- Teaching asset prompt candidate service.
|
||||
- Asset prompt and snapshot APIs.
|
||||
- Model verification guard represented in output.
|
||||
|
||||
Out of scope:
|
||||
|
||||
- Real image generation calls.
|
||||
- Binary asset storage.
|
||||
- PPT export.
|
||||
- Provider-specific OpenAI SDK integration.
|
||||
44
.planning/phases/006-teaching-assets/006-PLAN.md
Normal file
44
.planning/phases/006-teaching-assets/006-PLAN.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Phase 6 Plan: Teaching Assets
|
||||
|
||||
**Status:** Ready for execution
|
||||
**Phase Goal:** Create source-backed teaching asset prompt candidates.
|
||||
|
||||
## Requirements Covered
|
||||
|
||||
- ASSET-01: System can generate prompt candidates for visual teaching assets.
|
||||
- ASSET-02: Generated assets store source concept, evidence, prompt, model
|
||||
config, and review state.
|
||||
- ASSET-03: Image model configuration verifies the actual OpenAI model
|
||||
identifier before production calls.
|
||||
|
||||
## Tasks
|
||||
|
||||
### 1. Add teaching asset package
|
||||
|
||||
- Define asset prompt candidate, asset type, review state, and snapshot types.
|
||||
- Add in-memory store and service.
|
||||
|
||||
### 2. Generate prompts from ontology evidence
|
||||
|
||||
- Select source-backed ontology concept by concept id.
|
||||
- Generate prompt candidate for diagram, lesson slice, worksheet, or interview
|
||||
card.
|
||||
- Reject prompt generation when concept evidence is missing.
|
||||
|
||||
### 3. Add HTTP endpoints
|
||||
|
||||
- `POST /api/v1/teaching-assets/prompts`
|
||||
- `GET /api/v1/teaching-assets`
|
||||
|
||||
### 4. Add tests and verification
|
||||
|
||||
- Test prompt candidates keep concept and source evidence.
|
||||
- Test model verification guard remains true.
|
||||
- Test HTTP material-ingest-to-asset-prompt flow.
|
||||
- Run Go tests, OpenSpec validation, line-count check, and smoke.
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- Real image generation.
|
||||
- Slide deck creation.
|
||||
- Asset publishing.
|
||||
21
.planning/phases/006-teaching-assets/006-RESEARCH.md
Normal file
21
.planning/phases/006-teaching-assets/006-RESEARCH.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Phase 6 Research: Teaching Assets
|
||||
|
||||
## Findings
|
||||
|
||||
The product needs lineage before generation. A prompt candidate that carries
|
||||
concept, source evidence, model key, and review state is already useful because
|
||||
it can be reviewed before spending image-generation cost or publishing content.
|
||||
|
||||
## Recommended Shape
|
||||
|
||||
- `internal/teachingassets` owns asset prompt candidates.
|
||||
- Use ontology snapshot as the source for concept/evidence lookup.
|
||||
- Generate prompts deterministically for MVP asset types.
|
||||
- Store `requires_model_id_verification=true` so production image generation is
|
||||
blocked until the provider model identifier is verified.
|
||||
|
||||
## Risks
|
||||
|
||||
- Calling image generation before model ID verification would violate PRD.
|
||||
- Prompt candidates without evidence would weaken provenance.
|
||||
- Real slide/PPT generation should be a later phase.
|
||||
38
.planning/phases/006-teaching-assets/006-SUMMARY.md
Normal file
38
.planning/phases/006-teaching-assets/006-SUMMARY.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Phase 6 Summary
|
||||
|
||||
**Status:** Complete
|
||||
**Completed:** 2026-04-26
|
||||
|
||||
## Delivered
|
||||
|
||||
- Added `internal/teachingassets` for prompt candidates and snapshots.
|
||||
- Added image model config key `TUTOR_IMAGE_MODEL_KEY`, defaulting to
|
||||
`gpt-image-v2`.
|
||||
- Added workflow contract structs for `OntologyGap` and
|
||||
`TeachingAssetPrompt`.
|
||||
- Added prompt generation from source-backed ontology concepts.
|
||||
- Added model-id verification guard on every prompt candidate.
|
||||
- Added HTTP endpoints:
|
||||
- `POST /api/v1/teaching-assets/prompts`
|
||||
- `GET /api/v1/teaching-assets`
|
||||
- Added service and HTTP tests.
|
||||
|
||||
## Verification
|
||||
|
||||
```powershell
|
||||
gofmt -w cmd internal
|
||||
go test ./...
|
||||
openspec validate bootstrap-job-tutor-platform --strict
|
||||
```
|
||||
|
||||
Additional smoke check:
|
||||
|
||||
- Material ingestion followed by teaching asset prompt generation returned a
|
||||
source-backed prompt with `requires_model_id_verification=true`.
|
||||
|
||||
## Deferred
|
||||
|
||||
- Real image generation calls.
|
||||
- Provider SDK integration.
|
||||
- Binary asset storage.
|
||||
- Slide/PPT export.
|
||||
29
.planning/phases/006-teaching-assets/006-VERIFICATION.md
Normal file
29
.planning/phases/006-teaching-assets/006-VERIFICATION.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Phase 6 Verification
|
||||
|
||||
## Verdict
|
||||
|
||||
PASS
|
||||
|
||||
## Requirement Coverage
|
||||
|
||||
- ASSET-01: PASS. Teaching asset prompt candidates can be generated for
|
||||
ontology concepts.
|
||||
- ASSET-02: PASS. Prompt candidates store source concept, evidence, prompt,
|
||||
model key, and review state.
|
||||
- ASSET-03: PASS. Prompt candidates carry
|
||||
`requires_model_id_verification=true`, so production image generation remains
|
||||
blocked until the provider model identifier is verified.
|
||||
|
||||
## Evidence
|
||||
|
||||
- `go test ./...` passed.
|
||||
- `openspec validate bootstrap-job-tutor-platform --strict` passed.
|
||||
- Live material-to-asset-prompt smoke passed.
|
||||
- Go source line-count check passed.
|
||||
|
||||
## Residual Risk
|
||||
|
||||
`gpt-image-v2` is currently treated as the product configuration key, not a
|
||||
confirmed provider model id. A future production generation phase must verify
|
||||
the actual OpenAI model identifier against current official docs before making
|
||||
real calls.
|
||||
Reference in New Issue
Block a user