Skip to content

Commit 61d9a20

Browse files
docs: update CLAUDE.md and README.md to reflect changes in language profiles and quiz structure; remove outdated language paths summary
The documentation now accurately describes the updated structure of the language profiles, including the dual MBTI mappings for better personality matches. The removal of the outdated language paths summary streamlines the documentation, ensuring that users have access to the most relevant and current information about the quiz and its features.
1 parent 7b37b02 commit 61d9a20

4 files changed

Lines changed: 22 additions & 222 deletions

File tree

CLAUDE.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,35 @@ The quiz operates in three phases managed by `src/lib/stores/quiz.ts`:
4747

4848
### Key Data Flow
4949

50-
1. MBTI questions (`mbti-questions.ts`) → Calculate MBTI type → Filter candidate languages from `language-profiles.ts`
50+
1. MBTI questions (`mbti-questions.ts`) → Calculate MBTI type → Filter candidate languages from `languages.ts`
5151
2. Generate adaptive questions (`adaptive-questions.ts`) based on MBTI type
5252
3. Score candidate languages based on answers → Return highest scoring language
5353

5454
### Component Structure
5555

5656
- **MBTIQuestion.svelte**: Handles MBTI personality questions
5757
- **LanguageQuestion.svelte**: Handles adaptive language matching questions
58-
- **Results.svelte**: Displays final matched language with personality insights
58+
- **Results.svelte**: Displays final matched language with user's MBTI type
5959
- **+page.svelte**: Main orchestrator managing quiz phases and state transitions
6060

6161
### Data Architecture
6262

63-
- **language-profiles.ts**: 200+ language profiles with MBTI mappings
63+
- **languages.ts**: 42 language profiles with dual MBTI mappings (primary + optional secondary)
64+
- Each language has `mbti: [primary, secondary?]` format
65+
- Languages can match multiple personality types for better distribution
66+
- Example: Python maps to `['ENFP', 'INTP']` - creative + analytical
6467
- **adaptive-questions.ts**: Dynamic question generation based on MBTI type
6568
- **quiz.ts store**: Centralized state management using Svelte stores
6669

70+
### MBTI Mapping Strategy
71+
72+
Languages support 1-2 MBTI types to ensure:
73+
74+
- All 16 MBTI types have at least one language match
75+
- Popular languages can appeal to multiple personality types
76+
- Matching considers both primary and secondary MBTI assignments
77+
- User's calculated MBTI type is preserved in results (not the language's MBTI)
78+
6779
## Deployment
6880

6981
The app deploys to GitHub Pages via GitHub Actions on push to main branch. The deployment workflow:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ Visit the live application at: https://repobirdbot.github.io/programming-persona
99
## 🌟 Features
1010

1111
- **MBTI-Based Assessment**: Two-phase quiz combining personality typing with language matching
12-
- **42 Programming Languages**: Curated list of mainstream and specialized languages
12+
- **42 Programming Languages**: Curated list with dual MBTI mappings for better personality matches
1313
- **Adaptive Questioning**: Dynamic questions based on your MBTI personality type
14+
- **Improved Distribution**: Languages support 1-2 MBTI types, ensuring all 16 personalities have options
1415
- **Share Your Results**: Social sharing buttons for Twitter, LinkedIn, WhatsApp, and Reddit
1516
- **Shareable Links**: Copy and share unique URLs that display your quiz results
1617
- **Beautiful UI**: Modern, responsive design with smooth animations

tests/language-paths-summary.md

Lines changed: 0 additions & 216 deletions
This file was deleted.

tests/quick-reachability-test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { languages } from '../src/lib/data/languages';
22
import { getAdaptiveQuestions } from '../src/lib/data/adaptive-questions';
3+
import type { MBTIType } from '../src/lib/types/quiz';
34

45
// Quick test focused on problematic MBTI types
56
const PROBLEM_MBTI_TYPES = ['ENFP', 'ISFJ', 'ESFP', 'ISTJ'];
67

78
function quickSimulateQuiz(mbtiType: string, languageAnswers: Record<string, string>) {
8-
let candidateLanguages = languages.filter((lang) => lang.mbti === mbtiType);
9+
// Check both primary and secondary MBTI types
10+
let candidateLanguages = languages.filter((lang) => lang.mbti.includes(mbtiType as MBTIType));
911

1012
if (candidateLanguages.length === 0) {
1113
candidateLanguages = languages;
@@ -130,7 +132,8 @@ console.log(`Success Rate: ${((passed / testCases.length) * 100).toFixed(1)}%`);
130132
// Test question generation for each MBTI type
131133
console.log('\n=== QUESTION GENERATION TEST ===');
132134
PROBLEM_MBTI_TYPES.forEach((mbtiType) => {
133-
const candidateLanguages = languages.filter((lang) => lang.mbti === mbtiType);
135+
// Check both primary and secondary MBTI types
136+
const candidateLanguages = languages.filter((lang) => lang.mbti.includes(mbtiType as MBTIType));
134137
const questions = getAdaptiveQuestions(mbtiType);
135138
console.log(
136139
`${mbtiType}: ${candidateLanguages.length} candidates, ${questions.length} questions generated`

0 commit comments

Comments
 (0)