faf-cli 7.12.1 → 7.13.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.
- package/README.md +48 -32
- package/dist/cli.js +370 -343
- package/dist/cli.js.map +83 -72
- package/dist/core/cwd-guard.d.ts +8 -0
- package/dist/core/faf-dna.d.ts +147 -0
- package/dist/core/faf-source.d.ts +27 -0
- package/dist/core/json-edit.d.ts +77 -0
- package/dist/core/render-hash.d.ts +55 -0
- package/dist/core/safe-write.d.ts +325 -0
- package/dist/core/scorer.d.ts +7 -2
- package/dist/core/shape.d.ts +11 -0
- package/dist/core/slots.d.ts +30 -0
- package/dist/core/typed-none.d.ts +25 -0
- package/dist/core/types.d.ts +8 -0
- package/dist/core/yaml-edit.d.ts +136 -0
- package/dist/detect/assemble.d.ts +49 -5
- package/dist/detect/git-repo.d.ts +50 -0
- package/dist/detect/scanner.d.ts +9 -4
- package/dist/detect/stack.d.ts +14 -1
- package/dist/detect/turbo-cat-knowledge.d.ts +10 -0
- package/dist/detect/turbo-cat.d.ts +6 -2
- package/dist/fafm/index.d.ts +1 -0
- package/dist/fafm/soul.d.ts +108 -6
- package/dist/index.d.ts +24 -3
- package/dist/index.js +202 -162
- package/dist/index.js.map +48 -36
- package/dist/interop/cards.d.ts +52 -3
- package/dist/interop/claude-memory.d.ts +134 -0
- package/dist/interop/claude.d.ts +5 -1
- package/dist/interop/commonmark.d.ts +144 -0
- package/dist/interop/copilot-instructions.d.ts +1 -0
- package/dist/interop/faf.d.ts +123 -11
- package/dist/interop/inject.d.ts +112 -22
- package/dist/interop/projecthtml.d.ts +19 -2
- package/dist/interop/servercard.d.ts +51 -2
- package/dist/wasm/kernel.d.ts +7 -4
- package/package.json +5 -4
- package/project.faf +11 -4
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ detected from your real stack, scored, and versioned with your code. No drift. N
|
|
|
39
39
|
FAF defines. AGENTS.md instructs. AI codes.
|
|
40
40
|
|
|
41
41
|
<!-- trophy — bottom of hero -->
|
|
42
|
-
[](https://faf.one)
|
|
43
43
|
|
|
44
44
|
</div>
|
|
45
45
|
|
|
@@ -63,24 +63,24 @@ No setup, no drift, no re-explaining.
|
|
|
63
63
|
## Install
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
bunx faf
|
|
67
|
-
npx faf
|
|
68
|
-
brew install wolfe-jam/faf/faf-cli && faf # Homebrew (auto-taps)
|
|
66
|
+
bunx faf auto # Bun — zero install, fastest path
|
|
67
|
+
npx faf auto # npm — works everywhere
|
|
68
|
+
brew install wolfe-jam/faf/faf-cli && faf auto # Homebrew (auto-taps)
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
> `faf`
|
|
71
|
+
> `faf` with no arguments shows your project's score; `faf auto` detects and fills.
|
|
72
72
|
|
|
73
73
|
---
|
|
74
74
|
|
|
75
75
|
## Quick Start
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
# ANY GitHub repo —
|
|
78
|
+
# ANY GitHub repo — one shallow clone, no install, 2 seconds
|
|
79
79
|
bunx faf-cli git https://github.com/facebook/react
|
|
80
80
|
|
|
81
81
|
# Your own project
|
|
82
82
|
bunx faf-cli init # Create .faf
|
|
83
|
-
bunx faf-cli auto #
|
|
83
|
+
bunx faf-cli auto # Fill every tech slot from the repo, then score
|
|
84
84
|
bunx faf-cli go # Interactive interview to gold code
|
|
85
85
|
```
|
|
86
86
|
|
|
@@ -101,16 +101,16 @@ Run `faf` with no arguments:
|
|
|
101
101
|
| Command | What it does |
|
|
102
102
|
|---------|--------------|
|
|
103
103
|
| `faf init` | Create `project.faf` from your local project |
|
|
104
|
-
| `faf git <url>` | Instant `.faf` from any GitHub repo
|
|
104
|
+
| `faf git <url>` | Instant `.faf` from any GitHub repo (a shallow clone) |
|
|
105
105
|
| `faf auto` | Detect stack, fill every slot it can, score |
|
|
106
106
|
| `faf go` | Guided interview to fill the human-only slots |
|
|
107
107
|
| `faf score` | Check AI-readiness (0–100%) |
|
|
108
108
|
| `faf export` | Author `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.cursorrules` |
|
|
109
|
-
| `faf sync` |
|
|
109
|
+
| `faf sync` | `.faf` → `CLAUDE.md` (pull: Trophy-gated backfill) |
|
|
110
110
|
| `faf memory` | `.fafm` soul ops — convert Claude memory, etch, recall, ls, show |
|
|
111
111
|
| `faf diff` / `log` | Semantic context diff + score timeline across git history |
|
|
112
112
|
| `faf hooks --install` | Pre-commit guard against context regression |
|
|
113
|
-
| `faf compile` / `decompile` | `.faf`
|
|
113
|
+
| `faf compile` / `decompile` | `.faf` → `.fafb` sealed binary; `decompile` shows a `.fafb`'s sections as JSON |
|
|
114
114
|
| `faf check` | Validate a `.faf` file |
|
|
115
115
|
| `faf recover` | Rebuild `.faf` from an existing `CLAUDE.md` / `AGENTS.md` |
|
|
116
116
|
| `faf show` | Render `project.faf` to a browsable HTML page |
|
|
@@ -132,29 +132,45 @@ faf memory etch "a durable fact" --id my-fact
|
|
|
132
132
|
faf memory show
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
### What's New in v7.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
- **
|
|
140
|
-
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
- **
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
135
|
+
### What's New in v7.13.1 — The Co-Author Edition
|
|
136
|
+
|
|
137
|
+
**A security patch: faf-cli's detection no longer follows a link out of your project, so a hostile repo can't pull a file like `~/.aws/credentials` into project.faf or your AI's context.**
|
|
138
|
+
|
|
139
|
+
- **Detection reads stay inside the project.** A README.md, package.json or any other repo file that links outside the project is treated as absent. Links inside the project still work.
|
|
140
|
+
- **`faf git` clones with symlinks off**, and never reads a link's path as a file's content.
|
|
141
|
+
- **`faf cards` reads `agent.fafa` safely**: a link out of its folder is refused.
|
|
142
|
+
- **`slotignored` is shown as `slotignored`**, never N/A.
|
|
143
|
+
|
|
144
|
+
#### v7.13.0 — the Edition release
|
|
145
|
+
|
|
146
|
+
**You and your AI co-author project.faf — AI fills the tech facts from your repo, you write the 6Ws — and faf-cli only touches what it wrote: links can't lead it outside your project, a failed write keeps the original, and your comments, values and notes stay as you left them.**
|
|
147
|
+
|
|
148
|
+
- **faf writes its block, you write the rest.** faf touches only its managed block and its own section. A file with no faf markers is always prefixed, never taken over, even one that starts with faf's old stamp.
|
|
149
|
+
- **`project.faf` edits keep your file as written.** Comments, exact values (`1.10` stays `1.10`), anchors and keys faf doesn't know all survive. An edit changes only what it changes, and a no-op writes nothing.
|
|
150
|
+
- **If it's a fact, faf fills the slot.** A typed `None` or `N/A` is an empty slot, and the app-type decides which slots count.
|
|
151
|
+
- `faf auto` fills a tech slot only from a repo fact. With no fact, the slot stays empty; only `project.type` falls back to `library`, and says so on its line.
|
|
152
|
+
- With no fact, your words stay in a slot the app-type uses, and that slot scores 0 until filled.
|
|
153
|
+
- In a slot the app-type leaves out, `faf auto` writes `slotignored`: not required, not scored.
|
|
154
|
+
- The 6Ws stay yours: faf never replaces your words there, and `faf go` asks for the empty ones.
|
|
155
|
+
- **`faf ai enhance` is retired.** project.faf isn't enhanced: tech slots come from repo facts, and the 6Ws come from you.
|
|
156
|
+
- **Links and encodings are checked first.** faf refuses, in one line, to write:
|
|
157
|
+
- through a link that leaves the project;
|
|
158
|
+
- into `.git`, beyond its own hook section and diff driver;
|
|
159
|
+
- over a whole file faf didn't render;
|
|
160
|
+
- over a file that isn't UTF-8.
|
|
161
|
+
- **A whole file faf renders is replaced only when it's still exactly what faf wrote.** project.html and the Server and A2A cards now carry a render hash. If you edited one, faf leaves it and says so; `--force` replaces it.
|
|
162
|
+
- **One-time step when upgrading:** faf can't tell whether a project.html, Server Card or A2A card written before 7.13 was edited. The first run that would change one refuses it once, and that run exits 1. Check the file for hand edits, then run the same command once with `--force`; after that faf recognises its own output.
|
|
163
|
+
- **A failed write keeps the original.** faf writes to a temp file and renames it into place, so a full disk or a killed process leaves your file as it was. A file you edit while faf is writing is left alone.
|
|
164
|
+
- **Memory stays yours.**
|
|
165
|
+
- `soul.fafm` keeps its curated index, its facts and its comments, and etching an id that already exists merges into that fact.
|
|
166
|
+
- Tri-sync (`FAF_PRO=1`) writes Claude Code's own memory file as one section on top, and Claude's notes stay.
|
|
167
|
+
- **Detection stays inside the project.** Turbo-Cat no longer reads parent folders, so a monorepo root's stack no longer leaks into a package.
|
|
168
|
+
- **For builders.** New exports: `resolveInside`, `safeWriteFile`, `updateFafFile`, `writeClaudeMemory`, `FafDNAManager`, `authorFafFromRepo`, `registryTitle`, `isNonProjectRoot` and `scoreText`. `writeFaf` on an existing file now merges; pass `{ replace: true }` for the old overwrite.
|
|
169
|
+
- **Node 22+.** The engine floor matches CI (22 and 24).
|
|
155
170
|
|
|
156
171
|
**Recent sprint**
|
|
157
172
|
|
|
173
|
+
- 🤝 [7.13.0](https://github.com/Wolfe-Jam/faf-cli/releases/tag/v7.13.0) The Co-Author Edition
|
|
158
174
|
- 🧩 [7.12.0](https://github.com/Wolfe-Jam/faf-cli/releases/tag/v7.12.0) The Open Renderers Edition
|
|
159
175
|
- 🖥️ [7.11.0](https://github.com/Wolfe-Jam/faf-cli/releases/tag/v7.11.0) The VS Code Edition
|
|
160
176
|
- 📚 [7.10.0](https://github.com/Wolfe-Jam/faf-cli/releases/tag/v7.10.0) The Full-Facts Edition
|
|
@@ -196,8 +212,8 @@ Your own rules for the AI — *"use full words in identifiers," "use bun, not np
|
|
|
196
212
|
## Sync
|
|
197
213
|
|
|
198
214
|
```
|
|
199
|
-
sync: .faf
|
|
200
|
-
tri-sync: .faf
|
|
215
|
+
sync: .faf ──── 8ms ───→ CLAUDE.md (pull: Trophy-gated backfill)
|
|
216
|
+
tri-sync: .faf ──── 8ms ───→ CLAUDE.md + Claude Code's MEMORY.md (Pro: faf's block only; Claude's notes kept)
|
|
201
217
|
```
|
|
202
218
|
|
|
203
219
|
---
|