faf-mcp 1.0.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.
- package/CHANGELOG.md +34 -0
- package/CLAUDE.md +73 -0
- package/LICENSE +22 -0
- package/README.md +165 -0
- package/assets/Project-faf-pckg-json-README.png +0 -0
- package/assets/icons/faf-icon-128.png +0 -0
- package/assets/icons/faf-icon-256.png +0 -0
- package/assets/icons/faf-icon-48.png +0 -0
- package/assets/icons/faf-icon-512.png +0 -0
- package/assets/icons/orange-smiley.svg +6 -0
- package/dist/src/compiler/index.d.ts +7 -0
- package/dist/src/compiler/index.js +24 -0
- package/dist/src/compiler/index.js.map +1 -0
- package/dist/src/compiler/scorer.d.ts +53 -0
- package/dist/src/compiler/scorer.js +189 -0
- package/dist/src/compiler/scorer.js.map +1 -0
- package/dist/src/compiler/slot-validator.d.ts +32 -0
- package/dist/src/compiler/slot-validator.js +293 -0
- package/dist/src/compiler/slot-validator.js.map +1 -0
- package/dist/src/compiler/type-detector.d.ts +62 -0
- package/dist/src/compiler/type-detector.js +388 -0
- package/dist/src/compiler/type-detector.js.map +1 -0
- package/dist/src/config/visibility.d.ts +41 -0
- package/dist/src/config/visibility.js +158 -0
- package/dist/src/config/visibility.js.map +1 -0
- package/dist/src/faf-core/commands/audit.d.ts +21 -0
- package/dist/src/faf-core/commands/audit.js +83 -0
- package/dist/src/faf-core/commands/audit.js.map +1 -0
- package/dist/src/faf-core/commands/auto.d.ts +25 -0
- package/dist/src/faf-core/commands/auto.js +74 -0
- package/dist/src/faf-core/commands/auto.js.map +1 -0
- package/dist/src/faf-core/commands/bi-sync.d.ts +26 -0
- package/dist/src/faf-core/commands/bi-sync.js +157 -0
- package/dist/src/faf-core/commands/bi-sync.js.map +1 -0
- package/dist/src/faf-core/commands/doctor.d.ts +17 -0
- package/dist/src/faf-core/commands/doctor.js +198 -0
- package/dist/src/faf-core/commands/doctor.js.map +1 -0
- package/dist/src/faf-core/commands/enhance.d.ts +46 -0
- package/dist/src/faf-core/commands/enhance.js +360 -0
- package/dist/src/faf-core/commands/enhance.js.map +1 -0
- package/dist/src/faf-core/commands/formats.d.ts +22 -0
- package/dist/src/faf-core/commands/formats.js +117 -0
- package/dist/src/faf-core/commands/formats.js.map +1 -0
- package/dist/src/faf-core/commands/init.d.ts +26 -0
- package/dist/src/faf-core/commands/init.js +114 -0
- package/dist/src/faf-core/commands/init.js.map +1 -0
- package/dist/src/faf-core/commands/innit.d.ts +7 -0
- package/dist/src/faf-core/commands/innit.js +13 -0
- package/dist/src/faf-core/commands/innit.js.map +1 -0
- package/dist/src/faf-core/commands/migrate.d.ts +15 -0
- package/dist/src/faf-core/commands/migrate.js +86 -0
- package/dist/src/faf-core/commands/migrate.js.map +1 -0
- package/dist/src/faf-core/commands/quick.d.ts +16 -0
- package/dist/src/faf-core/commands/quick.js +184 -0
- package/dist/src/faf-core/commands/quick.js.map +1 -0
- package/dist/src/faf-core/commands/score.d.ts +47 -0
- package/dist/src/faf-core/commands/score.js +49 -0
- package/dist/src/faf-core/commands/score.js.map +1 -0
- package/dist/src/faf-core/commands/sync.d.ts +16 -0
- package/dist/src/faf-core/commands/sync.js +210 -0
- package/dist/src/faf-core/commands/sync.js.map +1 -0
- package/dist/src/faf-core/commands/update.d.ts +12 -0
- package/dist/src/faf-core/commands/update.js +46 -0
- package/dist/src/faf-core/commands/update.js.map +1 -0
- package/dist/src/faf-core/commands/validate.d.ts +21 -0
- package/dist/src/faf-core/commands/validate.js +81 -0
- package/dist/src/faf-core/commands/validate.js.map +1 -0
- package/dist/src/faf-core/compiler/faf-compiler.d.ts +138 -0
- package/dist/src/faf-core/compiler/faf-compiler.js +794 -0
- package/dist/src/faf-core/compiler/faf-compiler.js.map +1 -0
- package/dist/src/faf-core/engines/dependency-tsa.d.ts +88 -0
- package/dist/src/faf-core/engines/dependency-tsa.js +361 -0
- package/dist/src/faf-core/engines/dependency-tsa.js.map +1 -0
- package/dist/src/faf-core/engines/fab-formats-processor.d.ts +166 -0
- package/dist/src/faf-core/engines/fab-formats-processor.js +1274 -0
- package/dist/src/faf-core/engines/fab-formats-processor.js.map +1 -0
- package/dist/src/faf-core/engines/faf-dna.d.ts +159 -0
- package/dist/src/faf-core/engines/faf-dna.js +554 -0
- package/dist/src/faf-core/engines/faf-dna.js.map +1 -0
- package/dist/src/faf-core/engines/relentless-context-extractor.d.ts +100 -0
- package/dist/src/faf-core/engines/relentless-context-extractor.js +625 -0
- package/dist/src/faf-core/engines/relentless-context-extractor.js.map +1 -0
- package/dist/src/faf-core/fix-once/colors.d.ts +104 -0
- package/dist/src/faf-core/fix-once/colors.js +236 -0
- package/dist/src/faf-core/fix-once/colors.js.map +1 -0
- package/dist/src/faf-core/fix-once/types.d.ts +257 -0
- package/dist/src/faf-core/fix-once/types.js +26 -0
- package/dist/src/faf-core/fix-once/types.js.map +1 -0
- package/dist/src/faf-core/fix-once/yaml.d.ts +57 -0
- package/dist/src/faf-core/fix-once/yaml.js +172 -0
- package/dist/src/faf-core/fix-once/yaml.js.map +1 -0
- package/dist/src/faf-core/generators/faf-generator-championship.d.ts +16 -0
- package/dist/src/faf-core/generators/faf-generator-championship.js +462 -0
- package/dist/src/faf-core/generators/faf-generator-championship.js.map +1 -0
- package/dist/src/faf-core/utils/balance-visualizer.d.ts +37 -0
- package/dist/src/faf-core/utils/balance-visualizer.js +197 -0
- package/dist/src/faf-core/utils/balance-visualizer.js.map +1 -0
- package/dist/src/faf-core/utils/championship-style.d.ts +109 -0
- package/dist/src/faf-core/utils/championship-style.js +219 -0
- package/dist/src/faf-core/utils/championship-style.js.map +1 -0
- package/dist/src/faf-core/utils/chrome-extension-detector.d.ts +73 -0
- package/dist/src/faf-core/utils/chrome-extension-detector.js +268 -0
- package/dist/src/faf-core/utils/chrome-extension-detector.js.map +1 -0
- package/dist/src/faf-core/utils/fafignore-parser.d.ts +20 -0
- package/dist/src/faf-core/utils/fafignore-parser.js +178 -0
- package/dist/src/faf-core/utils/fafignore-parser.js.map +1 -0
- package/dist/src/faf-core/utils/file-utils.d.ts +112 -0
- package/dist/src/faf-core/utils/file-utils.js +846 -0
- package/dist/src/faf-core/utils/file-utils.js.map +1 -0
- package/dist/src/faf-core/utils/native-file-finder.d.ts +115 -0
- package/dist/src/faf-core/utils/native-file-finder.js +211 -0
- package/dist/src/faf-core/utils/native-file-finder.js.map +1 -0
- package/dist/src/faf-core/utils/platform-detector.d.ts +30 -0
- package/dist/src/faf-core/utils/platform-detector.js +218 -0
- package/dist/src/faf-core/utils/platform-detector.js.map +1 -0
- package/dist/src/faf-core/utils/technical-credit.d.ts +35 -0
- package/dist/src/faf-core/utils/technical-credit.js +286 -0
- package/dist/src/faf-core/utils/technical-credit.js.map +1 -0
- package/dist/src/faf-core/utils/yaml-generator.d.ts +41 -0
- package/dist/src/faf-core/utils/yaml-generator.js +360 -0
- package/dist/src/faf-core/utils/yaml-generator.js.map +1 -0
- package/dist/src/handlers/behavioral-instruction.d.ts +16 -0
- package/dist/src/handlers/behavioral-instruction.js +43 -0
- package/dist/src/handlers/behavioral-instruction.js.map +1 -0
- package/dist/src/handlers/championship-tools.d.ts +113 -0
- package/dist/src/handlers/championship-tools.js +2602 -0
- package/dist/src/handlers/championship-tools.js.map +1 -0
- package/dist/src/handlers/engine-adapter.d.ts +28 -0
- package/dist/src/handlers/engine-adapter.js +603 -0
- package/dist/src/handlers/engine-adapter.js.map +1 -0
- package/dist/src/handlers/fileHandler.d.ts +36 -0
- package/dist/src/handlers/fileHandler.js +246 -0
- package/dist/src/handlers/fileHandler.js.map +1 -0
- package/dist/src/handlers/resources.d.ts +18 -0
- package/dist/src/handlers/resources.js +78 -0
- package/dist/src/handlers/resources.js.map +1 -0
- package/dist/src/handlers/tool-registry.d.ts +23 -0
- package/dist/src/handlers/tool-registry.js +68 -0
- package/dist/src/handlers/tool-registry.js.map +1 -0
- package/dist/src/handlers/tool-types.d.ts +167 -0
- package/dist/src/handlers/tool-types.js +7 -0
- package/dist/src/handlers/tool-types.js.map +1 -0
- package/dist/src/handlers/tools.d.ts +25 -0
- package/dist/src/handlers/tools.js +1168 -0
- package/dist/src/handlers/tools.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +17 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/server.d.ts +28 -0
- package/dist/src/server.js +179 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/test-all-functions.d.ts +15 -0
- package/dist/src/test-all-functions.js +163 -0
- package/dist/src/test-all-functions.js.map +1 -0
- package/dist/src/types/mcp-tools.d.ts +53 -0
- package/dist/src/types/mcp-tools.js +77 -0
- package/dist/src/types/mcp-tools.js.map +1 -0
- package/dist/src/types/project-types.d.ts +22 -0
- package/dist/src/types/project-types.js +85 -0
- package/dist/src/types/project-types.js.map +1 -0
- package/dist/src/types/slots.d.ts +39 -0
- package/dist/src/types/slots.js +162 -0
- package/dist/src/types/slots.js.map +1 -0
- package/dist/src/types/tool-visibility.d.ts +36 -0
- package/dist/src/types/tool-visibility.js +510 -0
- package/dist/src/types/tool-visibility.js.map +1 -0
- package/dist/src/utils/auto-path-detection.d.ts +26 -0
- package/dist/src/utils/auto-path-detection.js +198 -0
- package/dist/src/utils/auto-path-detection.js.map +1 -0
- package/dist/src/utils/championship-format.d.ts +30 -0
- package/dist/src/utils/championship-format.js +79 -0
- package/dist/src/utils/championship-format.js.map +1 -0
- package/dist/src/utils/cli-detector.d.ts +20 -0
- package/dist/src/utils/cli-detector.js +230 -0
- package/dist/src/utils/cli-detector.js.map +1 -0
- package/dist/src/utils/display-protocol.d.ts +57 -0
- package/dist/src/utils/display-protocol.js +131 -0
- package/dist/src/utils/display-protocol.js.map +1 -0
- package/dist/src/utils/faf-file-finder.d.ts +59 -0
- package/dist/src/utils/faf-file-finder.js +139 -0
- package/dist/src/utils/faf-file-finder.js.map +1 -0
- package/dist/src/utils/fuzzy-detector.d.ts +56 -0
- package/dist/src/utils/fuzzy-detector.js +221 -0
- package/dist/src/utils/fuzzy-detector.js.map +1 -0
- package/dist/src/utils/path-resolver.d.ts +51 -0
- package/dist/src/utils/path-resolver.js +214 -0
- package/dist/src/utils/path-resolver.js.map +1 -0
- package/dist/src/utils/type-guards.d.ts +9 -0
- package/dist/src/utils/type-guards.js +27 -0
- package/dist/src/utils/type-guards.js.map +1 -0
- package/dist/src/utils/username-detector.d.ts +27 -0
- package/dist/src/utils/username-detector.js +90 -0
- package/dist/src/utils/username-detector.js.map +1 -0
- package/dist/src/utils/visual-style.d.ts +62 -0
- package/dist/src/utils/visual-style.js +164 -0
- package/dist/src/utils/visual-style.js.map +1 -0
- package/dist/src/version.d.ts +9 -0
- package/dist/src/version.js +37 -0
- package/dist/src/version.js.map +1 -0
- package/package.json +114 -0
- package/scripts/discord-sync-curated.js +233 -0
- package/scripts/discord-sync-final.js +218 -0
- package/scripts/discord-sync-simple.js +175 -0
- package/scripts/discord-sync-working.js +187 -0
- package/scripts/discord-sync.js +181 -0
- package/scripts/postinstall.js +46 -0
- package/skill/SKILL.md +385 -0
package/package.json
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "faf-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"mcpName": "io.github.Wolfe-Jam/faf-mcp",
|
|
5
|
+
"description": "IANA-registered format (application/vnd.faf+yaml) โข Persistent project context โข MCP server for all platforms โข MIT License",
|
|
6
|
+
"icon": "./assets/icons/faf-icon-256.png",
|
|
7
|
+
"logo": "./assets/icons/faf-icon-256.png",
|
|
8
|
+
"displayName": ".faf ๐งกโก๏ธ",
|
|
9
|
+
"main": "dist/src/index.js",
|
|
10
|
+
"bin": {
|
|
11
|
+
"faf-mcp": "dist/src/index.js"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"dev": "ts-node src/server.ts",
|
|
16
|
+
"dev:stdio": "ts-node src/cli.ts --transport stdio",
|
|
17
|
+
"dev:http": "ts-node src/cli.ts --transport http-sse --port 3001",
|
|
18
|
+
"test": "jest",
|
|
19
|
+
"test:mcp": "mcp-inspector stdio ts-node src/cli.ts",
|
|
20
|
+
"lint": "eslint src/**/*.ts",
|
|
21
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
22
|
+
"type-check": "tsc --noEmit",
|
|
23
|
+
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
24
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
25
|
+
"postinstall": "node scripts/postinstall.js",
|
|
26
|
+
"debug": "node --inspect-brk=0.0.0.0:9229 -r ts-node/register src/cli.ts"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"mcp",
|
|
30
|
+
"mcp-server",
|
|
31
|
+
"model-context-protocol",
|
|
32
|
+
"faf",
|
|
33
|
+
".faf",
|
|
34
|
+
"dot-faf",
|
|
35
|
+
"claude",
|
|
36
|
+
"claude-desktop",
|
|
37
|
+
"cursor",
|
|
38
|
+
"cursor-ide",
|
|
39
|
+
"windsurf",
|
|
40
|
+
"windsurf-editor",
|
|
41
|
+
"gemini",
|
|
42
|
+
"vscode",
|
|
43
|
+
"anthropic",
|
|
44
|
+
"ai-context",
|
|
45
|
+
"project-dna",
|
|
46
|
+
"ai-readiness",
|
|
47
|
+
"context-management",
|
|
48
|
+
"persistent-project-context",
|
|
49
|
+
"universal-context",
|
|
50
|
+
"iana-format",
|
|
51
|
+
"project-intelligence",
|
|
52
|
+
"codebase-understanding",
|
|
53
|
+
"ai-assistant",
|
|
54
|
+
"ai-tools",
|
|
55
|
+
"llm-tools",
|
|
56
|
+
"developer-tools",
|
|
57
|
+
"devtools",
|
|
58
|
+
"typescript",
|
|
59
|
+
"open-source",
|
|
60
|
+
"mit-license",
|
|
61
|
+
"free-forever"
|
|
62
|
+
],
|
|
63
|
+
"author": {
|
|
64
|
+
"name": "wolfejam",
|
|
65
|
+
"email": "team@faf.one",
|
|
66
|
+
"url": "https://wolfejam.dev"
|
|
67
|
+
},
|
|
68
|
+
"license": "MIT",
|
|
69
|
+
"repository": {
|
|
70
|
+
"type": "git",
|
|
71
|
+
"url": "https://github.com/Wolfe-Jam/faf-mcp.git"
|
|
72
|
+
},
|
|
73
|
+
"bugs": {
|
|
74
|
+
"url": "https://github.com/Wolfe-Jam/faf-mcp/issues"
|
|
75
|
+
},
|
|
76
|
+
"homepage": "https://faf.one",
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">=18.0.0"
|
|
79
|
+
},
|
|
80
|
+
"files": [
|
|
81
|
+
"dist/**/*",
|
|
82
|
+
"assets/**/*",
|
|
83
|
+
"scripts/**/*",
|
|
84
|
+
"skill/SKILL.md",
|
|
85
|
+
"README.md",
|
|
86
|
+
"CLAUDE.md",
|
|
87
|
+
".faf",
|
|
88
|
+
"LICENSE",
|
|
89
|
+
"CHANGELOG.md"
|
|
90
|
+
],
|
|
91
|
+
"publishConfig": {
|
|
92
|
+
"access": "public"
|
|
93
|
+
},
|
|
94
|
+
"dependencies": {
|
|
95
|
+
"faf-cli": ">=3.1.1",
|
|
96
|
+
"@modelcontextprotocol/sdk": "^1.20.1",
|
|
97
|
+
"yaml": "^2.4.1"
|
|
98
|
+
},
|
|
99
|
+
"devDependencies": {
|
|
100
|
+
"@jest/globals": "^30.1.2",
|
|
101
|
+
"@types/cors": "^2.8.19",
|
|
102
|
+
"@types/express": "^5.0.3",
|
|
103
|
+
"@types/jest": "^30.0.0",
|
|
104
|
+
"@types/jsonwebtoken": "^9.0.5",
|
|
105
|
+
"@types/node": "^20.11.0",
|
|
106
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
107
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
108
|
+
"eslint": "^8.56.0",
|
|
109
|
+
"jest": "^29.7.0",
|
|
110
|
+
"ts-jest": "^29.1.0",
|
|
111
|
+
"ts-node": "^10.9.2",
|
|
112
|
+
"typescript": "^5.3.0"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Discord Documentation Sync Tool (Curated Content)
|
|
5
|
+
* Posts hand-crafted summaries of FAF documentation to Discord
|
|
6
|
+
*
|
|
7
|
+
* Usage: node scripts/discord-sync-curated.js <webhook-url>
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const https = require('https');
|
|
11
|
+
|
|
12
|
+
// Curated messages for Discord
|
|
13
|
+
const MESSAGES = [
|
|
14
|
+
{
|
|
15
|
+
title: '๐ FAF MCP Server Documentation',
|
|
16
|
+
content: `Welcome to **claude-faf-mcp** - the Model Context Protocol server that brings FAF (Foundational AI-context Format) to Claude Desktop!
|
|
17
|
+
|
|
18
|
+
**What is FAF?**
|
|
19
|
+
๐งก IANA-registered AI context format (\`application/vnd.faf+yaml\`)
|
|
20
|
+
๐ฆ Universal project DNA that works with any AI tool
|
|
21
|
+
๐ F1-inspired scoring system for project quality
|
|
22
|
+
|
|
23
|
+
**Two Tools Available:**
|
|
24
|
+
โข **MCP Server** (1,231/week downloads) - For Claude Desktop integration
|
|
25
|
+
โข **CLI Tool** (235/week downloads) - Command-line standalone tool
|
|
26
|
+
|
|
27
|
+
Choose MCP for Claude Desktop, CLI for terminal workflows, or both!
|
|
28
|
+
|
|
29
|
+
Full documentation below...`,
|
|
30
|
+
order: 1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: '๐ Quick Start - Claude Desktop Setup',
|
|
34
|
+
content: `**Install the MCP server:**
|
|
35
|
+
\`\`\`bash
|
|
36
|
+
npm install -g claude-faf-mcp
|
|
37
|
+
\`\`\`
|
|
38
|
+
|
|
39
|
+
**Add to Claude Desktop config:**
|
|
40
|
+
\`\`\`json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"faf": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["claude-faf-mcp"]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
\`\`\`
|
|
50
|
+
|
|
51
|
+
**Config location:**
|
|
52
|
+
โข macOS: \`~/Library/Application Support/Claude/claude_desktop_config.json\`
|
|
53
|
+
โข Windows: \`%APPDATA%\\Claude\\claude_desktop_config.json\`
|
|
54
|
+
|
|
55
|
+
**Restart Claude Desktop**, then test with: \`faf_score()\`
|
|
56
|
+
|
|
57
|
+
[Full Quick Start Guide](https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/QUICK_START.md)`,
|
|
58
|
+
order: 2
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: '๐ The PODIUM Scoring System',
|
|
62
|
+
content: `**Gamifying Software Excellence**
|
|
63
|
+
|
|
64
|
+
\`\`\`
|
|
65
|
+
๐ฅ 85/100 = BRONZE PODIUM (3rd Place)
|
|
66
|
+
๐ฅ 95/100 = SILVER PODIUM (2nd Place)
|
|
67
|
+
๐ฅ 99/100 = GOLD PODIUM (1st Place)
|
|
68
|
+
๐ 105/100 = TROPHY (Beyond Podium)
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
**The Psychology:**
|
|
72
|
+
When you see your project is BRONZE (85%), you can't help it...
|
|
73
|
+
**YOU'RE GONNA WANNA WIN.**
|
|
74
|
+
|
|
75
|
+
**How scores work:**
|
|
76
|
+
โข .faf file: 40 points
|
|
77
|
+
โข CLAUDE.md: 30 points
|
|
78
|
+
โข README.md: 15 points
|
|
79
|
+
โข Project file (package.json, etc): 14 points
|
|
80
|
+
|
|
81
|
+
Nobody wants to ship BRONZE when GOLD is 14 points away.
|
|
82
|
+
|
|
83
|
+
[Read PODIUM System](https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/PODIUM-SYSTEM.md)`,
|
|
84
|
+
order: 3
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
title: 'โ Common Questions',
|
|
88
|
+
content: `**Do I need the FAF CLI installed?**
|
|
89
|
+
No. The MCP server works standalone. Some advanced features currently require CLI but are being migrated.
|
|
90
|
+
|
|
91
|
+
**What's the difference between MCP and CLI?**
|
|
92
|
+
โข **MCP Server**: Claude Desktop integration, native tools
|
|
93
|
+
โข **CLI Tool**: Terminal-based, standalone commands
|
|
94
|
+
|
|
95
|
+
**How is the score calculated?**
|
|
96
|
+
40 (.faf) + 30 (CLAUDE.md) + 15 (README.md) + 14 (project file) = 99% max
|
|
97
|
+
The final 1% represents perfect human-AI collaboration.
|
|
98
|
+
|
|
99
|
+
**Is my code safe?**
|
|
100
|
+
Yes. Everything runs locally. No data sent externally. No network capabilities.
|
|
101
|
+
|
|
102
|
+
**Which commands work without CLI?**
|
|
103
|
+
\`faf_score\`, \`faf_detect\`, \`faf_list\`, \`faf_read\`, \`faf_write\`, \`faf_debug\`
|
|
104
|
+
|
|
105
|
+
[Full FAQ](https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/FAQ.md)`,
|
|
106
|
+
order: 4
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
title: '๐ User Guide Overview',
|
|
110
|
+
content: `**Core Features:**
|
|
111
|
+
|
|
112
|
+
**Project Scoring** - \`faf_score()\`
|
|
113
|
+
Evaluates your project's AI-readiness (0-99%, with Claude able to grant 100%)
|
|
114
|
+
|
|
115
|
+
**Project Detection** - \`faf_detect()\`
|
|
116
|
+
Automatically identifies your stack and frameworks
|
|
117
|
+
|
|
118
|
+
**Directory Exploration** - \`faf_list()\`
|
|
119
|
+
View project structure with smart file type detection
|
|
120
|
+
|
|
121
|
+
**File Operations** - \`faf_read()\` / \`faf_write()\`
|
|
122
|
+
Native file system operations
|
|
123
|
+
|
|
124
|
+
**Best Practices:**
|
|
125
|
+
1. Start with detection - let FAF understand your project
|
|
126
|
+
2. Check your score - see where you stand
|
|
127
|
+
3. Follow suggestions - each command guides next steps
|
|
128
|
+
4. Build gradually - improve incrementally
|
|
129
|
+
|
|
130
|
+
[Complete User Guide](https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/USER_GUIDE.md)`,
|
|
131
|
+
order: 5
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: '๐ Links & Resources',
|
|
135
|
+
content: `**Main Sites:**
|
|
136
|
+
โข [faf.one](https://faf.one) - FAF Format homepage
|
|
137
|
+
โข [GitHub - MCP Server](https://github.com/Wolfe-Jam/claude-faf-mcp)
|
|
138
|
+
โข [GitHub - CLI Tool](https://github.com/Wolfe-Jam/faf-cli)
|
|
139
|
+
|
|
140
|
+
**npm Packages:**
|
|
141
|
+
โข [claude-faf-mcp](https://www.npmjs.com/package/claude-faf-mcp) - 6.1k downloads
|
|
142
|
+
โข [faf-cli](https://www.npmjs.com/package/faf-cli) - 6.2k downloads
|
|
143
|
+
|
|
144
|
+
**Getting Help:**
|
|
145
|
+
โข Discord: This server! Ask in #help
|
|
146
|
+
โข GitHub Issues: Report bugs & request features
|
|
147
|
+
โข Documentation: All docs linked above
|
|
148
|
+
|
|
149
|
+
**IANA Registration:** \`application/vnd.faf+yaml\`
|
|
150
|
+
๐งก Official AI context format standard`,
|
|
151
|
+
order: 6
|
|
152
|
+
}
|
|
153
|
+
];
|
|
154
|
+
|
|
155
|
+
function postToDiscord(webhookUrl, content) {
|
|
156
|
+
return new Promise((resolve, reject) => {
|
|
157
|
+
const url = new URL(webhookUrl);
|
|
158
|
+
const payload = JSON.stringify({
|
|
159
|
+
content: content.substring(0, 2000)
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
const options = {
|
|
163
|
+
hostname: url.hostname,
|
|
164
|
+
path: url.pathname + url.search,
|
|
165
|
+
method: 'POST',
|
|
166
|
+
headers: {
|
|
167
|
+
'Content-Type': 'application/json',
|
|
168
|
+
'Content-Length': Buffer.byteLength(payload)
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const req = https.request(options, (res) => {
|
|
173
|
+
let body = '';
|
|
174
|
+
res.on('data', chunk => body += chunk);
|
|
175
|
+
res.on('end', () => {
|
|
176
|
+
if (res.statusCode === 204 || res.statusCode === 200) {
|
|
177
|
+
resolve();
|
|
178
|
+
} else {
|
|
179
|
+
reject(new Error(`Discord returned status ${res.statusCode}: ${body}`));
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
req.on('error', reject);
|
|
185
|
+
req.write(payload);
|
|
186
|
+
req.end();
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
async function syncDocs(webhookUrl) {
|
|
191
|
+
console.log('๐ Starting Discord documentation sync (curated)...\n');
|
|
192
|
+
|
|
193
|
+
const sortedMessages = MESSAGES.sort((a, b) => a.order - b.order);
|
|
194
|
+
|
|
195
|
+
for (const msg of sortedMessages) {
|
|
196
|
+
const message = `**${msg.title}**
|
|
197
|
+
|
|
198
|
+
${msg.content}`;
|
|
199
|
+
|
|
200
|
+
try {
|
|
201
|
+
await postToDiscord(webhookUrl, message);
|
|
202
|
+
console.log(`โ
Posted ${msg.title}`);
|
|
203
|
+
|
|
204
|
+
// Rate limit: Discord allows 5 requests per 2 seconds
|
|
205
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
206
|
+
} catch (error) {
|
|
207
|
+
console.error(`โ Failed to post ${msg.title}:`, error.message);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
console.log('\nโจ Sync complete!');
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Main execution
|
|
215
|
+
if (require.main === module) {
|
|
216
|
+
const webhookUrl = process.argv[2];
|
|
217
|
+
|
|
218
|
+
if (!webhookUrl) {
|
|
219
|
+
console.error('Usage: node scripts/discord-sync-curated.js <webhook-url>');
|
|
220
|
+
console.error('\nGet your webhook URL from Discord:');
|
|
221
|
+
console.error('1. Server Settings > Integrations > Webhooks');
|
|
222
|
+
console.error('2. Create New Webhook or use existing');
|
|
223
|
+
console.error('3. Copy Webhook URL');
|
|
224
|
+
process.exit(1);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
syncDocs(webhookUrl).catch((error) => {
|
|
228
|
+
console.error('Fatal error:', error);
|
|
229
|
+
process.exit(1);
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
module.exports = { syncDocs };
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Discord Documentation Sync Tool (Final Version)
|
|
5
|
+
* Posts clean summaries with links to GitHub (single source of truth)
|
|
6
|
+
*
|
|
7
|
+
* Usage: node scripts/discord-sync-final.js <webhook-url>
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const https = require('https');
|
|
11
|
+
|
|
12
|
+
// Clean messages that link to GitHub as source of truth
|
|
13
|
+
const MESSAGES = [
|
|
14
|
+
{
|
|
15
|
+
title: '๐ Welcome to FAF',
|
|
16
|
+
content: `**FAF (Foundational AI-context Format)** - IANA-registered AI context standard
|
|
17
|
+
|
|
18
|
+
๐งก **IANA Format:** \`application/vnd.faf+yaml\`
|
|
19
|
+
๐ฆ **MCP Server:** 6.1k downloads (1,231/week)
|
|
20
|
+
โก **CLI Tool:** 6.2k downloads (235/week)
|
|
21
|
+
|
|
22
|
+
**Two packages, one ecosystem:**
|
|
23
|
+
โข \`claude-faf-mcp\` - For Claude Desktop (MCP integration)
|
|
24
|
+
โข \`faf-cli\` - For terminal workflows
|
|
25
|
+
|
|
26
|
+
**โญ๏ธ Help us grow:** <https://github.com/Wolfe-Jam/claude-faf-mcp>
|
|
27
|
+
Every star helps more devs discover FAF!
|
|
28
|
+
|
|
29
|
+
โโโโโโโโโโโโโโโโโโโโโ`,
|
|
30
|
+
order: 1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: '๐ Quick Start',
|
|
34
|
+
content: `**Get started in 2 minutes:**
|
|
35
|
+
|
|
36
|
+
\`\`\`bash
|
|
37
|
+
npm install -g claude-faf-mcp
|
|
38
|
+
\`\`\`
|
|
39
|
+
|
|
40
|
+
**Add to Claude Desktop config:**
|
|
41
|
+
\`\`\`json
|
|
42
|
+
{
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"faf": {
|
|
45
|
+
"command": "npx",
|
|
46
|
+
"args": ["claude-faf-mcp"]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
\`\`\`
|
|
51
|
+
|
|
52
|
+
**Restart Claude Desktop** โ Test with \`faf_score()\`
|
|
53
|
+
|
|
54
|
+
๐ **Full guide:** <https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/QUICK_START.md>`,
|
|
55
|
+
order: 2
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
title: '๐ PODIUM Scoring',
|
|
59
|
+
content: `**Gamifying Software Excellence**
|
|
60
|
+
|
|
61
|
+
\`\`\`
|
|
62
|
+
๐ฅ 85% = BRONZE PODIUM
|
|
63
|
+
๐ฅ 95% = SILVER PODIUM
|
|
64
|
+
๐ฅ 99% = GOLD PODIUM
|
|
65
|
+
๐ 105% = TROPHY
|
|
66
|
+
\`\`\`
|
|
67
|
+
|
|
68
|
+
When you see BRONZE (85%), you can't help it...
|
|
69
|
+
**YOU'RE GONNA WANNA WIN.**
|
|
70
|
+
|
|
71
|
+
**Score breakdown:**
|
|
72
|
+
โข 40 points: .faf file (project context)
|
|
73
|
+
โข 30 points: CLAUDE.md (AI instructions)
|
|
74
|
+
โข 15 points: README.md (documentation)
|
|
75
|
+
โข 14 points: Project file (package.json, etc)
|
|
76
|
+
|
|
77
|
+
๐ **Full system:** <https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/PODIUM-SYSTEM.md>`,
|
|
78
|
+
order: 3
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: 'โ FAQ',
|
|
82
|
+
content: `**Common Questions:**
|
|
83
|
+
|
|
84
|
+
**Do I need the CLI installed?**
|
|
85
|
+
No. v3.0.5 is 100% standalone (50/50 tools operational).
|
|
86
|
+
|
|
87
|
+
**What's MCP vs CLI?**
|
|
88
|
+
MCP = Claude Desktop integration
|
|
89
|
+
CLI = Terminal standalone tool
|
|
90
|
+
|
|
91
|
+
**How are scores calculated?**
|
|
92
|
+
.faf (40) + CLAUDE.md (30) + README (15) + project file (14) = 99%
|
|
93
|
+
Final 1% = perfect collaboration (only Claude can grant)
|
|
94
|
+
|
|
95
|
+
**Is my code safe?**
|
|
96
|
+
Yes. Everything runs locally. No external data transmission.
|
|
97
|
+
|
|
98
|
+
๐ **Full FAQ:** <https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/FAQ.md>`,
|
|
99
|
+
order: 4
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
title: '๐ Documentation',
|
|
103
|
+
content: `**All docs available on GitHub:**
|
|
104
|
+
|
|
105
|
+
โข **Quick Start:** <https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/QUICK_START.md>
|
|
106
|
+
โข **User Guide:** <https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/USER_GUIDE.md>
|
|
107
|
+
โข **FAQ:** <https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/FAQ.md>
|
|
108
|
+
โข **PODIUM System:** <https://github.com/Wolfe-Jam/claude-faf-mcp/blob/main/docs/PODIUM-SYSTEM.md>
|
|
109
|
+
โข **Main README:** <https://github.com/Wolfe-Jam/claude-faf-mcp>
|
|
110
|
+
|
|
111
|
+
**npm packages:**
|
|
112
|
+
โข MCP: <https://www.npmjs.com/package/claude-faf-mcp>
|
|
113
|
+
โข CLI: <https://www.npmjs.com/package/faf-cli>
|
|
114
|
+
|
|
115
|
+
**Website:** <https://faf.one>`,
|
|
116
|
+
order: 5
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
title: 'โญ๏ธ Support FAF',
|
|
120
|
+
content: `**Help FAF grow:**
|
|
121
|
+
|
|
122
|
+
โญ๏ธ **Star on GitHub:** <https://github.com/Wolfe-Jam/claude-faf-mcp>
|
|
123
|
+
Every star helps developers discover this tool!
|
|
124
|
+
|
|
125
|
+
๐ฌ **Join the community:**
|
|
126
|
+
Already here? Introduce yourself in #introductions!
|
|
127
|
+
|
|
128
|
+
๐ฃ **Share FAF:**
|
|
129
|
+
Know someone building with Claude? Share the npm link:
|
|
130
|
+
<https://www.npmjs.com/package/claude-faf-mcp>
|
|
131
|
+
|
|
132
|
+
๐ **Report issues:** <https://github.com/Wolfe-Jam/claude-faf-mcp/issues>
|
|
133
|
+
|
|
134
|
+
โโโโโโโโโโโโโโโโโโโโโ
|
|
135
|
+
Thanks for being part of the FAF community! ๐งก`,
|
|
136
|
+
order: 6
|
|
137
|
+
}
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
function postToDiscord(webhookUrl, content) {
|
|
141
|
+
return new Promise((resolve, reject) => {
|
|
142
|
+
const url = new URL(webhookUrl);
|
|
143
|
+
const payload = JSON.stringify({
|
|
144
|
+
content: content.substring(0, 2000)
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
const options = {
|
|
148
|
+
hostname: url.hostname,
|
|
149
|
+
path: url.pathname + url.search,
|
|
150
|
+
method: 'POST',
|
|
151
|
+
headers: {
|
|
152
|
+
'Content-Type': 'application/json',
|
|
153
|
+
'Content-Length': Buffer.byteLength(payload)
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const req = https.request(options, (res) => {
|
|
158
|
+
let body = '';
|
|
159
|
+
res.on('data', chunk => body += chunk);
|
|
160
|
+
res.on('end', () => {
|
|
161
|
+
if (res.statusCode === 204 || res.statusCode === 200) {
|
|
162
|
+
resolve();
|
|
163
|
+
} else {
|
|
164
|
+
reject(new Error(`Discord returned status ${res.statusCode}: ${body}`));
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
req.on('error', reject);
|
|
170
|
+
req.write(payload);
|
|
171
|
+
req.end();
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
async function syncDocs(webhookUrl) {
|
|
176
|
+
console.log('๐ Starting Discord documentation sync (final)...\n');
|
|
177
|
+
|
|
178
|
+
const sortedMessages = MESSAGES.sort((a, b) => a.order - b.order);
|
|
179
|
+
|
|
180
|
+
for (const msg of sortedMessages) {
|
|
181
|
+
const message = `**${msg.title}**
|
|
182
|
+
|
|
183
|
+
${msg.content}`;
|
|
184
|
+
|
|
185
|
+
try {
|
|
186
|
+
await postToDiscord(webhookUrl, message);
|
|
187
|
+
console.log(`โ
Posted ${msg.title}`);
|
|
188
|
+
|
|
189
|
+
// Rate limit: Discord allows 5 requests per 2 seconds
|
|
190
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
191
|
+
} catch (error) {
|
|
192
|
+
console.error(`โ Failed to post ${msg.title}:`, error.message);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
console.log('\nโจ Sync complete!');
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Main execution
|
|
200
|
+
if (require.main === module) {
|
|
201
|
+
const webhookUrl = process.argv[2];
|
|
202
|
+
|
|
203
|
+
if (!webhookUrl) {
|
|
204
|
+
console.error('Usage: node scripts/discord-sync-final.js <webhook-url>');
|
|
205
|
+
console.error('\nGet your webhook URL from Discord:');
|
|
206
|
+
console.error('1. Server Settings > Integrations > Webhooks');
|
|
207
|
+
console.error('2. Create New Webhook or use existing');
|
|
208
|
+
console.error('3. Copy Webhook URL');
|
|
209
|
+
process.exit(1);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
syncDocs(webhookUrl).catch((error) => {
|
|
213
|
+
console.error('Fatal error:', error);
|
|
214
|
+
process.exit(1);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
module.exports = { syncDocs };
|