@codedology/code-forge 0.1.0 → 0.2.1
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/CHANGELOG.md +43 -0
- package/README.md +29 -6
- package/docs/README.md +4 -1
- package/docs/reference/blocks.json +13 -2
- package/package.json +6 -2
- package/skill/references/review.md +4 -0
- package/skill/scripts/forge +1 -1
- package/src/cli/review.mjs +610 -0
- package/src/install/wizard/answers.mjs +102 -46
- package/src/install/wizard/run.mjs +37 -7
- package/src/install/wizard/steps.mjs +134 -34
- package/src/install/wizard/summary.mjs +168 -0
- package/src/worker/engine.mjs +50 -8
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,49 @@ All notable changes to `@codedology/code-forge` are recorded here. Format loosel
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/); versions follow semver ahead of a 1.0.0 that
|
|
5
5
|
waits on a second real consumer (plan §10.4, Q17).
|
|
6
6
|
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.2.1] — 2026-10-01
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **Two publish paths:** publish by hand with `npm publish` before pushing the tag (the tag run sees
|
|
14
|
+
the version on npm, skips its own publish and still creates the GitHub release), or push only and
|
|
15
|
+
let CI publish with provenance (needs `NPM_TOKEN`). See `docs/releasing.md`.
|
|
16
|
+
- `init` no longer asks for gates or proof settings one by one: it reads them from the project
|
|
17
|
+
(gates from `detect`, `link_dirs` from the project's manifests, `copy_untracked` only for files
|
|
18
|
+
that exist, high-risk paths blank, isolation `export`), prints a "Project settings (detected)" summary that marks every blank
|
|
19
|
+
and names the keys to edit, then asks one choice: Use these, Customize now (the eight questions,
|
|
20
|
+
pre-filled) or Leave for later. `--no-interaction` asks nothing; agent JSON gains `settings` and
|
|
21
|
+
`blank`. Every question has a one-line hint; a re-run fills a gate that was blank and keeps
|
|
22
|
+
hand-set ones.
|
|
23
|
+
|
|
24
|
+
## [0.2.0] — 2026-09-26
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **`code-forge review`** — review only: runs the review engine on changes you already have (your
|
|
29
|
+
branch against the merge base with the default branch, your uncommitted work, or `--files`), with
|
|
30
|
+
no plan, coder or proof, and never closes a block. One verdict per file, a fix list, totals or one
|
|
31
|
+
JSON document (`--json`); exit 0 only when every file is approved. The run and its worker are
|
|
32
|
+
always ended, also on Ctrl-C, SIGTERM and timeouts. See `docs/review-only.md`.
|
|
33
|
+
- **Release tools:** `npm run release -- <patch|minor|major|x.y.z>` bumps every version location,
|
|
34
|
+
moves the changelog, runs every check (with rollback), commits and tags; `npm run changelog --
|
|
35
|
+
<type> "text"` records changes as you go. See `docs/releasing.md`.
|
|
36
|
+
- **GitHub Releases:** a tag push publishes to npm and then creates the GitHub Release from the
|
|
37
|
+
changelog, with links to the npm version and the changelog.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- **Reviewers see the acceptance clauses.** Every review packet now carries the block's acceptance
|
|
42
|
+
clauses (redacted, cut to fit the packet budget); a block without readable clauses is still
|
|
43
|
+
reviewed, with `(acceptance unavailable)`.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- CI is green on Linux: a macOS-only case-insensitivity test now skips on case-sensitive
|
|
48
|
+
filesystems, and the Node 22/24 matrix no longer cancels one job when the other fails.
|
|
49
|
+
|
|
7
50
|
## [0.1.0] — first release
|
|
8
51
|
|
|
9
52
|
The `plan` → `harden` → `code` → `review` pipeline for cross-model, parallel, evidence-gated
|
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@ for cross-model, parallel, evidence-gated feature delivery — on Claude Code, C
|
|
|
10
10
|
|
|
11
11
|
## What ships
|
|
12
12
|
|
|
13
|
-
- A CLI (`code-forge`), installed globally
|
|
14
|
-
harness (Claude Code, Codex, Grok, …).
|
|
13
|
+
- A CLI (`code-forge`), installed globally with `npm install -g @codedology/code-forge`; `code-forge
|
|
14
|
+
init` then links the skill into every detected harness (Claude Code, Codex, Grok, …).
|
|
15
15
|
- One Agent Skill (`skill/SKILL.md` + `references/`) that is prose only — every fact (model ids,
|
|
16
16
|
efforts, commands, thresholds, paths) lives in config or in the CLI, never in the skill text.
|
|
17
17
|
- A JSON Schema for `.code-forge.yml` (`schema/code-forge.schema.json`), documented in
|
|
@@ -23,14 +23,20 @@ policy and security model; `docs/reference/blocks.json` lists the build blocks.
|
|
|
23
23
|
## Install
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
|
|
26
|
+
npm install -g @codedology/code-forge
|
|
27
|
+
code-forge init
|
|
27
28
|
```
|
|
28
29
|
|
|
29
|
-
The
|
|
30
|
-
|
|
30
|
+
The scoped name is used only to install; the command is `code-forge`. The unscoped npm package
|
|
31
|
+
`code-forge` is a different, unrelated tool.
|
|
32
|
+
|
|
33
|
+
The wizard asks a few short questions (tools, harnesses, provider matrix, multimodel, keys,
|
|
34
|
+
engine), every one with a default on Enter. Gates and proof settings come from the project:
|
|
35
|
+
`init` prints what it found, marks what it left blank, and lets you use, customize or leave them
|
|
36
|
+
for later. Non-interactively:
|
|
31
37
|
|
|
32
38
|
```bash
|
|
33
|
-
|
|
39
|
+
code-forge init --no-interaction --no-jev
|
|
34
40
|
```
|
|
35
41
|
|
|
36
42
|
`--no-jev` skips the System-1 key for a first try; drop it and pass `--jev-ref op://vault/item/field`
|
|
@@ -51,6 +57,20 @@ code-forge --help # every verb, one per line
|
|
|
51
57
|
code-forge version
|
|
52
58
|
```
|
|
53
59
|
|
|
60
|
+
## Review only
|
|
61
|
+
|
|
62
|
+
To review code you already wrote — no plan, no coder, no proof — run this in the repository:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
code-forge review # verdict + fix list per changed file; exit 0 only if all approved
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
It reviews your branch against the merge base with the default branch (on the default branch: your
|
|
69
|
+
uncommitted work), with the same fresh, closed-book reviewer sessions a block gets. Narrow it with
|
|
70
|
+
`--files <path…>`, state the change with `--intent "<text>"`, pick the base with `--base <ref>`, or
|
|
71
|
+
get one JSON document with `--json`. Exit codes: `0` all approved or nothing to review, `1` any
|
|
72
|
+
finding, stop or unavailable review, `2` usage. See [docs/review-only.md](docs/review-only.md).
|
|
73
|
+
|
|
54
74
|
## The verbs
|
|
55
75
|
|
|
56
76
|
Verbs are discovered from `src/cli/*.mjs` — adding one never touches the router
|
|
@@ -66,6 +86,7 @@ usage line.
|
|
|
66
86
|
| `run` | `code-forge run start [--cwd <dir>] [--run <id>] [--engine <e>] [--worker-pid <pid>]` · `run start --reattach --run <id>` · `run status --run <id>` · `run end --run <id>` |
|
|
67
87
|
| `block` | `code-forge block open <id> --run <r> --level L<n> --owned <paths…> --acceptance <file>` · `block attempt\|rebase\|claim\|close\|stop\|waive …` (§4.9; `waive` is human-only) |
|
|
68
88
|
| `worker` | `code-forge worker --run <id> [--cwd <dir>] [--poll-ms <n>] [--once]` — started detached by `run start`, never by a coder |
|
|
89
|
+
| `review` | `code-forge review [--base <ref>] [--files <path…>] [--acceptance <file> \| --intent "<text>"] [--run <id>] [--max <seconds>] [--json] [--keep-run]` — review only: no coder, no proof, never closes a block |
|
|
69
90
|
| `review-file` | `code-forge review-file <path> --block <id> [--run <id>]` (enqueue) · `review-file --wait <ticket> [--max <seconds>s]` (poll) |
|
|
70
91
|
| `spawn` | `code-forge spawn --level L<n> --role <role> --brief <file> [--schema <file>] [--cwd <dir>] [--run <id>] [--block <id>] [--timeout <s>] [--background]` |
|
|
71
92
|
| `s2` | `code-forge s2 --packet <file.json> [--run <id>] [--block <id>] [--timeout <s>]` |
|
|
@@ -125,3 +146,5 @@ npm run typecheck # tsc --checkJs --noEmit
|
|
|
125
146
|
Node >= 22 required (ruling R7). No build step — the package ships plain ESM `.mjs`, run directly
|
|
126
147
|
by Node. `docs/reference/blocks.json` maps each build block to the files it owns and what it
|
|
127
148
|
depends on, kept in sync with the maintainer's design plan.
|
|
149
|
+
|
|
150
|
+
Releasing: record changes with `npm run changelog -- <type> "<text>"`, then `npm run release -- <patch|minor|major|x.y.z> [--dry-run]` bumps, commits and tags (it never pushes or publishes). See [docs/releasing.md](docs/releasing.md).
|
package/docs/README.md
CHANGED
|
@@ -13,10 +13,12 @@ disagree, the verb is right: each verb prints its own usage line when its argume
|
|
|
13
13
|
| 3 | [how-it-works.md](how-it-works.md) | follow the full workflow from a brief to a closed block, and see who does what and where state lives |
|
|
14
14
|
| 4 | [getting-started.md](getting-started.md) | install it, answer `init`, run `doctor`, and try the first commands |
|
|
15
15
|
| 5 | [tutorial-first-test.md](tutorial-first-test.md) | run one real end-to-end test: build the code-forge marketing site in a new repo |
|
|
16
|
+
| 5a | [review-only.md](review-only.md) | only review code you already wrote: a branch, uncommitted work or some files, with CI exit codes |
|
|
16
17
|
| 6 | [examples/marketing-site/brief.md](examples/marketing-site/brief.md) | copy the brief the tutorial uses |
|
|
17
18
|
| 7 | [marketing.md](marketing.md) | read the product story: the problem, the promise, the honest limits |
|
|
18
19
|
|
|
19
|
-
New to the tool? Read 1 → 3 → 4, then do 5. Keep 2 open as a glossary.
|
|
20
|
+
New to the tool? Read 1 → 3 → 4, then do 5. Keep 2 open as a glossary. Only want reviews? Read 4,
|
|
21
|
+
then 5a.
|
|
20
22
|
|
|
21
23
|
## Reference pages (already in the repo)
|
|
22
24
|
|
|
@@ -25,6 +27,7 @@ New to the tool? Read 1 → 3 → 4, then do 5. Keep 2 open as a glossary.
|
|
|
25
27
|
| [reference/config.md](reference/config.md) | every `.code-forge.yml` key, its type and default. Generated from `schema/code-forge.schema.json` |
|
|
26
28
|
| [reference/blocks.json](reference/blocks.json) | the build blocks of this package and what each one owns |
|
|
27
29
|
| [marketing/code-forge-story.md](marketing/code-forge-story.md) | the marketing content bank (copy, lessons, what not to claim) |
|
|
30
|
+
| [releasing.md](releasing.md) | for maintainers: record changes (`npm run changelog`), cut a release with one command (`npm run release`), GitHub Releases, what stays manual |
|
|
28
31
|
| [`skill/SKILL.md`](../skill/SKILL.md) and [`skill/references/`](../skill/references/) | the Agent Skill the orchestrator follows. The deepest and most exact description of the rules |
|
|
29
32
|
|
|
30
33
|
## Conventions in these pages
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "hand-maintained; checked against plan §10.4 + NIGHT-LOG by test/docs-blocks.test.mjs. Ids = every `| **Bxx** |` row in plans/code-forge-plan-v1.3.md §10.4 Waves 2-6 (19 ids), plus the blocks the root orchestrator added during the night run of 2026-09-25 that are not in that table (plans/NIGHT-LOG.md): B1.2, B4.1, B11.1, B12c (B3.1 was already in the v1.3 §10.4 table). Wave 0-1 blocks (B0-B8) are the pre-v1.3 baseline landed before this plan revision; they have no entry under blocks and are listed in baseline_ids so every depends_on id resolves; see plans/code-forge-plan-v1.3.md §10.2-§10.3 for their record. B10c is listed with deleted:true — the maintainer answered Q16 'cut' on 2026-09-25, so B10c (consumer-facing mutation-testing tools) never lands.",
|
|
2
|
+
"$comment": "hand-maintained; checked against plan §10.4 + NIGHT-LOG by test/docs-blocks.test.mjs. Ids = every `| **Bxx** |` row in plans/code-forge-plan-v1.3.md §10.4 Waves 2-6 (19 ids), plus the blocks the root orchestrator added during the night run of 2026-09-25 that are not in that table (plans/NIGHT-LOG.md): B1.2, B4.1, B11.1, B12c (B3.1 was already in the v1.3 §10.4 table); plus B22 (the review-only verb), which the root added on 2026-09-26 after the night run. Wave 0-1 blocks (B0-B8) are the pre-v1.3 baseline landed before this plan revision; they have no entry under blocks and are listed in baseline_ids so every depends_on id resolves; see plans/code-forge-plan-v1.3.md §10.2-§10.3 for their record. B10c is listed with deleted:true — the maintainer answered Q16 'cut' on 2026-09-25, so B10c (consumer-facing mutation-testing tools) never lands.",
|
|
3
3
|
"checked_against": [
|
|
4
4
|
"plans/code-forge-plan-v1.3.md §10.4",
|
|
5
5
|
"plans/NIGHT-LOG.md"
|
|
6
6
|
],
|
|
7
|
-
"block_count":
|
|
7
|
+
"block_count": 24,
|
|
8
8
|
"baseline_ids": ["B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8"],
|
|
9
9
|
"baseline_note": "Wave 0-1 blocks, landed before v1.3; depends_on may name them, but they have no entry under blocks.",
|
|
10
10
|
"blocks": {
|
|
@@ -283,6 +283,17 @@
|
|
|
283
283
|
"src/proof/tools/**", "src/proof/nightly.mjs", "ci/nightly-proof.yml", "test/proof/tools/**", "test/proof/nightly.test.mjs"
|
|
284
284
|
],
|
|
285
285
|
"depends_on": ["B10a", "B10b"]
|
|
286
|
+
},
|
|
287
|
+
"B22": {
|
|
288
|
+
"title": "Review-only verb: code-forge review (base/file discovery, run start -> block open -> review-file -> block stop -> run end) and its docs",
|
|
289
|
+
"wave": 6,
|
|
290
|
+
"level": "L2",
|
|
291
|
+
"status": "in_review",
|
|
292
|
+
"owned": [
|
|
293
|
+
"src/cli/review.mjs", "test/cli/review.test.mjs", "docs/review-only.md"
|
|
294
|
+
],
|
|
295
|
+
"depends_on": ["B11", "B12a", "B12c"],
|
|
296
|
+
"note": "root-added 2026-09-26 (after the night run); not in the v1.3 §10.4 table"
|
|
286
297
|
}
|
|
287
298
|
}
|
|
288
299
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codedology/code-forge",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Plan/harden/code/review orchestration CLI and Agent Skill for cross-model, parallel, evidence-gated feature delivery.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,13 +29,17 @@
|
|
|
29
29
|
"docs/reference",
|
|
30
30
|
"examples",
|
|
31
31
|
"scripts",
|
|
32
|
+
"!scripts/release.mjs",
|
|
33
|
+
"!scripts/changelog.mjs",
|
|
32
34
|
"README.md",
|
|
33
35
|
"CHANGELOG.md",
|
|
34
36
|
"LICENSE"
|
|
35
37
|
],
|
|
36
38
|
"scripts": {
|
|
37
39
|
"test": "CODE_FORGE_NO_LEAK=snapshot node --import ./test/helpers/isolate.mjs --test test/no-leak.test.mjs && node --import ./test/helpers/isolate.mjs --experimental-test-module-mocks --test 'test/**/*.test.mjs' && CODE_FORGE_NO_LEAK=final node --import ./test/helpers/isolate.mjs --test test/no-leak.test.mjs",
|
|
38
|
-
"typecheck": "tsc --checkJs --noEmit"
|
|
40
|
+
"typecheck": "tsc --checkJs --noEmit",
|
|
41
|
+
"release": "node scripts/release.mjs",
|
|
42
|
+
"changelog": "node scripts/changelog.mjs"
|
|
39
43
|
},
|
|
40
44
|
"dependencies": {
|
|
41
45
|
"@clack/prompts": "1.8.1",
|
|
@@ -40,3 +40,7 @@ Two L2 reviewers, one per effective provider (`resolve(L2)` and `review.second_l
|
|
|
40
40
|
## §7 The review budget per block
|
|
41
41
|
|
|
42
42
|
`review.block_budget_tokens` (and optionally `review.block_budget_usd`) bounds every review, recheck, judge and S2 session made for the block. When the forecast exceeds it the worker degrades one step at a time, cheapest first: batch small files of one tier into one packet (`review.batch_small_files`) → one judge per block instead of per file → standard band `full` → `quick` → high tier `A + B + judge` → one `full` L2 + judge, the floor. Tools-only is never a review; a light `quick` stays `quick`. Still over ⇒ `review.over_budget`: raise the budget once per run (a config edit by the human, on record) or split the block — never silently, never below the floors. The ledger keeps `depth_unconstrained` and `depth_chosen` per file so `forge report` can show `missed_after_degrade`.
|
|
43
|
+
|
|
44
|
+
## §8 Review only
|
|
45
|
+
|
|
46
|
+
A human who wants a review and nothing else runs `forge review`: it reviews the changed files in one `R-<timestamp>` block at L2, prints the verdicts, then stops the block and ends the run — no plan, no coder, no proof, never a close. Inside a block the orchestrator keeps using `forge review-file`.
|
package/skill/scripts/forge
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
# copied install with no package next to it); `test/skill/shim.test.mjs` asserts the pin
|
|
11
11
|
# equals package.json's version.
|
|
12
12
|
# The shim holds no logic of its own: every verb, flag and message is the CLI's.
|
|
13
|
-
PINNED_VERSION="0.1
|
|
13
|
+
PINNED_VERSION="0.2.1"
|
|
14
14
|
set -eu
|
|
15
15
|
|
|
16
16
|
self="$0"
|