@johnfaleke/fathom 0.1.0 → 0.2.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/LICENSE +20 -20
- package/README.md +345 -285
- package/dist/ai/context.d.ts +14 -0
- package/dist/ai/context.d.ts.map +1 -0
- package/dist/ai/context.js +33 -0
- package/dist/ai/context.js.map +1 -0
- package/dist/ai/openai.d.ts +19 -0
- package/dist/ai/openai.d.ts.map +1 -0
- package/dist/ai/openai.js +93 -0
- package/dist/ai/openai.js.map +1 -0
- package/dist/ai/provider.d.ts +7 -1
- package/dist/ai/provider.d.ts.map +1 -1
- package/dist/cli.js +64 -20
- package/dist/cli.js.map +1 -1
- package/dist/commands/check.d.ts +2 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +15 -2
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/config.d.ts +2 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +51 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/interpret.d.ts +15 -0
- package/dist/commands/interpret.d.ts.map +1 -0
- package/dist/commands/interpret.js +82 -0
- package/dist/commands/interpret.js.map +1 -0
- package/dist/commands/scan.d.ts +4 -0
- package/dist/commands/scan.d.ts.map +1 -0
- package/dist/commands/scan.js +46 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/setup.d.ts +10 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +48 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/core/model.d.ts +3 -0
- package/dist/core/model.d.ts.map +1 -0
- package/dist/core/model.js +87 -0
- package/dist/core/model.js.map +1 -0
- package/dist/core/storage.d.ts +4 -1
- package/dist/core/storage.d.ts.map +1 -1
- package/dist/core/storage.js +8 -0
- package/dist/core/storage.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/render/terminal.d.ts +3 -0
- package/dist/render/terminal.d.ts.map +1 -1
- package/dist/render/terminal.js +19 -0
- package/dist/render/terminal.js.map +1 -1
- package/dist/types.d.ts +43 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -1
- package/package.json +50 -50
package/README.md
CHANGED
|
@@ -1,285 +1,345 @@
|
|
|
1
|
-
# Fathom
|
|
2
|
-
|
|
3
|
-
> AI can generate the work. Fathom helps you understand the work.
|
|
4
|
-
|
|
5
|
-
Fathom is a local-first CLI for project Work State. It gives developers a deterministic, evidence-backed view of what is happening in a repo: what is in progress, what has been completed, what changed, and what may be silently broken.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
fathom
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
fathom
|
|
132
|
-
fathom
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
1
|
+
# Fathom
|
|
2
|
+
|
|
3
|
+
> AI can generate the work. Fathom helps you understand the work.
|
|
4
|
+
|
|
5
|
+
Fathom is a local-first CLI for project Work State. It gives developers a deterministic, evidence-backed view of what is happening in a repo: what is in progress, what has been completed, what changed, and what may be silently broken.
|
|
6
|
+
|
|
7
|
+
Current release: `0.2.0` — Project Model and opt-in AI interpretation.
|
|
8
|
+
|
|
9
|
+
## Why Fathom exists
|
|
10
|
+
|
|
11
|
+
Most project tooling answers either:
|
|
12
|
+
|
|
13
|
+
- which files changed, or
|
|
14
|
+
- what an AI thinks is happening.
|
|
15
|
+
|
|
16
|
+
Fathom does neither blindly. It focuses on observable evidence and clearly labelled findings:
|
|
17
|
+
|
|
18
|
+
- missing environment variables
|
|
19
|
+
- undeclared dependencies
|
|
20
|
+
- stale project state
|
|
21
|
+
- changed files grouped by project area
|
|
22
|
+
- a machine-readable snapshot of project health
|
|
23
|
+
|
|
24
|
+
## Quick start
|
|
25
|
+
|
|
26
|
+
Install Fathom globally:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install --global @johnfaleke/fathom
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Then run it from any project workspace:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cd /path/to/your-project
|
|
36
|
+
fathom init
|
|
37
|
+
fathom check
|
|
38
|
+
fathom status
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The package installs the `fathom` command. You do not need to clone this
|
|
42
|
+
repository into the project being inspected.
|
|
43
|
+
|
|
44
|
+
For repository development, install dependencies locally instead:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Initialize a project:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm run fathom -- init
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Set your current work and task state:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm run fathom -- set --current "Ship OAuth integration" --complete "Login API, API docs" --incomplete "Webhook retry handling, Missing README"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Check the project for inconsistencies:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm run fathom -- check
|
|
66
|
+
npm run fathom -- check --json
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Review project state:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm run fathom -- status
|
|
73
|
+
npm run fathom -- status --json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Build the local Project Model:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
fathom scan
|
|
80
|
+
fathom scan --json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`scan` reads repository evidence into `.fathom/model.json`: project identity,
|
|
84
|
+
visible files, detected stack, dependencies, observations, and confidence-scored
|
|
85
|
+
claims. Existing commands remain useful projections of the same project reality;
|
|
86
|
+
AI interpretation is optional and never required to scan a project.
|
|
87
|
+
|
|
88
|
+
See what meaningfully changed:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm run fathom -- diff
|
|
92
|
+
npm run fathom -- diff --json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Optional AI interpretation is explicit and requires consent:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
fathom setup
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The guided setup asks for a profile, provider, model, endpoint, and environment
|
|
102
|
+
variable name. It never asks for or stores the API key. After setup:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
export OPENAI_API_KEY=your-key
|
|
106
|
+
fathom check --ai --json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
For PowerShell:
|
|
110
|
+
|
|
111
|
+
```powershell
|
|
112
|
+
$env:OPENAI_API_KEY = "your-key"
|
|
113
|
+
fathom setup
|
|
114
|
+
fathom check --ai
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
For scripts or CI, use the non-interactive form:
|
|
118
|
+
|
|
119
|
+
```powershell
|
|
120
|
+
$env:OPENAI_API_KEY = "your-key"
|
|
121
|
+
fathom setup --non-interactive --profile default --provider openai --model gpt-4o-mini --api-key-env OPENAI_API_KEY
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`check --ai` runs deterministic checks first, then adds one clearly labelled
|
|
125
|
+
interpretation using the active profile. It does not silently send anything.
|
|
126
|
+
The lower-level `fathom interpret` command remains available for custom prompts.
|
|
127
|
+
|
|
128
|
+
Multiple profiles and custom OpenAI-compatible endpoints are supported:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
fathom config set ai.profile local
|
|
132
|
+
fathom config set ai.profiles.local.provider custom
|
|
133
|
+
fathom config set ai.profiles.local.model local-model
|
|
134
|
+
fathom config set ai.profiles.local.baseUrl http://localhost:9000/v1
|
|
135
|
+
fathom config set ai.profiles.local.apiKeyEnv LOCAL_AI_KEY
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Keys stay in environment variables such as `OPENAI_API_KEY` or `LOCAL_AI_KEY`;
|
|
139
|
+
they are never written to `.fathom/config.json`.
|
|
140
|
+
|
|
141
|
+
After building:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npm run build
|
|
145
|
+
node dist/cli.js init
|
|
146
|
+
node dist/cli.js status
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Use Fathom in another project
|
|
150
|
+
|
|
151
|
+
Fathom operates on the current working directory. Build it once, then run the
|
|
152
|
+
CLI while your other project is the working directory.
|
|
153
|
+
|
|
154
|
+
From PowerShell on Windows:
|
|
155
|
+
|
|
156
|
+
```powershell
|
|
157
|
+
Set-Location C:\path\to\Fathom
|
|
158
|
+
npm run build
|
|
159
|
+
Set-Location C:\path\to\your-project
|
|
160
|
+
node C:\path\to\Fathom\dist\cli.js init
|
|
161
|
+
node C:\path\to\Fathom\dist\cli.js check
|
|
162
|
+
node C:\path\to\Fathom\dist\cli.js status
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
From macOS or Linux:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
cd /path/to/Fathom
|
|
169
|
+
npm run build
|
|
170
|
+
cd /path/to/your-project
|
|
171
|
+
node /path/to/Fathom/dist/cli.js init
|
|
172
|
+
node /path/to/Fathom/dist/cli.js check
|
|
173
|
+
node /path/to/Fathom/dist/cli.js status
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Initialization creates `.fathom/` and `.env.example` in the target project.
|
|
177
|
+
The generated `.fathom/` directory is local project state; commit it only if
|
|
178
|
+
you want to share that state with collaborators. Use `--json` for automation:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
node /path/to/Fathom/dist/cli.js check --json
|
|
182
|
+
node /path/to/Fathom/dist/cli.js status --json
|
|
183
|
+
node /path/to/Fathom/dist/cli.js diff --json
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
To use the `fathom` command directly during local development, run `npm link`
|
|
187
|
+
once from the Fathom directory. Then open another project and run:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
fathom init
|
|
191
|
+
fathom check
|
|
192
|
+
fathom status
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The direct command works because Fathom always inspects the directory where
|
|
196
|
+
the command is run, not the directory where Fathom itself is installed.
|
|
197
|
+
|
|
198
|
+
## Open-source project site
|
|
199
|
+
|
|
200
|
+
The static project site lives in [`site/`](./site/index.html). Open
|
|
201
|
+
`site/index.html` directly in a browser, or serve the repository with any static
|
|
202
|
+
file server while developing. It includes the product overview, installation
|
|
203
|
+
guide, command reference, check interface, Work State schema, contribution links,
|
|
204
|
+
and support link.
|
|
205
|
+
|
|
206
|
+
The machine-readable [`llms.txt`](./llms.txt) file is a concise text reference for
|
|
207
|
+
AI tools, search systems, and integrations that need to understand Fathom without
|
|
208
|
+
parsing the full README or landing page.
|
|
209
|
+
|
|
210
|
+
## Package releases
|
|
211
|
+
|
|
212
|
+
The published package name is `@johnfaleke/fathom`; the installed command remains
|
|
213
|
+
`fathom`. Releases are published automatically by GitHub Actions when a maintainer
|
|
214
|
+
pushes a semantic version tag:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
git tag v0.1.0
|
|
218
|
+
git push origin v0.1.0
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Before the first release, the npm package owner must configure GitHub Actions as a
|
|
222
|
+
trusted publisher for `@johnfaleke/fathom` on npm. Future v0.2 and later tags will
|
|
223
|
+
then build, test, and publish automatically. A version tag does not happen by
|
|
224
|
+
itself; it is the deliberate release switch.
|
|
225
|
+
|
|
226
|
+
## Commands
|
|
227
|
+
|
|
228
|
+
| Command | Purpose |
|
|
229
|
+
|---------|---------|
|
|
230
|
+
| `fathom init` | Create `.fathom/` for state, config, and event history |
|
|
231
|
+
| `fathom set --current ...` | Update current work and task lists |
|
|
232
|
+
| `fathom status` | Show the current project state |
|
|
233
|
+
| `fathom diff` | Show semantic file changes and project impact |
|
|
234
|
+
| `fathom check` | Detect inconsistent or forgotten wiring |
|
|
235
|
+
|
|
236
|
+
Add `--json` to any of the reporting commands for machine-readable output.
|
|
237
|
+
|
|
238
|
+
## Example status output
|
|
239
|
+
|
|
240
|
+
```text
|
|
241
|
+
FATHOM STATUS
|
|
242
|
+
|
|
243
|
+
Current work: Ship OAuth integration
|
|
244
|
+
Progress: 1 complete, 1 remaining
|
|
245
|
+
|
|
246
|
+
Completed:
|
|
247
|
+
✓ Login API
|
|
248
|
+
|
|
249
|
+
Remaining:
|
|
250
|
+
• Webhook retry handling
|
|
251
|
+
|
|
252
|
+
Findings:
|
|
253
|
+
⚠ left-pad is imported but not declared in package.json
|
|
254
|
+
|
|
255
|
+
Changes:
|
|
256
|
+
1 file(s) changed
|
|
257
|
+
~ src/app.ts
|
|
258
|
+
|
|
259
|
+
Attention:
|
|
260
|
+
1 thing(s) are worth reviewing.
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Example JSON output
|
|
264
|
+
|
|
265
|
+
```json
|
|
266
|
+
{
|
|
267
|
+
"version": 1,
|
|
268
|
+
"updatedAt": "2026-09-20T00:00:00.000Z",
|
|
269
|
+
"root": "/path/to/project",
|
|
270
|
+
"currentWork": "Ship OAuth integration",
|
|
271
|
+
"completed": [
|
|
272
|
+
{ "id": "completed-login-api", "title": "Login API", "status": "completed" }
|
|
273
|
+
],
|
|
274
|
+
"incomplete": [
|
|
275
|
+
{ "id": "incomplete-webhook-retry-handling", "title": "Webhook retry handling", "status": "incomplete" }
|
|
276
|
+
],
|
|
277
|
+
"findings": [
|
|
278
|
+
{
|
|
279
|
+
"id": "deps.undeclared-import",
|
|
280
|
+
"category": "dependencies",
|
|
281
|
+
"severity": "warning",
|
|
282
|
+
"message": "left-pad is imported but not declared in package.json",
|
|
283
|
+
"evidence": []
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"changes": {
|
|
287
|
+
"filesChanged": 1,
|
|
288
|
+
"summary": ["~ src/app.ts"]
|
|
289
|
+
},
|
|
290
|
+
"attention": 1
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## Built-in checks
|
|
295
|
+
|
|
296
|
+
The current v0.1 checks are deterministic and evidence-based:
|
|
297
|
+
|
|
298
|
+
- **config.env-var-missing** — `process.env.X` used but not present in `.env.example`
|
|
299
|
+
- **deps.undeclared-import** — package imported but not declared in `package.json`
|
|
300
|
+
|
|
301
|
+
## Project configuration guidance
|
|
302
|
+
|
|
303
|
+
Fathom uses a local `.fathom/config.json` file and respects ignore rules. A good default config is deliberately conservative:
|
|
304
|
+
|
|
305
|
+
```json
|
|
306
|
+
{
|
|
307
|
+
"version": 1,
|
|
308
|
+
"ignore": [
|
|
309
|
+
"node_modules",
|
|
310
|
+
"dist",
|
|
311
|
+
".git",
|
|
312
|
+
".fathom",
|
|
313
|
+
"coverage",
|
|
314
|
+
".next"
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
For more guidance, see [docs/configuration.md](./docs/configuration.md).
|
|
320
|
+
|
|
321
|
+
## AI interpretation layer (optional)
|
|
322
|
+
|
|
323
|
+
Fathom intentionally keeps deterministic checks separate from interpretation. If you want AI assistance later, it should be opt-in and use a clean provider interface instead of hard coding a single model provider.
|
|
324
|
+
|
|
325
|
+
```ts
|
|
326
|
+
export interface AIProvider {
|
|
327
|
+
id: string;
|
|
328
|
+
name: string;
|
|
329
|
+
interpret(input: AIInterpretationRequest): Promise<AIInterpretationResult>;
|
|
330
|
+
}
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
This keeps the core product honest: evidence stays evidence, and model output remains clearly labelled as interpretation.
|
|
334
|
+
|
|
335
|
+
See [docs/ai-provider.md](./docs/ai-provider.md) for the provider surface and integration conventions.
|
|
336
|
+
|
|
337
|
+
## Docs and roadmap
|
|
338
|
+
|
|
339
|
+
- [FATHOM.md](./FATHOM.md) — vision, principles, and roadmap
|
|
340
|
+
- [docs/configuration.md](./docs/configuration.md) — config and ignore recommendations
|
|
341
|
+
- [docs/ai-provider.md](./docs/ai-provider.md) — optional provider abstraction for interpretation
|
|
342
|
+
|
|
343
|
+
## License
|
|
344
|
+
|
|
345
|
+
MIT
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ProjectContext } from "../types.js";
|
|
2
|
+
export interface AIContextPolicy {
|
|
3
|
+
includePaths?: string[];
|
|
4
|
+
maxFileBytes?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface SafeAIContext {
|
|
7
|
+
files: Record<string, string>;
|
|
8
|
+
excluded: Array<{
|
|
9
|
+
path: string;
|
|
10
|
+
reason: "sensitive" | "not-allowed" | "too-large" | "binary";
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
export declare function collectSafeAIContext(ctx: ProjectContext, policy?: AIContextPolicy): Promise<SafeAIContext>;
|
|
14
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/ai/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,WAAW,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAA;KAAE,CAAC,CAAC;CACjG;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,cAAc,EACnB,MAAM,GAAE,eAAoB,GAC3B,OAAO,CAAC,aAAa,CAAC,CA8BxB"}
|