Context selection for AI-assisted development

Give your AI coding tool only the files that matter.

CodeForge takes a coding task and a repository, then returns a focused context package: relevant files, functions, tests and docs. It is not another coding assistant. It decides what your assistant should read.

C++17 · Rule engine · Repository analysis · JSON output
codeforge / context builder
Ranked context · sample output
src/auth/session.cpp
keyword match · recent commits · included by 4 files
0.92
src/middleware/redirect.cpp
includes session.h · function-name match
0.81
tests/test_session.cpp
test for a selected file
0.67
docs/auth.md
doc references session handling
0.44
How it works

Three steps from task to context

01

Describe the task

Point CodeForge at a repository and write the change you want in plain words: a bug, a feature, a refactor.

02

Score the repository

Rule-based scoring combines code structure, import links and Git history to rank files, functions, tests and docs.

03

Hand off the package

Export a compact JSON context package and give it to any AI coding tool, instead of the whole repo.

Signals

What decides relevance

AST parsing
Functions and classes matched to the task wording.
Dependency graph
Which files include which, so related code travels together.
Git history
Files that change together and change recently.
Test mapping
Tests linked to each selected file.
Docs lookup
README and docs that mention the same modules.
Output

A context package, not a code dump

Every item comes with a score and the reason it was picked, so you can see why CodeForge chose it and trim it before it reaches your AI tool.

{
  "task": "Fix redirect loop after session expires",
  "files": [
    {
      "path": "src/auth/session.cpp",
      "score": 0.92,
      "reasons": ["keyword", "git_history", "dependents"]
    }
  ],
  "functions": ["refresh_session", "redirect_to_login"],
  "tests": ["tests/test_session.cpp"],
  "docs": ["docs/auth.md"]
}

Stop pasting the whole repo.