diff --git a/.agents/skills/integrate-game-art/SKILL.md b/.agents/skills/integrate-game-art/SKILL.md new file mode 100644 index 0000000..943b7f4 --- /dev/null +++ b/.agents/skills/integrate-game-art/SKILL.md @@ -0,0 +1,70 @@ +--- +name: integrate-game-art +description: "Plan, obtain, validate, and integrate DreamLayer artwork into a playable game while preserving its mechanics. Use when a game needs background, character, UI, or sprite files; not for gameplay-only work or another image service." +--- + +# Integrate game art + +Inspect the game before requesting art: engine and import settings, logical world units, +collision bodies, pivots, sprite dimensions, alpha requirements, animation timing, camera, +and asset paths. Separate visual dimensions from physics dimensions. Keep a playable +geometry baseline and record the behavior that must survive the artwork swap. + +Read the bundled [workflow contract](references/workflow-contract.md) for supported clients, +authentication, billing, polling, download, and recovery. Installation supplies instructions; +it does not connect or authenticate an MCP server. Inspect the actual available tool schema. +If the connected client lacks download or sprite fields, use the supported client from that +contract, or retain bundled assets and report the limitation. + +## Plan and obtain + +- Inventory reusable artwork and its license/provenance first. A downloaded sample is not + a new generation. Code-authored scenery should be labeled separately from DreamLayer art. +- Produce a dry-run asset plan with role, output path, dimensions/aspect, reference, operation, + transparency, and estimated credits. Read live capabilities and balance before paid work. + Track the total authorized cap across all operations, including cutouts and animation. + Reserve an unresolved job's estimated charge until its canonical status resolves it. +- For image operations use `generate-or-edit-image`; for animation use + `sprite-sheet-from-reference`, when installed. Both follow the bundled contract. If a task + skill is absent, use the contract and actual public schemas instead of inventing fields. +- Save request, idempotency key, execution ID, and event cursor locally without credentials. + Resume existing jobs after interruptions. Download to a new path and verify the file before + marking an asset available. Never rerun generation to repair a download failure. + +## Integrate and verify + +Inspect each image. Check decoded format, dimensions, actual transparent pixels, visual +coherence, ground anchor/pivot, frame order, and per-frame timing. Prefer a reviewed still +frame when animation details drift; disclose the decision. Use the delivered timing array +when it differs from a rounded duration label, and record the discrepancy. + +Keep collision and timing code independent of texture size. Add a baseline/artwork toggle +when useful for comparison. Validate both modes with the same deterministic input sequence, +then play a complete loop in the actual browser or engine. Test controls, pause/restart, +small screens, and reduced motion for decorative animation. For Godot/Unity use their +installed import skills; do not claim an engine was tested because its import files exist. + +Record file digests, dimensions, upstream revision or generation execution ID, transformations, +historical costs separately from new charges, and any unverified behavior. + +## Runnable example, no paid calls + +The [Relay garden example](https://github.com/TheDesignFounder/dreamlayer-game-assets) +bundles an original DreamLayer environment, six matching game objects, and a geometry mode. With Node.js 22.19+ on the 22.x line (or another REA-supported version): + +```sh +git clone https://github.com/TheDesignFounder/dreamlayer-game-assets.git +cd dreamlayer-game-assets +npm ci +npm test +npm run validate:assets +npm run art:plan +npm start +``` + +Open `http://127.0.0.1:4177/demo/`. No viewer key or credits are needed. Its plan script +submits nothing and defaults to a zero-credit cap. New generation uses the authenticated +canonical workflow above. The example's read-only recovery script never resubmits a job. + +Only when the task actually needs artifact investigation, read +[the REA companion](references/rea-investigation.md). Ordinary game artwork does not require REA. diff --git a/.agents/skills/integrate-game-art/references/rea-investigation.md b/.agents/skills/integrate-game-art/references/rea-investigation.md new file mode 100644 index 0000000..757271b --- /dev/null +++ b/.agents/skills/integrate-game-art/references/rea-investigation.md @@ -0,0 +1,27 @@ +# Optional REA investigation + +Use Reverse Engineer Anything when a shipped, compiled, or minified artifact helps answer +a bounded behavior question. If readable project source already answers the question, +inspect it directly. DreamLayer is an artwork tool, not a REA analysis provider. + +Record origin, version/revision, redistribution permission, SHA-256, and the exact question. +Preserve original bytes and keep analysis Evidence private until sanitized. Distinguish +REA observations, the agent's interpretation, runtime verification, and later source checks. + +Relay garden uses a self-authored minified JavaScript target. It is a controlled example, +not a recovered commercial game and not a blind evaluation. REA 6.5.0 locates a Math.hypot +read, its enclosing function, and a caller relation. The agent interprets the artifact's +formula; numeric runtime tests establish the bounded equivalence. REA reports partial +coverage and unresolved facts, which must remain in the account. + +```sh +# Inside the example after npm ci; the pinned REA CLI needs no native analysis engine. +npm run investigate +npm test +``` + +Full local Evidence is written under `.local/`. The public excerpt is not an importable +Evidence record. Read the example's `docs/rea-workflow.md` for exact commands and boundaries. +For REA MCP setup use [REA's official installation guide](https://github.com/morluto/rea/blob/main/docs/installation.md). +Do not claim CLI execution proves MCP registration. Installing this skill registers neither +REA nor DreamLayer. Do not modify upstream REA for the example. diff --git a/.agents/skills/integrate-game-art/references/workflow-contract.md b/.agents/skills/integrate-game-art/references/workflow-contract.md new file mode 100644 index 0000000..bd6ce94 --- /dev/null +++ b/.agents/skills/integrate-game-art/references/workflow-contract.md @@ -0,0 +1,46 @@ +# DreamLayer workflow contract + +Use the installed DreamLayer MCP tools, or the pinned CLI when MCP is unavailable. +Read the actual tool schema before calling. Never pass fields a client does not expose. + +## Setup +Requires Node.js >=22.12 and a DreamLayer API key from https://platform.dreamlayer.io. +Install the supported sprite-capable beta: `npm install -g dreamlayer@0.4.0-beta.4`. +MCP: `npx -y @dreamlayer/mcp@0.4.0-beta.5`. Supply DREAMLAYER_API_KEY to the server process using the host's secret settings. Never commit keys or put them in prompts. +The stable npm tag remains 0.3.0. Do not claim it supports this complete workflow. + +## Before paid work +1. Read dreamlayer_capabilities and dreamlayer_balance (or CLI capabilities/balance --json). If either fails, resolve it before spending. +2. Confirm the requested operation is advertised. Ordinary completed image operations currently cost one credit each; obtain the live cost from capabilities. A multi-step edit and cutout costs two operations. +3. Use the user's already-authorized operation, number of outputs and credit budget. Ask only if missing. Never buy credits or expand the batch implicitly. +4. For file operations, verify input readability and a new output path before submitting. Upload once using dreamlayer_upload_image; preserve its input_asset_id. +5. Save a unique idempotency_key and the complete request locally before each generation. Do not store credentials in the job record. + +## Execute and recover +Select operation explicitly: text_to_image; image_to_image; background_remove; upscale; sprite_sheet. +All except text_to_image require input_asset_id. Generate returns execution_id, status, asset, question and last_event_id. +Preserve IDs/cursor after each response. For running work, call dreamlayer_execution or dreamlayer_events; do not generate a replacement after a timeout. +A needs_input result is a question, not a failed generation. Continue using conversation_id and respond. +For completed work, dreamlayer_download writes an absolute new local path. Never treat a returned asset URL as proof that the local file exists. +On a local download error, repair the destination and download the same execution. +File-based CLI retries upload a new asset; use status and download after uncertainty rather than rerunning the paid command. +Stop at insufficient credits, invalid request, unsupported operation, or an unresolved contract error. Keep recoverable state; do not loop paid retries. + +## Output acceptance +Inspect the saved image or preview. Check dimensions, transparency if requested, text spelling, reference fidelity and the intended use. Label uninspected outputs. +PNG output does not establish SVG/vector structure, pixel-perfect art, trademark clearance, print compliance, exact product fidelity or consistent animation. +API documentation: https://docs.dreamlayer.io/agent-api +Recovery: https://docs.dreamlayer.io/agent-api/jobs-and-events + +## CLI examples +```sh +dreamlayer capabilities --json +dreamlayer balance --json +dreamlayer generate "Original image brief" --aspect 1:1 --idempotency-key UNIQUE_SAVED_KEY --out concept.png --json +dreamlayer edit reference.png "Change the background to a simple studio scene" --idempotency-key UNIQUE_SAVED_KEY --out edited.png --json +dreamlayer cutout reference.png --idempotency-key UNIQUE_SAVED_KEY --out cutout.png --json +dreamlayer status EXECUTION_ID --json +dreamlayer download EXECUTION_ID --out recovered.png --json +``` +Placeholder IDs and keys must be replaced. Check CLI --help for supported flags; --max-credits is for sprite jobs. + diff --git a/.cline/skills/integrate-game-art/SKILL.md b/.cline/skills/integrate-game-art/SKILL.md new file mode 100644 index 0000000..943b7f4 --- /dev/null +++ b/.cline/skills/integrate-game-art/SKILL.md @@ -0,0 +1,70 @@ +--- +name: integrate-game-art +description: "Plan, obtain, validate, and integrate DreamLayer artwork into a playable game while preserving its mechanics. Use when a game needs background, character, UI, or sprite files; not for gameplay-only work or another image service." +--- + +# Integrate game art + +Inspect the game before requesting art: engine and import settings, logical world units, +collision bodies, pivots, sprite dimensions, alpha requirements, animation timing, camera, +and asset paths. Separate visual dimensions from physics dimensions. Keep a playable +geometry baseline and record the behavior that must survive the artwork swap. + +Read the bundled [workflow contract](references/workflow-contract.md) for supported clients, +authentication, billing, polling, download, and recovery. Installation supplies instructions; +it does not connect or authenticate an MCP server. Inspect the actual available tool schema. +If the connected client lacks download or sprite fields, use the supported client from that +contract, or retain bundled assets and report the limitation. + +## Plan and obtain + +- Inventory reusable artwork and its license/provenance first. A downloaded sample is not + a new generation. Code-authored scenery should be labeled separately from DreamLayer art. +- Produce a dry-run asset plan with role, output path, dimensions/aspect, reference, operation, + transparency, and estimated credits. Read live capabilities and balance before paid work. + Track the total authorized cap across all operations, including cutouts and animation. + Reserve an unresolved job's estimated charge until its canonical status resolves it. +- For image operations use `generate-or-edit-image`; for animation use + `sprite-sheet-from-reference`, when installed. Both follow the bundled contract. If a task + skill is absent, use the contract and actual public schemas instead of inventing fields. +- Save request, idempotency key, execution ID, and event cursor locally without credentials. + Resume existing jobs after interruptions. Download to a new path and verify the file before + marking an asset available. Never rerun generation to repair a download failure. + +## Integrate and verify + +Inspect each image. Check decoded format, dimensions, actual transparent pixels, visual +coherence, ground anchor/pivot, frame order, and per-frame timing. Prefer a reviewed still +frame when animation details drift; disclose the decision. Use the delivered timing array +when it differs from a rounded duration label, and record the discrepancy. + +Keep collision and timing code independent of texture size. Add a baseline/artwork toggle +when useful for comparison. Validate both modes with the same deterministic input sequence, +then play a complete loop in the actual browser or engine. Test controls, pause/restart, +small screens, and reduced motion for decorative animation. For Godot/Unity use their +installed import skills; do not claim an engine was tested because its import files exist. + +Record file digests, dimensions, upstream revision or generation execution ID, transformations, +historical costs separately from new charges, and any unverified behavior. + +## Runnable example, no paid calls + +The [Relay garden example](https://github.com/TheDesignFounder/dreamlayer-game-assets) +bundles an original DreamLayer environment, six matching game objects, and a geometry mode. With Node.js 22.19+ on the 22.x line (or another REA-supported version): + +```sh +git clone https://github.com/TheDesignFounder/dreamlayer-game-assets.git +cd dreamlayer-game-assets +npm ci +npm test +npm run validate:assets +npm run art:plan +npm start +``` + +Open `http://127.0.0.1:4177/demo/`. No viewer key or credits are needed. Its plan script +submits nothing and defaults to a zero-credit cap. New generation uses the authenticated +canonical workflow above. The example's read-only recovery script never resubmits a job. + +Only when the task actually needs artifact investigation, read +[the REA companion](references/rea-investigation.md). Ordinary game artwork does not require REA. diff --git a/.cline/skills/integrate-game-art/references/rea-investigation.md b/.cline/skills/integrate-game-art/references/rea-investigation.md new file mode 100644 index 0000000..757271b --- /dev/null +++ b/.cline/skills/integrate-game-art/references/rea-investigation.md @@ -0,0 +1,27 @@ +# Optional REA investigation + +Use Reverse Engineer Anything when a shipped, compiled, or minified artifact helps answer +a bounded behavior question. If readable project source already answers the question, +inspect it directly. DreamLayer is an artwork tool, not a REA analysis provider. + +Record origin, version/revision, redistribution permission, SHA-256, and the exact question. +Preserve original bytes and keep analysis Evidence private until sanitized. Distinguish +REA observations, the agent's interpretation, runtime verification, and later source checks. + +Relay garden uses a self-authored minified JavaScript target. It is a controlled example, +not a recovered commercial game and not a blind evaluation. REA 6.5.0 locates a Math.hypot +read, its enclosing function, and a caller relation. The agent interprets the artifact's +formula; numeric runtime tests establish the bounded equivalence. REA reports partial +coverage and unresolved facts, which must remain in the account. + +```sh +# Inside the example after npm ci; the pinned REA CLI needs no native analysis engine. +npm run investigate +npm test +``` + +Full local Evidence is written under `.local/`. The public excerpt is not an importable +Evidence record. Read the example's `docs/rea-workflow.md` for exact commands and boundaries. +For REA MCP setup use [REA's official installation guide](https://github.com/morluto/rea/blob/main/docs/installation.md). +Do not claim CLI execution proves MCP registration. Installing this skill registers neither +REA nor DreamLayer. Do not modify upstream REA for the example. diff --git a/.cline/skills/integrate-game-art/references/workflow-contract.md b/.cline/skills/integrate-game-art/references/workflow-contract.md new file mode 100644 index 0000000..bd6ce94 --- /dev/null +++ b/.cline/skills/integrate-game-art/references/workflow-contract.md @@ -0,0 +1,46 @@ +# DreamLayer workflow contract + +Use the installed DreamLayer MCP tools, or the pinned CLI when MCP is unavailable. +Read the actual tool schema before calling. Never pass fields a client does not expose. + +## Setup +Requires Node.js >=22.12 and a DreamLayer API key from https://platform.dreamlayer.io. +Install the supported sprite-capable beta: `npm install -g dreamlayer@0.4.0-beta.4`. +MCP: `npx -y @dreamlayer/mcp@0.4.0-beta.5`. Supply DREAMLAYER_API_KEY to the server process using the host's secret settings. Never commit keys or put them in prompts. +The stable npm tag remains 0.3.0. Do not claim it supports this complete workflow. + +## Before paid work +1. Read dreamlayer_capabilities and dreamlayer_balance (or CLI capabilities/balance --json). If either fails, resolve it before spending. +2. Confirm the requested operation is advertised. Ordinary completed image operations currently cost one credit each; obtain the live cost from capabilities. A multi-step edit and cutout costs two operations. +3. Use the user's already-authorized operation, number of outputs and credit budget. Ask only if missing. Never buy credits or expand the batch implicitly. +4. For file operations, verify input readability and a new output path before submitting. Upload once using dreamlayer_upload_image; preserve its input_asset_id. +5. Save a unique idempotency_key and the complete request locally before each generation. Do not store credentials in the job record. + +## Execute and recover +Select operation explicitly: text_to_image; image_to_image; background_remove; upscale; sprite_sheet. +All except text_to_image require input_asset_id. Generate returns execution_id, status, asset, question and last_event_id. +Preserve IDs/cursor after each response. For running work, call dreamlayer_execution or dreamlayer_events; do not generate a replacement after a timeout. +A needs_input result is a question, not a failed generation. Continue using conversation_id and respond. +For completed work, dreamlayer_download writes an absolute new local path. Never treat a returned asset URL as proof that the local file exists. +On a local download error, repair the destination and download the same execution. +File-based CLI retries upload a new asset; use status and download after uncertainty rather than rerunning the paid command. +Stop at insufficient credits, invalid request, unsupported operation, or an unresolved contract error. Keep recoverable state; do not loop paid retries. + +## Output acceptance +Inspect the saved image or preview. Check dimensions, transparency if requested, text spelling, reference fidelity and the intended use. Label uninspected outputs. +PNG output does not establish SVG/vector structure, pixel-perfect art, trademark clearance, print compliance, exact product fidelity or consistent animation. +API documentation: https://docs.dreamlayer.io/agent-api +Recovery: https://docs.dreamlayer.io/agent-api/jobs-and-events + +## CLI examples +```sh +dreamlayer capabilities --json +dreamlayer balance --json +dreamlayer generate "Original image brief" --aspect 1:1 --idempotency-key UNIQUE_SAVED_KEY --out concept.png --json +dreamlayer edit reference.png "Change the background to a simple studio scene" --idempotency-key UNIQUE_SAVED_KEY --out edited.png --json +dreamlayer cutout reference.png --idempotency-key UNIQUE_SAVED_KEY --out cutout.png --json +dreamlayer status EXECUTION_ID --json +dreamlayer download EXECUTION_ID --out recovered.png --json +``` +Placeholder IDs and keys must be replaced. Check CLI --help for supported flags; --max-credits is for sprite jobs. + diff --git a/.github/skills/integrate-game-art/SKILL.md b/.github/skills/integrate-game-art/SKILL.md new file mode 100644 index 0000000..943b7f4 --- /dev/null +++ b/.github/skills/integrate-game-art/SKILL.md @@ -0,0 +1,70 @@ +--- +name: integrate-game-art +description: "Plan, obtain, validate, and integrate DreamLayer artwork into a playable game while preserving its mechanics. Use when a game needs background, character, UI, or sprite files; not for gameplay-only work or another image service." +--- + +# Integrate game art + +Inspect the game before requesting art: engine and import settings, logical world units, +collision bodies, pivots, sprite dimensions, alpha requirements, animation timing, camera, +and asset paths. Separate visual dimensions from physics dimensions. Keep a playable +geometry baseline and record the behavior that must survive the artwork swap. + +Read the bundled [workflow contract](references/workflow-contract.md) for supported clients, +authentication, billing, polling, download, and recovery. Installation supplies instructions; +it does not connect or authenticate an MCP server. Inspect the actual available tool schema. +If the connected client lacks download or sprite fields, use the supported client from that +contract, or retain bundled assets and report the limitation. + +## Plan and obtain + +- Inventory reusable artwork and its license/provenance first. A downloaded sample is not + a new generation. Code-authored scenery should be labeled separately from DreamLayer art. +- Produce a dry-run asset plan with role, output path, dimensions/aspect, reference, operation, + transparency, and estimated credits. Read live capabilities and balance before paid work. + Track the total authorized cap across all operations, including cutouts and animation. + Reserve an unresolved job's estimated charge until its canonical status resolves it. +- For image operations use `generate-or-edit-image`; for animation use + `sprite-sheet-from-reference`, when installed. Both follow the bundled contract. If a task + skill is absent, use the contract and actual public schemas instead of inventing fields. +- Save request, idempotency key, execution ID, and event cursor locally without credentials. + Resume existing jobs after interruptions. Download to a new path and verify the file before + marking an asset available. Never rerun generation to repair a download failure. + +## Integrate and verify + +Inspect each image. Check decoded format, dimensions, actual transparent pixels, visual +coherence, ground anchor/pivot, frame order, and per-frame timing. Prefer a reviewed still +frame when animation details drift; disclose the decision. Use the delivered timing array +when it differs from a rounded duration label, and record the discrepancy. + +Keep collision and timing code independent of texture size. Add a baseline/artwork toggle +when useful for comparison. Validate both modes with the same deterministic input sequence, +then play a complete loop in the actual browser or engine. Test controls, pause/restart, +small screens, and reduced motion for decorative animation. For Godot/Unity use their +installed import skills; do not claim an engine was tested because its import files exist. + +Record file digests, dimensions, upstream revision or generation execution ID, transformations, +historical costs separately from new charges, and any unverified behavior. + +## Runnable example, no paid calls + +The [Relay garden example](https://github.com/TheDesignFounder/dreamlayer-game-assets) +bundles an original DreamLayer environment, six matching game objects, and a geometry mode. With Node.js 22.19+ on the 22.x line (or another REA-supported version): + +```sh +git clone https://github.com/TheDesignFounder/dreamlayer-game-assets.git +cd dreamlayer-game-assets +npm ci +npm test +npm run validate:assets +npm run art:plan +npm start +``` + +Open `http://127.0.0.1:4177/demo/`. No viewer key or credits are needed. Its plan script +submits nothing and defaults to a zero-credit cap. New generation uses the authenticated +canonical workflow above. The example's read-only recovery script never resubmits a job. + +Only when the task actually needs artifact investigation, read +[the REA companion](references/rea-investigation.md). Ordinary game artwork does not require REA. diff --git a/.github/skills/integrate-game-art/references/rea-investigation.md b/.github/skills/integrate-game-art/references/rea-investigation.md new file mode 100644 index 0000000..757271b --- /dev/null +++ b/.github/skills/integrate-game-art/references/rea-investigation.md @@ -0,0 +1,27 @@ +# Optional REA investigation + +Use Reverse Engineer Anything when a shipped, compiled, or minified artifact helps answer +a bounded behavior question. If readable project source already answers the question, +inspect it directly. DreamLayer is an artwork tool, not a REA analysis provider. + +Record origin, version/revision, redistribution permission, SHA-256, and the exact question. +Preserve original bytes and keep analysis Evidence private until sanitized. Distinguish +REA observations, the agent's interpretation, runtime verification, and later source checks. + +Relay garden uses a self-authored minified JavaScript target. It is a controlled example, +not a recovered commercial game and not a blind evaluation. REA 6.5.0 locates a Math.hypot +read, its enclosing function, and a caller relation. The agent interprets the artifact's +formula; numeric runtime tests establish the bounded equivalence. REA reports partial +coverage and unresolved facts, which must remain in the account. + +```sh +# Inside the example after npm ci; the pinned REA CLI needs no native analysis engine. +npm run investigate +npm test +``` + +Full local Evidence is written under `.local/`. The public excerpt is not an importable +Evidence record. Read the example's `docs/rea-workflow.md` for exact commands and boundaries. +For REA MCP setup use [REA's official installation guide](https://github.com/morluto/rea/blob/main/docs/installation.md). +Do not claim CLI execution proves MCP registration. Installing this skill registers neither +REA nor DreamLayer. Do not modify upstream REA for the example. diff --git a/.github/skills/integrate-game-art/references/workflow-contract.md b/.github/skills/integrate-game-art/references/workflow-contract.md new file mode 100644 index 0000000..bd6ce94 --- /dev/null +++ b/.github/skills/integrate-game-art/references/workflow-contract.md @@ -0,0 +1,46 @@ +# DreamLayer workflow contract + +Use the installed DreamLayer MCP tools, or the pinned CLI when MCP is unavailable. +Read the actual tool schema before calling. Never pass fields a client does not expose. + +## Setup +Requires Node.js >=22.12 and a DreamLayer API key from https://platform.dreamlayer.io. +Install the supported sprite-capable beta: `npm install -g dreamlayer@0.4.0-beta.4`. +MCP: `npx -y @dreamlayer/mcp@0.4.0-beta.5`. Supply DREAMLAYER_API_KEY to the server process using the host's secret settings. Never commit keys or put them in prompts. +The stable npm tag remains 0.3.0. Do not claim it supports this complete workflow. + +## Before paid work +1. Read dreamlayer_capabilities and dreamlayer_balance (or CLI capabilities/balance --json). If either fails, resolve it before spending. +2. Confirm the requested operation is advertised. Ordinary completed image operations currently cost one credit each; obtain the live cost from capabilities. A multi-step edit and cutout costs two operations. +3. Use the user's already-authorized operation, number of outputs and credit budget. Ask only if missing. Never buy credits or expand the batch implicitly. +4. For file operations, verify input readability and a new output path before submitting. Upload once using dreamlayer_upload_image; preserve its input_asset_id. +5. Save a unique idempotency_key and the complete request locally before each generation. Do not store credentials in the job record. + +## Execute and recover +Select operation explicitly: text_to_image; image_to_image; background_remove; upscale; sprite_sheet. +All except text_to_image require input_asset_id. Generate returns execution_id, status, asset, question and last_event_id. +Preserve IDs/cursor after each response. For running work, call dreamlayer_execution or dreamlayer_events; do not generate a replacement after a timeout. +A needs_input result is a question, not a failed generation. Continue using conversation_id and respond. +For completed work, dreamlayer_download writes an absolute new local path. Never treat a returned asset URL as proof that the local file exists. +On a local download error, repair the destination and download the same execution. +File-based CLI retries upload a new asset; use status and download after uncertainty rather than rerunning the paid command. +Stop at insufficient credits, invalid request, unsupported operation, or an unresolved contract error. Keep recoverable state; do not loop paid retries. + +## Output acceptance +Inspect the saved image or preview. Check dimensions, transparency if requested, text spelling, reference fidelity and the intended use. Label uninspected outputs. +PNG output does not establish SVG/vector structure, pixel-perfect art, trademark clearance, print compliance, exact product fidelity or consistent animation. +API documentation: https://docs.dreamlayer.io/agent-api +Recovery: https://docs.dreamlayer.io/agent-api/jobs-and-events + +## CLI examples +```sh +dreamlayer capabilities --json +dreamlayer balance --json +dreamlayer generate "Original image brief" --aspect 1:1 --idempotency-key UNIQUE_SAVED_KEY --out concept.png --json +dreamlayer edit reference.png "Change the background to a simple studio scene" --idempotency-key UNIQUE_SAVED_KEY --out edited.png --json +dreamlayer cutout reference.png --idempotency-key UNIQUE_SAVED_KEY --out cutout.png --json +dreamlayer status EXECUTION_ID --json +dreamlayer download EXECUTION_ID --out recovered.png --json +``` +Placeholder IDs and keys must be replaced. Check CLI --help for supported flags; --max-credits is for sprite jobs. + diff --git a/README.md b/README.md index fd90e9b..5921fbd 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ See [client setup](docs/client-setup.md) for Claude Code, Codex, Cursor, OpenCod | Ads and social posts | marketing-image-variations | Creative files, no ad publishing | | Repeated photo operations | batch-photo-editing | Per-file jobs with a total budget | | Sprite animations | sprite-sheet-from-reference | Beta ZIP, PNG frames, atlas and preview | +| Game artwork integration | integrate-game-art | Asset plan, provenance, baseline/art comparison, browser verification | | Godot / Unity | godot-sprite-import / unity-sprite-import | Local engine import examples | ## Cost and recovery @@ -48,3 +49,9 @@ Nothing is symlinked, so the layout survives Windows checkouts and archive downl [Support](mailto:Mackenzie@dreamlayer.io) · [Terms](https://dreamlayer.io/terms) · [Privacy](https://dreamlayer.io/privacy) + +## Playable example + +[Relay garden](https://github.com/TheDesignFounder/dreamlayer-game-assets) combines a real REA CLI investigation of a controlled minified game with an original DreamLayer environment and six matching game objects. The art pass used three credits; play with bundled files, compare geometry and artwork, and reproduce the movement tests without credits. + +Install the companion workflow with `npx skills add TheDesignFounder/dreamlayer-agent-plugin --skill integrate-game-art`. REA is optional for ordinary artwork tasks. diff --git a/clawhub/dreamlayer-image-workflows/SKILL.md b/clawhub/dreamlayer-image-workflows/SKILL.md index fe8d7ba..7870496 100644 --- a/clawhub/dreamlayer-image-workflows/SKILL.md +++ b/clawhub/dreamlayer-image-workflows/SKILL.md @@ -72,6 +72,7 @@ under `plugins/dreamlayer/skills/`. Read the matching one and follow it rather t | A bounded batch of the same edit across several photos | `batch-photo-editing` | | A sprite sheet from one reference | `sprite-sheet-from-reference` | | Importing a finished sprite ZIP into Godot 4 | `godot-sprite-import` | +| Integrating game artwork without changing mechanics | `integrate-game-art` | | Preparing a sprite ZIP for Unity 2D | `unity-sprite-import` | All of them share one contract: [`docs/workflow-contract.md`](https://github.com/TheDesignFounder/dreamlayer-agent-plugin/blob/main/docs/workflow-contract.md). diff --git a/docs/cline-setup.md b/docs/cline-setup.md index 19cc469..2226a01 100644 --- a/docs/cline-setup.md +++ b/docs/cline-setup.md @@ -4,7 +4,7 @@ Use DreamLayer when a task needs actual image files: an original image, a raster ## Install the skills -This repository carries the nine workflows in `.cline/skills/`, the project path Cline recommends and expects teams to commit. +This repository carries the ten workflows in `.cline/skills/`, the project path Cline recommends and expects teams to commit. ```sh git clone https://github.com/TheDesignFounder/dreamlayer-agent-plugin.git @@ -25,10 +25,10 @@ Confirm discovery from your project root: cline config skills ``` -Nine DreamLayer entries appear under `Enabled skills:` with their paths. Pass the section name, +Ten DreamLayer entries appear under `Enabled skills:` with their paths. Pass the section name, because plain `cline config` opens an interactive view and needs a terminal. In the IDE extension, open the Skills tab from the scale icon at the bottom of the Cline panel. -## The nine workflows +## The ten workflows | Workflow | Makes | | --- | --- | @@ -40,6 +40,7 @@ because plain `cline config` opens an interactive view and needs a terminal. In | batch-photo-editing | One edit, cutout or upscale applied across a list of files, with a budget | | sprite-sheet-from-reference | A sprite-sheet ZIP of transparent frames, atlas and preview | | godot-sprite-import | A runnable Godot 4 demo from a downloaded sprite ZIP | +| integrate-game-art | Integrate game artwork while preserving mechanics; includes a free browser example | | unity-sprite-import | Unity 2D import files and a frame player from a downloaded sprite ZIP | ## Connect the tools @@ -93,4 +94,4 @@ Sprite output is beta. A PNG does not establish vector structure, pixel-perfect ## Validated -Cline CLI 3.0.65 reported all nine workflows under `Enabled skills:` from `.cline/skills/` in a clean profile, with the generated README ignored, `cline skill add` installed the same nine to `.agents/skills/` and listed them as Cline skills, and `cline config mcp` listed the pinned stdio server after the settings file was written. No generation was run and no credits were spent. +Cline CLI 3.0.65 reported all ten workflows under `Enabled skills:` from `.cline/skills/` in a clean profile, with the generated README ignored, `cline skill add` installed the same nine to `.agents/skills/` and listed them as Cline skills, and `cline config mcp` listed the pinned stdio server after the settings file was written. No generation was run and no credits were spent. diff --git a/docs/copilot-setup.md b/docs/copilot-setup.md index 8759903..3b51000 100644 --- a/docs/copilot-setup.md +++ b/docs/copilot-setup.md @@ -4,7 +4,7 @@ Use DreamLayer when a task needs actual image files: an original image, a raster ## Install the skills -This repository already carries the nine workflows in `.github/skills/`, which Copilot reads as project skills. Copilot also reads `.agents/skills/` and `.claude/skills/`, and this repository generates `.agents/skills/` from the same source. +This repository already carries the ten workflows in `.github/skills/`, which Copilot reads as project skills. Copilot also reads `.agents/skills/` and `.claude/skills/`, and this repository generates `.agents/skills/` from the same source. ```sh git clone https://github.com/TheDesignFounder/dreamlayer-agent-plugin.git @@ -19,9 +19,9 @@ Confirm discovery from your project root: copilot skill list ``` -Nine DreamLayer entries appear under `Project skills:`. `copilot skill disable ` hides one you do not want. +Ten DreamLayer entries appear under `Project skills:`. `copilot skill disable ` hides one you do not want. -## The nine workflows +## The ten workflows | Workflow | Makes | | --- | --- | @@ -33,6 +33,7 @@ Nine DreamLayer entries appear under `Project skills:`. `copilot skill disable < | batch-photo-editing | One edit, cutout or upscale applied across a list of files, with a budget | | sprite-sheet-from-reference | A sprite-sheet ZIP of transparent frames, atlas and preview | | godot-sprite-import | A runnable Godot 4 demo from a downloaded sprite ZIP | +| integrate-game-art | Integrate game artwork while preserving mechanics; includes a free browser example | | unity-sprite-import | Unity 2D import files and a frame player from a downloaded sprite ZIP | ## Connect the tools @@ -83,4 +84,4 @@ Sprite output is beta. A PNG does not establish vector structure, pixel-perfect ## Validated -GitHub Copilot CLI 1.0.88 listed all nine workflows from `.github/skills/` in a clean profile with no sign-in, and `copilot mcp add` plus `copilot mcp list` registered the pinned server with the key masked in the output. No generation was run and no credits were spent. +GitHub Copilot CLI 1.0.88 listed all ten workflows from `.github/skills/` in a clean profile with no sign-in, and `copilot mcp add` plus `copilot mcp list` registered the pinned server with the key masked in the output. No generation was run and no credits were spent. diff --git a/packaging/openai/dreamlayer-skills-1.0.0.zip b/packaging/openai/dreamlayer-skills-1.0.0.zip index a12bf6c..a1f25ed 100644 Binary files a/packaging/openai/dreamlayer-skills-1.0.0.zip and b/packaging/openai/dreamlayer-skills-1.0.0.zip differ diff --git a/plugins/dreamlayer/skills/integrate-game-art/SKILL.md b/plugins/dreamlayer/skills/integrate-game-art/SKILL.md new file mode 100644 index 0000000..943b7f4 --- /dev/null +++ b/plugins/dreamlayer/skills/integrate-game-art/SKILL.md @@ -0,0 +1,70 @@ +--- +name: integrate-game-art +description: "Plan, obtain, validate, and integrate DreamLayer artwork into a playable game while preserving its mechanics. Use when a game needs background, character, UI, or sprite files; not for gameplay-only work or another image service." +--- + +# Integrate game art + +Inspect the game before requesting art: engine and import settings, logical world units, +collision bodies, pivots, sprite dimensions, alpha requirements, animation timing, camera, +and asset paths. Separate visual dimensions from physics dimensions. Keep a playable +geometry baseline and record the behavior that must survive the artwork swap. + +Read the bundled [workflow contract](references/workflow-contract.md) for supported clients, +authentication, billing, polling, download, and recovery. Installation supplies instructions; +it does not connect or authenticate an MCP server. Inspect the actual available tool schema. +If the connected client lacks download or sprite fields, use the supported client from that +contract, or retain bundled assets and report the limitation. + +## Plan and obtain + +- Inventory reusable artwork and its license/provenance first. A downloaded sample is not + a new generation. Code-authored scenery should be labeled separately from DreamLayer art. +- Produce a dry-run asset plan with role, output path, dimensions/aspect, reference, operation, + transparency, and estimated credits. Read live capabilities and balance before paid work. + Track the total authorized cap across all operations, including cutouts and animation. + Reserve an unresolved job's estimated charge until its canonical status resolves it. +- For image operations use `generate-or-edit-image`; for animation use + `sprite-sheet-from-reference`, when installed. Both follow the bundled contract. If a task + skill is absent, use the contract and actual public schemas instead of inventing fields. +- Save request, idempotency key, execution ID, and event cursor locally without credentials. + Resume existing jobs after interruptions. Download to a new path and verify the file before + marking an asset available. Never rerun generation to repair a download failure. + +## Integrate and verify + +Inspect each image. Check decoded format, dimensions, actual transparent pixels, visual +coherence, ground anchor/pivot, frame order, and per-frame timing. Prefer a reviewed still +frame when animation details drift; disclose the decision. Use the delivered timing array +when it differs from a rounded duration label, and record the discrepancy. + +Keep collision and timing code independent of texture size. Add a baseline/artwork toggle +when useful for comparison. Validate both modes with the same deterministic input sequence, +then play a complete loop in the actual browser or engine. Test controls, pause/restart, +small screens, and reduced motion for decorative animation. For Godot/Unity use their +installed import skills; do not claim an engine was tested because its import files exist. + +Record file digests, dimensions, upstream revision or generation execution ID, transformations, +historical costs separately from new charges, and any unverified behavior. + +## Runnable example, no paid calls + +The [Relay garden example](https://github.com/TheDesignFounder/dreamlayer-game-assets) +bundles an original DreamLayer environment, six matching game objects, and a geometry mode. With Node.js 22.19+ on the 22.x line (or another REA-supported version): + +```sh +git clone https://github.com/TheDesignFounder/dreamlayer-game-assets.git +cd dreamlayer-game-assets +npm ci +npm test +npm run validate:assets +npm run art:plan +npm start +``` + +Open `http://127.0.0.1:4177/demo/`. No viewer key or credits are needed. Its plan script +submits nothing and defaults to a zero-credit cap. New generation uses the authenticated +canonical workflow above. The example's read-only recovery script never resubmits a job. + +Only when the task actually needs artifact investigation, read +[the REA companion](references/rea-investigation.md). Ordinary game artwork does not require REA. diff --git a/plugins/dreamlayer/skills/integrate-game-art/references/rea-investigation.md b/plugins/dreamlayer/skills/integrate-game-art/references/rea-investigation.md new file mode 100644 index 0000000..757271b --- /dev/null +++ b/plugins/dreamlayer/skills/integrate-game-art/references/rea-investigation.md @@ -0,0 +1,27 @@ +# Optional REA investigation + +Use Reverse Engineer Anything when a shipped, compiled, or minified artifact helps answer +a bounded behavior question. If readable project source already answers the question, +inspect it directly. DreamLayer is an artwork tool, not a REA analysis provider. + +Record origin, version/revision, redistribution permission, SHA-256, and the exact question. +Preserve original bytes and keep analysis Evidence private until sanitized. Distinguish +REA observations, the agent's interpretation, runtime verification, and later source checks. + +Relay garden uses a self-authored minified JavaScript target. It is a controlled example, +not a recovered commercial game and not a blind evaluation. REA 6.5.0 locates a Math.hypot +read, its enclosing function, and a caller relation. The agent interprets the artifact's +formula; numeric runtime tests establish the bounded equivalence. REA reports partial +coverage and unresolved facts, which must remain in the account. + +```sh +# Inside the example after npm ci; the pinned REA CLI needs no native analysis engine. +npm run investigate +npm test +``` + +Full local Evidence is written under `.local/`. The public excerpt is not an importable +Evidence record. Read the example's `docs/rea-workflow.md` for exact commands and boundaries. +For REA MCP setup use [REA's official installation guide](https://github.com/morluto/rea/blob/main/docs/installation.md). +Do not claim CLI execution proves MCP registration. Installing this skill registers neither +REA nor DreamLayer. Do not modify upstream REA for the example. diff --git a/plugins/dreamlayer/skills/integrate-game-art/references/workflow-contract.md b/plugins/dreamlayer/skills/integrate-game-art/references/workflow-contract.md new file mode 100644 index 0000000..bd6ce94 --- /dev/null +++ b/plugins/dreamlayer/skills/integrate-game-art/references/workflow-contract.md @@ -0,0 +1,46 @@ +# DreamLayer workflow contract + +Use the installed DreamLayer MCP tools, or the pinned CLI when MCP is unavailable. +Read the actual tool schema before calling. Never pass fields a client does not expose. + +## Setup +Requires Node.js >=22.12 and a DreamLayer API key from https://platform.dreamlayer.io. +Install the supported sprite-capable beta: `npm install -g dreamlayer@0.4.0-beta.4`. +MCP: `npx -y @dreamlayer/mcp@0.4.0-beta.5`. Supply DREAMLAYER_API_KEY to the server process using the host's secret settings. Never commit keys or put them in prompts. +The stable npm tag remains 0.3.0. Do not claim it supports this complete workflow. + +## Before paid work +1. Read dreamlayer_capabilities and dreamlayer_balance (or CLI capabilities/balance --json). If either fails, resolve it before spending. +2. Confirm the requested operation is advertised. Ordinary completed image operations currently cost one credit each; obtain the live cost from capabilities. A multi-step edit and cutout costs two operations. +3. Use the user's already-authorized operation, number of outputs and credit budget. Ask only if missing. Never buy credits or expand the batch implicitly. +4. For file operations, verify input readability and a new output path before submitting. Upload once using dreamlayer_upload_image; preserve its input_asset_id. +5. Save a unique idempotency_key and the complete request locally before each generation. Do not store credentials in the job record. + +## Execute and recover +Select operation explicitly: text_to_image; image_to_image; background_remove; upscale; sprite_sheet. +All except text_to_image require input_asset_id. Generate returns execution_id, status, asset, question and last_event_id. +Preserve IDs/cursor after each response. For running work, call dreamlayer_execution or dreamlayer_events; do not generate a replacement after a timeout. +A needs_input result is a question, not a failed generation. Continue using conversation_id and respond. +For completed work, dreamlayer_download writes an absolute new local path. Never treat a returned asset URL as proof that the local file exists. +On a local download error, repair the destination and download the same execution. +File-based CLI retries upload a new asset; use status and download after uncertainty rather than rerunning the paid command. +Stop at insufficient credits, invalid request, unsupported operation, or an unresolved contract error. Keep recoverable state; do not loop paid retries. + +## Output acceptance +Inspect the saved image or preview. Check dimensions, transparency if requested, text spelling, reference fidelity and the intended use. Label uninspected outputs. +PNG output does not establish SVG/vector structure, pixel-perfect art, trademark clearance, print compliance, exact product fidelity or consistent animation. +API documentation: https://docs.dreamlayer.io/agent-api +Recovery: https://docs.dreamlayer.io/agent-api/jobs-and-events + +## CLI examples +```sh +dreamlayer capabilities --json +dreamlayer balance --json +dreamlayer generate "Original image brief" --aspect 1:1 --idempotency-key UNIQUE_SAVED_KEY --out concept.png --json +dreamlayer edit reference.png "Change the background to a simple studio scene" --idempotency-key UNIQUE_SAVED_KEY --out edited.png --json +dreamlayer cutout reference.png --idempotency-key UNIQUE_SAVED_KEY --out cutout.png --json +dreamlayer status EXECUTION_ID --json +dreamlayer download EXECUTION_ID --out recovered.png --json +``` +Placeholder IDs and keys must be replaced. Check CLI --help for supported flags; --max-credits is for sprite jobs. + diff --git a/scripts/validate.py b/scripts/validate.py index e5520c5..15f2388 100644 --- a/scripts/validate.py +++ b/scripts/validate.py @@ -19,7 +19,7 @@ if 'node_modules' not in path.parts: json.loads(path.read_text()) config=json.loads((ROOT/'plugins/dreamlayer/.mcp.json').read_text()) assert config['mcpServers']['dreamlayer']['args']==['-y','@dreamlayer/mcp@0.4.0-beta.5'] -assert len(skills)==9 +assert len(skills)==10 clawhub=ROOT/'clawhub/dreamlayer-image-workflows/SKILL.md' text=clawhub.read_text()