Jump to content

Gadfly/SPEC

From MindAttic Docs

Gadfly — Product specification

The complete product, written down before it is built (owner, 2026-11-30, MAT-T360). Every epic, feature and story the finished product will have is listed here, built or not. The ticket tree mirrors this file one to one: every ID below is a ticket. Nothing gets built unless it is here, and anything taken out of here is closed wont-do in the tree. docs/RELEASE.md says which part of this the current milestone delivers.

1. Product definition

Place in the ecosystem: a product (Apps) in the MindAttic ecosystem, the one sold to institutions. It owns no platform concern: the panel runs on MindAttic.Legion, sign-in on MindAttic.Authentication, keys and settings in MindAttic.Vault, voice and face on SpeechRecognition, Avatar and Webcam.

Gadfly Exams finds out whether a student understands, not whether they can produce an answer. A talking examiner runs a spoken Socratic exam over an instructor's own course material, writing every follow-up from the student's own words; a multi-provider AI panel recommends a grade, people grade blind, reconcile and approve, and nothing reaches the student until a person has. It is sold to universities, colleges, certification bodies and training providers (docs/PRODUCT.md). Underneath sit the Socratic engine (Gadfly.Core, also usable in-process) and the original personal-introspection CLI (gadfly). The finished product is Gadfly 2.0: proven in a pilot, its known gaps closed, and ready for an institution to sign a contract and run it.

2. Scope boundary

2.1 In the product

  • The Socratic engine and the gadfly CLI (exam and personal introspection).
  • Course material to concept map, rubrics, assessments, approval and publication; an interpretive exam catalog.
  • The spoken exam room with voice and camera, practice, accommodations, English, Korean and Spanish.
  • Panel grading, blind human grading, reconciliation, approval, appeals, reports, transcripts and certificates.
  • Integrity notes for people, panel calibration, bias probes, fairness views, privacy by design.
  • Admin suite, LTI 1.3, Platform API v1, webhooks, plans and allowances, email, in-app help and tours.
  • Hosting on the MindAttic Hetzner server mindattic-01 (Agency MAT-T221, MS-94).
  • Contracts, SSO, payments, an accessibility audit and validity and fairness evidence for institutions (2.0).

2.2 Never in the product

  • Azure hosting: decommissioned 2026-11-26 (MAT-T297); GAD-T869 superseded by Agency's Hetzner setup.
  • Automated verdicts on integrity: no cheating, lying, stress or emotion detection, no automatic cancellation (GAD-LAW-3; the EU AI Act prohibits emotion recognition in education).
  • AI-text detection as evidence: switched off (GAD-T412) and not coming back.
  • Storing video or audio: video stays on the device, audio is discarded (docs/PRIVACY.md).
  • A typed quiz mode: every exam is spoken; typing is only a staff-granted accommodation (GAD-T239, GAD-T260).
  • Spoken read-back and correction of answers: removed by owner decision (GAD-T405).
  • Human or bust examiner avatars, the Greek theme and per-student examiner looks: the examiner is the glowing orb and the look is the professional theme (GAD-T833, GAD-T838, owner 2026-11-28).
  • Audit-generated sweeps, exhaustive bughunts and "continuous" re-run tickets as product work.

3. Users and roles

  • Student: sits spoken exams and practice, sees published results, appeals.
  • Instructor: uploads material, builds and publishes assessments, approves grades.
  • Examiner and second reviewer: grade blind and reconcile.
  • Admin and owner: run the organization, roles, settings, audit, plans; the platform owner runs the host.
  • Integrator: an LMS or another system using LTI, the API and webhooks.
  • The owner (Ryan): also the personal-introspection CLI's user, and signs off each milestone.

4. Requirements

Status is built (closed ticket, with evidence) or MS-n: the milestone in §7 that delivers it. Every unbuilt story is approved and prioritised in build order; the planner splits a story into tasks when the queue reaches it.

E1. Socratic engine and CLI — GAD-T885 — built

F1.1 Grounded exam engine — GAD-T886 — built

  • S1.1.1 Exam in the terminal — GAD-T887 — built. As a learner, I run gadfly exam on a source and get a grounded, Legion-judged Socratic exam. Evidence: GAD-T38, MS-2 reached.
  • S1.1.2 Adaptive question planner — GAD-T888 — built. As the engine, I choose elicit, clarify, probe, counterexample, apply, contradiction and synthesize moves with mastery and stop rules. Evidence: Gadfly/Engine.
  • S1.1.3 Non-leading questions — GAD-T889 — built. As a student, I am never asked a question that gives the answer away. Evidence: Engine/QuestionGenerator.cs leak guard.

F1.2 Personal introspection CLI — GAD-T890 — built

  • S1.2.1 Cross-examine my own history — GAD-T891 — built. As the owner, I am cross-examined over my own Claude transcripts until aporia. Evidence: Gadfly.Personal, docs/overview.md.

E2. Course material and exam building — GAD-T892 — built

F2.1 Material to concept map — GAD-T893 — built

  • S2.1.1 Cited concept map from my material — GAD-T894 — built. Given an upload in text, PDF, Word, EPUB or HTML, then concepts and rubrics cite their passages and keep every instructor edit. Evidence: Gadfly.Sources.

F2.2 Assessment builder — GAD-T895 — built

  • S2.2.1 Build, approve and publish — GAD-T896 — built. Publishing locks objectives, rubric and policy; a summative exam needs approved material. Evidence: docs/PRODUCT.md.
  • S2.2.2 Preview as a student — GAD-T897 — built. A preview calls no provider and saves nothing.

F2.3 Exam catalog — GAD-T898 — built

  • S2.3.1 Exam catalog — GAD-T655 — built. S2.3.2 Interpretive-only catalog — GAD-T711 — built. Every published exam is open to every student with a category and text filter (GAD-T844, GAD-T871, GAD-T879).

E3. The spoken exam — GAD-T899 — built

F3.1 Voice exam room — GAD-T900 — built

  • S3.1.1 Voice and camera mandatory — GAD-T239 — built.
  • S3.1.2 Top-tier voice recognition — GAD-T304 — built.
  • S3.1.3 Exam room resilience — GAD-T306 — built. Given a dropped connection, reload or closed lid, then the same question resumes and the server clock pauses.

F3.2 Get ready and practice — GAD-T901 — built

  • S3.2.1 Practice interview — GAD-T294 — built.

F3.3 Accommodations — GAD-T902 — built

  • S3.3.1 Typed-answer accommodation — GAD-T260 — built; extra time, eye-contact accommodation and examiner speed (GAD-T873) alongside.

F3.4 Three exam languages — GAD-T903 — built

  • S3.4.1 Spanish exams — GAD-T596 — built. S3.4.2 Korean exams — GAD-T904 — built (GAD-T541, GAD-T626).

E4. Grading with human accountability — GAD-T905 — built

F4.1 Panel grading — GAD-T906 — built

  • S4.1.1 Panel scores per objective — GAD-T907 — built (PanelAnswerJudge.cs, grade modes GAD-T703).
  • S4.1.2 Background grading to inbox — GAD-T699 — built.

F4.2 Human grading and approval — GAD-T908 — built

  • S4.2.1 Blind grade, reconcile, approve — GAD-T909 — built. Given a 20-point gap, a split panel or a boundary score, then the grade holds until reconciled; nothing is published before an authorized approval.

F4.3 Results for students — GAD-T910 — built

  • S4.3.1 PDF reports and certificates — GAD-T311 — built. S4.3.2 Result in inbox and email — GAD-T777 — built.

E5. Fairness, integrity and privacy — GAD-T911 — built

F5.1 Integrity notes — GAD-T912 — built

  • S5.1.1 Integrity notes for reviewers — GAD-T913 — built. Low-confidence, hidden from a blind grader until their scores are in, shown to the student with the result.

F5.2 Calibration and bias probes — GAD-T914 — built

  • S5.2.1 Calibrate the panel per exam — GAD-T915 — built. The panel counts only at QWK at least 0.70 and SMD under 0.15 against double marking.

F5.3 Privacy and retention — GAD-T916 — built

  • S5.3.1 Export and erase a student — GAD-T917 — built (GAD-T749).

E6. Administration and integrations — GAD-T918 — built

F6.1 Admin suite — GAD-T919 — built

  • S6.1.1 Assignments console — GAD-T298. S6.1.2 Live sessions monitor — GAD-T299. S6.1.3 System status and jobs — GAD-T302. All built.

F6.2 LMS, API and webhooks — GAD-T920 — built

  • S6.2.1 LMS connection (LTI 1.3) — GAD-T312 — built. S6.2.2 Platform API and webhooks — GAD-T921 — built.

F6.3 Plans, email and help — GAD-T922 — built

  • S6.3.1 Plans and seats — GAD-T309. S6.3.2 Email notifications — GAD-T310. S6.3.3 Guided tutorials — GAD-T293. All built.

E7. Quality for sale — GAD-T923 — built

F7.1 Accessibility, security, performance — GAD-T924 — built

  • S7.1.1 Accessibility pass — GAD-T307. S7.1.2 Security hardening — GAD-T313. S7.1.3 Performance pass — GAD-T317. All built.

E8. Pure elenchus cleanup — GAD-T808 — built

Features GAD-T809, GAD-T810, GAD-T811 with stories GAD-T812, GAD-T813 (closed).

E9. Professional UI overhaul — GAD-T833 — built

Features GAD-T834, GAD-T838, GAD-T842, GAD-T844, GAD-T847, GAD-T856 (closed).

E10. Pilot readiness — GAD-T826 — built (MS-7)

Features GAD-T827 Local pilot host, GAD-T828 Owner pilot decisions (closed). Hosting moved to Hetzner: GAD-T784 (closed).

E11. Proven with a real instructor — GAD-T829 — MS-7 (active)

F11.1 Pilot with Erin — GAD-T66 — MS-7

  • Tasks: GAD-T664 demo org, GAD-T665 course from Erin's material, GAD-T666 five real voice sessions, GAD-T667 review and file Erin's feedback. Given Erin's own course, when she runs five voice sessions, then her feedback is tickets.

F11.2 Grading quality evidence — GAD-T830 — MS-7

  • Tasks: GAD-T670 re-read the fast-model agreement, GAD-T614 Spanish tester validation.

F11.3 Live host verified — GAD-T884 — MS-7

  • Task: GAD-T868. Given the pilot host on mindattic-01, then Gadfly.Worker's jobs run, Vault settings resolve and docs/DEPLOY.md says how.

E12. Complete for the pilot's school — GAD-T925 — MS-158

F12.1 Per-objective LMS grades — GAD-T926 — MS-158

  • S12.1.1 Gradebook per objective — GAD-T927. As an instructor in an LMS, I see one gradebook column per objective once a result is released.

F12.2 More webhook events — GAD-T928 — MS-158

  • S12.2.1 Grade and appeal webhooks — GAD-T929. attempt.started, grade.published and appeal.filed, signed and retried like session.completed.

F12.3 Speech cost metering — GAD-T930 — MS-158

  • S12.3.1 Metered speech — GAD-T931. Plan & usage shows speech minutes and characters per organization.

F12.4 Pilot feedback worked — GAD-T932 — MS-158

  • S12.4.1 Pilot feedback fixed — GAD-T933. Erin confirms the problems she reported are fixed.

F12.6 Conversational elenchus — GAD-T956 — MS-158

  • S12.6.1 A conversation, not a questionnaire — built (GAD-T958, GAD-T959, GAD-T960, GAD-T975). As a student, the examiner quotes my own words and presses that claim at least three questions deep, may put a premise to me, and ends the exam at the conversation's natural conclusion, never on a clock. Evidence: prompt sets v12 and v13, QuestionPlanner.MinThreadDepth, docs/SOCRATIC_PLATFORM.md.
  • S12.6.2 Ask the examiner back — built (GAD-T961). As a student, when a question isn't clear I ask it out loud and get an answer that gives nothing away; asking is never graded and the question stays open.
  • Tasks: GAD-T957 live AI-mode and fallback audit (closed), GAD-T962 docs for the conversational exam.

F12.5 Polish and release 1.1 — GAD-T934 — MS-158

  • S12.5.1 Owner signs off 1.1 — GAD-T935.

E13. Contracts and compliance — GAD-T936 — MS-159

  • S13.1.1 Signed-off legal set — GAD-T938. Privacy policy, terms and DPA template reviewed by counsel (owner hands-on).

F13.2 AI Act duties — GAD-T939 — MS-159

  • S13.2.1 AI Act duties met — GAD-T940. Every open duty in docs/COMPLIANCE.md met or documented with evidence.

E14. Institution-ready platform — GAD-T941 — MS-159

F14.1 Institutional sign-in — GAD-T942 — MS-159

  • S14.1.1 Sign in with my institution — GAD-T943. SAML or OIDC single sign-on.

F14.2 Payments live — GAD-T944 — MS-159

  • S14.2.1 Self-serve upgrade — GAD-T945. Card checkout with a configured provider.

F14.3 Accessibility audit — GAD-T946 — MS-159

  • S14.3.1 Audited accessibility — GAD-T947. Screen-reader testing and a formal WCAG 2.2 AA audit passed.

E15. Validation evidence — GAD-T948 — MS-159

F15.1 Validity study — GAD-T949 — MS-159

  • S15.1.1 Published validity results — GAD-T950. Master plan Part 15.3, with a real institution, in SCIENCE.md.

F15.2 Fairness results — GAD-T951 — MS-159

  • S15.2.1 Published fairness results — GAD-T952. Recognition and score gaps by group on real sessions.

F15.3 Polish and release 2.0 — GAD-T954 — MS-159

  • S15.3.1 Public launch signed off — GAD-T955.

Added by MAT-T477 (owner stories and cross-repo links)

  • F GAD-T976 Main suite stays green (epic GAD-T829, MS-7): holds the auto-filed test fixes GAD-T969..GAD-T974 (re-parented only).

Filed after this spec was written (MAT-T478)

Open tickets filed after the last spec pass, listed under their parent until the spec tree is rendered from the plan (M.TIX-T535).

  • Under (none)
    • GAD-T1000 () Fails on main: Gadfly.Tests.Engine.QuestionPlannerTests.TimeIsCheckedBeforeTheTu
    • GAD-T1001 () Fails on main: Gadfly.Tests.Server.SessionOrchestratorTests.AnsweringPersistsThe
    • GAD-T993 () Fails on main: Gadfly.Tests.Server.ClosingReflectionTests.Retention_RedactsTheTe
    • GAD-T994 () Fails on main: Gadfly.Tests.Server.StaleSessionSweepTests.AbandonedSession_PastI
    • GAD-T995 () Fails on main: Gadfly.Tests.Engine.PlannerSimulationTests.ScenarioH_LimitsHitFir
    • GAD-T996 () Fails on main: Gadfly.Tests.Engine.QuestionPlannerTests.TurnLimit_EndsTheSession
    • GAD-T997 () Fails on main: Gadfly.Tests.Server.Scenarios.MasterPlanScenarioTests.Scenario_H_
    • GAD-T998 () Fails on main: Gadfly.Tests.Engine.QuestionPlannerTests.TimeMultiplier_ExtendsTh
    • GAD-T999 () Fails on main: Gadfly.Tests.Server.ClosingReflectionTests.Skipping_OrAnEmptyAnsw
  • Under (none)
    • GAD-T1002 () Fails on main: Gadfly.Tests.Engine.QuestionPlannerTests.NoSynthesis_WhenLessThan
    • GAD-T1003 () Fails on main: Gadfly.Tests.Server.ClosingReflectionTests.SkipReflection_ClosesI
    • GAD-T1004 () Fails on main: Gadfly.Tests.Engine.QuestionPlannerTests.TimeUp_EndsTheSession —
    • GAD-T1005 () Fails on main: Gadfly.Tests.Server.ClosingReflectionTests.Answering_StoresItOnTh
    • GAD-T1006 () Fails on main: Gadfly.Tests.Server.LiveSessionTests.TimeUpFromAnOldCountdown_Doe
    • GAD-T1007 () Fails on main: Gadfly.Tests.Server.ClosingReflectionTests.AfterTheLastQuestion_T
    • GAD-T1008 () Fails on main: Gadfly.Tests.Server.Scenarios.MasterPlanScenarioTests.Scenario_H_

5. Non-functional requirements

  • ASP.NET Core 10, Blazor Server, EF Core 10 on SQL Server; NUnit tests and the Gadfly.Tour demo tour.
  • Conflict order (GAD-LAW-1): student safety, privacy and fairness; transcript and evidence integrity; assessment validity; human grading accountability; correctness; maintainability; performance; features.
  • Rules live in code, model output is schema-validated and advisory (GAD-LAW-2); prompt sets are hashed into each session (GAD-LAW-5); secrets come from MindAttic.Vault (GAD-LAW-4).
  • Tenant isolation, staff MFA for Owner and Admin, audit rows never deleted, logs kept at least six months.
  • WCAG 2.2 AA as the target; English, Korean and Spanish.

6. Interfaces and dependencies

  • Platform owners (docs/ECOSYSTEM.md): LLM panel — MindAttic.Legion; sign-in, including institutional SSO (GAD-T943, a story MindAttic.Authentication does not have yet) — MindAttic.Authentication; credentials and settings — MindAttic.Vault; speech, voice and on-device signals — MindAttic.SpeechRecognition, MindAttic.Avatar, MindAttic.Webcam; logging — MindAttic.Log; public hosting — the Hetzner server (Agency MS-94).
  • Uses MindAttic.Legion (panel), MindAttic.Authentication, MindAttic.Vault, MindAttic.SpeechRecognition, MindAttic.Avatar (voice), MindAttic.Webcam (on-device signals), MindAttic.Log; ElevenLabs and OpenAI for speech.
  • Hosted on mindattic-01 (Agency MAT-T221, docs/ops/hetzner-deploy-pipeline.md); local pilot host on R:\MindAttic\Apps\Gadfly.
  • Offers LTI 1.3 to Canvas, Moodle, Blackboard and Brightspace, the Platform API v1 (/openapi/v1.json), signed webhooks, and Gadfly.Core / Gadfly.Sources as packages.

7. Release sequence

Reached: MS-2 (CLI exam), MS-3 (voice and vision building blocks), MS-4 (platform backend), MS-5 (voice), MS-6 (exam); all accepted 2026-11-30 with every member closed.

  1. MS-7 Gadfly local pilot with Erin (active): E11 (800).
  2. MS-158 Gadfly 1.1: the known gaps closed: E12 (700), ending with F12.5 polish and release.
  3. MS-159 Gadfly 2.0: ready for institutions: E13 (600), E14 (500), E15 (400, ending with the 2.0 polish and release). The finished product.

8. Change log

Date Change to scope Ticket
2026-11-30 Specification written from BIBLE, PRODUCT, MASTER-PLAN-STATUS, PILOT, DEPLOY, the code and the ticket history; MS-2..MS-6 accepted as reached; the master plan's known gaps became MS-158 and the "before contracts" items became MS-159 MAT-T392
2026-11-30 MAT-T462 single-source pass: 3 renamed (E11 "Proven with a real instructor", E12 "Complete for the pilot's school", task GAD-T868); single-feature epic E16 (GAD-T953) closed, its polish-and-release feature now F15.3 under E15; MS-158 requires the pilot (GAD-T925 requires GAD-T829), MS-159 epics require the 1.1 sign-off (GAD-T935); institutional SSO needs a MindAttic.Authentication story MAT-T469
2026-11-30 MAT-T477 owner story for orphaned test fixes MAT-T477
2026-11-30 MAT-T478 spec drift repaired: 12 open tickets filed after the spec listed in section 4 MAT-T478
2026-12-01 Conversational elenchus written in as F12.6 (GAD-T956) with its two stories; no clock ends an exam (GAD-T975) GAD-T962
Part of Gadfly.
From Gadfly/docs/SPEC.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.