Inspiration

Professional knowledge is changing faster than traditional courses can be updated.

The problem is no longer access to information. Professionals already receive more articles, documentation, videos, research, product updates, and opinions than they can realistically process.

The real challenge is deciding:

  • What has changed?
  • Which information is trustworthy?
  • What matters to this learner?
  • Which knowledge gap should be addressed next?
  • Can the new knowledge be applied in practi ce?
  • Will it still be available when needed later?

Most learning products optimize for content consumption. They generate explanations, recommend courses, or mark lessons and quizzes as complete.

But opening content or selecting the correct answer does not prove real capability.

We built Mastery Twin around a different principle:

Mastery is not content consumed. It is evidence produced, defended, and retained.

What it does

Mastery Twin is a continuously updating AI learning twin for people working in fast-changing domains.

It maintains a living, evidence-based model of the learner’s goals, existing knowledge, demonstrated abilities, skill gaps, prior evidence, and retention state. It then connects that model with changes happening in the outside world.

Mastery Twin discovers potentially relevant information, filters out noise, identifies what matters to the learner, adapts the next learning step, requires real application, verifies the resulting evidence, and returns later to test retention.

The complete loop is:

Understand → Discover → Prioritize → Learn → Apply → Defend → Recall → Adapt

1. Understand the learner

During onboarding, Mastery Twin uses the learner’s goals, experience, and interview answers to create an initial competency model.

The system does not treat every conversation as a fresh start. It maintains a persistent understanding of:

  • what the learner has encountered;
  • what the learner can explain;
  • what has been demonstrated in practice;
  • what has been retained over time;
  • which prerequisites are already available;
  • which related capabilities still need development.

For example, a senior developer may want to adopt Codex reliably across a team. Mastery Twin can distinguish between knowledge that has already been retained, knowledge demonstrated only once, weak areas that require practice, and skills that have not yet been started.

2. Discover what matters

Deep Research searches for information relevant to the learner’s goals.

It can gather material from different types of sources, including official documentation, technical articles, engineering reports, research publications, product announcements, and educational resources.

Finding information is only the first step. Mastery Twin evaluates what it discovers by asking:

  • Is the source credible?
  • Is the information current?
  • Does it introduce something genuinely new?
  • Is it relevant to this learner’s goals?
  • Does the learner already know it?
  • Does it expose a meaningful skill gap?
  • Is it important enough to justify the learner’s time?

The system filters duplicated, outdated, low-value, or irrelevant information instead of adding every discovered item to the learning plan.

In the submitted Build Week implementation, Deep Research prioritizes trusted and official sources so that material claims remain verifiable and their provenance stays inspectable. The broader product architecture is designed to expand source discovery while preserving credibility, provenance, relevance, and learner-specific filtering.

3. Prioritize personal impact

When Deep Research identifies meaningful information, Mastery Twin explains why it matters to the specific learner.

It does not simply produce a generic summary. The system compares the new information with the learner’s goal, current skill states, prerequisites, previous evidence, existing workflows, and related knowledge gaps.

For example, a development team may repeatedly write the same pull-request review prompts. Mastery Twin can recognize that the learner already understands repository-level guidance but has weak evidence around reusable workflows.

Instead of recommending a broad course, it can propose one focused progression:

Repository guidance → Reusable Skills → Structured Code Review

The objective is not to show everything the system found. It is to decide:

What is credible, what is new, what matters to this learner, and what should become the next learning action?

4. Create focused, adaptive learning

GPT-5.6 transforms relevant source material into a bounded learning experience for the exact identified gap.

The learner can:

  • inspect citations and understand why the material was selected;
  • highlight an unclear passage;
  • request a contextual explanation, practical example, analogy, or metaphor;
  • apply selected learning methods;
  • save external material for later processing;
  • receive retrieval questions based on extracted concepts.

The experience is adapted to the learner’s role, goal, existing knowledge, related strengths, current skill gaps, selected learning methods, and available source context.

A learner who already understands the fundamentals should not receive the same explanation as someone encountering the concept for the first time.

However, reading a lesson, highlighting text, requesting an explanation, or completing a simple recall card does not automatically create mastery evidence.

5. Integrate learning from outside the platform

Learning does not happen only inside a dedicated application.

People encounter useful information throughout the day in articles, documentation, reports, shared links, public web pages, videos, and other learning resources.

The learner can save material that cannot be reviewed immediately. Mastery Twin processes the source, extracts useful concepts, connects them to the competency model, estimates their relevance, and prepares an appropriate learning brief.

It does not turn every saved link into mandatory learning. The system decides whether the material should become:

  • a focused lesson;
  • a recall item;
  • optional context;
  • or no action at all.

This allows the learning path to evolve from the learner’s real information environment rather than from a fixed course catalog.

6. Require real application

Mastery Twin can evaluate different forms of applied work. The submitted vertical slice demonstrates this approach through a reusable pull-request review workflow.

To prove understanding, the learner must design the workflow themselves. They define:

  • when it runs;
  • what it covers and deliberately excludes;
  • how quality is evaluated;
  • how regressions are detected;
  • what output it must produce;
  • when automation must stop and escalate to a human.

Mastery Twin does not give the learner a nearly finished AI-generated answer to approve. The learner must produce substantive evidence that the concept can be applied.

If a required part is missing, deterministic server-side validation rejects the artifact before model evaluation begins.

The evaluation pipeline is designed so that model output cannot compensate for missing learner evidence. It cannot silently complete an incomplete submission, award unsupported credit, or advance mastery based on fluent wording alone.

This separation between deterministic validation and model reasoning is central to the product.

7. Defend the decisions

Once the complete artifact passes deterministic validation, its accepted version is persisted and becomes the basis of an adaptive defense.

GPT-5.6 asks three grounded questions covering:

  • why the selected mechanism is appropriate;
  • how regressions are identified and prevented;
  • when automation must stop and escalate to a human.

The questions are grounded in the learner’s goal, relevant skill state, submitted artifact, prior answers, and explicit evaluation dimensions.

The artifact and confirmed answers are evaluated together against an explicit rubric. The system verifies that:

  • quoted artifact evidence exists in the actual submission;
  • quoted interview evidence exists in the confirmed answers;
  • every criterion is supported by real evidence;
  • the overall result matches the criterion-level results;
  • the artifact passed deterministic validation;
  • the complete required defense was performed;
  • contradictions are detected and recorded;
  • malformed or unsupported model output is rejected.

Only after the complete result passes verification and is persisted can mastery change.

8. Distinguish demonstration from retention

Mastery Twin uses an explicit progression:

Weak → Demonstrated → Retained

A successful applied artifact and defense can move a skill from Weak to Demonstrated.

It does not jump directly to Retained.

Recent performance is not treated as proof of durable understanding. A new recall scenario is scheduled for later and requires the learner to retrieve and apply the concept again rather than simply repeat the completed artifact.

Retention is awarded only when the learner can reconstruct and use the knowledge later with qualifying evidence.

This distinction answers two different questions:

  1. Can the learner apply this now?
  2. Can the learner still retrieve and apply it later?

9. Adapt what comes next

Every successful or unsuccessful interaction updates the learner twin.

The system can update:

  • the directly evaluated skill;
  • related skills supported by the same evidence;
  • prerequisites;
  • retention state;
  • recall schedule;
  • evidence history;
  • the next recommended direction.

The next recommendation is based on the learner’s updated evidence and skill relationships—not simply on the next lesson in a predefined course.

For example, after completing a reusable workflow artifact and defense:

  • Reusable Workflows may move from Weak to Demonstrated;
  • related evidence may begin developing Review and Quality;
  • retention remains unverified;
  • a new recall scenario may be scheduled;
  • Team Automation and subagents may become the next recommended direction.

The learning path is recalculated from what the learner actually proved.

Why it is different

Most AI learning products know the subject.

Mastery Twin also knows the learner.

Typical AI learning product Mastery Twin
Starts from static or generic content Starts from a living learner model and current external information
Summarizes whatever it finds Evaluates credibility, novelty, relevance, and personal impact
Recommends more material Filters information through the learner’s goals and skill gaps
Measures lesson or quiz completion Requires applied learner-created evidence
Accepts one answer Conducts a grounded adaptive defense
Produces an opaque score Attaches criterion-level evidence and contradiction results
Ends when the session ends Returns later to verify retention
Tracks activity Tracks evidence-backed mastery transitions
Follows a fixed course Recalculates the next best action from new evidence

Mastery Twin is not another chatbot, content feed, summarizer, or quiz generator.

It is a continuous system that:

  1. understands what the learner currently knows;
  2. observes what is changing;
  3. identifies what matters;
  4. adapts how it is taught;
  5. requires evidence of application;
  6. verifies the learner’s reasoning;
  7. returns later to test retention;
  8. updates what should happen next.

How GPT-5.6 is used

GPT-5.6 Luna is natively integrated into Mastery Twin’s production intelligence layer through the official OpenAI API.

It powers the reasoning-intensive parts of the experience, including:

  • onboarding analysis;
  • research synthesis;
  • source relevance analysis;
  • personal-impact mapping;
  • learning-plan generation;
  • source-grounded learning material;
  • contextual explanations;
  • recall questions and adaptive mastery interviews;
  • artifact-grounded defense;
  • criterion-level evaluation;
  • contradiction analysis;
  • future recall generation;
  • next-action selection.

GPT-5.6 is not used as a decorative chatbot.

Its outputs can influence persistent learner state, so every model-backed workflow is constrained by implemented system boundaries:

  • strict Zod schemas;
  • bounded requests and timeouts;
  • trusted-source policies in the submitted research flow;
  • deterministic artifact prevalidation;
  • persisted provider, model, prompt, and schema provenance;
  • evidence-quote verification;
  • contradiction checks;
  • idempotent operations;
  • transactional persistence;
  • explicit retryable and permanent failure states.

Automated tests use deterministic or mocked implementations through the same contracts, allowing reproducible verification without presenting fixtures as live model results.

How we used Codex

We used Codex with GPT-5.6 across the entire software development lifecycle.

The work included:

  • exploring the original product problem;
  • evaluating alternative Education concepts;
  • defining the evidence-based mastery thesis;
  • designing the learner-state model;
  • shaping the architecture;
  • implementing the frontend and backend;
  • creating database schemas and migrations;
  • integrating GPT-5.6;
  • writing structured model contracts;
  • debugging live provider failures;
  • validating security and ownership boundaries;
  • writing unit, database, integration, and browser tests;
  • reviewing the implementation;
  • preparing the README and final demo.

Every submitted implementation change was created, modified, reviewed, or refined through the Codex workflow under human direction.

The human role was to define product intent, requirements, constraints, priorities, acceptance criteria, and final decisions. Codex and GPT-5.6 helped turn those decisions into a complete, tested implementation.

Several of the most important human-directed decisions were:

  1. lesson completion must never award mastery;
  2. the learner must create the substantive applied work;
  3. incomplete work must fail before model evaluation;
  4. evaluation criteria must be grounded in submitted evidence;
  5. the learner must defend the artifact;
  6. contradictions must be inspected;
  7. failed evaluation must not change mastery;
  8. Demonstrated and Retained must remain separate states.

How we built it

Mastery Twin is a TypeScript monorepo with explicit boundaries between product rules, AI workflows, persistence, and the learner experience.

Product and application layer

  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • shadcn/ui

AI and agent layer

  • OpenAI API
  • GPT-5.6 Luna
  • LangChain
  • LangGraph
  • Deep Agents
  • Tavily

Data and security layer

  • Supabase
  • PostgreSQL
  • Row Level Security
  • authenticated ownership boundaries
  • server-owned privileged operations
  • persisted provenance and learner evidence

Contracts and verification

  • Zod runtime schemas
  • Vitest
  • pgTAP
  • Playwright
  • accessibility checks
  • GitHub Actions
  • dependency verification
  • secret-history scanning

The product is organized around four connected surfaces:

  • Mastery — current skill state, evidence, and next action;
  • Updates — discovered changes and personal impact;
  • Learn — focused material, contextual explanations, and applied work;
  • Recall — delayed retrieval and retention evidence.

Together they form one coherent learner journey rather than a collection of disconnected AI features.

Challenges we faced

Preventing the model from manufacturing mastery

The largest design challenge was allowing GPT-5.6 to reason about complex learner evidence without allowing it to invent missing work.

We addressed this with deterministic prevalidation, frozen artifact versions, structured output contracts, quote-level evidence verification, contradiction checks, and fail-closed persistence rules.

Discovering useful information without creating more noise

Searching the web is easy. Deciding what deserves the learner’s attention is much harder.

The research system must balance source credibility, freshness, novelty, personal relevance, existing learner knowledge, practical impact, and available learning time.

The submitted implementation prioritizes trusted and official sources to keep the demonstrated flow verifiable. The architecture is designed to expand source coverage while preserving the same credibility, relevance, provenance, and safety boundaries.

Maintaining one durable learner state

Research, learning, artifact defense, recall, and recommendations modify related parts of the learner model.

We implemented persistent ownership boundaries, idempotency keys, transactional operations, explicit state transitions, and durable evidence records so that retries or partial failures cannot create convenient but false progress.

Delivering a complete product experience

A technically interesting evaluator was not enough.

The difficult part was connecting:

Onboarding → Research → Prioritization → Learning → Application → Defense → Recall → Recommendation

into one journey that a learner can understand and trust.

Accomplishments that we are proud of

  • We built a complete discovery-to-retention learning loop rather than a single AI feature.
  • The system maintains a persistent, evidence-based learner model.
  • Research findings are filtered through personal goals and skill gaps.
  • Content consumption never creates mastery.
  • Incomplete artifacts are blocked before GPT-5.6 evaluation.
  • Applied work and defense answers are evaluated together.
  • Evidence references are verified against the real submission.
  • Demonstrated ability remains separate from long-term retention.
  • Research and model-generation provenance remain inspectable.
  • Private learner data is protected through authentication, ownership checks, and Row Level Security.
  • The system can be run locally and verified through automated quality, database, and authenticated product checks.
  • The submitted production configuration uses GPT-5.6 Luna directly through the official OpenAI API.

What we learned

The central lesson was that AI education should not optimize only for better explanations.

A system becomes substantially more valuable when it can answer:

What new capability has this learner actually demonstrated, what evidence supports that conclusion, and when should it be tested again?

We also learned that model intelligence and deterministic engineering are complementary.

GPT-5.6 provides adaptive reasoning across discovered information, source material, learner context, skill relationships, applied work, defense answers, and historical evidence.

Typed contracts, validation, provenance, and persistence rules make those judgments trustworthy enough to participate in a real learning product.

What’s next

The current submission demonstrates a deeply implemented vertical slice for continuously changing professional knowledge.

Next, we want to extend the same evidence-backed learning loop to:

  • broader web discovery across multiple source types;
  • richer credibility and source-quality evaluation;
  • additional technical and professional domains;
  • speech-to-speech adaptive mastery interviews;
  • richer long-term retention scheduling;
  • team-level competency and prerequisite maps;
  • organization-specific trusted sources;
  • cross-skill transfer and misconception tracking;
  • recommendations based on longer learning histories;
  • collaborative learning and team capability planning.

The long-term vision is simple:

A learning system that learns the learner—and continuously turns a changing world into verified human capability.

Built With

  • ai-agents
  • codex
  • deep-agents
  • deep-research
  • gpt-5.6
  • langchain
  • langgraph
  • langsmith
  • next.js
  • node.js
  • openai
  • openai-api
  • playwright
  • postgresql
  • react
  • row-level-security
  • structured-outputs
  • supabase
  • tavily
  • tool-calling
  • typescript
  • vercel
  • vitest
  • zod
Share this project:

Updates