Follow-up to the json-render challenge-widget POC (research spike #2362). The POC is merged to main and deployed, but ships dark: DB flag flag.challengeWidget is OFF on PROD and no flag-on content rebuild has baked widgets. Before it can be activated in PROD, three gates from the #2362 writeup must clear.
Blockers to activation
1. Wire freeText grading
The generator writes a <slug>.challenge-answers.json sidecar with freeText reference answers, but no publish-side consumer exists — freeText challenges render and collect input but cannot be graded.
- Add a
ValidateAnswerSpecs-style upsert to persist reference answers.
- Add a runtime grade endpoint (mirror the AI-quiz grading path).
- MCQ is already client-graded (
answerIndex); this is freeText only.
2. Spec the build-time cache
Unlike the AI-quiz path (loadAiQuizCache), every flag-on rebuild regenerates all specs — cost + per-build nondeterminism.
- Add a per-slug cache for challenge specs (mirror
loadAiQuizCache).
- Required before any bulk/repeat PROD rebuild.
3. AI Core cost sizing
Size a full flag-on PROD generation pass: one model call per substantive step across ~1400 tutorials, capped by AI_AUTHOR_BUILD_CAP.
Also needed before public (not code)
- Editorial review of AI-authored challenges — no human-in-loop review step exists.
- Recorded greenlight to promote past spike status.
Activation order (once gates clear)
- Flip DB flag
flag.challengeWidget = true on PROD.
- Flag-on full PROD rebuild:
gh workflow run rebuild-content.yml --ref main -f mode=full -f challenge-widget-enabled=true.
- Re-smoke (expect transient
done-button-render red against stale content until re-bake completes).
Ref: docs/developers/reference/generative-ui-research.md. Code seams: srv/lib/ai-challenge-spec.js, hugo-apps/src/challenge-render/, scripts/fetch-tutorials.ts.
Follow-up to the json-render challenge-widget POC (research spike #2362). The POC is merged to
mainand deployed, but ships dark: DB flagflag.challengeWidgetis OFF on PROD and no flag-on content rebuild has baked widgets. Before it can be activated in PROD, three gates from the #2362 writeup must clear.Blockers to activation
1. Wire freeText grading
The generator writes a
<slug>.challenge-answers.jsonsidecar with freeText reference answers, but no publish-side consumer exists — freeText challenges render and collect input but cannot be graded.ValidateAnswerSpecs-style upsert to persist reference answers.answerIndex); this is freeText only.2. Spec the build-time cache
Unlike the AI-quiz path (
loadAiQuizCache), every flag-on rebuild regenerates all specs — cost + per-build nondeterminism.loadAiQuizCache).3. AI Core cost sizing
Size a full flag-on PROD generation pass: one model call per substantive step across ~1400 tutorials, capped by
AI_AUTHOR_BUILD_CAP.Also needed before public (not code)
Activation order (once gates clear)
flag.challengeWidget=trueon PROD.gh workflow run rebuild-content.yml --ref main -f mode=full -f challenge-widget-enabled=true.done-button-renderred against stale content until re-bake completes).Ref:
docs/developers/reference/generative-ui-research.md. Code seams:srv/lib/ai-challenge-spec.js,hugo-apps/src/challenge-render/,scripts/fetch-tutorials.ts.