Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions FORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,26 @@
FM-Agent's maintenance fork of
[colbymchenry/codegraph](https://github.com/colbymchenry/codegraph).

**Pinned base:** upstream `v1.5.0`. Upstream shipped the C macro-attribute
extraction fix (issue #1211, PR #1311) in v1.5.0, so this base carries it
natively — the fork no longer needs its own patch on top.
**Pinned base:** upstream `main` at `c6aaa20358cd6adcd04b87bdef8e5803ad146f3a`
(2026-08-07). That is *past* `v1.5.0` and before whatever upstream tags next:
`v1.5.0` was 104 commits behind, and the incremental-sync convergence work, the
first-class `union` nodes and the WAL growth fix in between all matter to how
FM-Agent reads the graph. The version marker keeps saying `1.5.0-fmagent.N`
because it is the last upstream *release* this descends from — the exact base is
this commit.

**Patches:** none currently — this base is byte-identical to upstream v1.5.0. The
fork is kept as standing infrastructure so an urgent fix upstream hasn't shipped
can be applied and released quickly if needed; each such fix would live as a
merged pull request here.
Upstream shipped the C macro-attribute extraction fix (issue #1211, PR #1311) in
v1.5.0, so the base carries it natively; the fork no longer needs its own patch
for it.

**Patches:** one, listed below. Apart from it the tree matches the pinned base, so
the fork stays cheap to re-sync. Every patch lives as a merged pull request here
and must be **re-applied on each upstream sync** — if a merge drops one, this list
is what catches it.

| File | Patch |
|------|-------|
| `src/extraction/index.ts` | `fm_agent` added to `DEFAULT_IGNORE_DIRS`. FM-Agent writes its work directory into the project it analyses, holding one copy of every function it extracts plus the scripts staged to produce them, so indexing it lists each function twice and mixes tool code in with project code. Upstream deliberately keeps names that could be real source out of that list, so this stays fork-only; a project that does own an `fm_agent/` directory opts back in with a `.gitignore` negation (`!fm_agent/`). |

**Version marker:** `codegraph --version` → `1.5.0-fmagent.N` identifies a build
from this fork. Note this is a SemVer pre-release of `1.5.0`, so it sorts *below*
Expand All @@ -27,8 +39,11 @@ bundles (darwin/linux/windows, arm64/x64) with the native Rust extraction
kernel. FM-Agent's `install.sh` pins one via `CODEGRAPH_VERSION`.

**Policy:** pin to a base, don't chase upstream — update only when we need
something a newer upstream release carries. Base updates land via a pull request
that **merges** the target upstream tag into `main` (so upstream stays an ancestor
— blame, audits and future syncs follow upstream history) and re-applies this
fork layer; merge such PRs with a merge commit, not a squash. Upstream is tracked
via the `upstream` git remote.
something a newer upstream state carries. Prefer a tagged release; an untagged
`main` commit is fair game when what we need is not released yet, and then the
commit id *is* the base (record it above, and verify the build ourselves —
nothing upstream has vetted it). Base updates land via a pull request that
**merges** that upstream point into `main` (so upstream stays an ancestor — blame,
audits and future syncs follow upstream history) and re-applies this fork layer;
merge such PRs with a merge commit, not a squash. Upstream is tracked via the
`upstream` git remote.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@colbymchenry/codegraph",
"version": "1.5.0-fmagent.1",
"version": "1.5.0-fmagent.2",
"description": "Supercharge AI coding agents with semantic code intelligence — surgical context, fewer tool calls, faster answers. 100% local.",
"repository": {
"type": "git",
Expand Down
8 changes: 8 additions & 0 deletions src/extraction/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ const DEFAULT_IGNORE_DIRS: ReadonlySet<string> = new Set([
'__history', '__recovery',
// Generic cache
'.cache',
// FORK-SPECIFIC (see FORK.md): FM-Agent's work directory. It holds one copy of
// every function FM-Agent extracts from the project, plus the scripts it stages
// to produce them, so indexing it lists each function twice and mixes tool code
// in with project code. Unlike the entries above, this name is not from the
// github/gitignore templates and could plausibly be real source — which is why
// it stays fork-only. A project that does own an `fm_agent/` directory opts back
// in with a `.gitignore` negation (`!fm_agent/`), as for any default-ignored dir.
'fm_agent',
]);

/**
Expand Down