rtistree 0.5.0 → 0.5.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 +6 -0
- package/README.md +26 -19
- package/dist/art-direction.js +1 -1
- package/dist/cli.js +39 -30
- package/dist/cli.js.map +1 -1
- package/dist/starter.d.ts +7 -0
- package/dist/starter.js +38 -0
- package/dist/starter.js.map +1 -0
- package/docs/agent-art-workflow.md +2 -2
- package/docs/agent-setup.md +4 -4
- package/docs/atelier.md +3 -3
- package/docs/cli-reference.md +37 -25
- package/docs/getting-started.md +76 -52
- package/docs/next-milestone.md +5 -5
- package/docs/production.md +11 -11
- package/docs/scene-format.md +2 -2
- package/docs/studio.md +8 -8
- package/examples/hello/README.md +20 -8
- package/examples/hello/render.mjs +2 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.1
|
|
4
|
+
|
|
5
|
+
- Make `rtistree` the primary CLI executable; retain `graphics` as a compatibility alias.
|
|
6
|
+
- Add `rtistree init <directory>` to create a starter scene, sample edit, SDK example and npm render script without copying from node_modules. Existing paths are refused.
|
|
7
|
+
- Align the README, npm package and getting-started guide around one tested workflow.
|
|
8
|
+
|
|
3
9
|
## 0.5.0 — Initial public alpha
|
|
4
10
|
|
|
5
11
|
- Deterministic JSON/YAML scenes, CPU Skia rendering and portable project exports.
|
package/README.md
CHANGED
|
@@ -10,46 +10,53 @@ JSON/YAML scenes retain structure; seeded painting programs bake to replayable r
|
|
|
10
10
|
Edits have history and undo. PNG, JPEG, TIFF, PDF, SVG and portable projects are outputs.
|
|
11
11
|
Rendering uses native CPU Skia and requires no model API key, browser or GPU.
|
|
12
12
|
|
|
13
|
-
**Public alpha · v0.5.
|
|
13
|
+
**Public alpha · v0.5.1 · MIT.** APIs may change before 1.0. Technical checks do not judge artistic quality.
|
|
14
14
|
|
|
15
15
|

|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Make your first image
|
|
18
18
|
|
|
19
|
-
Requires Node.js 22
|
|
19
|
+
Requires **Node.js 22+** and npm. Linux and macOS are covered by CI.
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
|
-
|
|
22
|
+
npx rtistree@latest init my-art
|
|
23
23
|
cd my-art
|
|
24
|
-
npm
|
|
25
|
-
npm
|
|
26
|
-
mkdir hello
|
|
27
|
-
cp node_modules/rtistree/examples/hello/scene.json hello/
|
|
28
|
-
cp node_modules/rtistree/examples/hello/refine.json hello/
|
|
29
|
-
npx graphics render hello/scene.json -o hello.png
|
|
30
|
-
npx graphics apply hello/scene.json hello/refine.json
|
|
31
|
-
npx graphics render hello/scene.json -o brighter.png
|
|
32
|
-
npx graphics undo hello/scene.json
|
|
24
|
+
npm install
|
|
25
|
+
npm run render
|
|
33
26
|
```
|
|
34
27
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
Open **hello.png**. The starter includes an editable scene, a sample local edit,
|
|
29
|
+
an SDK example and npm scripts. `init` creates a new directory and refuses existing paths.
|
|
30
|
+
|
|
31
|
+
To brighten the disc and then undo the edit:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npx rtistree apply scene.json refine.json
|
|
35
|
+
npx rtistree render scene.json -o brighter.png
|
|
36
|
+
npx rtistree undo scene.json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Follow the [getting-started guide](https://rtistree.dev/docs/getting-started/) for a walkthrough
|
|
40
|
+
of the files, image comparisons, undo, portable export and SDK usage.
|
|
41
|
+
|
|
42
|
+
For an existing Node project, use `npm install rtistree`. The primary executable is
|
|
43
|
+
**`rtistree`**; **`graphics` remains a compatibility alias**. `npx rtistree --help` lists commands.
|
|
44
|
+
Structured output is JSON. Verification failures exit 2; other errors exit 1.
|
|
38
45
|
|
|
39
46
|
## Use with an agent
|
|
40
47
|
|
|
41
48
|
Read the included guidance before creating artwork:
|
|
42
49
|
|
|
43
50
|
```sh
|
|
44
|
-
npx
|
|
45
|
-
npx
|
|
51
|
+
npx rtistree art-guide
|
|
52
|
+
npx rtistree serve /absolute/path/to/my-art/scene.json
|
|
46
53
|
```
|
|
47
54
|
|
|
48
55
|
The second command starts the MCP server over stdio. See [agent setup](docs/agent-setup.md)
|
|
49
56
|
for a client configuration and SDK integration.
|
|
50
57
|
|
|
51
58
|
MCP clients receive concise instructions during initialization and can read the full guide
|
|
52
|
-
through `studioHelp` or `rtistree://guides/art-direction`. CLI agents use `
|
|
59
|
+
through `studioHelp` or `rtistree://guides/art-direction`. CLI agents use `rtistree art-guide`;
|
|
53
60
|
SDK hosts can expose `rtistreeAgentInstructions` and `artDirectionGuide`.
|
|
54
61
|
|
|
55
62
|
The guide covers representative samples, silhouettes, connected anatomy, prop perspective,
|
package/dist/art-direction.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export const artDirectionResourceUri = 'rtistree://guides/art-direction';
|
|
3
3
|
export const rtistreeAgentInstructions = [
|
|
4
4
|
'Rtistree renders deterministic graphics; successful rendering, verification, replay or export does not establish artistic quality.',
|
|
5
|
-
`Before creating or substantially revising artwork, read studioHelp or the ${artDirectionResourceUri} resource (CLI:
|
|
5
|
+
`Before creating or substantially revising artwork, read studioHelp or the ${artDirectionResourceUri} resource (CLI: rtistree art-guide; SDK: artDirectionGuide).`,
|
|
6
6
|
'Start with a representative sample before expanding an asset family. Explore distinct silhouettes, establish named connected landmarks and shared perspective guides, then inspect grayscale construction before adding detail.',
|
|
7
7
|
'Define subject-specific checks: trace shoulder–elbow–wrist attachments and equipment ownership; construct prop surfaces and fittings in one perspective; inspect animation in playback against ground contact, including travel direction, joint bend and foot lift.',
|
|
8
8
|
'Inspect actual rendered images at intended display size and full size. A contact sheet or unique frame hashes cannot establish correct motion. If vision or playback is unavailable, state that the corresponding visual review is incomplete.',
|
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createStarter } from './starter.js';
|
|
2
3
|
import { buildPipeline } from './pipeline.js';
|
|
3
4
|
import { production } from './production-workflow.js';
|
|
4
5
|
import { importSvg } from './svg.js';
|
|
@@ -21,37 +22,39 @@ import { writeArtifact, writeRender } from './artifacts.js';
|
|
|
21
22
|
import { verificationHeatmap } from './verify.js';
|
|
22
23
|
const help = `Rtistree — deterministic graphics for agents
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
25
|
+
rtistree init <directory> (create a ready-to-render starter in a new directory)
|
|
26
|
+
rtistree pipeline <project> <pipeline.json>
|
|
27
|
+
rtistree production <project> <request.json>
|
|
28
|
+
rtistree studio-help
|
|
29
|
+
rtistree art-guide (read before creating artwork; includes trial lessons and a plan template)
|
|
30
|
+
rtistree program <project> <program.json> (execute trusted local JavaScript and bake a raster asset)
|
|
31
|
+
rtistree program-replay <project> <asset-id>
|
|
32
|
+
rtistree raster-read <project> <request.json>
|
|
33
|
+
rtistree raster-write <project> <request.json>
|
|
34
|
+
rtistree import-svg <input.svg> -o <scene.json>
|
|
35
|
+
rtistree project new <directory> [--size A3] [--orientation landscape] [--ppi 300] [--bleed 3mm] [--output-dir output]
|
|
36
|
+
rtistree proof <project-or-scene> --preset print [-o proof.png]
|
|
37
|
+
rtistree preflight <project-or-scene> [--preset print]
|
|
38
|
+
rtistree export <project-or-scene> --format png|jpeg|tiff|pdf|svg|project [--preset print] [-o file]
|
|
39
|
+
rtistree render <scene.yaml> [-o render.png] [--quality draft|preview|final]
|
|
40
|
+
rtistree render-region <scene.yaml> <x> <y> <width> <height> [-o region.png]
|
|
41
|
+
rtistree inspect <scene.yaml> [--layer <id>]
|
|
42
|
+
rtistree inspect-region <scene.yaml> <x> <y> <width> <height>
|
|
43
|
+
rtistree apply <scene.yaml> <patch.json>
|
|
44
|
+
rtistree undo <scene.yaml>
|
|
45
|
+
rtistree redo <scene.yaml>
|
|
46
|
+
rtistree history <scene.yaml>
|
|
47
|
+
rtistree rebase <scene.yaml>
|
|
48
|
+
rtistree compact <scene.yaml>
|
|
49
|
+
rtistree critique <scene.yaml> <critique.json>
|
|
50
|
+
rtistree benchmark <scene.yaml> <brief.json> <checkpoint-label|finish>
|
|
51
|
+
rtistree verify <scene.yaml> [-o report.json] [--heatmap heatmap.png]
|
|
52
|
+
rtistree export <scene.yaml> -o <new-project/scene.json>
|
|
53
|
+
rtistree schema [--kind scene|command]
|
|
54
|
+
rtistree serve <scene.yaml> (MCP over stdio)
|
|
53
55
|
|
|
54
|
-
Before creating artwork, read
|
|
56
|
+
Before creating artwork, read rtistree art-guide. Technical verification does not rate artistic quality.
|
|
57
|
+
The graphics executable remains available as a compatibility alias.
|
|
55
58
|
All structured output is JSON. Verification failure exits 2; invalid input exits 1.
|
|
56
59
|
Raster scopes, masks and palette tiles default to canvas coordinates; space: layer attaches them to objects. See docs/scene-format.md.
|
|
57
60
|
`;
|
|
@@ -83,6 +86,12 @@ async function main() {
|
|
|
83
86
|
return;
|
|
84
87
|
}
|
|
85
88
|
const print = (value) => process.stdout.write(JSON.stringify(value, null, 2) + '\n');
|
|
89
|
+
if (command === 'init') {
|
|
90
|
+
if (!file || args.length)
|
|
91
|
+
throw new Error('Expected init <new-directory>');
|
|
92
|
+
print(await createStarter(file));
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
86
95
|
if (command === 'art-guide') {
|
|
87
96
|
print(artDirectionGuide);
|
|
88
97
|
return;
|
package/dist/c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,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YAClD,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACzC,MAAM;QACR,KAAK,OAAO,EAAE,CAAC;YACb,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;YAC3C,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;YACrB,MAAM;QACR,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;IACnD,CAAC;AACH,CAAC;AACD,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CACzF,CAAC;IACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
package/dist/starter.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { resolve, join } from 'node:path';
|
|
3
|
+
/** Create a starter in a new directory. Existing paths are never overwritten. */
|
|
4
|
+
export async function createStarter(directory) {
|
|
5
|
+
const destination = resolve(directory);
|
|
6
|
+
const names = ['scene.json', 'refine.json', 'render.mjs', 'README.md'];
|
|
7
|
+
const templates = await Promise.all(names.map(async (name) => [name, await readFile(new URL(`../examples/hello/${name}`, import.meta.url))]));
|
|
8
|
+
const { version } = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'));
|
|
9
|
+
const manifest = {
|
|
10
|
+
name: 'rtistree-artwork',
|
|
11
|
+
private: true,
|
|
12
|
+
type: 'module',
|
|
13
|
+
scripts: { render: 'rtistree render scene.json -o hello.png', 'render:sdk': 'node render.mjs' },
|
|
14
|
+
dependencies: { rtistree: version },
|
|
15
|
+
};
|
|
16
|
+
// mkdir is exclusive: reject files, directories and symlinks, even empty directories.
|
|
17
|
+
try {
|
|
18
|
+
await mkdir(destination);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (error.code === 'EEXIST')
|
|
22
|
+
throw new Error(`Destination already exists: ${destination}. Choose a new directory.`);
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
for (const [name, contents] of templates)
|
|
26
|
+
await writeFile(join(destination, name), contents, { flag: 'wx' });
|
|
27
|
+
await writeFile(join(destination, 'package.json'), JSON.stringify(manifest, null, 2) + '\n', {
|
|
28
|
+
flag: 'wx',
|
|
29
|
+
});
|
|
30
|
+
await writeFile(join(destination, '.gitignore'), 'node_modules/\nhistory/\n*.png\n*.evidence.json\n', { flag: 'wx' });
|
|
31
|
+
return {
|
|
32
|
+
directory: destination,
|
|
33
|
+
files: [...names, 'package.json', '.gitignore'],
|
|
34
|
+
next: ['Change into the created directory', 'npm install', 'npm run render'],
|
|
35
|
+
output: 'hello.png',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=starter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starter.js","sourceRoot":"","sources":["../src/starter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,SAAiB;IACnD,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACvC,MAAM,KAAK,GAAG,CAAC,YAAY,EAAE,aAAa,EAA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,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE;QAC3F,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;IACH,MAAM,SAAS,CACb,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,EAC/B,mDAAmD,EACnD,EAAE,IAAI,EAAE,IAAI,EAAE,CACf,CAAC;IACF,OAAO;QACL,SAAS,EAAE,WAAW;QACtB,KAAK,EAAE,CAAC,GAAG,KAAK,EAAE,cAAc,EAAE,YAAY,CAAC;QAC/C,IAAI,EAAE,CAAC,mCAAmC,EAAE,aAAa,EAAE,gBAAgB,CAAC;QAC5E,MAAM,EAAE,WAAW;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Art direction for agents
|
|
2
2
|
|
|
3
3
|
Read this before creating illustration, painting or procedural assets. The versioned
|
|
4
|
-
protocol is returned by `
|
|
4
|
+
protocol is returned by `rtistree art-guide`, included in `rtistree studio-help`
|
|
5
5
|
and MCP `studioHelp`, and exported as `artDirectionGuide` by the SDK.
|
|
6
6
|
|
|
7
7
|
MCP connections receive the core rules in the server's initialization
|
|
@@ -10,7 +10,7 @@ MCP connections receive the core rules in the server's initialization
|
|
|
10
10
|
All of these surfaces share `src/art-direction.ts`; consumers do not need access
|
|
11
11
|
to this repository or its example files. SDK hosts should put the exported
|
|
12
12
|
`rtistreeAgentInstructions` in their agent context and expose the full guide.
|
|
13
|
-
CLI hosts should read `
|
|
13
|
+
CLI hosts should read `rtistree art-guide` before authoring. A client decides how
|
|
14
14
|
to present instructions to its model; shipping guidance cannot force every client
|
|
15
15
|
or agent to read it, follow it, or exercise good visual judgment.
|
|
16
16
|
|
package/docs/agent-setup.md
CHANGED
|
@@ -48,10 +48,10 @@ establish that an image looks good.
|
|
|
48
48
|
## CLI agents
|
|
49
49
|
|
|
50
50
|
```sh
|
|
51
|
-
npx
|
|
52
|
-
npx
|
|
53
|
-
npx
|
|
54
|
-
npx
|
|
51
|
+
npx rtistree art-guide
|
|
52
|
+
npx rtistree inspect scene.json
|
|
53
|
+
npx rtistree render scene.json -o review.png
|
|
54
|
+
npx rtistree studio-help
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Read the JSON guide, open the rendered image, then choose a focused edit. Do not substitute a
|
package/docs/atelier.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Start with [Art direction for agents](agent-art-workflow.md): reference study, distinct silhouettes, construction, grayscale values and targeted revision. Its protocol is included in CLI/MCP `studioHelp`.
|
|
4
4
|
|
|
5
|
-
Rtistree provides the tools and records; a human or agent still makes visual decisions. No image-generation service or 3D renderer is required. Start with `
|
|
5
|
+
Rtistree provides the tools and records; a human or agent still makes visual decisions. No image-generation service or 3D renderer is required. Start with `rtistree studio-help` for the synchronous painting API and technique catalogue.
|
|
6
6
|
|
|
7
7
|
## Working sequence
|
|
8
8
|
|
|
@@ -44,7 +44,7 @@ CLI actions also have SDK equivalents (`buildPipeline`, `production`) and MCP to
|
|
|
44
44
|
}
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
`
|
|
47
|
+
`rtistree pipeline my-project pipeline.json` reports `built` or `cached` for each node. An input can instead use `{ "asset": "registered-asset-id" }`. Source and inline code are mutually exclusive. Only subscribed shared parameters enter a node's key. Per-node parameters override nothing implicitly: an explicit binding takes precedence over a parameter of the same name. A changed node whose PNG is identical need not rebuild its dependants. Node array order defines auto-created layer order; dependency order defines execution order. Existing layer geometry is preserved. Changing output resolution changes cache keys. Removing a node does not remove previously authored layers or assets; use normal scene commands for removal.
|
|
48
48
|
|
|
49
49
|
All node artifacts are baked before one scene transaction. A failed build can leave unused immutable files in the cache, but never a partially updated scene. Identical builds add no history. Use `expected_hash` with the SDK/MCP to reject a scene changed since inspection.
|
|
50
50
|
|
|
@@ -52,7 +52,7 @@ The exact executed graph, including inline source, is stored under `scene.metada
|
|
|
52
52
|
|
|
53
53
|
## Production requests
|
|
54
54
|
|
|
55
|
-
Create a plan with `
|
|
55
|
+
Create a plan with `rtistree production my-project plan.json`:
|
|
56
56
|
|
|
57
57
|
```json
|
|
58
58
|
{
|
package/docs/cli-reference.md
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
# CLI reference
|
|
2
2
|
|
|
3
|
-
Installing Rtistree exposes `graphics`. In a local npm project, use `npx
|
|
4
|
-
Run `
|
|
3
|
+
Installing Rtistree exposes `rtistree` and the compatibility alias `graphics`. In a local npm project, use `npx rtistree`.
|
|
4
|
+
Run `rtistree --help` for the complete installed-version reference. Structured results go to
|
|
5
5
|
stdout as JSON; errors go to stderr. Verification failure exits 2; other errors exit 1.
|
|
6
6
|
|
|
7
|
+
## Create a starter
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx rtistree@latest init my-art
|
|
11
|
+
cd my-art
|
|
12
|
+
npm install
|
|
13
|
+
npm run render
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The destination must be a new directory. The starter includes a scene, sample patch, SDK example
|
|
17
|
+
and npm render scripts. No packages are installed and no code is executed by `init` itself.
|
|
18
|
+
|
|
7
19
|
## Inspect and edit
|
|
8
20
|
|
|
9
21
|
```sh
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
rtistree inspect scene.json
|
|
23
|
+
rtistree inspect scene.json --layer title
|
|
24
|
+
rtistree inspect-region scene.json 0 0 100 100
|
|
25
|
+
rtistree render scene.json -o image.png
|
|
26
|
+
rtistree render-region scene.json 0 0 100 100 -o crop.png
|
|
27
|
+
rtistree apply scene.json patch.json
|
|
28
|
+
rtistree undo scene.json
|
|
29
|
+
rtistree redo scene.json
|
|
30
|
+
rtistree history scene.json
|
|
19
31
|
```
|
|
20
32
|
|
|
21
33
|
Coordinates are `x y width height` in canvas pixels. A patch contains a reason and a typed
|
|
@@ -25,10 +37,10 @@ See [scene format](scene-format.md) for command shapes and coordinate rules.
|
|
|
25
37
|
## Verify, review and export
|
|
26
38
|
|
|
27
39
|
```sh
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
40
|
+
rtistree verify scene.json -o report.json --heatmap heatmap.png
|
|
41
|
+
rtistree critique scene.json critique.json
|
|
42
|
+
rtistree export scene.json -o portable/scene.json
|
|
43
|
+
rtistree export scene.json --format png -o image.png
|
|
32
44
|
```
|
|
33
45
|
|
|
34
46
|
Verification measures configured technical constraints. Critiques are authored after inspecting
|
|
@@ -38,12 +50,12 @@ described in [print production](production.md).
|
|
|
38
50
|
## Studio and production
|
|
39
51
|
|
|
40
52
|
```sh
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
53
|
+
rtistree art-guide
|
|
54
|
+
rtistree studio-help
|
|
55
|
+
rtistree program scene.json program.json
|
|
56
|
+
rtistree program-replay scene.json asset-id
|
|
57
|
+
rtistree pipeline scene.json pipeline.json
|
|
58
|
+
rtistree production scene.json request.json
|
|
47
59
|
```
|
|
48
60
|
|
|
49
61
|
Read [studio](studio.md) for program requests and [staged production](atelier.md) for plans,
|
|
@@ -52,10 +64,10 @@ candidate captures, reviews and selection. Program execution is for trusted code
|
|
|
52
64
|
## Project creation and integration
|
|
53
65
|
|
|
54
66
|
```sh
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
67
|
+
rtistree project new artwork --size A3 --orientation landscape --ppi 300 --bleed 3mm
|
|
68
|
+
rtistree schema --kind scene
|
|
69
|
+
rtistree schema --kind command
|
|
70
|
+
rtistree serve /absolute/path/to/scene.json
|
|
59
71
|
```
|
|
60
72
|
|
|
61
73
|
The MCP server uses stdio. See [agent setup](agent-setup.md).
|
package/docs/getting-started.md
CHANGED
|
@@ -1,57 +1,49 @@
|
|
|
1
1
|
# Make your first image
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Create a small artwork, render it, change one part, and undo that change.
|
|
4
|
+
You need **Node.js 22 or newer** and npm. No GPU or model API key is required.
|
|
5
|
+
|
|
6
|
+
## Create your project
|
|
5
7
|
|
|
6
8
|
```sh
|
|
7
|
-
|
|
9
|
+
npx rtistree@latest init my-art
|
|
8
10
|
cd my-art
|
|
9
|
-
npm
|
|
10
|
-
npm
|
|
11
|
+
npm install
|
|
12
|
+
npm run render
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
If npm asks to install Rtistree for the first command, accept. `init` creates a new
|
|
16
|
+
`my-art` directory with a starter scene and a package.json that pins the Rtistree version.
|
|
17
|
+
It refuses existing paths, so choose a different name if `my-art` already exists.
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
Open **hello.png** in the new directory. You should see a green disc and the text
|
|
20
|
+
“Hello, Rtistree.” on a dark background. Rendering also writes an evidence JSON file.
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
The commands below run from inside `my-art` and use the locally installed package.
|
|
23
|
+
The executable is `rtistree`; older installations used `graphics`, which remains an alias.
|
|
19
24
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"bounds": [360, 60, 200, 200],
|
|
29
|
-
"shape": { "type": "ellipse", "fill": "#95b85c" }
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"id": "title",
|
|
33
|
-
"type": "text",
|
|
34
|
-
"bounds": [48, 275, 544, 80],
|
|
35
|
-
"content": "Hello, Rtistree.",
|
|
36
|
-
"style": { "font": "inter", "size": 44, "weight": "bold", "colour": "#edf3e8" }
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
```
|
|
25
|
+
## Understand the starter
|
|
26
|
+
|
|
27
|
+
| File | Purpose |
|
|
28
|
+
| -------------- | ------------------------------------------------------ |
|
|
29
|
+
| `scene.json` | Canvas, disc and title, each with an editable ID |
|
|
30
|
+
| `refine.json` | A sample patch that brightens only the disc |
|
|
31
|
+
| `render.mjs` | The same rendering workflow through the JavaScript SDK |
|
|
32
|
+
| `package.json` | Pinned dependency and the `npm run render` script |
|
|
41
33
|
|
|
42
|
-
|
|
34
|
+
`npm run render` runs `rtistree render scene.json -o hello.png`.
|
|
35
|
+
To inspect the scene's layers and bounds:
|
|
43
36
|
|
|
44
37
|
```sh
|
|
45
|
-
npx
|
|
46
|
-
npx graphics inspect scene.json
|
|
38
|
+
npx rtistree inspect scene.json
|
|
47
39
|
```
|
|
48
40
|
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
The starter is deliberately small so you can see what each edit does. Once comfortable,
|
|
42
|
+
use the [scene format](scene-format.md) to add shapes, text, images and masks.
|
|
51
43
|
|
|
52
|
-
##
|
|
44
|
+
## Make a focused edit
|
|
53
45
|
|
|
54
|
-
|
|
46
|
+
The supplied `refine.json` applies a brightness operation to the disc:
|
|
55
47
|
|
|
56
48
|
```json
|
|
57
49
|
{
|
|
@@ -66,29 +58,58 @@ Save this as `refine.json`:
|
|
|
66
58
|
}
|
|
67
59
|
```
|
|
68
60
|
|
|
61
|
+
Apply it and save a second image:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
npx rtistree apply scene.json refine.json
|
|
65
|
+
npx rtistree render scene.json -o brighter.png
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Compare **hello.png** and **brighter.png**. Only the disc becomes brighter; the title and
|
|
69
|
+
background stay the same. The reason and edit are recorded in `history/`. The authoring
|
|
70
|
+
JSON remains intact; the rendered state includes the journaled edits.
|
|
71
|
+
|
|
72
|
+
## Undo and export
|
|
73
|
+
|
|
69
74
|
```sh
|
|
70
|
-
npx
|
|
71
|
-
npx
|
|
72
|
-
npx graphics undo scene.json
|
|
73
|
-
npx graphics render scene.json -o restored.png
|
|
75
|
+
npx rtistree undo scene.json
|
|
76
|
+
npx rtistree render scene.json -o restored.png
|
|
74
77
|
```
|
|
75
78
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
`restored.png` should have the same bytes as `hello.png`.
|
|
79
|
+
**restored.png** should match **hello.png** byte for byte on the same runtime and platform.
|
|
80
|
+
Use `npx rtistree redo scene.json` if you want to restore the edit again.
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
Export the current state as a portable project:
|
|
81
83
|
|
|
82
84
|
```sh
|
|
83
|
-
npx
|
|
84
|
-
npx
|
|
85
|
+
npx rtistree export scene.json -o portable/scene.json
|
|
86
|
+
npx rtistree render portable/scene.json -o portable.png
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
The export includes referenced assets and fonts. Keep the exported directory together.
|
|
88
90
|
|
|
91
|
+
## Use an agent
|
|
92
|
+
|
|
93
|
+
Read the built-in art-direction guidance, then follow [agent setup](agent-setup.md)
|
|
94
|
+
to connect an MCP client or your own agent host:
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
npx rtistree art-guide
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
A useful first task is: “Inspect this scene, render it, and change the disc while preserving
|
|
101
|
+
the title and background.” For art creation, ask the agent to inspect silhouettes, values
|
|
102
|
+
and intended display size. Technical verification does not establish artistic quality.
|
|
103
|
+
|
|
89
104
|
## Use the SDK
|
|
90
105
|
|
|
91
|
-
|
|
106
|
+
The starter includes `render.mjs`. Run it with:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
npm run render:sdk
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Its core is:
|
|
92
113
|
|
|
93
114
|
```js
|
|
94
115
|
import { Project } from 'rtistree';
|
|
@@ -99,9 +120,12 @@ const result = await project.render();
|
|
|
99
120
|
await writeFile('sdk-output.png', result.png);
|
|
100
121
|
```
|
|
101
122
|
|
|
102
|
-
|
|
123
|
+
The SDK and CLI use the same engine. For an existing Node project, install with
|
|
124
|
+
`npm install rtistree` and import from `rtistree` directly.
|
|
103
125
|
|
|
104
|
-
##
|
|
126
|
+
## Where next?
|
|
105
127
|
|
|
106
|
-
|
|
107
|
-
|
|
128
|
+
- [CLI reference](cli-reference.md) — inspect, edit, render and export commands.
|
|
129
|
+
- [Scene format](scene-format.md) — layers, coordinates, assets and effects.
|
|
130
|
+
- [Studio](studio.md) — trusted JavaScript painting programs and replayable recipes.
|
|
131
|
+
- [Staged production](atelier.md) — compare candidates and record visual review.
|
package/docs/next-milestone.md
CHANGED
|
@@ -4,7 +4,7 @@ Status: delivered as the v0.3 milestone. This document retains the original prop
|
|
|
4
4
|
|
|
5
5
|
## Recommended order
|
|
6
6
|
|
|
7
|
-
1. Introduce a project manifest, physical document model, and `
|
|
7
|
+
1. Introduce a project manifest, physical document model, and `rtistree project new` together.
|
|
8
8
|
2. Add JPEG, TIFF and physically sized PDF exports, with colour management and output validation.
|
|
9
9
|
3. Preserve text and vector geometry in PDF; add practical compositing, selection and path tools.
|
|
10
10
|
4. Run a more demanding generated-asset integration trial, including subject extraction or seamless extension, and print the result through the new export pipeline.
|
|
@@ -16,10 +16,10 @@ The first generated-asset fitting trial is already recorded in [the example](../
|
|
|
16
16
|
Proposed syntax (not current commands):
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
rtistree project new alpine --size A3 --orientation landscape --ppi 300 --bleed 3mm --output-dir output
|
|
20
|
+
rtistree render alpine --preset screen
|
|
21
|
+
rtistree export alpine --preset print
|
|
22
|
+
rtistree preflight alpine --preset print
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Create a project manifest describing the scene entry point, output directory and export presets; a scene referencing layer fragments; `assets/`, `fonts/`, `profiles/`, `layers/`, `history/`, and the designated output directory. Include a useful starter scene, schema references, a short project README, and ignore rules for generated artifacts. Relative paths resolve consistently from the project root. Creating a project must not overwrite an existing one. Existing scene-file commands remain usable.
|
package/docs/production.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
## Start a project
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
rtistree project new alpine --size A3 --orientation landscape --ppi 300 --bleed 3mm --output-dir output
|
|
7
|
+
rtistree render alpine --preset screen
|
|
8
|
+
rtistree preflight alpine --preset print
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
`project new` accepts A3, A4, A5, Letter, or a custom pair such as `160x100` (mm) or `8.5inx11in`. It creates `rtistree.yaml`, a scene with layer fragments, assets/fonts/profiles/history directories, local JSON Schemas, a README and a designated output directory. The destination must be new. Existing scene-file commands remain available; opening a configured entry-point scene also discovers its project settings.
|
|
@@ -37,12 +37,12 @@ The renderer accepts edges up to 8,192 pixels. Print preflight also enforces a 3
|
|
|
37
37
|
## Formats and colour
|
|
38
38
|
|
|
39
39
|
```sh
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
rtistree export alpine --preset print --format pdf
|
|
41
|
+
rtistree export alpine --preset print --format tiff
|
|
42
|
+
rtistree export alpine --preset screen --format jpeg
|
|
43
|
+
rtistree export alpine --format svg -o alpine/output/artwork.svg
|
|
44
|
+
rtistree proof alpine --preset print
|
|
45
|
+
rtistree export alpine --format project -o /tmp/alpine-copy/scene.json
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
Known artwork extensions are inferred for `export` and full `render`. Region renders remain PNG. A filename extension must agree with the actual format. Portable scene export keeps its original meaning with `--format project` or a JSON/YAML destination, and copies configured print profiles/presets when exporting a project.
|
|
@@ -98,8 +98,8 @@ New scoped operations are levels, piecewise-linear RGB/channel curves, white bal
|
|
|
98
98
|
## SVG interchange and trial
|
|
99
99
|
|
|
100
100
|
```sh
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
rtistree import-svg drawing.svg -o drawing.scene.json
|
|
102
|
+
rtistree export drawing.scene.json --format svg -o drawing.svg
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
The importer supports static paths, rectangles, circles, ellipses, lines, polygons, polylines, groups, transforms and basic stroke/fill styling. Unsupported elements/attributes, remote resources, scripts and entities are rejected rather than silently dropped. Text, filters and arbitrary CSS are not imported. Exported text is outlined; complex export fallbacks are embedded images. Full round-trip equivalence for arbitrary SVG is not promised.
|
package/docs/scene-format.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scene format v1
|
|
2
2
|
|
|
3
|
-
The examples in this document are the implemented format. The original proposal is exploratory; unsupported fields are rejected, not silently interpreted. Generate machine-readable schemas with `npm run schema` or `
|
|
3
|
+
The examples in this document are the implemented format. The original proposal is exploratory; unsupported fields are rejected, not silently interpreted. Generate machine-readable schemas with `npm run schema` or `rtistree schema`.
|
|
4
4
|
|
|
5
5
|
The [production guide](production.md) describes v0.3 physical documents, exports, affine and perspective transforms, extended masks, adjustments, path commands and typography.
|
|
6
6
|
|
|
@@ -117,7 +117,7 @@ Tiles have canvas bounds, a single-character palette, and rows of keys. Rows mus
|
|
|
117
117
|
|
|
118
118
|
## Commands and verification
|
|
119
119
|
|
|
120
|
-
`apply` accepts `{reason, expected_hash?, commands: [...]}`. Commands include add/remove/move/resize layer, set opacity/blend/text/style, group siblings, align/distribute siblings, apply effect, apply raster operation, and replace tile. See `
|
|
120
|
+
`apply` accepts `{reason, expected_hash?, commands: [...]}`. Commands include add/remove/move/resize layer, set opacity/blend/text/style, group siblings, align/distribute siblings, apply effect, apply raster operation, and replace tile. See `rtistree schema --kind command` for exact fields. Removing referenced mask or verification targets is rejected unless the resulting scene is valid. Grouping can change compositing with interleaved siblings; it is an explicit structural edit without a locality promise.
|
|
121
121
|
|
|
122
122
|
Verification always checks rendered text overflow. Optional rules cover safe-area, text-overflow, text-equals, required-role, contrast, no-overlap and region-luma. Luma is a mean weighted sRGB channel value in [0,1], not perceptual luminance. `contrast` uses declared foreground and explicit background colours. `pixel-contrast` and `visible-area` use counterfactual rendered samples through `verifyRendered` / `Project.verify`. Geometry checks use transformed bounding boxes, not exact silhouettes. A heatmap marks issue bounds. All reports state these limitations.
|
|
123
123
|
|
package/docs/studio.md
CHANGED
|
@@ -7,8 +7,8 @@ Scene layers still describe composition. Programs produce ordinary pinned PNG as
|
|
|
7
7
|
## First painting
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
rtistree project new study --size 100x100
|
|
11
|
+
rtistree studio-help
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Save this as `study/programs/rubber.js`:
|
|
@@ -41,16 +41,16 @@ Save a request as `study/paint.json`:
|
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
```sh
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
rtistree program study study/paint.json
|
|
45
|
+
rtistree render study -o study/output/rubber.png
|
|
46
|
+
rtistree program-replay study rubberPaint
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
Supply exactly one of `source` (a project-local JavaScript file) or `code` (an inline function body). A program receives `art` and `parameters`, runs synchronously and returns one Canvas with the declared dimensions. It cannot import modules through the public API. A new `target` creates a raster layer; an existing target must accept an image source. Omit `target` to register an asset for subsequent mask, region or layer operations. The runner captures the starting scene hash and rejects a concurrent edit before committing.
|
|
50
50
|
|
|
51
51
|
## Authoring vocabulary
|
|
52
52
|
|
|
53
|
-
`
|
|
53
|
+
`rtistree studio-help` and the MCP `studioHelp` tool expose the complete signatures and a runnable example. TypeScript consumers can use `RasterStudio` from the SDK.
|
|
54
54
|
|
|
55
55
|
| API | Purpose |
|
|
56
56
|
| ----------------------------------------------- | ------------------------------------------------------------------------------- |
|
|
@@ -72,9 +72,9 @@ Height-field lighting is an artistic 2.5D calculation, with the viewer along pos
|
|
|
72
72
|
|
|
73
73
|
## Dense regional edits
|
|
74
74
|
|
|
75
|
-
`readRasterRegion` / `
|
|
75
|
+
`readRasterRegion` / `rtistree raster-read PROJECT request.json` read a PNG crop of the composite or an isolated layer. The request contains integer canvas-space `bounds` and an optional `target`. The result includes the scene hash and an asset descriptor ready for `registerAsset`.
|
|
76
76
|
|
|
77
|
-
`writeRasterRegion` / `
|
|
77
|
+
`writeRasterRegion` / `rtistree raster-write PROJECT request.json` consumes:
|
|
78
78
|
|
|
79
79
|
```json
|
|
80
80
|
{
|
package/examples/hello/README.md
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Your first Rtistree project
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
```sh
|
|
4
|
+
npm install
|
|
5
|
+
npm run render
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Open `hello.png`. `scene.json` defines the disc and title; `refine.json` is a sample local edit.
|
|
9
|
+
|
|
10
|
+
## Refine and undo
|
|
4
11
|
|
|
5
12
|
```sh
|
|
6
|
-
npx
|
|
7
|
-
npx
|
|
8
|
-
npx
|
|
9
|
-
npx
|
|
10
|
-
npx graphics render scene.json -o restored.png
|
|
13
|
+
npx rtistree apply scene.json refine.json
|
|
14
|
+
npx rtistree render scene.json -o brighter.png
|
|
15
|
+
npx rtistree undo scene.json
|
|
16
|
+
npx rtistree render scene.json -o restored.png
|
|
11
17
|
```
|
|
12
18
|
|
|
13
19
|
`restored.png` should match `hello.png` byte for byte on the same runtime and platform.
|
|
14
|
-
|
|
20
|
+
The edit journal lives in `history/`; keep it with the scene to retain your current edits.
|
|
21
|
+
|
|
22
|
+
## SDK
|
|
23
|
+
|
|
24
|
+
Run `npm run render:sdk` to execute `render.mjs` and create `sdk-output.png`.
|
|
25
|
+
|
|
26
|
+
[Getting started](https://rtistree.dev/docs/getting-started/) · [Agent setup](https://rtistree.dev/docs/agent-setup/)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Project, rtistreeAgentInstructions, artDirectionGuide } from 'rtistree';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
2
3
|
import { writeFile } from 'node:fs/promises';
|
|
3
4
|
|
|
4
|
-
const project = await Project.open(new URL('./scene.json', import.meta.url)
|
|
5
|
+
const project = await Project.open(fileURLToPath(new URL('./scene.json', import.meta.url)));
|
|
5
6
|
const result = await project.render();
|
|
6
7
|
await writeFile(new URL('./sdk-output.png', import.meta.url), result.png);
|
|
7
8
|
console.log({ width: result.width, height: result.height, guide: artDirectionGuide.version });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rtistree",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Deterministic, agent-operable raster graphics engine",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"format:check": "prettier --check src tests scripts docs examples schemas README.md package.json tsconfig.json .github .prettierrc.json",
|
|
16
16
|
"performance": "node --import tsx scripts/performance.ts",
|
|
17
17
|
"prepack": "npm run build",
|
|
18
|
-
"package:check": "node scripts/package-smoke.mjs"
|
|
18
|
+
"package:check": "node scripts/package-smoke.mjs",
|
|
19
|
+
"rtistree": "node --import tsx src/cli.ts"
|
|
19
20
|
},
|
|
20
21
|
"keywords": [
|
|
21
22
|
"graphics",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
".": "./dist/index.js"
|
|
53
54
|
},
|
|
54
55
|
"bin": {
|
|
56
|
+
"rtistree": "./dist/cli.js",
|
|
55
57
|
"graphics": "./dist/cli.js"
|
|
56
58
|
},
|
|
57
59
|
"engines": {
|