dotframe 0.1.0 → 0.1.2

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.2
4
+
5
+ - `npx skills add crafter-games/dotframe` installs a `dotframe` discovery skill that points agents at `dotframe skills get core`. The guides served by the CLI moved to `skill-data/`, so they are not installed as separate skills.
6
+
7
+ ## 0.1.1
8
+
9
+ - First release published from CI through npm trusted publishing, with provenance.
10
+
3
11
  ## 0.1.0
4
12
 
5
13
  First npm release: the engine plus the agent-first `dotframe` CLI.
package/README.md CHANGED
@@ -9,7 +9,8 @@ Status: S5 in progress (porting Crafter Smash). `examples/canvas2d` exercises `s
9
9
  `dotframe` is an agent-first CLI over the engine. The simulation is deterministic, so an agent can play a game without a screen, render a frame with the real renderer, and catch netplay desyncs before a real match.
10
10
 
11
11
  ```sh
12
- bun link # or: bun add -g github:crafter-games/dotframe
12
+ npm i -g dotframe # needs Bun on PATH
13
+ npx skills add crafter-games/dotframe # installs the agent skill stub
13
14
  dotframe new my-game --template fighter # fighter, platformer, blank
14
15
  dotframe sim --mash 7 --frames 600 --json # headless run: state + checksum
15
16
  dotframe snap --frame 300 --mash 7 # one frame through WebGPU (agent-browser)
@@ -23,7 +24,7 @@ dotframe skills list # guides bundled with this version
23
24
 
24
25
  A game opts in with a `dotframe.json` (targets, deploy, relay, vendor links, local-only assets) and a `sim` module that default-exports `defineSim` from `src/sim.ts`. Agents start with `dotframe skills get core`. Every command takes `--json`; errors carry a `code`, a `fix`, and the `skill` to read.
25
26
 
26
- - `cli/`: the CLI (Bun). `skills/`: the guides served by `dotframe skills`. `templates/`: the `dotframe new` templates.
27
+ - `cli/`: the CLI (Bun). `skill-data/`: the guides served by `dotframe skills`. `skills/dotframe`: the discovery stub that `npx skills add crafter-games/dotframe` installs. `templates/`: the `dotframe new` templates.
27
28
 
28
29
  ## Layout
29
30
 
@@ -3,13 +3,6 @@ import { join, resolve } from "node:path";
3
3
  import { CliError, type Ctx, exec, loadConfig, print, runSteps, target } from "../lib";
4
4
 
5
5
  const TEMPLATES = resolve(import.meta.dir, "../../templates");
6
- const STUB = `---
7
- name: dotframe
8
- description: Build, test, and export this dotframe game. Use when changing gameplay, simulating or replaying frames, checking a render, debugging netplay desyncs, or building and deploying a target.
9
- ---
10
- Run \`dotframe skills get core\` before any dotframe command. It matches the installed CLI version.
11
- List the specialized guides with \`dotframe skills list\`.
12
- `;
13
6
 
14
7
  export async function create(ctx: Ctx, name: string | undefined, template: string, install = true): Promise<void> {
15
8
  if (!name || !/^[a-z0-9][a-z0-9-]*$/.test(name)) throw new CliError("BAD_NAME", "new needs a lowercase name (letters, digits, dashes)", "dotframe new my-game --template fighter", "game-design");
@@ -30,7 +23,7 @@ export async function create(ctx: Ctx, name: string | undefined, template: strin
30
23
  writeFileSync(join(dir, to), readFileSync(from, "utf8").replaceAll("__NAME__", name).replaceAll("__SCOPE__", "your-vercel-team"));
31
24
  }
32
25
  mkdirSync(join(dir, ".agents/skills/dotframe"), { recursive: true });
33
- writeFileSync(join(dir, ".agents/skills/dotframe/SKILL.md"), STUB);
26
+ cpSync(resolve(import.meta.dir, "../../skills/dotframe/SKILL.md"), join(dir, ".agents/skills/dotframe/SKILL.md"));
34
27
  mkdirSync(join(dir, "replays"), { recursive: true });
35
28
  const steps = [
36
29
  { label: "git init", argv: ["git", "init", "-q"] },
@@ -4,7 +4,7 @@ import { CliError, type Ctx, print } from "../lib";
4
4
 
5
5
  // Skills ship inside the dotframe package, so the guide always matches the installed CLI.
6
6
  export function skillsDir(): string {
7
- return resolve(process.env.DOTFRAME_SKILLS_DIR ?? join(import.meta.dir, "../../skills"));
7
+ return resolve(process.env.DOTFRAME_SKILLS_DIR ?? join(import.meta.dir, "../../skill-data"));
8
8
  }
9
9
 
10
10
  interface Skill {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotframe",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "TS-first game engine and agent-first CLI: one codebase for web, Discord, iOS and native binaries",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -16,7 +16,7 @@
16
16
  "files": [
17
17
  "cli",
18
18
  "src",
19
- "skills",
19
+ "skill-data",
20
20
  "templates",
21
21
  "assets",
22
22
  "tools/*.ts",
@@ -24,11 +24,12 @@
24
24
  "scripts",
25
25
  "README.md",
26
26
  "CHANGELOG.md",
27
- "LICENSE"
27
+ "LICENSE",
28
+ "skills"
28
29
  ],
29
30
  "repository": {
30
31
  "type": "git",
31
- "url": "https://github.com/crafter-games/dotframe"
32
+ "url": "git+https://github.com/crafter-games/dotframe.git"
32
33
  },
33
34
  "homepage": "https://github.com/crafter-games/dotframe#readme",
34
35
  "keywords": [
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: dotframe
3
+ description: Agent-first CLI for the dotframe game engine. Use when building, testing, or exporting a dotframe game: creating a game from a template, simulating or replaying frames headless, rendering a frame to check what a player sees, debugging rollback netplay desyncs, or building and deploying for web, Discord Activities, iOS, and native macOS or Windows. Triggers include "make a game", "dotframe", "simulate the match", "snap a frame", "replay", "desync", "netplay", "build for iOS", "deploy the game", or any repo with a dotframe.json.
4
+ allowed-tools: Bash(dotframe:*), Bash(npx dotframe:*), Bash(bunx dotframe:*)
5
+ hidden: true
6
+ ---
7
+
8
+ # dotframe
9
+
10
+ TypeScript game engine with an agent-first CLI. The simulation is deterministic, so an agent can play a game without a screen, render one frame through the real WebGPU renderer, and catch netplay desyncs before a real match.
11
+
12
+ Install: `npm i -g dotframe` (needs Bun on PATH)
13
+
14
+ ## Start here
15
+
16
+ This file is a discovery stub, not the usage guide. Before running any `dotframe` command, load the actual workflow content from the CLI:
17
+
18
+ ```bash
19
+ dotframe skills get core # start here: the edit, sim, snap, replay loop, the Sim contract, the trust ladder
20
+ dotframe skills get core --full # include the full error code reference
21
+ ```
22
+
23
+ The CLI serves skill content that always matches the installed version, so instructions never go stale. The content in this stub cannot change between releases, which is why it just points at `skills get core`.
24
+
25
+ ## Specialized skills
26
+
27
+ Load a specialized skill when the task calls for it:
28
+
29
+ ```bash
30
+ dotframe skills get netplay # rollback netcode, desync, render purity
31
+ dotframe skills get game-design # new games, templates, shaping state for agents
32
+ dotframe skills get export-web # web build, local dev, Vercel deploys
33
+ dotframe skills get discord # Discord Activities, URL mappings, stale bundles
34
+ dotframe skills get ios # iPhone builds, vendor links, signing, device install
35
+ dotframe skills get macos # native binaries with scriptc
36
+ dotframe skills get relay # relay placement and deploys
37
+ dotframe skills get assets # licensing and local-only assets before a release
38
+ ```
39
+
40
+ Run `dotframe skills list` to see everything available on the installed version. Errors in `--json` mode name the skill to read in their `skill` field.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes