docs: establish architecture specification and MADRs 0001-0009

This commit is contained in:
kiskaadee committed 2026-11-10 16:19:19 -05:00
1 parent 46afca44a5
commit 521cd30348
11 files changed
+472

No files matched your search

+161
View File
@@ -0,0 +1,161 @@
# Interactive Assessment System Architecture Specification
**Product Name:** `live-quiz`
**Repository:** `/home/kiskaadee/Projects/active/live-quiz`
**Status:** Approved Architectural Baseline
---
## 1. Problem Definition & Core Intent
Conversational AI tutoring in typical chat interfaces lacks a stable, invariant assessment contract. During freeform dialogues, each response mutates conversational context, leading to prompt drift, non-deterministic difficulty adjustments, and conversational generosity. Tutors cannot reliably measure performance against an uncompromised standard because the measurement instrument itself shifts in response to learner struggle.
`live-quiz` resolves this by decoupling **pedagogical authoring and evaluation** (handled by AI agent workflows) from **runtime assessment administration** (handled by a lightweight, deterministic application).
```
[ Learning Context / Instruction ]
│
▼
Objective Ledger (in context)
• Flat objectives with `enables` edges
• Cumulative coverage observations
• Active / Deferred disposition
│
▼ (Assessment Milestone & Learner Consent)
Assessment Brief
│
▼
`quiz-designer` Skill
│
┌────────────────┴────────────────┐
▼ ▼
`questionnaire.json` `rubric.json`
(Public Presentation) (Private Evaluation)
│ │
▼ │
[ `live-quiz` Engine ] │
• Standalone Local Web App │
• Zero LLM at runtime │
• Ephemeral SQLite Journal │
• Authoritative Server Timer │
• Active time vs Pause tracking │
│ │
│ (Atomic Export attempt.json) │
▼ ▼
`attempt.json` ──────────────► [ `quiz-evaluator` Skill ]
│
▼
`evaluation.json`
│
▼
[ `tutor` Skill ]
(3-Stage Socratic Debrief)
│
▼
[ Cognitive Consolidation ]
(Selective Project Docs Only)
```
---
## 2. System Responsibilities & Boundaries
The repository distributes two decoupled products:
1. **The Assessment Engine (`live-quiz`):** An AI-agnostic CLI and web application that administers an assessment, tracks timing, preserves drafts, enforces a blind pass, and publishes standardized attempt artifacts.
2. **The Reference Skills Collection (`skills/`):** Five portable agent skills (`learning-objectives`, `quiz-designer`, `live-quiz`, `quiz-evaluator`, and `tutor`) demonstrating how any AI agent environment can create, run, and interpret assessments.
### Component Boundaries
| Component | Responsibility | Inputs | Outputs | Core Invariants |
| :--- | :--- | :--- | :--- | :--- |
| **`learning-objectives`** | Formulates observable, assessable competencies from learning goals. | Topic / Goals / Context | Objectives & evidence criteria | Does not assume mastery; separates intention from demonstration. |
| **`quiz-designer`** | Compiles an approved Assessment Brief into public and private contracts. | Assessment Brief | `questionnaire.json`, `rubric.json` | Max 3-question chains; hermetic context or independent rubrics; no answer leakage. |
| **`live-quiz` Engine** | Ephemeral web server executing the assessment and capturing evidence. | `questionnaire.json`, CLI flags | `attempt.json`, session status | Never receives `rubric.json`; zero runtime LLM; authoritative server clock. |
| **`quiz-evaluator`** | Context-isolated post-hoc evaluation of attempt against frozen rubric. | `rubric.json`, `attempt.json` | `evaluation.json` | Fresh context; purely evaluates $f(\text{rubric}, \text{attempt})$ without chat history. |
| **`tutor`** | Facilitates learning, proposes assessment scope, leads debrief. | Learner dialogue, context | Learning interactions | Does not force assessments; leads Socratic debrief before solution reveal. |
| **Project Repository** | Selective retention of project-specific technical findings or ADRs. | User / Tutor choice | Project docs / Git commits | No mandatory central vault; documentation follows project conventions. |
---
## 3. Data Contracts & Artifact Topology
The system communicates strictly across four versioned JSON contracts:
1. **`questionnaire.json` (Public Presentation Contract):**
Consumed by `live-quiz`. Contains question IDs, markdown prompts, Mermaid diagrams, KaTeX equations, interaction types, option labels, and initial code stubs. *Physically excludes answers, rubrics, and misconceptions.*
2. **`rubric.json` (Private Evaluation Contract):**
Retained by the calling agent workflow and supplied only to the evaluator. Contains learning objectives, observable criteria (Complete / Partial / Insufficient), categorical failure modes, and misconception signatures.
3. **`attempt.json` (Durable Execution Evidence):**
Produced by `live-quiz` via atomic publication. Contains attempt identity, assessment/version hashes, workspace attribution, terminal status (`COMPLETED`, `CLOSED_EARLY`, `TIMED_OUT`), active and wall-clock durations, pause event logs, and submitted responses.
4. **`evaluation.json` (Diagnostic Assessment Report):**
Produced by `quiz-evaluator`. Contains criterion-level attainment ratings, failure-mode classifications (`CONCEPTUAL`, `LOGICAL`, `SYNTACTIC`, `OMISSION`, `REGRESSION`), misconception hypotheses with confidence levels, and discussion probes for debriefing.
---
## 4. Assessment Administration & Interaction Model
### 4.1 Composable Interaction Primitives
`live-quiz` implements four canonical interaction primitives capable of expressing all assessment challenges without widget bloat:
- `select`: Single-choice (radio) or multiple-choice (checkbox).
- `text`: Single-line or multi-line markdown text area for open-ended explanations.
- `code`: Static code editor (CodeMirror/Monaco) with read-only context/preamble and an editable buffer. **Zero runtime code execution or test-runner safety net.**
- `mapping`: Ordered list sequencing or key-value association.
The frontend is packaged as a static single-page application built via Vite Plus (`vp`) with all third-party libraries (CodeMirror, Mermaid.js, KaTeX) pre-bundled into `dist/`.
### 4.2 Question Chaining & Progression
- **Chain Length Limit:** Maximum of **3 questions** per chain.
- **Context Sharing:** Questions may share an overarching technical scenario or stimulus.
- **Independent Rubrics:** Each question evaluates its own distinct learning objective. Later questions provide sufficient canonical context to remain answerable even if earlier questions were missed, strictly preventing compound penalization (double jeopardy).
### 4.3 Blind Pass Invariant
The runtime provides **zero immediate correctness feedback, validation cues, or hints** during administration. The learner demonstrates unassisted performance against the frozen standard.
---
## 5. Persistence, State Machine & Process Lifecycle
### 5.1 Three Distinct Lifecycles
The system explicitly separates:
- **Server Process:** Ephemeral HTTP server run on demand.
- **Assessment Instance:** Persistent concept identified by stable IDs and immutable version hashes.
- **Assessment Attempt:** A single execution pass against an immutable assessment version.
### 5.2 Ephemeral SQLite Session Journal
During active assessment, `live-quiz` maintains state in a temporary SQLite database (`~/.local/state/live-quiz/sessions/<attempt-id>.sqlite3`):
- Server commits acknowledged draft updates, answer submissions, and timing events atomically to SQLite.
- Pausing commits state and **allows the server process to exit cleanly**, preventing idle background processes.
- Unexpected kills (`SIGKILL`, power failure) leave the journal intact.
### 5.3 Atomic Publication & Journal Deletion
Upon reaching a terminal state (`COMPLETED`, `CLOSED_EARLY`, `TIMED_OUT`):
1. The server serializes the final attempt payload.
2. Writes to a temporary file in the destination directory.
3. Validates the JSON structure and flushes/syncs to disk.
4. Atomically renames the file to the final destination (`attempt.json`).
5. Closes database handles and unlinks the temporary SQLite journal.
6. Exits with code 0.
*Invariant:* The temporary journal is never deleted if export publication fails.
### 5.4 Explicit Recovery Command
To resume an interrupted or paused attempt:
```bash
live-quiz recover --from-path ~/.local/state/live-quiz/sessions/<attempt-id>.sqlite3
```
Recovery validates the journal, restores the authoritative clock, re-mounts drafts, and starts the server without altering the attempt identity.
---
## 6. Pedagogical Scoping & Debrief Protocol
### 6.1 Objective Ledger & Scoping
- **Representation:** Objectives are maintained in the Tutor's active context as a flat collection with directed `enables` edges.
- **Coverage Tracking:** Recorded as cumulative observations (`INTRODUCED`, `EXPLORED`, `PRACTICED`) alongside an active disposition (`ACTIVE` vs. `DEFERRED`).
- **Scoping Gate:** When an assessment milestone is reached, the Tutor compiles a candidate **Assessment Brief**. The learner explicitly reviews and approves the scope before authoring begins.
### 6.2 Three-Stage Socratic Debrief
1. **Results Overview:** High-level summary of overall attainment, demonstrated competencies, and friction points without revealing answers.
2. **Guided Socratic Reflection:** Targeted diagnostic questions exploring identified misconceptions, allowing the learner to formulate reasoning first.
3. **Consolidation:** Canonical explanations revealed, misunderstandings clarified, and future practice priorities established.
4. **Selective Documentation:** Debrief is a cognitive consolidation dialogue. Durable technical notes or ADRs are committed selectively to the active project repository; no mandatory universal vault summaries are generated.
@@ -0,0 +1,22 @@
# ADR-0001: Standalone Local Web Application
- Status: Accepted
- Date: 2026-11-10
## Context
Interactive assessments in an engineering learning environment require rendering rich visual diagrams (Mermaid flowcharts/sequence diagrams), mathematical notation (KaTeX), syntax-highlighted code editors with read-only context and editable buffers, and drag-and-drop or ordering widgets. We needed to choose the presentation layer and execution modality for the quiz runtime.
## Decision
Build `live-quiz` as a local, standalone web application comprising an ephemeral HTTP backend and a modern browser frontend, launched and managed via a command-line interface (`live-quiz start`).
## Alternatives Considered
- **Interactive Terminal UI (TUI):** Rejected. Terminal renderers for Mermaid diagrams and multi-line code editing introduce significant cognitive noise, distracting from the assessment. Furthermore, sharing a TUI tool with peers imposes non-standard terminal assumptions.
- **Embedded IDE Generative UI / Webview:** Rejected. Tightly couples the tool to a specific IDE client (e.g. Antigravity), breaking portability across different environments (Claude Code, terminal, or standalone peer usage).
## Consequences
- **Positive:** Enables rich, uncompromised DOM rendering (Mermaid.js, CodeMirror/Monaco, KaTeX); isolates the learner cognitively from conversational chat during the assessment; allows seamless sharing with external peers.
- **Negative / Trade-offs:** Introduces local network port allocation, browser process focus switching, and HTTP process lifecycle management.
## Related Decisions
- [ADR-0002: Harness-Agnostic Process Lifecycle](./0002-harness-agnostic-process-lifecycle.md)
- [ADR-0005: Python/FastAPI Backend and Vite Frontend Stack](./0005-python-fastapi-vite-stack.md)
@@ -0,0 +1,23 @@
# ADR-0002: Harness-Agnostic Process Lifecycle
- Status: Accepted
- Date: 2026-11-10
## Context
When an AI agent or skill invokes `live-quiz`, the execution must not block agent reasoning indefinitely, yet the agent must be notified when the assessment concludes. We needed a process coordination mechanism that works cleanly without tight coupling to proprietary agent harnesses.
## Decision
Design `live-quiz` as a standard foreground UNIX process whose termination signals session conclusion. In agent environments that support managed asynchronous tasks (such as Antigravity background tasks), the agent launches `live-quiz start`, yields the URL to the user, and terminates its turn. When `live-quiz` reaches a terminal state, its process exits with code 0, naturally triggering reactive wakeup of the agent harness.
## Alternatives Considered
- **Antigravity Sidecars and `agentapi`:** Rejected. Testing revealed that `agentapi` relies on Antigravity internal language server environment variables (`ANTIGRAVITY_LS_ADDRESS`, `ANTIGRAVITY_CSRF_TOKEN`), breaking execution when run outside the agent environment and introducing unnecessary daemon infrastructure.
- **Indefinite Synchronous Blocking Command:** Rejected. Fails over human time scales; if a learner pauses or steps away, long-running agent tool calls timeout or hang.
- **Polling Loop:** Rejected. Wastes tokens and agent execution turns polling local status endpoints.
## Consequences
- **Positive:** Complete decoupling from harness internals; standard OS process semantics (`exit 0`); portable across Antigravity, Claude Code, terminal shells, and CI pipelines.
- **Negative / Trade-offs:** Requires the calling host environment or user to manage process execution (e.g. running as a background task).
## Related Decisions
- [ADR-0001: Standalone Local Web Application](./0001-standalone-web-application.md)
- [ADR-0006: Ephemeral SQLite Session Journal & Recovery](./0006-ephemeral-sqlite-session-journal.md)
@@ -0,0 +1,20 @@
# ADR-0003: Static Code Challenges Without Runtime Execution
- Status: Accepted
- Date: 2026-11-10
## Context
Code exercises (completion, refactoring, bug-fixing) are critical for measuring engineering understanding. We needed to decide whether `live-quiz` should execute code locally and run test suites, or collect code purely as structured text artifacts.
## Decision
Treat all code challenges in `live-quiz` strictly as static text artifacts. The browser provides a rich, syntax-highlighted code editor (e.g. CodeMirror) with read-only context and editable buffers, but there is no "Run" button, local test runner, or subshell code execution in the application. Code submissions are evaluated post-hoc by the LLM evaluator against the frozen rubric.
## Alternatives Considered
- **Local Code Execution Sandbox in `live-quiz`:** Rejected. Introduces substantial security attack surfaces, language runtime dependencies, and complex test-runner orchestration. Crucially, running tests locally provides immediate feedback, turning a blind-pass assessment into an interactive trial-and-error debugging session.
## Consequences
- **Positive:** Keeps `live-quiz` lightweight, secure, and disposable; preserves the pedagogical invariant of a single blind pass measuring unassisted reasoning; eliminates execution environment dependencies on the host machine.
- **Negative / Trade-offs:** Cannot verify dynamic runtime behavior, performance benchmarks, or edge-case execution directly during the quiz; relies on the post-hoc evaluator to analyze code logic statically.
## Related Decisions
- [ADR-0004: Physical Separation of Questionnaire and Rubric](./0004-questionnaire-rubric-separation.md)
@@ -0,0 +1,25 @@
# ADR-0004: Physical Separation of Questionnaire and Rubric
- Status: Accepted
- Date: 2026-11-10
## Context
A core pedagogical invariant of the assessment model is the blind pass: the learner must not receive answer keys, expected solutions, or private evaluation criteria while completing the assessment. We needed an architectural mechanism to ensure this information cannot leak to the client.
## Decision
Enforce complete physical decoupling of the assessment specification at the filesystem level into two distinct artifacts:
1. `questionnaire.json`: The public presentation contract containing question IDs, markdown prompts, diagrams, options, and code stubs. Passed directly to `live-quiz`.
2. `rubric.json`: The private evaluation contract containing expected answers, observable criteria (Complete/Partial/Insufficient), failure mode diagnoses, and misconception signatures. Retained outside `live-quiz` and supplied exclusively to the post-hoc evaluator.
`live-quiz` never receives, loads, or serves `rubric.json`.
## Alternatives Considered
- **Single Unified Assessment JSON with Runtime Filtering:** Rejected. Passing a single file containing both questions and answer keys creates a severe risk of accidental solution leakage through permissive API routes, serialization bugs, or client-side inspection.
## Consequences
- **Positive:** Physical impossibility of solution leakage via browser DevTools, network sniffing, or server memory inspection.
- **Scope Limitation / Boundary:** This architectural separation guarantees that `live-quiz` cannot leak the rubric. It does not protect against an authoring agent inadvertently embedding answers directly into the question prompt text; prompt quality remains an authoring verification concern.
## Related Decisions
- [ADR-0003: Static Code Challenges Without Runtime Execution](./0003-static-code-challenges.md)
- [ADR-0007: Atomic Versioned JSON Export Contract](./0007-atomic-json-export-contract.md)
@@ -0,0 +1,27 @@
# ADR-0005: Python/FastAPI Backend and Vite Plus (`vp`) Frontend Stack
- Status: Accepted
- Date: 2026-11-10
## Context
`live-quiz` requires a fast, reliable CLI, an ephemeral local HTTP REST API, strict schema validation, and a browser UI that renders rich markdown, Mermaid diagrams, KaTeX equations, and code editors offline. We needed to select an implementation stack that minimizes friction, maximizes maintainability, and aligns with the author's development workflow.
## Decision
Implement `live-quiz` using:
- **Backend & CLI:** Python 3.11+, FastAPI, Pydantic v2, and managed via `uv`.
- **Static Analysis:** Pyright (type checking) and Ruff (linting/formatting).
- **Frontend & TypeScript Tooling:** Single-page application built via the Rust-powered Vite Plus (`vp`), with all third-party libraries (CodeMirror, Mermaid.js, KaTeX) fully bundled into static assets (`dist/`). FastAPI mounts and serves `dist/` directly.
## Alternatives Considered
- **Go Backend:** Rejected. While offering single-binary compilation, it introduces cognitive overhead and unfamiliar web/routing paradigms for the primary maintainer, diverting energy from core pedagogical features.
- **Node/TypeScript Backend:** Rejected. TypeScript is not the preferred backend language for this environment, and running Node on the server side adds unnecessary runtime dependencies.
- **Standard npm/Vite without Rust Tooling:** Rejected. Vite Plus (`vp`) provides unified, high-performance Rust-powered bundling and tooling.
- **CDN-hosted Frontend Assets:** Rejected. Fails when working offline or with spotty internet connectivity.
## Consequences
- **Positive:** Pydantic v2 provides a single source of truth for runtime validation and schema generation; `uv` ensures instant startup and hermetic environment management; pre-bundled Vite Plus assets guarantee 100% offline operation on Linux/NixOS.
- **Negative / Trade-offs:** Requires a frontend build step via `vp` during distribution.
## Related Decisions
- [ADR-0001: Standalone Local Web Application](./0001-standalone-web-application.md)
- [ADR-0006: Ephemeral SQLite Session Journal & Recovery](./0006-ephemeral-sqlite-session-journal.md)
@@ -0,0 +1,36 @@
# ADR-0006: Ephemeral SQLite Session Journal & Recovery
- Status: Accepted
- Date: 2026-11-10
## Context
During an assessment, the application must withstand interruptions (unexpected process kills via `SIGKILL`, system sleep, power failure, or tab refresh) without losing acknowledged answers or unsubmitted drafts. Furthermore, learners need an explicit **Pause / Resume** control to handle real-life interruptions without keeping a local server process running for hours.
## Decision
Use a temporary, local SQLite database (`~/.local/state/live-quiz/sessions/<attempt-id>.sqlite3`) strictly as an ACID-compliant **write-ahead session journal** during active execution:
1. **Three Separated Lifecycles:**
- *Server Process:* Ephemeral (runs on demand, exits on terminal state or explicit pause).
- *Assessment Instance:* Persistent concept identified by stable IDs and immutable questionnaire version hashes.
- *Assessment Attempt:* Persistent run representing a single pass against an immutable assessment version.
2. **Transactional State Journaling:**
- Every acknowledged answer submission, draft update, and timing event is committed immediately to SQLite.
- Pausing commits state and **terminates the server process cleanly**, eliminating zombie processes.
3. **Journal Destruction Invariant:**
- Upon reaching a terminal state (`COMPLETED`, `CLOSED_EARLY`, `TIMED_OUT`), the server publishes `attempt.json`.
- The temporary SQLite journal is deleted **only after durable export publication succeeds**.
4. **Explicit Recovery Command:**
- If a process is killed unexpectedly or paused, the journal remains on disk.
- Running `live-quiz recover --from-path <journal.sqlite3>` validates the journal, restores the authoritative clock, reloads drafts, and resumes the server under the exact same `attempt_id`.
- *Recovery Idempotency:* If recovery is invoked on a journal whose `attempt.json` was already successfully published, it verifies the export, cleans up the journal, and exits cleanly.
## Alternatives Considered
- **Permanent SQLite LMS Database:** Rejected. Burdening `live-quiz` with multi-workspace relational history, cross-project analytics, and long-term migrations creates severe scope creep. `live-quiz` is an assessment execution harness, not a full Learning Management System.
- **Flat-File JSON Appending:** Rejected. Subject to partial-write corruption during sudden process kills (`SIGKILL`) or power failures.
## Consequences
- **Positive:** Guarantees zero data loss for acknowledged submissions and drafts under crashes; allows pausing without running background processes; leaves zero state accumulation upon clean completion.
- **Negative / Trade-offs:** Requires an explicit recovery command (`live-quiz recover`) and managing temporary journal files in the XDG state directory.
## Related Decisions
- [ADR-0002: Harness-Agnostic Process Lifecycle](./0002-harness-agnostic-process-lifecycle.md)
- [ADR-0007: Atomic Versioned JSON Export Contract](./0007-atomic-json-export-contract.md)
@@ -0,0 +1,40 @@
# ADR-0007: Atomic Versioned JSON Export Contract
- Status: Accepted
- Date: 2026-11-10
## Context
When `live-quiz` concludes, it must hand off the assessment evidence to caller workflows (agents, evaluators, or future learning platforms). We needed a durable, forward-compatible integration boundary that does not expose internal SQLite database implementation details.
## Decision
Establish **`attempt.json` as a standardized, versioned JSON contract** published via an atomic file-replacement pattern:
1. **Atomic Publication Pipeline:**
- The final attempt data is serialized to JSON conforming to `attempt.schema.json`.
- Written to a temporary file (`.attempt.json.tmp`) within the target directory.
- Validated for structural correctness and flushed/fsynced to persistent storage.
- Atomically renamed to the final destination path (`attempt.json`).
- *Failure Guarantee:* If publication fails at any stage (e.g. disk full, permissions error), the temporary SQLite journal is retained, and the process exits with an error status.
2. **Reattempt vs. Recovery Semantics:**
- **Recovery (`live-quiz recover`):** Resumes an interrupted attempt, preserving the existing `attempt_id` and journal state.
- **Reattempt (`live-quiz start`):** Launches a fresh execution against the *same* immutable assessment definition, generating a distinct new `attempt_id`.
3. **Contract Attributes:**
Every exported attempt contains explicit provenance:
- `schema_version`
- `attempt_id`
- `assessment_id` & `assessment_version` (with `questionnaire_hash`)
- `workspace` locator
- `status` (`COMPLETED`, `CLOSED_EARLY`, `TIMED_OUT`)
- `timing` (active duration seconds, wall-clock duration seconds, pause intervals)
- `responses` array
## Alternatives Considered
- **Direct SQLite Database Querying by Evaluators / Future LMS:** Rejected. Exposing internal database tables couples external consumers to `live-quiz` schema migrations.
- **Direct In-Place File Overwriting:** Rejected. If a process crash occurs during file write, the destination file is left partially written and corrupted.
## Consequences
- **Positive:** Complete data durability; forward compatibility with any future LMS or evaluator; safe atomic handoff to agent callers.
- **Negative / Trade-offs:** Requires an atomic rename step and validation pass prior to session journal cleanup.
## Related Decisions
- [ADR-0004: Physical Separation of Questionnaire and Rubric](./0004-questionnaire-rubric-separation.md)
- [ADR-0006: Ephemeral SQLite Session Journal & Recovery](./0006-ephemeral-sqlite-session-journal.md)
@@ -0,0 +1,28 @@
# ADR-0008: Two-Product Repository Architecture
- Status: Accepted
- Date: 2026-11-10
## Context
Initial designs conflated the assessment engine with the author's personal Antigravity learning workflows, private `learning-contract.md`, and centralized knowledge vault (`~/Brain/`). This prevented `live-quiz` from being shared with peers as a standalone tool and created unnecessary coupling to a specific agent harness.
## Decision
Structure the repository as two decoupled, independently consumable products:
1. **The Assessment Engine (`live-quiz`):** An AI-agnostic CLI and web engine that consumes `questionnaire.json` and produces `attempt.json`. It knows nothing about AI, prompts, or Antigravity.
2. **The Reference Skills Collection (`skills/`):** Five portable agent skills demonstrating how any AI environment can compose learning and assessment workflows without private dependencies.
Additionally:
- **Retirement of Centralized Vault Persistence:** Formally eliminate mandatory generation of Markdown journals or notes into `~/Brain/00-inbox/`. The assessment debrief is a cognitive consolidation event. Any technical documentation or architectural records belong selectively to the active project repository according to that project's conventions.
- **Sovereign Personal Skills:** The author's personal `assess` skill in `~/Projects/skills/kiskaadee` remains a private composition that imports and uses `live-quiz`, layering on personal invariants without polluting the public repository.
## Alternatives Considered
- **Monolithic Agent Tooling Repo:** Rejected. Embedding personal learning contracts and vault habits into `live-quiz` prevents public distribution and forces non-standard conventions on peers.
- **Pure Engine Without Skills:** Rejected. Leaving `live-quiz` without companion reference skills leaves the engine without an accessible demonstration of AI-assisted authoring and evaluation.
## Consequences
- **Positive:** Public reusability; clean separation of concerns; elimination of curation debt from centralized vaults; modularity for peers.
- **Negative / Trade-offs:** Requires maintaining reference skills separately from private agent profiles.
## Related Decisions
- [ADR-0001: Standalone Local Web Application](./0001-standalone-web-application.md)
- [ADR-0009: Modular, Portable Reference Skills Collection](./0009-modular-portable-reference-skills.md)
@@ -0,0 +1,45 @@
# ADR-0009: Modular, Portable Reference Skills Collection
- Status: Accepted
- Date: 2026-11-10
## Context
AI-assisted assessment involves multiple pedagogical stages: learning objective formulation, assessment design, runtime administration, evidence evaluation, and Socratic debriefing. If implemented as a single monolithic prompt or tightly coupled to Antigravity subagents, the workflow cannot be reused across different agent platforms or by learners with different teaching preferences.
## Decision
Provide an MVP collection of five modular, portable reference skills in the repository's `skills/` directory, designed for independent consumption:
| Skill | Role | Primary Input | Primary Output |
| :--- | :--- | :--- | :--- |
| **`learning-objectives`** | Formulates observable, assessable competencies from learning goals. | Topic / Goals / Context | Objectives & evidence criteria |
| **`quiz-designer`** | Compiles an approved Assessment Brief into public and private contracts. | Assessment Brief | `questionnaire.json`, `rubric.json` |
| **`live-quiz`** | Operational CLI wrapper executing and recovering assessments. | Questionnaire path, CLI flags | Browser session URL, `attempt.json` |
| **`quiz-evaluator`** | Context-isolated post-hoc evaluation of attempt against rubric. | `rubric.json`, `attempt.json` | `evaluation.json` |
| **`tutor`** | Orchestrates learning dialogue, proposes scope, and leads debrief. | Learner interaction | Consolidated learning experience |
### Architectural Invariants:
1. **Independent Usability:**
- `/learning-objectives` can be used standalone for workshop or curriculum design.
- `/quiz-designer` accepts an assessment brief directly without requiring `/tutor`.
- `/live-quiz` operates without any AI skill.
- `/quiz-evaluator` evaluates any compatible attempt representation without conversation history.
- `/tutor` composes the specialists, but the specialists do not depend on `/tutor`.
2. **Harness Portability:**
- The reference skills operate as standard portable markdown instructions.
- They do not mandate Antigravity-specific subagent APIs (`invoke_subagent`). In single-agent environments (e.g. Claude Code, Cursor), they execute sequentially in the active agent context.
3. **Objective Modeling & Scoping:**
- Objectives are maintained as flat collections with directed `enables` relationships (a graph, not a nested tree).
- Coverage is tracked as cumulative observations (`INTRODUCED`, `EXPLORED`, `PRACTICED`) alongside an active disposition (`ACTIVE` vs. `DEFERRED`).
- Assessment readiness is evaluated contextually when the Tutor compiles the **Assessment Brief**, rather than as an intrinsic boolean flag in the ledger.
## Alternatives Considered
- **Single Monolithic "Mega-Prompt" Skill:** Rejected. Makes it impossible to customize or substitute individual stages (e.g. using a different evaluator or authoring tool).
- **Hardcoded Antigravity Subagent Hierarchy:** Rejected. Breaks portability for users running in non-Antigravity environments.
## Consequences
- **Positive:** Maximum composability and reusability; clean separation of pedagogical concerns; testable individual skills.
- **Negative / Trade-offs:** Requires maintaining five distinct skill instruction files (`SKILL.md`) and clear interface documentation.
## Related Decisions
- [ADR-0004: Physical Separation of Questionnaire and Rubric](./0004-questionnaire-rubric-separation.md)
- [ADR-0008: Two-Product Repository Architecture](./0008-two-product-repository-architecture.md)
+45
View File
@@ -0,0 +1,45 @@
# Architecture Decision Records (ADRs)
This directory contains the Architectural Decision Records for the `live-quiz` assessment engine and its companion reference skills, following the Markdown Any Decision Record (MADR) format.
## Decision Index
| ADR ID | Title | Status | Date |
| :--- | :--- | :--- | :--- |
| [ADR-0001](./0001-standalone-web-application.md) | Standalone Local Web Application | Accepted | 2026-11-10 |
| [ADR-0002](./0002-harness-agnostic-process-lifecycle.md) | Harness-Agnostic Process Lifecycle | Accepted | 2026-11-10 |
| [ADR-0003](./0003-static-code-challenges.md) | Static Code Challenges Without Runtime Execution | Accepted | 2026-11-10 |
| [ADR-0004](./0004-questionnaire-rubric-separation.md) | Physical Separation of Questionnaire and Rubric | Accepted | 2026-11-10 |
| [ADR-0005](./0005-python-fastapi-vite-stack.md) | Python/FastAPI Backend and Vite Plus (`vp`) Frontend Stack | Accepted | 2026-11-10 |
| [ADR-0006](./0006-ephemeral-sqlite-session-journal.md) | Ephemeral SQLite Session Journal & Recovery | Accepted | 2026-11-10 |
| [ADR-0007](./0007-atomic-json-export-contract.md) | Atomic Versioned JSON Export Contract | Accepted | 2026-11-10 |
| [ADR-0008](./0008-two-product-repository-architecture.md) | Two-Product Repository Architecture | Accepted | 2026-11-10 |
| [ADR-0009](./0009-modular-portable-reference-skills.md) | Modular, Portable Reference Skills Collection | Accepted | 2026-11-10 |
## Template
New decisions should follow this structure:
```markdown
# ADR-XXXX: [Short Title of Solved Problem]
- Status: [Proposed | Accepted | Superseded]
- Date: [YYYY-MM-DD]
## Context
[What is the context, constraints, and problem driving this decision?]
## Decision
[What architectural approach and invariants were chosen?]
## Alternatives Considered
- [Alternative 1 and why it was rejected]
- [Alternative 2 and why it was rejected]
## Consequences
- [Positive impacts and guarantees]
- [Negative trade-offs and operational costs]
## Related Decisions
- [Links to related ADRs]
```