Skip to content

feat: validate M01 learning loop end to end - #2

Open
tim8es wants to merge 21 commits into
docs/platform-foundationfrom
feature/m01-learning-validation
Open

feat: validate M01 learning loop end to end#2
tim8es wants to merge 21 commits into
docs/platform-foundationfrom
feature/m01-learning-validation

Conversation

@tim8es

@tim8es tim8es commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Goal

Implement Phase 1 from the approved platform foundation: validate one representative module (M01 — Проект как система) end-to-end before any v1 rewrite.

Scope

  • baseline assessment;
  • decision drills;
  • integrative post-case;
  • field application;
  • reflection/evidence;
  • pure learning-domain scoring/state logic;
  • Node built-in tests and CI.

Explicitly out of scope

  • v1 framework migration;
  • backend/auth/cloud sync;
  • CMS;
  • AI tutor/assessment;
  • payments/social/gamification engines.

Plan

docs/superpowers/plans/2026-09-06-m01-learning-validation.md

This PR is stacked on docs/platform-foundation and should be reviewed/merged after PR #1.

@tim8es
tim8es marked this pull request as ready for review September 6, 2026 15:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 050ea6d261

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread m01-validation-app.js
<a class="button subtle" href="#/lesson/system-diagnostic">Урок 2 · Диагностика до вмешательства</a>
</div>
<p class="validation-state">Уроки: ${studied ? 'изучены ✓' : 'нужно завершить оба'} · Drills: ${drillsDone ? '2/2 ✓' : `${Object.keys(state.drills).length}/2`}</p>
<div class="validation-drills">${DATA.decisionDrills.map(drillBlock).join('')}</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep drills locked until both lessons are complete

After any baseline submission, learningBlock() renders both Decision Drills as enabled controls even when isStudied() is false. A participant can therefore answer the drills and receive their explanatory feedback before opening either lesson, then mark the lessons complete and unlock the post-case with a sequence different from the documented lessons-then-drills experiment; hide or disable these controls until both M01 lessons are complete.

Useful? React with 👍 / 👎.

Comment thread m01-validation-app.js
Comment on lines +403 to +406
if (!window.confirm('Удалить только данные M01 validation в этом браузере? Прогресс основного курса не изменится.')) return;
try {
localStorage.removeItem(validationStorageKey);
state = emptyValidationState();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reset session-scoped lesson completion for new participants

When the same browser is reused after a participant completes M01, this reset removes only the validation key while isStudied() continues reading those lesson IDs from pm01-state-v1. The next participant—an explicitly documented use of this reset—will immediately be shown that both lessons are studied and can unlock the post-case without completing them, contaminating every subsequent shared-browser session; the reset must also clear the relevant completion evidence or the validation flow must track study completion per session.

Useful? React with 👍 / 👎.

Comment thread m01-validation-app.js
Comment on lines +315 to +319
document.querySelectorAll('[data-reasoning]').forEach((textarea) => textarea.addEventListener('change', () => {
const key = textarea.dataset.reasoning;
if (state[key].submittedAt) return;
state[key].reasoning = textarea.value;
saveValidationState('Черновик reasoning сохранен.');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist textarea edits while the user is typing

Textarea drafts are copied into state only on change, so reloading or closing the page while a textarea remains focused can discard all edits since its last focus loss. The field and reflection handlers repeat the same pattern, making long experiment responses vulnerable to silent loss despite the persistence guarantee; save on input (optionally debounced) or flush focused controls before unload.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant