Markdown Converter
Agent skill for markdown-converter
> **AI Coding Assistant Instructions** - This document guides AI tools (GitHub Copilot, Cursor, Claude, Gemini, etc.) on how to work with this codebase effectively.
Sign in to like and favorite skills
AI Coding Assistant Instructions - This document guides AI tools (GitHub Copilot, Cursor, Claude, Gemini, etc.) on how to work with this codebase effectively.
๐ญ "We don't just process conversations. We understand them."
Description: Pixelated Empathy is an enterprise-grade platform engineered to translate human emotion into actionable intelligence. Our cornerstone, The Empathy Gymโข, provides mental health professionals with a high-fidelity, risk-free AI environment to master complex therapeutic dialogues.
Tech Stack:
Every implementation MUST be complete and production-ready.
pass, ..., TODO, NotImplementedError, # FIXMEreturn True, return [], hardcoded dummies)Warnings are signals, not noise. Fix the root cause, don't silence it.
// eslint-disable, // @ts-ignore, # noqa, etc. to bypass warnings// prettier-ignore, type: ignore, or similar suppression comments# Setup (CRITICAL: Never use npm/yarn for Node, never use pip/conda for Python) pnpm install # Node dependencies uv install # Python dependencies # Development pnpm dev # Frontend dev server pnpm dev:all-services # All services (Frontend, AI, Worker, WebSocket) # Build pnpm build # Production build pnpm docker:up # Docker Compose deployment # Testing pnpm test # Unit tests pnpm test:all # Full test suite pnpm e2e # End-to-end tests # Quality pnpm lint # Run linter pnpm check:all # Lint + Typecheck + Format check pnpm security:scan # Deep security audit # Python uv run <script> # Run Python scripts
pixelated/ โโโ ai/ # ๐ง Emotional Intelligence Engine (submodule) โ โโโ academic_sourcing/ # Journal research pipeline โ โโโ training/ # Model training & fine-tuning โ โโโ core/ # Core AI modules โโโ src/ # ๐จ Main Application (Astro + React) โ โโโ @types/ # Project-specific TypeScript definitions โ โโโ api/ # API routes/handlers โ โโโ components/ # Reusable UI components โ โโโ config/ # Configuration files โ โโโ content-store/ # CMS content (MDX, blog posts) โ โโโ hooks/ # Custom React hooks โ โโโ layouts/ # Layout components โ โโโ lib/ # Core libraries & utilities โ โ โโโ ai/ # AI services & bias detection โ โ โโโ memory/ # Conversation memory (Mem0) โ โ โโโ services/ # Backend services โ โโโ pages/ # Astro pages & routes โ โโโ simulator/ # Empathy Gym training simulator โ โโโ styles/ # Global styles & tokens โ โโโ types/ # TypeScript type definitions โ โโโ utils/ # Utility functions โโโ .kiro/steering/ # ๐ Domain & style guidelines โโโ .openskills/ # ๐ ๏ธ AI agent skills โโโ .openagents/ # ๐ค Specialized AI agents โโโ docs/ # ๐ Architecture & research docs โโโ docker/ # ๐ณ Docker configurations โโโ scripts/ # ๐ง Build & utility scripts โโโ tests/ # ๐งช Test suites โโโ config/ # โ๏ธ Tool configurations
Key Directory Purposes:
| Directory | Purpose |
|---|---|
| Emotional Intelligence Engine - NeMo training, data pipelines, model fine-tuning |
| AI services integration, bias detection, conversation analysis |
| The Empathy Gymโข - therapeutic dialogue training |
| Reusable UI components |
| Astro pages and routes |
| Critical - Domain guidelines for emotional AI, code style, security |
| Architecture docs, research findings, API documentation |
| Unit, integration, and E2E tests |
import { useState } from 'react' import type { EmotionScore } from '@/types' interface EmotionCardProps { emotion: EmotionScore onAnalyze?: (id: string) => void } export function EmotionCard({ emotion, onAnalyze }: EmotionCardProps) { const [isExpanded, setIsExpanded] = useState(false) // Validate emotion score is in valid range (0-1) const normalizedIntensity = Math.max(0, Math.min(1, emotion.intensity)) return ( <div className="emotion-card"> {/* Component content */} </div> ) }
// 1. External dependencies import { useState, useCallback } from 'react' // 2. Internal modules (use path aliases) import { EmotionAnalyzer } from '@/lib/ai/emotion-analyzer' import { useConversation } from '@/hooks/useConversation' // 3. Types (always use `type` imports) import type { EmotionScore, ConversationContext } from '@/types' // 4. Styles (if applicable) import styles from './Component.module.css'
Primary Method: CSS Modules + Vanilla CSS
src/styles/Approach: Zustand + Nanostores (for Astro islands)
src/lib/stores/Method: TanStack Query
src/services/)// ALWAYS validate emotion scores const validateEmotionScore = (score: number): number => { if (score < 0 || score > 1) { throw new Error(`Emotion score must be 0-1, got: ${score}`) } return score } // ALWAYS handle crisis signals const hasCrisisSignal = (text: string): boolean => { // Check for self-harm, crisis keywords, etc. // See: src/lib/ai/crisis-detection/ }
.kiro/steering/domain-emotional-ai.md - Emotional AI guidelines.kiro/steering/security-ethics.md - Security & ethics deep-divedocs/guides/EMPATHY_RESPONSE_STYLE.md - Response style guideFramework: Vitest + React Testing Library + Playwright
Component.test.tsx)pnpm test:all before committingpnpm test # Unit tests (Vitest) pnpm test:unit # Unit tests with coverage pnpm test:integration # Integration tests pnpm test:security # Security-specific tests pnpm test:hipaa # HIPAA compliance tests pnpm e2e # End-to-end tests (Playwright) pnpm e2e:ui # Playwright UI mode
Location:
.env.local (never commit - use .env.example as template)
Key variables:
# Core NODE_ENV=development PORT=4321 # Database MONGODB_URI=mongodb+srv://... DATABASE_URL=postgresql://... REDIS_URL=redis://localhost:6379/0 # AI Services MEM0_API_KEY=your-mem0-api-key MEM0_ENABLED=true # Security JWT_SECRET=your-jwt-secret ENCRYPTION_KEY=your-encryption-key-32-chars # Features FEATURE_AI_INSIGHTS=true FEATURE_CRISIS_DETECTION=true
Note: Never commit
.env.local - use .env.example as template
pnpm dev - Start Astro dev serverpnpm dev:all-services - Start all services (Frontend, AI, Worker, WebSocket, Academic Sourcing)pnpm dev:bias-detection - Start bias detection servicepnpm dev:ai-service - Start AI servicepnpm dev:websocket - Start WebSocket serverpnpm dev:academic-sourcing - Start academic journal sourcing APIpnpm build - Production buildpnpm build:cloudflare - Build for Cloudflare Workerspnpm docker:up - Deploy with Docker Composepnpm docker:down - Stop Docker servicespnpm deploy - Deploy to stagingpnpm deploy:prod - Deploy to productionpnpm test - Run unit testspnpm test:all - Run complete test suitepnpm test:coverage - Tests with coveragepnpm e2e - End-to-end testspnpm test:security - Security testspnpm test:hipaa - HIPAA compliance testspnpm lint - Run linterpnpm lint:fix - Fix linting issuespnpm typecheck - TypeScript type checkingpnpm check:all - Lint + Typecheck + Formatpnpm security:scan - Deep security auditpnpm security:check - Check for credentialspnpm test:evals - Run AI evaluation testspnpm merge-datasets - Merge training datasetspnpm prepare-openai - Prepare data for OpenAI fine-tuningpnpm prepare-huggingface - Prepare data for HuggingFaceuv run <script> - Run Python scriptsuv run pytest - Run Python testsuv run uvicorn ai.academic_sourcing.api.main:app --reload - Start FastAPIConfigured in
tsconfig.json:
| Alias | Path |
|---|---|
| |
| |
| |
| |
| |
| |
| |
pnpm security:check and pnpm security:scanany@/, @lib/, etc..kiro/steering/domain-emotional-ai.mdsrc/lib/ai/crisis-detection/pnpm check:all before committingโ NEVER use npm or yarn (use pnpm) โ NEVER use pip, conda, or venv (use uv) โ NEVER commit .env files or secrets โ NEVER ignore potential crisis signals โ NEVER use emotion scores outside 0-1 range โ NEVER bypass security validation โ ALWAYS validate emotional data โ ALWAYS handle edge cases (silence, crisis) โ ALWAYS use path aliases (@/, @lib/, etc.) โ ALWAYS run tests before committing โ ALWAYS check for security issues
Skills extend AI capabilities for specialized tasks. Load a skill using:
cat <path>
| Skill | Description | Path |
|---|---|---|
| Mandatory workflows for finding and using skills | |
| Refine ideas through structured Socratic questioning | |
| Create implementation plans with exact file paths | |
| Execute plans in controlled batches with review | |
| Write tests first, watch fail, write minimal code | |
| Four-phase debugging framework | |
| Dispatch code-reviewer subagent | |
| Technical rigor for code review feedback | |
| Run verification before claiming success | |
| Create isolated git worktrees | |
| Dispatch multiple agents for independent problems | |
| Trace bugs backward through call stack | |
| Validate at every layer | |
| Prevent testing mock behavior | |
| Create new skills with TDD | |
| Complete development work with merge options | |
Agents are specialized AI assistants that run in independent contexts for complex tasks.
| Agent | Description | Path |
|---|---|---|
| Scalable API design, microservices, distributed systems | |
| Data layer design, technology selection, schema modeling | |
| Performance tuning, query optimization, caching | |
| IaC automation, state management, enterprise infrastructure | |
| AWS/Azure/GCP multi-cloud infrastructure | |
| Django 5.x, async views, DRF, Celery, Channels | |
| FastAPI, SQLAlchemy 2.0, Pydantic V2, async patterns | |
.kiro/steering/code-style.md - Detailed code style guide.kiro/steering/security-ethics.md - Security & ethics deep-dive.kiro/steering/clean-code-principles.md - Clean code patterns.kiro/steering/testing-strategy.md - Testing best practices.kiro/steering/domain-emotional-ai.md - Emotional AI guidelinesdocs/guides/EMPATHY_RESPONSE_STYLE.md - Response style guidedocs/ - Architecture and research documentationGEMINI.md - Project identity and missionREADME.md - Project overviewsupermemory (project: pixelated) and .ralph/progress.txt for context on the current/upcoming task.supermemory (project: pixelated) and update .ralph/progress.txt.We don't just process conversations. We understand them.
This platform handles sensitive mental health data. Every decision should prioritize:
Last Generated: 2026-01-31 Auto-generated from: package.json, tsconfig.json, and project structure
๐ก Tip: Always read
before working on AI-related features..kiro/steering/domain-emotional-ai.md
ยฉ 2026 Pixelated Empathy โข Engineered with Purpose