faf-cli 3.0.5 → 3.0.6
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.
- package/README.md +41 -9
- package/dist/big-orange/bigo-push.d.ts +18 -0
- package/dist/big-orange/bigo-push.d.ts.map +1 -0
- package/dist/big-orange/bigo-push.js +88 -0
- package/dist/big-orange/bigo-push.js.map +1 -0
- package/dist/big-orange/compare.d.ts +11 -0
- package/dist/big-orange/compare.d.ts.map +1 -0
- package/dist/big-orange/compare.js +174 -0
- package/dist/big-orange/compare.js.map +1 -0
- package/dist/big-orange/faf-generator.d.ts +22 -0
- package/dist/big-orange/faf-generator.d.ts.map +1 -0
- package/dist/big-orange/faf-generator.js +215 -0
- package/dist/big-orange/faf-generator.js.map +1 -0
- package/dist/big-orange/index.d.ts +7 -0
- package/dist/big-orange/index.d.ts.map +1 -0
- package/dist/big-orange/index.js +96 -0
- package/dist/big-orange/index.js.map +1 -0
- package/dist/big-orange/types.d.ts +62 -0
- package/dist/big-orange/types.d.ts.map +1 -0
- package/dist/big-orange/types.js +7 -0
- package/dist/big-orange/types.js.map +1 -0
- package/dist/cli.js +0 -0
- package/package.json +4 -1
- package/dist/commands/create.d.ts +0 -13
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -78
- package/dist/commands/create.js.map +0 -1
- package/dist/core/platform-adapters.d.ts +0 -76
- package/dist/core/platform-adapters.d.ts.map +0 -1
- package/dist/core/platform-adapters.js +0 -407
- package/dist/core/platform-adapters.js.map +0 -1
- package/dist/core/universal-intelligence-generator.d.ts +0 -156
- package/dist/core/universal-intelligence-generator.d.ts.map +0 -1
- package/dist/core/universal-intelligence-generator.js +0 -352
- package/dist/core/universal-intelligence-generator.js.map +0 -1
- package/dist/enrichment/auto-corrector.d.ts +0 -28
- package/dist/enrichment/auto-corrector.d.ts.map +0 -1
- package/dist/enrichment/auto-corrector.js +0 -106
- package/dist/enrichment/auto-corrector.js.map +0 -1
- package/dist/enrichment/n8n-analyzer.d.ts +0 -259
- package/dist/enrichment/n8n-analyzer.d.ts.map +0 -1
- package/dist/enrichment/n8n-analyzer.js +0 -346
- package/dist/enrichment/n8n-analyzer.js.map +0 -1
- package/dist/enrichment/n8n-faf-generator.d.ts +0 -68
- package/dist/enrichment/n8n-faf-generator.d.ts.map +0 -1
- package/dist/enrichment/n8n-faf-generator.js +0 -354
- package/dist/enrichment/n8n-faf-generator.js.map +0 -1
- package/dist/enrichment/question-asker.d.ts +0 -22
- package/dist/enrichment/question-asker.d.ts.map +0 -1
- package/dist/enrichment/question-asker.js +0 -113
- package/dist/enrichment/question-asker.js.map +0 -1
- package/dist/enrichment/slot-filler.d.ts +0 -73
- package/dist/enrichment/slot-filler.d.ts.map +0 -1
- package/dist/enrichment/slot-filler.js +0 -253
- package/dist/enrichment/slot-filler.js.map +0 -1
- package/dist/scoring/championship-scorer.d.ts +0 -114
- package/dist/scoring/championship-scorer.d.ts.map +0 -1
- package/dist/scoring/championship-scorer.js +0 -380
- package/dist/scoring/championship-scorer.js.map +0 -1
- package/dist/scoring/score-calculator.d.ts +0 -29
- package/dist/scoring/score-calculator.d.ts.map +0 -1
- package/dist/scoring/score-calculator.js +0 -520
- package/dist/scoring/score-calculator.js.map +0 -1
- package/dist/tests/manual-validation.d.ts +0 -8
- package/dist/tests/manual-validation.d.ts.map +0 -1
- package/dist/tests/manual-validation.js +0 -114
- package/dist/tests/manual-validation.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slot-filler.d.ts","sourceRoot":"","sources":["../../src/enrichment/slot-filler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,qBAAa,UAAU;IAErB;;OAEG;IACH,OAAO,CACL,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,MAAM,EAAE,EAClB,cAAc,EAAE,MAAM,EAAE,GACvB,KAAK;IAeR;;OAEG;IACH,OAAO,CAAC,WAAW;IAYnB;;OAEG;IACH,OAAO,CAAC,cAAc;IAoBtB;;OAEG;IACH,OAAO,CAAC,eAAe;IA6BvB;;OAEG;IACH,OAAO,CAAC,WAAW;IAyBnB;;OAEG;IACH,OAAO,CAAC,eAAe;IAiBvB;;OAEG;IACH,OAAO,CAAC,OAAO;IAoBf;;OAEG;IACH,OAAO,CAAC,QAAQ;IAkBhB;;OAEG;IACH,OAAO,CAAC,OAAO;IAIf;;OAEG;IACH,OAAO,CAAC,SAAS;IAgCjB;;OAEG;IACH,OAAO,CAAC,QAAQ;IA+BhB;;OAEG;IACH,OAAO,CAAC,OAAO;CAsChB"}
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* 🏎️ Slot Filler - The 6 W's Intelligence
|
|
4
|
-
*
|
|
5
|
-
* Takes messy natural language and fills structured context slots
|
|
6
|
-
* This is where POOR data becomes RICH data
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.SlotFiller = void 0;
|
|
10
|
-
class SlotFiller {
|
|
11
|
-
/**
|
|
12
|
-
* Fill all 6 W's from user input + workflow analysis
|
|
13
|
-
*/
|
|
14
|
-
fill6Ws(useCase, other, workflow, pattern, aiModels, infrastructure) {
|
|
15
|
-
// Parse the use case into components
|
|
16
|
-
const parsed = this.parseIntent(useCase, other);
|
|
17
|
-
return {
|
|
18
|
-
who: this.fillWho(parsed, other),
|
|
19
|
-
what: this.fillWhat(parsed, pattern),
|
|
20
|
-
why: this.fillWhy(parsed),
|
|
21
|
-
where: this.fillWhere(workflow),
|
|
22
|
-
when: this.fillWhen(workflow),
|
|
23
|
-
how: this.fillHow(aiModels, infrastructure, pattern)
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Parse natural language into intent components
|
|
28
|
-
*/
|
|
29
|
-
parseIntent(useCase, other) {
|
|
30
|
-
const text = useCase.toLowerCase();
|
|
31
|
-
return {
|
|
32
|
-
subject: this.extractSubject(useCase),
|
|
33
|
-
audience: this.extractAudience(useCase, other),
|
|
34
|
-
goal: this.extractGoal(text),
|
|
35
|
-
context: other ? other.split(/[,;]/).map(s => s.trim()).filter(Boolean) : [],
|
|
36
|
-
keywords: this.extractKeywords(text)
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Extract subject (what system/framework is this about?)
|
|
41
|
-
*/
|
|
42
|
-
extractSubject(text) {
|
|
43
|
-
// Look for proper nouns, product names, frameworks
|
|
44
|
-
const patterns = [
|
|
45
|
-
/(\w+(?:'s)?\s+\$?\d+[MKB]?\s+\w+)/i, // "Hormozi's $100M Sales"
|
|
46
|
-
/(\w+\s+\w+\s+(?:system|framework|model|strategy))/i, // "Money Models system"
|
|
47
|
-
/(RAG|ETL|API)\s+(?:system|framework|workflow)/i // "RAG system"
|
|
48
|
-
];
|
|
49
|
-
for (const pattern of patterns) {
|
|
50
|
-
const match = text.match(pattern);
|
|
51
|
-
if (match) {
|
|
52
|
-
return match[1].trim();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
// Fallback: capitalize first few words
|
|
56
|
-
const words = text.split(' ').slice(0, 3);
|
|
57
|
-
return words.map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' ');
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Extract audience (who is this for?)
|
|
61
|
-
*/
|
|
62
|
-
extractAudience(useCase, other) {
|
|
63
|
-
const text = useCase.toLowerCase();
|
|
64
|
-
const audience = [];
|
|
65
|
-
// Look for "for X" or "help X"
|
|
66
|
-
const forMatch = text.match(/for\s+([^,\.]+)/i);
|
|
67
|
-
if (forMatch) {
|
|
68
|
-
audience.push(forMatch[1].trim());
|
|
69
|
-
}
|
|
70
|
-
const helpMatch = text.match(/help\s+([^,\.]+)/i);
|
|
71
|
-
if (helpMatch && !helpMatch[1].includes('get') && !helpMatch[1].includes('with')) {
|
|
72
|
-
audience.push(helpMatch[1].trim());
|
|
73
|
-
}
|
|
74
|
-
// Check Q3 for audience specificity
|
|
75
|
-
if (other) {
|
|
76
|
-
const otherLower = other.toLowerCase();
|
|
77
|
-
if (otherLower.match(/only for|just for|specifically for|for my/i)) {
|
|
78
|
-
const specificMatch = other.match(/(?:only|just|specifically|for my)\s+(?:for\s+)?([^,\.]+)/i);
|
|
79
|
-
if (specificMatch) {
|
|
80
|
-
audience.push(specificMatch[1].trim());
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return [...new Set(audience)]; // Dedupe
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Extract goal (why does this exist?)
|
|
88
|
-
*/
|
|
89
|
-
extractGoal(text) {
|
|
90
|
-
// Look for verbs indicating purpose
|
|
91
|
-
const goalPatterns = [
|
|
92
|
-
/to\s+([^,\.]+)/i,
|
|
93
|
-
/help\s+(?:people|users|them|clients)?\s*(?:to\s+)?([^,\.]+)/i,
|
|
94
|
-
/(?:provide|enable|allow|give)\s+([^,\.]+)/i,
|
|
95
|
-
/(?:get|achieve|reach)\s+([^,\.]+)/i
|
|
96
|
-
];
|
|
97
|
-
for (const pattern of goalPatterns) {
|
|
98
|
-
const match = text.match(pattern);
|
|
99
|
-
if (match && match[1]) {
|
|
100
|
-
return match[1].trim();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
// Fallback: look for action verbs
|
|
104
|
-
const actionMatch = text.match(/(automat\w+|process\w+|send\w+|fetch\w+|generat\w+)\s+([^,\.]+)/i);
|
|
105
|
-
if (actionMatch) {
|
|
106
|
-
return `${actionMatch[1]} ${actionMatch[2]}`.trim();
|
|
107
|
-
}
|
|
108
|
-
return 'solve user problems'; // Ultimate fallback
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Extract keywords for search
|
|
112
|
-
*/
|
|
113
|
-
extractKeywords(text) {
|
|
114
|
-
// Simple keyword extraction (stopwords filtered)
|
|
115
|
-
const stopwords = new Set([
|
|
116
|
-
'the', 'a', 'an', 'to', 'for', 'of', 'and', 'or', 'in', 'on', 'is', 'are',
|
|
117
|
-
'was', 'were', 'be', 'been', 'being', 'have', 'has', 'had', 'do', 'does',
|
|
118
|
-
'did', 'will', 'would', 'should', 'could', 'may', 'might', 'must', 'can',
|
|
119
|
-
'this', 'that', 'these', 'those', 'i', 'you', 'he', 'she', 'it', 'we', 'they'
|
|
120
|
-
]);
|
|
121
|
-
return text
|
|
122
|
-
.toLowerCase()
|
|
123
|
-
.replace(/[^\w\s]/g, ' ') // Remove punctuation
|
|
124
|
-
.split(/\s+/)
|
|
125
|
-
.filter(word => word.length > 3 && !stopwords.has(word))
|
|
126
|
-
.slice(0, 10);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Fill WHO slot
|
|
130
|
-
*/
|
|
131
|
-
fillWho(parsed, other) {
|
|
132
|
-
if (parsed.audience.length > 0) {
|
|
133
|
-
const primary = parsed.audience[0];
|
|
134
|
-
// Enhance with subject if available
|
|
135
|
-
if (parsed.subject && parsed.subject.length > 3) {
|
|
136
|
-
return `${primary} learning ${parsed.subject}`;
|
|
137
|
-
}
|
|
138
|
-
return primary;
|
|
139
|
-
}
|
|
140
|
-
// Check Q3 for implicit audience
|
|
141
|
-
if (other.toLowerCase().includes('my')) {
|
|
142
|
-
return 'internal team';
|
|
143
|
-
}
|
|
144
|
-
return 'users'; // Fallback
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Fill WHAT slot (infer from pattern + subject)
|
|
148
|
-
*/
|
|
149
|
-
fillWhat(parsed, pattern) {
|
|
150
|
-
let what = '';
|
|
151
|
-
// Add pattern prefix
|
|
152
|
-
if (pattern !== 'Unknown') {
|
|
153
|
-
what = `${pattern}-powered `;
|
|
154
|
-
}
|
|
155
|
-
// Add subject
|
|
156
|
-
if (parsed.subject && parsed.subject.length > 3) {
|
|
157
|
-
what += `${parsed.subject} system`;
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
what += 'automation workflow';
|
|
161
|
-
}
|
|
162
|
-
return what.trim();
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Fill WHY slot
|
|
166
|
-
*/
|
|
167
|
-
fillWhy(parsed) {
|
|
168
|
-
return parsed.goal || 'automate processes';
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Fill WHERE slot (infer from workflow structure)
|
|
172
|
-
*/
|
|
173
|
-
fillWhere(workflow) {
|
|
174
|
-
// Check for webhook triggers
|
|
175
|
-
const hasWebhook = workflow.nodes.some(n => n.type.toLowerCase().includes('webhook'));
|
|
176
|
-
if (hasWebhook) {
|
|
177
|
-
return 'accessible via webhook API';
|
|
178
|
-
}
|
|
179
|
-
// Check for form triggers
|
|
180
|
-
const hasForm = workflow.nodes.some(n => n.type.toLowerCase().includes('form'));
|
|
181
|
-
if (hasForm) {
|
|
182
|
-
return 'web form interface';
|
|
183
|
-
}
|
|
184
|
-
// Check for schedule triggers
|
|
185
|
-
const hasSchedule = workflow.nodes.some(n => n.type.toLowerCase().includes('schedule') ||
|
|
186
|
-
n.type.toLowerCase().includes('cron'));
|
|
187
|
-
if (hasSchedule) {
|
|
188
|
-
return 'scheduled execution';
|
|
189
|
-
}
|
|
190
|
-
return 'n8n workflow environment';
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Fill WHEN slot (infer from triggers)
|
|
194
|
-
*/
|
|
195
|
-
fillWhen(workflow) {
|
|
196
|
-
// Check trigger types
|
|
197
|
-
const triggers = workflow.nodes.filter(n => n.type.toLowerCase().includes('trigger'));
|
|
198
|
-
if (triggers.length === 0) {
|
|
199
|
-
return 'manual execution';
|
|
200
|
-
}
|
|
201
|
-
const triggerTypes = triggers.map(t => t.type.toLowerCase());
|
|
202
|
-
if (triggerTypes.some(t => t.includes('webhook'))) {
|
|
203
|
-
return 'on-demand (webhook triggered)';
|
|
204
|
-
}
|
|
205
|
-
if (triggerTypes.some(t => t.includes('schedule') || t.includes('cron'))) {
|
|
206
|
-
return 'scheduled intervals';
|
|
207
|
-
}
|
|
208
|
-
if (triggerTypes.some(t => t.includes('form'))) {
|
|
209
|
-
return 'user form submission';
|
|
210
|
-
}
|
|
211
|
-
if (triggerTypes.some(t => t.includes('manual'))) {
|
|
212
|
-
return 'manual execution';
|
|
213
|
-
}
|
|
214
|
-
return 'event-driven';
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Fill HOW slot (tech stack summary)
|
|
218
|
-
*/
|
|
219
|
-
fillHow(aiModels, infrastructure, pattern) {
|
|
220
|
-
const components = [];
|
|
221
|
-
// Add pattern if significant
|
|
222
|
-
if (pattern === 'RAG') {
|
|
223
|
-
components.push('RAG pipeline');
|
|
224
|
-
}
|
|
225
|
-
else if (pattern === 'Multi-Agent') {
|
|
226
|
-
components.push('multi-agent coordination');
|
|
227
|
-
}
|
|
228
|
-
// Add primary AI model
|
|
229
|
-
if (aiModels.length > 0) {
|
|
230
|
-
components.push(aiModels[0]);
|
|
231
|
-
}
|
|
232
|
-
// Add key infrastructure (limit to 2)
|
|
233
|
-
if (infrastructure.length > 0) {
|
|
234
|
-
const key = infrastructure.slice(0, 2);
|
|
235
|
-
components.push(...key);
|
|
236
|
-
}
|
|
237
|
-
if (components.length === 0) {
|
|
238
|
-
return 'n8n workflow automation';
|
|
239
|
-
}
|
|
240
|
-
// Join with " with "
|
|
241
|
-
if (components.length === 1) {
|
|
242
|
-
return components[0];
|
|
243
|
-
}
|
|
244
|
-
if (components.length === 2) {
|
|
245
|
-
return components.join(' with ');
|
|
246
|
-
}
|
|
247
|
-
// For 3+: "A with B and C"
|
|
248
|
-
const last = components.pop();
|
|
249
|
-
return `${components.join(', ')} and ${last}`;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
exports.SlotFiller = SlotFiller;
|
|
253
|
-
//# sourceMappingURL=slot-filler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slot-filler.js","sourceRoot":"","sources":["../../src/enrichment/slot-filler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAqBH,MAAa,UAAU;IAErB;;OAEG;IACH,OAAO,CACL,OAAe,EACf,KAAa,EACb,QAAwB,EACxB,OAAwB,EACxB,QAAkB,EAClB,cAAwB;QAGxB,qCAAqC;QACrC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAEhD,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;YAChC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;YACpC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YACzB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;YAC/B,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;YAC7B,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,CAAC;SACrD,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,WAAW,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Built to measure a million projects with the wisdom that:
|
|
8
|
-
* - Humans achieve up to 99% (measurable excellence)
|
|
9
|
-
* - AI judges the final 1% (best-practice validation)
|
|
10
|
-
* - No faffing about with undefined perfection
|
|
11
|
-
*
|
|
12
|
-
* .faf is inevitable - wire it well!
|
|
13
|
-
*/
|
|
14
|
-
export interface ChampionshipScore {
|
|
15
|
-
score: number;
|
|
16
|
-
philosophy: string;
|
|
17
|
-
originalSlots: {
|
|
18
|
-
filled: number;
|
|
19
|
-
total: 21;
|
|
20
|
-
percentage: number;
|
|
21
|
-
};
|
|
22
|
-
sections: {
|
|
23
|
-
projectIdentity: SlotSection;
|
|
24
|
-
stackArchitecture: SlotSection;
|
|
25
|
-
performanceMetrics: SlotSection;
|
|
26
|
-
aiContext: SlotSection;
|
|
27
|
-
humanContext: SlotSection;
|
|
28
|
-
};
|
|
29
|
-
excellence: {
|
|
30
|
-
contextComplete: boolean;
|
|
31
|
-
autoDetectable: boolean;
|
|
32
|
-
bestPractices: boolean;
|
|
33
|
-
championshipGrade: boolean;
|
|
34
|
-
};
|
|
35
|
-
aiValidation?: {
|
|
36
|
-
assessed: boolean;
|
|
37
|
-
bestPracticeScore: number;
|
|
38
|
-
reasoning: string;
|
|
39
|
-
timestamp: string;
|
|
40
|
-
};
|
|
41
|
-
improvements: {
|
|
42
|
-
critical: string[];
|
|
43
|
-
recommended: string[];
|
|
44
|
-
optional: string[];
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
interface SlotSection {
|
|
48
|
-
name: string;
|
|
49
|
-
filled: number;
|
|
50
|
-
total: number;
|
|
51
|
-
percentage: number;
|
|
52
|
-
missing: string[];
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* The Championship Scoring Engine
|
|
56
|
-
* Measures excellence, not perfection
|
|
57
|
-
*/
|
|
58
|
-
export declare class ChampionshipScorer {
|
|
59
|
-
private static readonly PHILOSOPHY;
|
|
60
|
-
/**
|
|
61
|
-
* Score a FAF file with Championship philosophy
|
|
62
|
-
*/
|
|
63
|
-
static score(fafData: any, options?: {
|
|
64
|
-
projectPath?: string;
|
|
65
|
-
requestAiValidation?: boolean;
|
|
66
|
-
}): Promise<ChampionshipScore>;
|
|
67
|
-
/**
|
|
68
|
-
* Score Project Identity (3 slots)
|
|
69
|
-
*/
|
|
70
|
-
private static scoreProjectIdentity;
|
|
71
|
-
/**
|
|
72
|
-
* Score Stack Architecture (6 slots from Original 21)
|
|
73
|
-
*/
|
|
74
|
-
private static scoreStackArchitecture;
|
|
75
|
-
/**
|
|
76
|
-
* Score Performance Metrics (3 slots)
|
|
77
|
-
*/
|
|
78
|
-
private static scorePerformanceMetrics;
|
|
79
|
-
/**
|
|
80
|
-
* Score AI Context (3 slots)
|
|
81
|
-
*/
|
|
82
|
-
private static scoreAiContext;
|
|
83
|
-
/**
|
|
84
|
-
* Score Human Context (The 6 W's)
|
|
85
|
-
*/
|
|
86
|
-
private static scoreHumanContext;
|
|
87
|
-
/**
|
|
88
|
-
* Apply quality modifiers that can reduce score
|
|
89
|
-
*/
|
|
90
|
-
private static applyQualityModifiers;
|
|
91
|
-
/**
|
|
92
|
-
* Check if project follows best practices
|
|
93
|
-
*/
|
|
94
|
-
private static checkBestPractices;
|
|
95
|
-
/**
|
|
96
|
-
* Generate improvement suggestions based on score
|
|
97
|
-
*/
|
|
98
|
-
private static generateImprovements;
|
|
99
|
-
/**
|
|
100
|
-
* Request AI validation for the final 1%
|
|
101
|
-
* This is where AI judges if the project meets best practices
|
|
102
|
-
*/
|
|
103
|
-
private static requestAiValidation;
|
|
104
|
-
/**
|
|
105
|
-
* The 99% Philosophy Summary
|
|
106
|
-
*/
|
|
107
|
-
static getPhilosophy(): string;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Export the main scoring function for compatibility
|
|
111
|
-
*/
|
|
112
|
-
export declare function calculateChampionshipScore(fafData: any, projectPath?: string, requestAiValidation?: boolean): Promise<ChampionshipScore>;
|
|
113
|
-
export default ChampionshipScorer;
|
|
114
|
-
//# sourceMappingURL=championship-scorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"championship-scorer.d.ts","sourceRoot":"","sources":["../../src/scoring/championship-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,MAAM,WAAW,iBAAiB;IAEhC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IAGnB,aAAa,EAAE;QACb,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,EAAE,CAAC;QACV,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAGF,QAAQ,EAAE;QACR,eAAe,EAAE,WAAW,CAAC;QAC7B,iBAAiB,EAAE,WAAW,CAAC;QAC/B,kBAAkB,EAAE,WAAW,CAAC;QAChC,SAAS,EAAE,WAAW,CAAC;QACvB,YAAY,EAAE,WAAW,CAAC;KAC3B,CAAC;IAGF,UAAU,EAAE;QACV,eAAe,EAAE,OAAO,CAAC;QACzB,cAAc,EAAE,OAAO,CAAC;QACxB,aAAa,EAAE,OAAO,CAAC;QACvB,iBAAiB,EAAE,OAAO,CAAC;KAC5B,CAAC;IAGF,YAAY,CAAC,EAAE;QACb,QAAQ,EAAE,OAAO,CAAC;QAClB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAGF,YAAY,EAAE;QACZ,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;GAGG;AACH,qB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