@codedology/code-forge

中文文档
0.21.0发布于 2026/11/10MITES Module近 30 天下载 3592

Plan/harden/code/review orchestration CLI and Agent Skill for cross-model, parallel, evidence-gated feature delivery.

原始使用文档
文档目录12 节
  1. The problem
  2. Install
  3. What ships
  4. 5-minute quickstart
  5. Review only
  6. How it works
  7. Key commands
  8. Configuration reference
  9. Supported agents
  10. Security model
  11. Links
  12. Development

@codedology/code-forge

A CLI and Agent Skill for cross-model, parallel, evidence-gated feature delivery.

Latest: 0.21.0 - see CHANGELOG.md

The problem

An agent can write code quickly, but you still have to decide what to build and how to check it. Long tasks lose context, parallel edits collide, and a green test can miss the intended behavior. code-forge splits work into owned blocks, gives each change a fresh review, and records proof. You approve the plan and keep control of budgets, permissions, and landing the result.

Install

Requires Node.js >= 22 and git. Install the CLI with npm install -g @codedology/code-forge. macOS: worktrees default to a .noindex folder so Spotlight does not index them. The scoped npm name is only for installation; the command is code-forge. The unscoped npm package code-forge is an unrelated tool.

Inside your repository, run the setup wizard:

code-forge init

Press Enter for defaults for tools, harnesses, providers, multimodel review, keys, and engine. The wizard detects gates and proof settings, marks blanks, and lets you use, customize, or defer them. It writes .code-forge.yml and links the skill into detected harnesses. Re-running it keeps what it already wrote. For a first try without a System-1 (Jev) key:

code-forge init --no-interaction --no-jev

When ready, use --jev-ref <1Password item ID|link|op://vault/item/field> or --jev-env MY_JEV_KEY instead of --no-jev. See setup details.

What ships

5-minute quickstart

After setup, check the configuration, selected model, and installed links:

code-forge validate
code-forge resolve L1
code-forge doctor --quick
code-forge list
code-forge keys list
code-forge models
code-forge --help
code-forge version

resolve prints the provider, model, effort, fallback, and CLI for a level. doctor --quick checks config, links, and key resolution; keys list prints sources and expiry, never values, and warns with less than one hour left.

Write a brief describing the change and how you will know it works. In your agent, invoke /code-forge full path/to/brief.md: it plans, hardens, asks you to approve the plan, then codes. Use /code-forge plan|harden|code <file> for one phase at a time. Set a per-run budget.usd before starting paid sessions: one warning at 80%, no new session at 100%. The first-test tutorial walks through a complete delivery; brief mode covers one small task without a plan.

Review only

For code you already wrote, run this in the repository:

code-forge review

It reviews the branch against the merge base with the default branch, or uncommitted work on the default branch, using fresh closed-book sessions. It runs no planner, coder, or proof. Narrow with --files <paths…>, choose --base <ref>, explain with --intent "<text>", or use --json. Exit 0 means all approved or nothing to review; 1 means a finding, stop, or unavailable review; 2 means usage. See review-only details.

How it works

plan -> code -> review -> proof -> land
  ^       |       |
  |       +<--fix-+
  +-- human approval after hardening

The skill checks and hardens the plan before your approval. Coders work in blocks with explicit owned files and acceptance clauses; independent blocks can run in parallel. A worker runs fresh reviewer sessions outside the coder's sandbox. Fix rounds are bounded; unresolved work stops. Tests and red→green proof establish that a change meets its acceptance clauses before closing. You control the final merge and publish permissions; coders cannot push or open draft PRs by default. See the workflow and concepts.

Key commands

CommandUse it to
code-forge initConfigure the project and install the skill
code-forge doctor --quickCheck config, links, and keys
code-forge reviewReview existing changes without a coding run
code-forge run start|status|reload|endManage a run and inspect its spend
code-forge block open|close|stopTrack owned work and enforce its acceptance gates
code-forge review-fileEnqueue a file review or wait for its ticket
code-forge proof tier|red-greenChoose proof strength and prove a test fails before the fix
code-forge gates detect|runDiscover and run project checks
code-forge keys list|set|test|removeManage key references without printing secrets
code-forge reportInspect recorded outcomes and costs
code-forge outcome seal|checkSeal a specialist result and check its files before a caller uses it
code-forge pipeline status|nextSee specialist step states and the next ready step
code-forge logsInspect local errors; logs report previews a public issue
code-forge upgradeRefresh installed skill copies after upgrading the package
code-forge --helpList every verb; each verb prints its own usage on bad arguments

The skill normally calls run, block, worker, spawn, s2, author, facts, and review-file for you. See the workflow for these lower-level operations. To upgrade, run npm install -g @codedology/code-forge@latest, then code-forge upgrade for a version summary and release notes; add --plain for just the install lines.

Configuration reference

schema/code-forge.schema.json is the source of truth. The reference lists every key, type, and default, including budget, escalation, coder floors, review risk, multimodel, concurrency, and timeout settings. review.routes sends big files to another model with its own timeout and second level. See the routing and fallback examples for a long-context reviewer above 400 lines and fallback lists of {provider, model} objects (optional effort, never strings). block open --kind code|docs|contract overrides the kind inferred from filenames. Regenerate the reference with node scripts/gen-config-doc.mjs; add --check to check it.

Supported agents

Use Claude Code, Codex, or Grok as agent harnesses, or Solo as the execution engine. Gemini, Cursor, and Copilot have detection and skill linking only. See agent support and limits for adapters and degraded modes. Closed-book role restrictions are described below.

Security model

Review and gate rows are HMAC-signed: signer: same-user boundary only. A process running as you can read the signing key; this does not defend against that process. doctor states the limit. Provider and Jev keys resolve only in the worker or orchestrator: environment → OS keychain → 1Password (cached for 8 hours by default, at most 24) → setup prompt. Keys never reach coders; key commands print no values and output is redacted. Provider deny lists restrict coder actions.

Reviewers, judges, System 2, and the plan author see only their packet: Claude has no tools and Grok has every tool denied. Codex always has a shell, so those roles are refused by default; review.allow_open_book_codex: true opts into the risk with warnings. Errors stay in a local, cleaned log. logs report cleans twice, checks for keys, previews the issue, and sends only with your yes; CODE_FORGE_NO_ERROR_LOG=1 disables logging. Proof uses unit/feature tests and red→green, with no mutation testing or hand mutations. See security details and privacy.

Development

The package ships plain ESM .mjs files with no build step. In a checkout, run npm install, npm test, and npm run typecheck. Check the generated config reference before releasing. Record changes with npm run changelog -- <type> "<text>"; record fixed error reports with npm run known-fix -- add <fp> <version> "<summary>". npm run release -- <bump> [--dry-run] bumps versions, releases the CHANGELOG, updates the optional Latest line, checks, commits, and tags. Publish with npm publish, then push the tag; CI creates the GitHub release. See releasing.

版本与发布记录

@codedology/code-forge 共发布 45 个版本,首次发布于 2026/09/27;过去 12 个月发布了 45 个版本。

版本发布日期距今
0.21.0latest2026/11/10今天
0.20.02026/11/073 天前
0.19.12026/11/064 天前
0.19.02026/11/064 天前
0.18.02026/11/054 天前
0.17.02026/11/055 天前

关于 @codedology/code-forge 的常见问题

@codedology/code-forge 是什么?

Plan/harden/code/review orchestration CLI and Agent Skill for cross-model, parallel, evidence-gated feature delivery.

如何安装 @codedology/code-forge?

在项目目录运行 npm install @codedology/code-forge,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 code-forge,可以用 npx code-forge 直接运行。

@codedology/code-forge 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/codedology__code-forge 是否存在。

@codedology/code-forge 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@codedology/code-forge 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@codedology/code-forge 可以商用吗?

@codedology/code-forge 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@codedology/code-forge 的下载量有多少?

根据 npm 官方下载统计,@codedology/code-forge 在 2026/10/10 – 2026/11/08 这 30 天内被下载 3,592 次,日均约 120 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@codedology/code-forge 还在维护吗?

最新版本 0.21.0 发布于 2026/11/10(今天);至今共发布 45 个版本,其中过去 12 个月发布了 45 个;首次发布于 2026/09/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。