rust-faf-mcp 0.6.0 → 0.7.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 (2) hide show
  1. package/README.md +40 -27
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,9 +6,9 @@
6
6
 
7
7
  **Persistent Project Context for Rust MCP clients. Native. Fast. cargo install**
8
8
 
9
- **The AGENTS.md Edition (v0.6.0)** — `one.faf/rust-faf-mcp` · **rmcp 3.0.1** (MCP Tier 1 foundation) · **faf-rust-sdk 3.1** (the same always-33 kernel `faf-wasm-sdk` uses) · solid cargo-native Rust MCP for Rust devs
9
+ **The Table-of-8 Edition (v0.7.1)** — `one.faf/rust-faf-mcp` · **rmcp 3.0.1** (MCP Tier 1 foundation) · **faf-rust-sdk 3.1** (the same always-33 kernel `faf-wasm-sdk` uses) · solid cargo-native Rust MCP for Rust devs
10
10
 
11
- **v0.6.0** — adds `faf_agents`, a 10th tool: generates `AGENTS.md` from `project.faf`, non-destructively (preserves any hand-written content outside the faf-managed block). Ported line-for-line from `faf-cli`'s `generateAgentsMd()` — byte-for-byte parity is deliberate, so this MCP stays backward-compatible with any `faf-cli` output as it evolves. See [CHANGELOG](./CHANGELOG.md#060---2026-08-26--the-agentsmd-edition).
11
+ **v0.7.1** — Pin the install. PATH `rust-faf-mcp` is not the pin. See [CHANGELOG](./CHANGELOG.md#071---2026-09-02--the-table-of-8-edition).
12
12
 
13
13
  **FAF defines. MD instructs. AI codes.**
14
14
 
@@ -16,7 +16,7 @@
16
16
 
17
17
  [![Crates.io](https://img.shields.io/crates/v/rust-faf-mcp?style=flat-square)](https://crates.io/crates/rust-faf-mcp)
18
18
  [![FAF Trophy 100%](https://img.shields.io/badge/FAF-%E2%9C%AA%20100%25-000000?labelColor=FF6B35)](https://faf.one)
19
- [![Tests](https://img.shields.io/badge/tests-133%20passing-brightgreen?style=flat-square)](https://github.com/Wolfe-Jam/rust-faf-mcp)
19
+ [![Tests](https://img.shields.io/badge/tests-171%20passing-brightgreen?style=flat-square)](https://github.com/Wolfe-Jam/rust-faf-mcp)
20
20
  [![IANA](https://img.shields.io/badge/IANA-registered-informational?style=flat-square)](https://www.iana.org/assignments/media-types/application/vnd.faf+yaml)
21
21
  [![License](https://img.shields.io/crates/l/rust-faf-mcp?style=flat-square)](LICENSE)
22
22
 
@@ -25,19 +25,18 @@ Rust-native [MCP](https://modelcontextprotocol.io) (Model Context Protocol) serv
25
25
  ## Quickstart
26
26
 
27
27
  ```bash
28
- # Rust toolchain:
29
- cargo install rust-faf-mcp
28
+ # Rust toolchain (install):
29
+ cargo install rust-faf-mcp --version 0.7.1
30
30
 
31
- # No Rust (downloads GH Release binary for darwin/linux x64):
32
- npx rust-faf-mcp
31
+ # No Rust (try — downloads GH Release binary for darwin/linux):
32
+ npx --yes rust-faf-mcp@0.7.1
33
33
  ```
34
34
 
35
-
36
- Then point any MCP client at it:
35
+ Point an MCP client at the **pin**. A bare `rust-faf-mcp` on PATH may be an old Homebrew binary.
37
36
 
38
37
  ```bash
39
38
  # Claude Code
40
- claude mcp add faf rust-faf-mcp
39
+ claude mcp add faf -- npx --yes rust-faf-mcp@0.7.1
41
40
  ```
42
41
 
43
42
  ```jsonc
@@ -45,34 +44,45 @@ claude mcp add faf rust-faf-mcp
45
44
  {
46
45
  "mcpServers": {
47
46
  "faf": {
48
- "command": "rust-faf-mcp"
47
+ "command": "npx",
48
+ "args": ["--yes", "rust-faf-mcp@0.7.1"]
49
49
  }
50
50
  }
51
51
  }
52
52
  ```
53
53
 
54
+ After `cargo install rust-faf-mcp --version 0.7.1`, `"command": "rust-faf-mcp"` is the install. Until you have proven that binary, use the npx pin.
55
+
54
56
  No flags, no config files, no network listener. Pure stdio JSON-RPC.
55
57
 
56
- Or via Homebrew (macOS, pre-built):
58
+ Or via Homebrew (macOS, pre-built). If you already have it, upgrade — an old keg can sit on PATH as `rust-faf-mcp`:
57
59
 
58
60
  ```bash
61
+ brew update
59
62
  brew install Wolfe-Jam/faf/rust-faf-mcp
63
+ # already installed:
64
+ brew upgrade Wolfe-Jam/faf/rust-faf-mcp
60
65
  ```
61
66
 
62
67
  ## One command, done forever
63
68
 
64
- `faf_auto` detects your project, creates a `.faf`, enhances it to max score, and syncs `CLAUDE.md`in one shot:
69
+ `faf_auto` runs **setup** if `project.faf` is missing (tree detection writes mechanical facts), then syncs `CLAUDE.md`. It does not rewrite an existing file. **Confirm setup (sweeps)** lists what setup occupied walk it; not a second write-gate. Empty human slots stay empty until you state them.
65
70
 
66
71
  ```
67
72
  faf_auto complete
68
73
  ━━━━━━━━━━━━━━━━━
69
- Score: 0% → 85% (+85) BRONZE
74
+ Score: 0% → 42% (+42) GREEN
70
75
  Steps:
71
- 1. Created project.faf
72
- 2. Second enhancement pass
73
- 3. Created CLAUDE.md
76
+ 1. Setup — created project.faf
77
+ 2. Created CLAUDE.md
74
78
 
75
79
  Path: /home/user/my-project
80
+
81
+ Confirm setup (sweeps)
82
+ Walk these. Detection is already a fact. Not a second write-gate.
83
+ project.name my-api
84
+ project.main_language Rust
85
+ stack.backend Rust
76
86
  ```
77
87
 
78
88
  What it produces:
@@ -98,7 +108,7 @@ instant_context:
98
108
  test: cargo test
99
109
  stack:
100
110
  backend: Rust
101
- build_tool: cargo
111
+ build: cargo
102
112
  ```
103
113
 
104
114
  Every AI agent reads this once and knows exactly what you're building. No 20-minute onboarding. No wrong assumptions.
@@ -109,8 +119,9 @@ Every AI agent reads this once and knows exactly what you're building. No 20-min
109
119
 
110
120
  | Tool | What it does |
111
121
  |------|-------------|
112
- | `faf_auto` | Zero to AI context in one command init, enhance, sync, score, done |
113
- | `faf_init` | Create or enhance `project.faf` from `Cargo.toml`, `package.json`, `pyproject.toml`, or `go.mod` |
122
+ | `faf_auto` | Setup if missing, sync `CLAUDE.md`, scoreConfirm setup (sweeps); does not invent 6Ws |
123
+ | `faf_init` | Setup: first write from the tree. Refuses if the file exists. Confirm setup (sweeps). 6Ws stay empty |
124
+ | `faf_go` | Table-of-8 + Confirm setup (sweeps). 6Ws score after ☑. Below 100: add Human Context. After 100: courtesy check every 30 days (90 max) |
114
125
  | `faf_git` | Generate `project.faf` from any GitHub repo URL — no clone needed |
115
126
  | `faf_discover` | Walk up the directory tree to find the nearest `project.faf` |
116
127
 
@@ -130,7 +141,7 @@ Every AI agent reads this once and knows exactly what you're building. No 20-min
130
141
  | `faf_compress` | Compress `.faf` for token-limited contexts (`minimal` / `standard` / `full`) |
131
142
  | `faf_tokens` | Estimate token count at each compression level |
132
143
 
133
- `faf_init` is iterative run it again and it fills in what's missing. Score goes up each time.
144
+ `faf_init` will not overwrite an existing file. Setup occupies mechanical facts; Confirm setup (sweeps) is the walk. Empty human slots stay empty until `faf_go`.
134
145
 
135
146
  ## Architecture
136
147
 
@@ -138,7 +149,7 @@ Every AI agent reads this once and knows exactly what you're building. No 20-min
138
149
  src/
139
150
  ├── main.rs # ~20 lines — tokio entry, rmcp stdio transport
140
151
  ├── server.rs # FafServer: #[tool_router], ServerHandler, resources
141
- └── tools.rs # Business logic — all 10 tools, pure functions returning Value
152
+ └── tools.rs # Business logic — tools as pure functions returning Value
142
153
  ```
143
154
 
144
155
  - **Runtime**: `tokio` single-threaded (`current_thread`)
@@ -150,10 +161,10 @@ Tools return `serde_json::Value`. The server adapts them to `Result<String, Stri
150
161
 
151
162
  ## Testing
152
163
 
153
- 133 tests (117 integration + 16 unit):
164
+ 171 tests (136 integration + 35 unit):
154
165
 
155
166
  ```bash
156
- cargo test # runs all 133
167
+ cargo test # runs all 171
157
168
 
158
169
  # Full ship bar (same gates as GitHub CI — run before push)
159
170
  bash scripts/ci.sh
@@ -164,12 +175,13 @@ bash scripts/install-hooks.sh
164
175
  | File | Tests | Coverage |
165
176
  |------|-------|----------|
166
177
  | `mcp_protocol.rs` | 9 | Init handshake, tools/list, resources, schema validation, ID preservation |
167
- | `tools_functional.rs` | 28 | All 10 tools — happy path, error paths, language detection |
178
+ | `tools_functional.rs` | 31 | Tools — happy path, error paths, language detection, faf_go |
168
179
  | `tier1_security.rs` | 12 | Path traversal, null bytes, shell injection, oversized input, malformed JSON |
169
180
  | `tier2_engine.rs` | 36 | Corrupt YAML, sync replacement, pipelines, dual manifests, legacy filenames, direct paths |
170
181
  | `tier3_edge_cases.rs` | 10 | Unicode, CJK, score boundaries, unknown fields, GitHub URL parsing |
171
182
  | `tier4_aero.rs` | 22 | Manifest structure, version sync, server.json, context block, manifest-server cross-validation |
172
- | `src` unit | 16 | Skills extension digest + scoring resource, `agents::` generator (7), `inject::` non-destructive write (5) |
183
+ | `wjttc_setup.rs` | 16 | Setup / Confirm setup (sweeps) BRAKE · ENGINE · AERO · TYRE · PIT |
184
+ | `src` unit | 35 | setup sweep, skills digest, `agents::`, `inject::`, intent, app-type |
173
185
 
174
186
  Tests spawn the compiled binary as a subprocess and communicate via stdin/stdout JSON-RPC — true integration tests against the real server.
175
187
 
@@ -201,7 +213,8 @@ If `rust-faf-mcp` has been useful, consider starring the repo — it helps other
201
213
  ## Links
202
214
 
203
215
  - [crates.io/crates/rust-faf-mcp](https://crates.io/crates/rust-faf-mcp)
204
- - [npmjs.com/package/rust-faf-mcp](https://www.npmjs.com/package/rust-faf-mcp) — `npx rust-faf-mcp` (no Rust toolchain; downloads GH Release binary)
216
+ - [npmjs.com/package/rust-faf-mcp](https://www.npmjs.com/package/rust-faf-mcp) — `npx --yes rust-faf-mcp@0.7.1` (no Rust toolchain; downloads GH Release binary)
217
+
205
218
  - [Dual-package publish guide](https://github.com/Wolfe-Jam/mcp-better/blob/main/docs/DUAL-PACKAGE-RUST-MCP.md) — cargo + npm (this server is the product example)
206
219
  - [docs/DUAL-PACKAGE.md](./docs/DUAL-PACKAGE.md) — pointer + OIDC docs for this repo
207
220
  - [docs/SKILLS-OVER-MCP.md](./docs/SKILLS-OVER-MCP.md) — J1 Agent Skill `faf-context` (skills/list · digests)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rust-faf-mcp",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "mcpName": "one.faf/rust-faf-mcp",
5
5
  "description": "Persistent project context — Rust-native MCP server. IANA-registered .faf format. npm shim downloads the native binary from GitHub Releases.",
6
6
  "license": "MIT",