claude-faf-mcp 2.7.3 → 2.8.1

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 (49) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +96 -15
  3. package/dist/src/compiler/index.d.ts +7 -0
  4. package/dist/src/compiler/index.js +24 -0
  5. package/dist/src/compiler/index.js.map +1 -0
  6. package/dist/src/compiler/scorer.d.ts +53 -0
  7. package/dist/src/compiler/scorer.js +189 -0
  8. package/dist/src/compiler/scorer.js.map +1 -0
  9. package/dist/src/compiler/slot-validator.d.ts +32 -0
  10. package/dist/src/compiler/slot-validator.js +293 -0
  11. package/dist/src/compiler/slot-validator.js.map +1 -0
  12. package/dist/src/compiler/type-detector.d.ts +62 -0
  13. package/dist/src/compiler/type-detector.js +388 -0
  14. package/dist/src/compiler/type-detector.js.map +1 -0
  15. package/dist/src/config/visibility.d.ts +41 -0
  16. package/dist/src/config/visibility.js +158 -0
  17. package/dist/src/config/visibility.js.map +1 -0
  18. package/dist/src/handlers/championship-tools.d.ts +14 -1
  19. package/dist/src/handlers/championship-tools.js +728 -562
  20. package/dist/src/handlers/championship-tools.js.map +1 -1
  21. package/dist/src/handlers/tool-registry.d.ts +23 -0
  22. package/dist/src/handlers/tool-registry.js +68 -0
  23. package/dist/src/handlers/tool-registry.js.map +1 -0
  24. package/dist/src/handlers/tool-types.d.ts +36 -1
  25. package/dist/src/handlers/tools.d.ts +1 -0
  26. package/dist/src/handlers/tools.js +47 -2
  27. package/dist/src/handlers/tools.js.map +1 -1
  28. package/dist/src/server.js +5 -4
  29. package/dist/src/server.js.map +1 -1
  30. package/dist/src/types/mcp-tools.d.ts +53 -0
  31. package/dist/src/types/mcp-tools.js +77 -0
  32. package/dist/src/types/mcp-tools.js.map +1 -0
  33. package/dist/src/types/project-types.d.ts +22 -0
  34. package/dist/src/types/project-types.js +85 -0
  35. package/dist/src/types/project-types.js.map +1 -0
  36. package/dist/src/types/slots.d.ts +39 -0
  37. package/dist/src/types/slots.js +162 -0
  38. package/dist/src/types/slots.js.map +1 -0
  39. package/dist/src/types/tool-visibility.d.ts +36 -0
  40. package/dist/src/types/tool-visibility.js +512 -0
  41. package/dist/src/types/tool-visibility.js.map +1 -0
  42. package/dist/src/utils/display-protocol.d.ts +1 -1
  43. package/dist/src/utils/display-protocol.js +1 -1
  44. package/dist/src/version.d.ts +9 -0
  45. package/dist/src/version.js +37 -0
  46. package/dist/src/version.js.map +1 -0
  47. package/package.json +2 -2
  48. package/skill/SKILL.md +385 -0
  49. package/dist/test-file-finder.js +0 -20
package/CHANGELOG.md CHANGED
@@ -5,6 +5,41 @@ 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
+ ## [2.8.1] - 2025-11-05
9
+
10
+ ### Fixed
11
+ - README now includes "DROP or PASTE, Click & Go!" messaging
12
+ - Removed "chatgpt" from package.json keywords (not supported)
13
+ - Corrected test count from 79 to 57 throughout documentation
14
+
15
+ ## [2.8.0] - 2025-11-05
16
+
17
+ ### Added
18
+ - Tool Visibility System - Intelligent filtering to reduce cognitive load
19
+ - 21 Core Tools (default) - Essential workflow tools shown by default
20
+ - 30+ Advanced Tools (opt-in) - Expert-level tools via FAF_MCP_SHOW_ADVANCED env var
21
+ - Tool categorization system (workflow, quality, intelligence, sync, ai, help, trust, file, utility, display)
22
+ - Configuration priority system (ENV > config file > default)
23
+ - Support for ~/.fafrc config file (JSON and key=value formats)
24
+ - Claude Code skill (faf-expert) bundled with package
25
+ - Comprehensive visibility test suite (22 new tests)
26
+
27
+ ### Changed
28
+ - Default tool count reduced from 51 to 21 (59% reduction in cognitive load)
29
+ - Tool filtering performance <10ms (5x better than 50ms target)
30
+ - Professional console output (silent operation, no clutter)
31
+ - README updated with v2.8.0 features and Claude Code skill installation
32
+
33
+ ### Performance
34
+ - Sub-10ms tool filtering for 56 tools
35
+ - Zero regressions in existing functionality
36
+ - 79 total tests passing (57 existing + 22 new)
37
+
38
+ ### Testing
39
+ - WJTTC Gold Certified
40
+ - F1-inspired testing standards applied
41
+ - Complete test report available
42
+
8
43
  ## [2.7.3] - 2025-11-02
9
44
 
10
45
  ### Fixed
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **🏆 IANA-Registered Format** - .FAF is now an Internet-standard format.
4
4
  > MCP server for creating official `application/vnd.faf+yaml` files in Claude Desktop
5
- > Official MCP server for FAF (Foundational AI-context Format) with 33+ tools -
5
+ > Official MCP server for FAF (Foundational AI-context Format) with 50+ tools -
6
6
  > Persistent project context that integrates seamlessly with Claude Desktop workflows
7
7
 
8
8
  [![NPM Version](https://img.shields.io/npm/v/claude-faf-mcp?color=FF4500)](https://www.npmjs.com/package/claude-faf-mcp)
@@ -10,14 +10,28 @@
10
10
  [![IANA Registered](https://img.shields.io/badge/IANA-application%2Fvnd.faf%2Byaml-blue)](https://faf.one/blog/iana-registration)
11
11
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
12
12
 
13
+ ---
14
+
15
+ **New! Claude Skills is BUILT-IN** - 6000+ lines TS-strict code
16
+ **faf-expert** is on-hand, 24/7 - your resident faf specialist and Master of
17
+ **21 Core Tools** and **30+ Advanced Tools**, **51 in all**
18
+
19
+ ---
20
+
13
21
  ## TL;DR
14
22
 
15
23
  **Problem:** AI needs persistent project context—not just md docs or tools, but foundational infrastructure.
16
24
 
17
- **Solution:** The .faf format is a structured, machine-readable context layer. This MCP server gives Claude 33+ tools to create, score, and improve your project's persistent context through format-driven architecture.
25
+ **Solution:** The .faf format is a structured, machine-readable context layer. This MCP server gives Claude 50+ tools to create, score, and improve your project's persistent context through format-driven architecture.
18
26
 
19
27
  **How it works:** Get a score (0-100%) showing how well AI understands your project. Higher scores = AI more in-tune with your codebase. Use tools to improve your score and context quality. Your .faf context persists across sessions.
20
28
 
29
+ **DROP or PASTE, Click & Go!**
30
+
31
+ 🎯 Got .faf? DROP or PASTE it
32
+ 📦 Got project? DROP or PASTE README or package.json
33
+ 💬 Starting fresh? Just ask
34
+
21
35
  **Install:**
22
36
 
23
37
  Via npm:
@@ -88,16 +102,59 @@ Published to official Anthropic MCP registry with validation by Anthropic engine
88
102
 
89
103
  ---
90
104
 
91
- ## What's New in v2.7.2 - IANA Registration
105
+ ## What's New in v2.8.0 - Tool Visibility System
106
+
107
+ **v2.8.0 introduces intelligent tool filtering to reduce cognitive load.**
92
108
 
93
- **v2.7.2 updates documentation with IANA registration achievement.**
109
+ ### New Features
94
110
 
95
- On **October 31, 2025**, the Internet Assigned Numbers Authority (IANA) officially registered `.faf` as `application/vnd.faf+yaml` - making it an Internet-standard format alongside PDF, JSON, and XML.
111
+ **21 Core Tools (Default)**
112
+ Essential workflow tools shown by default:
113
+ - Workflow: `faf`, `faf_auto`, `faf_init`, `faf_innit`, `faf_status`
114
+ - Quality: `faf_score`, `faf_validate`, `faf_doctor`, `faf_audit`
115
+ - Intelligence: `faf_formats`, `faf_stacks`, `faf_skills`
116
+ - Sync: `faf_sync`, `faf_bi_sync`, `faf_update`, `faf_migrate`
117
+ - AI: `faf_chat`, `faf_enhance`
118
+ - Help: `faf_index`, `faf_faq`, `faf_about`
96
119
 
97
- **What this means:**
98
- - Official Internet media type recognition
99
- - Proper HTTP Content-Type headers
100
- - Browser and email client support
120
+ **30+ Advanced Tools (Opt-in)**
121
+ Expert-level tools available via environment variable:
122
+ - Display variants: `faf_display`, `faf_show`, `faf_check`
123
+ - Trust system: `faf_trust`, `faf_trust_confidence`, `faf_trust_garage`
124
+ - File operations: `faf_read`, `faf_write`, `faf_list`, `faf_exists`
125
+ - DNA tracking: `faf_dna`, `faf_log`, `faf_auth`, `faf_recover`
126
+ - Utilities: `faf_choose`, `faf_clear`, `faf_share`, `faf_credit`
127
+
128
+ **Enable Advanced Tools:**
129
+ ```json
130
+ {
131
+ "mcpServers": {
132
+ "claude-faf-mcp": {
133
+ "command": "claude-faf-mcp",
134
+ "env": {
135
+ "FAF_MCP_SHOW_ADVANCED": "true"
136
+ }
137
+ }
138
+ }
139
+ }
140
+ ```
141
+
142
+ **New! Claude Code Skill**
143
+ The `faf-expert` skill is now available - your on-hand 24/7 FAF specialist:
144
+ - Expert guidance on .faf files and project DNA
145
+ - Tool Visibility System documentation
146
+ - MCP server configuration help
147
+ - AI-readiness scoring assistance
148
+
149
+ ### Performance
150
+ - **<10ms tool filtering** (5x better than 50ms championship target)
151
+ - **57 tests passing** - All existing functionality preserved
152
+ - **Zero regressions** - Complete validation
153
+ - **WJTTC Gold Certified** - F1-inspired testing standards
154
+
155
+ ### Previous: v2.7.2 - IANA Registration
156
+
157
+ On **October 31, 2025**, IANA officially registered `.faf` as `application/vnd.faf+yaml` - making it an Internet-standard format alongside PDF, JSON, and XML
101
158
  - API standardization across platforms
102
159
 
103
160
  This documentation update adds IANA information throughout the README to reflect this major infrastructure-level achievement.
@@ -205,7 +262,7 @@ Format-driven means the architecture is built on data structure first, not tooli
205
262
  - Email client support
206
263
  - API standardization across platforms
207
264
 
208
- - **33 MCP Tools** - Complete project context management
265
+ - **50+ MCP Tools** - Complete project context management
209
266
  - Project DNA generation and scoring
210
267
  - Bi-directional CLAUDE.md sync
211
268
  - Format validation and conversion
@@ -218,7 +275,7 @@ Format-driven means the architecture is built on data structure first, not tooli
218
275
  - 4,700 total downloads (598/week)
219
276
  - Production-tested and validated
220
277
 
221
- Zero configuration required - works out of the box after installation. Operations average under 11 milliseconds. Synchronizes .faf files with CLAUDE.md automatically. Built with 100% TypeScript strict mode. All 35 tests passing with production readiness confirmed.
278
+ Zero configuration required - works out of the box after installation. Operations average under 11 milliseconds. Synchronizes .faf files with CLAUDE.md automatically. Built with 100% TypeScript strict mode. All 57 tests passing with production readiness confirmed.
222
279
 
223
280
  ---
224
281
 
@@ -274,7 +331,7 @@ Live in Claude Desktop. Persistent across sessions. Your foundational context la
274
331
 
275
332
  **Core Tools**
276
333
 
277
- faf_init - Initialize project context. faf_auto - Auto-detect and populate context. faf_score - Calculate AI readiness. faf_status - Project health check.
334
+ faf_init - Initialize project context. faf_innit 🇬🇧 - It's a Brit thing! (works same as init). faf_auto - Auto-detect and populate context. faf_score - Calculate AI readiness. faf_status - Project health check.
278
335
 
279
336
  **Enhancement Tools**
280
337
 
@@ -294,10 +351,12 @@ Full tool documentation available at https://faf.one/docs/tools.
294
351
 
295
352
  ## Usage Example
296
353
 
297
- 1. Drop any project file into Claude Desktop
354
+ **DROP or PASTE, Click & Go!**
355
+
356
+ 1. DROP or PASTE any project file into Claude Desktop
298
357
  2. Type: "Run faf_auto to analyze this project"
299
358
  3. Get instant context - Claude understands your codebase
300
- 4. Access 33+ commands naturally in conversation
359
+ 4. Access 50+ commands naturally in conversation
301
360
 
302
361
  The .faf file persists across conversations - no need to re-explain your project each time.
303
362
 
@@ -341,9 +400,31 @@ Node.js 18 or later. Claude Desktop (latest version). Operating system: macOS, L
341
400
 
342
401
  ---
343
402
 
403
+ ## Claude Code Skill Installation
404
+
405
+ **NEW**: Install the `faf-expert` skill for enhanced FAF support in Claude Code:
406
+
407
+ ```bash
408
+ # Install from npm package
409
+ mkdir -p ~/.claude/skills/faf-expert
410
+ cp node_modules/claude-faf-mcp/skill/SKILL.md ~/.claude/skills/faf-expert/
411
+
412
+ # Or download directly
413
+ curl -o ~/.claude/skills/faf-expert/SKILL.md \
414
+ https://cdn.jsdelivr.net/npm/claude-faf-mcp@latest/skill/SKILL.md
415
+ ```
416
+
417
+ Restart Claude Code to activate. The skill provides:
418
+ - Expert guidance on .faf files and project DNA
419
+ - v2.8.0 Tool Visibility System documentation
420
+ - MCP server configuration help
421
+ - AI-readiness scoring assistance
422
+
423
+ ---
424
+
344
425
  ## The FAF Ecosystem
345
426
 
346
- faf-cli (npm) - Command line tool for local context management. claude-faf-mcp - This MCP server for Claude Desktop integration. faf.one - Documentation and guides. Chrome Extension - Browser integration for context collection.
427
+ faf-cli (npm) - Command line tool for local context management. claude-faf-mcp - This MCP server for Claude Desktop integration. faf.one - Documentation and guides. Chrome Extension - Browser integration for context collection. faf-expert skill - Claude Code integration for FAF expertise.
347
428
 
348
429
  ---
349
430
 
@@ -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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,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;QAC7D,CAAC;QAED,IAAI,KAAK,KAAK,GAAG,EAAE,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
+ }