docs(architecture): reconcile canonical objective registry boundary and skills integration in Issue 3

- Delineate engine integration boundary: live-quiz provides structural traceability without semantic registry awareness.
- Explicitly state that engine performs no registry queries, identity resolution, or longitudinal history management.
- Update architecture diagram to show feedback path from quiz-evaluator through tutor into Learner History.
- Mandate deterministic objective mapping for evaluators in data contracts and architecture specifications.
- Phrase attempt schema validation normatively in ADR-0007 while keeping exact schema layout open.
- Update ADR-0009 reference skills to depend on an abstract external registry and longitudinal history capability.
- Preserve Socratic debrief protocol, exposure vs. mastery distinctions, and external open design questions.
This commit is contained in:
kiskaadee committed 2026-11-11 12:48:25 -05:00
1 parent 2280595c33
commit b28ed51026
3 files changed
+83 -66

No files matched your search

+64 -54
View File
@@ -14,48 +14,54 @@ Conversational AI tutoring in typical chat interfaces lacks a stable, invariant
``` ```
[ Learning Context / Instruction ] [ Learning Context / Instruction ]
│ │
▼ ▼
Objective Ledger (in context) [ External Learning System ]
• Flat objectives with `enables` edges ┌───────────────────────────────────────────────────────┐
• Cumulative coverage observations │ • Canonical Catalog (Competencies, Objectives, IDs) │
• Active / Deferred disposition │ • Learner History (Observations, Contexts, Evidence) │◄────────────┐
│ └───────────────────────────────────────────────────────┘ │
▼ (Assessment Milestone & Learner Consent) │ │
Assessment Brief ▼ │
│ `learning-objectives` / `tutor` │
▼ (Candidate search & contextual scoping) │
`quiz-designer` Skill │ │
│ ▼ (Assessment Milestone & Learner Consent) │
┌────────────────┴────────────────┐ Assessment Brief │
▼ ▼ │ │
`questionnaire.json` `rubric.json` ▼ │
(Public Presentation) (Private Evaluation) `quiz-designer` Skill │
│ │ │ │
▼ │ ┌────────────────┴────────────────┐ │
[ `live-quiz` Engine ] │ ▼ ▼ │
• Standalone Local Web App │ `questionnaire.json` `rubric.json` │
• Zero LLM at runtime │ (Public Presentation (Private Evaluation │
• Ephemeral SQLite Journal │ + Canonical Objective Refs) + Deterministic Obj Mappings) │
• Authoritative Server Timer │ │ │ │
• Active time vs Pause tracking │ ▼ │ │
│ │ [ `live-quiz` Engine ] │ │
│ (Atomic Export attempt.json) │ • Standalone Local Web App │ │
▼ ▼ • Zero LLM at runtime │ │
`attempt.json` ──────────────► [ `quiz-evaluator` Skill ] • Ephemeral SQLite Journal │ │
│ • Authoritative Server Timer │ │
▼ • Structural Traceability of Obj Refs │ │
`evaluation.json` │ │ │
│ │ (Atomic Export attempt.json) │ │
▼ ▼ ▼ │
[ `tutor` Skill ] `attempt.json` ──────────────► [ `quiz-evaluator` Skill ] │
(3-Stage Socratic Debrief) (Preserves Question-to-Objective │ (Deterministic │
│ Response Mappings Verbatim) ▼ Correlation) │
▼ `evaluation.json` │
[ Cognitive Consolidation ] │ │
(Selective Project Docs Only) ▼ │
[ `tutor` Skill ] │
(3-Stage Socratic Debrief) │
│ │
┌────────────────┴────────────────┐ │
▼ ▼ │
[ Cognitive Consolidation ] (Logs Observations │
(Selective Project Docs Only) & Evidence) ───────┘
``` ```
--- ---
## 2. System Responsibilities & Boundaries ## 2. System Responsibilities & Boundaries
@@ -68,11 +74,11 @@ The repository distributes two decoupled products:
| Component | Responsibility | Inputs | Outputs | Core Invariants | | 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. | | **`learning-objectives`** | Formulates observable, assessable competencies; searches external catalog to propose new records and relationships. | Topic / Goals / Context, Registry candidates | Proposed objectives & evidence criteria | Does not assume mastery; canonical identity established by registry; 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. | | **`quiz-designer`** | Compiles an approved Assessment Brief into public and private contracts. | Assessment Brief, Learner history | `questionnaire.json`, `rubric.json` | Max 3-question chains; hermetic context or independent rubrics; no answer leakage; history informs difficulty without equating exposure to mastery. |
| **`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. | | **`live-quiz` Engine** | Ephemeral web server executing assessment, capturing evidence, and preserving objective references. | `questionnaire.json`, CLI flags | `attempt.json`, session status | Never receives `rubric.json`; zero runtime LLM; authoritative server clock; structural traceability of objective references; zero semantic registry queries. |
| **`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. | | **`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; associates evidence with canonical objective references. |
| **`tutor`** | Facilitates learning, proposes assessment scope, leads debrief. | Learner dialogue, context | Learning interactions | Does not force assessments; leads Socratic debrief before solution reveal. | | **`tutor`** | Facilitates learning, proposes assessment scope, logs contextual observations against stable objective IDs, leads debrief. | Learner dialogue, context, Registry/History | Learning interactions, Contextual observations | Does not force assessments; leads Socratic debrief before solution reveal; preserves repeated encounters; exposure is not mastery. |
| **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. | | **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. |
--- ---
@@ -82,13 +88,13 @@ The repository distributes two decoupled products:
The system communicates strictly across four versioned JSON contracts: The system communicates strictly across four versioned JSON contracts:
1. **`questionnaire.json` (Public Presentation Contract):** 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.* Consumed by `live-quiz`. Contains question IDs, markdown prompts, Mermaid diagrams, KaTeX equations, interaction types, option labels, initial code stubs, and associated canonical objective references. *Physically excludes answers, rubrics, and misconceptions.*
2. **`rubric.json` (Private Evaluation Contract):** 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. Retained by the calling agent workflow and supplied only to the evaluator. Contains learning objectives, observable criteria (Complete / Partial / Insufficient), categorical failure modes, misconception signatures, and explicit canonical objective references for each criterion (or a deterministic question-to-criterion mapping) to eliminate ambiguous natural-language inference.
3. **`attempt.json` (Durable Execution Evidence):** 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. Produced by `live-quiz` via atomic publication. Must conform structurally to the versioned attempt schema contract (`attempt.schema.json`). 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 (preserving question-level canonical objective references verbatim).
4. **`evaluation.json` (Diagnostic Assessment Report):** 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. Produced by `quiz-evaluator`. Contains criterion-level attainment ratings correlated deterministically to canonical objective references, failure-mode classifications (`CONCEPTUAL`, `LOGICAL`, `SYNTACTIC`, `OMISSION`, `REGRESSION`), misconception hypotheses with confidence levels, and discussion probes for debriefing.
--- ---
@@ -151,10 +157,14 @@ Recovery validates the journal, restores the authoritative clock, re-mounts draf
## 6. Pedagogical Scoping & Debrief Protocol ## 6. Pedagogical Scoping & Debrief Protocol
### 6.1 Objective Ledger & Scoping ### 6.1 Canonical Objectives, Learning History & Assessment Scoping
- **Representation:** Objectives are maintained in the Tutor's active context as a flat collection with directed `enables` edges. - **Integration Boundary:** Learning workflows resolve competencies and objectives against a persistent external catalog, while learner interactions accumulate as contextual observations in a longitudinal learning history. `live-quiz` has no semantic awareness of the registry, performs no registry queries or identity resolution, and manages no longitudinal history; it merely provides structural traceability of objective references across questionnaire execution and attempt export.
- **Coverage Tracking:** Recorded as cumulative observations (`INTRODUCED`, `EXPLORED`, `PRACTICED`) alongside an active disposition (`ACTIVE` vs. `DEFERRED`). - **Competencies vs. Contextualized Objectives:** The external catalog maintains a many-to-many relationship between broad, reusable competencies (e.g. *Reason about HTTP caching semantics*) and observable, contextualized learning objectives (e.g. *Explain how HTTP caching headers influence browser behavior*).
- **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. - **Objective Ledger as In-Context View:** Within active sessions, the Tutor maintains an in-context ledger referencing stable objective identities. Deferral (`ACTIVE` vs. `DEFERRED`) is an independent pedagogical disposition that does not erase or overwrite previous learning observations.
- **Exposure Informs Design, Not Mastery:** Prior observations (e.g. `INTRODUCED`, `EXPLORED`, `PRACTICED` as provisional examples) inform the Quiz Designer regarding familiarity and context novelty to avoid redundant introductory questioning. However, exposure is never equated to mastery: difficulty calibration must preserve distinctions between familiarity, task complexity, context novelty, assistance level, and demonstrated independent performance.
- **Scoping Gate via Assessment Brief:** Assessment readiness is never an intrinsic or permanent flag on an objective. It is determined dynamically when the Tutor compiles a candidate **Assessment Brief** (identifying selected canonical objectives, performance criteria, context, and intended difficulty), which the learner explicitly reviews and approves before authoring begins.
- **Deterministic Evaluator Mapping:** The assessment contract guarantees deterministic correlation between rubric criteria, question responses, and canonical objective identities without requiring `quiz-evaluator` to receive `questionnaire.json` or guess objective associations from similar wording.
- **Unresolved System Questions:** The exact structural schema mapping of objective references across `questionnaire.json`, `rubric.json`, and `attempt.json` remains to be finalized. Furthermore, detailed registry architecture—including the authoritative storage location and synchronization strategy for learner observations (e.g. interim session-local logfiles vs. centralized store), relationship semantics (e.g. refining `enables` beyond a prerequisite DAG), dynamic roles of terminal vs. enabling objectives, and concrete observation schemas—belongs to the broader learning-system architecture and remains explicitly open.
### 6.2 Three-Stage Socratic Debrief ### 6.2 Three-Stage Socratic Debrief
1. **Results Overview:** High-level summary of overall attainment, demonstrated competencies, and friction points without revealing answers. 1. **Results Overview:** High-level summary of overall attainment, demonstrated competencies, and friction points without revealing answers.
@@ -9,7 +9,7 @@ When `live-quiz` concludes, it must hand off the assessment evidence to caller w
## Decision ## Decision
Establish **`attempt.json` as a standardized, versioned JSON contract** published via an atomic file-replacement pattern: Establish **`attempt.json` as a standardized, versioned JSON contract** published via an atomic file-replacement pattern:
1. **Atomic Publication Pipeline:** 1. **Atomic Publication Pipeline:**
- The final attempt data is serialized to JSON conforming to `attempt.schema.json`. - The final attempt data is serialized to JSON conforming to the versioned attempt schema contract (`attempt.schema.json`).
- Written to a temporary file (`.attempt.json.tmp`) within the target directory. - Written to a temporary file (`.attempt.json.tmp`) within the target directory.
- Validated for structural correctness and flushed/fsynced to persistent storage. - Validated for structural correctness and flushed/fsynced to persistent storage.
- Atomically renamed to the final destination path (`attempt.json`). - Atomically renamed to the final destination path (`attempt.json`).
@@ -17,7 +17,7 @@ Establish **`attempt.json` as a standardized, versioned JSON contract** publishe
2. **Reattempt vs. Recovery Semantics:** 2. **Reattempt vs. Recovery Semantics:**
- **Recovery (`live-quiz recover`):** Resumes an interrupted attempt, preserving the existing `attempt_id` and journal state. - **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`. - **Reattempt (`live-quiz start`):** Launches a fresh execution against the *same* immutable assessment definition, generating a distinct new `attempt_id`.
3. **Contract Attributes:** 3. **Contract Attributes & Canonical Objective Traceability:**
Every exported attempt contains explicit provenance: Every exported attempt contains explicit provenance:
- `schema_version` - `schema_version`
- `attempt_id` - `attempt_id`
@@ -25,7 +25,10 @@ Establish **`attempt.json` as a standardized, versioned JSON contract** publishe
- `workspace` locator - `workspace` locator
- `status` (`COMPLETED`, `CLOSED_EARLY`, `TIMED_OUT`) - `status` (`COMPLETED`, `CLOSED_EARLY`, `TIMED_OUT`)
- `timing` (active duration seconds, wall-clock duration seconds, pause intervals) - `timing` (active duration seconds, wall-clock duration seconds, pause intervals)
- `responses` array - `responses` array preserving mappings to associated canonical objective references carried in the questionnaire.
*Structural vs. Semantic Validation Invariant:*
The exported payload must conform structurally to the versioned attempt schema contract (`attempt.schema.json`). However, the engine maintains zero semantic awareness of external registries: it does not validate, resolve, or query objective identifiers against external catalogs, preserving them verbatim for downstream evaluation. The exact schema layout for preserving question-to-objective response traceability remains open until the JSON schema contracts are formally authored.
## Alternatives Considered ## Alternatives Considered
- **Direct SQLite Database Querying by Evaluators / Future LMS:** Rejected. Exposing internal database tables couples external consumers to `live-quiz` schema migrations. - **Direct SQLite Database Querying by Evaluators / Future LMS:** Rejected. Exposing internal database tables couples external consumers to `live-quiz` schema migrations.
@@ -11,11 +11,11 @@ Provide an MVP collection of five modular, portable reference skills in the repo
| Skill | Role | Primary Input | Primary Output | | Skill | Role | Primary Input | Primary Output |
| :--- | :--- | :--- | :--- | | :--- | :--- | :--- | :--- |
| **`learning-objectives`** | Formulates observable, assessable competencies from learning goals. | Topic / Goals / Context | Objectives & evidence criteria | | **`learning-objectives`** | Formulates observable, assessable competencies; searches external catalog to propose new records and relationships. | Topic / Goals / Context, Registry candidates | Proposed objectives & evidence criteria |
| **`quiz-designer`** | Compiles an approved Assessment Brief into public and private contracts. | Assessment Brief | `questionnaire.json`, `rubric.json` | | **`quiz-designer`** | Compiles an approved Assessment Brief into public and private contracts; uses learning history to inform context and difficulty. | Assessment Brief, Learner history | `questionnaire.json`, `rubric.json` |
| **`live-quiz`** | Operational CLI wrapper executing and recovering assessments. | Questionnaire path, CLI flags | Browser session URL, `attempt.json` | | **`live-quiz`** | Operational CLI wrapper executing and recovering assessments; structurally preserves canonical objective references. | 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` | | **`quiz-evaluator`** | Context-isolated post-hoc evaluation of attempt against rubric; deterministically correlates evidence with canonical objective references. | `rubric.json`, `attempt.json` | `evaluation.json` |
| **`tutor`** | Orchestrates learning dialogue, proposes scope, and leads debrief. | Learner interaction | Consolidated learning experience | | **`tutor`** | Orchestrates learning dialogue, proposes scope, logs contextual observations against stable objective IDs, and leads debrief. | Learner interaction, Registry/History | Consolidated learning experience, Contextual observations |
### Architectural Invariants: ### Architectural Invariants:
1. **Independent Usability:** 1. **Independent Usability:**
@@ -27,10 +27,14 @@ Provide an MVP collection of five modular, portable reference skills in the repo
2. **Harness Portability:** 2. **Harness Portability:**
- The reference skills operate as standard portable markdown instructions. - 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. - 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:** - Skills do not hardcode host filesystem layouts or private paths.
- Objectives are maintained as flat collections with directed `enables` relationships (a graph, not a nested tree). 3. **Objective Modeling, Learning History & Scoping (Provisional Pedagogical Model):**
- Coverage is tracked as cumulative observations (`INTRODUCED`, `EXPLORED`, `PRACTICED`) alongside an active disposition (`ACTIVE` vs. `DEFERRED`). - **Persistent Catalog vs. In-Context Ledger:** Objectives and competencies are resolved against an external catalog with many-to-many relationships (avoiding rigid parent-child hierarchies or assumed prerequisite DAGs). `learning-objectives` proposes new records; canonical identity is established by the registry.
- Assessment readiness is evaluated contextually when the Tutor compiles the **Assessment Brief**, rather than as an intrinsic boolean flag in the ledger. - **Contextual History vs. Single State:** Learner engagement is logged as longitudinal observations (e.g. `INTRODUCED`, `EXPLORED`, `PRACTICED` as provisional examples) associated with stable objective IDs. Repeated encounters are preserved rather than overwritten. Deferral (`ACTIVE` vs. `DEFERRED`) is an independent pedagogical disposition that does not erase past history.
- **Exposure vs. Mastery:** Prior exposure informs assessment design to avoid redundant introductory testing, but exposure is never equated to mastery. Difficulty calibration accounts for familiarity, task complexity, context novelty, assistance level, and demonstrated independent performance.
- **Scoping Gate:** Assessment readiness is evaluated contextually when the Tutor compiles the **Assessment Brief**, rather than as an intrinsic boolean flag in the catalog.
- **Deterministic Evaluation Correlation:** Evaluation evidence is correlated deterministically to canonical objective references using explicit mappings across rubric criteria and attempt responses, eliminating ambiguous natural-language guessing.
- **Abstract Capability Dependency:** Reference skills depend on an abstract registry and history capability (e.g. via CLI, local HTTP, or file protocols) rather than hardcoding specific storage implementations or database technologies. Detailed registry architecture, sync strategies, and exact schema mappings remain open design questions.
## Alternatives Considered ## 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). - **Single Monolithic "Mega-Prompt" Skill:** Rejected. Makes it impossible to customize or substitute individual stages (e.g. using a different evaluator or authoring tool).