Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat: add progressive powers technique ladder (#3253)
[._.]/ Adam Eivyc545ecff0e18
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 56cf5ce9ad..cb4463a38c 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -23,6 +23,8 @@## POST+- **[issue-3253] Powers practice now teaches a fast mental path before raising the difficulty.** New sessions begin with recall-friendly powers of two, unlock named techniques through speed-and-accuracy mastery, never generate a pair without a documented method, and show the worked steps after a miss and in session review. Manual base and exponent controls remain available when Progressive is switched off.+- **[issue-3252] A new Practice Plan page decides what you're actually studying.** POST had grown to roughly thirty drill types across six subjects plus three standalone study surfaces, with no single place to say which of them you want. Practice Plan (`/post/plan`, also reachable from ⌘K and by voice) lists every topic with a switch, expandable to its individual drills, and shows a live "your daily POST will include…" summary that updates as you flip switches — so you can see what tomorrow's session becomes before you run it. Drill Config still owns how hard each drill is; Practice Plan owns what's in the rotation.- **[issue-3252] "Wordplay only" is now one switch instead of eight.** Wordplay, Verbal Agility and Imagination all used to hide behind a single "Wit & Memory (AI)" checkbox, so keeping just one of them meant unchecking eight individual drill types by hand — and the subjects the launcher showed you weren't the ones the settings page let you edit. Each is now its own topic, and switching one off drops its drills from Full and Quick sessions and from the "Up next" recommendations together.- **[issue-3252] Memorized texts can leave the daily rotation without being deleted.** Not wanting the built-in Elements Song in your reviews used to mean deleting it, which threw away every bit of mastery and scheduling history you'd built up. Each memorized text now has its own switch: switch one off and it stops being recommended and stops being auto-picked for memory drills, but keeps all its history and stays available to practise any time from its own page.diff --git a/client/src/components/meatspace/post/DrillQuestionReview.jsx b/client/src/components/meatspace/post/DrillQuestionReview.jsxindex 8a7361c5fa..de924e98ba 100644--- a/client/src/components/meatspace/post/DrillQuestionReview.jsx+++ b/client/src/components/meatspace/post/DrillQuestionReview.jsx@@ -1,4 +1,5 @@import { Check, X, MinusCircle, AlertTriangle } from 'lucide-react';+import { powersBreakdownFromPrompt } from '../../../lib/powersBreakdown.js';// Sub-second precision — most drill response times are under a few seconds,// so the shared `formatDurationMs` (client/src/utils/formatters.js), which@@ -126,6 +127,27 @@ function GenericReview({ questions, missed, type }) {);}+function PowersReview({ questions, missed }) {+ return (+ <div className="space-y-3">+ <GenericReview questions={questions} missed={missed} type="powers" />+ {missed.map((question, index) => {+ const breakdown = powersBreakdownFromPrompt(question.prompt);+ if (!breakdown || breakdown.fallback) return null;+ return (+ <div key={`${question.prompt}-${index}`} className="rounded-lg border border-port-accent/30 bg-port-bg p-3">+ <div className="text-sm font-mono text-white">{question.prompt}</div>+ <div className="mt-1 text-xs font-semibold text-port-accent">{breakdown.label}</div>+ <ol className="mt-2 space-y-1 text-sm font-mono text-gray-300">+ {breakdown.steps.map((step, stepIndex) => <li key={`${step}-${stepIndex}`}>{step}</li>)}+ </ol>+ </div>+ );+ })}+ </div>+ );+}+// =============================================================================// N-BACK — a letter sequence rendered as chips, colored by signal-detection// outcome (hit / false alarm / miss / correct rejection). Derived purely from@@ -388,6 +410,8 @@ export default function DrillQuestionReview({ type, questions, drillData }) {const missed = list.filter((q) => q.correct === false);switch (type) {+ case 'powers':+ return <PowersReview questions={list} missed={missed} />;case 'n-back':return <NBackReview questions={list} missed={missed} />;case 'digit-span':diff --git a/client/src/components/meatspace/post/DrillQuestionReview.test.jsx b/client/src/components/meatspace/post/DrillQuestionReview.test.jsxindex 05fe4f8457..91fef888f7 100644--- a/client/src/components/meatspace/post/DrillQuestionReview.test.jsx+++ b/client/src/components/meatspace/post/DrillQuestionReview.test.jsx@@ -79,6 +79,18 @@ describe('DrillQuestionReview — generic (math/memory/fallback)', () => {});});+describe('DrillQuestionReview — powers lessons', () => {+ it('shows a worked technique for each missed supported power', () => {+ render(<DrillQuestionReview type="powers" questions={[+ { prompt: '5^9', expected: 1953125, answered: 1000000, correct: false, responseMs: 2200 },+ { prompt: '2^8', expected: 256, answered: 256, correct: true, responseMs: 900 },+ ]} />);+ expect(screen.getByText('Split the exponent from an anchor')).toBeInTheDocument();+ expect(screen.getByText('5^8 = 625 × 625 = 390,625')).toBeInTheDocument();+ expect(screen.queryByText('Powers of 2 — recall table')).not.toBeInTheDocument();+ });+});+describe('DrillQuestionReview — n-back', () => {// Classification is derived purely from answered+correct (no isTarget field// is stored on the question) — this is the reconstruction under test.diff --git a/client/src/components/meatspace/post/PostDrillConfig.jsx b/client/src/components/meatspace/post/PostDrillConfig.jsxindex 8288ef3aab..4a47cf1a2f 100644--- a/client/src/components/meatspace/post/PostDrillConfig.jsx+++ b/client/src/components/meatspace/post/PostDrillConfig.jsx@@ -1,6 +1,6 @@import { useState, useEffect } from 'react';import { ArrowLeft, Save, Brain, Bell, Target, Layers, TrendingUp, TrendingDown, Minus } from 'lucide-react';-import { updatePostConfig, getProviders, getPostAdaptivePreview, getPostMultiplicationProgress, getPostCognitiveProgress } from '../../../services/api';+import { updatePostConfig, getProviders, getPostAdaptivePreview, getPostMultiplicationProgress, getPostPowersProgress, getPostCognitiveProgress } from '../../../services/api';import toast from '../../ui/Toast';import { FormField } from '../../ui/FormField';import { filterSelectableModels, enabledApiProviderFilter } from '../../../utils/providers';@@ -529,6 +529,7 @@ export default function PostDrillConfig({ config, onSaved, onBack }) {);const [adaptivePreview, setAdaptivePreview] = useState(null);const [multiplicationProgress, setMultiplicationProgress] = useState(null);+ const [powersProgress, setPowersProgress] = useState(null);const [cognitiveProgress, setCognitiveProgress] = useState(null);// Opt-in daily reminder — off by default; see server/services/meatspacePostReminder.js.const [reminderEnabled, setReminderEnabled] = useState(@@ -585,6 +586,7 @@ export default function PostDrillConfig({ config, onSaved, onBack }) {// so the config page shows the current rung + mastery before a session.// Progressive defaults ON (undefined → true), matching the server default.const multiplicationProgressive = drillTypes.multiplication?.progressive !== false;+ const powersProgressive = drillTypes.powers?.progressive !== false;useEffect(() => {if (!multiplicationProgressive) { setMultiplicationProgress(null); return; }let cancelled = false;@@ -594,6 +596,15 @@ export default function PostDrillConfig({ config, onSaved, onBack }) {return () => { cancelled = true; };}, [multiplicationProgressive]);+ useEffect(() => {+ if (!powersProgressive) { setPowersProgress(null); return; }+ let cancelled = false;+ getPostPowersProgress()+ .then(p => { if (!cancelled) setPowersProgress(p); })+ .catch(err => console.warn('⚠️ Failed to load powers progress: ' + err.message));+ return () => { cancelled = true; };+ }, [powersProgressive]);+// Progressive cognitive-ladder status (per drill type), same pattern as the// multiplication badge. Fetched whenever the cognitive section is on and any// cognitive drill is progressive — the badge is a transparency aid, so the@@ -617,10 +628,10 @@ export default function PostDrillConfig({ config, onSaved, onBack }) {}));}- function toggleProgressive() {+ function toggleProgressive(type) {setDrillTypes(prev => ({...prev,- multiplication: { ...prev.multiplication, progressive: !(prev.multiplication?.progressive !== false) }+ [type]: { ...prev[type], progressive: !(prev[type]?.progressive !== false) }}));}@@ -934,6 +945,8 @@ export default function PostDrillConfig({ config, onSaved, onBack }) {{Object.entries(DRILL_META).map(([type, meta]) => {const drillConfig = drillTypes[type] || {};const isMultiplication = type === 'multiplication';+ const isPowers = type === 'powers';+ const isProgressive = isMultiplication || isPowers;return (<DrillCardkey={type}@@ -944,12 +957,12 @@ export default function PostDrillConfig({ config, onSaved, onBack }) {onToggle={() => toggleDrill(type)}onUpdateField={(key, value) => updateField(type, key, value)}adaptiveInfo={adaptiveEnabled ? adaptivePreview?.[type] : null}- progressive={isMultiplication ? multiplicationProgressive : undefined}- onToggleProgressive={isMultiplication ? toggleProgressive : undefined}- progressInfo={isMultiplication ? multiplicationProgress : null}- managedFieldKeys={isMultiplication ? ['maxDigits'] : []}- speedGated={isMultiplication}- managedLabel="Max Digits"+ progressive={isProgressive ? (isMultiplication ? multiplicationProgressive : powersProgressive) : undefined}+ onToggleProgressive={isProgressive ? () => toggleProgressive(type) : undefined}+ progressInfo={isMultiplication ? multiplicationProgress : (isPowers ? powersProgress : null)}+ managedFieldKeys={isMultiplication ? ['maxDigits'] : (isPowers ? ['maxExponent'] : [])}+ speedGated={isProgressive}+ managedLabel={isMultiplication ? 'Max Digits' : 'Max Exponent'}/>);})}diff --git a/client/src/components/meatspace/post/PostDrillConfig.test.jsx b/client/src/components/meatspace/post/PostDrillConfig.test.jsxindex f2ac42c05f..9b9b2eb47a 100644--- a/client/src/components/meatspace/post/PostDrillConfig.test.jsx+++ b/client/src/components/meatspace/post/PostDrillConfig.test.jsx@@ -6,12 +6,13 @@ vi.mock('../../../services/api', () => ({getProviders: vi.fn(),getPostAdaptivePreview: vi.fn(),getPostMultiplicationProgress: vi.fn(),+ getPostPowersProgress: vi.fn(),getPostCognitiveProgress: vi.fn(),}));vi.mock('../../ui/Toast', () => ({ default: { success: vi.fn(), error: vi.fn() } }));import PostDrillConfig from './PostDrillConfig';-import { updatePostConfig, getProviders, getPostAdaptivePreview, getPostMultiplicationProgress, getPostCognitiveProgress } from '../../../services/api';+import { updatePostConfig, getProviders, getPostAdaptivePreview, getPostMultiplicationProgress, getPostPowersProgress, getPostCognitiveProgress } from '../../../services/api';import { LLM_DRILL_TYPES, DRILL_LABELS } from './constants';// The generatable LLM drill types + labels, imported from the canonical@@ -58,6 +59,18 @@ beforeEach(() => {thresholds: { minSamples: 12, targetAccuracy: 0.9 },windowDays: 30,});+ getPostPowersProgress.mockResolvedValue({+ level: 0,+ label: 'Powers of 2 — recall table',+ atHardest: false,+ currentMastered: false,+ levels: [+ { level: 0, label: 'Powers of 2 — recall table', mastered: false },+ { level: 1, label: 'Small squares & cubes', mastered: false },+ ],+ thresholds: { minSamples: 12, targetAccuracy: 0.9 },+ windowDays: 30,+ });getPostCognitiveProgress.mockResolvedValue({'n-back': {type: 'n-back', level: 1, label: '2-back @ 2500ms', atHardest: false, currentMastered: false,@@ -245,6 +258,21 @@ describe('PostDrillConfig', () => {expect(updatePostConfig.mock.calls[0][0].mentalMath.drillTypes.multiplication.progressive).toBe(false);});+ it('powers defaults to its technique ladder and can switch back to manual max exponent', async () => {+ await renderConfig(<PostDrillConfig config={config} onSaved={vi.fn()} onBack={vi.fn()} />);+ const toggle = screen.getByRole('switch', { name: 'Progressive difficulty — Powers' });+ expect(toggle.getAttribute('aria-checked')).toBe('true');+ expect(screen.queryByText('Max Exponent')).toBeNull();+ await waitFor(() => expect(getPostPowersProgress).toHaveBeenCalled());+ expect(screen.getByText(/Powers of 2 — recall table/)).toBeTruthy();++ fireEvent.click(toggle);+ expect(screen.getByText('Max Exponent')).toBeTruthy();+ fireEvent.click(screen.getByText('Save'));+ await waitFor(() => expect(updatePostConfig).toHaveBeenCalled());+ expect(updatePostConfig.mock.calls[0][0].mentalMath.drillTypes.powers.progressive).toBe(false);+ });+it('cognitive drills default to Progressive on — n-back hides its knobs and shows its rung', async () => {await renderConfig(<PostDrillConfig config={config} onSaved={vi.fn()} onBack={vi.fn()} />);const toggle = screen.getByRole('switch', { name: 'Progressive difficulty — N-Back' });diff --git a/client/src/components/meatspace/post/PostDrillRunner.jsx b/client/src/components/meatspace/post/PostDrillRunner.jsxindex 80258b5403..dc904295e8 100644--- a/client/src/components/meatspace/post/PostDrillRunner.jsx+++ b/client/src/components/meatspace/post/PostDrillRunner.jsx@@ -2,6 +2,20 @@ import { useState, useEffect, useRef, useCallback } from 'react';import { CheckCircle, XCircle } from 'lucide-react';import { MEMORY_DRILL_TYPES, DRILL_LABELS } from './constants';+import { powersBreakdownFromPrompt } from '../../../lib/powersBreakdown.js';++function PowersLesson({ prompt }) {+ const breakdown = powersBreakdownFromPrompt(prompt);+ if (!breakdown || breakdown.fallback) return null;+ return (+ <div className="mt-3 w-full max-w-md rounded-lg border border-port-accent/30 bg-port-bg p-3 text-left">+ <div className="mb-2 text-xs font-semibold text-port-accent">{breakdown.label}</div>+ <ol className="space-y-1 text-sm font-mono text-gray-300">+ {breakdown.steps.map((step, index) => <li key={`${step}-${index}`}>{step}</li>)}+ </ol>+ </div>+ );+}export default function PostDrillRunner({ session }) {const {@@ -119,8 +133,9 @@ export default function PostDrillRunner({ session }) {)}<div className="text-sm text-gray-400">Expected</div><div className="text-3xl font-mono font-bold text-port-success">{lastAnswer.expected}</div>+ <PowersLesson prompt={lastAnswer.prompt} />{/* Hint: break down the calculation */}- {lastAnswer.prompt && (+ {lastAnswer.prompt && powersBreakdownFromPrompt(lastAnswer.prompt)?.fallback !== false && (<div className="text-xs text-gray-500 mt-2 bg-port-bg border border-port-border rounded px-3 py-2">{formatHint(lastAnswer.prompt, lastAnswer.expected)}</div>@@ -245,6 +260,5 @@ function formatHint(prompt, expected) {if (!match) return `${prompt} = ${expected}`;const [, a, op, b] = match;if (op === 'x') return `${a} × ${b} = ${expected}`;- if (op === '^') return `${a}^${b} = ${expected}`;return `${prompt} = ${expected}`;}diff --git a/client/src/components/meatspace/post/PostDrillRunner.test.jsx b/client/src/components/meatspace/post/PostDrillRunner.test.jsxnew file mode 100644index 0000000000..8dd6c1b0e7--- /dev/null+++ b/client/src/components/meatspace/post/PostDrillRunner.test.jsx@@ -0,0 +1,24 @@+import { describe, expect, it, vi } from 'vitest';+import { render, screen } from '@testing-library/react';+import PostDrillRunner from './PostDrillRunner';++describe('PostDrillRunner Powers training feedback', () => {+ it('teaches the named mental path after a missed Powers answer', () => {+ render(<PostDrillRunner session={{+ currentDrill: { type: 'powers', questions: [{ prompt: '2^13', expected: 8192 }], timeLimitSec: 90 },+ currentQuestionIndex: 0,+ currentDrillIndex: 0,+ drillCount: 1,+ state: 'drilling',+ isTraining: true,+ lastAnswer: { prompt: '2^13', expected: 8192, answered: 4096, correct: false },+ submitAnswer: vi.fn(),+ skipQuestion: vi.fn(),+ acknowledgeAnswer: vi.fn(),+ timeExpired: vi.fn(),+ }} />);++ expect(screen.getByText('Double up from 2^10')).toBeInTheDocument();+ expect(screen.getByText('× 2 → 2^13 = 8,192')).toBeInTheDocument();+ });+});diff --git a/client/src/lib/README.md b/client/src/lib/README.mdindex a94333861e..ea54cb00d3 100644--- a/client/src/lib/README.md+++ b/client/src/lib/README.md@@ -145,6 +145,7 @@ grep -i "what you want to do" client/src/lib/README.md| `songCraft.js` | Canonical a cappella song-craft reference data rendered by the Songs Guide (`/songs/guide`) and reused by the Song editor: `RHYTHM_SHAPES` / `DIRGE_RHYTHM_SHAPES` (dirge & ballad pulse feels with BPM bands), `VOICE_LAYERS` (foundation-first harmony build ladder), `LEARNING_STEPS` (practice sequence), `NOTATION_HELP` (lead-sheet/notation primers), `SOLFEGE_DEGREES` + `solfegeForDegree(n)`, and `rhythmShapeLabel(id)` (human-readable "Slow 4/4 ballad · dirge (56–76 BPM)" label shared by the editor's picker and read view). Pure data; pickers and docs read the same source so they can't drift. || `songPlayback.js` | `createLayeredPlayer(takes)` — decode N recorded vocal takes and start them together on one shared `AudioContext` so they stack into a layered a cappella performance (sample-aligned, per-layer mute). Used by the Song editor's recording mixer. || `songProgress.js` | Pure training-progress core for the song system's memorize/learn/track mode. `deriveTrainingSections(score, lyricSections?)` slices a lead-sheet score into blank-line-separated trainable sections (each a self-contained header+block score, positional stable id, lyric-matched label); `recordAttempt(progress, scope, summary)` appends a graded take to a scope's bounded rolling history (drops zero-note takes); `scopeStats(progress, scope)`/`wholeSongStats` derive `{ attempts, best, average, last, streak, learned }` (learned = streak of ≥`LEARNED_PERCENT` takes ≥`LEARNED_STREAK`); `weakestSections(progress, sections)` ranks weak/un-attempted sections for spaced-repetition; `memorizationPercent` is the learned-section share; `hideLevelFor(average)` maps a rolling average to a progressive lyric/note-hiding level (`show`/`dim`/`hide`/`blind`). No React/audio — `useSongTraining` drives it. |+| `powersBreakdown.js` | Pure, DOM-free Powers mental-math lessons — maps supported base/exponent pairs to named techniques and deterministic worked steps for drill misses and historical review. || `spriteCollectionActions.js` | Gating for the Sprite Manager asset collection's inline actions (#2931). `buildCollectionActions({ detail, walkPending, referencePending, generateWalk, generateAnchor, onRequestTrim })` → `{ regenerateFor(asset), trimFor(asset) }`, each returning `null` for an asset it can't act on. Regenerate mirrors the authoritative workflow surfaces exactly — a walk direction is regenerable only when its anchor is locked, the direction isn't approved, the walk set isn't finalized and no render is in flight; a reference anchor only while it's an unlocked candidate (`south`/main is excluded, since it needs a design prompt or upload). Trim is offered only for a run that actually packed a strip (the trim endpoint 409s otherwise). Each actionable regenerate also names the `correctionKey` (#3134) the card binds its inline correction note to — `walk:<dir>` for a walk output, the bare direction for an anchor — so the card can never write a still-image note into a video re-roll. Pure — takes callbacks, performs no I/O. Consumes the facets from `spriteFacets.js` and the key vocabulary from `spriteCorrections.js`. || `spriteCorrections.js` | The Sprite Manager's correction-note key vocabulary + request fragment (#2964, extended to every regeneration surface by #3134). Every re-roll surface writes into ONE page-owned `corrections` map (`Sprites.jsx`); this module owns its keys so the pure gating layer (`spriteCollectionActions.js`) and the React surfaces (`CorrectionNote.jsx` + hosts) agree without the pure layer importing a component. Keys are namespaced per SURFACE, not per direction — `anchorCorrectionKey(dir)` keeps the bare direction (pre-#3134 state untouched) while `walkCorrectionKey(dir)` / `MAIN_CORRECTION_KEY` / `AMBIENT_REFERENCE_CORRECTION_KEY` prefix, so a still-image anchor note can never ride a walk-VIDEO re-roll. `trackCorrectionKey(trackId, dir)` (#3136) replaces the per-track keys the scanner/ambient surfaces each spelled by hand, so a user-defined animation track gets a namespaced key with nothing to add here. `correctionPromptPayload(corrections, key)` → `{ correctionPrompt }` only when the note is non-empty after trimming, else `{}` — the guarantee that a blank note leaves the server prompt byte-identical to a blind regenerate. Pure — no React, no I/O. || `spriteFacets.js` | Client-side facet classifier for the Sprite Manager's asset collection (#2931), mirroring the source pipeline's `classify_asset()`. `classifySpriteAsset(path)` decodes a record-relative asset path into `{ family, status, role, direction, runId }` — `status ∈ runtime/approved/candidate/superseded/rejected/source`, `role ∈ reference/strip/animation/frame/atlas/evidence/sprite/manifest` — and is total (an unknown path degrades to `sprite`/`source` rather than throwing). `classifySpriteAssets(assets)` adds the one facet only knowable across a listing: an approved asset below the highest `-vN` of its stem becomes `superseded`. `groupSpriteAssetsByRole(assets)` returns render-ready `{ role, label, assets }` sections in `SPRITE_ASSET_ROLES` order — it does NOT render a `manifest` group: each runtime atlas's sidecar manifest is folded onto its atlas row as `row.manifest`, and other behind-the-scenes JSON is omitted. `runtimeVersionDir(path)` / `isRuntimeVersionPath(path)` / `isRuntimeSidecarManifest(path)` expose the `runtime/vN` grammar (the sidecar-pairing key and the "is this a build manifest" predicate) so callers like `AssetInspector` reuse one definition instead of re-regexing. Also exports `SPRITE_DIRECTIONS` (mirror of `server/services/sprites/prompts.js`) — the `direction`/`runId` facets are what drive the collection's Regenerate and Edit-in-Loop-Trimmer actions. Pure — no React, no I/O. |diff --git a/client/src/lib/index.js b/client/src/lib/index.jsindex db1706b6cf..42d1c19c3e 100644--- a/client/src/lib/index.js+++ b/client/src/lib/index.js@@ -107,6 +107,7 @@ export * from './midiNotes.js';export * from './midiPlayback.js';export * from './pianoKeyboard.js';export * from './pitchDetect.js';+export * from './powersBreakdown.js';export * from './referenceAnalysis.js';export * from './scoreNotation.js';export * from './scorePlayback.js';diff --git a/client/src/lib/powersBreakdown.js b/client/src/lib/powersBreakdown.jsnew file mode 100644index 0000000000..c549f78a0b--- /dev/null+++ b/client/src/lib/powersBreakdown.js@@ -0,0 +1,76 @@+const value = (base, exponent) => Math.pow(base, exponent).toLocaleString('en-US');++const recalled = (base, exponent, technique, label) => ({+ technique,+ label,+ steps: [+ `${base}^${exponent} is an anchor worth recalling`,+ `${base}^${exponent} = ${value(base, exponent)}`,+ ],+ fallback: false,+});++/** Return a deterministic fast-math lesson for one supported powers pair. */+export function powersBreakdown(base, exponent) {+ if (base === 2 && exponent >= 2 && exponent <= 10) {+ return recalled(base, exponent, 'recall-2', 'Powers of 2 — recall table');+ }+ if ((base === 3 && exponent >= 2 && exponent <= 5)+ || (base === 5 && exponent >= 2 && exponent <= 4)+ || ((base === 7 || base === 9) && exponent === 2)) {+ return recalled(base, exponent, 'recall-small', 'Small squares & cubes');+ }+ if (base === 2 && exponent >= 11 && exponent <= 16) {+ const steps = ['2^10 = 1,024'];+ for (let power = 11; power <= exponent; power += 1) {+ steps.push(`× 2 → 2^${power} = ${value(2, power)}`);+ }+ return { technique: 'double-chain', label: 'Double up from 2^10', steps, fallback: false };+ }+ if (base === 5 && exponent >= 5 && exponent <= 7) {+ return {+ technique: 'halve-shift',+ label: 'Use 5^n = 10^n / 2^n',+ steps: [+ `5^${exponent} = 10^${exponent} ÷ 2^${exponent}`,+ `${value(10, exponent)} ÷ ${value(2, exponent)} = ${value(5, exponent)}`,+ ],+ fallback: false,+ };+ }+ if (base === 3 && exponent >= 6 && exponent <= 9) {+ const anchor = exponent >= 8 ? 4 : 3;+ const remainder = exponent - anchor;+ return {+ technique: 'split-exponent',+ label: 'Split the exponent from an anchor',+ steps: [+ `3^${exponent} = 3^${anchor} × 3^${remainder}`,+ `${value(3, anchor)} × ${value(3, remainder)} = ${value(3, exponent)}`,+ ],+ fallback: false,+ };+ }+ if (base === 5 && exponent >= 8 && exponent <= 10) {+ const remainder = exponent - 8;+ const steps = [+ '5^4 = 625 (anchor)',+ '5^8 = 625 × 625 = 390,625',+ ];+ if (remainder > 0) {+ steps.push(`5^${exponent} = 390,625 × ${value(5, remainder)} = ${value(5, exponent)}`);+ }+ return { technique: 'split-exponent', label: 'Split the exponent from an anchor', steps, fallback: false };+ }+ return {+ technique: null,+ label: 'No fast path is defined',+ steps: [`${base}^${exponent} = ${value(base, exponent)}`],+ fallback: true,+ };+}++export function powersBreakdownFromPrompt(prompt) {+ const match = typeof prompt === 'string' ? prompt.match(/^(\d+)\^(\d+)$/) : null;+ return match ? powersBreakdown(Number(match[1]), Number(match[2])) : null;+}diff --git a/client/src/lib/powersBreakdown.test.js b/client/src/lib/powersBreakdown.test.jsnew file mode 100644index 0000000000..f9c2eef44d--- /dev/null+++ b/client/src/lib/powersBreakdown.test.js@@ -0,0 +1,25 @@+import { describe, expect, it } from 'vitest';+import { powersBreakdown, powersBreakdownFromPrompt } from './powersBreakdown.js';++describe('powersBreakdown', () => {+ it('renders the worked split-exponent path for 5^9', () => {+ const result = powersBreakdown(5, 9);+ expect(result.technique).toBe('split-exponent');+ expect(result.steps).toContain('5^8 = 625 × 625 = 390,625');+ expect(result.steps.at(-1)).toContain('1,953,125');+ });++ it('renders every doubling step from the 2^10 anchor', () => {+ expect(powersBreakdown(2, 13).steps).toEqual([+ '2^10 = 1,024',+ '× 2 → 2^11 = 2,048',+ '× 2 → 2^12 = 4,096',+ '× 2 → 2^13 = 8,192',+ ]);+ });++ it('returns an explicit fallback for an unsupported pair', () => {+ expect(powersBreakdown(7, 8).fallback).toBe(true);+ expect(powersBreakdownFromPrompt('not a power')).toBeNull();+ });+});diff --git a/client/src/services/apiMeatspace.js b/client/src/services/apiMeatspace.jsindex b44730c3df..f15850a2d5 100644--- a/client/src/services/apiMeatspace.js+++ b/client/src/services/apiMeatspace.js@@ -213,6 +213,7 @@ export const getPostRecommendations = (limit, options = {}) => request({ silent: true, ...options });export const getPostMultiplicationProgress = () => request('/meatspace/post/multiplication-progress');+export const getPostPowersProgress = () => request('/meatspace/post/powers-progress');export const getPostCognitiveProgress = () => request('/meatspace/post/cognitive-progress');export const generatePostDrill = (type, config = {}, providerId, model, options = {}) => request('/meatspace/post/drill', {method: 'POST',diff --git a/server/lib/README.md b/server/lib/README.mdindex 20d559c381..fb18b7af1f 100644--- a/server/lib/README.md+++ b/server/lib/README.md@@ -250,6 +250,7 @@ The barrel `server/lib/index.js` is a machine-checkable enumeration of every pub| `pipelineIssueOrder.js` | Pure renumber algorithm for pipeline issues. || `postAdaptive.js` | Pure POST adaptive-difficulty policy — nudges a math drill's primary knob (`steps`/`maxDigits`/`maxExponent`/`tolerancePct`) up/down within clamped bounds from recent scored performance. Opt-in via the config Adaptive toggle. || `postMultiplicationLadder.js` | Pure progressive multiplication ladder — mastery-gated difficulty rungs (`[1,1]` → `[1,2]` → `[1,1,1]` → …). Resolves the user's current level from per-level speed+accuracy stats so the plain multiplication drill ramps up instead of starting at a fixed hard difficulty. On by default. Built on `postProgression.js`. |+| `postPowersLadder.js` | Pure technique-anchored Powers ladder — cumulative named-method pools, full supported-pair registry, and speed+accuracy mastery progression built on `postProgression.js`. || `postProgression.js` | Generic mastery-gated progression ladder (extracted from `postMultiplicationLadder.js`) — `createProgression({ levels, describeLevel, speedTargetForLevel? })` resolves a user's current rung from per-level stats with an anti-demotion floor. Also defines the cognitive-drill ladders (n-back / digit-span / schulte / mental-rotation / stroop) and their level→generator-config mapping. || `postTopics.js` | Pure POST practice-topic registry — `POST_TOPICS` (`{ id, label, module, surface, drillTypes }`) is the single source of truth for "what am I studying?", plus `resolveTopicForDrillType` / `isTopicEnabled` / `isMemoryItemEnabled`. Gates session composition and recommendations, incl. the standalone Memory and Morse surfaces. Mirrored to the client's post `constants.js` (parity test). || `postStreak.js` | Pure DST-safe POST practice-streak math — the single `computePostStreaks` implementation shared by scored sessions and the training log, plus `computeUnifiedStreak` (a day is active with EITHER a session or a practice entry). |diff --git a/server/lib/index.js b/server/lib/index.jsindex bd6dd66400..072e1e2721 100644--- a/server/lib/index.js+++ b/server/lib/index.js@@ -225,6 +225,7 @@ export * from './personaTraitBlend.js';export * from './pipelineIssueOrder.js';export * from './postAdaptive.js';export * from './postMultiplicationLadder.js';+export * from './postPowersLadder.js';export * from './postProgression.js';export * from './postStreak.js';export * from './postTopics.js';diff --git a/server/lib/postPowersLadder.js b/server/lib/postPowersLadder.jsnew file mode 100644index 0000000000..72679f91d8--- /dev/null+++ b/server/lib/postPowersLadder.js@@ -0,0 +1,108 @@+/**+ * Technique-anchored progressive ladder for the POST Powers drill.+ *+ * Every pair in this module has a named fast mental path. Progressive+ * generation derives its candidate pool from this table, so unsupported+ * base/exponent combinations can never leak into a laddered drill.+ */++import { createProgression, PROGRESSION_MASTERY_DEFAULTS } from './postProgression.js';++const rangePairs = (base, first, last) => Array.from(+ { length: last - first + 1 },+ (_, index) => ({ base, exponent: first + index })+);++export const POWERS_TECHNIQUES = [+ {+ id: 'recall-2',+ label: 'Powers of 2 — recall table',+ pairs: rangePairs(2, 2, 10),+ targetMs: 4000,+ },+ {+ id: 'recall-small',+ label: 'Small squares & cubes',+ pairs: [+ ...rangePairs(3, 2, 5),+ ...rangePairs(5, 2, 4),+ { base: 7, exponent: 2 },+ { base: 9, exponent: 2 },+ ],+ targetMs: 5000,+ },+ {+ id: 'double-chain',+ label: 'Double up from 2^10',+ pairs: rangePairs(2, 11, 16),+ targetMs: 7000,+ },+ {+ id: 'halve-shift',+ label: 'Use 5^n = 10^n / 2^n',+ pairs: rangePairs(5, 5, 7),+ targetMs: 9000,+ },+ {+ id: 'split-exponent',+ label: 'Split the exponent from an anchor',+ pairs: [+ ...rangePairs(3, 6, 9),+ ...rangePairs(5, 8, 10),+ ],+ targetMs: 11000,+ },+];++export const POWERS_LADDER = POWERS_TECHNIQUES.map(technique => technique.id);+export const MAX_POWERS_LEVEL = POWERS_LADDER.length - 1;+export const POWERS_MASTERY_DEFAULTS = {+ ...PROGRESSION_MASTERY_DEFAULTS,+ minSamples: 12,+ targetAccuracy: 0.9,+ windowDays: 30,+ responseMsCap: 90000,+};++const pairKey = (base, exponent) => `${base}^${exponent}`;+const PAIR_INDEX = new Map();+for (const [level, technique] of POWERS_TECHNIQUES.entries()) {+ for (const pair of technique.pairs) {+ PAIR_INDEX.set(pairKey(pair.base, pair.exponent), { ...pair, level, technique: technique.id });+ }+}++export const ALL_POWERS_PAIRS = [...PAIR_INDEX.values()];++const progression = createProgression({+ levels: POWERS_LADDER,+ describeLevel: level => POWERS_TECHNIQUES[level].label,+ mastery: POWERS_MASTERY_DEFAULTS,+ speedTargetForLevel: level => POWERS_TECHNIQUES[level].targetMs,+});++export function clampPowersLevel(level) {+ return progression.clampLevel(level);+}++export function powersTechniqueForPair(base, exponent) {+ return PAIR_INDEX.get(pairKey(base, exponent)) || null;+}++export function powersPoolForLevel(level) {+ const maxLevel = clampPowersLevel(level);+ return ALL_POWERS_PAIRS.filter(pair => pair.level <= maxLevel);+}++export function resolvePowersLevel(levelStats = {}, opts = {}, floorLevel = 0) {+ const result = progression.resolveLevel(levelStats, opts, floorLevel);+ return {+ ...result,+ technique: POWERS_TECHNIQUES[result.level].id,+ levels: result.levels.map(({ descriptor, ...rung }) => ({ ...rung, technique: descriptor })),+ };+}++export function powersLevelMastered(stat, level, opts = POWERS_MASTERY_DEFAULTS) {+ return progression.isLevelMastered(stat, level, opts);+}diff --git a/server/lib/postPowersLadder.test.js b/server/lib/postPowersLadder.test.jsnew file mode 100644index 0000000000..01abe555cb--- /dev/null+++ b/server/lib/postPowersLadder.test.js@@ -0,0 +1,49 @@+import { describe, expect, it } from 'vitest';+import { powersBreakdown } from '../../client/src/lib/powersBreakdown.js';+import {+ ALL_POWERS_PAIRS,+ MAX_POWERS_LEVEL,+ POWERS_TECHNIQUES,+ powersPoolForLevel,+ powersTechniqueForPair,+ resolvePowersLevel,+} from './postPowersLadder.js';++describe('powers ladder', () => {+ it('builds cumulative pools in technique order', () => {+ expect(powersPoolForLevel(0)).toEqual(+ ALL_POWERS_PAIRS.filter(pair => pair.technique === 'recall-2')+ );+ for (let level = 1; level <= MAX_POWERS_LEVEL; level += 1) {+ const previous = powersPoolForLevel(level - 1);+ const current = powersPoolForLevel(level);+ expect(current.length).toBeGreaterThan(previous.length);+ expect(current.slice(0, previous.length)).toEqual(previous);+ }+ });++ it('maps every generatable pair to exactly one named technique', () => {+ const keys = ALL_POWERS_PAIRS.map(pair => `${pair.base}^${pair.exponent}`);+ expect(new Set(keys).size).toBe(keys.length);+ for (const pair of ALL_POWERS_PAIRS) {+ expect(powersTechniqueForPair(pair.base, pair.exponent)?.technique).toBe(pair.technique);+ }+ });++ it('starts fresh at recall and advances without demoting below the earned floor', () => {+ expect(resolvePowersLevel({}).level).toBe(0);+ const mastered = { samples: 20, accuracy: 1, avgResponseMs: 1000 };+ expect(resolvePowersLevel({ 0: mastered, 1: mastered }).level).toBe(2);+ expect(resolvePowersLevel({}, {}, 3).level).toBe(3);+ });++ it('has a multi-step client teaching breakdown for every generated pair', () => {+ expect(POWERS_TECHNIQUES).toHaveLength(MAX_POWERS_LEVEL + 1);+ for (const pair of ALL_POWERS_PAIRS) {+ const breakdown = powersBreakdown(pair.base, pair.exponent);+ expect(breakdown.technique).toBe(pair.technique);+ expect(breakdown.steps.length).toBeGreaterThanOrEqual(2);+ expect(breakdown.fallback).toBe(false);+ }+ });+});diff --git a/server/lib/postValidation.js b/server/lib/postValidation.jsindex 547010831f..3f4094bce6 100644--- a/server/lib/postValidation.js+++ b/server/lib/postValidation.js@@ -107,6 +107,7 @@ const drillTypeConfigSchema = z.object({// session submit), so they must survive validation on the round-trip.progressive: z.boolean().optional(),level: z.number().int().min(0).max(50).optional(),+ technique: z.string().max(100).optional(),factors: z.array(z.number().int().min(1).max(4)).min(2).max(6).optional(),// Maintenance-review rep (issue #2096): `review` bypasses the progression// override so a specific mastered-but-inactive rung is re-verified at its owndiff --git a/server/lib/postValidation.test.js b/server/lib/postValidation.test.jsindex 4454fac7bc..51b93287ab 100644--- a/server/lib/postValidation.test.js+++ b/server/lib/postValidation.test.js@@ -343,6 +343,14 @@ describe('drillTypeConfigSchema numeric bounds', () => {expect(parsed.config).toMatchObject({ steps: 50, subtrahend: 100, maxDigits: 4, tolerancePct: 50 });});+ it('preserves the server-computed Powers ladder level and technique', () => {+ const parsed = postDrillRequestSchema.parse({+ type: 'powers',+ config: { progressive: true, level: 4, technique: 'split-exponent' },+ });+ expect(parsed.config).toMatchObject({ progressive: true, level: 4, technique: 'split-exponent' });+ });+it('rejects steps above the max (50) and below the min (1)', () => {expect(() => postDrillRequestSchema.parse({ type: 'serial-subtraction', config: { steps: 51 } })).toThrow();expect(() => postDrillRequestSchema.parse({ type: 'serial-subtraction', config: { steps: 0 } })).toThrow();diff --git a/server/routes/meatspacePostRoutes.js b/server/routes/meatspacePostRoutes.jsindex 6654d81fe9..363ccdf171 100644--- a/server/routes/meatspacePostRoutes.js+++ b/server/routes/meatspacePostRoutes.js@@ -212,6 +212,12 @@ router.get('/post/multiplication-progress', asyncHandler(async (req, res) => {res.json(progress);}));+/** Current technique-anchored Powers ladder level and mastery status. */+router.get('/post/powers-progress', asyncHandler(async (req, res) => {+ const progress = await postService.getPowersProgress();+ res.json(progress);+}));+/*** GET /api/meatspace/post/cognitive-progress* Per-drill progressive-ladder level + per-rung mastery for the laddereddiff --git a/server/services/meatspacePost.js b/server/services/meatspacePost.jsindex a7c245b7cd..0c5ea6f2b9 100644--- a/server/services/meatspacePost.js+++ b/server/services/meatspacePost.js@@ -14,6 +14,11 @@ import { LLM_DRILL_TYPES, MEMORY_DRILL_TYPES, POST_SUPPORTED_MEMORY_TYPES } fromimport { resolveTopicForDrillType, isTopicEnabled, isMemoryItemEnabled } from '../lib/postTopics.js';import { adaptDrillConfig, ADAPTIVE_SPECS, ADAPTIVE_DEFAULTS } from '../lib/postAdaptive.js';import { resolveMultiplicationLevel, MASTERY_DEFAULTS } from '../lib/postMultiplicationLadder.js';+import {+ POWERS_MASTERY_DEFAULTS,+ powersPoolForLevel,+ resolvePowersLevel,+} from '../lib/postPowersLadder.js';import {cognitiveLadder,cognitiveLevelConfig,@@ -69,7 +74,7 @@ const DEFAULT_CONFIG = {// `maxDigits` difficulty. `maxDigits` is retained as the fallback for when// a user turns the progressive ladder off.'multiplication': { enabled: true, count: 10, maxDigits: 2, progressive: true, timeLimitSec: 120 },- 'powers': { enabled: true, bases: [2, 3, 5], maxExponent: 10, count: 8, timeLimitSec: 90 },+ 'powers': { enabled: true, bases: [2, 3, 5], maxExponent: 10, count: 8, progressive: true, timeLimitSec: 90 },'estimation': { enabled: true, count: 5, tolerancePct: 10, timeLimitSec: 120 }}},@@ -1321,7 +1326,28 @@ export function generateMultiplication(count = 10, maxDigits = 2, factors = nullreturn { type: 'multiplication', config, questions };}-export function generatePowers(bases, maxExponent = 10, count = 8) {+export function generatePowers(bases, maxExponent = 10, count = 8, level = null) {+ if (Number.isInteger(level)) {+ const pool = powersPoolForLevel(level);+ const questions = Array.from({ length: count }, () => {+ const pair = pool[Math.floor(Math.random() * pool.length)];+ return {+ prompt: `${pair.base}^${pair.exponent}`,+ expected: Math.pow(pair.base, pair.exponent),+ technique: pair.technique,+ techniqueLevel: pair.level,+ };+ }).sort((a, b) => a.techniqueLevel - b.techniqueLevel);+ return {+ type: 'powers',+ config: {+ count,+ level,+ technique: pool.at(-1).technique,+ },+ questions,+ };+ }bases = Array.isArray(bases) && bases.length > 0 ? bases : [2, 3, 5];const questions = [];for (let i = 0; i < count; i++) {@@ -1367,7 +1393,7 @@ export function generateDrill(type, config = {}) {case 'multiplication':return generateMultiplication(config.count, config.maxDigits, config.factors, config.level);case 'powers':- return generatePowers(config.bases, config.maxExponent, config.count);+ return generatePowers(config.bases, config.maxExponent, config.count, config.level);case 'estimation':return generateEstimation(config.count, config.tolerancePct);case 'n-back':@@ -1465,6 +1491,41 @@ async function getMultiplicationLevelStats(windowDays = MASTERY_DEFAULTS.windowDreturn { stats, floorLevel };}+async function getPowersLevelStats(windowDays = POWERS_MASTERY_DEFAULTS.windowDays) {+ const sessions = await getPostSessions();+ const cutoffStr = windowDays > 0 ? ymdShift(await localToday(), -windowDays) : null;+ const byLevel = {};+ let floorLevel = 0;+ for (const session of sessions) {+ for (const task of session.tasks || []) {+ if (task.type !== 'powers') continue;+ const level = Number.isInteger(task.config?.level) ? task.config.level : null;+ if (level == null) continue;+ const anyAnswered = (task.questions || []).some(question => question?.answered != null);+ if (anyAnswered && level > floorLevel) floorLevel = level;+ if (cutoffStr && session.date < cutoffStr) continue;+ const bucket = byLevel[level] || (byLevel[level] = { samples: 0, correct: 0, totalResponseMs: 0 });+ for (const question of task.questions || []) {+ if (question?.answered == null) continue;+ bucket.samples += 1;+ if (question.correct) bucket.correct += 1;+ bucket.totalResponseMs += Math.min(+ Math.max(0, question.responseMs || 0),+ POWERS_MASTERY_DEFAULTS.responseMsCap+ );+ }+ }+ }+ return {+ stats: Object.fromEntries(Object.entries(byLevel).map(([level, bucket]) => [level, {+ samples: bucket.samples,+ accuracy: bucket.samples ? bucket.correct / bucket.samples : 0,+ avgResponseMs: bucket.samples ? bucket.totalResponseMs / bucket.samples : 0,+ }])),+ floorLevel,+ };+}+/*** Resolve the current progressive-multiplication difficulty from history.* Exposed for the config UI / route so it can show the ladder + mastery status.@@ -1475,6 +1536,19 @@ export async function getMultiplicationProgress() {return { ...progression, windowDays: MASTERY_DEFAULTS.windowDays, thresholds: { minSamples: MASTERY_DEFAULTS.minSamples, targetAccuracy: MASTERY_DEFAULTS.targetAccuracy } };}+export async function getPowersProgress() {+ const { stats, floorLevel } = await getPowersLevelStats(POWERS_MASTERY_DEFAULTS.windowDays);+ const progression = resolvePowersLevel(stats, {}, floorLevel);+ return {+ ...progression,+ windowDays: POWERS_MASTERY_DEFAULTS.windowDays,+ thresholds: {+ minSamples: POWERS_MASTERY_DEFAULTS.minSamples,+ targetAccuracy: POWERS_MASTERY_DEFAULTS.targetAccuracy,+ },+ };+}+/*** Aggregate a laddered cognitive drill's performance per level from scored* history so its ladder can decide whether each rung is mastered. Cognitive@@ -1588,6 +1662,25 @@ export async function resolveDrillConfig(type, requestedConfig = {}) {}}+ if (type === 'powers') {+ const powersCfg = config?.mentalMath?.drillTypes?.powers || {};+ if (powersCfg.progressive !== false) {+ const { stats, floorLevel } = await getPowersLevelStats(POWERS_MASTERY_DEFAULTS.windowDays);+ const progression = resolvePowersLevel(stats, {}, floorLevel);+ const { bases: _bases, maxExponent: _maxExponent, ...rest } = requestedConfig || {};+ return {+ config: {+ ...rest,+ count: rest.count ?? powersCfg.count ?? 8,+ level: progression.level,+ technique: progression.technique,+ },+ adaptive: null,+ progression,+ };+ }+ }+// Progressive cognitive ladders (default ON) — per-skill difficulty rungs// (n-back n/stimulusMs, digit-span span/direction, schulte grid, mental-// rotation/stroop trial count). Selects the rung by sustained-accuracy@@ -1637,6 +1730,7 @@ export async function getAdaptivePreview() {const stats = await getPostStats(ADAPTIVE_DEFAULTS.windowDays);const savedDrills = config?.mentalMath?.drillTypes || {};const multiplicationProgressive = savedDrills.multiplication?.progressive !== false;+ const powersProgressive = savedDrills.powers?.progressive !== false;const drills = {};for (const type of Object.keys(ADAPTIVE_SPECS)) {@@ -1646,6 +1740,10 @@ export async function getAdaptivePreview() {drills[type] = { ladder: true, ...(await getMultiplicationProgress()) };continue;}+ if (type === 'powers' && powersProgressive) {+ drills[type] = { ladder: true, ...(await getPowersProgress()) };+ continue;+ }const key = `${MATH_MODULE}:${type}`;const accuracy = stats.byDrillAccuracy?.[key];const completion = stats.byDrillCompletion?.[key];@@ -1774,4 +1872,3 @@ function computeSessionScore(tasks, weights = {}) {if (!totalWeight) return 0;return Math.round(totalWeighted / totalWeight);}-diff --git a/server/services/meatspacePost.test.js b/server/services/meatspacePost.test.jsindex 8a22817dbc..928d5cfa59 100644--- a/server/services/meatspacePost.test.js+++ b/server/services/meatspacePost.test.js@@ -201,6 +201,18 @@ describe('generateMultiplication — progressive factors', () => {// =============================================================================describe('generatePowers', () => {+ it('uses only technique-covered pairs and orders progressive questions easiest first', () => {+ const result = generatePowers([99], 20, 30, 4);+ expect(result.config).toMatchObject({ level: 4, technique: 'split-exponent' });+ expect(result.questions.map(question => question.techniqueLevel)).toEqual(+ [...result.questions.map(question => question.techniqueLevel)].sort((a, b) => a - b)+ );+ for (const question of result.questions) {+ expect(question.technique).toBeTruthy();+ expect(question.prompt).not.toMatch(/^99\^/);+ }+ });+it('generates requested number of questions', () => {const result = generatePowers([2, 3], 8, 6);expect(result.questions).toHaveLength(6);@@ -1171,7 +1183,10 @@ describe('adaptive signal is accuracy-driven — fast-sloppy vs slow-accurate direadJSONFile.mockImplementation((path, defaultValue) => {const p = String(path);if (p.includes('post-sessions')) return Promise.resolve({ sessions });- if (p.includes('post-config')) return Promise.resolve({ adaptive: { enabled: true } });+ if (p.includes('post-config')) return Promise.resolve({+ adaptive: { enabled: true },+ mentalMath: { drillTypes: { powers: { progressive: false } } },+ });return Promise.resolve(defaultValue);});}@@ -1408,7 +1423,10 @@ describe('resolveDrillConfig — adaptive integration for serial-subtraction/pow}],});}- if (p.includes('post-config')) return Promise.resolve({ adaptive: { enabled: true } });+ if (p.includes('post-config')) return Promise.resolve({+ adaptive: { enabled: true },+ mentalMath: { drillTypes: { powers: { progressive: false } } },+ });return Promise.resolve(defaultValue);});}