claude-faf-mcp 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/CLAUDE.md +64 -0
  3. package/README.md +106 -12
  4. package/assets/Project-faf-pckg-json-README.png +0 -0
  5. package/assets/icons/faf-icon-128.png +0 -0
  6. package/assets/icons/faf-icon-256.png +0 -0
  7. package/assets/icons/faf-icon-48.png +0 -0
  8. package/assets/icons/faf-icon-512.png +0 -0
  9. package/assets/icons/orange-smiley.svg +6 -0
  10. package/dist/src/compiler/index.d.ts +7 -0
  11. package/dist/src/compiler/index.js +24 -0
  12. package/dist/src/compiler/index.js.map +1 -0
  13. package/dist/src/compiler/scorer.d.ts +53 -0
  14. package/dist/src/compiler/scorer.js +189 -0
  15. package/dist/src/compiler/scorer.js.map +1 -0
  16. package/dist/src/compiler/slot-validator.d.ts +32 -0
  17. package/dist/src/compiler/slot-validator.js +293 -0
  18. package/dist/src/compiler/slot-validator.js.map +1 -0
  19. package/dist/src/compiler/type-detector.d.ts +62 -0
  20. package/dist/src/compiler/type-detector.js +388 -0
  21. package/dist/src/compiler/type-detector.js.map +1 -0
  22. package/dist/src/handlers/championship-tools.d.ts +1 -0
  23. package/dist/src/handlers/championship-tools.js +169 -10
  24. package/dist/src/handlers/championship-tools.js.map +1 -1
  25. package/dist/src/handlers/engine-adapter.d.ts +8 -0
  26. package/dist/src/handlers/engine-adapter.js +54 -18
  27. package/dist/src/handlers/engine-adapter.js.map +1 -1
  28. package/dist/src/handlers/tool-types.d.ts +2 -1
  29. package/dist/src/handlers/tools.d.ts +2 -0
  30. package/dist/src/handlers/tools.js +316 -41
  31. package/dist/src/handlers/tools.js.map +1 -1
  32. package/dist/src/index.js +0 -0
  33. package/dist/src/server.js +2 -2
  34. package/dist/src/server.js.map +1 -1
  35. package/dist/src/types/project-types.d.ts +22 -0
  36. package/dist/src/types/project-types.js +85 -0
  37. package/dist/src/types/project-types.js.map +1 -0
  38. package/dist/src/types/slots.d.ts +39 -0
  39. package/dist/src/types/slots.js +162 -0
  40. package/dist/src/types/slots.js.map +1 -0
  41. package/dist/src/utils/auto-path-detection.d.ts +26 -0
  42. package/dist/src/utils/auto-path-detection.js +198 -0
  43. package/dist/src/utils/auto-path-detection.js.map +1 -0
  44. package/dist/src/utils/cli-detector.d.ts +20 -0
  45. package/dist/src/utils/cli-detector.js +230 -0
  46. package/dist/src/utils/cli-detector.js.map +1 -0
  47. package/dist/src/utils/path-resolver.d.ts +51 -0
  48. package/dist/src/utils/path-resolver.js +214 -0
  49. package/dist/src/utils/path-resolver.js.map +1 -0
  50. package/dist/src/utils/username-detector.d.ts +27 -0
  51. package/dist/src/utils/username-detector.js +90 -0
  52. package/dist/src/utils/username-detector.js.map +1 -0
  53. package/package.json +6 -3
  54. package/scripts/discord-sync-curated.js +233 -0
  55. package/scripts/discord-sync-final.js +218 -0
  56. package/scripts/discord-sync-simple.js +175 -0
  57. package/scripts/discord-sync-working.js +187 -0
  58. package/scripts/discord-sync.js +181 -0
  59. package/scripts/postinstall.js +46 -0
  60. package/skill/SKILL.md +385 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,30 @@ All notable changes to claude-faf-mcp will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.3.0] - 2025-11-12
9
+
10
+ ### Added
11
+ - **Desktop Extension (.mcpb)** - One-click installation bundle with branded FAF orange icon
12
+ - Packaged .mcpb format for drag-and-drop installation in Claude Desktop
13
+ - Orange smiley icon displays in all MCP server views
14
+ - Available from GitHub releases page
15
+ - **MCP Protocol Icons** - Added full icon set (48x48, 128x128, 256x256, 512x512) to server.json
16
+ - Icons hosted on GitHub raw URLs for registry display
17
+ - Proper MIME types and size specifications
18
+
19
+ ### Changed
20
+ - **One-Command Installation** - Moved faf-cli from peerDependencies to dependencies
21
+ - `npm install -g claude-faf-mcp` now auto-installs both packages
22
+ - Dual download metrics maintained (both packages counted separately)
23
+ - Eliminated manual two-step installation process
24
+ - **README Restructure** - Added two installation options
25
+ - Option 1: npm (one command, no config editing)
26
+ - Option 2: Desktop Extension (with branded icon)
27
+ - Clear documentation of path resolution system
28
+
29
+ ### Installation Experience
30
+ This release perfects the installation flow: users get one-command simplicity while we maintain accurate download metrics for both claude-faf-mcp and faf-cli packages.
31
+
8
32
  ## [3.2.0] - 2025-11-10
9
33
 
10
34
  ### Added
package/CLAUDE.md ADDED
@@ -0,0 +1,64 @@
1
+ # 🏎️ CLAUDE.md - claude-faf-mcp Persistent Context & Intelligence
2
+ **.faf format | project.faf**
3
+
4
+ ## PROJECT STATE: ACTIVE 🚀
5
+ **Current Position:** Provide FAF context tools directly in Claude Desktop via MCP
6
+ **Tyre Compound:** ULTRASOFT C5 (Maximum Performance)
7
+
8
+ ---
9
+
10
+ ## 🎨 CORE CONTEXT
11
+
12
+ ### Project Identity
13
+ - **Name:** claude-faf-mcp
14
+ - **Stack:** Node.js/TypeScript
15
+ - **Quality:** F1-INSPIRED (Championship Performance)
16
+
17
+ ### Our Mission - 100% Standalone MCP Server
18
+
19
+ **v3.0.4 Historic Milestone: ZERO CLI DEPENDENCIES**
20
+
21
+ ```
22
+ claude-faf-mcp: 100% STANDALONE
23
+ ├── 50/50 MCP tools operational
24
+ ├── 14/14 bundled commands
25
+ ├── 16.2x faster than CLI versions
26
+ ├── 19ms average execution
27
+ └── Zero external dependencies
28
+ ```
29
+
30
+ **CRITICAL: claude-faf-mcp IS NOT A WRAPPER**
31
+ - ✅ Independent standalone MCP server
32
+ - ✅ 100% operational without any CLI
33
+ - ✅ Own bundled FAF engine
34
+ - ✅ Championship-grade performance
35
+ - ❌ NOT a wrapper, NOT dependent on CLI
36
+
37
+ **The .faf Position in MCP:**
38
+
39
+ ```
40
+ Model Context Protocol
41
+ ───── ─────── ────────
42
+ Claude → .faf → MCP
43
+ Gemini → .faf → MCP
44
+ Codex → .faf → MCP
45
+ Any LLM → IANA Format → Open Protocol
46
+ ```
47
+
48
+ .FAF provides the standardized Context that makes the Model Context Protocol work for everyone.
49
+
50
+ ### Technical Architecture
51
+ - **What Building:** Universal FAF MCP Server for Claude Desktop - AI Context Intelligence
52
+ - **Main Language:** TypeScript
53
+
54
+ ### 📊 Context Quality Status
55
+ - **Overall Assessment:** Good
56
+ - **Last Updated:** 2025-11-06
57
+
58
+ ---
59
+
60
+ **STATUS: BI-SYNC ACTIVE 🔗 - Synchronized with .faf context!**
61
+
62
+ *Last Sync: 2025-11-06T13:20:32.280Z*
63
+ *Sync Engine: F1-Inspired Software Engineering*
64
+ *🏎️⚡️_championship_sync*
package/README.md CHANGED
@@ -22,6 +22,11 @@
22
22
 
23
23
  At 55% you are building your project with half a blueprint and basically flipping a coin with AI. .FAF defines, and AI becomes optimized for Context with the project.faf file.
24
24
 
25
+ <div align="center">
26
+ <img src="./assets/Project-faf-pckg-json-README.png" alt="project.faf file positioning" width="600" />
27
+ <p><em>project.faf lives at the project root, between package.json and README.md</em></p>
28
+ </div>
29
+
25
30
  ```
26
31
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
27
32
  🏎️ FAF AI-READINESS SCORE: 100/100 — PODIUM EDITION
@@ -47,15 +52,17 @@ At 55% you are building your project with half a blueprint and basically flippin
47
52
 
48
53
  ## ⚡ Quick Start
49
54
 
50
- ```bash
51
- # Install via npx (recommended - always latest)
52
- npx @modelcontextprotocol/inspector npx -y claude-faf-mcp
55
+ ### Option 1: npm (One Command 🚀)
56
+
57
+ **One command installs everything:**
53
58
 
54
- # Or install globally
59
+ ```bash
55
60
  npm install -g claude-faf-mcp
56
61
  ```
57
62
 
58
- **Claude Desktop Configuration:**
63
+ That's it! Auto-installs faf-cli + MCP server. Both get download metrics.
64
+
65
+ **Configure Claude Desktop:**
59
66
  ```json
60
67
  {
61
68
  "mcpServers": {
@@ -67,6 +74,93 @@ npm install -g claude-faf-mcp
67
74
  }
68
75
  ```
69
76
 
77
+ Restart Claude Desktop and you're ready!
78
+
79
+ ---
80
+
81
+ ### Option 2: Desktop Extension (With Icon 🧡)
82
+
83
+ **Get the FAF orange icon in Claude Desktop!**
84
+
85
+ **Step 1: Install CLI**
86
+ ```bash
87
+ npm install -g faf-cli
88
+ ```
89
+
90
+ **Step 2: Install Desktop Extension**
91
+ 1. **Download** the `.mcpb` file:
92
+ https://github.com/Wolfe-Jam/claude-faf-mcp/releases/latest
93
+
94
+ 2. **Install in Claude Desktop:**
95
+ - Settings → Extensions → Advanced settings
96
+ - Click "Install Extension"
97
+ - Select `claude-faf-mcp-v3.2.1.mcpb`
98
+ - Restart Claude Desktop
99
+
100
+ 3. **Verify the FAF orange icon** shows in your MCP list!
101
+
102
+ **Why this is easier:** No config file editing, auto-detects CLI, branded icon everywhere.
103
+
104
+
105
+ ---
106
+
107
+ ## 📁 Projects Convention
108
+
109
+ **Default Path Structure:** `~/Projects/[project-name]/project.faf`
110
+
111
+ The MCP server uses an intelligent path resolution system:
112
+
113
+ 1. **AI Inference** - Automatically detects project name from README titles, package.json, or uploaded files
114
+ 2. **User Statement** - Explicit project name provided by user
115
+ 3. **Custom Path** - User-provided path always wins
116
+
117
+ **Example Workflows:**
118
+
119
+ ```bash
120
+ # Upload README titled "Heritage Club Dubai"
121
+ # → Automatically creates: ~/Projects/heritage-club-dubai/project.faf
122
+
123
+ # Provide project name
124
+ faf_init projectName:"my-app"
125
+ # → Creates: ~/Projects/my-app/project.faf
126
+
127
+ # Explicit path (always respected)
128
+ faf_init path:"/Users/you/custom/location"
129
+ # → Creates: /Users/you/custom/location/project.faf
130
+ ```
131
+
132
+ **Cross-Platform Support:**
133
+ - macOS: `~/Projects/`
134
+ - Linux: `~/Projects/`
135
+ - Windows: `%USERPROFILE%\Projects\`
136
+
137
+ **Guide Tool:**
138
+ Run `faf_guide` in Claude Desktop for complete path resolution rules and UX patterns.
139
+
140
+ ---
141
+
142
+ ## 🔧 Troubleshooting
143
+
144
+ **CLI Not Detected?**
145
+
146
+ The MCP auto-detects faf-cli in common locations. If detection fails, set the path manually:
147
+
148
+ ```json
149
+ {
150
+ "mcpServers": {
151
+ "faf": {
152
+ "command": "npx",
153
+ "args": ["-y", "claude-faf-mcp"],
154
+ "env": {
155
+ "FAF_CLI_PATH": "/custom/path/to/faf"
156
+ }
157
+ }
158
+ }
159
+ }
160
+ ```
161
+
162
+ Find your CLI path: `which faf`
163
+
70
164
  ---
71
165
 
72
166
  ## 🎯 What is FAF?
@@ -74,12 +168,12 @@ npm install -g claude-faf-mcp
74
168
  **The .FAF Position in the MCP Ecosystem:**
75
169
 
76
170
  ```
77
- Model Context Protocol
78
- ───── ─────── ────────
79
- Claude .faf MCP
80
- Gemini → .faf → MCP
81
- Codex → .faf → MCP
82
- Any LLMIANA Format Open Protocol
171
+ Model Context Protocol
172
+ ───── ─────── ────────
173
+ LLM IANA Format Open Protocol
174
+ Claude → .faf → MCP
175
+ Gemini → .faf → MCP
176
+ Codex .faf MCP
83
177
  ```
84
178
 
85
179
  **.FAF is the foundational, universal base layer** for any Model using the MCP Protocol. It provides the standardized Context that makes the Model Context Protocol work for everyone.
@@ -88,7 +182,7 @@ Any LLM → IANA Format → Open Protocol
88
182
 
89
183
  ## 🛠️ Core Features
90
184
 
91
- ### 50 MCP Tools (100% Standalone)
185
+ ### 51 MCP Tools (100% Standalone)
92
186
  - **faf_quick** - Lightning-fast project.faf creation (3ms avg)
93
187
  - **faf_enhance** - Intelligent enhancement with auto-detection
94
188
  - **faf_read** - Parse and validate FAF files
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,6 @@
1
+ <svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="50" cy="50" r="40" fill="#FF6B35" />
3
+ <circle cx="35" cy="40" r="5" fill="black" />
4
+ <circle cx="65" cy="40" r="5" fill="black" />
5
+ <path d="M 30 60 Q 50 70 70 60" stroke="black" stroke-width="3" fill="none" />
6
+ </svg>
@@ -0,0 +1,7 @@
1
+ /**
2
+ * FAF Compiler Engine MK3
3
+ * Championship-grade project type detection and scoring
4
+ */
5
+ export * from './type-detector';
6
+ export * from './slot-validator';
7
+ export * from './scorer';
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * FAF Compiler Engine MK3
4
+ * Championship-grade project type detection and scoring
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ __exportStar(require("./type-detector"), exports);
22
+ __exportStar(require("./slot-validator"), exports);
23
+ __exportStar(require("./scorer"), exports);
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/compiler/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,kDAAgC;AAChC,mDAAiC;AACjC,2CAAyB"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Compiler Engine Scorer - FAF Compiler Engine MK3
3
+ * Championship-grade scoring with context-aware metrics
4
+ */
5
+ export interface ScoringResult {
6
+ score: number;
7
+ medal: 'trophy' | 'gold' | 'silver' | 'bronze' | 'red' | 'white';
8
+ emoji: string;
9
+ message: string;
10
+ breakdown: {
11
+ totalSlots: 21;
12
+ relevantSlots: number;
13
+ filledSlots: number;
14
+ ignoredSlots: number;
15
+ };
16
+ nextMilestone: {
17
+ targetScore: number;
18
+ medal: string;
19
+ emoji: string;
20
+ slotsNeeded: number;
21
+ message: string;
22
+ } | null;
23
+ }
24
+ export declare class CompilerEngineScorer {
25
+ /**
26
+ * Calculate score with slotignore support
27
+ */
28
+ calculateScore(filledSlots: number, relevantSlots: number, slotignore: string[]): ScoringResult;
29
+ /**
30
+ * Determine medal from score
31
+ */
32
+ private getMedal;
33
+ /**
34
+ * Get medal emoji
35
+ */
36
+ private getMedalEmoji;
37
+ /**
38
+ * Generate contextual message
39
+ */
40
+ private getMessage;
41
+ /**
42
+ * Calculate next milestone
43
+ */
44
+ private getNextMilestone;
45
+ /**
46
+ * Format scoring result as human-readable text
47
+ */
48
+ formatResult(result: ScoringResult, projectType?: string): string;
49
+ /**
50
+ * Generate actionable suggestions based on score
51
+ */
52
+ generateSuggestions(score: number, _medal: string, _missingSlots: string[]): string[];
53
+ }
@@ -0,0 +1,189 @@
1
+ "use strict";
2
+ /**
3
+ * Compiler Engine Scorer - FAF Compiler Engine MK3
4
+ * Championship-grade scoring with context-aware metrics
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.CompilerEngineScorer = void 0;
8
+ class CompilerEngineScorer {
9
+ /**
10
+ * Calculate score with slotignore support
11
+ */
12
+ calculateScore(filledSlots, relevantSlots, slotignore) {
13
+ // Calculate score: (filled / relevant) * 100
14
+ const score = Math.round((filledSlots / relevantSlots) * 100);
15
+ // Determine medal
16
+ const medal = this.getMedal(score);
17
+ const emoji = this.getMedalEmoji(medal);
18
+ // Generate message
19
+ const message = this.getMessage(score, filledSlots, relevantSlots, medal);
20
+ // Calculate next milestone
21
+ const nextMilestone = this.getNextMilestone(score, filledSlots, relevantSlots);
22
+ return {
23
+ score,
24
+ medal,
25
+ emoji,
26
+ message,
27
+ breakdown: {
28
+ totalSlots: 21,
29
+ relevantSlots,
30
+ filledSlots,
31
+ ignoredSlots: slotignore.length,
32
+ },
33
+ nextMilestone,
34
+ };
35
+ }
36
+ /**
37
+ * Determine medal from score
38
+ */
39
+ getMedal(score) {
40
+ if (score >= 85)
41
+ return 'trophy'; // Championship grade
42
+ if (score >= 70)
43
+ return 'gold'; // Podium grade
44
+ if (score >= 55)
45
+ return 'silver'; // Strong
46
+ if (score >= 40)
47
+ return 'bronze'; // Decent
48
+ if (score >= 20)
49
+ return 'red'; // Needs work
50
+ return 'white'; // Just started
51
+ }
52
+ /**
53
+ * Get medal emoji
54
+ */
55
+ getMedalEmoji(medal) {
56
+ switch (medal) {
57
+ case 'trophy': return '🏆';
58
+ case 'gold': return '🥇';
59
+ case 'silver': return '🥈';
60
+ case 'bronze': return '🥉';
61
+ case 'red': return '🔴';
62
+ case 'white': return '🤍';
63
+ default: return '⚪';
64
+ }
65
+ }
66
+ /**
67
+ * Generate contextual message
68
+ */
69
+ getMessage(score, filled, relevant, medal) {
70
+ if (score === 100) {
71
+ return `Perfect ${medal === 'trophy' ? 'Championship' : 'Project'} DNA! All ${filled}/${relevant} relevant slots filled.`;
72
+ }
73
+ if (score >= 85) {
74
+ return `Championship grade! ${filled}/${relevant} slots filled. Podium performance!`;
75
+ }
76
+ if (score >= 70) {
77
+ return `Podium grade! ${filled}/${relevant} slots filled. Strong AI context.`;
78
+ }
79
+ if (score >= 55) {
80
+ return `Solid foundation. ${filled}/${relevant} slots filled. Keep going!`;
81
+ }
82
+ if (score >= 40) {
83
+ return `Decent start. ${filled}/${relevant} slots filled. Room for improvement.`;
84
+ }
85
+ if (score >= 20) {
86
+ return `Getting started. ${filled}/${relevant} slots filled. Focus on core context.`;
87
+ }
88
+ return `Just beginning. ${filled}/${relevant} slots filled. Add project basics first.`;
89
+ }
90
+ /**
91
+ * Calculate next milestone
92
+ */
93
+ getNextMilestone(score, filled, relevant) {
94
+ // Already at 100%
95
+ if (score === 100) {
96
+ return null;
97
+ }
98
+ // Define milestones
99
+ const milestones = [
100
+ { threshold: 85, name: 'trophy', emoji: '🏆', label: 'Championship Grade' },
101
+ { threshold: 70, name: 'gold', emoji: '🥇', label: 'Podium Grade' },
102
+ { threshold: 55, name: 'silver', emoji: '🥈', label: 'Solid Foundation' },
103
+ { threshold: 40, name: 'bronze', emoji: '🥉', label: 'Decent Start' },
104
+ { threshold: 20, name: 'red', emoji: '🔴', label: 'Getting Started' },
105
+ ];
106
+ // Find next milestone
107
+ const nextMilestone = milestones.find(m => score < m.threshold);
108
+ if (!nextMilestone) {
109
+ // Already above all milestones, aim for 100%
110
+ const slotsNeeded = relevant - filled;
111
+ return {
112
+ targetScore: 100,
113
+ medal: 'trophy',
114
+ emoji: '🏆',
115
+ slotsNeeded,
116
+ message: `Fill ${slotsNeeded} more slot${slotsNeeded === 1 ? '' : 's'} to reach 100% (Perfect!)`,
117
+ };
118
+ }
119
+ // Calculate slots needed
120
+ const targetFilled = Math.ceil((nextMilestone.threshold / 100) * relevant);
121
+ const slotsNeeded = Math.max(1, targetFilled - filled);
122
+ return {
123
+ targetScore: nextMilestone.threshold,
124
+ medal: nextMilestone.name,
125
+ emoji: nextMilestone.emoji,
126
+ slotsNeeded,
127
+ message: `Fill ${slotsNeeded} more slot${slotsNeeded === 1 ? '' : 's'} to reach ${nextMilestone.threshold}% (${nextMilestone.label})`,
128
+ };
129
+ }
130
+ /**
131
+ * Format scoring result as human-readable text
132
+ */
133
+ formatResult(result, projectType) {
134
+ const lines = [];
135
+ // Header
136
+ lines.push(`${result.emoji} Score: ${result.score}%`);
137
+ lines.push('');
138
+ // Message
139
+ lines.push(result.message);
140
+ lines.push('');
141
+ // Breakdown
142
+ lines.push('Breakdown:');
143
+ lines.push(` Total Slots: ${result.breakdown.totalSlots}`);
144
+ if (projectType) {
145
+ lines.push(` Project Type: ${projectType}`);
146
+ }
147
+ lines.push(` Relevant Slots: ${result.breakdown.relevantSlots}`);
148
+ lines.push(` Filled Slots: ${result.breakdown.filledSlots}`);
149
+ if (result.breakdown.ignoredSlots > 0) {
150
+ lines.push(` Ignored Slots: ${result.breakdown.ignoredSlots} (not applicable to this project type)`);
151
+ }
152
+ // Next milestone
153
+ if (result.nextMilestone) {
154
+ lines.push('');
155
+ lines.push('Next Milestone:');
156
+ lines.push(` ${result.nextMilestone.emoji} ${result.nextMilestone.message}`);
157
+ }
158
+ return lines.join('\n');
159
+ }
160
+ /**
161
+ * Generate actionable suggestions based on score
162
+ */
163
+ generateSuggestions(score, _medal, _missingSlots) {
164
+ const suggestions = [];
165
+ if (score < 40) {
166
+ suggestions.push('Start with core slots: project_identity, language, human_context');
167
+ suggestions.push('Add basic documentation: README.md, CLAUDE.md');
168
+ }
169
+ if (score >= 40 && score < 70) {
170
+ suggestions.push('Fill in your tech stack details (frontend, backend, database)');
171
+ suggestions.push('Add build and deployment information');
172
+ }
173
+ if (score >= 70 && score < 85) {
174
+ suggestions.push('Complete architecture details (auth, storage, caching)');
175
+ suggestions.push('Add team workflow and CI/CD information');
176
+ }
177
+ if (score >= 85 && score < 100) {
178
+ suggestions.push('Polish remaining slots for championship grade');
179
+ suggestions.push('Ensure all documentation is up to date');
180
+ }
181
+ if (score === 100) {
182
+ suggestions.push('Perfect! Consider sharing your .faf with the community');
183
+ suggestions.push('Keep it updated as your project evolves');
184
+ }
185
+ return suggestions;
186
+ }
187
+ }
188
+ exports.CompilerEngineScorer = CompilerEngineScorer;
189
+ //# sourceMappingURL=scorer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scorer.js","sourceRoot":"","sources":["../../../src/compiler/scorer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAsBH,MAAa,oBAAoB;IAC/B;;OAEG;IACH,cAAc,CACZ,WAAmB,EACnB,aAAqB,EACrB,UAAoB;QAEpB,6CAA6C;QAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,GAAG,aAAa,CAAC,GAAG,GAAG,CAAC,CAAC;QAE9D,kBAAkB;QAClB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CAAC;YAClB,WAAW,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;YAC3E,WAAW,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AAxND,oDAwNC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Slot Validator - FAF Compiler Engine MK3
3
+ * Championship-grade slot validation with .faf content analysis
4
+ */
5
+ import { ValidationResult } from '../types/slots';
6
+ import { ProjectType } from '../types/project-types';
7
+ export declare class SlotValidator {
8
+ /**
9
+ * Validate all slots against project type
10
+ */
11
+ validate(fafContent: any, projectType: ProjectType): ValidationResult;
12
+ /**
13
+ * Check if a specific slot is filled in .faf content
14
+ */
15
+ private isSlotFilled;
16
+ /**
17
+ * Get the value of a slot from .faf content
18
+ */
19
+ private getSlotValue;
20
+ /**
21
+ * Helper: Check if fafContent has a specific framework
22
+ */
23
+ private hasFramework;
24
+ /**
25
+ * Determine medal from score
26
+ */
27
+ private getMedal;
28
+ /**
29
+ * Load and parse .faf file from directory
30
+ */
31
+ static loadFafFile(projectPath: string): Promise<any | null>;
32
+ }