Config & Lock Files
Two files track the state of your ContextForge installation — one for desired state, one for resolved state.
config.json
Desired state. Edited by the CLI when you run init, add, or sync.
lock.json
Resolved installed state. Records exact pack versions and registry sources at install time.
config.json
The config file records which tools you selected, which packs are installed, and where the registry is. It is the source of truth for what should be installed.
.contextforge/config.json
{
"version": "0.1.0",
"registry": "https://registry.contextforge.org/index.json",
"tools": ["codex", "claude"],
"installedPacks": [
"verification-before-completion",
"systematic-debugging",
"code-review",
"git-workflow",
"dependency-management",
"diataxis-docs",
"nextjs-best-practices",
"react-performance",
"typescript-advanced-types"
],
"defaultCorePacks": [
"verification-before-completion",
"systematic-debugging",
"code-review",
"git-workflow",
"dependency-management",
"diataxis-docs"
],
"generatedFiles": ["AGENTS.md", "CLAUDE.md"]
}versionContextForge schema version.registryRegistry URL used for this project. Override with --registry.toolsAI tools configured: codex, claude, cursor, copilot, or all.installedPacksAll packs currently installed (core + stack + manual adds).defaultCorePacksCore packs installed automatically by init (informational).generatedFilesRoot files managed by ContextForge.lock.json
The lock file is regenerated on every sync or add. It records exactly what was installed, from which registry URL, and when. This enables future syncs to detect stale or changed packs.
.contextforge/lock.json
{
"registry": "https://registry.contextforge.org/index.json",
"resolvedAt": "2026-05-21T00:00:00.000Z",
"packs": {
"nextjs-best-practices": {
"title": "Next.js Best Practices",
"version": "0.1.0",
"topic": "nextjs",
"classification": "task-triggered",
"path": "packs/nextjs-best-practices/pack.json",
"source": "https://registry.contextforge.org/packs/nextjs-best-practices/pack.json",
"files": ["rules", "agents", "claude", "skill", "cursor", "copilot"]
},
"verification-before-completion": {
"title": "Verification Before Completion",
"version": "0.1.0",
"topic": "agent-workflow",
"classification": "always-active",
"path": "packs/verification-before-completion/pack.json",
"source": "https://registry.contextforge.org/packs/verification-before-completion/pack.json",
"files": ["rules", "agents", "claude", "skill", "cursor", "copilot"]
}
}
}Commit both
config.json and lock.json to version control. Other contributors can run sync to get an identical installation.Do not manually edit
lock.json. It is managed entirely by the CLI. Edit config.json only if you know what you are doing, then run sync.