faf-mcp 1.3.1 → 2.0.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 (100) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/CLAUDE.md +5 -5
  3. package/README.md +82 -75
  4. package/assets/thumbnail.png +0 -0
  5. package/dist/src/faf-core/commands/agents.d.ts +29 -0
  6. package/dist/src/faf-core/commands/agents.js +140 -0
  7. package/dist/src/faf-core/commands/agents.js.map +1 -0
  8. package/dist/src/faf-core/commands/bi-sync.d.ts +9 -5
  9. package/dist/src/faf-core/commands/bi-sync.js +89 -85
  10. package/dist/src/faf-core/commands/bi-sync.js.map +1 -1
  11. package/dist/src/faf-core/commands/conductor.d.ts +25 -0
  12. package/dist/src/faf-core/commands/conductor.js +157 -0
  13. package/dist/src/faf-core/commands/conductor.js.map +1 -0
  14. package/dist/src/faf-core/commands/cursor.d.ts +29 -0
  15. package/dist/src/faf-core/commands/cursor.js +134 -0
  16. package/dist/src/faf-core/commands/cursor.js.map +1 -0
  17. package/dist/src/faf-core/commands/gemini.d.ts +29 -0
  18. package/dist/src/faf-core/commands/gemini.js +133 -0
  19. package/dist/src/faf-core/commands/gemini.js.map +1 -0
  20. package/dist/src/faf-core/commands/git-context.d.ts +23 -0
  21. package/dist/src/faf-core/commands/git-context.js +66 -0
  22. package/dist/src/faf-core/commands/git-context.js.map +1 -0
  23. package/dist/src/faf-core/commands/human.d.ts +27 -0
  24. package/dist/src/faf-core/commands/human.js +183 -0
  25. package/dist/src/faf-core/commands/human.js.map +1 -0
  26. package/dist/src/faf-core/commands/readme.d.ts +47 -0
  27. package/dist/src/faf-core/commands/readme.js +361 -0
  28. package/dist/src/faf-core/commands/readme.js.map +1 -0
  29. package/dist/src/faf-core/engines/fab-formats-processor.js +3 -3
  30. package/dist/src/faf-core/engines/fab-formats-processor.js.map +1 -1
  31. package/dist/src/faf-core/engines/faf-dna.d.ts +1 -1
  32. package/dist/src/faf-core/engines/faf-dna.js +4 -3
  33. package/dist/src/faf-core/engines/faf-dna.js.map +1 -1
  34. package/dist/src/faf-core/generators/faf-generator-championship.js +9 -8
  35. package/dist/src/faf-core/generators/faf-generator-championship.js.map +1 -1
  36. package/dist/src/faf-core/parsers/agents-parser.d.ts +59 -0
  37. package/dist/src/faf-core/parsers/agents-parser.js +324 -0
  38. package/dist/src/faf-core/parsers/agents-parser.js.map +1 -0
  39. package/dist/src/faf-core/parsers/conductor-parser.d.ts +85 -0
  40. package/dist/src/faf-core/parsers/conductor-parser.js +293 -0
  41. package/dist/src/faf-core/parsers/conductor-parser.js.map +1 -0
  42. package/dist/src/faf-core/parsers/cursorrules-parser.d.ts +57 -0
  43. package/dist/src/faf-core/parsers/cursorrules-parser.js +317 -0
  44. package/dist/src/faf-core/parsers/cursorrules-parser.js.map +1 -0
  45. package/dist/src/faf-core/parsers/faf-git-generator.d.ts +53 -0
  46. package/dist/src/faf-core/parsers/faf-git-generator.js +512 -0
  47. package/dist/src/faf-core/parsers/faf-git-generator.js.map +1 -0
  48. package/dist/src/faf-core/parsers/gemini-parser.d.ts +57 -0
  49. package/dist/src/faf-core/parsers/gemini-parser.js +263 -0
  50. package/dist/src/faf-core/parsers/gemini-parser.js.map +1 -0
  51. package/dist/src/faf-core/parsers/github-extractor.d.ts +61 -0
  52. package/dist/src/faf-core/parsers/github-extractor.js +374 -0
  53. package/dist/src/faf-core/parsers/github-extractor.js.map +1 -0
  54. package/dist/src/faf-core/parsers/index.d.ts +12 -0
  55. package/dist/src/{compiler → faf-core/parsers}/index.js +10 -5
  56. package/dist/src/faf-core/parsers/index.js.map +1 -0
  57. package/dist/src/faf-core/parsers/slot-counter.d.ts +55 -0
  58. package/dist/src/faf-core/parsers/slot-counter.js +100 -0
  59. package/dist/src/faf-core/parsers/slot-counter.js.map +1 -0
  60. package/dist/src/faf-core/utils/balance-visualizer.js +3 -3
  61. package/dist/src/faf-core/utils/balance-visualizer.js.map +1 -1
  62. package/dist/src/handlers/championship-tools.d.ts +10 -5
  63. package/dist/src/handlers/championship-tools.js +259 -232
  64. package/dist/src/handlers/championship-tools.js.map +1 -1
  65. package/dist/src/handlers/engine-adapter.js +238 -5
  66. package/dist/src/handlers/engine-adapter.js.map +1 -1
  67. package/dist/src/handlers/tools.d.ts +61 -0
  68. package/dist/src/handlers/tools.js +2103 -102
  69. package/dist/src/handlers/tools.js.map +1 -1
  70. package/dist/src/index.js +0 -0
  71. package/dist/src/types/tool-visibility.js +51 -10
  72. package/dist/src/types/tool-visibility.js.map +1 -1
  73. package/dist/src/utils/championship-format.js +11 -9
  74. package/dist/src/utils/championship-format.js.map +1 -1
  75. package/dist/src/utils/path-resolver.js +56 -2
  76. package/dist/src/utils/path-resolver.js.map +1 -1
  77. package/dist/src/utils/visual-style.js +7 -5
  78. package/dist/src/utils/visual-style.js.map +1 -1
  79. package/dist/src/version.js +24 -11
  80. package/dist/src/version.js.map +1 -1
  81. package/package.json +5 -3
  82. package/project.faf +14 -18
  83. package/dist/index.json +0 -1
  84. package/dist/src/compiler/index.d.ts +0 -7
  85. package/dist/src/compiler/index.js.map +0 -1
  86. package/dist/src/compiler/scorer.d.ts +0 -53
  87. package/dist/src/compiler/scorer.js +0 -189
  88. package/dist/src/compiler/scorer.js.map +0 -1
  89. package/dist/src/compiler/slot-validator.d.ts +0 -32
  90. package/dist/src/compiler/slot-validator.js +0 -293
  91. package/dist/src/compiler/slot-validator.js.map +0 -1
  92. package/dist/src/compiler/type-detector.d.ts +0 -62
  93. package/dist/src/compiler/type-detector.js +0 -388
  94. package/dist/src/compiler/type-detector.js.map +0 -1
  95. package/dist/src/types/project-types.d.ts +0 -22
  96. package/dist/src/types/project-types.js +0 -85
  97. package/dist/src/types/project-types.js.map +0 -1
  98. package/dist/src/types/slots.d.ts +0 -39
  99. package/dist/src/types/slots.js +0 -162
  100. package/dist/src/types/slots.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,47 @@ All notable changes to 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.0.1] - 2026-03-07
9
+
10
+ ### Fixed
11
+
12
+ - **README updated** — Rewritten for Cursor/Windsurf/Cline devs: v2.0.0 announcement in hero, "Define once. Sync everywhere." with interop diagram and quick start up front
13
+ - **Windows CRLF** — Normalize `\r\n` in conductor-parser, gemini-parser, and conductor tests (same fix as agents/cursorrules from faf-cli v4.5.0)
14
+ - **CI pipeline** — Fix 3 failures: npm audit fix (hono, express-rate-limit), audit-level downgraded to critical with continue-on-error, MCP Registry duplicate version tolerance
15
+ - **Vercel badge** — Replaced oversized deploy button with shields.io badge
16
+
17
+ ## [2.0.0] - 2026-03-07 — The Interop MCP for Context
18
+
19
+ **Define once. Sync everywhere.**
20
+
21
+ ### Added
22
+
23
+ - **AI Format Interop** — 5 new MCP tools for cross-platform AI context
24
+ - `faf_agents`: Import/export/sync AGENTS.md (OpenAI Codex / Linux Foundation)
25
+ - `faf_cursor`: Import/export/sync .cursorrules (Cursor IDE)
26
+ - `faf_gemini`: Import/export/sync GEMINI.md (Google Gemini CLI)
27
+ - `faf_conductor`: Import/export Conductor directory structure
28
+ - `faf_git`: Extract .faf context from any public GitHub repo URL
29
+ - **Bi-sync `--all` flag** — Sync project.faf to all formats at once (CLAUDE.md + AGENTS.md + .cursorrules + GEMINI.md)
30
+ - **7 bundled parsers** — All parser logic runs standalone, zero CLI dependency
31
+ - agents-parser, cursorrules-parser, gemini-parser, conductor-parser
32
+ - github-extractor, faf-git-generator, slot-counter
33
+ - **WJTTC v2.0.0 Championship Suite** — 73 Brake/Engine/Aero tests
34
+ - **New test suites** — interop-v450, cli-mcp-parity, type-definitions-edge-cases
35
+
36
+ ### Changed
37
+
38
+ - **Tool count**: 56 → 61 (25 core + 36 advanced)
39
+ - **Tests**: 84 → 309 (9 suites)
40
+ - **MCP SDK**: ^1.26.0 → ^1.27.1
41
+ - Tier system fix: 100 = Trophy max (105 removed)
42
+ - Path resolver: tilde expansion + project discovery
43
+ - Version resolver: multi-path package.json fallback
44
+
45
+ ### Why Major Version
46
+
47
+ New interop tools change the MCP contract surface. Define once in .faf, sync to every AI platform.
48
+
8
49
  ## [1.3.1] - 2026-02-15
9
50
 
10
51
  ### Fixed
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # 🏎️ CLAUDE.md - faf-mcp Persistent Context & Intelligence
2
2
 
3
3
  ## PROJECT STATE: GOOD 🚀
4
- **Current Position:** Universal MCP server for all platforms
4
+ **Current Position:** USE>FAF™ - IANA-registered format (application/vnd.faf+yaml) • Universal AI context • MCP server for all platforms • Start with 'Use FAF'
5
5
  **Tyre Compound:** ULTRASOFT C5 (Maximum Performance)
6
6
 
7
7
  ---
@@ -10,21 +10,21 @@
10
10
 
11
11
  ### Project Identity
12
12
  - **Name:** faf-mcp
13
- - **Stack:** Node.js/TypeScript
13
+ - **Stack:** CLI/TypeScript/TypeScript (tsc)/npm registry/Node.js
14
14
  - **Quality:** F1-INSPIRED (Championship Performance)
15
15
 
16
16
  ### Technical Architecture
17
- - **What Building:** Universal FAF MCP Server - AI Context Intelligence for All Platforms
17
+ - **What Building:** USE>FAF - IANA-registered format (application/vnd.faf+yaml) • Universal AI context MCP server for all platforms • Start with 'Use FAF'
18
18
  - **Main Language:** TypeScript
19
19
 
20
20
  ### 📊 Context Quality Status
21
21
  - **Overall Assessment:** Good
22
- - **Last Updated:** 2025-12-18
22
+ - **Last Updated:** 2026-03-07
23
23
 
24
24
  ---
25
25
 
26
26
  **STATUS: BI-SYNC ACTIVE 🔗 - Synchronized with .faf context!**
27
27
 
28
- *Last Sync: 2025-12-18T20:42:35.461Z*
28
+ *Last Sync: 2026-03-07T17:33:41.765Z*
29
29
  *Sync Engine: F1-Inspired Software Engineering*
30
30
  *🏎️⚡️_championship_sync*
package/README.md CHANGED
@@ -2,94 +2,111 @@
2
2
  <img src="https://www.faf.one/orange-smiley.svg" alt="FAF" width="40" />
3
3
  <div>
4
4
  <h1 style="margin: 0; color: #FF8C00;">faf-mcp</h1>
5
- <p style="margin: 4px 0 0 0;"><strong>IANA-Registered Format for AI Context</strong> · <code>application/vnd.faf+yaml</code></p>
5
+ <p style="margin: 4px 0 0 0;"><strong>v2.0.0 The Interop MCP for Context</strong></p>
6
6
  </div>
7
7
  </div>
8
8
 
9
- > **.FAF optimizes AI for your codebase.** At 100% (Gold Code), AI stops guessing and starts knowing. Universal MCP server for Cursor, Windsurf, Cline, VS Code, and all MCP-compatible platforms.
9
+ The MCP you didn't realise you needed, or wanted but didn't know who to ask, is here. Building on 36,000+ downloads across Claude and now Gemini, we bring you faf-mcp v2.0.0 to cure your syncing pain and fuel your chosen AI with optimized context, on-demand.
10
10
 
11
- **Universal version of [claude-faf-mcp](https://github.com/Wolfe-Jam/claude-faf-mcp)** Anthropic-approved MCP server, now compatible with all platforms.
11
+ **The only IANA-Registered Format for AI Context** · `application/vnd.faf+yaml`
12
12
 
13
13
  [![CI](https://github.com/Wolfe-Jam/faf-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Wolfe-Jam/faf-mcp/actions/workflows/ci.yml)
14
14
  [![NPM Downloads](https://img.shields.io/npm/dt/faf-mcp?label=total%20downloads&color=00CCFF)](https://www.npmjs.com/package/faf-mcp)
15
15
  [![npm version](https://img.shields.io/npm/v/faf-mcp?color=00CCFF)](https://www.npmjs.com/package/faf-mcp)
16
16
  [![Website](https://img.shields.io/badge/Website-faf.one-orange)](https://faf.one)
17
17
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
18
+ [![project.faf](https://img.shields.io/badge/project.faf-inside-00D4D4)](https://github.com/Wolfe-Jam/faf)
19
+ [![Deploy](https://img.shields.io/badge/Deploy-Vercel-black)](https://vercel.com/new?repository-url=https://github.com/Wolfe-Jam/faf-mcp)
18
20
 
19
21
  ---
20
22
 
21
- ## The Problem: Context-Drift
23
+ ## Define once. Sync everywhere.
22
24
 
23
- AI assistants forget. They misunderstand. They drift.
25
+ You maintain `.cursorrules`. Your teammate uses `AGENTS.md`. Someone on the team just switched to Gemini. Every AI tool wants its own context file — and they all say the same thing in different formats.
24
26
 
25
- Every new session, every new file, every new developer AI starts guessing again. Your codebase context leaks away. Yesterday's perfect assistant becomes today's confused intern.
27
+ **faf-mcp is the dedicated MCP server for Cursor, Windsurf, Cline, VS Code, and every non-Claude platform.** One `.faf` file in your repo, synced to every format your team needs.
26
28
 
27
- **.FAF fixes this permanently.**
28
-
29
- ---
29
+ ```
30
+ project.faf
31
+
32
+ ┌────────┬───────┴───────┬────────────┐
33
+ ▼ ▼ ▼ ▼
34
+ CLAUDE.md AGENTS.md .cursorrules GEMINI.md
35
+ (Claude) (Codex) (Cursor) (Gemini)
36
+ ```
30
37
 
31
- ## The Solution: Gold Code
38
+ ### Quick Start
32
39
 
40
+ ```bash
41
+ npx faf-mcp
33
42
  ```
34
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
35
- 🏆 FAF AI-READINESS SCORE: 100/100 — GOLD CODE
36
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
37
43
 
38
- At 100%, AI is optimized. No more guessing.
39
- Peak AI performance activated.
44
+ Add to your MCP config:
40
45
 
41
- ├─ Project DNA locked in ├─ Zero context-drift
42
- ├─ Architecture understood ├─ Eternal bi-sync active
43
- ├─ Domain model captured ├─ Team alignment permanent
44
- └─ Every session starts smart └─ AI works WITH you, not around you
45
-
46
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
46
+ ```json
47
+ {"mcpServers": {"faf": {"command": "npx", "args": ["-y", "faf-mcp"]}}}
47
48
  ```
48
49
 
50
+ | Platform | Config File |
51
+ |----------|-------------|
52
+ | **Cursor** | `~/.cursor/mcp.json` |
53
+ | **Windsurf** | `~/.codeium/windsurf/mcp_config.json` |
54
+ | **Cline** | Cline MCP settings |
55
+ | **VS Code** | MCP extension config |
56
+ | **Claude Desktop** | Use [claude-faf-mcp](https://github.com/Wolfe-Jam/claude-faf-mcp) |
57
+
49
58
  ---
50
59
 
51
- ## 💎 Lifecycle Value
60
+ ## Three Ways to Deploy
52
61
 
53
- Setup savings get you started. Lifecycle optimization keeps you ahead.
62
+ | Door | Method | Best For |
63
+ |------|--------|----------|
64
+ | **Hosted** | [mcpaas.live](https://mcpaas.live) | Zero-install, point any MCP client to the URL |
65
+ | **Self-Deploy** | [Deploy to Vercel](https://vercel.com/new?repository-url=https://github.com/Wolfe-Jam/faf-mcp) | Your own instance, full control |
66
+ | **Local** | `npx faf-mcp` | IDE integration via stdio transport |
54
67
 
55
- | When | Without FAF | With FAF |
56
- |------|-------------|----------|
57
- | **Day 1** | 20 min setup per dev | 0 min — instant context |
58
- | **Month 1** | AI forgets between sessions | AI remembers everything |
59
- | **Year 1** | New devs re-explain everything | New devs inherit full context |
60
- | **Year 3+** | Institutional knowledge lost | Project DNA preserved forever |
68
+ ### Hosted (mcpaas.live)
61
69
 
62
- **Setup savings: 20 minutes. Lifecycle savings: Infinite.**
70
+ Point your MCP client to `https://mcpaas.live/sse` no install, no config, no maintenance. Served from 300+ Cloudflare edges with sub-ms cold starts via 2.7KB Zig-WASM engine.
63
71
 
64
- ---
72
+ ### Self-Deploy (Vercel)
65
73
 
66
- ## Quick Start
74
+ Deploy your own MCP server on Vercel in one click. Once deployed, your server exposes:
75
+ - `/health` — Health check
76
+ - `/info` — Server metadata + tool list
77
+ - `/sse` — MCP Server-Sent Events transport
67
78
 
68
- **1. Install:**
79
+ ### Local (npm)
69
80
 
70
81
  ```bash
71
- npm install -g faf-mcp
82
+ npx faf-mcp
72
83
  ```
73
84
 
74
- **2. Add to your MCP config:**
85
+ ---
75
86
 
76
- ```json
77
- {"mcpServers": {"faf": {"command": "npx", "args": ["-y", "faf-mcp"]}}}
78
- ```
87
+ ## 🔄 Interop Tools
79
88
 
80
- ### Platform-Specific Setup
89
+ | Tool | Platform | Action |
90
+ |------|----------|--------|
91
+ | `faf_agents` | OpenAI Codex | Import/export/sync AGENTS.md |
92
+ | `faf_cursor` | Cursor IDE | Import/export/sync .cursorrules |
93
+ | `faf_gemini` | Google Gemini | Import/export/sync GEMINI.md |
94
+ | `faf_conductor` | Conductor | Import/export directory structure |
95
+ | `faf_git` | GitHub | Generate .faf from any repo URL |
81
96
 
82
- | Platform | Config File |
83
- |----------|-------------|
84
- | **Cursor** | `~/.cursor/mcp.json` |
85
- | **Windsurf** | `~/.codeium/windsurf/mcp_config.json` |
86
- | **Cline** | Cline MCP settings |
87
- | **VS Code** | MCP extension config |
88
- | **Claude Desktop** | Use [claude-faf-mcp](https://github.com/Wolfe-Jam/claude-faf-mcp) |
97
+ ```bash
98
+ # Sync to all formats at once
99
+ faf bi-sync --all
100
+
101
+ # Generate .faf from any GitHub repo
102
+ faf_git { url: "https://github.com/facebook/react" }
103
+ ```
104
+
105
+ **61 tools** (25 core + 36 advanced) · **309 tests** (9 suites) · **7 bundled parsers**
89
106
 
90
107
  ---
91
108
 
92
- ## ☁️ Cloud Sync (NEW in v1.3.0)
109
+ ## ☁️ Cloud Sync
93
110
 
94
111
  Share your FAF context globally via [mcpaas.live](https://mcpaas.live):
95
112
 
@@ -118,18 +135,19 @@ faf_cloud_fetch { soul_name: "my-project" }
118
135
 
119
136
  ## 🔄 Eternal Bi-Sync
120
137
 
121
- The magic: `.faf` `CLAUDE.md` stay synchronized in milliseconds.
138
+ Your `.faf` file and your platform context files stay synchronized in milliseconds.
122
139
 
123
140
  ```
124
- project.faf ←──── 8ms ────→ CLAUDE.md
125
- │ │
126
- └── Single source of truth ──┘
141
+ project.faf ←── 8ms ──→ .cursorrules / AGENTS.md / CLAUDE.md / GEMINI.md
142
+ Single source of truth
127
143
  ```
128
144
 
129
- - Update either file → both stay aligned
145
+ - Update either side → both stay aligned
146
+ - `--all` flag syncs to all four formats at once
130
147
  - Zero manual maintenance
131
148
  - Works across teams, branches, sessions
132
- - **Context never goes stale**
149
+
150
+ AI assistants forget. They drift. Every new session, AI starts guessing again. Bi-sync means **context never goes stale**.
133
151
 
134
152
  ---
135
153
 
@@ -165,7 +183,7 @@ Works on all platforms — stops web search, forces tool usage.
165
183
 
166
184
  ---
167
185
 
168
- ## 🛠️ 22 Native MCP Tools
186
+ ## 🛠️ 25 Core MCP Tools
169
187
 
170
188
  | Tool | Purpose |
171
189
  |------|---------|
@@ -176,14 +194,20 @@ Works on all platforms — stops web search, forces tool usage.
176
194
  | `faf_enhance` | Intelligent enhancement |
177
195
  | `faf_read` | Parse and validate FAF files |
178
196
  | `faf_write` | Create/update FAF with validation |
179
- | **☁️ Cloud Tools** | **(NEW in v1.3.0)** |
197
+ | **🔄 Interop Tools** | |
198
+ | `faf_agents` | Import/export/sync AGENTS.md |
199
+ | `faf_cursor` | Import/export/sync .cursorrules |
200
+ | `faf_gemini` | Import/export/sync GEMINI.md |
201
+ | `faf_conductor` | Import/export directory structure |
202
+ | `faf_git` | Generate .faf from GitHub repo URL |
203
+ | **☁️ Cloud Tools** | |
180
204
  | `faf_cloud_publish` | Upload to mcpaas.live |
181
205
  | `faf_cloud_fetch` | Pull from cloud |
182
206
  | `faf_cloud_list` | List souls |
183
207
  | `faf_cloud_search` | Search souls |
184
208
  | `faf_cloud_share` | Generate share links |
185
209
 
186
- **Plus CLI fallback with 40+ commands** (via faf-cli v4.3.0):
210
+ **Plus 36 advanced tools and CLI fallback** (via faf-cli v5.0.1):
187
211
  - `faf readme` - Extract 6 Ws from README (+25-35% boost)
188
212
  - `faf human-add` - Non-interactive YAML merge (6Ws Builder)
189
213
  - `faf git` - GitHub repo analysis without cloning
@@ -191,27 +215,10 @@ Works on all platforms — stops web search, forces tool usage.
191
215
 
192
216
  ---
193
217
 
194
- ## 🎯 The .FAF Position
195
-
196
- ```
197
- Platform Context Protocol
198
- ──────── ─────── ────────
199
- Cursor → .faf → MCP
200
- Windsurf → .faf → MCP
201
- Cline → .faf → MCP
202
- VS Code → .faf → MCP
203
- Claude → .faf → MCP
204
- Any IDE → .faf → MCP
205
- ```
206
-
207
- **.FAF is the foundational layer.** Universal context format. IANA-registered. Works everywhere.
208
-
209
- ---
210
-
211
218
  ## 📦 Ecosystem
212
219
 
213
- - **[claude-faf-mcp](https://npmjs.com/package/claude-faf-mcp)** — Claude Desktop (52 tools)
214
- - **[faf-cli](https://npmjs.com/package/faf-cli)** — Terminal CLI (18k+ downloads)
220
+ - **[claude-faf-mcp](https://npmjs.com/package/claude-faf-mcp)** — Claude Desktop (33 tools)
221
+ - **[faf-cli](https://npmjs.com/package/faf-cli)** — Terminal CLI
215
222
  - **[faf-wasm](https://www.npmjs.com/package/faf-wasm)** — WASM SDK (<5ms scoring)
216
223
  - **[faf.one](https://faf.one)** — Official website
217
224
 
Binary file
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Agents Command - v4.5.0 Interop Edition
3
+ *
4
+ * Import/Export/Sync between AGENTS.md and project.faf
5
+ * Bundled command — no CLI dependency required.
6
+ */
7
+ export interface AgentsCommandResult {
8
+ success: boolean;
9
+ action: 'import' | 'export' | 'sync';
10
+ message: string;
11
+ data?: any;
12
+ warnings?: string[];
13
+ }
14
+ /**
15
+ * Import AGENTS.md into project.faf
16
+ */
17
+ export declare function agentsImportCommand(projectPath: string, options?: {
18
+ merge?: boolean;
19
+ }): Promise<AgentsCommandResult>;
20
+ /**
21
+ * Export project.faf to AGENTS.md
22
+ */
23
+ export declare function agentsExportCommand(projectPath: string, options?: {
24
+ force?: boolean;
25
+ }): Promise<AgentsCommandResult>;
26
+ /**
27
+ * Sync AGENTS.md <-> project.faf (FAF is source of truth by default)
28
+ */
29
+ export declare function agentsSyncCommand(projectPath: string): Promise<AgentsCommandResult>;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ /**
3
+ * Agents Command - v4.5.0 Interop Edition
4
+ *
5
+ * Import/Export/Sync between AGENTS.md and project.faf
6
+ * Bundled command — no CLI dependency required.
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.agentsImportCommand = agentsImportCommand;
13
+ exports.agentsExportCommand = agentsExportCommand;
14
+ exports.agentsSyncCommand = agentsSyncCommand;
15
+ const path_1 = __importDefault(require("path"));
16
+ const fs_1 = require("fs");
17
+ const file_utils_js_1 = require("../utils/file-utils.js");
18
+ const yaml_js_1 = require("../fix-once/yaml.js");
19
+ const agents_parser_js_1 = require("../parsers/agents-parser.js");
20
+ /**
21
+ * Import AGENTS.md into project.faf
22
+ */
23
+ async function agentsImportCommand(projectPath, options = {}) {
24
+ const agentsPath = await (0, agents_parser_js_1.detectAgentsMd)(projectPath);
25
+ if (!agentsPath) {
26
+ return {
27
+ success: false,
28
+ action: 'import',
29
+ message: 'No AGENTS.md found in project directory',
30
+ };
31
+ }
32
+ const result = await (0, agents_parser_js_1.agentsImport)(agentsPath);
33
+ if (!result.success) {
34
+ return {
35
+ success: false,
36
+ action: 'import',
37
+ message: result.warnings.join(', '),
38
+ warnings: result.warnings,
39
+ };
40
+ }
41
+ // If merge mode, read existing .faf and merge
42
+ if (options.merge) {
43
+ const fafPath = await (0, file_utils_js_1.findFafFile)(projectPath);
44
+ if (fafPath) {
45
+ try {
46
+ const existingContent = await fs_1.promises.readFile(fafPath, 'utf-8');
47
+ const existingFaf = (0, yaml_js_1.parse)(existingContent);
48
+ // Merge: spread existing + overlay imported fields
49
+ const merged = {
50
+ ...existingFaf,
51
+ project: {
52
+ ...(existingFaf.project || {}),
53
+ rules: [
54
+ ...(existingFaf.project?.rules || []),
55
+ ...result.faf.project.rules,
56
+ ],
57
+ guidelines: [
58
+ ...(existingFaf.project?.guidelines || []),
59
+ ...result.faf.project.guidelines,
60
+ ],
61
+ codingStyle: [
62
+ ...(existingFaf.project?.codingStyle || []),
63
+ ...result.faf.project.codingStyle,
64
+ ],
65
+ },
66
+ };
67
+ const yamlContent = (0, yaml_js_1.stringify)(merged);
68
+ await fs_1.promises.writeFile(fafPath, yamlContent);
69
+ return {
70
+ success: true,
71
+ action: 'import',
72
+ message: `Merged AGENTS.md into existing .faf (${result.sectionsFound.length} sections)`,
73
+ data: { sectionsFound: result.sectionsFound, merged: true },
74
+ warnings: result.warnings,
75
+ };
76
+ }
77
+ catch {
78
+ // Fall through to create new
79
+ }
80
+ }
81
+ }
82
+ return {
83
+ success: true,
84
+ action: 'import',
85
+ message: `Imported AGENTS.md (${result.sectionsFound.length} sections found)`,
86
+ data: { faf: result.faf, sectionsFound: result.sectionsFound },
87
+ warnings: result.warnings,
88
+ };
89
+ }
90
+ /**
91
+ * Export project.faf to AGENTS.md
92
+ */
93
+ async function agentsExportCommand(projectPath, options = {}) {
94
+ // Check for existing .faf
95
+ const fafPath = await (0, file_utils_js_1.findFafFile)(projectPath);
96
+ if (!fafPath) {
97
+ return {
98
+ success: false,
99
+ action: 'export',
100
+ message: 'No .faf file found. Run faf init first.',
101
+ };
102
+ }
103
+ // Check if AGENTS.md already exists
104
+ const outputPath = path_1.default.join(projectPath, 'AGENTS.md');
105
+ if (!options.force) {
106
+ try {
107
+ await fs_1.promises.access(outputPath);
108
+ return {
109
+ success: false,
110
+ action: 'export',
111
+ message: 'AGENTS.md already exists. Use force: true to overwrite.',
112
+ };
113
+ }
114
+ catch {
115
+ // File doesn't exist, proceed
116
+ }
117
+ }
118
+ // Read and parse .faf
119
+ const fafContent = await fs_1.promises.readFile(fafPath, 'utf-8');
120
+ const fafData = (0, yaml_js_1.parse)(fafContent);
121
+ // Export
122
+ const result = await (0, agents_parser_js_1.agentsExport)(fafData, outputPath);
123
+ return {
124
+ success: result.success,
125
+ action: 'export',
126
+ message: result.success
127
+ ? `Exported project.faf to AGENTS.md`
128
+ : 'Export failed',
129
+ data: { filePath: result.filePath },
130
+ warnings: result.warnings,
131
+ };
132
+ }
133
+ /**
134
+ * Sync AGENTS.md <-> project.faf (FAF is source of truth by default)
135
+ */
136
+ async function agentsSyncCommand(projectPath) {
137
+ // FAF is always source of truth in MCP context
138
+ return await agentsExportCommand(projectPath, { force: true });
139
+ }
140
+ //# sourceMappingURL=agents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../../src/faf-core/commands/agents.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;AAuBH,kDA4EC;AAKD,kDA6CC;AAKD,8CAKC;AA7JD,gDAAwB;AACxB,2BAAoC;AACpC,0DAAqD;AACrD,iDAAqF;AACrF,kEAIqC;AAUrC;;GAEG;AACI,KAAK,UAAU,mBAAmB,CACvC,WAAmB,EACnB,UAA+B,EAAE;IAEjC,MAAM,UAAU,GAAG,MAAM,IAAA,iCAAc,EAAC,WAAW,CAAC,CAAC;IAErD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,yCAAyC;SACnD,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,IAAA,+BAAY,EAAC,UAAU,CAAC,CAAC;IAE9C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YACnC,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC1B,CAAC;IACJ,CAAC;IAED,8CAA8C;IAC9C,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,OAAO,GAAG,MAAM,IAAA,2BAAW,EAAC,WAAW,CAAC,CAAC;QAC/C,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC;gBACH,MAAM,eAAe,GAAG,MAAM,a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M,EAAE,QAAQ;QAChB,OAAO,EAAE,MAAM,CAAC,OAAO;YACrB,CAAC,CAAC,mCAAmC;YACrC,CAAC,CAAC,eAAe;QACnB,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;QACnC,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,iBAAiB,CACrC,WAAmB;IAEnB,+CAA+C;IAC/C,OAAO,MAAM,mBAAmB,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACjE,CAAC"}
@@ -1,13 +1,17 @@
1
1
  /**
2
2
  * 🔗 Bi-Sync Engine - Mk3 Bundled Edition
3
3
  * Revolutionary project.faf ↔ CLAUDE.md Synchronization
4
+ * v4.5.0: Added agents/cursor/gemini/all flags for multi-format sync
4
5
  */
5
6
  export interface BiSyncOptions {
6
7
  auto?: boolean;
7
8
  watch?: boolean;
8
9
  force?: boolean;
9
10
  json?: boolean;
10
- target?: 'auto' | '.clinerules' | '.cursorrules' | '.windsurfrules' | 'CLAUDE.md' | 'all';
11
+ agents?: boolean;
12
+ cursor?: boolean;
13
+ gemini?: boolean;
14
+ all?: boolean;
11
15
  }
12
16
  export interface BiSyncResult {
13
17
  success: boolean;
@@ -18,10 +22,10 @@ export interface BiSyncResult {
18
22
  message: string;
19
23
  }
20
24
  /**
21
- * 🔄 Convert project.faf YAML content to platform-specific format
25
+ * 🔄 Convert project.faf YAML content to CLAUDE.md Markdown format
22
26
  */
23
- export declare function fafToPlatformFormat(fafContent: string, targetPlatform: string): string;
27
+ export declare function fafToClaudeMd(fafContent: string): string;
24
28
  /**
25
- * 🔗 Main Bi-Sync function - Platform-Aware
29
+ * 🔗 Main Bi-Sync function
26
30
  */
27
- export declare function syncBiDirectional(projectPath?: string, options?: BiSyncOptions): Promise<BiSyncResult>;
31
+ export declare function syncBiDirectional(projectPath?: string, _options?: BiSyncOptions): Promise<BiSyncResult>;