faf-mcp 3.0.0 → 3.0.2

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 (62) hide show
  1. package/CHANGELOG.md +37 -2
  2. package/CLAUDE.md +6 -2
  3. package/README.md +48 -28
  4. package/dist/src/cli.js +2 -1
  5. package/dist/src/cli.js.map +1 -1
  6. package/dist/src/faf-core/commands/agents.d.ts +2 -2
  7. package/dist/src/faf-core/commands/agents.js +21 -7
  8. package/dist/src/faf-core/commands/agents.js.map +1 -1
  9. package/dist/src/faf-core/commands/claude.d.ts +30 -0
  10. package/dist/src/faf-core/commands/{bi-sync.js → claude.js} +19 -15
  11. package/dist/src/faf-core/commands/claude.js.map +1 -0
  12. package/dist/src/faf-core/commands/conductor.d.ts +1 -1
  13. package/dist/src/faf-core/commands/conductor.js +36 -11
  14. package/dist/src/faf-core/commands/conductor.js.map +1 -1
  15. package/dist/src/faf-core/commands/cursor.d.ts +2 -2
  16. package/dist/src/faf-core/commands/cursor.js +21 -7
  17. package/dist/src/faf-core/commands/cursor.js.map +1 -1
  18. package/dist/src/faf-core/commands/gemini.d.ts +2 -2
  19. package/dist/src/faf-core/commands/gemini.js +21 -7
  20. package/dist/src/faf-core/commands/gemini.js.map +1 -1
  21. package/dist/src/faf-core/commands/git-context.d.ts +13 -4
  22. package/dist/src/faf-core/commands/git-context.js +30 -8
  23. package/dist/src/faf-core/commands/git-context.js.map +1 -1
  24. package/dist/src/faf-core/commands/sync.d.ts +8 -0
  25. package/dist/src/faf-core/commands/sync.js +20 -23
  26. package/dist/src/faf-core/commands/sync.js.map +1 -1
  27. package/dist/src/faf-core/fix-once/yaml.js +12 -13
  28. package/dist/src/faf-core/fix-once/yaml.js.map +1 -1
  29. package/dist/src/faf-core/parsers/agents-parser.d.ts +4 -3
  30. package/dist/src/faf-core/parsers/agents-parser.js +4 -3
  31. package/dist/src/faf-core/parsers/agents-parser.js.map +1 -1
  32. package/dist/src/faf-core/parsers/conductor-parser.d.ts +1 -1
  33. package/dist/src/faf-core/parsers/conductor-parser.js +1 -1
  34. package/dist/src/faf-core/parsers/cursorrules-parser.d.ts +4 -3
  35. package/dist/src/faf-core/parsers/cursorrules-parser.js +4 -3
  36. package/dist/src/faf-core/parsers/cursorrules-parser.js.map +1 -1
  37. package/dist/src/faf-core/parsers/faf-git-generator.d.ts +1 -2
  38. package/dist/src/faf-core/parsers/faf-git-generator.js +19 -39
  39. package/dist/src/faf-core/parsers/faf-git-generator.js.map +1 -1
  40. package/dist/src/faf-core/parsers/gemini-parser.d.ts +4 -3
  41. package/dist/src/faf-core/parsers/gemini-parser.js +4 -3
  42. package/dist/src/faf-core/parsers/gemini-parser.js.map +1 -1
  43. package/dist/src/faf-core/parsers/github-extractor.d.ts +1 -1
  44. package/dist/src/faf-core/parsers/github-extractor.js +1 -1
  45. package/dist/src/faf-core/parsers/slot-counter.d.ts +1 -1
  46. package/dist/src/faf-core/parsers/slot-counter.js +1 -1
  47. package/dist/src/handlers/engine-adapter.js +10 -7
  48. package/dist/src/handlers/engine-adapter.js.map +1 -1
  49. package/dist/src/handlers/tools.d.ts +2 -2
  50. package/dist/src/handlers/tools.js +191 -206
  51. package/dist/src/handlers/tools.js.map +1 -1
  52. package/dist/src/server.js +1 -1
  53. package/dist/src/server.js.map +1 -1
  54. package/dist/src/utils/faf-cli-bridge.d.ts +12 -8
  55. package/dist/src/utils/faf-cli-bridge.js +12 -8
  56. package/dist/src/utils/faf-cli-bridge.js.map +1 -1
  57. package/package.json +5 -5
  58. package/project.faf +5 -5
  59. package/scripts/sync-version.js +2 -1
  60. package/skills/faf-ide/SKILL.md +5 -5
  61. package/dist/src/faf-core/commands/bi-sync.d.ts +0 -29
  62. package/dist/src/faf-core/commands/bi-sync.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
- <!-- faf: faf-mcp | TypeScript | mcp-server | FAF MCP IDE Edition — persistent project context for Cursor, Windsurf, Cline, VS Code -->
2
- <!-- faf: doc=changelog | latest=v3.0.0 | canonical=project.faf | family=FAF -->
1
+ <!-- faf: faf-mcp | TypeScript | mcp | The Interop MCP for Context — the Cursor / IDE Edition. Persistent context for Cursor, VS Code, and every MCP-compatible IDE. IANA-registered application/vnd.faf+yaml. Start with "Use FAF". -->
2
+ <!-- faf: doc=changelog | latest=v3.0.2 | canonical=project.faf | family=FAF -->
3
3
 
4
4
  # Changelog
5
5
 
@@ -8,6 +8,41 @@ All notable changes to faf-mcp will be documented in this file.
8
8
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
9
9
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
10
10
 
11
+ ## [3.0.2] - 2026-09-10 — The Compose Edition
12
+
13
+ **Tools that say what they do: `faf_git` scores with faf-cli and asks before overwriting, `faf_sync` previews each change, and imports say when nothing was written.**
14
+
15
+ ### Fixed
16
+ - **`faf_git` has one scorer.** It reported its own slot count (100% Trophy on files faf-cli scores 5–14%); it now reports faf-cli's score of the bytes it authored. It writes the .faf slots faf-cli scores (`project.goal`, `project.main_language`, `human_context`), so the score reflects what it found, and it refuses to replace an existing `project.faf` unless you pass `force: true`.
17
+ - **`faf_sync` previews each change.** The dry run lists every field it would update, once, with the value `apply: true` will write. It used to give a count and suggest a CLI flag the tool does not take.
18
+ - **Imports say when nothing was written.** `faf_agents`, `faf_cursor`, `faf_gemini` and `faf_conductor` import without `merge` now say so; `merge: true` with no `project.faf` fails with a clear message. `faf_conductor` export fills its sections from the .faf fields.
19
+ - **Errors speak MCP.** YAML parse errors no longer carry terminal colour codes or a CLI command, and the `faf_score` headline no longer carries stray control bytes.
20
+ - **Descriptions and annotations match the handlers.** `faf_dna` is marked as writing; `faf_write`, `faf_conductor` and `faf_git` as able to overwrite; `faf_check` protect is described as advisory; `faf_trust`, `faf_doctor`, `faf_formats`, `faf_clear`, `faf_context`, `faf_auto` and `faf_quick` say what they do. `faf_debug` checks write access without writing a file, `faf_guide` teaches the MCP tools, and `faf_quick` writes a format version and no default language.
21
+ - Repo: `ABOUT.md` (a false "Anthropic stewardship" line and a monorepo layout that no longer exists) and `demo-server.js` (an HTTP demo with retired tools) are archived under git tags and removed; `SECURITY.md` supports 3.x; `CONTRIBUTING.md` lists Node 22 and Bun.
22
+ - A version bump now re-stamps the project's release line and re-renders CLAUDE.md and the Copilot file from it.
23
+
24
+ ## [3.0.1] - 2026-09-10 — The Compose Edition
25
+
26
+ **Names that match the code: `faf_bi_sync` is now `faf_claude`, `faf_init` writes what `faf init` writes, and the listings lead with .FAF Context.**
27
+
28
+ ### Changed
29
+ - **`faf_bi_sync` is now `faf_claude`.** The tool only ever wrote CLAUDE.md from `project.faf`, one direction; nothing read CLAUDE.md back. The old name, its "Bi-sync now active!" message and its header claimed a two-way sync it never did. `faf_claude` sits beside `faf_agents`, `faf_cursor` and `faf_gemini`, keeps the `agents` / `cursor` / `gemini` / `all` flags, and stays in the Core tier. Tool count unchanged: 29, 15 by default.
30
+ - `faf_bi_sync` still answers as an unlisted alias, so existing prompts and configs keep working. Its removal will be announced here first.
31
+ - `faf_agents`, `faf_cursor` and `faf_gemini` no longer call their `sync` action "bidirectional": it re-writes the file from `project.faf` (export with force). `import` reads the file; `merge: true` writes it into `project.faf`.
32
+ - README "Eternal Sync" tells the direction truthfully: CLAUDE.md is written from `project.faf`; the other three formats can also import.
33
+
34
+ ### Fixed
35
+ - **`faf_init` writes what `faf init` writes.** It runs faf-cli's own init steps on the folder, so the file is valid and scored from what the folder holds, and it reports that starting score. Before, it wrote a legacy template that scored 0% on any folder, failed `faf_trust` and crashed `faf_go`. The new project also becomes the current one, so the next steps it suggests act on it. Path handling is unchanged.
36
+ - **The docs page no longer strikes through its own keyword.** The hero line rendered "Context" in red strikethrough, a style left over from an older slogan.
37
+ - README: the all-formats example is the MCP call that works (`faf bi-sync --all` is rejected by faf-cli 7.12); 25 test suites, not 9; the Trophy badge and tier table use ✪.
38
+ - The server status banner reports 29 tools, 15 by default, and reads the version from the package instead of a hardcoded "33+".
39
+ - Tool output: headers say FAF, not "Claude FAF"; the readiness target is 100%, not 99%; tier lines use ✪ ★ ◆ ◇ ●; tools say they author and rewrite files.
40
+ - `faf_git` writes `faf_version: "3.0"` and the package version into the files it authors (it wrote 2.5.0 and 4.5.0), with the spec URL at faf.one.
41
+ - Listings lead with the product name: the npm, MCP Registry, Glama and Smithery descriptions say **.FAF Context**, and `project.faf` marks PulseMCP and Glama live.
42
+ - The registry receipt in `server.json` is refreshed, and the `.faf-dna` birth certificate is re-grounded at 100% with its 2025 birth record kept.
43
+ - Docs: the two essays keep their dated figures with broken links, paths and the missing image fixed; the style source mirrors the live page.
44
+ - Source comments that labelled faf-cli 7.12 code as v4.5.0, faf-cli 7.11.0 or Node 18 now say what the code does; ported parsers keep their provenance line.
45
+
11
46
  ## [3.0.0] - 2026-09-09 — The Compose Edition
12
47
 
13
48
  **Compose, don't port: faf-mcp 3.0 runs on faf-cli 7.12 in-process — one scorer, one set of renderers, one injector — and every number, file and claim this package makes is true. Local stdio, 29 tools, Node 22+.**
package/CLAUDE.md CHANGED
@@ -25,10 +25,14 @@ The Interop MCP for Context — the Cursor / IDE Edition. Persistent context for
25
25
  - **What:** The Cursor / IDE Edition — persistent context for Cursor, VS Code, and every MCP-compatible IDE — 29 MCP tools (15 essential shown by default), interop with AGENTS.md, .cursorrules, GEMINI.md
26
26
  - **Why:** Eliminate the 20-minute AI context tax — give AI instant project understanding in 30 seconds
27
27
  - **Where:** npm · MCP Registry · any MCP-compatible IDE — people get it how they wish
28
- - **When:** Production/Stable — v3.0.0 The Compose Edition, WJTTC certified
28
+ - **When:** Production/Stable — v3.0.2 The Compose Edition, WJTTC certified
29
29
  - **How:** npx faf-mcp or npm install -g faf-mcp, then add to your MCP config
30
30
 
31
31
  ---
32
32
 
33
- *STATUS: BI-SYNC ACTIVE — 2026-09-10T03:21:14.311Z*
33
+ *STATUS: BI-SYNC ACTIVE — 2026-09-10T20:10:15.531Z*
34
34
  <!-- faf:end -->
35
+
36
+ ## Working here
37
+
38
+ Build, test, layout and the load-bearing conventions live in AGENTS.md under "Working in this repo". Refresh the managed block above with `faf sync` (CLI) or the `faf_claude` tool (MCP); both keep this section.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- faf: faf-mcp | TypeScript | mcp-server | FAF MCP IDE Edition — persistent project context for Cursor, Windsurf, Cline, VS Code -->
1
+ <!-- faf: faf-mcp | TypeScript | mcp | The Interop MCP for Context — the Cursor / IDE Edition. Persistent context for Cursor, VS Code, and every MCP-compatible IDE. IANA-registered application/vnd.faf+yaml. Start with "Use FAF". -->
2
2
  <!-- faf: doc=readme | canonical=project.faf | score=100 | family=FAF -->
3
3
 
4
4
  <div style="display: flex; align-items: center; gap: 12px;">
@@ -10,7 +10,7 @@
10
10
  </div>
11
11
 
12
12
  [![npm](https://img.shields.io/npm/v/faf-mcp?color=008B8B)](https://www.npmjs.com/package/faf-mcp)[![downloads](https://img.shields.io/npm/dm/faf-mcp?color=008B8B&label=downloads)](https://www.npmjs.com/package/faf-mcp)
13
- [![FAF Trophy 100%](https://img.shields.io/badge/FAF-%F0%9F%8F%86%20100%25-000000?labelColor=FF6B35)](https://faf.one)
13
+ [![FAF Trophy 100%](https://img.shields.io/badge/FAF-%E2%9C%AA%20100%25-000000?labelColor=FF6B35)](https://faf.one)
14
14
  [![IANA: vnd.faf+yaml](https://img.shields.io/badge/IANA-vnd.faf%2Byaml-008B8B)](https://www.iana.org/assignments/media-types/application/vnd.faf+yaml)
15
15
  [![DOI: Context paper](https://img.shields.io/badge/DOI-Context%20paper-FF6B35)](https://doi.org/10.5281/zenodo.18251362)
16
16
  [![DOI: Agents paper](https://img.shields.io/badge/DOI-Agents%20paper-FF6B35)](https://doi.org/10.5281/zenodo.21951641)
@@ -27,12 +27,23 @@
27
27
 
28
28
  ---
29
29
 
30
- ## What's New in 3.0.0 — The Compose Edition
30
+ ## What's New in 3.0.2 — The Compose Edition
31
+
32
+ **Tools that say what they do: `faf_git` scores with faf-cli and asks before overwriting, `faf_sync` previews each change, and imports say when nothing was written.**
33
+
34
+ - **`faf_git` has one scorer.** It reports faf-cli's score of the file it authored, writes the slots faf-cli scores, and asks before replacing an existing `project.faf`.
35
+ - **`faf_sync` previews each change.** The dry run lists every field it would update and names `apply: true`.
36
+ - **Imports say when nothing was written,** and `merge: true` with no `project.faf` fails clearly.
37
+ - **Descriptions, annotations and errors match the code.** No CLI commands or terminal colour codes in tool output.
38
+
39
+ 3.0.1 renamed `faf_bi_sync` to `faf_claude` and made `faf_init` write what `faf init` writes. The full history is in the [CHANGELOG](CHANGELOG.md).
40
+
41
+ ## The Compose Edition (3.0)
31
42
 
32
43
  **Compose, don't port: faf-mcp 3.0 runs on faf-cli 7.12 in-process — one scorer, one set of renderers, one injector — and every number, file and claim this package makes is true. Local stdio, 29 tools, Node 22+.**
33
44
 
34
45
  - **Composes faf-cli 7.12.** AGENTS.md, GEMINI.md, .cursorrules and CLAUDE.md are written by faf-cli's own renderers, repo enrichment and block injector — the same bytes `faf export` and `faf sync` write. `faf_auto` runs faf-cli's own update chain. The hand-ported renderers, the pre-v3 CLAUDE.md template and the local injector are gone.
35
- - **One score function.** `faf_auto`, `faf_go`, `faf_dna`, `faf_doctor` and `faf_bi_sync` all report faf-cli's scorer on the bytes on disk — no local heuristics, no frozen birth score, no "0%".
46
+ - **One score function.** `faf_auto`, `faf_go`, `faf_dna`, `faf_doctor` and `faf_claude` all report faf-cli's scorer on the bytes on disk — no local heuristics, no frozen birth score, no "0%".
36
47
  - **Nothing shells out.** The `which faf` detector, the exec fallback and the "install faf-cli first" banner are gone; nothing under `src/` imports `child_process`. A machine with an unrelated `faf` on PATH is no longer a problem.
37
48
  - **Every tool contract matches its handler.** Descriptions say what the tools do, schemas declare only flags that are read, failures carry their reason.
38
49
  - **The Mk3 engine is deleted.** 44 unreachable modules, ~15,900 lines; the tarball halves. `prebuild` clears `dist/` so nothing deleted ever ships again.
@@ -105,33 +116,34 @@ faf-mcp runs locally over stdio. Point your IDE at one of these commands.
105
116
  | `faf_conductor` | Conductor | Import/export directory structure |
106
117
  | `faf_git` | GitHub | Author .faf from any repo URL |
107
118
 
108
- ```bash
109
- # Sync to all formats at once
110
- faf bi-sync --all
119
+ ```text
120
+ # MCP tool calls — ask your IDE's AI
121
+ # Write all four formats from project.faf
122
+ faf_claude { all: true }
111
123
 
112
124
  # Author .faf from any GitHub repo
113
125
  faf_git { url: "https://github.com/facebook/react" }
114
126
  ```
115
127
 
116
- **Core tier:** 15 essential tools shown by default; set `FAF_TOOLS=all` for the full **29** (every tool stays callable by name either way) · **9 test suites** · **7 bundled parsers**
128
+ **Core tier:** 15 essential tools shown by default; set `FAF_TOOLS=all` for the full **29** (every tool stays callable by name either way) · **25 test suites** · **7 bundled parsers**
117
129
 
118
130
  ---
119
131
 
120
- ## Eternal Bi-Sync
132
+ ## Eternal Sync
121
133
 
122
- Your `.faf` file and your platform context files stay synchronized in milliseconds.
134
+ `project.faf` is the source. faf-mcp writes every tool's context file from it in milliseconds.
123
135
 
124
136
  ```
125
- project.faf ←── 8ms ──→ .cursorrules / AGENTS.md / CLAUDE.md / GEMINI.md
137
+ project.faf ──── 8ms ───→ CLAUDE.md / AGENTS.md / .cursorrules / GEMINI.md
126
138
  Single source of truth
127
139
  ```
128
140
 
129
- - Update either side → both stay aligned
130
- - `--all` flag syncs to all four formats at once
131
- - Zero manual maintenance
141
+ - `faf_claude { all: true }` writes all four formats at once
142
+ - `faf_agents`, `faf_cursor` and `faf_gemini` can also import an existing file: `merge: true` merges it into `project.faf`
143
+ - Content outside the faf-managed block is preserved, byte for byte
132
144
  - Works across teams, branches, sessions
133
145
 
134
- AI assistants forget. They drift. Every new session, AI starts guessing again. Bi-sync means **context never goes stale**.
146
+ AI assistants forget. They drift. Every new session, AI starts guessing again. One source means **context never goes stale**.
135
147
 
136
148
  ---
137
149
 
@@ -139,7 +151,7 @@ AI assistants forget. They drift. Every new session, AI starts guessing again. B
139
151
 
140
152
  | Tier | Score | Status |
141
153
  |------|-------|--------|
142
- | 🏆 **TROPHY** | 100% | AI never has to guess |
154
+ | ✪ **TROPHY** | 100% | AI never has to guess |
143
155
  | ★ **GOLD** | 99%+ | 1 slot from Trophy |
144
156
  | ◆ **SILVER** | 95%+ | Close — keep going |
145
157
  | ◇ **BRONZE** | 85%+ | Interim — keep going |
@@ -169,20 +181,28 @@ Works on all platforms — stops web search, forces tool usage.
169
181
 
170
182
  ## 29 MCP Tools
171
183
 
184
+ The 15 Core tools, shown by default:
185
+
172
186
  | Tool | Purpose |
173
187
  |------|---------|
174
- | `faf_init` | Initialize project.faf |
175
- | `faf_score` | Check AI-readiness (0-100%) |
176
- | `faf_sync` | Reconcile project.faf with package.json / git (dry-run; `apply:true` writes) |
177
- | `faf_bi_sync` | Write CLAUDE.md (+ AGENTS.md, .cursorrules, GEMINI.md) from project.faf |
178
- | `faf_read` | Parse and validate FAF files |
179
- | `faf_write` | Create/update FAF with validation |
188
+ | `faf_init` | Create a new `project.faf` (use `faf_auto` to enhance an existing one) |
189
+ | `faf_auto` | One-call setup: init or merge, stack detection, CLAUDE.md, score |
190
+ | `faf_go` | Guided interview that fills the missing human-context and goal fields toward 100% |
191
+ | `faf_score` | AI-readiness score (0-100%) and tier; `details:true` adds a slot-by-slot breakdown |
192
+ | `faf_doctor` | Diagnose a low score: missing files, slot counts, config issues, each with a fix |
193
+ | `faf_check` | Rate each `human_context` field empty / generic / good |
194
+ | `faf_trust` | Validate the required fields and `about.*` block with faf-cli's validator |
195
+ | `faf_sync` | Reconcile `project.faf` with package.json (dry-run; `apply:true` writes) |
196
+ | `faf_context` | Set or show the active project path |
197
+ | `faf_about` | What the IANA-registered `.faf` format is, in plain language |
180
198
  | **Interop Tools** | |
181
- | `faf_agents` | Import/export/sync AGENTS.md |
182
- | `faf_cursor` | Import/export/sync .cursorrules |
183
- | `faf_gemini` | Import/export/sync GEMINI.md |
184
- | `faf_conductor` | Import/export directory structure |
185
- | `faf_git` | Author .faf from GitHub repo URL |
199
+ | `faf_claude` | Write CLAUDE.md from `project.faf` (`all:true` also writes AGENTS.md, .cursorrules, GEMINI.md) |
200
+ | `faf_agents` | Import AGENTS.md into `project.faf`, or write it from `project.faf` |
201
+ | `faf_cursor` | Import .cursorrules into `project.faf`, or write it from `project.faf` |
202
+ | `faf_gemini` | Import GEMINI.md into `project.faf`, or write it from `project.faf` |
203
+ | `faf_git` | Author a `project.faf` from a public GitHub repo URL |
204
+
205
+ **+14 more with `FAF_TOOLS=all`:** `faf_status` · `faf_what` · `faf_guide` · `faf_debug` · `faf_clear` · `faf_list` · `faf_read` (read a file within the allowed roots: cwd, the OS temp dir, or `FAF_ALLOWED_ROOTS`) · `faf_write` (write a file within the same roots) · `faf_readme` · `faf_human_add` · `faf_quick` · `faf_formats` · `faf_dna` · `faf_conductor`
186
206
 
187
207
  **Built on faf-cli.** Every tool composes the bundled [faf-cli](https://www.npmjs.com/package/faf-cli) in-process — the same scorer, the same renderers, the same block injector the CLI uses. Nothing shells out to a `faf` on your PATH.
188
208
 
@@ -240,6 +260,6 @@ MIT License — Free and open source
240
260
 
241
261
  ---
242
262
 
243
- **Zero drift. Eternal sync. AI optimized.** 🏆
263
+ **Zero drift. Eternal sync. AI optimized.** ✪
244
264
 
245
265
  *"It's so logical if it didn't exist, AI would have built it itself" — Claude*
package/dist/src/cli.js CHANGED
@@ -10,7 +10,8 @@ async function main() {
10
10
  cors: true
11
11
  });
12
12
  await server.start();
13
- console.log('FAF MCP Server started in stdio mode');
13
+ // stderr: stdout is the JSON-RPC stream in stdio mode.
14
+ console.error('FAF MCP Server started in stdio mode');
14
15
  }
15
16
  main().catch((error) => {
16
17
  console.error('Failed to start MCP server:', error);
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";;;AAEA,qCAAwC;AAExC,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAI,qBAAY,CAAC;QAC9B,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;IAEH,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IAErB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;AACtD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;IACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";;;AAEA,qCAAwC;AAExC,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAI,qBAAY,CAAC;QAC9B,SAAS,EAAE,OAAO;QAClB,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;IAEH,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IAErB,uDAAuD;IACvD,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;AACxD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;IACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Agents Command - v4.5.0 Interop Edition
2
+ * Agents Command — Interop (faf-mcp 2.0.0; ported from faf-cli 4.5.0 via claude-faf-mcp 4.5.0)
3
3
  *
4
4
  * Import/Export/Sync between AGENTS.md and project.faf
5
- * Bundled command — no CLI dependency required.
5
+ * Bundled command — no shell-out; export composes faf-cli in-process.
6
6
  */
7
7
  export interface AgentsCommandResult {
8
8
  success: boolean;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  /**
3
- * Agents Command - v4.5.0 Interop Edition
3
+ * Agents Command — Interop (faf-mcp 2.0.0; ported from faf-cli 4.5.0 via claude-faf-mcp 4.5.0)
4
4
  *
5
5
  * Import/Export/Sync between AGENTS.md and project.faf
6
- * Bundled command — no CLI dependency required.
6
+ * Bundled command — no shell-out; export composes faf-cli in-process.
7
7
  */
8
8
  var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -74,15 +74,29 @@ async function agentsImportCommand(projectPath, options = {}) {
74
74
  warnings: result.warnings,
75
75
  };
76
76
  }
77
- catch {
78
- // Fall through to create new
77
+ catch (error) {
78
+ return {
79
+ success: false,
80
+ action: 'import',
81
+ message: `Could not merge AGENTS.md into project.faf: ${error instanceof Error ? error.message : String(error)}`,
82
+ warnings: result.warnings,
83
+ };
79
84
  }
80
85
  }
86
+ // merge was asked for and there is nothing to merge into: say so rather
87
+ // than report a no-op as an import.
88
+ return {
89
+ success: false,
90
+ action: 'import',
91
+ message: 'No project.faf to merge into — run faf_init first',
92
+ warnings: result.warnings,
93
+ };
81
94
  }
95
+ // Without merge nothing is written: say exactly that.
82
96
  return {
83
97
  success: true,
84
98
  action: 'import',
85
- message: `Imported AGENTS.md (${result.sectionsFound.length} sections found)`,
99
+ message: `Parsed AGENTS.md (${result.sectionsFound.length} sections) — nothing written; pass merge: true to write it into project.faf`,
86
100
  data: { faf: result.faf, sectionsFound: result.sectionsFound },
87
101
  warnings: result.warnings,
88
102
  };
@@ -97,7 +111,7 @@ async function agentsExportCommand(projectPath, options = {}) {
97
111
  return {
98
112
  success: false,
99
113
  action: 'export',
100
- message: 'No .faf file found. Run faf init first.',
114
+ message: 'No .faf file found. Run faf_init first.',
101
115
  };
102
116
  }
103
117
  // Check if AGENTS.md already exists
@@ -108,7 +122,7 @@ async function agentsExportCommand(projectPath, options = {}) {
108
122
  return {
109
123
  success: false,
110
124
  action: 'export',
111
- message: 'AGENTS.md already exists. Use force: true to overwrite.',
125
+ message: 'AGENTS.md already exists. Pass force: true to update its faf-managed block (content outside it is kept).',
112
126
  };
113
127
  }
114
128
  catch {
@@ -1 +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,aAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBAC5D,MAAM,W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YACH,MAAM,aAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5B,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,QAAQ;gBAChB,OAAO,EAAE,0GAA0G;aACpH,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,8BAA8B;QAChC,CAAC;IACH,CAAC;IAED,sBAAsB;IACtB,MAAM,UAAU,GAAG,MAAM,aAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,IAAA,eAAS,EAAC,UAAU,CAAC,CAAC;IAEtC,SAAS;IACT,MAAM,MAAM,GAAG,MAAM,IAAA,+BAAY,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAEvD,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,MAAM,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"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Claude Command — writes CLAUDE.md from project.faf, one direction.
3
+ *
4
+ * CLAUDE.md is faf-cli's render of project.faf (the same bytes `faf sync`
5
+ * pushes), injected with faf-cli's injector, so content outside the managed
6
+ * block survives. With agents / cursor / gemini / all it also writes
7
+ * AGENTS.md, .cursorrules and GEMINI.md. Nothing here reads CLAUDE.md back
8
+ * into project.faf. Backs the `faf_claude` tool, named `faf_bi_sync` before
9
+ * 3.0.1; the old name claimed a two-way sync this code never did.
10
+ */
11
+ export interface ClaudeExportOptions {
12
+ json?: boolean;
13
+ agents?: boolean;
14
+ cursor?: boolean;
15
+ gemini?: boolean;
16
+ all?: boolean;
17
+ }
18
+ export interface ClaudeExportResult {
19
+ success: boolean;
20
+ direction: 'faf-to-claude' | 'none';
21
+ filesChanged: string[];
22
+ duration: number;
23
+ message: string;
24
+ }
25
+ /**
26
+
27
+ /**
28
+ * Write CLAUDE.md (and any requested IDE formats) from project.faf.
29
+ */
30
+ export declare function claudeExportCommand(projectPath?: string, _options?: ClaudeExportOptions): Promise<ClaudeExportResult>;
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
2
  /**
3
- * 🔗 Bi-Sync Engine - Mk3 Bundled Edition
4
- * Revolutionary project.faf ↔ CLAUDE.md Synchronization
5
- * v4.5.0: Added agents/cursor/gemini/all flags for multi-format sync
3
+ * Claude Command — writes CLAUDE.md from project.faf, one direction.
4
+ *
5
+ * CLAUDE.md is faf-cli's render of project.faf (the same bytes `faf sync`
6
+ * pushes), injected with faf-cli's injector, so content outside the managed
7
+ * block survives. With agents / cursor / gemini / all it also writes
8
+ * AGENTS.md, .cursorrules and GEMINI.md. Nothing here reads CLAUDE.md back
9
+ * into project.faf. Backs the `faf_claude` tool, named `faf_bi_sync` before
10
+ * 3.0.1; the old name claimed a two-way sync this code never did.
6
11
  */
7
12
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
13
  if (k2 === undefined) k2 = k;
@@ -38,7 +43,7 @@ var __importStar = (this && this.__importStar) || (function () {
38
43
  };
39
44
  })();
40
45
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.syncBiDirectional = syncBiDirectional;
46
+ exports.claudeExportCommand = claudeExportCommand;
42
47
  const yaml_1 = require("../fix-once/yaml");
43
48
  const path = __importStar(require("path"));
44
49
  const fs_1 = require("fs");
@@ -50,15 +55,14 @@ const faf_cli_bridge_js_1 = require("../../utils/faf-cli-bridge.js");
50
55
  /**
51
56
 
52
57
  /**
53
- * 🔗 Main Bi-Sync function
58
+ * Write CLAUDE.md (and any requested IDE formats) from project.faf.
54
59
  */
55
- async function syncBiDirectional(projectPath, _options = {}) {
60
+ async function claudeExportCommand(projectPath, _options = {}) {
56
61
  const startTime = Date.now();
57
62
  const result = {
58
63
  success: false,
59
64
  direction: 'none',
60
65
  filesChanged: [],
61
- conflicts: [],
62
66
  duration: 0,
63
67
  message: ''
64
68
  };
@@ -66,7 +70,7 @@ async function syncBiDirectional(projectPath, _options = {}) {
66
70
  // Find project.faf file
67
71
  const fafPath = projectPath ? path.join(projectPath, 'project.faf') : await (0, file_utils_1.findFafFile)();
68
72
  if (!fafPath || !await (0, file_utils_1.fileExists)(fafPath)) {
69
- result.message = 'No project.faf file found. Run faf init first.';
73
+ result.message = 'No project.faf file found. Run faf_init first.';
70
74
  result.duration = Date.now() - startTime;
71
75
  return result;
72
76
  }
@@ -95,7 +99,7 @@ async function syncBiDirectional(projectPath, _options = {}) {
95
99
  result.success = true;
96
100
  result.direction = 'faf-to-claude';
97
101
  result.filesChanged.push('CLAUDE.md');
98
- result.message = `CLAUDE.md created! Bi-sync now active! FAF Score: ${currentScore}`;
102
+ result.message = `CLAUDE.md written from project.faf. FAF Score: ${currentScore}`;
99
103
  }
100
104
  else {
101
105
  // CLAUDE.md is faf-cli's render of project.faf — the same bytes
@@ -105,9 +109,9 @@ async function syncBiDirectional(projectPath, _options = {}) {
105
109
  result.success = true;
106
110
  result.direction = 'faf-to-claude';
107
111
  result.filesChanged.push('CLAUDE.md');
108
- result.message = `Files synchronized! Perfect harmony achieved! FAF Score: ${currentScore}`;
112
+ result.message = `CLAUDE.md refreshed from project.faf. FAF Score: ${currentScore}`;
109
113
  }
110
- // v4.5.0: Chain additional format exports if requested
114
+ // Chain additional format exports if requested
111
115
  const doAgents = _options.agents || _options.all;
112
116
  const doCursor = _options.cursor || _options.all;
113
117
  const doGemini = _options.gemini || _options.all;
@@ -119,7 +123,7 @@ async function syncBiDirectional(projectPath, _options = {}) {
119
123
  }
120
124
  }
121
125
  catch {
122
- // Non-fatal — CLAUDE.md sync already succeeded
126
+ // Non-fatal — the CLAUDE.md write already succeeded
123
127
  }
124
128
  }
125
129
  if (doCursor) {
@@ -145,15 +149,15 @@ async function syncBiDirectional(projectPath, _options = {}) {
145
149
  }
146
150
  }
147
151
  if (result.filesChanged.length > 1) {
148
- result.message += ` | Also synced: ${result.filesChanged.filter(f => f !== 'CLAUDE.md').join(', ')}`;
152
+ result.message += ` | Also wrote: ${result.filesChanged.filter(f => f !== 'CLAUDE.md').join(', ')}`;
149
153
  }
150
154
  result.duration = Date.now() - startTime;
151
155
  return result;
152
156
  }
153
157
  catch (error) {
154
158
  result.duration = Date.now() - startTime;
155
- result.message = error instanceof Error ? error.message : 'Sync failed';
159
+ result.message = error instanceof Error ? error.message : 'CLAUDE.md write failed';
156
160
  return result;
157
161
  }
158
162
  }
159
- //# sourceMappingURL=bi-sync.js.map
163
+ //# sourceMappingURL=claude.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../../src/faf-core/commands/claude.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,kDAgHC;AA9ID,2CAAsD;AACtD,2CAA6B;AAC7B,2BAAoC;AACpC,oDAA8D;AAC9D,2CAAkD;AAClD,2CAAkD;AAClD,2CAAkD;AAClD,qEAAuD;AAkBvD;;;;GAIG;AACI,KAAK,UAAU,mBAAmB,CAAC,WAAoB,EAAE,WAAgC,EAAE;IAChG,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAuB;QACjC,OAAO,EAAE,KAAK;QACd,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,CAAC;QACX,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,IAAI,CAAC;QACH,wBAAwB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1
1
  /**
2
- * Conductor Command - v4.5.0 Interop Edition
2
+ * Conductor Command — Interop (faf-mcp 2.0.0; ported from faf-cli 4.5.0 via claude-faf-mcp 4.5.0)
3
3
  *
4
4
  * Import/Export between conductor/ directory and project.faf
5
5
  * Bundled command — no CLI dependency required.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Conductor Command - v4.5.0 Interop Edition
3
+ * Conductor Command — Interop (faf-mcp 2.0.0; ported from faf-cli 4.5.0 via claude-faf-mcp 4.5.0)
4
4
  *
5
5
  * Import/Export between conductor/ directory and project.faf
6
6
  * Bundled command — no CLI dependency required.
@@ -78,15 +78,29 @@ async function conductorImportCommand(projectPath, options = {}) {
78
78
  warnings: result.warnings,
79
79
  };
80
80
  }
81
- catch {
82
- // Fall through
81
+ catch (error) {
82
+ return {
83
+ success: false,
84
+ action: 'import',
85
+ message: `Could not merge conductor/ into project.faf: ${error instanceof Error ? error.message : String(error)}`,
86
+ warnings: result.warnings,
87
+ };
83
88
  }
84
89
  }
90
+ // merge was asked for and there is nothing to merge into: say so rather
91
+ // than report a no-op as an import.
92
+ return {
93
+ success: false,
94
+ action: 'import',
95
+ message: 'No project.faf to merge into — run faf_init first',
96
+ warnings: result.warnings,
97
+ };
85
98
  }
99
+ // Without merge nothing is written: say exactly that.
86
100
  return {
87
101
  success: true,
88
102
  action: 'import',
89
- message: `Imported conductor/ (${result.filesProcessed.length} files processed)`,
103
+ message: `Parsed conductor/ (${result.filesProcessed.length} files) — nothing written; pass merge: true to write it into project.faf`,
90
104
  data: { faf: result.faf, filesProcessed: result.filesProcessed },
91
105
  warnings: result.warnings,
92
106
  };
@@ -100,7 +114,7 @@ async function conductorExportCommand(projectPath, options = {}) {
100
114
  return {
101
115
  success: false,
102
116
  action: 'export',
103
- message: 'No .faf file found. Run faf init first.',
117
+ message: 'No .faf file found. Run faf_init first.',
104
118
  };
105
119
  }
106
120
  const outputPath = path_1.default.join(projectPath, 'conductor');
@@ -122,18 +136,29 @@ async function conductorExportCommand(projectPath, options = {}) {
122
136
  }
123
137
  const fafContent = await fs_1.promises.readFile(fafPath, 'utf-8');
124
138
  const fafData = (0, yaml_js_1.parse)(fafContent);
125
- // Build the conductor-compatible structure
139
+ // Build the conductor-compatible structure. Read the spec fields a
140
+ // project.faf actually carries (project.main_language / goal, stack.*);
141
+ // the list-shaped fields (stack.languages, project.goals, …) that a
142
+ // conductor merge writes stay as a fallback.
143
+ const specValues = (...values) => values.filter((v) => typeof v === 'string' && v !== '' && v !== 'slotignored');
144
+ const firstNonEmpty = (...lists) => {
145
+ for (const list of lists) {
146
+ if (Array.isArray(list) && list.length > 0)
147
+ return list;
148
+ }
149
+ return [];
150
+ };
126
151
  const conductorFaf = {
127
152
  project: {
128
153
  name: fafData.project?.name || 'Unknown',
129
154
  description: fafData.project?.description || fafData.project?.goal || '',
130
155
  type: fafData.project?.type || 'application',
131
- goals: fafData.project?.goals || [],
156
+ goals: firstNonEmpty(specValues(fafData.project?.goal), fafData.project?.goals),
132
157
  stack: {
133
- languages: fafData.stack?.languages || fafData.project?.stack?.languages || [],
134
- frameworks: fafData.stack?.frameworks || fafData.project?.stack?.frameworks || [],
135
- databases: fafData.stack?.databases || fafData.project?.stack?.databases || [],
136
- infrastructure: fafData.stack?.infrastructure || fafData.project?.stack?.infrastructure || [],
158
+ languages: firstNonEmpty(specValues(fafData.project?.main_language), fafData.stack?.languages, fafData.project?.stack?.languages),
159
+ frameworks: firstNonEmpty(specValues(fafData.stack?.frontend, fafData.stack?.backend), fafData.stack?.frameworks, fafData.project?.stack?.frameworks),
160
+ databases: firstNonEmpty(specValues(fafData.stack?.database), fafData.stack?.databases, fafData.project?.stack?.databases),
161
+ infrastructure: firstNonEmpty(specValues(fafData.stack?.hosting, fafData.stack?.cicd), fafData.stack?.infrastructure, fafData.project?.stack?.infrastructure),
137
162
  },
138
163
  rules: fafData.project?.rules || [],
139
164
  guidelines: fafData.project?.guidelines || [],
@@ -1 +1 @@
1
- {"version":3,"file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AO,EAAE,KAAK,IAAI,EAAE;YACnC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,UAAU,IAAI,EAAE;SAC9C;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACnC;KACF,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,IAAA,qCAAe,EAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAE/D,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,MAAM,CAAC,OAAO;YACrB,CAAC,CAAC,uCAAuC,MAAM,CAAC,cAAc,CAAC,MAAM,SAAS;YAC9E,CAAC,CAAC,eAAe;QACnB,IAAI,EAAE,EAAE,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE;QAC/C,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC"}
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Cursor Command - v4.5.0 Interop Edition
2
+ * Cursor Command — Interop (faf-mcp 2.0.0; ported from faf-cli 4.5.0 via claude-faf-mcp 4.5.0)
3
3
  *
4
4
  * Import/Export/Sync between .cursorrules and project.faf
5
- * Bundled command — no CLI dependency required.
5
+ * Bundled command — no shell-out; export composes faf-cli in-process.
6
6
  */
7
7
  export interface CursorCommandResult {
8
8
  success: boolean;