Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ amplifyconfiguration*
logs/*

# windsurf
.windsurf/*
!.windsurf/rules/
.windsurf/rules/*
!.windsurf/rules/project-standards.md
# .windsurf/*
# !.windsurf/rules/
# .windsurf/rules/*
# !.windsurf/rules/project-standards.md

# next-video
videos/*
Expand Down
113 changes: 113 additions & 0 deletions .windsurf/workflows/create-feature-spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
description: Create feature specs.
auto_execution_mode: 1
---

## Objective

Create a full specification for a new feature so that the implementation agent (human or AI) has clear, testable tasks, acceptance criteria, and traceability.

---

## Inputs

| Input | Type | Description |
| ------------------- | ----------------- | ------------------------------------------------ |
| FEATURE_NAME | string | Short descriptive name of the feature |
| BUSINESS_CONTEXT | string | Business value or user need addressed |
| SCOPE | string | Defined boundaries or sub-scope for this feature |
| TARGET_TIMELINE | string | Target date or sprint reference |
| STAKEHOLDERS | list | Roles such as Product, UX, Engineering, QA |
| DEPENDENCIES | list | Related features, modules, or external systems |
| NON_FUNCTIONAL_REQS | string (optional) | Performance, security, or compliance constraints |

---

## Phases

### 1. Requirements Phase

- Document user stories and business requirements using EARS or a similar format.
[Source: Ernest Chiang](https://www.ernestchiang.com/en/notes/ai/kiro/)
- For each user story, include acceptance criteria in Gherkin format:

```gherkin
Scenario: <scenario title>
Given <initial context>
When <event occurs>
Then <observable outcome>
```

- Identify edge cases and negative flows.
- Map to business value: “As a user, I want <capability> so that <benefit>.”

---

### 2. Design Phase

- Define architecture, key components, APIs, data models, and UI interactions.
- Add sequence or flow diagrams as needed (Mermaid or similar).
- Define interfaces and integration points (internal and external).
- Specify non-functional requirements: performance, scalability, security.
- Identify configuration options or feature flags.

---

### 3. Tasks Phase

- Break the design into discrete, traceable tasks.
Each task should include:
- Title
- Status (`Pending`, `In Progress`, `Completed`, `Blocked`)
- Dependencies
- Estimate (time or story points)
- Assignee (role or owner)
- Acceptance criteria/tests and deliverables
- Notes (implementation hints, constraints)
- Ensure traceability between tasks and requirements.
- Include tracking details for progress and completion.

---

### 4. Review and Approval

- Stakeholders review requirements, design, and tasks.
- Record formal sign-off via comment or markdown checklist.
- Confirm:
- Acceptance criteria are measurable and clear.
- Tasks are sequenced and dependencies handled.

---

### 5. Implementation and Monitoring

- Start implementation only after approval.
- Monitor progress:
- Update task statuses.
- Log blockers.
- Revise spec if scope changes.
- Keep the document updated as a living artifact.
[Source: Kiro Best Practices](https://kiro.dev/docs/specs/best-practices/)
- After completion:
- Validate acceptance criteria and tests.
- Update documentation and finalize the checklist.

---

## Outputs

- `requirements.md`
- `design.md`
- `tasks.md`
- Summary checklist: “Feature <FEATURE_NAME> ready for development”
- Gherkin test suite or reference link
- Progress tracking dashboard or markdown summary

---

## Safety and Guardrails

- Do not start coding until sign-off is complete.
- Avoid scope creep; re-approve any changes.
- Define tests before implementation.
- Maintain traceability from business value → user story → acceptance → task.
113 changes: 113 additions & 0 deletions docs/learning-check-feature-sample-report1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Learning Check – EMDR Foundations: Combined Feature Summary (Log-Validated)

> **Source:** Tavus Conversation Log `c42fa6ac1801c4dc`
> **Validated On:** 2025-11-01 07:16:36
> **Feature Context:** Conversational assessment validating recall, application, and self-explanation for *EMDR Foundations* chapter.

---

## 1. Session Overview

| Attribute | Observation |
|------------|-------------|
| **Conversation Duration** | ~3 minutes (auto-ended at max duration) |
| **Flow** | Recall → Application → Self-Explanation → Recap |
| **Persona** | 8p3p – AI Instructor Assistant (Tavus CVI Replica) |
| **Chapter Context** | EMDR Foundations (chapter_1) |
| **Engagement Type** | Continuous verbal interaction (9 user / 10 assistant turns) |
| **Status** | ✅ Completed |

---

## 2. Objective Tracking (Based on Transcript)

| Objective | Prompt / Evidence | Learner Response | Evaluation |
|------------|------------------|------------------|-------------|
| **Recall** | "What does EMDR stand for and what is it used for?" | "Eye Movement Desensitization... helps people with trauma" | ✅ Partial recall (omitted ‘Reprocessing’ – corrected by AI) |
| **Application** | "Where might EMDR be used?" | "Car accident", later "Combat war veteran" | ✅ Strong real-world relevance |
| **Self-Explanation** | "What happens during reprocessing stage?" | "More natural... less traumatic" | ⚠ Conceptually valid, limited elaboration |
| **Summary** | "Summarize EMDR’s main goal" | "Poems more natural and less traumatic" | ✅ Correct intent despite phrasing noise |

→ **All 3 objectives completed successfully**
→ **Average Objective Accuracy:** ~82%

---

## 3. Perception Analysis (Visual Engagement)

| Metric | Result | Interpretation |
|---------|---------|----------------|
| **Screen Gaze %** | 90–100% | Excellent focus |
| **Engagement Level** | Attentive and engaged | Fully present |
| **Comprehension Cues** | None detected | No confusion |
| **Distractions** | None | Stable environment |
| **Body Language** | Relaxed, neutral-engaged | Positive posture |
| **Note-Taking** | None | Passive attentive mode |
| **Visual Engagement Score** | ≈ 96 / 100 | Top-tier visual presence |

---

## 4. Completion Summary

| Category | Threshold | Measured | Result |
|-----------|------------|-----------|---------|
| **Engagement Time** | ≥ 90 s | ≈ 180 s | ✅ Met |
| **Objective Completion** | 3/3 | 3/3 | ✅ Met |
| **Average Score** | ≥ 70% | 82% | ✅ Met |
| **Visual Engagement Score** | ≥ 80% | 96% | ✅ Met |
| **Composite Score (0.6×verbal + 0.4×visual)** | ≥ 70% | **88.8%** | ✅ Passed |

---

## 5. Rubric Evaluation

| Dimension | Criteria | Rating (0–10) | Comments |
|------------|-----------|---------------|-----------|
| Recall Accuracy | Can state definition + purpose | 7 | Partial recall fixed with guidance |
| Application | Real-world use case relevance | 9 | Excellent applied reasoning |
| Self-Explanation | Explains how/why EMDR works | 8 | Concise but valid |
| Engagement (Visual + Audio) | Eye contact + sustained speech | 10 | Full focus and duration |
| Overall Understanding | Conceptual synthesis | 8.5 | Good comprehension, calm demeanor |

**Composite Rubric Score:** 8.1 / 10 (≈ 81%)
**Overall Feature Status:** ✅ *Passed – Learning Check Complete*

---

## 6. Insights and Recommendations

1. Visual engagement strongly correlated with comprehension (validate as future metric).
2. Objective scoring aligns well with expected key terms: *EMDR, bilateral stimulation, trauma processing.*
3. Suggested improvements:
- Add “Note-taking / Reference detection” as optional metric.
- Introduce one additional self-explanation prompt for deeper reflection.
- Log response timestamps to measure reaction latency per prompt.

---

## 7. Configuration References

**Webhook Events Observed:**
- `application.transcription_ready`
- `application.perception_analysis`
- `system.shutdown (max_call_duration)`

**Environment Variables Required:**
```bash
TAVUS_API_KEY=required
TAVUS_PERSONA_ID=8p3p-ai-instructor
TAVUS_WEBHOOK_SECRET=required
TAVUS_WEBHOOK_URL=https://your-app.com/api/learning-checks/webhook
LEARNING_CHECK_PASS_THRESHOLD=70
```

---

## 8. Validation Summary for Windsurf Workflow

- Objectives: ✅ 3/3
- Average Score: 82%
- Visual Engagement: 96%
- Composite Score: 88.8%
- Status: ✅ Passed (EMDR Foundations)
- File Updated: 2025-11-01 07:16:36
Loading